-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
50 lines (41 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 3.20)
# project name
project (Analysis LANGUAGES C CXX)
# global settings
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs vs static")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# use c++11 at a minimum
set(CMAKE_CXX_STANDARD 11)
if (APPLE)
add_compile_options(-fvisibility=hidden)
endif()
# NOTE: cmake must have a CTestTEstfile.cmkae generated
# at the root of the build folder... otherwise it does not find tests
include(${CMAKE_SOURCE_DIR}/cmake-tools/common.cmake)
include(${CMAKE_SOURCE_DIR}/cmake-tools/target.cmake)
set(USE_CONAN FALSE CACHE BOOL "include conan for external deps")
if (${USE_CONAN})
# conan setup
set(_conan_paths ${CMAKE_BINARY_DIR}/conan_paths.cmake)
if (NOT EXISTS ${_conan_paths})
tcpp_fail_with_error("file ${_conan_paths} does not exist - rerun conan!")
endif()
include(${_conan_paths})
endif()
find_package(Boost REQUIRED)
find_package(ROOT REQUIRED)
tcpp_debug_var(ROOT_LIBRARIES)
tcpp_debug_var(ROOT_DEFINITIONS)
tcpp_debug_var(ROOT_INCLUDE_DIRS)
tcpp_debug_var(ROOT_CXX_FLAGS)
message(STATUS "before")
tcpp_auto_addsubdirs(src/)
message(STATUS "after")
#
# find and add ROOT
#
#set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config)
#find_package(ROOT REQUIRED COMPONENTS RHTTP)
#include_directories("${ROOT_INCLUDE_DIR}")
#add_definitions(${ROOT_CXX_FLAGS})