Bill, On Tue, Dec 9, 2008 at 7:02 AM, Bill Hoffman <[EMAIL PROTECTED]> 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. [EMAIL PROTECTED]:~/test$ cat CMakeLists.txt PROJECT(test) ADD_EXECUTABLE(test1 t.c) ADD_EXECUTABLE(test2 t.cpp) [EMAIL PROTECTED]:~/test$ cmake . -- Check for working C compiler: /home/gneill/Desktop/sse/sunstudioceres/bin/cc -- Check for working C compiler: /home/gneill/Desktop/sse/sunstudioceres/bin/cc -- works -- Check size of void* -- Check size of void* - done -- Check for working CXX compiler: /home/gneill/Desktop/sse/sunstudioceres/bin/CC -- Check for working CXX compiler: /home/gneill/Desktop/sse/sunstudioceres/bin/CC -- broken CMake Error: The C++ compiler "/home/gneill/Desktop/sse/sunstudioceres/bin/CC" is not able to compile a simple test program. It fails with the following output: /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build make[1]: Entering directory `/home/gneill/test/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/gneill/test/CMakeFiles/CMakeTmp/CMakeFiles 1 Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o /home/gneill/Desktop/sse/sunstudioceres/bin/CC -o CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o -c /home/gneill/test/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTryCompileExec /usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake /home/gneill/Desktop/sse/sunstudioceres/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 /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 CMake will not be able to correctly generate this project. -- Configuring done TIA, George. _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake