From ca0d258b0746bcb7cbe44c4a238dc9e2628b263c Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Dec 2022 11:53:43 -0700 Subject: [PATCH] Moertel: Remove usage of deprecated include_directories() (TriBITSPub/TriBITS#429) The deprecated TriBITS macro include_directories() now issues a CMake Deprecation warning. The fix is to use tribits_include_directories() instead and use raw CMake include_directories() where that is the behavior you want. --- CMakeLists.txt | 2 +- example/Hex3D/CMakeLists.txt | 2 +- example/TwoSquares/CMakeLists.txt | 2 +- morkon/src/CMakeLists.txt | 56 +++++++++++++++---------------- morkon/unit_tests/CMakeLists.txt | 54 ++++++++++++++--------------- src/mortar/CMakeLists.txt | 4 +-- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc80a899198..6a2be8f5bf9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,7 +180,7 @@ IF(HAVE_MOERTEL_SEACAS) # Make sure SEACAS is available (we use the exodus support in SEACAS for this option) - INCLUDE_DIRECTORIES(${SEACAS_INCLUDE_DIRS}) + TRIBITS_INCLUDE_DIRECTORIES(${SEACAS_INCLUDE_DIRS}) ENDIF() diff --git a/example/Hex3D/CMakeLists.txt b/example/Hex3D/CMakeLists.txt index 74b207022d4..6a4290a4c09 100644 --- a/example/Hex3D/CMakeLists.txt +++ b/example/Hex3D/CMakeLists.txt @@ -1,4 +1,4 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../) IF(HAVE_MOERTEL_MPI) diff --git a/example/TwoSquares/CMakeLists.txt b/example/TwoSquares/CMakeLists.txt index 2f9ec20bbda..8753484b046 100644 --- a/example/TwoSquares/CMakeLists.txt +++ b/example/TwoSquares/CMakeLists.txt @@ -1,6 +1,6 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../) IF(HAVE_MOERTEL_MPI) diff --git a/morkon/src/CMakeLists.txt b/morkon/src/CMakeLists.txt index 6ac5bf6405d..b6d35ebe613 100644 --- a/morkon/src/CMakeLists.txt +++ b/morkon/src/CMakeLists.txt @@ -1,37 +1,37 @@ # KokkosCore_config.h -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/kokkos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/kokkos/core/src) # TpetraKernels_config.h -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/kernels/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/core/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/NodeAPI) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/kernels/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/NodeAPI) # TeuchosCore_config.h -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/core/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscompat/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscomm/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscompat/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscomm/src) # Other Kokkos includes needed -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/core/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/containers/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/algorithms/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/containers/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/algorithms/src) # Other Tpetra includes needed -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src/impl) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src/kokkos_refactor) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/NodeAPI) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/LinAlg) - -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/core/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/parameterlist/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscompat/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/comm/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscomm/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/numerics/src) - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src/impl) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src/kokkos_refactor) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/NodeAPI) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/LinAlg) + +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/parameterlist/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscompat/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/comm/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscomm/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/numerics/src) + +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) SET(INCLUDES mrk_api_classes.hpp diff --git a/morkon/unit_tests/CMakeLists.txt b/morkon/unit_tests/CMakeLists.txt index 055e1978941..d15eacc55d1 100644 --- a/morkon/unit_tests/CMakeLists.txt +++ b/morkon/unit_tests/CMakeLists.txt @@ -1,39 +1,39 @@ # KokkosCore_config.h -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/kokkos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/kokkos/core/src) # TpetraKernels_config.h -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/kernels/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/core/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/NodeAPI) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/kernels/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/tpetra/classic/NodeAPI) # TeuchosCore_config.h -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/core/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscompat/src) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscomm/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscompat/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/packages/teuchos/kokkoscomm/src) # Other Kokkos includes needed -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/core/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/containers/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/algorithms/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/containers/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/kokkos/algorithms/src) # Other Tpetra includes needed -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src/impl) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src/kokkos_refactor) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/NodeAPI) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/LinAlg) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/kernels/src/impl) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/core/src/kokkos_refactor) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/NodeAPI) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/tpetra/classic/LinAlg) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/core/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/parameterlist/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscompat/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/comm/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscomm/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/numerics/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/core/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/parameterlist/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscompat/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/comm/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/kokkoscomm/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/teuchos/numerics/src) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/moertel/morkon/src) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/packages/moertel/morkon/src) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) SET(INCLUDES mrk_api_classes.hpp diff --git a/src/mortar/CMakeLists.txt b/src/mortar/CMakeLists.txt index 5ee92df4080..5266b2b29f4 100644 --- a/src/mortar/CMakeLists.txt +++ b/src/mortar/CMakeLists.txt @@ -17,7 +17,7 @@ TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h) SET(HEADERS "") SET(SOURCES "") -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) SET(HEADERS ${HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}_config.h @@ -27,7 +27,7 @@ SET(HEADERS ${HEADERS} # Core files # -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) APPEND_SET(HEADERS Moertel_Tolerances.hpp