forked from atsmith3/mcpat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (25 loc) · 904 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
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "Create a separate build directory")
endif()
cmake_minimum_required (VERSION 3.12)
project(mcpat DESCRIPTION "Power Timing Area Calculator"
LANGUAGES CXX)
find_package(Boost 1.56 REQUIRED COMPONENTS
program_options
serialization)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set (MCPAT_VERSION_MAJOR 1)
set (MCPAT_VERSION_MINOR 3)
set (MCPAT_VERSION_PATCH 0)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function")
set(CMAKE_CXX_FLAGS_DEBUG "-g -ggdb -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_PROFILE "-O3 -pg -g")
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
add_definitions(-DNTHREADS=1)
add_subdirectory(src)