File tree Expand file tree Collapse file tree 5 files changed +66
-28
lines changed
Expand file tree Collapse file tree 5 files changed +66
-28
lines changed Original file line number Diff line number Diff line change 11build
22.idea
33.project
4- .cproject
4+ .cproject
5+ cmake-build- *
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ project(ReadoutCard)
2424# Load some basic macros which are needed later on
2525include (O2Utils)
2626include (ReadoutCardDependencies)
27- include (O2)
2827
2928# Set the default build type to "RelWithDebInfo"
3029if (NOT CMAKE_BUILD_TYPE )
@@ -63,8 +62,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -fPIC")
6362
6463set (MODULE_NAME "ReadoutCard" )
6564
66- link_o2_subproject(InfoLogger)
67-
6865O2_SETUP(NAME ${MODULE_NAME} )
6966
7067set (SRCS
@@ -190,7 +187,7 @@ endif()
190187
191188add_subdirectory (doc )
192189
193- set (CTEST_TESTING_TIMEOUT 15 )
190+ enable_testing ( )
194191
195192set (TEST_SRCS
196193 test /TestBarAccessor.cxx
@@ -210,18 +207,10 @@ set(TEST_SRCS
210207O2_GENERATE_TESTS(
211208 MODULE_LIBRARY_NAME ${LIBRARY_NAME}
212209 BUCKET_NAME ${BUCKET_NAME}
213- TIMEOUT 30
210+ TIMEOUT 15
214211 TEST_SRCS ${TEST_SRCS}
215212)
216213
217- # TODO RECONSIDER THE THINGS BELOW AFTER EXTRACTION TO ITS OWN REPO
218- # Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
219- get_directory_property (hasParent PARENT_DIRECTORY )
220- if (hasParent)
221- set (PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
222- endif ()
223- include (PackageConfigurator)
224-
225214# Install the hugetlbfs script separately, because it's not a compiled target
226215install (
227216 FILES src/roc-setup-hugetlbfs.sh
Original file line number Diff line number Diff line change 1+ # - Try to find the O2 InfoLogger package include dirs and libraries
2+ # Author: Barthelemy von Haller
3+ #
4+ # This script will set the following variables:
5+ # InfoLogger_FOUND - System has InfoLogger
6+ # InfoLogger_INCLUDE_DIRS - The InfoLogger include directories
7+ # InfoLogger_LIBRARIES - The libraries needed to use InfoLogger
8+ # InfoLogger_DEFINITIONS - Compiler switches required for using InfoLogger
9+ #
10+ # This script can use the following variables:
11+ # InfoLogger_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 (INFOLOGGER_INCLUDE_DIR InfoLogger.h
18+ HINTS ${InfoLogger_ROOT} /include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/InfoLogger" "../../include/InfoLogger" )
19+ # Remove the final "InfoLogger"
20+ get_filename_component (INFOLOGGER_INCLUDE_DIR ${INFOLOGGER_INCLUDE_DIR} DIRECTORY )
21+ set (InfoLogger_INCLUDE_DIRS ${INFOLOGGER_INCLUDE_DIR} )
22+
23+ # find library
24+ find_library (INFOLOGGER_LIBRARY NAMES InfoLogger HINTS ${InfoLogger_ROOT} /lib ENV LD_LIBRARY_PATH)
25+ set (InfoLogger_LIBRARIES ${INFOLOGGER_LIBRARY} )
26+
27+ # handle the QUIETLY and REQUIRED arguments and set INFOLOGGER_FOUND to TRUE
28+ # if all listed variables are TRUE
29+ find_package_handle_standard_args(InfoLogger "InfoLogger could not be found. Install package InfoLogger or set InfoLogger_ROOT to its root installation directory."
30+ INFOLOGGER_LIBRARY INFOLOGGER_INCLUDE_DIR)
31+
32+ if (${InfoLogger_ROOT} )
33+ message (STATUS "InfoLogger found : ${InfoLogger_LIBRARIES} " )
34+ endif ()
35+
36+ mark_as_advanced (INFOLOGGER_INCLUDE_DIR INFOLOGGER_LIBRARY)
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ find_package(Boost 1.56
1717 )
1818find_package (Git QUIET )
1919find_package (Common REQUIRED)
20+ find_package (InfoLogger REQUIRED)
2021
2122# Python
2223find_package (PythonLibs 2.7)
@@ -52,14 +53,15 @@ o2_define_bucket(
5253 ${Boost_FILESYSTEM_LIBRARY}
5354 ${Boost_SYSTEM_LIBRARY}
5455 ${Boost_PROGRAM_OPTIONS_LIBRARY}
55- InfoLogger
5656 ${rt_lib}
5757 pthread
5858 ${Common_LIBRARIES}
59+ ${InfoLogger_LIBRARIES}
5960
6061 SYSTEMINCLUDE_DIRECTORIES
6162 ${Boost_INCLUDE_DIR}
6263 ${Common_INCLUDE_DIRS}
64+ ${InfoLogger_INCLUDE_DIRS}
6365)
6466
6567o2_define_bucket(
@@ -82,8 +84,8 @@ o2_define_bucket(
8284 DEPENDENCIES
8385 ${DIM_LIBRARY}
8486
85- SYSTEMINCLUDE_DIRECTORIES
86- ${DIM_INCLUDE_DIRS}
87+ SYSTEMINCLUDE_DIRECTORIES
88+ ${DIM_INCLUDE_DIRS}
8789)
8890
8991o2_define_bucket(
Original file line number Diff line number Diff line change 11# @author Barthélémy von Haller
22
33include (FindDoxygen)
4- include (DoxygenTarget)
54
6- # Add an option for the user to enable or not the documentation generation every time we compile.
7- # Either set it on the command line or use ccmake. It is an advanced option.
8- option (BUILD_DOCS "Build doxygen documentation when building all" OFF )
9- mark_as_advanced (BUILD_DOCS)
10-
11- if (NOT DOXYGEN_DOT_FOUND)
5+ if (NOT DOXYGEN_DOT_FOUND)
126 message (WARNING "Graphviz doesn't seem to be installed. Doxygen will not be able to generate graphs. Consider installing this package." )
13- endif (NOT DOXYGEN_DOT_FOUND)
7+ endif (NOT DOXYGEN_DOT_FOUND)
8+
9+ if (DOXYGEN_FOUND)
10+ # Configure the doxygen config file with current settings
11+ set ("DOC_OUTPUT_DIR" "${CMAKE_CURRENT_BINARY_DIR} " )
12+ configure_file (doxyfile.in ${CMAKE_CURRENT_BINARY_DIR} /documentation-config.doxygen @ONLY)
13+
14+ # target doc
15+ add_custom_target (doc
16+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR} /documentation-config.doxygen
17+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
18+ COMMENT "Generating API documentation using doxygen for ${PROJECT_NAME}
19+ \n Output will be available in ${DOC_OUTPUT_DIR} /html" VERBATIM )
1420
15- if (DOXYGEN_FOUND)
16- PrepareDocTarget()
17- endif (DOXYGEN_FOUND)
21+ # installation
22+ option (DOC_INSTALL "Install the documentation when calling \" make install\" " OFF )
23+ if (DOC_INSTALL)
24+ message (STATUS "Documentation will be installed but you *must* run `make doc`" )
25+ install (DIRECTORY ${DOC_OUTPUT_DIR} /html DESTINATION share/doc /${PROJECT_NAME} COMPONENT doc )
26+ endif (DOC_INSTALL)
27+ endif (DOXYGEN_FOUND)
You can’t perform that action at this time.
0 commit comments