Skip to content

Commit

Permalink
Add -fhonor-infinities -fhonor-nans to remove warnings and potential bug
Browse files Browse the repository at this point in the history
  • Loading branch information
do-jason committed Dec 3, 2023
1 parent 4b413ec commit 14257a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ elseif(SYCL)
add_definitions(-D_SYCL_ENABLED=1 -DUSE_MPI_COLLECTIVE)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "mpiicpx")
add_definitions(-D_DPCPP_ENABLED=1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-zeros")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fhonor-infinities -fhonor-nans -fsigned-zeros")
endif()
elseif(ALTCPU)
add_definitions(-DALTCPU=1 -DUSE_MPI_COLLECTIVE)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-zeros")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fhonor-infinities -fhonor-nans -fsigned-zeros")
endif()
endif()

Expand Down

0 comments on commit 14257a8

Please sign in to comment.