Skip to content
Permalink
Browse files
Merge pull request #9647 from leoetlino/fix-pch-fmt
Fix PCH when building with CMake + Ninja + MSVC on Windows
  • Loading branch information
JMC47 committed Apr 17, 2021
2 parents edeb6bc + a12d365 commit d26d179
Showing 1 changed file with 3 additions and 1 deletion.
@@ -1,4 +1,6 @@
add_library(pch pch.h pch.cpp)
set(PCH_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set(PCH_NAME ${PCH.pch})
target_compile_options(pch PUBLIC /Ycpch.h /Fp${PCH_DIRECTORY}/${PCH_NAME})
target_compile_options(pch PUBLIC /Ycpch.h /Fp${PCH_DIRECTORY}/${PCH_NAME})
# fmt/format.h is included in the PCH
target_link_libraries(pch PUBLIC fmt::fmt)

0 comments on commit d26d179

Please sign in to comment.