cmake-precompiled-header icon indicating copy to clipboard operation
cmake-precompiled-header copied to clipboard

Visual Studio and GCC precompiled header macro for CMake

Results 19 cmake-precompiled-header issues
Sort by recently updated
recently updated
newest added

If you rename PrecompiledHeader.cmake to FindPrecompiledHeader.cmake, then you can use FIND_PACKAGE( PrecompiledHeader REQUIRED ) rather than include...

Adding "IMPLICIT_DEPENDS CXX ${_pch_header}" in addition to "DEPENDS ${_pch_header}" fixed it for me. https://github.com/LucidFusionLabs/cmake-precompiled-header/commit/27eda54069418de6ed1b72d5ed0419c8a7b16d04 is the fork I'm using. Thanks!

This is because with Ninja generator 'CMAKE_CFG_INTDIR' get resolves to '.' thus making all projects pointing to the same file which at this point in time it is not supported....

## GCC pre-compiled header found in different folder (Idea) I got gcc pre-compiled headers to work with a regular makefile and tried your code and played with it. The whole...

For gcc in release mode, -DNDEBUG flag is missing when pch is generated. As the pch is not generated with the same flags, it is not used during the compilation...

setting 'CMAKE_CXX_STANDARD' is not being applied to the compiler flags. It causes compilation to fail when using c++11 or greater features.

if some in CMakeLists.txt have : target_compile_definitions(test-cxx-force PUBLIC OPENFLAG=\"Open\") build wrong gch file. if call cmake with -DCMAKE_BUILD_TYPE=Debug build wrong gch file. Try this lifehack :) #export_all_flags("${_pch_flags_file}") #set(_compiler_FLAGS "@${_pch_flags_file}") add_custom_command(...

Using the `add_subdirectory` function in cmake to include a project using a precompiled header will work with VS/MSBuild generators, but the NMake generator will not detect its output binaries and...

For some reason, the `-g` flag is not in CMake's `$` nor ...`COMPILE_OPTIONS`, and so doesn't get written to the `.rsp` file. This results in a warning of different options...