Skip to content
Snippets Groups Projects
Commit 54ceba8b authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add -Wextra to CXX_FLAGS and -w to Kokkos library

parent 08504a19
Branches
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ set(GNU_CXX_MIN_VERSION "7.0.0") ...@@ -67,7 +67,7 @@ set(GNU_CXX_MIN_VERSION "7.0.0")
set(CLANG_CXX_MIN_VERSION "5.0.0") set(CLANG_CXX_MIN_VERSION "5.0.0")
# Pastis default compiler flags # Pastis default compiler flags
set(PASTIS_CXX_FLAGS "${PASTIS_CXX_FLAGS} -Wall") set(PASTIS_CXX_FLAGS "${PASTIS_CXX_FLAGS} -Wall -Wextra")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${GNU_CXX_MIN_VERSION}") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${GNU_CXX_MIN_VERSION}")
...@@ -95,11 +95,14 @@ set(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "") ...@@ -95,11 +95,14 @@ set(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "")
# do not use Kokkos deprecated code # do not use Kokkos deprecated code
set(KOKKOS_ENABLE_DEPRECATED_CODE OFF CACHE BOOL "") set(KOKKOS_ENABLE_DEPRECATED_CODE OFF CACHE BOOL "")
# Kokkso compiler flags # Kokkos compiler flags
add_subdirectory(${PASTIS_SOURCE_DIR}/packages/kokkos) add_subdirectory(${PASTIS_SOURCE_DIR}/packages/kokkos)
include_directories(SYSTEM ${Kokkos_INCLUDE_DIRS_RET}) include_directories(SYSTEM ${Kokkos_INCLUDE_DIRS_RET})
include(GetKokkosCompilerFlags) include(GetKokkosCompilerFlags)
# do not pollute compilation with Kokkos internal warnings
set_target_properties(kokkos PROPERTIES COMPILE_FLAGS "-w")
# sets Kokkos debug flags when non release build # sets Kokkos debug flags when non release build
if (CMAKE_BUILD_TYPE MATCHES "Release") if (CMAKE_BUILD_TYPE MATCHES "Release")
set (KOKKOS_ENABLE_DEBUG OFF) set (KOKKOS_ENABLE_DEBUG OFF)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment