[CMake] ADD_CUSTOM_COMMAND problem with cmake 2.4.3
Gregor Berginc
gregor.berginc at gmail.com
Thu Oct 5 03:53:37 EDT 2006
Dear all,
yesterday I faced wierd behaviour of the newest cmake. Before, I was
using cmake version 2.4-patch 2 and the following command executed
successfully:
=
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${cpp_class}.h
COMMAND ${JAVAH_RUNTIME}
ARGS -verbose -classpath ${OUTPUT}/classes -d
${CMAKE_CURRENT_SOURCE_DIR} ${jni_class}
)
The command should use javah executable to compile the ${jni_class}
into ${cpp_class}.h. The output should be placed in
<project_root>/src/c++/balt/jni directory. Now, when I use cmake
version 2.4-patch 3, I get the following error during make:
make[2]: *** No rule to make target
`../src/c++/balt/jni/balt_jni_NativeProcessLauncher.h', needed by
`src/c++/balt/jni/CMakeFiles/FrameworkJNI.dir/JNIProcessInterface.o'.
Stop.
make[1]: *** [src/c++/balt/jni/CMakeFiles/FrameworkJNI.dir/all] Error 2
make: *** [all] Error 2
Note, that I am using out-of-source build which is started from
<project_root>/.debug. Now, I am not sure why the command is not
executed. The path
../src/c++/balt/jni/balt_jni_NativeProcessLauncher.h is correct if it
is relative to the <project_root>/.debug. The file needs to be created
under the src directory!
What has changed since patch 2 version? Is this a bug or just my bad
interpretation of ADD_CUSTOM_COMMAND and cmake variables?
Also, if you need more information about the behaviour, please let me know.
Best,
Gregor
--
Gregor Berginc, Ph.D. Student
University of Ljubljana, Faculty of CIS
Trzaska 25, SI-1001 Ljubljana, Slovenia
tel: +386 1 4776630, fax: +386 1 4264647
www: http://vicos.fri.uni-lj.si/gregor
More information about the CMake
mailing list