CMakeLists.txt

changeset 753
24dc84788dee
parent 752
aaad6674a1a3
child 754
4bc7d966c9db
     1.1 --- a/CMakeLists.txt	Sun Sep 03 09:10:16 2023 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,62 +0,0 @@
     1.4 -cmake_minimum_required(VERSION 3.14)
     1.5 -project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions" LANGUAGES C)
     1.6 -
     1.7 -# Configuration
     1.8 -cmake_policy(SET CMP0077 NEW)
     1.9 -set(CMAKE_C_STANDARD 11)
    1.10 -set(CMAKE_C_STANDARD_REQUIRED 11)
    1.11 -
    1.12 -option(GCC_MORE_WARNINGS "Enable -Wall -Wextra -pedantic when using gcc." OFF)
    1.13 -if (GCC_MORE_WARNINGS AND CMAKE_COMPILER_IS_GNUCC)
    1.14 -    add_compile_options(-Wall -Wextra -pedantic)
    1.15 -endif()
    1.16 -
    1.17 -# Library
    1.18 -add_subdirectory(src)
    1.19 -
    1.20 -# Tests
    1.21 -include(CheckLanguage)
    1.22 -check_language(CXX)
    1.23 -if (CMAKE_CXX_COMPILER)
    1.24 -    enable_language(CXX)
    1.25 -    enable_testing()
    1.26 -    add_subdirectory(tests)
    1.27 -else ()
    1.28 -    message(STATUS "No C++ compiler found - tests are not compiled.")
    1.29 -endif ()
    1.30 -
    1.31 -# Web Documentation
    1.32 -add_subdirectory(docs/src)
    1.33 -
    1.34 -# API Documentation
    1.35 -message(CHECK_START "Seaching for Doxygen")
    1.36 -find_package(Doxygen)
    1.37 -if(DOXYGEN_FOUND)
    1.38 -    message(CHECK_PASS "found.")
    1.39 -else()
    1.40 -    message(CHECK_FAIL "not found - documentation will not be generated.")
    1.41 -endif()
    1.42 -option(BUILD_API_DOC "Create API documentation." ON)
    1.43 -
    1.44 -if(BUILD_API_DOC AND DOXYGEN_FOUND)
    1.45 -    set(DOXY_INPUT ${CMAKE_SOURCE_DIR}/src/cx)
    1.46 -    set(DOXY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/docs)
    1.47 -    set(DOXY_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/uaplogo.png)
    1.48 -
    1.49 -    configure_file(${CMAKE_SOURCE_DIR}/cmake_infile.doxygen ${CMAKE_BINARY_DIR}/Doxyfile)
    1.50 -
    1.51 -    add_custom_target(docs-api-21
    1.52 -            COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/docs/api-2.1 ${CMAKE_BINARY_DIR}/docs/web/api-2.1
    1.53 -            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    1.54 -            COMMENT "Copying UCX 2.1 API documentation.")
    1.55 -
    1.56 -    add_custom_target(docs-api
    1.57 -            COMMAND ${DOXYGEN_EXECUTABLE}
    1.58 -            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    1.59 -            COMMENT "Generating API documentation with Doxygen.")
    1.60 -
    1.61 -    add_custom_target(docs-all DEPENDS docs-html docs-api docs-api-21)
    1.62 -else()
    1.63 -    add_custom_target(docs-all DEPENDS docs-html)
    1.64 -endif()
    1.65 -

mercurial