View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014771 | CMake | CMake | public | 2014-02-25 09:50 | 2016-06-10 14:31 | ||||
Reporter | Brad King | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014771: Ninja generator does not always honor SYMBOLIC rules with no command | ||||||||
Description | The SYMBOLIC source file property is a mark typically used on a custom command output to say that the file will never actually exist. This can be used to create always-out-of-date rules that run on every build. When a custom command has no actual command line and a symbolic output the Ninja generator implements this by creating a phony build rule. However, the Ninja documentation states: "If a phony build statement is written without any dependencies, the target will be considered out of date if it does not exist." If there are order-only dependencies then Ninja does not consider a phony target to be out of date. | ||||||||
Steps To Reproduce | $ cat ../CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(OrderedBuildAlways NONE) add_custom_target(first) add_custom_command( OUTPUT never-created COMMAND VERBATIM ) add_custom_command( OUTPUT always-printed COMMAND ${CMAKE_COMMAND} -E echo "always printed" COMMAND ${CMAKE_COMMAND} -E touch always-printed DEPENDS never-created VERBATIM ) set_property(SOURCE never-created PROPERTY SYMBOLIC 1) add_custom_target(drive ALL DEPENDS always-printed) add_dependencies(drive first) $ cmake .. -G Ninja $ ninja [1/1] Generating always-printed always printed $ ninja ninja: no work to do. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||||||||||||
|
Relationships |
Notes | |
(0035192) Brad King (manager) 2014-02-25 09:54 |
The build.ninja file generated for the example contains build never-created: phony || first and the order-only dependency on "first" prevents this from being considered always out of date. However, we need to preserve the order-only dependency too. We could fix this by creating a single target build cmake-ninja-always-out-of-date: phony and then update our other phony (SYMBOLIC) rules to be build never-created: phony | cmake-ninja-always-out-of-date || first |
(0042493) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-02-25 09:50 | Brad King | New Issue | |
2014-02-25 09:50 | Brad King | Relationship added | related to 0014728 |
2014-02-25 09:50 | Brad King | Relationship added | related to 0014747 |
2014-02-25 09:52 | Brad King | Note Added: 0035191 | |
2014-02-25 09:54 | Brad King | Note Added: 0035192 | |
2014-02-25 09:56 | Brad King | Note Deleted: 0035191 | |
2014-06-11 08:35 | Brad King | Relationship added | related to 0014963 |
2014-07-01 09:28 | Brad King | Status | new => backlog |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042493 | |
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 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |