-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
39 lines (27 loc) · 1.6 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
cmake_minimum_required(VERSION 3.13)
project(ecclib)
include_directories(${CMAKE_SOURCE_DIR}/lib)
enable_testing()
set(SPF common/spf_par.c common/spf_par.h)
set(UI_TXT common/ui_txt.c interfaces/ui_utils.h)
set(SRM common/srm_utils.c common/srm_utils.h)
set(SIM_BG simulators/main_txt.c simulators/sim_bg.c ${SPF} ${UI_TXT})
set(SIM_SRM_BG common/srm_utils.c ${SIM_BG})
add_compile_options(-DUSE_STDLIB_RND)
add_executable(dtrm0_bg dtrm/dtrm0.c ${SIM_SRM_BG})
target_compile_options(dtrm0_bg PUBLIC -DDEC_NEEDS_SIGMA)
add_executable(test_dtrm0 tests/test_dtrm0.c dtrm/dtrm0.c ${SRM} ${SPF} ${UI_TXT})
target_compile_options(test_dtrm0 PUBLIC -DDEC_NEEDS_SIGMA)
add_test(dtrm0 test_dtrm0)
add_executable(dtrm1_bg dtrm/dtrm1.c rm1_ml/rm1_ml.c ${SIM_SRM_BG})
target_compile_options(dtrm1_bg PUBLIC -DDEC_NEEDS_SIGMA)
add_executable(dtrm_glp_bg dtrm_glp/dtrm_glp_main.c dtrm_glp/dtrm_glp_inner.c ${SIM_SRM_BG})
target_compile_options(dtrm_glp_bg PUBLIC -DDEC_NEEDS_SIGMA -DDEC_NEEDS_CSNRN)
add_executable(test_crc tests/test_crc.c common/crc.c)
add_test(crc test_crc)
add_executable(ca_polar_scl_bg polar_scl/ca_polar_scl_main.c polar_scl/polar_scl_inner.c common/crc.c ${SIM_SRM_BG})
target_compile_options(ca_polar_scl_bg PUBLIC -DDEC_NEEDS_SIGMA)
add_executable(test_ca_polar_scl tests/test_ca_polar_scl.c polar_scl/ca_polar_scl_main.c polar_scl/polar_scl_inner.c common/crc.c common/srm_utils.c ${SPF} ${UI_TXT})
target_compile_options(test_ca_polar_scl PUBLIC -DDEC_NEEDS_SIGMA)
add_test(ca_polar_scl test_ca_polar_scl)
INSTALL(TARGETS dtrm0_bg dtrm1_bg dtrm_glp_bg ca_polar_scl_bg DESTINATION ${CMAKE_SOURCE_DIR}/work)