summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/link_directories/CMakeLists.txt
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-09-19 12:12:35 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-09-25 13:59:59 (GMT)
commitf9717725f9d4c7f4a1da52b0184365cd757bc076 (patch)
treeee805f2e0fbd53cc0b2b72728e08496f0df57372 /Tests/CMakeCommands/link_directories/CMakeLists.txt
parentb5915744ebccd086891f1fab0ae91af54deb3a86 (diff)
downloadCMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.zip
CMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.tar.gz
CMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.tar.bz2
link_directories(): enhance capabilities
Diffstat (limited to 'Tests/CMakeCommands/link_directories/CMakeLists.txt')
-rw-r--r--Tests/CMakeCommands/link_directories/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/link_directories/CMakeLists.txt b/Tests/CMakeCommands/link_directories/CMakeLists.txt
new file mode 100644
index 0000000..60c07b6
--- /dev/null
+++ b/Tests/CMakeCommands/link_directories/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.12)
+
+project(link_directories LANGUAGES C)
+
+
+link_directories(/A)
+link_directories(BEFORE /B)
+
+set(CMAKE_LINK_DIRECTORIES_BEFORE ON)
+link_directories(/C)
+
+get_directory_property(result LINK_DIRECTORIES)
+if (NOT result MATCHES "/C;/B;/A")
+ message(SEND_ERROR "link_directories not populated the LINK_DIRECTORIES directory property")
+endif()
+
+
+add_executable(link_directories EXCLUDE_FROM_ALL LinkDirectoriesExe.c)
+
+get_target_property(result link_directories LINK_DIRECTORIES)
+if (NOT result MATCHES "/C;/B;/A")
+ message(SEND_ERROR "link_directories not populated the LINK_DIRECTORIES target property")
+endif()
+
+
+add_library(imp UNKNOWN IMPORTED)
+get_target_property(result imp LINK_DIRECTORIES)
+if (result)
+ message(FATAL_ERROR "link_directories populated the LINK_DIRECTORIES target property")
+endif()