-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
43 lines (34 loc) · 870 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
42
43
cmake_minimum_required(VERSION 3.4)
project(fpie_core)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
# Get pybind11
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/pybind11)
include(cmake_modules/GitUtils.cmake)
git_clone(
PROJECT_NAME
pybind11
GIT_URL
https://github.com/pybind/pybind11.git
GIT_BRANCH
stable # To use stable version
# GIT_TAG ${PYBIND11_VERSION}
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR})
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pybind11)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/pybind11/include fpie/core)
add_subdirectory(fpie/core/gcc)
find_package(OpenMP)
if(OpenMP_FOUND)
add_subdirectory(fpie/core/openmp)
endif()
find_package(MPI)
if(MPI_FOUND)
add_subdirectory(fpie/core/mpi)
endif()
find_package(CUDA)
if(CUDA_FOUND)
add_subdirectory(fpie/core/cuda)
endif()