| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0011713 | CMake | CMake | public | 2011-01-17 10:26 | 2011-01-17 10:56 | ||||
| Reporter | Galeazzi | ||||||||
| Assigned To | Brad King | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | no change required | ||||||
| Platform | PC | OS | Windows XP | OS Version | |||||
| Product Version | CMake 2.8.3 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0011713: add_custom_command is not invoked | ||||||||
| Description | I use the add_custom_command function in order to increment the build number. It seems that add_custom_command is never invoked in the build process. | ||||||||
| Steps To Reproduce | You just unzip the attached file and generate a mingw makefiles or VS solution. You can also change the following line in order to fit them with your paths: add_custom_command(OUTPUT ./BuildNumber.h COMMAND "java" ARGS "-jar" "c:\\Tools\\Updater\\BuildNumberUpdater.jar" "M:\\ProvaCMake\\HelloExec\\BuildNumber.h" DEPENDS ${SOURCES} COMMENT "Changing the build number") | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0024752) Galeazzi (reporter) 2011-01-17 10:31 |
You can also take a look at: http://www.mail-archive.com/cmake@cmake.org/msg33903.html [^] |
|
(0024754) Eric NOULARD (developer) 2011-01-17 10:50 |
I think this is not a bug. I did just upload "add_custom_ok.zip" which contains an updated project which should work, the fix are the following: 0) Use absolute PATH for GENERATED files Use relative PATH (with no extra "./" in the beginning) for other files. 1) separate SOURCES from GENERATED_SOURCES in order to avoid the circular dependency The updated project works for me on Linux. The project still have the weird add_subdirectory(../myLib "${Lib_OutPut_Dir}/BuildFiles") this if off course OK but I would expect either myLib to be a subdir of HelloExec or a sibling which is built by some mother CMakeLists.txt. |
|
(0024755) Brad King (manager) 2011-01-17 10:56 |
As Eric stated in 0011713:0024754 this is not a bug. Please post the the cmake@cmake.org mailing list: http://www.cmake.org/mailman/listinfo/cmake [^] for further help in writing your CMake code. Thanks. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2011-01-17 10:26 | Galeazzi | New Issue | |
| 2011-01-17 10:26 | Galeazzi | File Added: CMakeBug.rar | |
| 2011-01-17 10:31 | Galeazzi | Note Added: 0024752 | |
| 2011-01-17 10:44 | Eric NOULARD | File Added: add_custom_ok.zip | |
| 2011-01-17 10:50 | Eric NOULARD | Note Added: 0024754 | |
| 2011-01-17 10:56 | Brad King | Note Added: 0024755 | |
| 2011-01-17 10:56 | Brad King | Status | new => closed |
| 2011-01-17 10:56 | Brad King | Assigned To | => Brad King |
| 2011-01-17 10:56 | Brad King | Resolution | open => no change required |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |