[CMake] CMake is always genetating files

Filipe Sousa filipe at ipb.pt
Tue Apr 11 18:24:39 EDT 2006


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

Filipe Sousa wrote:
> This is a small example to demonstrate a possible bug in cmake
> 
> MESSAGE(STATUS "foo message")
> ADD_EXECUTABLE(bar bar.c)

In my previous mail I forgot this piece of code that triggers the
regeneration
CONFIGURE_FILE(foo.c ${CMAKE_CURRENT_BINARY_DIR}/foo.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
> 
_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake

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

iD8DBQFEPCynbQdNYqwwwCwRAt3MAKCrOHp0QndRi4UjTFqVGZYawN9HXACdEq4w
tlA0yqmurDM/125L6NTH1gM=
=FQWR
-----END PGP SIGNATURE-----


More information about the CMake mailing list