-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
33 lines (26 loc) · 976 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
cmake_minimum_required(VERSION 3.16)
project(sim2022)
set(CMAKE_INCL subdirs flags upd_list)
#
foreach(INCL ${CMAKE_INCL})
include(cmake/${INCL}.cmake)
endforeach()
enable_testing()
set(DIRS 3rd_party src sim test)
foreach(DIR ${DIRS})
add_subdirectory(${DIR})
endforeach()
set(TARGETS)
list(APPEND TARGETS ${SIM} ${SIMLIB})
foreach(TARGET IN LISTS TARGETS)
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/3rd_party)
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/3rd_party/ELFIO)
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/3rd_party/asmjit/src)
# target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wpedantic)
# apply_compiler_flags(${TARGET} PRIVATE)
target_compile_features(${TARGET} PRIVATE cxx_std_20)
endforeach()
foreach(TARGET ${SIM})
target_link_libraries(${TARGET} PUBLIC ${SIMLIB} decoder)
endforeach()