Il 17/01/2011 12.34, Eric Noulard ha scritto:
2011/1/17 Andrea Galeazzi<galea...@korg.it>:
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
I just realized something.
Do you want
    A) to increase the build number EACH time you build
    B) to increase the build number WHEN of of the SOURCES change?

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} )
[...]

  set (SOURCES_HeaderXXYYFiles
       ./ASIC.H
       ./BaseTypes.h
       ./HAL.h
       ./IOPort.h
       ./usb2spi.h
       ./BuildNumber.h
You need absolute path in both places
  1) in set (SOURCES_HeaderXXYYFiles
  2) in the add_custom_command output

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?
I don't think this is necessary. But could you tell us in which case you want
your BuildNumber.h to be regenerated?




The B is definitely my choice.
_______________________________________________
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

Reply via email to