Skip to content

Commit

Permalink
apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gardner48 committed Dec 16, 2024
1 parent 741c042 commit cc0518a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
8 changes: 4 additions & 4 deletions cmake/SundialsBuildOptionsPre.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ 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)

if((SUNDIALS_TEST_ENABLE_DEV_TESTS OR SUNDIALS_TEST_ENABLE_UNIT_TESTS)
AND NOT SUNDIALS_TEST_ENABLE_DIFF_OUTPUT)
Expand Down Expand Up @@ -379,8 +380,7 @@ 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 test"
OFF ADVANCED)
sundials_option(SUNDIALS_TEST_ENABLE_PROFILING BOOL "Profile tests" OFF ADVANCED)

sundials_option(
SUNDIALS_TEST_CALIPER_OUTPUT_DIR PATH "Location to write test Caliper files"
Expand Down
8 changes: 6 additions & 2 deletions cmake/SundialsExampleOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ if(BUILD_FORTRAN_MODULE_INTERFACE)
WARNING
"F2003 examples are not compatible with ${SUNDIALS_PRECISION} precision. "
"Setting EXAMPLES_ENABLE_F2003 to OFF.")
set(EXAMPLES_ENABLE_F2003 OFF CACHE BOOL "${DOCSTR}" FORCE)
set(EXAMPLES_ENABLE_F2003
OFF
CACHE BOOL "${DOCSTR}" FORCE)
endif()
else()

Expand All @@ -65,7 +67,9 @@ else()
WARNING
"EXAMPLES_ENABLE_F2003 is ON but BUILD_FORTRAN_MODULE_INTERFACE is OFF. "
"Setting EXAMPLES_ENABLE_F2003 to OFF.")
set(EXAMPLES_ENABLE_F2003 OFF CACHE BOOL "${DOCSTR}" FORCE)
set(EXAMPLES_ENABLE_F2003
OFF
CACHE BOOL "${DOCSTR}" FORCE)
endif()

endif()
Expand Down
7 changes: 5 additions & 2 deletions cmake/SundialsSetupBenchmarks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ if(ENABLE_CALIPER)
if(NOT EXISTS ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR})
file(MAKE_DIRECTORY ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR})
endif()
message(STATUS "Benchmark Caliper output directory: ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR}")
message(
STATUS
"Benchmark Caliper output directory: ${SUNDIALS_BENCHMARK_CALIPER_OUTPUT_DIR}"
)
endif()

#
# Create `make benchmark`
#
add_custom_target(benchmark ${CMAKE_COMMAND} -E cmake_echo_color --cyan
"All benchmarks complete.")
"All benchmarks complete.")
6 changes: 4 additions & 2 deletions cmake/SundialsSetupTesting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ include(CTest)
#
# Check if the test runner is needed
#
if(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT OR (SUNDIALS_TEST_ENABLE_PROFILING AND ENABLE_CALIPER))
if(SUNDIALS_TEST_ENABLE_DIFF_OUTPUT OR (SUNDIALS_TEST_ENABLE_PROFILING
AND ENABLE_CALIPER))
set(SUNDIALS_TEST_USE_RUNNER TRUE)
# Python is needed to use the test runner
find_package(Python3 REQUIRED)
Expand Down Expand Up @@ -75,7 +76,8 @@ if(SUNDIALS_TEST_ENABLE_PROFILING AND ENABLE_CALIPER)
if(NOT EXISTS ${SUNDIALS_TEST_CALIPER_OUTPUT_DIR})
file(MAKE_DIRECTORY ${SUNDIALS_TEST_CALIPER_OUTPUT_DIR})
endif()
message(STATUS "Test Caliper output directory: ${SUNDIALS_TEST_CALIPER_OUTPUT_DIR}")
message(
STATUS "Test Caliper output directory: ${SUNDIALS_TEST_CALIPER_OUTPUT_DIR}")
endif()

#
Expand Down
18 changes: 9 additions & 9 deletions cmake/macros/SundialsAddTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
# The options LABELS are labels added to the test properties to easily run (or
# exclude) groups of test with ctest -L <label> (or ctest -LE <label>)
#
# When SUNDIALS_TEST_ENABLE_DEV_TESTS is OFF (default) the executable is run and success
# or failure is determined by the executable return value (zero or non-zero
# respectively).
# When SUNDIALS_TEST_ENABLE_DEV_TESTS is OFF (default) the executable is run and
# success or failure is determined by the executable return value (zero or
# non-zero respectively).
#
# When SUNDIALS_TEST_ENABLE_DEV_TESTS is ON the executable is run and its output is
# compared with the corresponding .out file. If the output differs significantly
# then the test fails. The default level of significance is 4 decimal places for
# floating point values and 10% for integer values.
# When SUNDIALS_TEST_ENABLE_DEV_TESTS is ON the executable is run and its output
# is compared with the corresponding .out file. If the output differs
# significantly then the test fails. The default level of significance is 4
# decimal places for floating point values and 10% for integer values.
#
# The level of precision can be adjusted for an individual test with the
# FLOAT_PRECISION AND INTEGER_PRECISION keyword inputs to the macro or globally
Expand Down Expand Up @@ -97,8 +97,8 @@ macro(SUNDIALS_ADD_TEST NAME EXECUTABLE)
set(_add_test TRUE)

# exclude development tests (non-empty example type)
# TODO(DJG): When examples and development tests are separated this check
# can be removed
# TODO(DJG): When examples and development tests are separated this check can
# be removed
if(NOT SUNDIALS_TEST_ENABLE_DEV_TESTS AND arg_EXAMPLE_TYPE)
set(_add_test FALSE)
endif()
Expand Down
5 changes: 3 additions & 2 deletions cmake/tpl/FindSUPERLUMT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@

# check for valid thread type
string(TOUPPER ${SUPERLUMT_THREAD_TYPE} _upper_SUPERLUMT_THREAD_TYPE)
set(SUPERLUMT_THREAD_TYPE "${_upper_SUPERLUMT_THREAD_TYPE}" CACHE
STRING "SuperLU_MT threading type: OPENMP or PTHREAD" FORCE)
set(SUPERLUMT_THREAD_TYPE
"${_upper_SUPERLUMT_THREAD_TYPE}"
CACHE STRING "SuperLU_MT threading type: OPENMP or PTHREAD" FORCE)

if(SUPERLUMT_THREAD_TYPE
AND NOT SUPERLUMT_THREAD_TYPE STREQUAL "OPENMP"
Expand Down

0 comments on commit cc0518a

Please sign in to comment.