File: CMakeLists.txt

package info (click to toggle)
dolfin 2018.1.0.post1-16
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,764 kB
  • sloc: xml: 104,040; cpp: 98,856; python: 22,511; makefile: 204; sh: 182
file content (37 lines) | stat: -rw-r--r-- 1,420 bytes parent folder | download | duplicates (2)
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
cmake_minimum_required(VERSION 3.5)
project(dolfin-tests)

find_package(DOLFIN REQUIRED)
include(${DOLFIN_USE_FILE})

# Prepare "Catch" library for other executables
set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/catch)

add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})

# Make test executable
set(TEST_SOURCES
  ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/common/SubSystemsManager.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/function/Expression.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/geometry/ConvexTriangulation.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/geometry/IntersectionConstruction.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/io/XMLMeshData.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/io/XMLMeshValueCollection.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/la/LinearOperator.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/la/Vector.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/mesh/Mesh.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/mesh/MeshColoring.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/mesh/MeshFunction.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/mesh/MeshValueCollection.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/mesh/MultiMesh.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/parameter/Parameters.cpp
  )

add_executable(unittests ${TEST_SOURCES})
target_link_libraries(unittests PRIVATE Catch dolfin)
target_include_directories(unittests PRIVATE ${DOLFIN_SOURCE_DIR} ${DOLFIN_SOURCE_DIR}/dolfin ${DOLFIN_BINARY_DIR})

# Test target
add_test(unittests unittests)