Newer
Older
cmake_minimum_required(VERSION 3.23)
option(BUILD_DOC "Build documentation" OFF)
option(USE_CONFIG_PARSER "Build config parser" ON)
option(USE_NETCDF "Enable netcdf library" ON)
option(WITH_RRTMG "with(out) RRTMG radiation transfer" OFF)
project(scm_abl)
enable_language(Fortran)
enable_language(C CXX)
set(CMAKE_CXX_STANDARD 14)
if(BUILD_DOC)
find_package(Doxygen)
if (DOXYGEN_FOUND)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/config) # doxygen config file
# option ALL allows to build the docs together with the code
add_custom_target( pbl_doc ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_IN}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) # WORKING_DIRECTORY: Execute the command with the given current working directory. If it is a relative path it will be interpreted relative to the build tree directory corresponding to the current source directory.
else()
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
endif(BUILD_DOC)
set(lib_files )