Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion cmake/modules/FairRootTargetRootDictionary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,19 @@ function(fairroot_target_root_dictionary target)
# add a custom command to generate the dictionary using rootcling
# cmake-format: off
set(space " ")

if (APPLE AND CMAKE_OSX_SYSROOT)
set(_sysroot_arg "SDKROOT=${CMAKE_OSX_SYSROOT}")
else()
set(_sysroot_arg)
endif()

add_custom_command(
OUTPUT ${dictionaryFile} ${pcmFile} ${rootmapFile}
VERBATIM
COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ENV{LD_LIBRARY_PATH}"
COMMAND ${CMAKE_COMMAND} -E env
"LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ENV{LD_LIBRARY_PATH}"
${_sysroot_arg}
$<TARGET_FILE:ROOT::rootcling>
-f ${dictionaryFile}
-inlineInputHeader
Expand Down
4 changes: 4 additions & 0 deletions cmake/scripts/generate_dictionary_root.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
export LD_LIBRARY_PATH=@MY_LD_LIBRARY_PATH@
export DYLD_LIBRARY_PATH=@MY_LD_LIBRARY_PATH@

if [[ -n "@CMAKE_OSX_SYSROOT@" ]]; then
export SDKROOT=@CMAKE_OSX_SYSROOT@
fi

@ROOT_CINT_EXECUTABLE@ -f @Int_DICTIONARY@ @EXTRA_DICT_PARAMETERS_STR@ -c @Int_DEF_STR@ @Int_INC_STR@ @Int_HDRS_STR@ @Int_LINKDEF@
22 changes: 14 additions & 8 deletions templates/test_project_root_containers.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ mkdir build
cd build
export SIMPATH=@SIMPATH@
export FAIRROOTPATH=@CMAKE_INSTALL_PREFIX@
cmake -DCMAKE_CXX_STANDARD=@CMAKE_CXX_STANDARD@ ..

if [ "$1" = "--double-configure" ]
then
echo "*** Calling cmake configure again:"
# Check if all the cache variables
# are good for a reconfiguration step
cmake -DCMAKE_CXX_STANDARD=@CMAKE_CXX_STANDARD@ ..

parameters="-DCMAKE_CXX_STANDARD=@CMAKE_CXX_STANDARD@"

if [[ -n "@CMAKE_OSX_SYSROOT@" ]]; then
parameters="$parameters -DCMAKE_OSX_SYSROOT=@CMAKE_OSX_SYSROOT@"
fi

cmake $parameters ..

if [[ "$1" = "--double-configure" ]]; then
echo "*** Calling cmake configure again:"
# Check if all the cache variables
# are good for a reconfiguration step
cmake ..
fi

make
Expand Down
25 changes: 16 additions & 9 deletions templates/test_project_stl_containers.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@ cd project_stl_containers
./rename.sh TestProj Tst det
mkdir build
cd build
export CMAKE_PREFIX_PATH="@SIMPATH@${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}"

export SIMPATH=@SIMPATH@
export FAIRROOTPATH=@CMAKE_INSTALL_PREFIX@
cmake -DCMAKE_CXX_STANDARD=@CMAKE_CXX_STANDARD@ ..

if [ "$1" = "--double-configure" ]
then
echo "*** Calling cmake configure again:"
# Check if all the cache variables
# are good for a reconfiguration step
cmake ..

parameters="-DCMAKE_CXX_STANDARD=@CMAKE_CXX_STANDARD@"

if [[ -n "@CMAKE_OSX_SYSROOT@" ]]; then
parameters="$parameters -DCMAKE_OSX_SYSROOT=@CMAKE_OSX_SYSROOT@"
fi

cmake $parameters ..

if [[ "$1" = "--double-configure" ]]; then
echo "*** Calling cmake configure again:"
# Check if all the cache variables
# are good for a reconfiguration step
cmake ..
fi

make
Expand Down