Merge pull request #9647 from leoetlino/fix-pch-fmt

Fix PCH when building with CMake + Ninja + MSVC on Windows
This commit is contained in:
JMC47
2021-04-17 13:18:44 -04:00
committed by GitHub

View File

@ -2,3 +2,5 @@ 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})
# fmt/format.h is included in the PCH
target_link_libraries(pch PUBLIC fmt::fmt)