Skip to content

Commit 56963c9

Browse files
authored
[SYCL] Remove imf libdevice build warning on Windows (#20053)
Compiler warning reported when building imf libdevice on Windows: imf_rounding_op.hpp: warning: constexpr if is a C++17 extension [-Wc++17-extensions] This PR fixes it. Signed-off-by: jinge90 <[email protected]>
1 parent e890640 commit 56963c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ if(LLVM_LIBCXX_USED)
7373
endif()
7474

7575
if (WIN32)
76+
list(APPEND compile_opts "-std=c++17")
7677
list(APPEND compile_opts -D_ALLOW_RUNTIME_LIBRARY_MISMATCH)
7778
list(APPEND compile_opts -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH)
7879
endif()
@@ -657,6 +658,10 @@ if(LLVM_LIBCXX_USED)
657658
list(APPEND imf_host_cxx_flags "-stdlib=libc++")
658659
endif()
659660

661+
if (WIN32)
662+
list(APPEND imf_host_cxx_flags "-std=c++17")
663+
endif()
664+
660665
macro(mangle_name str output)
661666
string(STRIP "${str}" strippedStr)
662667
string(REGEX REPLACE "^/" "" strippedStr "${strippedStr}")

0 commit comments

Comments
 (0)