cmake_minimum_required(VERSION 3.14) project(Light) set(CMAKE_CXX_STANDARD 23) add_option(ENABLE_TESTS "Enables the building of the test modules") include(${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake/functions.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake/definitions.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake/dependencies.cmake) add_option(ENABLE_STATIC_ANALYSIS "Performs static analysis via clang-tidy and fails build on failing checks") if (ENABLE_STATIC_ANALYSIS) set(CMAKE_CXX_CLANG_TIDY "clang-tidy;--warnings-as-errors=*;--allow-no-checks") endif () add_option(ENABLE_LCOV "Enables the code coverage instrumentation for clang") if(ENABLE_LCOV) if (CMAKE_CXX_COMPILER_ID NOT STREQUAL "Clang") message(FATAL_ERROR "ENABLE_LCOV option is only supported when compiling with clang") endif () add_compile_options(-fprofile-instr-generate -fcoverage-mapping) add_link_options(-fprofile-instr-generate -fcoverage-mapping) endif () add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/modules) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/glad)