summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-03-30 19:54:39 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-21 15:31:23 (GMT)
commitd806bd2e8c971aa60ddf8326a9470822a10b1ec6 (patch)
tree7b4b8d0c6e96f9b20c5cf97a76e4263a177a3e67 /Tests
parentb2a0e8c8b2b9eab8708670c0e73b43f3a620e2f5 (diff)
downloadCMake-d806bd2e8c971aa60ddf8326a9470822a10b1ec6.zip
CMake-d806bd2e8c971aa60ddf8326a9470822a10b1ec6.tar.gz
CMake-d806bd2e8c971aa60ddf8326a9470822a10b1ec6.tar.bz2
Tests: Update test suite to run in an Anaconda environment
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake7
2 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
index 18c3340..b3977f1 100644
--- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
@@ -26,4 +26,12 @@ function(run_GEH)
endforeach()
endfunction()
+# remove these flags from the enviornment if they have been set
+# so the tests run the correct env
+set(env_cxx_flags $ENV{CXXFLAGS})
+if(env_cxx_flags)
+ string(REPLACE "-fvisibility=hidden" "" env_cxx_flags "${env_cxx_flags}")
+ string(REPLACE "-fvisibility-inlines-hidden" "" env_cxx_flags "${env_cxx_flags}")
+ set(ENV{CXXFLAGS} "${env_cxx_flags}")
+endif()
run_GEH()
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index bd0bbe3..a681c7e 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -174,6 +174,13 @@ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1)
run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ if(DEFINED ENV{LDFLAGS})
+ # Some setups prebake disable-new-dtags into LDFLAGS
+ set(new_ldflags $ENV{LDFLAGS}})
+ string(REPLACE "-Wl,--disable-new-dtags" "" new_ldflags "${new_ldflags}")
+ set(ENV{LDFLAGS} "${new_ldflags}")
+ endif()
+
if(NOT CMAKE_C_COMPILER_ID MATCHES "^XL")
run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux)
endif()