Skip to content

Commit

Permalink
Merge pull request #272 from IPPL-framework/dev-3.2.0
Browse files Browse the repository at this point in the history
Release IPPL-3.2.0
  • Loading branch information
matt-frey committed Mar 26, 2024
2 parents 21f380c + 5f9fabd commit dcd08e2
Show file tree
Hide file tree
Showing 194 changed files with 11,580 additions and 15,397 deletions.
42 changes: 37 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,21 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ")
set (CMAKE_CXX_FLAGS_RELEASE "-O3")
set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g")

if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# Use sanitizer flags for GCC or Clang only
set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fsanitize=address,undefined")
endif ()

if ("${Kokkos_DEVICES}" MATCHES "CUDA")
set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g -G --diag-suppress=20011")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -G")
endif()

# Suppress erroneous buffer overflow warnings when compiling under GCC 12
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" MATCHES "12*")
add_compile_options (-Wno-stringop-overflow)
add_compile_options (-Wno-array-bounds)
add_compile_options (-Wno-restrict)
endif()

# Resolve all library dependencies
Expand All @@ -51,10 +64,16 @@ message (STATUS "The C++ compiler version is: ${CMAKE_CXX_COMPILER_VERSION}")
message (STATUS "The MPI C++ compiler is: ${MPI_CXX_COMPILER}")
message (STATUS "The underlying C++ compiler is: ${CMAKE_CXX_COMPILER}")

option(USE_ALTERNATIVE_VARIANT "Use modified variant implementation (required for CUDA 12.2 + GCC 12.3.0)" OFF)
if (USE_ALTERNATIVE_VARIANT)
add_definitions (-DUSE_ALTERNATIVE_VARIANT)
endif()


option (ENABLE_FFT "Enable FFT transform" OFF)
if (ENABLE_FFT)
add_definitions (-DENABLE_FFT)
find_package(Heffte 2.2.0 REQUIRED)
find_package (Heffte 2.2.0 REQUIRED)
message (STATUS "Found Heffte_DIR: ${Heffte_DIR}")
endif ()

Expand All @@ -67,7 +86,7 @@ if (ENABLE_TESTS)
add_subdirectory (test)
endif ()

option (ENABLE_ALPINE, "Enable Alpine" OFF)
option (ENABLE_ALPINE "Enable Alpine" OFF)
if (ENABLE_ALPINE)
if (NOT ENABLE_SOLVERS)
message (FATAL_ERROR "Cannot enable Alpine since Solver not enabled (-DENABLE_SOLVERS=ON)!")
Expand All @@ -81,9 +100,22 @@ endif ()

option (ENABLE_UNIT_TESTS "Enable unit tests" OFF)
if (ENABLE_UNIT_TESTS)
find_package (GTest REQUIRED HINT $ENV{GTEST_PREFIX})
include(FetchContent)
include(GoogleTest)

enable_testing()

FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
DOWNLOAD_EXTRACT_TIMESTAMP ON # policy hint for CMake > 3.24
)

# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

add_subdirectory (unit_tests)
#add_subdirectory(unit_tests_single_precision)
endif ()

configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in
Expand Down
54 changes: 0 additions & 54 deletions CMakeModules/FindGTest.cmake

This file was deleted.

Loading

0 comments on commit dcd08e2

Please sign in to comment.