GHS: try_compile() now uses GHS platform variables

-- Forward GHS platform variables to try_compile()
   CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only worked for source signature try_compile()
-- Update tests to no longer add GHS platform variables to try_compile()
-- Avoid linker error in GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt by building library
This commit is contained in:
Fred Baksik
2019-01-08 23:52:12 -05:00
parent 4a1ec0de3d
commit 436cc5e991
9 changed files with 39 additions and 15 deletions
@@ -9,11 +9,6 @@ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
try_compile(RESULT
${CMAKE_CURRENT_BINARY_DIR}/build
${CMAKE_CURRENT_SOURCE_DIR}/test.c
CMAKE_FLAGS -DGHS_BSP_NAME=${GHS_BSP_NAME}
-DGHS_OS_ROOT=${GHS_OS_ROOT}
-DGHS_OS_DIR=${GHS_OS_DIR}
-DGHS_TOOLSET_ROOT=${GHS_TOOLSET_ROOT}
-DGHS_TARGET_PLATFORM=${GHS_TARGET_PLATFORM}
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/test_library"
)