Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion cmake/compiler/gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ TOOLCHAIN_HOME: ${TOOLCHAIN_HOME}
")
endif()

execute_process(
COMMAND ${CMAKE_C_COMPILER} --version
RESULT_VARIABLE ret
OUTPUT_QUIET
ERROR_QUIET
)
if(ret)
message(FATAL_ERROR "Executing the below command failed. Are permissions set correctly?
'${CMAKE_C_COMPILER} --version'
"
)
endif()

if(CONFIG_CPLUSPLUS)
set(cplusplus_compiler ${CROSS_COMPILE}${C++})
else()
Expand All @@ -45,7 +58,7 @@ foreach(file_name include include-fixed)
COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name}
OUTPUT_VARIABLE _OUTPUT
)
string(REGEX REPLACE "\n" "" _OUTPUT ${_OUTPUT})
string(REGEX REPLACE "\n" "" _OUTPUT "${_OUTPUT}")

if(MSYS)
# TODO: Remove this when
Expand Down