CMakeLists.txt 1.29 KB
Newer Older
1
#------------------------------------------------------------------------------
2
cmake_minimum_required(VERSION 2.8)
3
cmake_policy(SET CMP0002 NEW)   # Policy CMP0002 required for for cmake >= 3
4

5
# Fail if not building out-of-source
6 7
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
    message(FATAL_ERROR
8
        "In-source builds disallowed. Use a separate build directory")
9 10
endif()

11 12
include(CMakeLists-OpenFOAM.txt)

13 14 15
#------------------------------------------------------------------------------
# Simple sanity checks

16 17
if (EXISTS "$ENV{ParaView_DIR}")
    find_package(ParaView REQUIRED COMPONENTS vtkPVPythonCatalyst)
18
else()
19
    message(FATAL_ERROR "ParaView_DIR not set")
20
endif()
21 22


23 24 25 26 27 28 29 30 31
#-----------------------------------------------------------------------------
# All messages

message("================")
message("Using OpenFOAM = $ENV{WM_PROJECT_DIR}")
message("Using ParaView = $ENV{ParaView_DIR}")
if (NOT PARAVIEW_USE_MPI)
    message(WARNING "==== Recommended to build using ParaView Catalyst with MPI ====")
endif()
32
message("install prefix = ${CMAKE_INSTALL_PREFIX}")
33 34 35 36 37
message("================")


#-----------------------------------------------------------------------------

38
include(CMakeLists-Catalyst.txt)
39 40

#-----------------------------------------------------------------------------