Skip to content

Commit

Permalink
Enable additional conversion warnings
Browse files Browse the repository at this point in the history
This commit adds some additional floating point conversion warnings in
order to bring it in line with the other Acts projects.
  • Loading branch information
stephenswat committed Jul 25, 2024
1 parent 58af063 commit 140bd91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/covfie-compiler-options-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ if( ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" ) OR
covfie_add_flag( CMAKE_CXX_FLAGS "-Wshadow" )
covfie_add_flag( CMAKE_CXX_FLAGS "-Wunused-local-typedefs" )
covfie_add_flag( CMAKE_CXX_FLAGS "-pedantic" )
covfie_add_flag( CMAKE_CXX_FLAGS "-Wfloat-conversion" )
covfie_add_flag( CMAKE_CXX_FLAGS "-Wconversion" )

# Fail on warnings, if asked for that behaviour.
if( COVFIE_FAIL_ON_WARNINGS )
Expand Down
3 changes: 3 additions & 0 deletions cmake/covfie-compiler-options-cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if( "${CMAKE_CUDA_COMPILER_ID}" MATCHES "NVIDIA" )
covfie_add_flag( CMAKE_CUDA_FLAGS "--expt-relaxed-constexpr" )
endif()

covfie_add_flag( CMAKE_CUDA_FLAGS "-Wfloat-conversion" )
covfie_add_flag( CMAKE_CUDA_FLAGS "-Wconversion" )

# Fail on warnings, if asked for that behaviour.
if( COVFIE_FAIL_ON_WARNINGS )
if( ( "${CUDAToolkit_VERSION}" VERSION_GREATER_EQUAL "10.2" ) AND
Expand Down

0 comments on commit 140bd91

Please sign in to comment.