Skip to content

Commit d2a03b2

Browse files
committed
[CMake] Add permissive- CMAKE_CXX_FLAGS
1 parent 4297414 commit d2a03b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ if(MSVC)
165165
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
166166
add_compile_options(/bigobj)
167167

168+
# Use standard-conforming two-phase name resolution for templates.
169+
# This minimizes the differences between g++/clang builds on Linux,
170+
# and MSVC builds on Windows.
171+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")
172+
168173
# MSVC already errors on undefined symbols, no additional flag needed.
169174
set(TVM_NO_UNDEFINED_SYMBOLS "")
170175

0 commit comments

Comments
 (0)