Fixed sdps crash for some size flash.bin
[mfgtools.git] / CMakeLists.txt
blob90a019794a5af1824222d2f1eba23eb3a87f987a
1 cmake_minimum_required(VERSION 3.4)
3 project(uuu)
5 set(CMAKE_CXX_STANDARD 14)
6 set(CMAKE_CXX_STANDARD_REQUIRED ON)
7 set(CMAKE_SKIP_RPATH ON)
9 option(BUILD_DOC "Build documentation" OFF)
11 add_subdirectory(libuuu)
12 add_subdirectory(uuu)
14 if (BUILD_DOC)
15         # check if Doxygen is installed
16         find_package(Doxygen)
17         if (DOXYGEN_FOUND)
18             # set input and output files
19             set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
20             set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
22             # request to configure the file
23             configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
24             message("Doxygen build started")
26             # note the option ALL which allows to build the docs together with the application
27             add_custom_target( doc_doxygen ALL
28                 COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
29                 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
30                 COMMENT "Generating documentation with Doxygen"
31                 VERBATIM )
32         else (DOXYGEN_FOUND)
33                 message("Doxygen need to be installed to generate the doxygen documentation")
34         endif (DOXYGEN_FOUND)
35 endif (BUILD_DOC)