-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (26 loc) · 789 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (26 loc) · 789 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
# minimum cmake version
cmake_minimum_required(VERSION 3.16)
# specify project name and version
project(MessageDigestAlgorithm
VERSION 1.0
LANGUAGES CXX)
# generate compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# global g++ compile flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
set(mdalib MessageDigest_debug)
set(mdatest testd)
else()
set(mdalib MessageDigest)
set(mdatest test)
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build/bin)
# MessageDigest.so
add_subdirectory(MessageDigestAlgorithm)
# MessageDigestTest
add_subdirectory(test)