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@viter on /dev/pts/9] 1044 ~/tmp/cm31bug/build
$ cmake --version
cmake version 2.8.12.2
[branch@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@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
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers