summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-09 13:17:17 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-07-09 13:17:17 (GMT)
commit6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05 (patch)
tree2f039218855297f65dab5d61a403ec4c29c56ea1 /Tests
parent53f8ef66a55fd5ad5359f1100ef96b1af9d3bf23 (diff)
parent7aa9e80e35f62ec5686d08b49ebe8b57cbc6cbc6 (diff)
downloadCMake-6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05.zip
CMake-6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05.tar.gz
CMake-6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05.tar.bz2
Merge topic 'empty-LINK_LIBRARIES'
7aa9e80e set_property: Fix crash when setting LINK_LIBRARIES to nothing
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/set_property/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/set_property/LINK_LIBRARIES.cmake7
-rw-r--r--Tests/RunCMake/set_property/RunCMakeTest.cmake3
4 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index c0ac5c8..b90eff6 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -185,6 +185,7 @@ add_RunCMake_test(list)
add_RunCMake_test(message)
add_RunCMake_test(project)
add_RunCMake_test(return)
+add_RunCMake_test(set_property)
add_RunCMake_test(string)
add_RunCMake_test(try_compile)
add_RunCMake_test(try_run)
diff --git a/Tests/RunCMake/set_property/CMakeLists.txt b/Tests/RunCMake/set_property/CMakeLists.txt
new file mode 100644
index 0000000..18dfd26
--- /dev/null
+++ b/Tests/RunCMake/set_property/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.2)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake b/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake
new file mode 100644
index 0000000..994e874
--- /dev/null
+++ b/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake
@@ -0,0 +1,7 @@
+add_custom_target(CustomTarget)
+set_property(TARGET CustomTarget PROPERTY LINK_LIBRARIES)
+set_property(TARGET CustomTarget APPEND PROPERTY LINK_LIBRARIES)
+get_property(val TARGET CustomTarget PROPERTY LINK_LIBRARIES)
+if (NOT "${val}" STREQUAL "")
+ message(FATAL_ERROR "LINK_LIBRARIES value is '${val}' but should be ''")
+endif()
diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake
new file mode 100644
index 0000000..54e63f7
--- /dev/null
+++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake
@@ -0,0 +1,3 @@
+include(RunCMake)
+
+run_cmake(LINK_LIBRARIES)