-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathCMakeLists.txt
56 lines (38 loc) · 1.55 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
56
cmake_minimum_required (VERSION 3.18)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)
project(cryptoTools VERSION 1.10.1)
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
############################################
# If top level cmake #
############################################
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
message("Please consider updating CMake to 3.12+")
endif()
# Set a default build type for single-configuration
# CMake generators if no build type is set.
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
endif()
if(MSVC)
else()
# Select flags.
set(CMAKE_C_FLAGS "-Wall -Wfatal-errors")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -O2 -g -ggdb")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb")
endif()
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
endif()
#############################################
# cryptoTools, tests, frontend #
#############################################
include("${CMAKE_CURRENT_LIST_DIR}/cmake/cryptoToolsBuildOptions.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cmake/cryptoToolsDepHelper.cmake")
add_subdirectory(cryptoTools)
add_subdirectory(tests_cryptoTools)
add_subdirectory(frontend_cryptoTools)
configure_file(cryptoTools/Common/config.h.in "cryptoTools/Common/config.h" )
include("cmake/install.cmake")