diff options
author | Fred Baksik <frodak17@gmail.com> | 2019-01-05 16:01:20 (GMT) |
---|---|---|
committer | Fred Baksik <frodak17@gmail.com> | 2019-01-16 15:41:03 (GMT) |
commit | 5cef3c61fc815393248762c14ba1878aae68394d (patch) | |
tree | f50de502f49e9c7dc43ec2195d3951a955cf4399 /Tests/GhsMulti/GhsMultiObjectLibrary | |
parent | a42e40e78dc3d9c4289a3c9640cae94ecd034373 (diff) | |
download | CMake-5cef3c61fc815393248762c14ba1878aae68394d.zip CMake-5cef3c61fc815393248762c14ba1878aae68394d.tar.gz CMake-5cef3c61fc815393248762c14ba1878aae68394d.tar.bz2 |
GHS: Update test suite
-- Update test suite so that CMake can use multiple toolsets
CMake_TEST_GreenHillsMULTI_config
ghs_config_name
ghs_target_arch
ghs_tools
ghs_toolset_name
ghs_os_root
ghs_os_dir
ghs_target_platform
ghs_bsp_name
-- Change ARM Integrity test to generic Integrity test
Add Monolithic build test
-- Add other GHS generator tests
Diffstat (limited to 'Tests/GhsMulti/GhsMultiObjectLibrary')
-rw-r--r-- | Tests/GhsMulti/GhsMultiObjectLibrary/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/GhsMulti/GhsMultiObjectLibrary/exe.c | 8 | ||||
-rw-r--r-- | Tests/GhsMulti/GhsMultiObjectLibrary/sub/testOBJ.c | 4 | ||||
-rw-r--r-- | Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.c | 4 | ||||
-rw-r--r-- | Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.h | 1 | ||||
-rw-r--r-- | Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ2.c | 4 |
6 files changed, 31 insertions, 0 deletions
diff --git a/Tests/GhsMulti/GhsMultiObjectLibrary/CMakeLists.txt b/Tests/GhsMulti/GhsMultiObjectLibrary/CMakeLists.txt new file mode 100644 index 0000000..7fe91bc --- /dev/null +++ b/Tests/GhsMulti/GhsMultiObjectLibrary/CMakeLists.txt @@ -0,0 +1,10 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + +project(test C) + +add_library(obj1 OBJECT testObj.c testObj.h sub/testObj.c testObj2.c) + +add_executable(exe1 exe.c $<TARGET_OBJECTS:obj1>) diff --git a/Tests/GhsMulti/GhsMultiObjectLibrary/exe.c b/Tests/GhsMulti/GhsMultiObjectLibrary/exe.c new file mode 100644 index 0000000..c2c5a19 --- /dev/null +++ b/Tests/GhsMulti/GhsMultiObjectLibrary/exe.c @@ -0,0 +1,8 @@ +extern int funcOBJ(void); +extern int funcOBJ2(void); +extern int funcOBJs(void); + +int main(void) +{ + return funcOBJ() + funcOBJ2() + funcOBJs(); +} diff --git a/Tests/GhsMulti/GhsMultiObjectLibrary/sub/testOBJ.c b/Tests/GhsMulti/GhsMultiObjectLibrary/sub/testOBJ.c new file mode 100644 index 0000000..5228ef2 --- /dev/null +++ b/Tests/GhsMulti/GhsMultiObjectLibrary/sub/testOBJ.c @@ -0,0 +1,4 @@ +int funcOBJs(void) +{ + return 2; +} diff --git a/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.c b/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.c new file mode 100644 index 0000000..ec6f2c3 --- /dev/null +++ b/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.c @@ -0,0 +1,4 @@ +int funcOBJ(void) +{ + return 2; +} diff --git a/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.h b/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.h new file mode 100644 index 0000000..9aef431 --- /dev/null +++ b/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ.h @@ -0,0 +1 @@ +extern int funcOBJ(void); diff --git a/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ2.c b/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ2.c new file mode 100644 index 0000000..b6a9b93 --- /dev/null +++ b/Tests/GhsMulti/GhsMultiObjectLibrary/testOBJ2.c @@ -0,0 +1,4 @@ +int funcOBJ2(void) +{ + return 2; +} |