Check memory resize return value
[mfgtools.git] / CMakeLists.txt
blob302f8cb33561b560d01ce308a5555aaa015a2254
1 cmake_minimum_required(VERSION 3.4)
3 set(CMAKE_CXX_STANDARD 11)
4 set(CMAKE_CXX_STANDARD_REQUIRED ON)
6 option(BUILD_DOC "Build documentation" OFF)
8 add_subdirectory(libuuu)
9 add_subdirectory(uuu)
11 if (BUILD_DOC)
12         # check if Doxygen is installed
13         find_package(Doxygen)
14         if (DOXYGEN_FOUND)
15             # set input and output files
16             set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
17             set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
19             # request to configure the file
20             configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
21             message("Doxygen build started")
23             # note the option ALL which allows to build the docs together with the application
24             add_custom_target( doc_doxygen ALL
25                 COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
26                 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
27                 COMMENT "Generating documentation with Doxygen"
28                 VERBATIM )
29         else (DOXYGEN_FOUND)
30                 message("Doxygen need to be installed to generate the doxygen documentation")
31         endif (DOXYGEN_FOUND)
32 endif (BUILD_DOC)