mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
O3 as default and option for mtune
This commit is contained in:
parent
cce659d98c
commit
3e88beb8a5
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)
|
|||||||
project(slsDetectorPackage)
|
project(slsDetectorPackage)
|
||||||
set(PROJECT_VERSION 5.0.0)
|
set(PROJECT_VERSION 5.0.0)
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||||
|
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
include(cmake/project_version.cmake)
|
include(cmake/project_version.cmake)
|
||||||
@ -44,6 +44,9 @@ option(SLS_USE_PYTHON "Python bindings" OFF)
|
|||||||
option(SLS_USE_CTBGUI "ctb GUI" OFF)
|
option(SLS_USE_CTBGUI "ctb GUI" OFF)
|
||||||
option(SLS_BUILD_DOCS "docs" OFF)
|
option(SLS_BUILD_DOCS "docs" OFF)
|
||||||
option(SLS_BUILD_EXAMPLES "examples" OFF)
|
option(SLS_BUILD_EXAMPLES "examples" OFF)
|
||||||
|
option(SLS_TUNE_LOCAL "tune to local machine" OFF)
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
@ -111,6 +114,11 @@ if(SLS_USE_SANITIZER)
|
|||||||
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(SLS_TUNE_LOCAL)
|
||||||
|
target_compile_options(slsProjectOptions INTERFACE -mtune=native -march=native)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#rapidjson
|
#rapidjson
|
||||||
add_library(rapidjson INTERFACE)
|
add_library(rapidjson INTERFACE)
|
||||||
target_include_directories(rapidjson INTERFACE
|
target_include_directories(rapidjson INTERFACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user