[cmake-developers] [CMake 0015333]: Behaviour change with 3.1 - target properies set to empty string returned as -NOTFOUND
Mantis Bug Tracker
mantis at public.kitware.com
Fri Jan 2 18:39:07 EST 2015
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15333
======================================================================
Reported By: arlbranch
Assigned To:
======================================================================
Project: CMake
Issue ID: 15333
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-01-02 18:39 EST
Last Modified: 2015-01-02 18:39 EST
======================================================================
Summary: Behaviour change with 3.1 - target properies set to
empty string returned as -NOTFOUND
Description:
Under the old behaviour, when a target property was set to "",
get_target_property would give "". In version 3.1 it now gives prop-NOTFOUND.
Needless to say, this change breaks build systems that relied on the old
behaviour.
Steps to Reproduce:
CMakeLists.txt
---------------
cmake_minimum_required(VERSION 2.8.0)
add_custom_target(tgt)
set_target_properties(tgt PROPERTIES emptyprop "")
get_target_property(val tgt emptyprop)
message("val = ${val}")
---------------
Old Behaviour
---------------
[branch at viter on /dev/pts/9] 1044 ~/tmp/cm31bug/build
$ cmake --version
cmake version 2.8.12.2
[branch at viter on /dev/pts/9] 1045 ~/tmp/cm31bug/build
$ cmake ..
val =
-- Configuring done
-- Generating done
-- Build files have been written to: /local/home/branch/tmp/cm31bug/build
----------------
New Behaviour
----------------
$ cmake --version
cmake version 3.1.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
[branch at fortuna on /dev/pts/5] 1054 ~/tmp/cm31bug/fbuild
$ cmake ..
val = val-NOTFOUND
-- Configuring done
-- Generating done
-- Build files have been written to: /home/branch/tmp/cm31bug/fbuild
----------------
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-01-02 18:39 arlbranch New Issue
======================================================================
More information about the cmake-developers
mailing list