Skip to content

Compute implicit include directories from compiler output

chuck cranor requested to merge chuck/cmake:implicit-includes into master
  • CMakeParseImplicitIncludeInfo.cmake: new parser that extracts compiler's include path from verbose output (works for gcc/clang)

  • CMakeDetermineCompilerABI.cmake:

    • use verbose flag in try_compile for ${src}
    • use new CMAKE_PARSE_IMPLICIT_INCLUDE_INFO() to attempt extract implicit include directory path and if successful set CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES
  • CMakeCCompiler.cmake.in and CMakeCXXCompiler.cmake.in - preserve CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES value between runs in the same way CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES is preserved

Fixes: #16291 (closed)

Edited by Brad King

Merge request reports