CMakeLists.txt

Tue, 04 Oct 2022 19:25:07 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 04 Oct 2022 19:25:07 +0200
changeset 591
7df0bcaecffa
parent 463
92721c8f9db3
child 641
d402fead3386
permissions
-rw-r--r--

fix over-optimization of strstr

1. it's actually less performant to frequently read bytes
from an array instead of using the native word length
2. the SBO buffer should be local and not static to allow
multi-threading usage

     1 cmake_minimum_required(VERSION 3.14)
     2 project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions")
     4 # Configuration
     5 set(CMAKE_C_STANDARD 11)
     6 set(CMAKE_C_STANDARD_REQUIRED  99)
     8 option(GCC_MORE_WARNINGS "Enable -Wall -Wextra -pedantic when using gcc." OFF)
     9 if (GCC_MORE_WARNINGS AND CMAKE_COMPILER_IS_GNUCC)
    10     add_compile_options(-Wall -Wextra -pedantic)
    11 endif()
    13 # Library
    14 add_subdirectory(src)
    16 # Tests
    17 enable_testing()
    18 add_subdirectory(test)
    20 # Web Documentation
    21 add_subdirectory(docs/src)
    23 # API Documentation
    24 message(CHECK_START "Seaching for Doxygen")
    25 find_package(Doxygen)
    26 if(DOXYGEN_FOUND)
    27     message(CHECK_PASS "found.")
    28 else()
    29     message(CHECK_FAIL "not found - documentation will not be generated.")
    30 endif()
    31 option(BUILD_API_DOC "Create API documentation." ON)
    33 if(BUILD_API_DOC AND DOXYGEN_FOUND)
    34     set(DOXY_INPUT ${CMAKE_SOURCE_DIR}/src/cx)
    35     set(DOXY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/docs)
    36     set(DOXY_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/uaplogo.png)
    38     configure_file(${CMAKE_SOURCE_DIR}/cmake_infile.doxygen ${CMAKE_BINARY_DIR}/Doxyfile)
    40     add_custom_target(docs-api-21
    41             COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/docs/api-2.1 ${CMAKE_BINARY_DIR}/docs/web/api-2.1
    42             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    43             COMMENT "Copying UCX 2.1 API documentation.")
    45     add_custom_target(docs-api
    46             COMMAND ${DOXYGEN_EXECUTABLE}
    47             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    48             COMMENT "Generating API documentation with Doxygen.")
    50     add_custom_target(docs-all DEPENDS docs-html docs-api docs-api-21)
    51 else()
    52     add_custom_target(docs-all DEPENDS docs-html)
    53 endif()

mercurial