forked from Wolff09/plankton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (38 loc) · 1.38 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
48
49
project(krill CXX)
set(TOOL_NAME plankton)
# built requirements
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# set default release type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif(NOT CMAKE_BUILD_TYPE)
# force debug mode
# set(CMAKE_BUILD_TYPE Debug)
# set(CMAKE_VERBOSE_MAKEFILE ON)
# be verbose in debug mode
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLE_DEBUG_PRINTING")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLE_TIMER")
# configure compiler
add_definitions(-fno-strict-aliasing)
add_definitions(-Wall -Wextra)
add_definitions(-fshow-column)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# installation folder
if (NOT INSTALL_FOLDER)
set(INSTALL_FOLDER krill)
endif()
# includes
include_directories(include)
# sources/executables
add_subdirectory(src)
# installation
install(PROGRAMS scripts/mk_latex.py DESTINATION ${INSTALL_FOLDER})
install(PROGRAMS scripts/mk_graphs.sh DESTINATION ${INSTALL_FOLDER})
install(PROGRAMS scripts/mk_footprints.sh DESTINATION ${INSTALL_FOLDER})
install(PROGRAMS scripts/mk_pdf.sh DESTINATION ${INSTALL_FOLDER})
install(PROGRAMS scripts/eval.sh DESTINATION ${INSTALL_FOLDER})
install(DIRECTORY examples/programs DESTINATION ${INSTALL_FOLDER})
install(DIRECTORY examples/graphs DESTINATION ${INSTALL_FOLDER})