From a548562b5976af96ba8834e7846993fbbf33a223 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Tue, 4 Mar 2025 17:19:56 +0100 Subject: [PATCH 1/3] chore: use cmake command instead of cryptic python --- CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e45c6763..b913b3e39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,8 +227,12 @@ add_subdirectory (field) add_subdirectory (pid) add_subdirectory (muonShieldOptimization) -add_custom_target( # make relative links to folders - geometry.link ALL - COMMAND [ -e geometry ] || python -c \"import os.path as p, os\; os.symlink(p.join(p.relpath('${CMAKE_SOURCE_DIR}', '${CMAKE_BINARY_DIR}') , 'geometry') , 'geometry') \" - COMMAND [ -e macro ] || python -c \"import os.path as p, os\; os.symlink(p.join(p.relpath('${CMAKE_SOURCE_DIR}', '${CMAKE_BINARY_DIR}') , 'macro') , 'macro') \" +add_custom_target( + geometry.link ALL + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/geometry + ${CMAKE_BINARY_DIR}/geometry + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/macro + ${CMAKE_BINARY_DIR}/macro + COMMENT + "Creating symlinks from ${CMAKE_SOURCE_DIR} to ${CMAKE_BINARY_DIR} for geometry and macro" ) From 2ea13a3b128647efb61db8f5affd910c9d54bea1 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Tue, 4 Mar 2025 17:33:17 +0100 Subject: [PATCH 2/3] chore: no need to set SHARED_LIBRARY_SUFFIX --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b913b3e39..af8056191 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,7 +174,6 @@ set(FAIRROOT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES} VERSION "${FAIRROOT_VERSION}" SOVERSION "${FAIRROOT_MAJOR_VERSION}" ) -set(CMAKE_SHARED_LIBRARY_SUFFIX .so) SET(CBMLIBDIR ${CMAKE_BINARY_DIR}/lib) SET(LD_LIBRARY_PATH ${CBMLIBDIR} ${LD_LIBRARY_PATH}) From 6fefa06a23df342efd1468a86a0f04f96c9f822e Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Tue, 4 Mar 2025 17:34:12 +0100 Subject: [PATCH 3/3] chore: fix typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af8056191..7ef9e3e9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ SetBasicVariables() # Add the FairRoot include directories to the list of libraries which are # external to the Ship project. For include directories in this list the -# compiler will not generate any warnings. This is usefull since one is only +# compiler will not generate any warnings. This is useful since one is only # interested about warnings from the own project. SYSTEM_INCLUDE_DIRECTORIES # is defined in FairMacros.cmake. In the moment the defined directories are # the root and boost include directories.