-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (26 loc) · 1.13 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 3.2)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR})
set(MQF_INSTALL_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
set(MQF_INSTALL_BIN_DIR ${PROJECT_SOURCE_DIR}/bin)
set(MQF_INSTALL_LIB_DIR ${PROJECT_SOURCE_DIR}/lib)
include_directories(${MQF_INSTALL_INCLUDE_DIR})
## stxxl
# disallow in-source builds
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(SEND_ERROR "In-source builds are not allowed.")
endif("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
# enable warnings (always good)
set(CMAKE_CXX_FLAGS "-fPIC -Wall ${PROFILE} ${OPT} -m64 -Wno-unused-result -Wno-strict-aliasing -Wno-unused-function -fopenmp -fpermissive")
add_definitions(${CMAKE_CXX_FLAGS})
# include the STXXL library in my-project
add_subdirectory(ThirdParty/stxxl)
# apply STXXL CXXFLAGS to our configuration
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STXXL_CXX_FLAGS}")
# add STXXL includes path
include_directories(${STXXL_INCLUDE_DIRS})
add_subdirectory(src)
add_subdirectory(bin)
enable_testing()
add_subdirectory(tests)