[CMake] correct DEPENDS behaviour ?
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Jan 6 16:31:05 EST 2006
Hiya,
again the same testcase,
CMakeLists.txt:
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h
COMMAND sh ARGS -c "echo //>generated.h"
DEPENDS blah.h
#DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/blah.h
)
ADD_EXECUTABLE(hello main.cpp)
and main.cpp:
#include "generated.h"
#include <stdio.h>
int main() {
printf("hello world\n");
return 0;
}
The issue is:
if I put "DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/blah.h" in the
ADD_CUSTOM_COMMAND, the dependency to blah.h is generated as expected in
build.make:
generated.h: blah.h
if I put only "DEPENDS blah.h" in the custom command, this dependency is
not generated in build.make. This is an in-source-build and no subdirs or
anything. Is this the expected behaviour ?
cmake is current cvs.
Bye
Alex
--
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
More information about the CMake
mailing list