-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (48 loc) · 1.76 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
50
51
52
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.10.0)
project(PATO
VERSION 1.0.1
DESCRIPTION "high PerformAnce TriplexatOr"
HOMEPAGE_URL "https://github.com/UDC-GAC/PATO"
LANGUAGES CXX)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CheckIPOSupported)
check_ipo_supported(RESULT IS_IPO_SUPPORTED LANGUAGES CXX)
if(IS_IPO_SUPPORTED)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
endif()
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
option(PATO_ENABLE_OPENMP "Enable OpenMP" ON)
set(PATO_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(PATO_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${PATO_SOURCE_DIR}/include ${PATO_BINARY_DIR}/include)
add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(tools)
include(GNUInstallDirs)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/README.md
DESTINATION
${CMAKE_INSTALL_DOCDIR})
install(TARGETS PATO RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_VENDOR "Iñaki Amatria Barral")
set(CPACK_PACKAGE_CONTACT "i.amatria@udc.es")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION})
set(CPACK_PACKAGE_HOMEPAGE_URL ${PROJECT_HOMEPAGE_URL})
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME})
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
set(CPACK_PACKAGE_FILE_NAME
${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME})
include(CPack)