------------------------CMakeOutput.log----------------------------------- The system is: Linux - 3.0.101-0.40-default - x86_64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: /usr/bin/cc Build flags: Id flags: -c The output was: 0 Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o" Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: /usr/bin/c++ Build flags: Id flags: -c The output was: 0 Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o" ------------------------CMakeError.log----------------------------------- Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/bin/cc Build flags: Id flags: The output was: 1 /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: ld returned 1 exit status The C compiler identification could not be found in "/home/jhuang/cmake_test/CMakeFiles/3.1.0/CompilerIdC/CMakeCCompilerId.o" Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/bin/cc Build flags: Id flags: -Aa The output was: 1 : error: missing '(' after predicate Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler": cc: no input files Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: Id flags: The output was: 1 /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: ld returned 1 exit status The CXX compiler identification could not be found in "/home/jhuang/cmake_test/CMakeFiles/3.1.0/CompilerIdCXX/CMakeCXXCompilerId.o" Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": c++: no input files Determining if the C compiler works failed with the following output: ------------------------CMakeList.txt----------------------------------- cmake_minimum_required (VERSION 2.8) project (Demo1) add_executable(Demo main.c) ------------------------main.c----------------------------------- #include int main() { printf("hello"); return 0; }