diff -r aaad6674a1a3 -r 24dc84788dee CMakeLists.txt --- a/CMakeLists.txt Sun Sep 03 09:10:16 2023 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions" LANGUAGES C) - -# Configuration -cmake_policy(SET CMP0077 NEW) -set(CMAKE_C_STANDARD 11) -set(CMAKE_C_STANDARD_REQUIRED 11) - -option(GCC_MORE_WARNINGS "Enable -Wall -Wextra -pedantic when using gcc." OFF) -if (GCC_MORE_WARNINGS AND CMAKE_COMPILER_IS_GNUCC) - add_compile_options(-Wall -Wextra -pedantic) -endif() - -# Library -add_subdirectory(src) - -# Tests -include(CheckLanguage) -check_language(CXX) -if (CMAKE_CXX_COMPILER) - enable_language(CXX) - enable_testing() - add_subdirectory(tests) -else () - message(STATUS "No C++ compiler found - tests are not compiled.") -endif () - -# Web Documentation -add_subdirectory(docs/src) - -# API Documentation -message(CHECK_START "Seaching for Doxygen") -find_package(Doxygen) -if(DOXYGEN_FOUND) - message(CHECK_PASS "found.") -else() - message(CHECK_FAIL "not found - documentation will not be generated.") -endif() -option(BUILD_API_DOC "Create API documentation." ON) - -if(BUILD_API_DOC AND DOXYGEN_FOUND) - set(DOXY_INPUT ${CMAKE_SOURCE_DIR}/src/cx) - set(DOXY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/docs) - set(DOXY_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/uaplogo.png) - - configure_file(${CMAKE_SOURCE_DIR}/cmake_infile.doxygen ${CMAKE_BINARY_DIR}/Doxyfile) - - add_custom_target(docs-api-21 - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/docs/api-2.1 ${CMAKE_BINARY_DIR}/docs/web/api-2.1 - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Copying UCX 2.1 API documentation.") - - add_custom_target(docs-api - COMMAND ${DOXYGEN_EXECUTABLE} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen.") - - add_custom_target(docs-all DEPENDS docs-html docs-api docs-api-21) -else() - add_custom_target(docs-all DEPENDS docs-html) -endif() -