Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 36 additions & 9 deletions cmake/SundialsBuildOptionsPre.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ endif()
# ---------------------------------------------------------------

# Fortran 2003 interface is disabled by default
set(DOCSTR "Enable Fortran 2003 modules")
sundials_option(BUILD_FORTRAN_MODULE_INTERFACE BOOL "${DOCSTR}" OFF)
sundials_option(
BUILD_FORTRAN_MODULE_INTERFACE BOOL "Enable Fortran 2003 modules" OFF
DEPRECATED_NAMES F2003_INTERFACE_ENABLE)

if(BUILD_FORTRAN_MODULE_INTERFACE)
# F2003 interface only supports double precision
Expand Down Expand Up @@ -340,8 +341,23 @@ endif()
# Options for SUNDIALS testing
# ---------------------------------------------------------------

sundials_option(SUNDIALS_TEST_ENABLE_DEV_TESTS BOOL "Include development tests"
OFF ADVANCED)
sundials_option(
SUNDIALS_TEST_ENABLE_DEV_TESTS
BOOL
"Enable development tests"
OFF
ADVANCED
DEPRECATED_NAMES
SUNDIALS_TEST_DEVTESTS)

sundials_option(
SUNDIALS_TEST_ENABLE_UNIT_TESTS
BOOL
"Enable unit tests"
OFF
ADVANCED
DEPRECATED_NAMES
SUNDIALS_TEST_UNITTESTS)

sundials_option(SUNDIALS_TEST_ENABLE_UNIT_TESTS BOOL "Include unit tests" OFF
ADVANCED)
Expand Down Expand Up @@ -375,9 +391,14 @@ else()
endif()

sundials_option(
SUNDIALS_TEST_ENABLE_DIFF_OUTPUT BOOL
"Compare test output with saved answer files" ${_default_diff_output}
ADVANCED)
SUNDIALS_TEST_ENABLE_DIFF_OUTPUT
BOOL
"Compare test output with saved answer files"
${_default_diff_output}
ADVANCED
DEPRECATED_NAMES
SUNDIALS_TEST_NODIFF
NEGATE_DEPRECATED)

if((SUNDIALS_TEST_ENABLE_DEV_TESTS OR SUNDIALS_TEST_ENABLE_UNIT_TESTS)
AND NOT SUNDIALS_TEST_ENABLE_DIFF_OUTPUT)
Expand Down Expand Up @@ -409,8 +430,14 @@ if(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT AND NOT SUNDIALS_TEST_ANSWER_DIR)
"failures due to hardware or round-off differences.")
endif()

sundials_option(SUNDIALS_TEST_ENABLE_PROFILING BOOL "Profile tests" OFF
ADVANCED)
sundials_option(
SUNDIALS_TEST_ENABLE_PROFILING
BOOL
"Profile tests"
OFF
ADVANCED
DEPRECATED_NAMES
SUNDIALS_TEST_PROFILE)

sundials_option(
SUNDIALS_TEST_CALIPER_OUTPUT_DIR PATH "Location to write test Caliper files"
Expand Down
222 changes: 25 additions & 197 deletions cmake/SundialsDeprecated.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,96 +15,29 @@
# SUNDIALS Copyright End
# ---------------------------------------------------------------

#
# Deprecated Fortran options
#

if(DEFINED F2003_INTERFACE_ENABLE)
message(DEPRECATION "The CMake option F2003_INTERFACE_ENABLE is deprecated. "
"Use BUILD_FORTRAN_MODULE_INTERFACE instead.")
set(BUILD_FORTRAN_MODULE_INTERFACE
${F2003_INTERFACE_ENABLE}
CACHE BOOL "Enable Fortran 2003 module interfaces")
endif()

unset(F2003_INTERFACE_ENABLE CACHE)

#
# Deprecated TPL options
#

if(DEFINED MPI_ENABLE)
message(DEPRECATION "The CMake option MPI_ENABLE is deprecated. "
"Use ENABLE_MPI instead.")
set(ENABLE_MPI
${MPI_ENABLE}
CACHE BOOL "Enable MPI support" FORCE)
unset(MPI_ENABLE CACHE)
endif()

if(DEFINED OPENMP_ENABLE)
message(DEPRECATION "The CMake option OPENMP_ENABLE is deprecated. "
"Use ENABLE_OPENMP instead.")
set(ENABLE_OPENMP
${OPENMP_ENABLE}
CACHE BOOL "Enable OpenMP support" FORCE)
unset(OPENMP_ENABLE CACHE)
endif()

if(DEFINED OPENMP_DEVICE_ENABLE)
message(DEPRECATION "The CMake option OPENMP_DEVICE_ENABLE is deprecated. "
"Use ENABLE_OPENMP_DEVICE instead.")
set(ENABLE_OPENMP_DEVICE
${OPENMP_DEVICE_ENABLE}
CACHE BOOL "Enable OpenMP device offloading support" FORCE)
unset(OPENMP_DEVICE_ENABLE CACHE)
endif()

if(DEFINED SKIP_OPENMP_DEVICE_CHECK)
message(
DEPRECATION "The CMake option SKIP_OPENMP_DEVICE_CHECK is deprecated. "
"Use OPENMP_DEVICE_WORKS instead.")
set(OPENMP_DEVICE_WORKS
${SKIP_OPENMP_DEVICE_CHECK}
CACHE BOOL "Skip the compiler check for OpenMP device offloading" FORCE)
unset(SKIP_OPENMP_DEVICE_CHECK CACHE)
endif()
# ---------------------------------------------------------------
# Option for testing deprecated options
# ---------------------------------------------------------------

if(DEFINED PTHREAD_ENABLE)
message(DEPRECATION "The CMake option PTHREAD_ENABLE is deprecated. "
"Use ENABLE_PTHREAD instead")
set(ENABLE_PTHREAD
${PTHREAD_ENABLE}
CACHE BOOL "Enable Pthreads support" FORCE)
unset(PTHREAD_ENABLE CACHE)
if(DEFINED ENV{SUNDIALS_ENABLE_UNSET_DEPRECATED})
set(_sundials_enable_unset_deprecated_default
"$ENV{SUNDIALS_ENABLE_UNSET_DEPRECATED}")
else()
set(_sundials_enable_unset_deprecated_default OFF)
endif()

if(DEFINED CUDA_ENABLE)
message(DEPRECATION "The CMake option CUDA_ENABLE is deprecated. "
"Use ENABLE_CUDA instead.")
set(ENABLE_CUDA
${CUDA_ENABLE}
CACHE BOOL "Enable CUDA support" FORCE)
unset(CUDA_ENABLE CACHE)
endif()
sundials_option(
SUNDIALS_ENABLE_UNSET_DEPRECATED BOOL "Unset deprecated CMake options"
${_sundials_enable_unset_deprecated_default} ADVANCED)

if(DEFINED LAPACK_ENABLE)
message(DEPRECATION "The CMake option LAPACK_ENABLE is deprecated. "
"Use ENABLE_LAPACK instead.")
set(ENABLE_LAPACK
${LAPACK_ENABLE}
CACHE BOOL "Enable LAPACK support" FORCE)
unset(LAPACK_ENABLE CACHE)
if(SUNDIALS_ENABLE_UNSET_DEPRECATED)
message(WARNING "Unsetting deprecated SUNDIALS options.")
endif()

if(DEFINED SUPERLUDIST_ENABLE)
message(DEPRECATION "The CMake option SUPERLUDIST_ENABLE is deprecated. "
"Use ENABLE_SUPERLUDIST instead.")
set(ENABLE_SUPERLUDIST
${SUPERLUDIST_ENABLE}
CACHE BOOL "Enable SuperLU_DIST support" FORCE)
unset(SUPERLUDIST_ENABLE CACHE)
endif()
# ---------------------------------------------------------------
# Deprecated options that can not use the DEPRECATED_NAMES option to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Deprecated options that can not use the DEPRECATED_NAMES option to
# Deprecated options that can not use the DEPRECATED_NAMES option of

# sundials_option
# ---------------------------------------------------------------

# Deprecated with SUNDIALS 6.4.0
if(DEFINED SUPERLUDIST_LIBRARY_DIR)
Expand All @@ -113,75 +46,12 @@ if(DEFINED SUPERLUDIST_LIBRARY_DIR)
set(SUPERLUDIST_DIR
"${SUPERLUDIST_LIBRARY_DIR}/../"
CACHE BOOL "SuperLU_DIST root directory" FORCE)
unset(SUPERLUDIST_LIBRARY_DIR CACHE)
endif()
if(DEFINED SUPERLUDIST_INCLUDE_DIR)
message(DEPRECATION "The CMake option SUPERLUDIST_INCLUDE_DIR is deprecated. "
"Use SUPERLUDIST_INCLUDE_DIRS instead.")
set(SUPERLUDIST_INCLUDE_DIRS
"${SUPERLUDIST_INCLUDE_DIR}"
CACHE BOOL "SuperLU_DIST include directoroes" FORCE)
unset(SUPERLUDIST_INCLUDE_DIR CACHE)
endif()

if(DEFINED SUPERLUMT_ENABLE)
message(DEPRECATION "The CMake option SUPERLUMT_ENABLE is deprecated. "
"Use ENABLE_SUPERLUMT instead.")
set(ENABLE_SUPERLUMT
${SUPERLUMT_ENABLE}
CACHE BOOL "Enable SuperLU_MT support" FORCE)
unset(SUPERLUMT_ENABLE CACHE)
endif()

if(DEFINED KLU_ENABLE)
message(DEPRECATION "The CMake option KLU_ENABLE is deprecated. "
"Use ENABLE_KLU instead.")
set(ENABLE_KLU
${KLU_ENABLE}
CACHE BOOL "Enable KLU support" FORCE)
unset(KLU_ENABLE CACHE)
endif()

if(DEFINED HYPRE_ENABLE)
message(DEPRECATION "The CMake option HYPRE_ENABLE is deprecated. "
"Use ENABLE_HYPRE instead.")
set(ENABLE_HYPRE
${HYPRE_ENABLE}
CACHE BOOL "Enable HYPRE support" FORCE)
unset(HYPRE_ENABLE CACHE)
endif()

if(DEFINED PETSC_ENABLE)
message(DEPRECATION "The CMake option PETSC_ENABLE is deprecated. "
"Use ENABLE_PETSC instead.")
set(ENABLE_PETSC
${PETSC_ENABLE}
CACHE BOOL "Enable PETSC support" FORCE)
unset(PETSC_ENABLE CACHE)
endif()

if(DEFINED Trilinos_ENABLE)
message(DEPRECATION "The CMake option Trilinos_ENABLE is deprecated. "
"Use ENABLE_TRILINOS instead.")
set(ENABLE_TRILINOS
${Trilinos_ENABLE}
CACHE BOOL "Enable Trilinos support" FORCE)
unset(Trilinos_ENABLE CACHE)
endif()

if(DEFINED RAJA_ENABLE)
message(DEPRECATION "The CMake option RAJA_ENABLE is deprecated. "
"Use ENABLE_RAJA instead.")
set(ENABLE_RAJA
${RAJA_ENABLE}
CACHE BOOL "Enable RAJA support" FORCE)
unset(RAJA_ENABLE CACHE)
if(SUNDIALS_ENABLE_UNSET_DEPRECATED)
unset(SUPERLUDIST_LIBRARY_DIR CACHE)
endif()
endif()

#
# Deprecated CUDA_ARCH option
#

if(DEFINED CUDA_ARCH)
message(DEPRECATION "The CMake option CUDA_ARCH is deprecated. "
"Use CMAKE_CUDA_ARCHITECTURES instead.")
Expand All @@ -190,53 +60,9 @@ if(DEFINED CUDA_ARCH)
set(CMAKE_CUDA_ARCHITECTURES
${arch_name}
CACHE STRING "CUDA Architectures" FORCE)
unset(CUDA_ARCH)
endif()

#
# Deprecated Testing Options
#

if(SUNDIALS_TEST_PROFILE)
message(DEPRECATION "The CMake option SUNDIALS_TEST_PROFILE is deprecated. "
"Use SUNDIALS_TEST_ENABLE_PROFILING instead.")
set(SUNDIALS_TEST_ENABLE_PROFILING
${SUNDIALS_TEST_PROFILE}
CACHE BOOL "Profile tests" FORCE)
unset(SUNDIALS_TEST_PROFILE)
endif()

if(SUNDIALS_TEST_NODIFF)
message(DEPRECATION "The CMake option SUNDIALS_TEST_NODIFF is deprecated. "
"Use SUNDIALS_TEST_ENABLE_DIFF_OUTPUT instead.")
if(SUNDIALS_TEST_NODIFF)
set(_new_value OFF)
else()
set(_new_value ON)
if(SUNDIALS_ENABLE_UNSET_DEPRECATED)
unset(CUDA_ARCH)
endif()
set(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT
${_new_value}
CACHE BOOL "Compare test output with saved answer files" FORCE)
unset(SUNDIALS_TEST_NODIFF)
unset(_new_value)
endif()

if(SUNDIALS_TEST_DEVTESTS)
message(DEPRECATION "The CMake option SUNDIALS_TEST_DEVTESTS is deprecated. "
"Use SUNDIALS_TEST_ENABLE_DEV_TESTS instead.")
set(SUNDIALS_TEST_ENABLE_DEV_TESTS
${SUNDIALS_TEST_DEVTESTS}
CACHE BOOL "Include development tests" FORCE)
unset(SUNDIALS_TEST_DEVTESTS)
endif()

if(SUNDIALS_TEST_UNITTESTS)
message(DEPRECATION "The CMake option SUNDIALS_TEST_UNITTESTS is deprecated. "
"Use SUNDIALS_TEST_ENABLE_UNIT_TESTS instead.")
set(SUNDIALS_TEST_ENABLE_UNIT_TESTS
${SUNDIALS_TEST_UNITTESTS}
CACHE BOOL "Include units tests" FORCE)
unset(SUNDIALS_TEST_UNITTESTS)
endif()

if(SUNDIALS_CALIPER_OUTPUT_DIR)
Expand All @@ -251,5 +77,7 @@ if(SUNDIALS_CALIPER_OUTPUT_DIR)
set(SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR
${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR}
CACHE PATH "Location to write benchmark caliper files" FORCE)
unset(SUNDIALS_CALIPER_OUTPUT_DIR)
if(SUNDIALS_ENABLE_UNSET_DEPRECATED)
unset(SUNDIALS_CALIPER_OUTPUT_DIR)
endif()
endif()
Loading