[CMake] cmake and sun workshop compiler.

Bill Hoffman bill.hoffman at kitware.com
Tue Dec 9 10:43:54 EST 2008


George Neill wrote:
> Bill,
> 
> On Tue, Dec 9, 2008 at 7:02 AM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>> George Neill wrote:
>>> Hi CMakers,
>>>
>>>   I'd like to use cmake with the Sun cc/CC compiler on linux.   What
>>> do I need to change to make this work?
>>>
>> Put them in your PATH.  Then set CC=cc, CXX=CC and run cmake.
> 
> It looks like it's picking up the gcc/g++ flags.
> 
> CC: Warning: Option -fPIC passed to ld, if ld is invoked, ignored otherwise
> CC: Warning: Option -rdynamic passed to ld, if ld is invoked, ignored otherwise
> /home/gneill/Desktop/sse/sunstudioceres/prod/lib/ld: bad -rpath option
> make[1]: *** [cmTryCompileExec] Error 1
> make[1]: Leaving directory `/home/gneill/test/CMakeFiles/CMakeTmp'
> make: *** [cmTryCompileExec/fast] Error 2
> 

What version of cmake are you using?  We have a dashboard with this 
compiler and it works fine:
http://www.cdash.org/CDash/viewNotes.php?buildid=228158

Do you  have CXXFLAGS, CFLAGS, or LDFLAGS set in your environment before 
you run CMake that have gnu flags in them?

-Bill


More information about the CMake mailing list