[llvm] acc15fb - [CMake][LLVM] Disable PCH on MSVC for file with custom flags
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 07:02:04 PST 2026
Author: Alexis Engelke
Date: 2026-02-20T15:01:40Z
New Revision: acc15fbce100e941f028f52d7774cab130df9714
URL: https://github.com/llvm/llvm-project/commit/acc15fbce100e941f028f52d7774cab130df9714
DIFF: https://github.com/llvm/llvm-project/commit/acc15fbce100e941f028f52d7774cab130df9714.diff
LOG: [CMake][LLVM] Disable PCH on MSVC for file with custom flags
See: https://github.com/llvm/llvm-project/pull/176420
Added:
Modified:
llvm/lib/Analysis/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/CMakeLists.txt b/llvm/lib/Analysis/CMakeLists.txt
index 9abdca099d9fe..33ed56624f40f 100644
--- a/llvm/lib/Analysis/CMakeLists.txt
+++ b/llvm/lib/Analysis/CMakeLists.txt
@@ -30,6 +30,8 @@ endif()
# handled correctly.
if (MSVC)
set_source_files_properties(ConstantFolding.cpp PROPERTIES COMPILE_OPTIONS "/fp:except")
+ # Prevent warning about mismatching compile flags.
+ set_source_files_properties(ConstantFolding.cpp PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set_source_files_properties(ConstantFolding.cpp PROPERTIES COMPILE_OPTIONS "-ftrapping-math")
endif()
More information about the llvm-commits
mailing list