/usr/share/dolfin/cmake/UseDOLFIN.cmake is in libdolfin-dev 2017.2.0.post0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 61 62 63 64 65 | #
# This file sets up include directories, link directories, and
# compiler settings for a project to use DOLFIN. It should not be
# included directly, but rather through the DOLFIN_USE_FILE setting
# obtained from DOLFINConfig.cmake.
#
if (NOT DOLFIN_USE_FILE_INCLUDED)
set(DOLFIN_USE_FILE_INCLUDED 1)
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()
# Require and use C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Add DOLFIN-installed FindFoo.cmake files to path
list(APPEND CMAKE_MODULE_PATH "/usr/share/dolfin/cmake")
# Check for Boost
set(BOOST_ROOT $ENV{BOOST_DIR} $ENV{BOOST_HOME})
if (BOOST_ROOT)
set(Boost_NO_SYSTEM_PATHS on)
endif()
# Prevent FindBoost.cmake from looking for system Boost{foo}.cmake
# files
set(Boost_NO_BOOST_CMAKE true)
set(Boost_USE_MULTITHREADED $ENV{BOOST_USE_MULTITHREADED})
find_package(Boost 1.48 QUIET REQUIRED COMPONENTS
timer)
if (TRUE)
if (NOT PETSC::petsc)
set(DOLFIN_SKIP_BUILD_TESTS TRUE)
list(APPEND CMAKE_MODULE_PATH "/usr/share/dolfin/cmake")
find_package(PETSc REQUIRED QUIET)
endif()
endif()
if (TRUE)
if (NOT SLEPC::slepc)
set(DOLFIN_SKIP_BUILD_TESTS TRUE)
find_package(SLEPc REQUIRED QUIET)
endif()
endif()
# Add compiler definitions needed to use DOLFIN
add_definitions(${DOLFIN_CXX_DEFINITIONS})
# Add compiler flags needed to use DOLFIN
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DOLFIN_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${DOLFIN_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${DOLFIN_LINK_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${DOLFIN_LINK_FLAGS}")
# Add include directories needed to use DOLFIN
include_directories(${DOLFIN_INCLUDE_DIRS})
include_directories(SYSTEM ${DOLFIN_3RD_PARTY_INCLUDE_DIRS})
endif()
|