Manta Interactive Ray Tracer Development Mailing List

Text archives Help


Re: [Manta] Re: [RENDER] CMake and Portland Group compilers


Chronological Thread 
  • From: "James Bigler" <bigler@cs.utah.edu>
  • Cc: Manta <manta@sci.utah.edu>
  • Subject: Re: [Manta] Re: [RENDER] CMake and Portland Group compilers
  • Date: Wed, 12 Mar 2008 19:43:13 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=nNJGj24gTorN85/DMYnd3V9zWpoQeJ2tGBHoxgZLOY6jbO3dIZ+bxe6mMo7UsLT3B2Hd3ud2vGoFeoHAxiuDVbA/Z35ACeTV2op9WfaZF4s7Zn0buHE1Y0S4nVhKv6diqNtXbfQdNOdNK9B0aJTuIrdwg102+TQ9PO9HAggXOVA=

I have no idea how this works for Ingo.  Once CMake picks a compiler,
you cannot change it.

Did you ever get this to work?

On Mon, Mar 10, 2008 at 1:47 AM, Ingo Wald <ingowald@gmail.com> wrote:
Christiaan Paul Gribble wrote:
>
> Does anyone have experience getting CMake to work with the PGI
> compilers?  I'd like to try building Manta with it, but I can't even
> get a simple project to configure correctly with it (see below).  It's
> obviously just a problem with the flags used during the
> TryCompileTest, but I haven't been able to find out how to change the
> flags that CMake uses during those tests.
>
> Any thoughts?
>
> Thanks,
I "think" you can manually force "CXX=..." and "CC=..." _after_ the
compiler test has been run. I do have a cmake file in which I use a
compiler for a theoretical architecture that does not yet exist and
whose generated bycode would most likely not be executable on the host
machine ... and it works.

I think I have something like

SET(USE_MY_COMPILER YES CACHE BOOL "bla");
IF (USE_MY_COMPILER)
  SET(CMAKE_CXX_COMPILER,"blubba");
  ....
ELSE(....)
...
ENDIF(...)

I "think" cmake then uses the CC/CXX environment variables for the
compiler test script; at least it works in my case.

Cheers,

Ingo

PS: I'm pretty sure it uses CMAKE_C_FLAGS/CMAKE_CXX_FLAGS during
compilation. I set these, too, so maybe that's the difference.

>
> C
>
> [gribblecp@endeavour ~...rt488/build-pgi]% cmake ../src/
> -- Check for working C compiler: /opt/pgi/linux86-64/7.1-5/bin/pgcc
> -- Check for working C compiler: /opt/pgi/linux86-64/7.1-5/bin/pgcc --
> broken
> CMake Error: The C compiler "/opt/pgi/linux86-64/7.1-5/bin/pgcc" is
> not able to compile a simple test program.
> It fails with the following output:
>  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
> CMakeFiles/cmTryCompileExec.dir/build
> gmake[1]: Entering directory
> `/home/gribblecp/research/code/rt488/build-pgi/CMakeFiles/CMakeTmp'
> /usr/local/bin/cmake -E cmake_progress_report
> /home/gribblecp/research/code/rt488/build-pgi/CMakeFiles/CMakeTmp/CMakeFiles
> 1
> Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
> /opt/pgi/linux86-64/7.1-5/bin/pgcc   -o
> CMakeFiles/cmTryCompileExec.dir/testCCompiler.o   -c
> /home/gribblecp/research/code/rt488/build-pgi/CMakeFiles/CMakeTmp/testCCompiler.c
>
> Linking C executable cmTryCompileExec
> /usr/local/bin/cmake -P
> CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
> /opt/pgi/linux86-64/7.1-5/bin/pgcc        -fPIC
> "CMakeFiles/cmTryCompileExec.dir/testCCompiler.o"   -o
> cmTryCompileExec -rdynamic
> pgcc-Error-Unknown switch: -rdynamic
> gmake[1]: *** [cmTryCompileExec] Error 1
> gmake[1]: Leaving directory
> `/home/gribblecp/research/code/rt488/build-pgi/CMakeFiles/CMakeTmp'
> gmake: *** [cmTryCompileExec/fast] Error 2
>
>
> CMake will not be able to correctly generate this project.
> -- Configuring done
>





Archive powered by MHonArc 2.6.16.

Top of page