-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
56 lines (41 loc) · 1.52 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
51
52
53
54
55
56
#################################################
# cmake file for building DQMSDHCAL package
# @author Eté Rémi
# Copyright (c) CNRS / IPNL
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 FATAL_ERROR )
#################################################
# -- project name --
PROJECT( DQMSDHCAL )
SET( ${PROJECT_NAME}_VERSION_MAJOR 1 )
SET( ${PROJECT_NAME}_VERSION_MINOR 0 )
SET( ${PROJECT_NAME}_VERSION_PATCH 0 )
###############################
# Require C++11
INCLUDE( CheckCXXCompilerFlag )
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF( COMPILER_SUPPORTS_CXX11 )
LIST( APPEND CMAKE_CXX_FLAGS "-std=c++11" )
ELSE()
MESSAGE( SEND_ERROR "DQMCore requires C++11 support. Please upgrade your compiler !" )
ENDIF()
#-- dependencies --
LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
# ----- Find DQMCore package -----
FIND_PACKAGE( DQMCore REQUIRED )
LIST( APPEND CMAKE_MODULE_PATH ${DQMCore_DIR}/cmake )
INCLUDE( default_settings )
# ----- Find DQM4ILC package -----
FIND_PACKAGE( DQM4ILC REQUIRED )
# ----- Find Trivent package -----
FIND_PACKAGE( Trivent REQUIRED )
# ----- Find CaloSoftWare package -----
FIND_PACKAGE( CaloSoftWare REQUIRED )
FOREACH( pkg DQMCore DQM4ILC Trivent CaloSoftWare )
INCLUDE_DIRECTORIES( ${${pkg}_INCLUDE_DIRS} )
LINK_LIBRARIES( ${${pkg}_LIBRARIES} )
ADD_DEFINITIONS ( ${${pkg}_DEFINITIONS} )
ENDFOREACH()
INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} )
ADD_SUBDIRECTORY( source )
# display some variables and write them to cache
DISPLAY_STD_VARIABLES()