-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (30 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.21)
project(overture VERSION 0.0.1)
option(TEST_DISABLE_FORK "Disable fork() in the testing framework." OFF)
if (PROJECT_IS_TOP_LEVEL)
option(ENABLE_COVERAGE "Enable code coverage build type and target." OFF)
option(ENABLE_DOXYGEN "Enable code documentation target via Doxygen." ON)
include(cmake/Coverage.cmake)
include(cmake/Doxygen.cmake)
endif()
add_compile_options(
$<$<C_COMPILER_ID:GNU,Clang>:-Wall>
$<$<C_COMPILER_ID:GNU,Clang>:-Wextra>
$<$<C_COMPILER_ID:GNU,Clang>:-pedantic>)
install(
FILES
cmake/Coverage.cmake
cmake/Doxygen.cmake
DESTINATION libexec/overture/)
set(CMAKE_C_STANDARD 23)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
add_subdirectory(src)
if (PROJECT_IS_TOP_LEVEL)
include(CTest)
if (BUILD_TESTING)
add_subdirectory(test)
endif()
endif()