-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (51 loc) · 4.45 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
61
62
63
# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t
# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap:
cmake_minimum_required(VERSION 3.5)
# set up project and specify the minimum cmake version
project("ewoms-eclgrids" C CXX)
# find the build system (i.e., ewoms-common) and set cmake's module path
find_package(ewoms-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${ewoms-common_MODULE_PATH})
# include the eWoms cmake macros
include(EwomsMacros NO_POLICY_SCOPE)
# do most of the book-keeping required
ewoms_project()
# find the packages needed to compile the module
find_package(Boost OPTIONAL_COMPONENTS unit_test_framework REQUIRED)
# we want all features detected by the build system to be enabled,
# thank you!
dune_enable_all_packages()
# add source files from CMakeLists_files.cmake to
# library libewomsgrid.a and create executables
ewoms_recursive_add_library("ewomseclgrids" "ewoms/eclgrids")
# recursively mark all header files beneath the "ewoms" directory for
# installation.
ewoms_recusive_export_all_headers("ewoms")
# deal with the data required by the unit tests
ewoms_recusive_copy_testdata_to_builddir("tests/*.data" "tests/*.DATA")
ewoms_add_test(cartgrid SOURCES tests/test_cartgrid.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(cpgrid SOURCES tests/test_cpgrid.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(column_extract SOURCES tests/test_column_extract.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(distribution SOURCES tests/cpgrid/distribution_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(entityrep SOURCES tests/cpgrid/entityrep_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(entity SOURCES tests/cpgrid/entity_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(facetag SOURCES tests/cpgrid/facetag_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(geometry SOURCES tests/cpgrid/geometry_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(orientedentitytable SOURCES tests/cpgrid/orientedentitytable_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(partition_iterator SOURCES tests/cpgrid/partition_iterator_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(zoltan_test SOURCES tests/cpgrid/zoltan_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(geom2d SOURCES tests/test_geom2d.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(gridutilities SOURCES tests/test_gridutilities.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(minpvprocessor SOURCES tests/test_minpvprocessor.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(polyhedralgrid SOURCES tests/test_polyhedralgrid.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(p2pcommunicator SOURCES tests/p2pcommunicator_test.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(repairzcorn SOURCES tests/test_repairzcorn.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(sparsetable SOURCES tests/test_sparsetable.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(quadratures SOURCES tests/test_quadratures.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(compressed_cartesian_mapping SOURCES tests/test_compressed_cartesian_mapping.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(regionmapping SOURCES tests/test_regionmapping.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(ug SOURCES tests/test_ug.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_add_test(grid_nnc SOURCES tests/cpgrid/grid_nnc.cc CONDITION Boost_UNIT_TEST_FRAMEWORK_FOUND LIBRARIES "${Boost_LIBRARIES}")
ewoms_recusive_copy_testdata("tests/*.DATA" "tests/*.data")
# finalize the eWoms project, e.g. generating config.h etc.
finalize_ewoms_project()