It seems that CHECK_CXX_SOURCE_COMPILES attempts to link the object files into an executable:
[...] Performing C++ SOURCE FILE Test <sometest> failed with the following output: Change Dir: /my-proj/builddir/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" [...] gmake[1]: Entering directory `/my-proj/builddir/CMakeFiles/CMakeTmp' [...] Building CXX object CMakeFiles/cmTryCompileExec.dir/src.cxx.o [...] Linking CXX executable cmTryCompileExec [...] /usr/lib64/gcc/x86_64-slamd64-linux/4.1.2/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status [...] Source file was: #include <string.h> bool ignore = &strerror_r != 0; [...] IMHO, the macro should only attempt to compile the source file. Is this by design or by accident? If by design, what is the rationale behind it? Thanks. -J _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake