Skip to content

Commit

Permalink
fix find find command for cmake-format
Browse files Browse the repository at this point in the history
  • Loading branch information
gardner48 committed Jun 26, 2024
1 parent b720a97 commit 85e7117
Show file tree
Hide file tree
Showing 204 changed files with 1,580 additions and 1,724 deletions.
241 changes: 0 additions & 241 deletions .cmake-format.py

This file was deleted.

19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
cmake_policy(SET CMP0135 NEW)
endif()

# Project SUNDIALS (initially only C supported)
# sets PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR variables.
# Project SUNDIALS (initially only C supported) sets PROJECT_SOURCE_DIR and
# PROJECT_BINARY_DIR variables.
project(SUNDIALS C)

# Specify the location of additional CMAKE modules
Expand Down Expand Up @@ -119,9 +119,9 @@ endif()
# Organize targets into folders when using an IDE
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

# Get correct build paths automatically, but expose LIBDIR and
# INCLUDEDIR as a regular cache variable so that a user can more
# easily see what they were set to by GNUInstallDirs.
# Get correct build paths automatically, but expose LIBDIR and INCLUDEDIR as a
# regular cache variable so that a user can more easily see what they were set
# to by GNUInstallDirs.
include(GNUInstallDirs)
mark_as_advanced(CLEAR CMAKE_INSTALL_LIBDIR)
mark_as_advanced(CLEAR CMAKE_INSTALL_INCLUDEDIR)
Expand Down Expand Up @@ -193,8 +193,8 @@ include(SundialsSetupTPLs)
include(SundialsBuildOptionsPost)

# ===============================================================
# At this point all the configuration options are set.
# Setup the sundials_config.h.
# At this point all the configuration options are set. Setup the
# sundials_config.h.
# ===============================================================

include(SundialsSetupConfig)
Expand Down Expand Up @@ -240,9 +240,8 @@ install(FILES "${PROJECT_BINARY_DIR}/include/sundials/sundials_config.h"

# install shared Fortran 2003 modules
if(BUILD_FORTRAN_MODULE_INTERFACE)
# While the .mod files get generated for static and shared
# libraries, they are identical. So only install one set
# of the .mod files.
# While the .mod files get generated for static and shared libraries, they are
# identical. So only install one set of the .mod files.
if(BUILD_STATIC_LIBS)
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}_STATIC/
DESTINATION ${Fortran_INSTALL_MODDIR})
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ if(ENABLE_ALL_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
endif()

#----------------------------------------
# ----------------------------------------
# Add specific benchmarks
#----------------------------------------
# ----------------------------------------

if(ENABLE_MPI)
add_subdirectory(diffusion_2D)
Expand Down
9 changes: 3 additions & 6 deletions benchmarks/diffusion_2D/mpi_gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@ foreach(test_tuple ${tests})

add_executable(${target} ${sources})

# if("${backend}" STREQUAL "USE_CUDA")
# sundials_add_benchmark(${target} ${target} diffusion_2D
# ENABLE_GPU
# NUM_CORES ${SUNDIALS_BENCHMARK_NUM_GPUS}
# )
#endif()
# if("${backend}" STREQUAL "USE_CUDA") sundials_add_benchmark(${target}
# ${target} diffusion_2D ENABLE_GPU NUM_CORES ${SUNDIALS_BENCHMARK_NUM_GPUS} )
# endif()

if("${backend}" STREQUAL "USE_HIP")
sundials_add_benchmark(${target} ${target} diffusion_2D ENABLE_GPU
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/nvector/openmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

message(STATUS "Added OpenMP NVECTOR benchmark")

# Set-up linker flags and link libraries
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}")
# Set-up linker flags and link libraries set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}
# ${OpenMP_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
# ${OpenMP_CXX_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
# ${OpenMP_C_FLAGS}")

sundials_add_nvector_benchmark(
nvector_openmp_benchmark
Expand Down
3 changes: 2 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
# ---------------------------------------------------------------

# We need this to ensure the installed templates have MPI when ENABLE_MPI=TRUE,
# at least until we convert all of the templates to use the SUNDIALS CMake target.
# at least until we convert all of the templates to use the SUNDIALS CMake
# target.

# ===================================================================
# Configure compilers for installed examples
Expand Down
30 changes: 14 additions & 16 deletions examples/arkode/CXX_parallel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ macro(build_examples examples_to_build lang)
set(example_target "${example_target}.${example_defines}")
endif()

# check if this example has already been added, only need to add
# example source files once for testing with different inputs
# check if this example has already been added, only need to add example
# source files once for testing with different inputs
if(NOT TARGET ${example_target})

set_source_files_properties(${example} PROPERTIES LANGUAGE ${lang})
Expand Down Expand Up @@ -111,8 +111,9 @@ endmacro()
# Examples to build and install
# -----------------------------

# Example lists are tuples "name\;compile defs\;args\;nodes\;tasks\;type\;float precision"
# where the type develop is for examples excluded from 'make test' in releases.
# Example lists are tuples "name\;compile defs\;args\;nodes\;tasks\;type\;float
# precision" where the type develop is for examples excluded from 'make test' in
# releases.

# List of headers to install (appended to below)
set(ARKODE_headers)
Expand Down Expand Up @@ -253,20 +254,17 @@ if(EXAMPLES_INSTALL)
endif()

# For now do not install the RAJA examples because they need to built as CUDA
# code when RAJA is built with CUDA
# if(serial_raja_examples)
# list(APPEND examples_to_install "${serial_raja_examples}")
# list(APPEND _sundials_targets nvecmpiplusx)

# if((RAJA_BACKENDS MATCHES "TARGET_OPENMP") OR (RAJA_BACKENDS MATCHES "OPENMP"))
# set(EXAMPLES_FIND_PACKAGE "find_package(OpenMP REQUIRED)\n")
# endif()

# if(RAJA_NEEDS_THREADS)
# set(EXAMPLES_FIND_PACKAGE "${EXAMPLES_FIND_PACKAGE}find_package(Threads REQUIRED)\n")
# endif()
# code when RAJA is built with CUDA if(serial_raja_examples) list(APPEND
# examples_to_install "${serial_raja_examples}") list(APPEND _sundials_targets
# nvecmpiplusx)

# if((RAJA_BACKENDS MATCHES "TARGET_OPENMP") OR (RAJA_BACKENDS MATCHES
# "OPENMP")) set(EXAMPLES_FIND_PACKAGE "find_package(OpenMP REQUIRED)\n")
# endif()

# if(RAJA_NEEDS_THREADS) set(EXAMPLES_FIND_PACKAGE
# "${EXAMPLES_FIND_PACKAGE}find_package(Threads REQUIRED)\n") endif() endif()

sundials_install_examples(
arkode
examples_to_install
Expand Down
Loading

0 comments on commit 85e7117

Please sign in to comment.