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.&nbsp; Output follows:<br><br>CC=cc CXX=CC /mnt/tools/bin/cmake --version<br>cmake version 2.4-patch 3<br>dhenry@beast:/tmp/cmake/build$ CC=cc CXX=CC /mnt/tools/bin/cmake ..
<br>-- Check for working C compiler: /opt/sun/sunstudiomars/bin/cc<br>-- Check for working C compiler: /opt/sun/sunstudiomars/bin/cc -- works<br>-- Check size of void*<br>-- Check size of void* - done<br>-- Check for working CXX compiler: /opt/sun/sunstudiomars/bin/CC
<br>-- Check for working CXX compiler: /opt/sun/sunstudiomars/bin/CC -- broken<br>CMake Error: Error in cmake code at<br>/mnt/tools/share/CMake/Modules/CMakeTestCXXCompiler.cmake:25:<br>MESSAGE The C++ compiler &quot;/opt/sun/sunstudiomars/bin/CC&quot; is not able to compile a simple test program.
<br>It fails with the following output:<br>&nbsp;/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build<br>make[1]: Entering directory `/tmp/cmake/build/CMakeFiles/CMakeTmp'<br>/mnt/tools/bin/cmake -E cmake_progress_report /tmp/cmake/build/CMakeFiles/CMakeTmp/CMakeFiles 1
<br>Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o<br>/opt/sun/sunstudiomars/bin/CC&nbsp;&nbsp;&nbsp; -o CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o -c /tmp/cmake/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
<br>Linking CXX executable cmTryCompileExec<br>/mnt/tools/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake<br>/opt/sun/sunstudiomars/bin/CC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -fPIC &quot;CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o&quot;&nbsp;&nbsp; -o cmTryCompileExec -rdynamic
<br>CC: Warning: Option -fPIC passed to ld, if ld is invoked, ignored otherwise<br>CC: Warning: Option -rdynamic passed to ld, if ld is invoked, ignored otherwise<br>/usr/bin/ld: bad -rpath option<br>make[1]: *** [cmTryCompileExec] Error 1
<br>make[1]: Leaving directory `/tmp/cmake/build/CMakeFiles/CMakeTmp'<br>make: *** [cmTryCompileExec/fast] Error 2<br><br><br>CMake will not be able to correctly generate this project.<br>Current CMake stack: /tmp/cmake/CMakeLists.txt;/mnt/tools/share/CMake/Modules/CMakeCInformation.cmake;/mnt/tools/share/CMake/Modules/CMakeCXXInformation.cmake;/mnt/tools/share/CMake/Modules/CMakeTestCXXCompiler.cmake-- Configuring done
<br><br>