diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f8eb6596c5b53bcb56785065a88b8a19d10c70f..474ee4759c73605f861caa4a66567cfda5fd9f48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,17 +9,17 @@ LCG: - source /cvmfs/sft.cern.ch/lcg/views/LCG_104/x86_64-el9-gcc13-opt/setup.sh - ./install.sh - source tools/setup.sh - - ctest --test-dir Darwin.build --output-junit Testing/Temporary/test_report.xml -j$(nproc) - - ctest --test-dir Core.build --output-junit Testing/Temporary/test_report.xml -j$(nproc) + - ctest --test-dir build/Darwin --output-junit Testing/Temporary/test_report.xml -j$(nproc) + - ctest --test-dir build/Core --output-junit Testing/Temporary/test_report.xml -j$(nproc) artifacts: when: always paths: - - Darwin.build/Testing/Temporary - - Core.build/Testing/Temporary + - build/Darwin/Testing/Temporary + - build/Core/Testing/Temporary reports: junit: - - Darwin.build/Testing/Temporary/test_report.xml - - Core.build/Testing/Temporary/test_report.xml + - build/Darwin/Testing/Temporary/test_report.xml + - build/Core/Testing/Temporary/test_report.xml micromamba: stage: build @@ -31,14 +31,14 @@ micromamba: - micromamba activate DAS - ./install.sh - source tools/setup.sh - - ctest --test-dir Darwin.build --output-junit Testing/Temporary/test_report.xml -j$(nproc) - - ctest --test-dir Core.build --output-junit Testing/Temporary/test_report.xml -j$(nproc) + - ctest --test-dir build/Darwin --output-junit Testing/Temporary/test_report.xml -j$(nproc) + - ctest --test-dir build/Core --output-junit Testing/Temporary/test_report.xml -j$(nproc) artifacts: when: always paths: - - Darwin.build/Testing/Temporary - - Core.build/Testing/Temporary + - build/Darwin/Testing/Temporary + - build/Core/Testing/Temporary reports: junit: - - Darwin.build/Testing/Temporary/test_report.xml - - Core.build/Testing/Temporary/test_report.xml + - build/Darwin/Testing/Temporary/test_report.xml + - build/Core/Testing/Temporary/test_report.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index a202553b6bea453a6ad1c12fa1b76a51e4511be8..0d864c51a18ed483f9610d7392f391bd514dea01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ else() "${CMAKE_SOURCE_DIR}/cmake/TUnfold/TUnfoldConfig.cmake.in" <SOURCE_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BINARY_DIR "${CMAKE_SOURCE_DIR}/TUnfold.build" + BINARY_DIR "${CMAKE_BINARY_DIR}/TUnfold" INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" ) set(TUNFOLD_DEPENDENCY TUnfold) # Core needs to depend on TUnfold @@ -81,7 +81,7 @@ ExternalProject_Add(Darwin UPDATE_COMMAND "" SOURCE_DIR "${CMAKE_SOURCE_DIR}/Darwin" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BINARY_DIR "${CMAKE_SOURCE_DIR}/Darwin.build" + BINARY_DIR "${CMAKE_BINARY_DIR}/Darwin" INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" ) @@ -106,7 +106,7 @@ ExternalProject_Add(Core SOURCE_DIR "${CMAKE_SOURCE_DIR}/Core" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} DEPENDS ${TUNFOLD_DEPENDENCY} Darwin - BINARY_DIR "${CMAKE_SOURCE_DIR}/Core.build" + BINARY_DIR "${CMAKE_BINARY_DIR}/Core" INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CMAKE_ARGS ${CL_ARGS} ) diff --git a/README.md b/README.md index a7c9f2eb9f0573b64f2ff73130fbfcf06e8979cc..c3f4f3cb49bee101ce03d9132d3efe5e3341efbf 100644 --- a/README.md +++ b/README.md @@ -148,12 +148,12 @@ The source code of all these commands may be found in `$DAS_BASE/CMS/scripts` (n If you modify part of the source code of a module (e.g. `Core`), you can recompile it as follows: ``` cd $DAS_BASE -cmake --build Core.build --target install +cmake --build build/Core --target install ``` (This is analog to `cd $CMSSW_BASE; scram b`.) It is good practice to check that your changes do not harm the rest of the code. For this, tests can be run as follows: ``` -cd $DAS_BASE/Core.build +cd $DAS_BASE/build/Core ctest ``` (analog to `cd $CMSSW_BASE; scram b runtests`.) @@ -162,16 +162,16 @@ For `cmake` and `ctest`, one can always specify `-j8` to compile with 8 cores (f Despite multitasking, the whole process of compiling and testing may take a few minutes. In case you would like to compile and/or test a subset of the code, do the following (where `JEC` is here just taken as an example): ``` -cd $DAS_BASE/Core.build/JEC +cd $DAS_BASE/build/Core/JEC make install ``` -(analog to `cd $CMSSW_BASE/src/Core/JEC; scram b`.) +(analog to `cd $CMSSW_BASE/src/Core/JEC; scram b`. Commands will differ if you specified a generator other than GNU Makefiles.) Whenever developing, it is perfectly fine to only compile subsets of the code to speed up the whole process. Instead, whenever running over large samples, it is advised to commit and to rerun the whole `Core` to ensure compatibility and reproducibility of the results. ### Updating a module -If you want to update source code of a module (e.g. `Core`), assuming no local changes, you can proceed as follows: +If you want to update the source code of a module (e.g. `Core`), assuming no local changes, you can proceed as follows: ``` cd $DAS_BASE/Core git pull