summaryrefslogtreecommitdiff
path: root/Tests/LinkDirectory/External/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LinkDirectory/External/CMakeLists.txt')
-rw-r--r--Tests/LinkDirectory/External/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/LinkDirectory/External/CMakeLists.txt b/Tests/LinkDirectory/External/CMakeLists.txt
new file mode 100644
index 000000000..f7c840f9a
--- /dev/null
+++ b/Tests/LinkDirectory/External/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8)
+project(LinkDirectoryExternal C)
+
+# Test CMP0015 OLD behavior: -L../lib
+cmake_policy(SET CMP0015 OLD)
+link_directories(../lib)
+
+# Test CMP0015 NEW behavior: -L${CMAKE_CURRENT_SOURCE_DIR}/lib
+cmake_policy(SET CMP0015 NEW)
+link_directories(lib)
+
+add_executable(myexe myexe.c)
+set_property(TARGET myexe PROPERTY OUTPUT_NAME LinkDirectory)
+target_link_libraries(myexe mylibA mylibB)