Skip to content

Commit

Permalink
Revert "add comments and fix compile error in 2022.1.0"
Browse files Browse the repository at this point in the history
This reverts commit 846a79e.
  • Loading branch information
yxlao committed May 13, 2022
1 parent 846a79e commit 92a2516
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions 3rdparty/assimp/assimp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ else()
set(lib_name assimp)
endif()

# IntelLLVM (SYCL) compiler defaults to fast math, causing NaN comparison code
# compilation error.
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
set(assimp_cmake_cxx_flags "${CMAKE_CXX_FLAGS} -ffp-contract=on -fno-fast-math")
set(assimp_cmake_cxx_flags ${CMAKE_CXX_FLAGS} -fno-fast-math)
else()
set(assimp_cmake_cxx_flags "${CMAKE_CXX_FLAGS}")
set(assimp_cmake_cxx_flags ${CMAKE_CXX_FLAGS})
endif()

ExternalProject_Add(
Expand Down
3 changes: 0 additions & 3 deletions 3rdparty/benchmark/MakeAvailable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ else()
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
endif()

# IntelLLVM (SYCL) compiler defaults to fast math, causing NaN comparison
# code compilation error.
add_compile_options($<$<CXX_COMPILER_ID:IntelLLVM>:-ffp-contract=on>)
add_compile_options($<$<CXX_COMPILER_ID:IntelLLVM>:-fno-fast-math>)

FetchContent_MakeAvailable(ext_benchmark)
Expand Down
5 changes: 2 additions & 3 deletions cmake/Open3DSetGlobalProperties.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ function(open3d_set_global_properties target)
endif()

# Turn off fast math for IntelLLVM DPC++ compiler.
# Fast math does not work with some of our NaN handling logics.
target_compile_options(${target} PRIVATE
$<$<AND:$<CXX_COMPILER_ID:IntelLLVM>,$<NOT:$<COMPILE_LANGUAGE:ISPC>>>:-ffp-contract=on>)
# Fast math is turned off for clang by default even for -O3.
# TODO: We may make this optional and tune unit tests floating point precisions.
target_compile_options(${target} PRIVATE
$<$<AND:$<CXX_COMPILER_ID:IntelLLVM>,$<NOT:$<COMPILE_LANGUAGE:ISPC>>>:-fno-fast-math>)

Expand Down

0 comments on commit 92a2516

Please sign in to comment.