summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-02 14:26:08 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-03-02 14:26:08 (GMT)
commit6c332bd84ce320e4163130a052af7b9950b38318 (patch)
treeb5d7f78c1d2a9d6a8d6154f8a2111455789316f6 /Tests
parent5d81817b7168d16190848807d2cfb73ed14b8ee7 (diff)
parent503f25d490e56dfc1d3dc894e1fc1bd3e7e89e81 (diff)
downloadCMake-6c332bd84ce320e4163130a052af7b9950b38318.zip
CMake-6c332bd84ce320e4163130a052af7b9950b38318.tar.gz
CMake-6c332bd84ce320e4163130a052af7b9950b38318.tar.bz2
Merge topic 'find_library-custom-lib-suffix'
503f25d4 find_library: Allow custom lib suffix be used as find path
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/find_library/CMakeLists.txt15
-rw-r--r--Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a0
-rw-r--r--Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a0
-rw-r--r--Tests/CMakeOnly/find_library/libXYZ/libtest7.a0
7 files changed, 14 insertions, 1 deletions
diff --git a/Tests/CMakeOnly/find_library/CMakeLists.txt b/Tests/CMakeOnly/find_library/CMakeLists.txt
index 9958650..9c1aad8 100644
--- a/Tests/CMakeOnly/find_library/CMakeLists.txt
+++ b/Tests/CMakeOnly/find_library/CMakeLists.txt
@@ -24,7 +24,7 @@ endmacro()
macro(test_find_library_subst expected)
get_filename_component(dir ${expected} PATH)
get_filename_component(name ${expected} NAME)
- string(REGEX REPLACE "lib/?64" "lib" dir "${dir}")
+ string(REGEX REPLACE "lib/?[36X][24Y][Z]*" "lib" dir "${dir}")
test_find_library(", searched as ${dir}" "${expected}"
NAMES ${name}
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}
@@ -79,3 +79,16 @@ test_find_library("" A/libtestA.a
NAMES testB testA NAMES_PER_DIR
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
)
+
+set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "XYZ")
+foreach(libXYZ
+ lib/XYZ/libtest1.a
+ lib/A/libXYZ/libtest2.a
+ lib/libtest3.a
+ libXYZ/A/lib/libtest4.a
+ libXYZ/A/libXYZ/libtest5.a
+ libXYZ/A/libtest6.a
+ libXYZ/libtest7.a
+ )
+ test_find_library_subst(${libXYZ})
+endforeach()
diff --git a/Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a b/Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/lib/A/libXYZ/libtest2.a
diff --git a/Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a b/Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/lib/XYZ/libtest1.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a b/Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/A/lib/libtest4.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a b/Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/A/libXYZ/libtest5.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a b/Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/A/libtest6.a
diff --git a/Tests/CMakeOnly/find_library/libXYZ/libtest7.a b/Tests/CMakeOnly/find_library/libXYZ/libtest7.a
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CMakeOnly/find_library/libXYZ/libtest7.a