Skip to content

Commit 831989e

Browse files
committed
Modifications to be able to build infologger with alibuild
1 parent a37af20 commit 831989e

3 files changed

Lines changed: 24 additions & 23 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build
22
.idea
33
.project
4-
.cproject
4+
.cproject
5+
/cmake-build-*

CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ project(InfoLogger)
2424
# Load some basic macros which are needed later on
2525
include(O2Utils)
2626
include(InfoLoggerDependencies)
27-
include(O2)
2827

2928
# Set the default build type to "RelWithDebInfo"
3029
if(NOT CMAKE_BUILD_TYPE)
@@ -149,6 +148,7 @@ if(MYSQL_FOUND)
149148
)
150149
endif()
151150

151+
enable_testing()
152152

153153
set(TEST_SRCS
154154
test/testInfoLogger.cxx
@@ -280,16 +280,6 @@ if(BUILD_STANDALONE)
280280
endif(BUILD_STANDALONE)
281281

282282

283-
284-
285-
# TODO RECONSIDER THE THINGS BELOW AFTER EXTRACTION TO ITS OWN REPO
286-
# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
287-
get_directory_property(hasParent PARENT_DIRECTORY)
288-
if(hasParent)
289-
set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
290-
endif()
291-
include(PackageConfigurator)
292-
293283
# Install some extra files
294284
install(
295285
FILES src/infoBrowser.tcl

doc/CMakeLists.txt

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
# @author Barthélémy von Haller
22

33
include(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)

0 commit comments

Comments
 (0)