Skip to content

Commit

Permalink
[cpp] Add compiler warning flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Sep 17, 2024
1 parent 7becc18 commit 96f59dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if(PFFDTD_HAS_SYCL)
endif()

if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC"))
target_compile_options(pffdtd PRIVATE /W3)
target_compile_options(pffdtd PUBLIC /W3)
else ()
target_compile_options(pffdtd PRIVATE -Wno-deprecated-declarations)
target_compile_options(pffdtd PUBLIC -Wall -Wextra -Wno-deprecated-declarations)
endif ()
2 changes: 1 addition & 1 deletion src/cpp/pffdtd/hdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct H5FReader {
auto set = H5Dopen(_handle, dataset, H5P_DEFAULT);
auto space = H5Dget_space(set);

auto ndims = 1UL;
auto ndims = 1;
auto dims = std::array<hsize_t, 3>{};
PFFDTD_ASSERT(H5Sget_simple_extent_ndims(space) == ndims);
H5Sget_simple_extent_dims(space, dims.data(), NULL);
Expand Down

0 comments on commit 96f59dc

Please sign in to comment.