MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014729 | CMake | CMake | public | 2014-02-03 00:44 | 2016-06-10 14:31 |
Reporter | NAKAMURA Takumi | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0014729: Add hook for project-defined check-build-system actions | ||||
Description | Experimentally I am writing "Custom generator". This is intended for auto dependency scanner. It doesn't work, at least with Ninja Generator. As far as I see build.ninja, a few issues... 1) "ninja -t clean" removes foo.cmake. It's Ninja's behavior. To avoid this, another rule should be added for custom_command that touches generated cmakefiles (included by CMakeLists). For example, rule CUSTOM_GENERATOR command = $COMMAND description = $DESC restat = 1 generator = 1 2) foo.cmake is added to phony target list, "A missing CMake input file is not an error.", although foo.cmake has a rule. Output of custom_command should be excluded from phony targets even if it were included from CMakeLists. 3) Also generator-dependent file, for example foobar.c might be put into phony list, or Ninja could not rebuild build.ninja when foobar.c were disappeared (in revision walking). | ||||
Steps To Reproduce | cmake_minimum_required(VERSION 2.8) # It's supposed: # - Scan dependent file(s). # - Update when something happened. ;) # For now, manually update tmpl.txt. # "touch foobar.c" doesn't trigger regeneration. # "echo >> tmpl.txt; touch foobar.c" triggers regeneration. add_custom_command(OUTPUT foo.cmake COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/tmpl.txt ${CMAKE_CURRENT_BINARY_DIR}/foo.cmake DEPENDS foobar.c COMMENT "Updating foo.cmake" ) add_custom_target(theGenerator DEPENDS foo.cmake) execute_process( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/tmpl.txt ${CMAKE_CURRENT_BINARY_DIR}/foo.cmake ) include(${CMAKE_CURRENT_BINARY_DIR}/foo.cmake) add_executable(foobar foobar.c) # Almost all targets may depend on theGenerator. add_dependencies(foobar theGenerator) | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-02-03 00:44 | NAKAMURA Takumi | New Issue | |||
2014-02-03 13:38 | Brad King | Note Added: 0035024 | |||
2014-02-03 13:40 | Brad King | Note Added: 0035025 | |||
2014-02-25 05:05 | NAKAMURA Takumi | Note Added: 0035180 | |||
2014-02-25 08:02 | Brad King | Note Added: 0035182 | |||
2014-02-25 08:05 | Brad King | Note Added: 0035183 | |||
2014-02-25 08:21 | NAKAMURA Takumi | Note Added: 0035184 | |||
2014-02-25 08:31 | Brad King | Note Added: 0035185 | |||
2014-02-25 08:32 | NAKAMURA Takumi | Note Added: 0035186 | |||
2014-02-25 08:38 | Brad King | Note Added: 0035187 | |||
2014-02-25 08:38 | NAKAMURA Takumi | Note Added: 0035188 | |||
2014-02-25 09:09 | Brad King | Note Added: 0035189 | |||
2014-02-25 09:25 | NAKAMURA Takumi | Note Added: 0035190 | |||
2014-02-25 10:21 | Brad King | Note Added: 0035193 | |||
2014-02-25 11:27 | NAKAMURA Takumi | Note Added: 0035194 | |||
2014-02-25 11:37 | Brad King | Status | new => backlog | ||
2014-02-25 11:37 | Brad King | Product Version | CMake 2.8.12.1 => | ||
2014-02-25 11:37 | Brad King | Summary | Support "custom cmake generator" => Add hook for project-defined check-build-system actions | ||
2014-02-25 11:39 | Brad King | Note Added: 0035195 | |||
2014-02-25 12:21 | NAKAMURA Takumi | Note Added: 0035196 | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042475 | |||
2016-06-10 14:29 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|