Skip to content

Commit a1ef981

Browse files
committed
Continue
1 parent e7ea79b commit a1ef981

File tree

4 files changed

+4
-41
lines changed

4 files changed

+4
-41
lines changed

cmake/modules/RootMacros.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3128,7 +3128,6 @@ function(ROOTTEST_ADD_TEST testname)
31283128
else()
31293129
string(REPLACE ";" ":" _path "${ROOTTEST_ENV_PATH}")
31303130
string(REPLACE ";" ":" _pythonpath "${ROOTTEST_ENV_PYTHONPATH}")
3131-
string(REPLACE ";" ":" _librarypath "${ROOTTEST_ENV_LIBRARYPATH}")
31323131

31333132

31343133
set(environment ENVIRONMENT
@@ -3380,7 +3379,6 @@ function(ROOTTEST_ADD_UNITTEST_DIR)
33803379
else()
33813380
string(REPLACE ";" ":" _path "${ROOTTEST_ENV_PATH}")
33823381
string(REPLACE ";" ":" _pythonpath "${ROOTTEST_ENV_PYTHONPATH}")
3383-
string(REPLACE ";" ":" _librarypath "${ROOTTEST_ENV_LIBRARYPATH}")
33843382

33853383

33863384
set(environment ENVIRONMENT

roottest/CMakeLists.txt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,25 +230,8 @@ if(MSVC)
230230
else()
231231
set(ROOTTEST_ENV_PYTHONPATH ${ROOT_LIBRARY_DIR})
232232
endif()
233-
set(ROOTTEST_ENV_LIBRARYPATH ${ROOT_LIBRARY_DIR})
234233
set(ROOTTEST_ENV_EXTRA)
235234

236-
# Optionally, add Fortran link directories. This is needed in particular for
237-
# macOS, where the path of the Fortran library might not be in the default
238-
# DYLD_LIBRARY_PATH, but it gets picked up with enable_language(Fortran).
239-
if(APPLE AND fortran)
240-
# Convert Fortran link dirs to colon-separated string
241-
string(REPLACE ";" ":" FORTRAN_LINK_PATH "${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES}")
242-
243-
# Append to ROOTTEST_ENV_LIBRARYPATH
244-
set(ROOTTEST_ENV_LIBRARYPATH "${ROOTTEST_ENV_LIBRARYPATH}:${FORTRAN_LINK_PATH}")
245-
246-
# Deduplicate ROOTTEST_ENV_LIBRARYPATH
247-
string(REPLACE ":" ";" _tmp "${ROOTTEST_ENV_LIBRARYPATH}")
248-
list(REMOVE_DUPLICATES _tmp)
249-
string(REPLACE ";" ":" ROOTTEST_ENV_LIBRARYPATH "${_tmp}")
250-
endif()
251-
252235
if(MSVC)
253236
set(ROOTTEST_ENVIRONMENT
254237
PYTHONPATH=${ROOTTEST_ENV_PYTHONPATH})
@@ -257,8 +240,7 @@ else()
257240
string(REGEX REPLACE ":$" "" TESTPYTHONPATH "${ROOTTEST_ENV_PYTHONPATH}:$ENV{PYTHONPATH}")
258241
set(ROOTTEST_ENVIRONMENT
259242
PATH=${ROOTTEST_ENV_PATH}:$ENV{PATH}
260-
PYTHONPATH=${TESTPYTHONPATH}
261-
${ld_library_path}=${ROOTTEST_ENV_LIBRARYPATH}:$ENV{${ld_library_path}})
243+
PYTHONPATH=${TESTPYTHONPATH})
262244
if (gnuinstall)
263245
set(ROOTTEST_ENVIRONMENT ${ROOTTEST_ENVIRONMENT} ROOTIGNOREPREFIX=1)
264246
endif()

roottest/root/ntuple/makeproject/rntuple/CMakeLists.txt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,8 @@ target_link_directories(read_rntuple PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/librntu
5353

5454
# Need to also explicitly set the LD_LIBRARY_PATH (at least on MacOS), so that
5555
# the generated library with the custom class can be loaded by the read test.
56-
# Setting the value of ${ld_library_path} in the ENVIRONMENT argument of the
57-
# ROOTTEST_ADD_TEST function will not work, because that function sets the same
58-
# variable internally, thus overriding our choice. The simplest thing to do is
59-
# to append our directory to the ${ROOTTEST_ENV_LIBRARYPATH} contents, which
60-
# are automatically used by ROOTTEST_ADD_TEST
61-
set(_roottest_env_librarypath ${ROOTTEST_ENV_LIBRARYPATH})
62-
set(ROOTTEST_ENV_LIBRARYPATH "${ROOTTEST_ENV_LIBRARYPATH}:${CMAKE_CURRENT_BINARY_DIR}/librntuplestltest")
6356
ROOTTEST_ADD_TEST(read_rntuple
6457
EXEC ./read_rntuple
6558
FIXTURES_REQUIRED read_rntuple_executable
6659
# PATH is used on Windows to find libraries for loading
67-
ENVIRONMENT PATH=${CMAKE_CURRENT_BINARY_DIR}/librntuplestltest)
68-
set(ROOTTEST_ENV_LIBRARYPATH ${_roottest_env_librarypath})
69-
60+
ENVIRONMENT ${ld_library_path}=${CMAKE_CURRENT_BINARY_DIR}/librntuplestltest)

roottest/root/ntuple/makeproject/ttree/CMakeLists.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,8 @@ target_link_directories(read_ttree PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/libttrees
5454

5555
# Need to also explicitly set the LD_LIBRARY_PATH (at least on MacOS), so that
5656
# the generated library with the custom class can be loaded by the read test.
57-
# Setting the value of ${ld_library_path} in the ENVIRONMENT argument of the
58-
# ROOTTEST_ADD_TEST function will not work, because that function sets the same
59-
# variable internally, thus overriding our choice. The simplest thing to do is
60-
# to append our directory to the ${ROOTTEST_ENV_LIBRARYPATH} contents, which
61-
# are automatically used by ROOTTEST_ADD_TEST
62-
set(_roottest_env_librarypath ${ROOTTEST_ENV_LIBRARYPATH})
63-
set(ROOTTEST_ENV_LIBRARYPATH "${ROOTTEST_ENV_LIBRARYPATH}:${CMAKE_CURRENT_BINARY_DIR}/libttreestltest")
6457
ROOTTEST_ADD_TEST(read_ttree
6558
EXEC ./read_ttree
66-
FIXTURES_REQUIRED makeproject_read_ttree_executable
59+
FIXTURES_REQUIRED makeproject_read_ttree_executable
6760
# PATH is used on Windows to find libraries for loading
68-
ENVIRONMENT PATH=${CMAKE_CURRENT_BINARY_DIR}/libttreestltest)
69-
set(ROOTTEST_ENV_LIBRARYPATH ${_roottest_env_librarypath})
61+
ENVIRONMENT ${ld_library_path}=${CMAKE_CURRENT_BINARY_DIR}/libttreestltest)

0 commit comments

Comments
 (0)