forked from rodrigofaccioli/2pg_cartesian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
182 lines (155 loc) · 8.25 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
cmake_minimum_required(VERSION 2.8)
# project Information
project(2pg_cartesian)
set(PROJECT_VERSION "1.0")
# Compiler specific settings:
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_definitions (-D__const=const)
add_definitions (-Dsnprintf=_snprintf)
add_definitions (-Dgetpid=_getpid)
add_definitions (-Dgetcwd=_getcwd)
add_definitions (-Disnan=_isnan)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _CRT_SECURE_NO_WARNINGS")
endif ()
# Set compiler flags
SET ( CMAKE_CXX_FLAGS "-lm -pedantic")
#Set CXX compiler for all files below
set_source_files_properties(include/LoadConfig.h PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-NSGA2.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Dominance.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Sort_Method_by_Front_Dominance.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-MC_Metropolis.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Mono.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Random_Algorithm.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Sort_Method_Files_by_Front_Dominance.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/LoadConfig.cpp PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/ea_mono.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/topology.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/pdbio.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protein.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/futil.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/pdbatom.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/messages.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/topologyio.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/topologylib.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/randomlib.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/vector_math.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/string_owner.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/math_owner.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/osutil.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/load_parameters.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/objective.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/aminoacids.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/aminoacids_io.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/populationio.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/rotation.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/solution.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/gromacs_objectives.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/solutionio.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/algorithms.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/ea_nsga2.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/dominance.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/owner_file_analysis.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/mc_metropolis.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/random_algorithm.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/diehdral.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Front.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Test_crossover.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Test_compute_Diehdral.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Test_rotation.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Test_load_population.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Test_compute_objetivies.c PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/protpred-Gromacs-Test_random_number
.c PROPERTIES LANGUAGE CXX )
# set include
include_directories(include)
# add libries
add_library(2PG_lib STATIC
src/LoadConfig.cpp
src/ea_mono.c
src/topology.c
src/pdbio.c
src/protein.c
src/futil.c
src/pdbatom.c
src/messages.c
src/topologyio.c
src/topologylib.c
src/randomlib.c
src/vector_math.c
src/string_owner.c
src/math_owner.c
src/osutil.c
src/load_parameters.c
src/objective.c
src/aminoacids.c
src/aminoacids_io.c
src/populationio.c
src/rotation.c
src/solution.c
src/gromacs_objectives.c
src/solutionio.c
src/algorithms.c
src/ea_nsga2.c
src/dominance.c
src/owner_file_analysis.c
src/mc_metropolis.c
src/random_algorithm.c
src/diehdral.c
) #end of 2PG_lib
# add target
add_executable(protpred-Gromacs-NSGA2 src/protpred-Gromacs-NSGA2.c)
target_link_libraries(protpred-Gromacs-NSGA2 2PG_lib)
add_executable(protpred-Gromacs-Dominance src/protpred-Gromacs-Dominance.c)
target_link_libraries(protpred-Gromacs-Dominance 2PG_lib)
add_executable(protpred-Gromacs-Front src/protpred-Gromacs-Front.c)
target_link_libraries(protpred-Gromacs-Front 2PG_lib)
add_executable(protpred-Gromacs-Sort_Method_by_Front_Dominance src/protpred-Gromacs-Sort_Method_by_Front_Dominance.c)
target_link_libraries(protpred-Gromacs-Sort_Method_by_Front_Dominance 2PG_lib)
add_executable(protpred-Gromacs-MC_Metropolis src/protpred-Gromacs-MC_Metropolis.c)
target_link_libraries(protpred-Gromacs-MC_Metropolis 2PG_lib)
add_executable(protpred-Gromacs-Mono src/protpred-Gromacs-Mono.c)
target_link_libraries(protpred-Gromacs-Mono 2PG_lib)
add_executable(protpred-Gromacs-Random_Algorithm src/protpred-Gromacs-Random_Algorithm.c)
target_link_libraries(protpred-Gromacs-Random_Algorithm 2PG_lib)
add_executable(protpred-Gromacs-Sort_Method_Files_by_Front_Dominance src/protpred-Gromacs-Sort_Method_Files_by_Front_Dominance.c)
target_link_libraries(protpred-Gromacs-Sort_Method_Files_by_Front_Dominance 2PG_lib)
add_executable(protpred-Gromacs-Test_crossover src/protpred-Gromacs-Test_crossover.c)
target_link_libraries(protpred-Gromacs-Test_crossover 2PG_lib)
add_executable(protpred-Gromacs-Test_compute_Diehdral src/protpred-Gromacs-Test_compute_Diehdral.c)
target_link_libraries(protpred-Gromacs-Test_compute_Diehdral 2PG_lib)
add_executable(protpred-Gromacs-Test_rotation src/protpred-Gromacs-Test_rotation.c)
target_link_libraries(protpred-Gromacs-Test_rotation 2PG_lib)
add_executable(protpred-Gromacs-Test_load_population src/protpred-Gromacs-Test_load_population.c)
target_link_libraries(protpred-Gromacs-Test_load_population 2PG_lib)
add_executable(protpred-Gromacs-Test_compute_objetivies src/protpred-Gromacs-Test_compute_objetivies.c)
target_link_libraries(protpred-Gromacs-Test_compute_objetivies 2PG_lib)
add_executable(protpred-Gromacs-Test_random_number src/protpred-Gromacs-Test_random_number.c)
target_link_libraries(protpred-Gromacs-Test_random_number 2PG_lib)
# install
install(TARGETS protpred-Gromacs-NSGA2 DESTINATION bin)
install(TARGETS protpred-Gromacs-Dominance DESTINATION bin)
install(TARGETS protpred-Gromacs-Front DESTINATION bin)
install(TARGETS protpred-Gromacs-MC_Metropolis DESTINATION bin)
install(TARGETS protpred-Gromacs-Mono DESTINATION bin)
install(TARGETS protpred-Gromacs-Random_Algorithm DESTINATION bin)
install(TARGETS protpred-Gromacs-Sort_Method_Files_by_Front_Dominance DESTINATION bin)
install(TARGETS protpred-Gromacs-Sort_Method_by_Front_Dominance DESTINATION bin)
install(TARGETS protpred-Gromacs-Test_crossover DESTINATION bin)
install(TARGETS protpred-Gromacs-Test_compute_Diehdral DESTINATION bin)
install(TARGETS protpred-Gromacs-Test_rotation DESTINATION bin)
install(TARGETS protpred-Gromacs-Test_load_population DESTINATION bin)
install(TARGETS protpred-Gromacs-Test_compute_objetivies DESTINATION bin)
install(TARGETS protpred-Gromacs-Test_random_number DESTINATION bin)
#Coping script directory
install(DIRECTORY scripts/ DESTINATION scripts
PATTERN "scripts/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
)#End of Coping script directory
#Coping test directory
install(DIRECTORY test/ DESTINATION test
PATTERN "test/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
)#End of Coping test directory