-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
53 lines (42 loc) · 1022 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
53 lines (42 loc) · 1022 Bytes
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
cmake_minimum_required(VERSION 3.10)
project(csnip
VERSION 0.5
LANGUAGES C
)
# Add module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
# Find threading library and enable thread safety if applicable
find_package(Threads)
if (Threads_FOUND)
set(_dflt_support_threading ON)
else()
set(_dflt_support_threading OFF)
endif()
option(SUPPORT_THREADING
"Make some modules multithreading safe"
${_dflt_support_threading})
include(EnableWarnings)
include(CxxSetup)
include(DoxySetup)
include(InstallSetup)
include(BuildDirSetup)
# Disable MSVC secure/nonstdc warnings.
if (MSVC)
add_compile_definitions(
_CRT_NONSTDC_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS
)
else ()
set(LINK_LIBM m)
endif ()
enable_testing()
#set(CMAKE_C_VISIBILITY_PRESET hidden)
#### Subdirectories
add_subdirectory(examples)
add_subdirectory(in)
add_subdirectory(src)
add_subdirectory(test)
# doc/ comes last as Doxygen will need to know the complete other
# targets.
add_subdirectory(doc)
include(Packaging)