summaryrefslogtreecommitdiff
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-02 10:11:13 -0400
committerBrad King <brad.king@kitware.com>2021-06-03 08:12:58 -0400
commit1d7fddca8ea1f1ac243d824a3c61079c77be3a75 (patch)
tree582558784dbd1493ee1ffabf888a720147c335cc /Tests/CMakeTests
parent629eb3926bcc802de53f9982cad2005b4bf8f4ed (diff)
downloadcmake-1d7fddca8ea1f1ac243d824a3c61079c77be3a75.tar.gz
CMakeParseImplicitLinkInfo: Honor GNU static runtime library flags
With flags like `-static-libstdc++` or `-static-libgfortran`, the GNU compiler driver adds `-Bstatic ... -Bdynamic` around its language runtime library. Convert the libraries in between these to absolute paths so that mixed-language linking honors the static runtime libraries.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
index 1254ff9624..63c234acf7 100644
--- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -2,6 +2,9 @@
# test it.
include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake)
+set(CMAKE_FIND_LIBRARY_PREFIXES "disabled-for-test-")
+set(CMAKE_FIND_LIBRARY_SUFFIXES "-disabled-for-test")
+
#-----------------------------------------------------------------------------
# Linux