mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
Tests: Add FindMPI test environment modification option
Provide a way to configure an environment specific to this test. Avoid setting the environment globally for it in CI jobs.
This commit is contained in:
@@ -45,6 +45,7 @@ set(CMake_TEST_FindLibXslt "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindMPI_C "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindMPI_CXX "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "")
|
||||
set(CMake_TEST_FindMPI "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindODBC "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "")
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
set(ENV{MY_RUBY_HOME} "/usr/local/rvm/rubies/ruby-3.0.4")
|
||||
set(ENV{PATH} "/usr/lib64/mpich/bin:$ENV{PATH}")
|
||||
|
||||
@@ -19,3 +19,6 @@ add_test(NAME FindMPI.Test COMMAND
|
||||
-DMPI_TEST_Fortran=${CMake_TEST_FindMPI_FLAG_Fortran}
|
||||
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
|
||||
)
|
||||
if(CMake_TEST_FindMPI_ENVMOD)
|
||||
set_property(TEST FindMPI.Test PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindMPI_ENVMOD})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user