From 9a80334c4d5dd613eebfa55f123b0298ab44ba30 Mon Sep 17 00:00:00 2001 From: Tobias Leibner <tobias.leibner@googlemail.com> Date: Tue, 8 Oct 2019 11:41:46 +0200 Subject: [PATCH] [libraries] create single xt library, fix dependencies --- CMakeLists.txt | 9 +-------- cmake/modules/DuneXTTesting.cmake | 8 ++++---- dune/xt/common/CMakeLists.txt | 2 +- dune/xt/functions/CMakeLists.txt | 2 +- dune/xt/grid/CMakeLists.txt | 2 +- dune/xt/la/CMakeLists.txt | 2 +- dune/xt/test/CMakeLists.txt | 2 +- 7 files changed, 10 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7bd14193..0198ee816 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,14 +58,7 @@ execute_process(COMMAND ${CMAKE_SOURCE_DIR}/getRevision.sh ERROR_VARIABLE shell_error OUTPUT_STRIP_TRAILING_WHITESPACE) -dune_enable_all_packages(INCLUDE_DIRS - ${dune-xt-common_SOURCE_DIR}/dune - MODULE_LIBRARIES - dunextcommon - dunextgrid - dunextfunctions - dunextla - gtest_dune_xt_common) +dune_enable_all_packages(INCLUDE_DIRS ${dune-xt-common_SOURCE_DIR}/dune MODULE_LIBRARIES gtest_dune_xt dunext) include(DunePybindxiInstallPythonPackage) # this symlinks all files in python/ to the binary dir and install into the virtualenv from there thereby making the diff --git a/cmake/modules/DuneXTTesting.cmake b/cmake/modules/DuneXTTesting.cmake index e0a151610..8a2a44acb 100644 --- a/cmake/modules/DuneXTTesting.cmake +++ b/cmake/modules/DuneXTTesting.cmake @@ -57,7 +57,7 @@ macro(get_headercheck_targets subdir) endmacro(get_headercheck_targets) macro(add_subdir_tests subdir) - set(link_xt_libs dunextgrid dunextcommon dunextla) + set(link_xt_libs dunext) list(APPEND dxt_test_dirs ${subdir}) file(GLOB_RECURSE test_sources "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/*.cc") foreach(source ${test_sources}) @@ -87,7 +87,7 @@ macro(add_subdir_tests subdir) dune_xt_execute.py ${DEBUG_MACRO_TESTS}) foreach(target ${targetlist_${testbase}}) - target_link_libraries(${target} ${link_xt_libs} ${COMMON_LIBS} ${GRID_LIBS} gtest_dune_xt_common) + target_link_libraries(${target} ${link_xt_libs} ${COMMON_LIBS} ${GRID_LIBS} gtest_dune_xt) list(APPEND ${subdir}_dxt_test_binaries ${target}) set(dxt_test_names_${target} ${testlist_${testbase}_${target}}) endforeach(target) @@ -105,7 +105,7 @@ macro(add_subdir_tests subdir) ${link_xt_libs} ${COMMON_LIBS} ${GRID_LIBS} - gtest_dune_xt_common + gtest_dune_xt COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env CMD_ARGS @@ -195,7 +195,7 @@ macro(add_subdir_tests subdir) ${link_xt_libs} ${COMMON_LIBS} ${GRID_LIBS} - gtest_dune_xt_common + gtest_dune_xt COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env CMD_ARGS diff --git a/dune/xt/common/CMakeLists.txt b/dune/xt/common/CMakeLists.txt index 79d87bf18..83b7f4662 100644 --- a/dune/xt/common/CMakeLists.txt +++ b/dune/xt/common/CMakeLists.txt @@ -37,6 +37,6 @@ set(lib_dune_xt_common_sources timedlogging.cc timings.cc) -dune_library_add_sources(dunextcommon SOURCES ${lib_dune_xt_common_sources}) +dune_library_add_sources(dunext SOURCES ${lib_dune_xt_common_sources}) add_analyze(${lib_dune_xt_common_sources}) diff --git a/dune/xt/functions/CMakeLists.txt b/dune/xt/functions/CMakeLists.txt index 6965afcb7..e2bea24be 100644 --- a/dune/xt/functions/CMakeLists.txt +++ b/dune/xt/functions/CMakeLists.txt @@ -13,4 +13,4 @@ # ~~~ set(lib_dune_xt_functions_sources expression/mathexpr.cc) -dune_library_add_sources(dunextfunctions SOURCES ${lib_dune_xt_functions_sources}) +dune_library_add_sources(dunext SOURCES ${lib_dune_xt_functions_sources}) diff --git a/dune/xt/grid/CMakeLists.txt b/dune/xt/grid/CMakeLists.txt index 0c0300dfc..f02bd388b 100644 --- a/dune/xt/grid/CMakeLists.txt +++ b/dune/xt/grid/CMakeLists.txt @@ -28,5 +28,5 @@ if(DUNE_XT_WITH_PYTHON_BINDINGS) walker.lib/yasp_2d_equidistant_offset.cc walker.lib/yasp_3d_equidistant_offset.cc) endif() -dune_library_add_sources(dunextgrid SOURCES ${lib_dune_xt_grid_sources}) +dune_library_add_sources(dunext SOURCES ${lib_dune_xt_grid_sources}) add_dune_alberta_flags(GRIDDIM 1 SOURCE_ONLY dunextgrid) diff --git a/dune/xt/la/CMakeLists.txt b/dune/xt/la/CMakeLists.txt index d636eaefa..9c810bef2 100644 --- a/dune/xt/la/CMakeLists.txt +++ b/dune/xt/la/CMakeLists.txt @@ -25,4 +25,4 @@ if(DUNE_XT_WITH_PYTHON_BINDINGS) endif() find_package(LAPACKE) -dune_library_add_sources(dunextla SOURCES ${lib_dune_xt_la_sources}) +dune_library_add_sources(dunext SOURCES ${lib_dune_xt_la_sources}) diff --git a/dune/xt/test/CMakeLists.txt b/dune/xt/test/CMakeLists.txt index 67ebe8867..55000ca77 100644 --- a/dune/xt/test/CMakeLists.txt +++ b/dune/xt/test/CMakeLists.txt @@ -16,7 +16,7 @@ enable_testing() dependencycheck(${xtcommon}) include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/gtest) -dune_library_add_sources(gtest_dune_xt_common SOURCES common.cxx gtest/gtest-all.cxx) +dune_library_add_sources(gtest_dune_xt SOURCES common.cxx gtest/gtest-all.cxx) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/gtest DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/xt/test/ -- GitLab