Manta Interactive Ray Tracer Development Mailing List

Text archives Help


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


Chronological Thread 
  • From: Solomon Boulos <boulos@cs.utah.edu>
  • To: 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 20:14:45 -0600

If you set CC and CXX cmake respects that. The only thing I wasn't sure of is whether or not it also respects your CXXFLAGS variable (this seems possible but I'm guessing they're adding rdynamic as a guess that isn't valid for PGC -- so I imagine you could add flags but not remove the offending one).  My guess is that the compiler Ingo is using happens to not mind rdynamic on Linux.

Solomon

On Mar 12, 2008, at 7:43 PM, "James Bigler" <bigler@cs.utah.edu> wrote:

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