summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-20 18:02:52 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-20 18:02:52 (GMT)
commit5e0e65c18926b0a9c5b66ff4ec93d45cc008d383 (patch)
tree2d9276431fe32440bb6e83a2f2406731f3a0e2de /Tests
parent8056dda8a2406b63c94d4aca3f79187747c0a120 (diff)
parent66b641f443a1d3fc8b5f74233307ba9b0929d340 (diff)
downloadCMake-5e0e65c18926b0a9c5b66ff4ec93d45cc008d383.zip
CMake-5e0e65c18926b0a9c5b66ff4ec93d45cc008d383.tar.gz
CMake-5e0e65c18926b0a9c5b66ff4ec93d45cc008d383.tar.bz2
Merge topic 'add-GreenHills-MULTI-generator'
66b641f4 Help: Add notes for topic 'add-GreenHills-MULTI-generator' 48004d9d Add a 'Green Hills MULTI' generator on Windows 051d8be1 cmLocalGenerator: Constify some cmTarget and cmGeneratorTarget arguments
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt17
-rw-r--r--Tests/GhsMulti/CMakeLists.txt4
-rw-r--r--Tests/GhsMulti/ReturnNum/App/CMakeLists.txt4
-rw-r--r--Tests/GhsMulti/ReturnNum/App/Main.c8
-rw-r--r--Tests/GhsMulti/ReturnNum/CMakeLists.txt3
-rw-r--r--Tests/GhsMulti/ReturnNum/Int/AppDD.int12
-rw-r--r--Tests/GhsMulti/ReturnNum/Int/CMakeLists.txt1
-rw-r--r--Tests/GhsMulti/ReturnNum/Int/Default.bsp35
-rw-r--r--Tests/GhsMulti/ReturnNum/Lib/CMakeLists.txt1
-rw-r--r--Tests/GhsMulti/ReturnNum/Lib/HelperFun.c4
-rw-r--r--Tests/GhsMulti/ReturnNum/Lib/HelperFun.h1
11 files changed, 90 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index b474d32..699b616 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1967,6 +1967,23 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
endif()
endif()
+ if (CMake_TEST_GreenHillsMULTI)
+ macro(add_test_GhsMulti name primaryTarget bspName)
+ add_test(NAME GhsMulti.${name} COMMAND ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/GhsMulti"
+ "${CMake_BINARY_DIR}/Tests/GhsMulti/${name}"
+ --build-generator "Green Hills MULTI"
+ --build-project ReturnNum
+ --build-config $<CONFIGURATION>
+ --build-options -DGHS_PRIMARY_TARGET=${primaryTarget}
+ -DGHS_BSP_NAME=${bspName}
+ )
+ endmacro ()
+ add_test_GhsMulti("arm_integrity_simarm" "arm_integrity.tgt" "simarm")
+ add_test_GhsMulti("arm64_integrity_simarm" "arm64_integrity.tgt" "simarm")
+ endif ()
+
if(tegra AND NOT "${CMake_SOURCE_DIR};${CMake_BINARY_DIR}" MATCHES " ")
macro(add_test_VSNsightTegra name generator)
add_test(NAME VSNsightTegra.${name} COMMAND ${CMAKE_CTEST_COMMAND}
diff --git a/Tests/GhsMulti/CMakeLists.txt b/Tests/GhsMulti/CMakeLists.txt
new file mode 100644
index 0000000..6e15ba9
--- /dev/null
+++ b/Tests/GhsMulti/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
+project(ReturnNum)
+
+add_subdirectory(ReturnNum)
diff --git a/Tests/GhsMulti/ReturnNum/App/CMakeLists.txt b/Tests/GhsMulti/ReturnNum/App/CMakeLists.txt
new file mode 100644
index 0000000..2adbd4e
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/App/CMakeLists.txt
@@ -0,0 +1,4 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Lib)
+add_executable(App Main.c)
+target_link_libraries(App Lib)
+target_compile_options(App PUBLIC "-non_shared")
diff --git a/Tests/GhsMulti/ReturnNum/App/Main.c b/Tests/GhsMulti/ReturnNum/App/Main.c
new file mode 100644
index 0000000..1133834
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/App/Main.c
@@ -0,0 +1,8 @@
+#include "HelperFun.h"
+
+int main(int argc, const char* argv[])
+{
+ int out;
+ out = giveNum();
+ return out;
+}
diff --git a/Tests/GhsMulti/ReturnNum/CMakeLists.txt b/Tests/GhsMulti/ReturnNum/CMakeLists.txt
new file mode 100644
index 0000000..7bcc5f9
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory(App)
+add_subdirectory(Int)
+add_subdirectory(Lib)
diff --git a/Tests/GhsMulti/ReturnNum/Int/AppDD.int b/Tests/GhsMulti/ReturnNum/Int/AppDD.int
new file mode 100644
index 0000000..9e22b5e
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/Int/AppDD.int
@@ -0,0 +1,12 @@
+# Input File for the Integrate utility for use with the INTEGRITY real-time
+# operating system by Green Hills Software.
+# Before editing this file, refer to the Integrate Reference Manual.
+
+Kernel
+ Filename DynamicDownload
+EndKernel
+
+AddressSpace App
+ Filename "App/App.as"
+ Language C
+EndAddressSpace
diff --git a/Tests/GhsMulti/ReturnNum/Int/CMakeLists.txt b/Tests/GhsMulti/ReturnNum/Int/CMakeLists.txt
new file mode 100644
index 0000000..44c5de1
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/Int/CMakeLists.txt
@@ -0,0 +1 @@
+add_executable(AppDD AppDD.int Default.bsp)
diff --git a/Tests/GhsMulti/ReturnNum/Int/Default.bsp b/Tests/GhsMulti/ReturnNum/Int/Default.bsp
new file mode 100644
index 0000000..224ec29
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/Int/Default.bsp
@@ -0,0 +1,35 @@
+# Target description File for the Integrate utility for use with the
+# INTEGRITY real-time operating system by Green Hills Software.
+# Before editing this file, refer to your Integrate documentation.
+# default.bsp is appropriate for INTEGRITY applications which are
+# fully linked with the kernel (for RAM or ROM) or dynamically downloaded.
+#
+# MinimumAddress must match the value of .ramend in the linker directives
+# file used for the KernelSpace program - see default.ld for more info.
+# The MaximumAddress used here allows memory mappings to be specified
+# for up to the 16 MB mark in RAM. Intex will not permit programs
+# that require more memory for its mappings. If the board has less
+# memory, this number can be reduced by the user.
+
+Target
+ MinimumAddress .ramend
+ MaximumAddress .ramlimit
+ Clock StandardTick
+ EndClock
+ Clock HighResTimer
+ EndClock
+ IODevice "SerialDev0"
+ InitialKernelObjects 200
+ DefaultStartIt false
+ DefaultMaxPriority 255
+ DefaultPriority 127
+ DefaultWeight 1
+ DefaultMaxWeight 255
+ DefaultHeapSize 0x10000
+ LastVirtualAddress 0x3fffffff
+ PageSize 0x1000
+ ArchitectedPageSize 0x1000
+ ArchitectedPageSize 0x10000
+ ArchitectedPageSize 0x100000
+ DefaultMemoryRegionSize 0x20000
+EndTarget
diff --git a/Tests/GhsMulti/ReturnNum/Lib/CMakeLists.txt b/Tests/GhsMulti/ReturnNum/Lib/CMakeLists.txt
new file mode 100644
index 0000000..9c822da
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/Lib/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(Lib HelperFun.c HelperFun.h) \ No newline at end of file
diff --git a/Tests/GhsMulti/ReturnNum/Lib/HelperFun.c b/Tests/GhsMulti/ReturnNum/Lib/HelperFun.c
new file mode 100644
index 0000000..d7515d7
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/Lib/HelperFun.c
@@ -0,0 +1,4 @@
+int giveNum(void)
+{
+ return 1;
+}
diff --git a/Tests/GhsMulti/ReturnNum/Lib/HelperFun.h b/Tests/GhsMulti/ReturnNum/Lib/HelperFun.h
new file mode 100644
index 0000000..00971b0
--- /dev/null
+++ b/Tests/GhsMulti/ReturnNum/Lib/HelperFun.h
@@ -0,0 +1 @@
+int giveNum(void);