Skip to content

Commit a579b5f

Browse files
committed
Properly handle prepending user-specified paths to DYLD_FRAMEWORK_PATH
1 parent 1538be6 commit a579b5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

extras/CatchAddTests.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ function(catch_discover_tests_impl)
6565
endif()
6666

6767
if(APPLE AND dl_framework_paths)
68-
cmake_path(CONVERT "${dl_framework_paths}" TO_NATIVE_PATH_LIST paths)
68+
cmake_path(CONVERT "$ENV{DYLD_FRAMEWORK_PATH}" TO_NATIVE_PATH_LIST env_dl_framework_paths)
69+
list(PREPEND env_dl_framework_paths "${dl_framework_paths}")
70+
cmake_path(CONVERT "${env_dl_framework_paths}" TO_NATIVE_PATH_LIST paths)
6971
set(ENV{DYLD_FRAMEWORK_PATH} "${paths}")
7072
endif()
7173

@@ -133,7 +135,7 @@ function(catch_discover_tests_impl)
133135
if(APPLE AND dl_framework_paths)
134136
foreach(path ${dl_framework_paths})
135137
cmake_path(NATIVE_PATH path native_path)
136-
list(APPEND environment_modifications "DYLD_FRAMEWORK_PATH=path_list_prepend:${native_path}")
138+
list(PREPEND environment_modifications "DYLD_FRAMEWORK_PATH=path_list_prepend:${native_path}")
137139
endforeach()
138140
endif()
139141

0 commit comments

Comments
 (0)