mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
gcc-9: fix CMake parsing of CPU architecture
GCC-9 adds known options section for march that causes regex replace failure in CMake file Fixes github issue #136
This commit is contained in:
parent
f9c78376d9
commit
5c8f06e4c8
@ -191,6 +191,8 @@ else()
|
||||
set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -march=native -mtune=native)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS}
|
||||
OUTPUT_VARIABLE _GCC_OUTPUT)
|
||||
string(FIND "${_GCC_OUTPUT}" "Known" POS)
|
||||
string(SUBSTRING "${_GCC_OUTPUT}" 0 ${POS} _GCC_OUTPUT)
|
||||
string(REGEX REPLACE ".*march=[ \t]*([^ \n]*)[ \n].*" "\\1"
|
||||
GNUCC_ARCH "${_GCC_OUTPUT}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user