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 (#62)
  • Loading branch information
jmcarcell authored Sep 9, 2024
1 parent 1e064dc commit 795fa14
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/install" CACHE PATH "default install path" FORCE )
endif()

include(GNUInstallDirs)

# Set up C++ Standard
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
include(cmake/Key4hepConfig.cmake)

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

find_package(DD4hep REQUIRED)
find_package(EDM4HEP REQUIRED)
Expand All @@ -47,6 +42,3 @@ find_package(Gaudi REQUIRED)
include(CTest)

add_subdirectory(src)

message(STATUS "Finished!")

0 comments on commit 795fa14

Please sign in to comment.