[CMAKE] Fix use of CLang

- Updated toolchain file
 - set GCC variable when using CLang in "GCC mode"
 - Properly retrieve GCC support libraries
 - Various flags needed to get this going
This commit is contained in:
Jérôme Gardou 2020-09-10 23:23:14 +02:00 committed by Jérôme Gardou
parent d6d5caec7c
commit edc1f3ca56
5 changed files with 92 additions and 55 deletions

View file

@ -705,7 +705,10 @@ endfunction()
function(get_defines OUTPUT_VAR)
get_directory_property(_defines COMPILE_DEFINITIONS)
foreach(arg ${_defines})
list(APPEND __tmp_var -D${arg})
# Skip generator expressions
if (NOT arg MATCHES [[^\$<.*>$]])
list(APPEND __tmp_var -D${arg})
endif()
endforeach()
set(${OUTPUT_VAR} ${__tmp_var} PARENT_SCOPE)
endfunction()