[CMake] Error detecting sun studio compiler under linux

Doug Henry develop at brilligent.com
Tue Oct 24 08:50:16 EDT 2006


Looks like I may have missed a couple options (-R and -KPIC).  As far as I
can tell, the compiler should work exactly like the already supported SunOS
version of the compiler.  Just copy the options from the already included
SunOS.cmake file, which are almost the same as the file I sent you.

On 10/23/06, Brad King <brad.king at kitware.com> wrote:
>
> Doug Henry wrote:
> > I am trying to use the sun studio compiler under linux and I am having a
> > terrible time getting past the cmake compiler tests.  I'm not sure what
> > the error messages are telling me, but it looks like some incorrect
> > flags are being passed in.  I extracted the short test program from
> > CMakeTestCXXCompiler.cmake and it of course compiles/links just fine
> > with CC.  Output follows:
> [snip]
> > -- Check for working CXX compiler: /opt/sun/sunstudiomars/bin/CC --
> broken
> [snip]
> > /opt/sun/sunstudiomars/bin/CC         -fPIC
> > "CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o"   -o
> > cmTryCompileExec -rdynamic
> > 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
> > /usr/bin/ld: bad -rpath option
>
> AFAIK no one has tried CMake with this compiler before.
>
> CMake is invoking the compiler assuming that it accepts the flags other
> Linux compilers (such as GNU and Intel) accept.  Nothing has told it
> otherwise.  You'll have to setup a platform file to configure this
> compiler.  Look in share/CMake/Modules/Platform for similar files.  For
> this case there should be a file called Linux-CC.cmake that overrides
> some of the settings in Linux.cmake.  Some of the settings in
> Modules/CMakeCXXInformation.cmake may need to be overridden also.
>
> If you get this working we'll include the files in upstream CMake to
> make support for the compiler permanent.
>
> FYI, supported platforms all have nightly testing:
>
> http://public.kitware.com/dashboard.php?name=cmake
>
> If a platform isn't here it probably doesn't work.
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061024/2c35b0f5/attachment.html


More information about the CMake mailing list