-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
41 lines (33 loc) · 955 Bytes
/
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
cmake_minimum_required(VERSION 3.5)
project(NFGrapher)
set(CMAKE_CXX_STANDARD 11)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} \
-Wno-deprecated-declarations \
-Wno-unused-local-typedefs")
if(LLVM_STDLIB)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-Wno-tautological-undefined-compare \
-Wno-shorten-64-to-32 \
-stdlib=libc++ \
-std=c++11")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
# Set CMAKE_BUILD_TYPE before calling project()
# Use existing cache string if present
if(DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING
"Choose the type of build: None, Debug, or Release"
FORCE)
else()
set(CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build: None, Debug, or Release"
FORCE)
endif()
enable_testing(true) # Enables unit-testing.
add_subdirectory(cpp)