[CMake] CMake is always genetating files

Filipe Sousa filipe at ipb.pt
Tue Apr 11 18:19:15 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a small example to demonstrate a possible bug in cmake

MESSAGE(STATUS "foo message")
ADD_EXECUTABLE(bar bar.c)

fsousa at neptuno ~/tmp/bug/build $ cmake ..
- -- Check for working C compiler: gcc
- -- Check for working C compiler: gcc -- works
- -- Check size of void*
- -- Check size of void* - done
- -- Check for working CXX compiler: c++
- -- Check for working CXX compiler: c++ -- works
- -- foo message
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/fsousa/tmp/bug/build

fsousa at neptuno ~/tmp/bug/build $ make
- -- foo message
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/fsousa/tmp/bug/build
Scanning dependencies of target bar
Building C object CMakeFiles/bar.dir/bar.o
Linking C executable bar

fsousa at neptuno ~/tmp/bug/build $ make
fsousa at neptuno ~/tmp/bug/build $ make
fsousa at neptuno ~/tmp/bug/build $ make

This is the expected behavior, but if I touch the file CMakeLists.txt:

fsousa at neptuno ~/tmp/bug/build $ touch ../CMakeLists.txt

fsousa at neptuno ~/tmp/bug/build $ make
- -- foo message
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/fsousa/tmp/bug/build
fsousa at neptuno ~/tmp/bug/build $ make
- -- foo message
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/fsousa/tmp/bug/build
fsousa at neptuno ~/tmp/bug/build $ make
- -- foo message
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/fsousa/tmp/bug/build

cmake is always generating files

fsousa at neptuno ~/tmp/bug/build $ cmake --version
cmake version 2.3-20060411

- --
Filipe Sousa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEPCtibQdNYqwwwCwRAjsoAKChHc6RdO4HfwlypW7HXJ1XvNSrtACgki7P
GoierJ6crh8UHVmKqfRsg24=
=+ivv
-----END PGP SIGNATURE-----


More information about the CMake mailing list