[CMake] ADD_CUSTOM_COMMAND, PRE_BUILD

Pau Garcia i Quiles pgquiles at elpauer.org
Tue Dec 23 14:41:59 EST 2008


Hello,

I'm trying ADD_CUSTOM_COMMAND(TARGET ... PRE_BUILD) but it does not
work here. This is how I'm using it:

ADD_CUSTOM_COMMAND(TARGET thetarget
					PRE_BUILD
					COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/helloworld
					WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
					COMMENT "Blah"
					)

I've tried with the "NMake Makefiles" and "Visual Studio 9 2008"
generators, with CMake 2.6.2 and CVS 2.7-20081222 but it does not work
('touch' is installed and in the PATH, that's not the problem).

Am I doing anything wrong? :-?

Thank you.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the CMake mailing list