From 2c9b71e891df30470db6781c6e7932fcb12dfb2c Mon Sep 17 00:00:00 2001 From: raiqarasool Date: Fri, 21 Jun 2024 12:44:16 -0400 Subject: [PATCH 1/3] Updated scripts/jana-config.h to include JANA in RPath --- scripts/jana-config.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/jana-config.in b/scripts/jana-config.in index b6896cc48..ee139208e 100755 --- a/scripts/jana-config.in +++ b/scripts/jana-config.in @@ -75,7 +75,12 @@ while test $# -gt 0; do esac case $1 in --libs) - mess="$mess -L${JANA_INSTALL_DIR}/lib -lJANA ${LDFLAGS} ${JANA_ONLY_LIBS} ${LIBS}" + mess="$mess -Wl,-rpath,${JANA_INSTALL_DIR}/lib -L${JANA_INSTALL_DIR}/lib -lJANA ${LDFLAGS} ${JANA_ONLY_LIBS} ${LIBS}" + ;; + esac + case $1 in + --static-libs) + mess="$mess ${JANA_INSTALL_DIR}/lib/libJANA.a ${LDFLAGS} ${JANA_ONLY_LIBS} ${LIBS}" ;; esac case $1 in From 36b8377d9f1349cca8b5c817de6e40f7b841b813 Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Fri, 21 Jun 2024 14:52:45 -0400 Subject: [PATCH 2/3] Fix .gitignore Top-level 'programs' pattern was incorrectly matching against src/programs. Also made the pattern for '/build' into a wildcard so that it includes build_podio, etc. --- .gitignore | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 417a9359b..14d5f69f6 100644 --- a/.gitignore +++ b/.gitignore @@ -46,13 +46,12 @@ Darwin_* .Darwin_* Makefile -build/ -cmake-build-debug/ -install/ -bin/ -include/ -lib/ -programs/ +/build*/ +/install*/ + +/bin/ +/include/ +/lib/ # Doxygen generated files docs/html/* From 8f09ea48ca1fed60b8fb05c33063a647cb6e29fc Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Fri, 21 Jun 2024 15:13:28 -0400 Subject: [PATCH 3/3] Change examples install directory Some examples previously installed to CMAKE_INSTALL_PREFIX/programs, which isn't in the FHS. They now install to CMAKE_INSTALL_PREFIX/bin instead. --- CMakeLists.txt | 2 +- scripts/ci/submit_SubeventCUDAExample.slurm | 2 +- src/examples/SubeventCUDAExample/CMakeLists.txt | 2 +- src/examples/SubeventCUDAExample/README.md | 2 +- src/examples/UnitTestingExample/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd10f3cfa..f248d10bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ endfunction() #---------------------- option(USE_ROOT "Include ROOT dependency." OFF) -option(USE_ZEROMQ "Include ZeroMQ dependency. (Needed for examples/StreamingExample, programs/StreamDet, plugins/janacontrol), " OFF) +option(USE_ZEROMQ "Include ZeroMQ dependency. (Needed for examples/StreamingExample, plugins/streamDet, plugins/janacontrol), " OFF) option(USE_XERCES "Include XercesC 3 dependency. (Needed for JGeometryXML)" OFF) option(USE_PYTHON "Include Python dependency. This requires python-devel and python-distutils." OFF) option(USE_ASAN "Compile with address sanitizer" OFF) diff --git a/scripts/ci/submit_SubeventCUDAExample.slurm b/scripts/ci/submit_SubeventCUDAExample.slurm index 59d080642..ace941699 100644 --- a/scripts/ci/submit_SubeventCUDAExample.slurm +++ b/scripts/ci/submit_SubeventCUDAExample.slurm @@ -40,5 +40,5 @@ srun cmake --build build -j 32 --target install # run echo "\n Launching SubeventCUDAExample for 1s..." -srun ./install/programs/SubeventCUDAExample & \ +srun ./install/bin/SubeventCUDAExample & \ sleep 1 # exit effect diff --git a/src/examples/SubeventCUDAExample/CMakeLists.txt b/src/examples/SubeventCUDAExample/CMakeLists.txt index fed8ef0fc..44a9116f7 100644 --- a/src/examples/SubeventCUDAExample/CMakeLists.txt +++ b/src/examples/SubeventCUDAExample/CMakeLists.txt @@ -12,7 +12,7 @@ if (USE_CUDA) target_link_libraries(SubeventCUDAExample jana2) set_target_properties(SubeventCUDAExample PROPERTIES PREFIX "" OUTPUT_NAME "SubeventCUDAExample" CUDA_ARCHITECTURES "75;80") - install(TARGETS SubeventCUDAExample DESTINATION programs) + install(TARGETS SubeventCUDAExample DESTINATION bin) else() message(STATUS "Skipping examples/SubeventCUDAExample because USE_CUDA=Off") diff --git a/src/examples/SubeventCUDAExample/README.md b/src/examples/SubeventCUDAExample/README.md index 6f0f80116..379e67e39 100644 --- a/src/examples/SubeventCUDAExample/README.md +++ b/src/examples/SubeventCUDAExample/README.md @@ -22,6 +22,6 @@ This is an example that can run on a single GPU. ``` Launch the application. ```bash - bash-4.2$ ./install/programs/SubeventCUDAExample + bash-4.2$ ./install/bin/SubeventCUDAExample ``` diff --git a/src/examples/UnitTestingExample/CMakeLists.txt b/src/examples/UnitTestingExample/CMakeLists.txt index e82e90875..410efbc2b 100644 --- a/src/examples/UnitTestingExample/CMakeLists.txt +++ b/src/examples/UnitTestingExample/CMakeLists.txt @@ -10,4 +10,4 @@ target_include_directories(UnitTestingExample PRIVATE ${CMAKE_SOURCE_DIR}/src/ex target_link_libraries(UnitTestingExample Tutorial_plugin jana2) set_target_properties(UnitTestingExample PROPERTIES PREFIX "" OUTPUT_NAME "UnitTestingExample") -install(TARGETS UnitTestingExample DESTINATION programs) +install(TARGETS UnitTestingExample DESTINATION bin)