Don't skip the last builtin include dir for the Eclipse project file
The regex was slightly wrong, it excluded the last line, so e.g. /usr/include/ didn't end up in the .cproject file. Thanks to Shash Chatterjee for the patch. Alex
This commit is contained in:
parent
4371147ef4
commit
6a38cab2de
|
@ -45,7 +45,7 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
|
||||||
FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
|
FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
|
||||||
|
|
||||||
# First find the system include dirs:
|
# First find the system include dirs:
|
||||||
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
|
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
|
||||||
|
|
||||||
# split the output into lines and then remove leading and trailing spaces from each of them:
|
# split the output into lines and then remove leading and trailing spaces from each of them:
|
||||||
STRING(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
|
STRING(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
|
||||||
|
@ -54,7 +54,7 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
|
||||||
LIST(APPEND ${_resultIncludeDirs} "${_includePath}")
|
LIST(APPEND ${_resultIncludeDirs} "${_includePath}")
|
||||||
ENDFOREACH(nextLine)
|
ENDFOREACH(nextLine)
|
||||||
|
|
||||||
ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
|
ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
|
||||||
|
|
||||||
|
|
||||||
# now find the builtin macros:
|
# now find the builtin macros:
|
||||||
|
|
Loading…
Reference in New Issue