-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
37 lines (30 loc) · 1.11 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
PROJECT(vec2dic)
SET(vec2dic_VERSION_MAJOR 0)
SET(vec2dic_VERSION_MINOR 1)
FIND_PACKAGE(Armadillo)
FIND_PACKAGE(Doxygen QUIET)
IF(DOXYGEN_FOUND)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
ADD_CUSTOM_TARGET(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
ENDIF(DOXYGEN_FOUND)
ADD_DEFINITIONS(-Wall -Wextra -fopenmp -funroll-loops #
-march=native -funroll-loops -Ofast)
# specify output directory
SET(EXECUTABLE_OUTPUT_PATH bin)
SET(V2D_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/vec2dic
CACHE FILEPATH "Default directory containing vec2dic source files.")
# define targets
## vec2dic
FILE(GLOB V2D_SOURCES
"${V2D_SRC_DIR}/*.h"
"${V2D_SRC_DIR}/*.cpp"
)
ADD_EXECUTABLE(vec2dic ${V2D_SOURCES})
TARGET_INCLUDE_DIRECTORIES(vec2dic PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
TARGET_LINK_LIBRARIES(vec2dic ${ARMADILLO_LIBRARIES})
SET_TARGET_PROPERTIES(vec2dic PROPERTIES COMPILE_FLAGS "-std=c++11")