If the Visual Studio settings are set properly, it is not necessary to include precompiled_header.hpp
in each .cpp file. Visual Studio will pass /FI precompiled_hearder.hpp
to MSVC, which includes precompiled_header.hpp
automatically (see https://docs.microsoft.com/en-us/cpp/build/reference/fi-name-forced-include-file for more details). You still need precompiled_header.cpp
, but it can be empty.