MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015856 | CMake | CMake | public | 2015-11-23 13:14 | 2016-05-02 08:30 |
| Reporter | Peter Wu | ||||
| Assigned To | |||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | not fixable | ||
| Platform | Linux | OS | OS Version | ||
| Product Version | CMake 3.4 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015856: CLEAN_NO_CUSTOM is not supported for the Ninja (and MSVC?) generators | ||||
| Description | The directory property CLEAN_NO_CUSTOM does not work as advertised for the Ninja generator. The generated outputs are still removed. Apparently MSVC is also affected[1], but I have not confirmed this. https://cmake.org/pipermail/cmake/2011-May/044214.html [^] | ||||
| Steps To Reproduce | # CMakeLists.txt cmake_minimum_required(VERSION 2.8.3) project(test LANGUAGES) set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) add_custom_command(OUTPUT test.txt COMMAND touch test.txt) add_custom_target(foo ALL DEPENDS test.txt) # make keeps "test.txt" (rm -rf m && mkdir $_ && cd $_ && cmake .. && make && make clean && ls) # ninja removes "test.txt" (rm -rf n && mkdir $_ && cd $_ && cmake -GNinja .. && ninja && ninja clean && ls) | ||||
| Additional Information | Lacking a per-target option to prevent output removal (bug 0009505), I was trying to implement it as follows: - set CLEAN_NO_CUSTOM on the directory to prevent removal of a single source file (generated using the add_custom_commands() command) - put all other generated files in ADDITIONAL_MAKE_CLEAN_FILES except that it does not work due to this bug, the outputs are still removed. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2015-11-23 13:14 | Peter Wu | New Issue | |||
| 2015-11-23 13:45 | Brad King | Note Added: 0039906 | |||
| 2015-11-23 13:45 | Brad King | Status | new => resolved | ||
| 2015-11-23 13:45 | Brad King | Resolution | open => not fixable | ||
| 2016-05-02 08:30 | Robert Maynard | Note Added: 0040967 | |||
| 2016-05-02 08:30 | Robert Maynard | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||