forked from EPFL-CS-472/mockturtle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (40 loc) · 1.33 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
cmake_minimum_required(VERSION 3.8)
project(mockturtle LANGUAGES CXX)
set(MOCKTURTLE_CXX_STANDARD "17" CACHE STRING "C++ standard")
set(CMAKE_CXX_STANDARD ${MOCKTURTLE_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Options
option(MOCKTURTLE_EXAMPLES "Build examples" ON)
option(MOCKTURTLE_TEST "Build tests" OFF)
option(MOCKTURTLE_EXPERIMENTS "Build experiments" OFF)
option(BILL_Z3 "Enable Z3 interface for bill library" OFF)
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" OFF)
option(ENABLE_MATPLOTLIB "Enable matplotlib library in experiments" OFF)
if(UNIX)
# show quite some warnings (but remove some intentionally)
include(CheckCXXCompilerFlag)
add_compile_options(-W -Wall -Wextra)
foreach (WARNING unknown-pragmas gnu-anonymous-struct nested-anon-types)
check_cxx_compiler_flag("-Wno-${WARNING}" HAS_WNO_${WARNING})
if (HAS_WNO_${WARNING})
add_compile_options(-Wno-${WARNING})
endif()
endforeach()
if (ENABLE_COVERAGE)
add_compile_options(-O0 -g --coverage -fprofile-arcs -ftest-coverage)
endif()
endif()
if(MSVC)
add_compile_options(/EHsc /bigobj)
endif()
add_subdirectory(include)
add_subdirectory(lib)
if(MOCKTURTLE_EXAMPLES)
add_subdirectory(examples)
endif()
if(MOCKTURTLE_TEST)
add_subdirectory(test)
endif()
if(MOCKTURTLE_EXPERIMENTS)
add_subdirectory(experiments)
endif()