diff options
author | Brad King <brad.king@kitware.com> | 2015-01-15 14:53:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-15 14:53:59 (GMT) |
commit | 44612e74075f751b01950dd0f00e86d61f9ba05a (patch) | |
tree | 03fc85b20bc6a52502018c05f76a190e93ae3dd1 | |
parent | fa636e19ce42c7523c4858ea697376fe94080097 (diff) | |
parent | 23f3798c7b38ef7274f318ab90f1788b569dbc5d (diff) | |
download | CMake-44612e74075f751b01950dd0f00e86d61f9ba05a.zip CMake-44612e74075f751b01950dd0f00e86d61f9ba05a.tar.gz CMake-44612e74075f751b01950dd0f00e86d61f9ba05a.tar.bz2 |
Merge topic 'fix-LOCATION-with-TARGET_OBJECTS'
23f3798c cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)
-rw-r--r-- | Source/cmTarget.cxx | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt | 12 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/RunCMakeTest.cmake | 1 |
5 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b138f0a..1c03bb1 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -544,6 +544,7 @@ void cmTarget::ClearLinkMaps() this->Internal->LinkInterfaceMap.clear(); this->Internal->LinkInterfaceUsageRequirementsOnlyMap.clear(); this->Internal->LinkClosureMap.clear(); + this->Internal->SourceFilesMap.clear(); for (cmTargetLinkInformationMap::const_iterator it = this->LinkInformation.begin(); it != this->LinkInformation.end(); ++it) diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt new file mode 100644 index 0000000..0996cb6 --- /dev/null +++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt @@ -0,0 +1,12 @@ +CMake Warning \(dev\) at LOCATION-and-TARGET_OBJECTS.cmake:[0-9]+ \(get_target_property\): + Policy CMP0026 is not set: Disallow use of the LOCATION target property. + Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + The LOCATION property should not be read from target "bar". Use the target + name directly with add_custom_command, or use the generator expression + \$<TARGET_FILE>, as appropriate. + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake new file mode 100644 index 0000000..3d8eb73 --- /dev/null +++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake @@ -0,0 +1,6 @@ + +enable_language(CXX) + +add_library(foo OBJECT empty.cpp) +add_executable(bar $<TARGET_OBJECTS:foo>) +get_target_property(location bar LOCATION) diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake index 7c2582f..fc58ea5 100644 --- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake @@ -10,3 +10,4 @@ run_cmake(CMP0026-LOCATION-CONFIG-NEW) run_cmake(CMP0026-LOCATION-CONFIG-OLD) run_cmake(CMP0026-LOCATION-CONFIG-WARN) run_cmake(ObjlibNotDefined) +run_cmake(LOCATION-and-TARGET_OBJECTS) |