-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
44 lines (33 loc) · 1.12 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
cmake_minimum_required (VERSION 2.6)
project(examples)
set (PROJECT_NAME examples)
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
# The version number.
set (VERSION_MAJOR 0)
set (VERSION_MINOR 1)
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-write-strings")
set(CMAKE_CXX_FLAGS_DEBUG "-g -fno-inline")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
include_directories(
"include"
)
set(ROSENBROCK_BINARY "rosenbrock")
set(ROSENBROCK_SOURCES "example/rosenbrock.cpp")
set(EVALUATION_BINARY "evaluation")
set(EVALUATION_SOURCES "example/evaluation.cpp")
ADD_LIBRARY(
pao
src/Optimizer.cpp
src/ParticleSwarmOptimization.cpp
README.md
)
# Add step to update README.md with contents from Optimizer.h
ADD_CUSTOM_COMMAND(OUTPUT "README.md"
COMMAND sed -e '/END OF DOCUMENTATION/,$$d' include/Optimizer.h | tail -n +2 > README.md
MAIN_DEPENDENCY "../include/Optimizer.h"
WORKING_DIRECTORY ..)
# add the executables
add_executable(${ROSENBROCK_BINARY} ${ROSENBROCK_SOURCES})
target_link_libraries( ${ROSENBROCK_BINARY} pao pthread rt)
add_executable(${EVALUATION_BINARY} ${EVALUATION_SOURCES})
target_link_libraries( ${EVALUATION_BINARY} pao pthread rt)