MantisBT - CMake | ||||||||||
| View Issue Details | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||
| 0015478 | CMake | CMake | public | 2015-03-26 15:25 | 2015-11-02 09:13 | |||||
| Reporter | Walter Gray | |||||||||
| Assigned To | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||
| Status | closed | Resolution | duplicate | |||||||
| Platform | All | OS | OS Version | |||||||
| Product Version | CMake 3.2.1 | |||||||||
| Target Version | Fixed in Version | |||||||||
| Summary | 0015478: As of CMake 3.1 Properties cannot be set to "" | |||||||||
| Description | As of CMake 3.0.2, it was completely legal to set a target property to "". This was in fact a very helpful feature for me in some cases since it meant that if I knew I'd set a property to a list (even an empty one), when I read it back later and passed it into a foreach I didn't have to also use an if to check if it existed. This functionality was broken in 3.1, and there is neither a policy setting about it, nor any documentation I can find that indicates this was an intended change. | |||||||||
| Steps To Reproduce | Run the following cmake script. In CMake <= 3.0.2, prop1 will be an empty string. In CMake >= 3.1, it will be prop1-NOTFOUND cmake_minimum_required(VERSION 3.0) cmake_policy(VERSION 3.0.2) project(cmaketestproject) add_executable(testexe test.cpp) set(emptylist "") set_target_properties(testexe PROPERTIES INTERFACE_PROP_1 "${emptylist}" INTERFACE_PROP_2 "thing") get_target_property(prop1 testexe INTERFACE_PROP_1) get_target_property(prop2 testexe INTERFACE_PROP_2) get_target_property(prop3 testexe INTERFACE_PROP_3) message(prop1=${prop1}) message(prop2=${prop2}) message(prop3=${prop3}) | |||||||||
| Additional Information | ||||||||||
| Tags | No tags attached. | |||||||||
| Relationships |
| |||||||||
| Attached Files | ||||||||||
| Issue History | ||||||||||
| Date Modified | Username | Field | Change | |||||||
| 2015-03-26 15:25 | Walter Gray | New Issue | ||||||||
| 2015-03-26 15:29 | Walter Gray | Note Added: 0038334 | ||||||||
| 2015-03-26 15:30 | Walter Gray | Note Edited: 0038334 | bug_revision_view_page.php?bugnote_id=38334#r1735 | |||||||
| 2015-03-26 15:36 | Brad King | Relationship added | duplicate of 0015333 | |||||||
| 2015-03-26 15:37 | Brad King | Note Added: 0038335 | ||||||||
| 2015-03-26 15:40 | Brad King | Note Added: 0038336 | ||||||||
| 2015-03-26 15:41 | Brad King | Status | new => resolved | |||||||
| 2015-03-26 15:41 | Brad King | Resolution | open => duplicate | |||||||
| 2015-03-26 15:41 | Brad King | Note Added: 0038337 | ||||||||
| 2015-11-02 09:13 | Robert Maynard | Note Added: 0039747 | ||||||||
| 2015-11-02 09:13 | Robert Maynard | Status | resolved => closed | |||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||