cmake: detect compiler install path in a LANG-agnostic way

This commit is contained in:
Lephenixnoir 2021-01-30 23:01:28 +01:00
parent 8259e2dfc8
commit 0db7ae9e2b
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 4 additions and 4 deletions

View file

@ -26,8 +26,8 @@ set(FXSDK_CMAKE_MODULE_PATH "${FXSDK_CMAKE_MODULE_PATH}")
# Determine compiler install path
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-search-dirs
COMMAND grep install
COMMAND sed "s/install: //"
COMMAND head -n 1
COMMAND sed -E "s/^[^:]+: //"
OUTPUT_VARIABLE FXSDK_COMPILER_INSTALL
OUTPUT_STRIP_TRAILING_WHITESPACE
)

View file

@ -26,8 +26,8 @@ set(FXSDK_CMAKE_MODULE_PATH "${FXSDK_CMAKE_MODULE_PATH}")
# Determine compiler install path
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-search-dirs
COMMAND grep install
COMMAND sed "s/install: //"
COMMAND head -n 1
COMMAND sed -E "s/^[^:]+: //"
OUTPUT_VARIABLE FXSDK_COMPILER_INSTALL
OUTPUT_STRIP_TRAILING_WHITESPACE
)