-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
35 lines (23 loc) · 996 Bytes
/
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
cmake_minimum_required(VERSION 3.21)
################################################################################
# Macros
################################################################################
macro(CreateMainTarget)
add_library(jungles_bitfield INTERFACE)
target_include_directories(jungles_bitfield INTERFACE ${CMAKE_CURRENT_LIST_DIR}/src/)
add_library(jungles::bitfield ALIAS jungles_bitfield)
endmacro()
################################################################################
# Main script
################################################################################
project(JunglesBitfield LANGUAGES C CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
CreateMainTarget()
set(JUNGLES_BITFIELD_ENABLE_TESTING OFF CACHE BOOL "Enables self-testing of the library")
if(JUNGLES_BITFIELD_ENABLE_TESTING)
enable_testing()
add_subdirectory(tests)
endif()