Skip to content

Commit

Permalink
Merge 'trilinos/Trilinos:develop' (3fa0738) into 'tcad-charon/Trilino…
Browse files Browse the repository at this point in the history
…s:develop' (f7c3706).

* trilinos-develop:
  FindTPLNetcdf.cmake: Lower-case function names (TriBITSPub/TriBITS#274)
  FindTPLLAPACK.cmake: Lower-case function names (TriBITSPub/TriBITS#274)
  FindTPLBLAS.cmake: Lower-case function names (TriBITSPub/TriBITS#274)
  Isorropria: Unconditionally disable tests that depend on EpetraExt (trilinos#10534)
  Zoltan2: Use single value for FAIL_REGULAR_EXPRESSION (TriBITSPub/TriBITS#464)
  Zoltan2: Properly pass in list to FAIL_REGULAR_EXPRESSION (TriBITSPub/TriBITS#464)
  Sacado: Call target_include_directories() for new TriBITS (TriBITSPub/TriBITS#299)
  ATDM: Strip leading and trailing whitespace from flags for newer CMakes
  • Loading branch information
Charonops Jenkins Pipeline committed May 27, 2022
2 parents f7c3706 + 3fa0738 commit ca67152
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 47 deletions.
2 changes: 2 additions & 0 deletions cmake/std/atdm/ATDMDevEnvSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ ENDIF()
ATDM_SET_CACHE(CTEST_BUILD_FLAGS "-j$ENV{ATDM_CONFIG_BUILD_COUNT}" CACHE STRING)
SET(CMAKE_EXE_LINKER_FLAGS
"${EXTRA_EXTRA_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
string(STRIP "${CMAKE_EXE_LINKER_FLAGS}" CMAKE_EXE_LINKER_FLAGS)
SET(Trilinos_EXTRA_LINK_FLAGS
"${ATDM_EXTRA_LINK_FLAGS} ${EXTRA_EXTRA_LINK_FLAGS} ${Trilinos_EXTRA_LINK_FLAGS}")
string(STRIP "${Trilinos_EXTRA_LINK_FLAGS}" Trilinos_EXTRA_LINK_FLAGS)
ATDM_SET_CACHE(CMAKE_JOB_POOL_LINK "${ATDM_CMAKE_JOB_POOL_LINK}" CACHE STRING)
ATDM_SET_CACHE(Trilinos_PARALLEL_COMPILE_JOBS_LIMIT "${ATDM_PARALLEL_COMPILE_JOBS_LIMIT}"
CACHE STRING)
Expand Down
14 changes: 7 additions & 7 deletions cmake/tribits/common_tpls/FindTPLBLAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# @HEADER


IF (MSVC AND NOT
if (MSVC AND NOT
(BLAS_LIBRARY_DIRS OR
(NOT "${BLAS_LIBRARY_NAMES}" STREQUAL "blas blas_win32" AND
NOT "${BLAS_LIBRARY_NAMES}" STREQUAL "") OR
Expand All @@ -69,12 +69,12 @@ IF (MSVC AND NOT
# be called every configure or this does not work!
# If the user has specified alternate name or location of their blas that
# will be used instead.
FIND_PACKAGE(CLAPACK 3.2.1 NO_MODULE)
IF (CLAPACK_FOUND)
ADVANCED_SET(TPL_BLAS_LIBRARIES blas
find_package(CLAPACK 3.2.1 NO_MODULE)
if (CLAPACK_FOUND)
advanced_set(TPL_BLAS_LIBRARIES blas
CACHE FILEPATH "Set from MSVC CLAPACK specialization")
ENDIF()
ENDIF()
endif()
endif()

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( BLAS
tribits_tpl_find_include_dirs_and_libraries( BLAS
REQUIRED_LIBS_NAMES "blas blas_win32")
12 changes: 6 additions & 6 deletions cmake/tribits/common_tpls/FindTPLLAPACK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# @HEADER


IF (MSVC AND NOT
if (MSVC AND NOT
(LAPACK_LIBRARY_DIRS OR
(NOT "${LAPACK_LIBRARY_NAMES}" STREQUAL "lapack lapack_win32" AND
NOT "${LAPACK_LIBRARY_NAMES}" STREQUAL "") OR
Expand All @@ -64,11 +64,11 @@ IF (MSVC AND NOT
NOT "${TPL_LAPACK_LIBRARIES}" STREQUAL "") OR
TPL_LAPACK_INCLUDE_DIRS)
)
IF(CLAPACK_FOUND)
ADVANCED_SET(TPL_LAPACK_LIBRARIES lapack
if(CLAPACK_FOUND)
advanced_set(TPL_LAPACK_LIBRARIES lapack
CACHE FILEPATH "Set from MSVC CLAPACK specialization")
ENDIF()
ENDIF()
endif()
endif()

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( LAPACK
tribits_tpl_find_include_dirs_and_libraries( LAPACK
REQUIRED_LIBS_NAMES "lapack lapack_win32")
60 changes: 30 additions & 30 deletions cmake/tribits/common_tpls/FindTPLNetcdf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,38 @@

#
# First, set up the variables for the (backward-compatible) TriBITS way of
# finding Netcdf. These are used in case FIND_PACKAGE(NetCDF ...) is not
# finding Netcdf. These are used in case find_package(NetCDF ...) is not
# called or does not find NetCDF. Also, these variables need to be non-null
# in order to trigger the right behavior in the function
# TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES().
# tribits_tpl_find_include_dirs_and_libraries().
#

SET(REQUIRED_HEADERS netcdf.h)
SET(REQUIRED_LIBS_NAMES netcdf)
set(REQUIRED_HEADERS netcdf.h)
set(REQUIRED_LIBS_NAMES netcdf)

IF (TPL_ENABLE_MPI)
SET(REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES} pnetcdf)
ENDIF()
if (TPL_ENABLE_MPI)
set(REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES} pnetcdf)
endif()

#
# Second, search for Netcdf components (if allowed) using the standard
# FIND_PACKAGE(NetCDF ...).
# find_package(NetCDF ...).
#
TRIBITS_TPL_ALLOW_PRE_FIND_PACKAGE(Netcdf Netcdf_ALLOW_PREFIND)
IF (Netcdf_ALLOW_PREFIND)
tribits_tpl_allow_pre_find_package(Netcdf Netcdf_ALLOW_PREFIND)
if (Netcdf_ALLOW_PREFIND)

MESSAGE("-- Using FIND_PACKAGE(Netcdf ...) ...")
message("-- Using find_package(Netcdf ...) ...")

SET(CMAKE_MODULE_PATH
set(CMAKE_MODULE_PATH
"${CMAKE_MODULE_PATH}"
"${CMAKE_CURRENT_LIST_DIR}/find_modules"
"${CMAKE_CURRENT_LIST_DIR}/utils"
)

find_package(NetCDF)

IF (NetCDF_FOUND)
SET(DOCSTR "List of semi-colon separated paths to look for the TPL Netcdf")
if (NetCDF_FOUND)
set(DOCSTR "List of semi-colon separated paths to look for the TPL Netcdf")
set(TPL_Netcdf_Enables_Netcdf4 ${NetCDF_NEEDS_HDF5} CACHE BOOL
"True if netcdf enables netcdf-4")
set(TPL_Netcdf_Enables_PNetcdf ${NetCDF_NEEDS_PNetCDF} CACHE BOOL
Expand All @@ -83,32 +83,32 @@ IF (Netcdf_ALLOW_PREFIND)
"List of semi-colon seprated library names (not 'lib' or extension).")
set(TPL_Netcdf_INCLUDE_DIRS ${NetCDF_INCLUDE_DIRS} CACHE PATH
"${DOCSTR} header files.")
ENDIF()
ELSE()
endif()
else()
# Curl library is only required if DAP is enabled; should detect inside
# FindNetCDF.cmake, but that is not being called... SEMS has DAP enabled;
# many HPC systems don't, but they override these settings...
FIND_PROGRAM(NC_CONFIG "nc-config")
IF (NC_CONFIG)
EXECUTE_PROCESS(COMMAND "nc-config --has-dap2"
find_program(NC_CONFIG "nc-config")
if (NC_CONFIG)
execute_process(COMMAND "nc-config --has-dap2"
OUTPUT_VARIABLE NETCDF_HAS_DAP2)
EXECUTE_PROCESS(COMMAND "nc-config --has-dap4"
execute_process(COMMAND "nc-config --has-dap4"
OUTPUT_VARIABLE NETCDF_HAS_DAP4)
ENDIF()
IF ((NOT NC_CONFIG) OR NETCDF_HAS_DAP2 OR NETCDF_HAS_DAP4)
SET(REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES} curl)
ENDIF()
ENDIF()
endif()
if ((NOT NC_CONFIG) OR NETCDF_HAS_DAP2 OR NETCDF_HAS_DAP4)
set(REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES} curl)
endif()
endif()

#
# Third, call TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES()
# Third, call tribits_tpl_find_include_dirs_and_libraries()
#
TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Netcdf
tribits_tpl_find_include_dirs_and_libraries( Netcdf
REQUIRED_HEADERS ${REQUIRED_HEADERS}
REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES}
)
# NOTE: If FIND_PACKAGE(Netcdf ...) was called and successfully found Netcdf,
# then TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES() will use the already-set
# NOTE: If find_package(Netcdf ...) was called and successfully found Netcdf,
# then tribits_tpl_find_include_dirs_and_libraries() will use the already-set
# variables TPL_Netcdf_INCLUDE_DIRS and TPL_Netcdf_LIBRARIES and then print
# them out (and set some other standard variables as well). This is the final
# "hook" into the TriBITS TPL system.
Expand All @@ -117,7 +117,7 @@ TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Netcdf
# Need to determine how this is set in the library that is being used...

if ("${TPL_Netcdf_PARALLEL}" STREQUAL "")
ASSERT_DEFINED(TPL_Netcdf_INCLUDE_DIRS)
assert_defined(TPL_Netcdf_INCLUDE_DIRS)
find_path(meta_path
NAMES "netcdf_meta.h"
HINTS ${TPL_Netcdf_INCLUDE_DIRS}
Expand Down
2 changes: 1 addition & 1 deletion packages/isorropia/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

SET(HAVE_EPETRA ON)
SET(HAVE_ISORROPIA_ZOLTAN ON)
SET(HAVE_EPETRAEXT ${PACKAGE_NAME}_ENABLE_EpetraExt)
SET(HAVE_EPETRAEXT ON)
SET(ISORROPIA_HAVE_OMP ${${PROJECT_NAME}_ENABLE_OpenMP})
TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h)

Expand Down
2 changes: 1 addition & 1 deletion packages/isorropia/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ IF (TPL_ENABLE_MPI)
#ADD_SUBDIRECTORY(zoltan)
ENDIF()

IF (${PACKAGE_NAME}_ENABLE_EpetraExt)
IF ("FALSE") # if (${PACKAGE_NAME}_ENABLE_EpetraExt) # See #10534
ADD_SUBDIRECTORY(mtx)
ADD_SUBDIRECTORY(probing)
ENDIF()
Expand Down
6 changes: 6 additions & 0 deletions packages/sacado/test/tradoptest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST(
GET_PROPERTY(Sacado_lib_deps TARGET "${${PROJECT_NAME}_LIBRARY_NAME_PREFIX}sacado" PROPERTY LINK_LIBRARIES)
ADD_EXECUTABLE("Sacado_hesopcheck_ADC${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}" hesopcheck_ADC.cpp radops2_ADC.cpp)
TARGET_LINK_LIBRARIES("Sacado_hesopcheck_ADC${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}" ${Sacado_lib_deps})
TARGET_INCLUDE_DIRECTORIES("Sacado_hesopcheck_ADC${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}"
PRIVATE "${${PACKAGE_NAME}_BINARY_DIR}/src"
PRIVATE "${${PACKAGE_NAME}_SOURCE_DIR}/src"
PRIVATE "${${PACKAGE_NAME}_SOURCE_DIR}/src/mpl"
PRIVATE "${${PACKAGE_NAME}_SOURCE_DIR}/src/new_design"
)
TRIBITS_ADD_TEST(
hesopcheck_ADC
ARGS
Expand Down
4 changes: 2 additions & 2 deletions packages/zoltan2/test/core/temp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TRIBITS_ADD_TEST(
NAME testfail1
ARGS "FAIL"
WILL_FAIL
FAIL_REGULAR_EXPRESSION "FAIL;BUMMER"
FAIL_REGULAR_EXPRESSION "FAIL"
COMM mpi serial
)

Expand All @@ -45,7 +45,7 @@ TRIBITS_ADD_TEST(
NAME testfail2
ARGS "BUMMER"
WILL_FAIL
FAIL_REGULAR_EXPRESSION "FAIL;BUMMER"
FAIL_REGULAR_EXPRESSION "BUMMER"
COMM mpi serial
)

Expand Down

0 comments on commit ca67152

Please sign in to comment.