summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2019-07-09 16:52:40 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-09 17:12:52 (GMT)
commit98e371f13e0a8dc35367f98b027f62802b3ed280 (patch)
treec4a33a77ae6de190fcb6e2875157258fe44f0215 /Modules
parentf3e9a6ff62f6f58cd661dd447c22a01c50f6f4ad (diff)
downloadCMake-98e371f13e0a8dc35367f98b027f62802b3ed280.zip
CMake-98e371f13e0a8dc35367f98b027f62802b3ed280.tar.gz
CMake-98e371f13e0a8dc35367f98b027f62802b3ed280.tar.bz2
Cray: Fix include parsing when the -hlist= flag is present
Update parsing logic from commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2) to handle the quoting behavior caused by the `-hlist=` flag.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeParseImplicitIncludeInfo.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake
index c42474b..f044b10 100644
--- a/Modules/CMakeParseImplicitIncludeInfo.cmake
+++ b/Modules/CMakeParseImplicitIncludeInfo.cmake
@@ -15,9 +15,9 @@ function(cmake_parse_implicit_include_line line lang id_var log_var state_var)
if("${CMAKE_${lang}_COMPILER_ID}" STREQUAL "Cray" AND
"${line}" MATCHES "^/" AND "${line}" MATCHES "/ccfe |/ftnfe " AND
"${line}" MATCHES " -isystem| -I")
- string(REGEX MATCHALL " (-I ?|-isystem )([^ ]*)" incs "${line}")
+ string(REGEX MATCHALL " (-I ?|-isystem )(\"[^\"]+\"|[^ \"]+)" incs "${line}")
foreach(inc IN LISTS incs)
- string(REGEX REPLACE " (-I ?|-isystem )([^ ]*)" "\\2" idir "${inc}")
+ string(REGEX REPLACE " (-I ?|-isystem )(\"[^\"]+\"|[^ \"]+)" "\\2" idir "${inc}")
list(APPEND rv "${idir}")
endforeach()
if(rv)