-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
60 lines (49 loc) · 1.97 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cmake_minimum_required(VERSION 2.8.8)
project(pyfr-catalyst)
# Always use a full RPATH
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()
find_package(ParaView 4.1 REQUIRED COMPONENTS vtkPVCatalyst vtkPVVTKExtensionsDefault vtkPVClientServerCoreCore)
if(NOT PARAVIEW_USE_MPI)
message(SEND_ERROR "ParaView must be built with MPI enabled")
endif()
include("${PARAVIEW_USE_FILE}")
include(ParaViewPlugins)
set(CLIENT_OR_SERVER "Client" CACHE STRING "Build libraries for client or server-side functinality.")
set_property(CACHE CLIENT_OR_SERVER PROPERTY STRINGS "Client" "Server")
if(${CLIENT_OR_SERVER} STREQUAL Client)
set (BuildClientLibs TRUE CACHE INTERNAL "Build client-side libraries")
set (BuildServerLibs FALSE CACHE INTERNAL "Build server-side libraries")
endif()
if(${CLIENT_OR_SERVER} STREQUAL Server)
set (BuildServerLibs TRUE CACHE INTERNAL "Build server-side libraries")
set (BuildClientLibs FALSE CACHE INTERNAL "Build client-side libraries")
endif()
if (BuildServerLibs)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
find_package(VTKm REQUIRED)
include(VTKmMacros)
vtkm_configure_device(Serial REQUIRED)
vtkm_configure_device(Cuda REQUIRED)
find_package(BoostHeaders ${VTKm_REQUIRED_BOOST_VERSION} REQUIRED)
include_directories(${Boost_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
set(fpList "float;double" CACHE INTERNAL "fpList")
set(libSuffix_float fp32 CACHE INTERNAL "float suffix")
set(libSuffix_double fp64 CACHE INTERNAL "double suffix")
add_subdirectory(Data)
endif()
if (BuildClientLibs)
add_subdirectory(Macros)
endif()
add_subdirectory(Source)