From d806bd2e8c971aa60ddf8326a9470822a10b1ec6 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 30 Mar 2020 15:54:39 -0400 Subject: Tests: Update test suite to run in an Anaconda environment --- Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake | 8 ++++++++ Tests/RunCMake/install/RunCMakeTest.cmake | 7 +++++++ 2 files changed, 15 insertions(+) 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() -- cgit v0.12 From cd9c3c000f7f79cc12c8787078256935f856d5a7 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 30 Mar 2020 16:55:20 -0400 Subject: Tests: Update QtAutogen codeeditor test only include headers needed --- Tests/QtAutogen/Complex/codeeditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/QtAutogen/Complex/codeeditor.cpp b/Tests/QtAutogen/Complex/codeeditor.cpp index bb6f405..80d6a55 100644 --- a/Tests/QtAutogen/Complex/codeeditor.cpp +++ b/Tests/QtAutogen/Complex/codeeditor.cpp @@ -40,7 +40,10 @@ #include "codeeditor.h" -#include +#include +#include +#include +#include CodeEditor::CodeEditor(QWidget* parent) : QPlainTextEdit(parent) -- cgit v0.12 From 50879ce4124508546674c7d2e681fe49840a9c73 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 12 May 2020 16:51:23 -0400 Subject: Conda: Add CONDA_PREFIX as an acceptable system prefix path --- Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst | 3 +++ Modules/Platform/UnixPaths.cmake | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst b/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst index e0ee979..81a7a0b 100644 --- a/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst +++ b/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst @@ -34,6 +34,9 @@ Darwin: OpenBSD: * ``ENV{LOCALBASE}`` +Unix: + * ``ENV{CONDA_PREFIX}`` when using a conda compiler + Windows: * ``ENV{ProgramW6432}`` * ``ENV{ProgramFiles}`` diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 7fe64cb..b9381c3 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -95,6 +95,10 @@ unset(_cmake_sysroot_compile) # synchronized if(CMAKE_COMPILER_SYSROOT) list(PREPEND CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_COMPILER_SYSROOT}") + + if(DEFINED ENV{CONDA_PREFIX} AND EXISTS "$ENV{CONDA_PREFIX}") + list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{CONDA_PREFIX}") + endif() endif() # Enable use of lib32 and lib64 search path variants by default. -- cgit v0.12