-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
55 lines (43 loc) · 1.2 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.10)
project(msbt VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_STATIC_LIBRARY_PREFIX "")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(ABSL_WAITER_MODE 0)
include(CTest)
enable_testing()
file(GLOB TAG_FILES ./src/tags/*.cpp)
add_library(msbt STATIC
./src/msbt.cpp
./src/include/msbt/msbt.h
./src/sections/attribute_section.cpp
./src/sections/label_section.cpp
./src/sections/text_section.cpp
./src/tags.cpp
./src/include/msbt/tags.h
${TAG_FILES}
./src/util.h
)
target_include_directories(msbt PUBLIC ./src/include)
target_include_directories(msbt PRIVATE ./src)
if(MSVC)
target_compile_options(msbt PRIVATE /W4 /wd4244 /wd4127 /Zc:__cplusplus)
else()
target_compile_options(msbt PRIVATE -Wall -Wextra -fno-plt -fshort-wchar)
endif()
set(BUILD_TESTING ON)
add_subdirectory(./lib/ExtendedIO)
target_link_libraries(msbt
PUBLIC
ExtendedIO
)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(msbt_to_yaml)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)