Skip to content

Commit 08eaf6c

Browse files
committed
Adapted CMakes
1 parent 89bd87e commit 08eaf6c

13 files changed

+544
-706
lines changed

CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ ENDIF ()
5555
# Add compiler flags for warnings and (more importantly) fPIC and debug symbols
5656
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -fPIC")
5757

58-
59-
# TODO RECONSIDER THE THINGS BELOW AFTER EXTRACTION TO ITS OWN REPO
60-
# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
61-
get_directory_property(hasParent PARENT_DIRECTORY)
62-
if(hasParent)
63-
set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
64-
endif()
65-
include(PackageConfigurator)
66-
6758
add_subdirectory(doc)
6859

6960

@@ -145,6 +136,8 @@ set(LIBRARY_NAME Monitoring)
145136
set(BUCKET_NAME o2_monitoring_bucket)
146137
O2_GENERATE_LIBRARY()
147138

139+
enable_testing()
140+
148141
set(TEST_SRCS
149142
test/testCollector.cxx
150143
test/testDerived.cxx

cmake/CPackConfig.cmake

Lines changed: 0 additions & 91 deletions
This file was deleted.

cmake/FindConfiguration.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# - Try to find the O2 Configuration package include dirs and libraries
2+
# Author: Barthelemy von Haller
3+
#
4+
# This script will set the following variables:
5+
# Configuration_FOUND - System has Configuration
6+
# Configuration_INCLUDE_DIRS - The Configuration include directories
7+
# Configuration_LIBRARIES - The libraries needed to use Configuration
8+
# Configuration_DEFINITIONS - Compiler switches required for using Configuration
9+
#
10+
# This script can use the following variables:
11+
# Configuration_ROOT - Installation root to tell this module where to look. (it tries LD_LIBRARY_PATH otherwise)
12+
13+
# Init
14+
include(FindPackageHandleStandardArgs)
15+
16+
# find includes
17+
find_path(CONFIGURATION_INCLUDE_DIR Configuration.h
18+
HINTS ${Configuration_ROOT}/include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/Configuration" "../../include/Configuration" )
19+
# Remove the final "Configuration"
20+
get_filename_component(CONFIGURATION_INCLUDE_DIR ${CONFIGURATION_INCLUDE_DIR} DIRECTORY)
21+
set(Configuration_INCLUDE_DIRS ${CONFIGURATION_INCLUDE_DIR})
22+
23+
# find library
24+
find_library(CONFIGURATION_LIBRARY NAMES Configuration HINTS ${Configuration_ROOT}/lib ENV LD_LIBRARY_PATH)
25+
set(Configuration_LIBRARIES ${CONFIGURATION_LIBRARY})
26+
27+
# handle the QUIETLY and REQUIRED arguments and set CONFIGURATION_FOUND to TRUE
28+
# if all listed variables are TRUE
29+
find_package_handle_standard_args(Configuration "Configuration could not be found. Install package Configuration or set Configuration_ROOT to its root installation directory."
30+
CONFIGURATION_LIBRARY CONFIGURATION_INCLUDE_DIR)
31+
32+
if(${CONFIGURATION_FOUND})
33+
message(STATUS "Configuration found : ${Configuration_LIBRARIES}")
34+
endif()
35+
36+
mark_as_advanced(CONFIGURATION_INCLUDE_DIR CONFIGURATION_LIBRARY)

cmake/MonitoringConfig.cmake

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)