Skip to content

Commit 401dee4

Browse files
committed
Reapply "[cmake][msvc] Enable standards-conforming preprocessor"
This reverts commit 16e1a49, essentially reapplying 12d8e7c. The build bot where this caused issues is supposed to be updated now: https://reviews.llvm.org/D135128#4108588
1 parent 94def1b commit 401dee4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ if( MSVC )
494494

495495
append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
496496

497+
# Enable standards-conforming preprocessor.
498+
# https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor
499+
append("/Zc:preprocessor" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
500+
497501
# Some projects use the __cplusplus preprocessor macro to check support for
498502
# a particular version of the C++ standard. When this option is not specified
499503
# explicitly, macro's value is "199711L" that implies C++98 Standard.

0 commit comments

Comments
 (0)