diff options
| author | Chien-Yu Lin | 2024-06-21 14:36:04 +0800 |
|---|---|---|
| committer | Martin Hořeňovský | 2024-08-13 22:23:16 +0200 |
| commit | 1538be67cb8a8b85fd3d5e7e569e46db75f8e284 (patch) | |
| tree | cbbaefa7071c194e642f0c658896c8730e4e7e8a | |
| parent | 9721048a32e245aae0e8ec6799302577a5c751e4 (diff) | |
| download | catch3-1538be67cb8a8b85fd3d5e7e569e46db75f8e284.tar.gz | |
Respect path order of DL_PATHS in catch_discover_tests function
| -rw-r--r-- | extras/CatchAddTests.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/extras/CatchAddTests.cmake b/extras/CatchAddTests.cmake index 604e097a..da302a4a 100644 --- a/extras/CatchAddTests.cmake +++ b/extras/CatchAddTests.cmake @@ -37,6 +37,7 @@ function(catch_discover_tests_impl) set(output_suffix ${_TEST_OUTPUT_SUFFIX}) set(dl_paths ${_TEST_DL_PATHS}) set(dl_framework_paths ${_TEST_DL_FRAMEWORK_PATHS}) + set(environment_modifications "") set(script) set(suite) set(tests) @@ -57,7 +58,9 @@ function(catch_discover_tests_impl) endif() if(dl_paths) - cmake_path(CONVERT "${dl_paths}" TO_NATIVE_PATH_LIST paths) + cmake_path(CONVERT "$ENV{${dl_paths_variable_name}}" TO_NATIVE_PATH_LIST env_dl_paths) + list(PREPEND env_dl_paths "${dl_paths}") + cmake_path(CONVERT "${env_dl_paths}" TO_NATIVE_PATH_LIST paths) set(ENV{${dl_paths_variable_name}} "${paths}") endif() @@ -123,7 +126,7 @@ function(catch_discover_tests_impl) if(dl_paths) foreach(path ${dl_paths}) cmake_path(NATIVE_PATH path native_path) - list(APPEND environment_modifications "${dl_paths_variable_name}=path_list_prepend:${native_path}") + list(PREPEND environment_modifications "${dl_paths_variable_name}=path_list_prepend:${native_path}") endforeach() endif() |