Skip to content

Commit

Permalink
Use the Key4hepConfig flag to set the standard, compiler flags and
Browse files Browse the repository at this point in the history
rpath magic.
  • Loading branch information
jmcarcell committed Sep 8, 2024
1 parent 4bf4188 commit f52cfc6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
20 changes: 1 addition & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,14 @@ cmake_minimum_required(VERSION 3.14)
cmake_policy(SET CMP0074 NEW) # use package_ROOT env var to find packages
project(k4MarlinWrapper LANGUAGES CXX)

# RPATH settings
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "RPATH USE LINK PATH")
option(USE_RUNPATH_INSTEAD_OF_RPATH "Use runpath instead of rpath (allow specifying linked libraries via LD_LIBRARY_PATH)" OFF)
if(USE_RUNPATH_INSTEAD_OF_RPATH)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags")
endif()

# project version
SET( ${PROJECT_NAME}_VERSION_MAJOR 0 )
SET( ${PROJECT_NAME}_VERSION_MINOR 8 )
SET( ${PROJECT_NAME}_VERSION_PATCH 0 )

SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" )

set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")

set(CMAKE_CXX_STANDARD 20 CACHE STRING "")

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

# Ninja compiler output
include(cmake/compiler_output.cmake)
include(cmake/Key4hepConfig.cmake)

include(GNUInstallDirs)

Expand Down
9 changes: 0 additions & 9 deletions cmake/compiler_output.cmake

This file was deleted.

0 comments on commit f52cfc6

Please sign in to comment.