[CMake] CMake will not be able to correctly generate this project.

Mike Jackson imikejackson at gmail.com
Thu Jan 3 11:15:25 EST 2008


I think you might be missing a very basic tenant of CMake: Out of  
Source Builds. CMake creates a pile of files and all the compiler  
output and all that sort of stuff _really_ needs to be gathered into  
it's own directory. The way you are running it currently, all those  
files will be put loose into your home directory. Try this:

[root at localhost ~]# cd /home/gregory/tarballs/canorus-0.5beta.R682
[root at localhost ~]# mkdir Build
[root at localhost ~]# cd Build
[root at localhost ~]# cmake ../
[root at localhost ~]# make

And lets see what happens..

On Jan 3, 2008, at 11:09 AM, Gregory Anderson wrote:

> I have had some troubles with cmake (or maybe gcc).  I keep getting  
> this
> error whenever I try to use it.  gcc is installed.
>
>
> [root at localhost ~]# cmake /home/gregory/tarballs/canorus-0.5beta.R682
> -- Check for working C compiler: /usr/lib/ccache/gcc
> -- Check for working C compiler: /usr/lib/ccache/gcc -- broken
> CMake Error: The C compiler "/usr/lib/ccache/gcc" is not able to  
> compile
> a simple test program.
> It fails with the following output:
> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
> CMakeFiles/cmTryCompileExec.dir/build
> gmake[1]: Entering directory
> `/home/gregory/tarballs/canorus-0.5beta.R682/CMakeFiles/CMakeTmp'
> /usr/bin/cmake -E
> cmake_progress_report /home/gregory/tarballs/canorus-0.5beta.R682/ 
> CMakeFiles/CMakeTmp/CMakeFiles 1
> Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
> /usr/lib/ccache/gcc   -o CMakeFiles/cmTryCompileExec.dir/ 
> testCCompiler.o
> -c /home/gregory/tarballs/canorus-0.5beta.R682/CMakeFiles/CMakeTmp/ 
> testCCompiler.c
> /home/gregory/tarballs/canorus-0.5beta.R682/CMakeFiles/CMakeTmp/ 
> testCCompiler.c:4:19: error: stdio.h: No such file or directory
> /home/gregory/tarballs/canorus-0.5beta.R682/CMakeFiles/CMakeTmp/ 
> testCCompiler.c: In function ‘main’:
> /home/gregory/tarballs/canorus-0.5beta.R682/CMakeFiles/CMakeTmp/ 
> testCCompiler.c:12: warning: incompatible implicit declaration of  
> built-in function ‘printf’
> gmake[1]: Leaving directory
> `/home/gregory/tarballs/canorus-0.5beta.R682/CMakeFiles/CMakeTmp'
> gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o]  
> Error 1
> gmake: *** [cmTryCompileExec/fast] Error 2
>
>
> CMake will not be able to correctly generate this project.
> -- Configuring done
>
>
> Can anyone point me in the right direction?
> Thanks in advance,
> Greg
>
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services




More information about the CMake mailing list