forked from fuulish/surf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (28 loc) · 843 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.6)
cmake_policy(SET CMP0012 NEW)
project (surf)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include(FindOptionalPackage)
include(FindOptionalPkgPackage)
find_optional_package(OpenMP)
if (NOT DISABLE_OPENMP AND OPENMP_FOUND)
add_definitions(-DOPENMP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
endif()
find_optional_package(GSL)
if (NOT DISABLE_GSL AND GSL_FOUND)
add_definitions(-DHAVE_GSL)
endif()
find_package(PkgConfig REQUIRED)
find_optional_pkg_package(NLOPT)
if (NOT DISABLE_NLOPT AND NLOPT_FOUND)
add_definitions(-DHAVE_NLOPT)
endif()
find_optional_pkg_package(EINSPLINE)
if (NOT DISABLE_EINSPLINE AND EINSPLINE_FOUND)
add_definitions(-DHAVE_EINSPLINE)
endif()
add_subdirectory(src)