-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.3 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.2)
project(susa)
enable_testing()
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif(APPLE)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic")
option(CODE_COVERAGE "Enable coverage reporting" OFF)
if(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# Add required flags (GCC & LLVM/Clang)
add_compile_options(
-O0 # no optimization
-g # generate debug info
--coverage # sets all required flags
)
link_libraries(--coverage)
endif(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
include_directories (inc)
set (SRC_FILES src/rng.cpp
src/mt.cpp
src/base.cpp
src/ccode.cpp
src/matrix.cpp
src/modulation.cpp
src/rrcosine.cpp
src/svd.cpp
src/utility.cpp)
add_library (susa SHARED ${SRC_FILES})
option(EXAMPLES "Enable examples build" ON)
if (EXAMPLES)
add_subdirectory (examples)
endif(EXAMPLES)
add_subdirectory (test)
install (TARGETS susa
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install (DIRECTORY inc/
DESTINATION include
FILES_MATCHING PATTERN "*.h")