-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
34 lines (27 loc) · 1.09 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
cmake_minimum_required(VERSION 3.0.0)
project(test VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
# add_definitions("-Wno-invalid-source-encoding")
add_definitions("-O2")
set(UNIX_OS true)
SET(TARGET_OS_NAME "linux")
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions("-Wno-invalid-source-encoding")
add_definitions("-Os")
set(CMAKE_OSX_SYSROOT "/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk")
set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")
include_directories(${CMAKE_OSX_SYSROOT}/usr/include)
# https://stackoverflow.com/questions/69803659/what-is-the-proper-way-to-build-for-macos-x86-64-using-cmake-on-apple-m1-arm
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(UNIX_OS true)
SET(TARGET_OS_NAME "osx")
else ()
message(FATAL_ERROR "unknown CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}")
endif ()
add_subdirectory(aes)
add_subdirectory(mbedtls/crypt_and_hash)
add_subdirectory(mbedtls/padding)
#add_subdirectory(barrier)
add_subdirectory(barrier_cpp11)
add_subdirectory(acl/timer)