-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (29 loc) · 941 Bytes
/
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
cmake_minimum_required(VERSION 2.8)
project(UMinTL)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
# User options
option(BUILD_EXAMPLES "Build the examples" ON)
option(BUILD_TESTING "Build the tests " ON)
# Includes
include_directories(BEFORE ${PROJECT_SOURCE_DIR})
# Add visibility of headers
# Necessary for Qt-Creator usage.
################
file( GLOB_RECURSE MAKE_HEADERS_VISIBLE_SRC
*.hpp *.h)
add_custom_target( MAKE_HEADERS_VISIBLE SOURCES ${MAKE_HEADERS_VISIBLE_SRC} )
#Set Warning level
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
set(CMAKE_CXX_FLAGS_RELEASE "-fopenmp -msse4 -O3 -DNDEBUG")
#set(CMAKE_BUILD_TYPE Release)
find_package(OpenBlas QUIET REQUIRED)
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if(BUILD_TESTING)
INCLUDE(CTest)
add_subdirectory(tests)
endif()