Il 17/01/2011 11.09, Eric Noulard ha scritto:
2011/1/17 Andrea Galeazzi<galea...@korg.it>:
I'm trying to invoke a program which increment the build number on a header
file. I'm currently using the following statement:
add_custom_command(OUTPUT "./BuildNumber.h" COMMAND "java" ARGS "-jar"
"${TOOLS}\\BuildNumberUpdater.jar"
"${PROJECT_PATH}\\Frameworks\\Win32\\BuildNumber.h"
DEPENDS ${SOURCES}
COMMENT "Changing the build numeber")
But the command is never invoked. Surely there's something wrong or
something that I don't understand, but what?
Does any targets depends on the output "BuildNumber.h" ?
Did you try to specify OUTPUT with absolute path ?
Yes I also tried with absolute path but it doesn't change anything.
That's the only target I have:
add_executable(Z102A ${SOURCES} )
where:
set (SOURCES
${SOURCES_SourceXXYYFiles}
${SOURCES_HeaderXXYYFiles}
...
${SOURCES_Cfg}
....................
)
set (SOURCES_HeaderXXYYFiles
./ASIC.H
./BaseTypes.h
./HAL.h
./IOPort.h
./usb2spi.h
./BuildNumber.h
)
set (SOURCES_Cfg
../../Cfg/AisTestData.cpp
../../Cfg/AisWin32Data.cpp
../../Cfg/AlphaKeybConfig.cpp
../../Cfg/AlphaKeybConfig.h
../../Cfg/BuildConfig.h
../../Cfg/Config.cpp
..........
)
and Config.cpp includes BuildNumber.h. Maybe should I add an explicit
dependency in some ways?
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake