Skip to content

Commit

Permalink
Use the Key4hepConfig flag to set the standard, compiler flags and rp…
Browse files Browse the repository at this point in the history
…ath magic (#24)
  • Loading branch information
jmcarcell authored Sep 9, 2024
1 parent 48b442b commit 007c784
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,9 @@ find_package(k4FWCore)
find_package(Gaudi)
#---------------------------------------------------------------

include(GNUInstallDirs)

# Set up C++ Standard
# ``-DCMAKE_CXX_STANDARD=<standard>`` when invoking CMake
set(CMAKE_CXX_STANDARD 20 CACHE STRING "")
include(cmake/Key4hepConfig.cmake)

if(NOT CMAKE_CXX_STANDARD MATCHES "20|23")
message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}")
endif()
include(GNUInstallDirs)

include(CTest)

Expand Down
2 changes: 1 addition & 1 deletion k4ProjectTemplate/src/components/HelloWorldAlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ StatusCode HelloWorldAlg::initialize() {
return StatusCode::SUCCESS;
}

StatusCode HelloWorldAlg::execute(const EventContext& ctx) const {
StatusCode HelloWorldAlg::execute(const EventContext&) const {
info() << endmsg;
info() << endmsg;
info() << theMessage << endmsg;
Expand Down

0 comments on commit 007c784

Please sign in to comment.