summaryrefslogtreecommitdiffstats
path: root/Tests/GhsMulti
diff options
context:
space:
mode:
authorFred Baksik <frodak17@gmail.com>2019-01-09 04:52:12 (GMT)
committerFred Baksik <frodak17@gmail.com>2019-01-16 15:42:00 (GMT)
commit436cc5e991c7be07610d7902a5ce2a00221ca0a2 (patch)
tree912fdd8810121d1bc39520340b999c6c7c9ed7c0 /Tests/GhsMulti
parent4a1ec0de3d2102918284eff13763f2aa3d20d119 (diff)
downloadCMake-436cc5e991c7be07610d7902a5ce2a00221ca0a2.zip
CMake-436cc5e991c7be07610d7902a5ce2a00221ca0a2.tar.gz
CMake-436cc5e991c7be07610d7902a5ce2a00221ca0a2.tar.bz2
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
Diffstat (limited to 'Tests/GhsMulti')
-rw-r--r--Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt6
-rw-r--r--Tests/GhsMulti/GhsMultiCopyFile/CMakeLists.txt5
-rw-r--r--Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt6
3 files changed, 3 insertions, 14 deletions
diff --git a/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt b/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt
index 1436cbb..4a3f5c2 100644
--- a/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt
+++ b/Tests/GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt
@@ -14,14 +14,12 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.c
)
message("Building project")
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
try_compile(RESULT
${CMAKE_CURRENT_BINARY_DIR}/build
${CMAKE_CURRENT_BINARY_DIR}/src
test
- CMAKE_FLAGS -DGHS_BSP_NAME=${GHS_BSP_NAME}
- -DGHS_OS_ROOT=${GHS_OS_ROOT}
- -DGHS_TOOLSET_ROOT=${GHS_TOOLSET_ROOT}
- -DGHS_TARGET_PLATFORM=${GHS_TARGET_PLATFORM}
+ CMAKE_FLAGS
-DRUN_TEST=${RUN_TEST}
-DCMAKE_BUILD_TYPE=${RUN_TEST_BUILD_TYPE}
OUTPUT_VARIABLE OUTPUT)
diff --git a/Tests/GhsMulti/GhsMultiCopyFile/CMakeLists.txt b/Tests/GhsMulti/GhsMultiCopyFile/CMakeLists.txt
index 46d833b..d6d007d 100644
--- a/Tests/GhsMulti/GhsMultiCopyFile/CMakeLists.txt
+++ b/Tests/GhsMulti/GhsMultiCopyFile/CMakeLists.txt
@@ -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"
)
diff --git a/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt b/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt
index 9b23493..dfb72ce 100644
--- a/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt
+++ b/Tests/GhsMulti/GhsMultiLinkTest/CMakeLists.txt
@@ -25,11 +25,7 @@ try_compile(RESULT
${CMAKE_CURRENT_BINARY_DIR}/link_build
${CMAKE_CURRENT_BINARY_DIR}/link_src
test
- 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}
+ CMAKE_FLAGS
-DRUN_TEST=${RUN_TEST}
-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
OUTPUT_VARIABLE OUTPUT)