[CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

René Tschirley Rene.Tschirley at SMI.DE
Thu Feb 12 06:04:40 EST 2015


Hi all,


I have the problem that my automatically generated Qt files are not cleaned up, similar to the problem described in http://www.cmake.org/pipermail/cmake/2013-April/054555.html. Simplified the problem and verified if the set_directory_properties trick works. It does not work for me.

Used software: Windows7 SP1, CMake 3.1.2, Ninja 1.5.3.

Makefiles configuration is done by

	cmake -G "Eclipse CDT4 - Ninja" ../source

in my build folder. Build is usually started using 'ninja' and a clean is triggered by 'ninja clean'.

My top level CMakeLists.txt contains for testing purposes

	set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "foo.txt")
	set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/foo.txt")
	MESSAGE(STATUS "CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}")

and when creating that file (manually, in my CMAKE_CURRENT_BINARY_DIR), it is still not cleaned up on 'ninja clean'.

Am I forgetting something obvious? Is this an unfixed CMake bug?


Cheers,
Rene



More information about the CMake mailing list