-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
92 lines (80 loc) · 2.82 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
cmake_minimum_required(VERSION 3.5.0)
project(ANA2 VERSION 2.0.0 LANGUAGES CXX)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(cmake/colors.cmake)
add_executable(ANA2 "")
target_sources(ANA2
PRIVATE
src/Cavity.cpp
src/CGALUtils.cpp
src/ConvexHull.cpp
src/ConvexHullFunctions.cpp
src/main.cpp
src/MD.cpp
src/Modes.cpp
src/Molecule.cpp
src/NDD.cpp
src/NDDUtils.cpp
src/PDB.cpp
src/PrimitivesUtils.cpp
src/ProgramOptions.cpp
src/Read.cpp
src/Static.cpp
src/TextUtils.cpp
src/Utils.cpp
src/Write.cpp
include/ANA/Cavity.hpp
include/ANA/CGALUtils.hpp
include/ANA/ConvexHullFunctions.hpp
include/ANA/ConvexHull.hpp
include/ANA/Includes.hpp
include/ANA/MD.hpp
include/ANA/Modes.hpp
include/ANA/Molecule.hpp
include/ANA/NDD.hpp
include/ANA/NDDUtils.hpp
include/ANA/Options.hpp
include/ANA/PDB.hpp
include/ANA/Primitives.hpp
include/ANA/PrimitivesUtils.hpp
include/ANA/ProgramOptions.hpp
include/ANA/Read.hpp
include/ANA/Static.hpp
include/ANA/TextUtils.hpp
include/ANA/Utils.hpp
include/ANA/Write.hpp
)
message("${Magenta}Trying to automatically locate CGAL, gmp and mpfr libraries.${ColourReset}")
find_package(CGAL CONFIG REQUIRED)
target_link_libraries(ANA2 PRIVATE CGAL)
target_link_libraries(ANA2 PRIVATE gmp)
target_link_libraries(ANA2 PRIVATE mpfr)
message("${Magenta}Trying to automatically locate Boost.${ColourReset}")
find_package(Boost REQUIRED COMPONENTS program_options)
target_link_libraries(ANA2 PRIVATE boost_program_options)
message("${Magenta}Building own chemfiles library.${ColourReset}")
add_subdirectory(chemfiles EXCLUDE_FROM_ALL)
target_link_libraries(ANA2 PRIVATE chemfiles)
message("${Magenta}Using chemfiles's fmt header-only library.${ColourReset}")
include_directories(build/chemfiles/external/fmt)
target_include_directories(ANA2
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
#message("${Magenta}Including cotire for pre-compiled header.${ColourReset}")
#include(cotire)
#cotire(ANA2)
target_compile_options(ANA2 PRIVATE -Wall -Wextra -Wpedantic)
#target_compile_features(ANA2 PRIVATE cxx_std_17)
option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." ON)
if (${FORCE_COLORED_OUTPUT})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(ANA2 PRIVATE -fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(ANA2 PRIVATE -fcolor-diagnostics)
endif ()
endif ()