Исправление связки cotire + clang

This commit is contained in:
Andrei Astafev 2020-10-15 06:55:02 +03:00
parent 39111c890a
commit 0e96514413

View File

@ -1136,6 +1136,11 @@ function (cotire_parse_includes _language _scanOutput _ignoredIncludeDirs _honor
string (REPLACE ";" "\\;" _scanOutput "${_scanOutput}")
# then separate lines
string (REGEX REPLACE "\n" ";" _scanOutput "${_scanOutput}")
if ("${_language}" STREQUAL "CXX")
# Fix clang9's libc++ errno
message (STATUS "replacing <stdlib.h> with <cstdlib>")
string (REGEX REPLACE "include_next" "include" _scanOutput "${_scanOutput}")
endif()
list (LENGTH _scanOutput _len)
# remove duplicate lines to speed up parsing
list (REMOVE_DUPLICATES _scanOutput)