summaryrefslogtreecommitdiffstats
path: root/Tests/GhsMulti
diff options
context:
space:
mode:
authorFred Baksik <frodak17@gmail.com>2019-01-05 16:01:23 (GMT)
committerFred Baksik <frodak17@gmail.com>2019-01-16 15:41:49 (GMT)
commit0c9e47d7cdb498f9bc29231587030e0840c9f00c (patch)
tree200dc29247760304c6e754f5ec7d80943dd4fcb7 /Tests/GhsMulti
parent80443184317e97999da63d71549aa1b89997dc3d (diff)
downloadCMake-0c9e47d7cdb498f9bc29231587030e0840c9f00c.zip
CMake-0c9e47d7cdb498f9bc29231587030e0840c9f00c.tar.gz
CMake-0c9e47d7cdb498f9bc29231587030e0840c9f00c.tar.bz2
GHS: Integrity Application updates
-- Check the property "ghs_integrity_app" on executables to set [INTEGRITY Application] If the property is not set then check if an integrate file is one of the source files (.int file). Dynamic Downloads that do not have an integrate file can use this property along with setting the compiler flag "-dynamic". -- Remove parsing for -dynamic flag; it is only used to print a comment The MULTI GUI will show if it is a Monolith or Dynamic Download application -- Use project references to specify which executables are part of the Integrity Application Usually Implicit Dependency Analysis will ensure that executable targets become part of the application. This does not work for Dynamic Download without integrate files. Use `add_dependencies(dd vas)` to mark that the vas target is part of dd target. -- Update file locations in the Integrate files.
Diffstat (limited to 'Tests/GhsMulti')
-rw-r--r--Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/CMakeLists.txt17
-rw-r--r--Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/exe.c5
-rw-r--r--Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/func.c4
-rw-r--r--Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDDInt/Int/AppDD.int2
-rw-r--r--Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityMonolith/test.int4
5 files changed, 29 insertions, 3 deletions
diff --git a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/CMakeLists.txt b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/CMakeLists.txt
new file mode 100644
index 0000000..3d0642d
--- /dev/null
+++ b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/CMakeLists.txt
@@ -0,0 +1,17 @@
+# 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)
+
+# create virtual AS
+add_executable(vas exe.c)
+target_link_libraries(vas lib)
+add_library(lib func.c)
+
+# create dynamic download INTEGRITY application
+add_executable(dynamic)
+set_target_properties(dynamic PROPERTIES ghs_integrity_app ON)
+target_compile_options(dynamic PRIVATE -dynamic)
+add_dependencies(dynamic vas)
diff --git a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/exe.c b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/exe.c
new file mode 100644
index 0000000..29ad70a
--- /dev/null
+++ b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/exe.c
@@ -0,0 +1,5 @@
+extern int func(void);
+int main(void)
+{
+ return func();
+}
diff --git a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/func.c b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/func.c
new file mode 100644
index 0000000..b35e9cc
--- /dev/null
+++ b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDD/func.c
@@ -0,0 +1,4 @@
+int func(void)
+{
+ return 2;
+}
diff --git a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDDInt/Int/AppDD.int b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDDInt/Int/AppDD.int
index 9e22b5e..5035d58 100644
--- a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDDInt/Int/AppDD.int
+++ b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityDDInt/Int/AppDD.int
@@ -7,6 +7,6 @@ Kernel
EndKernel
AddressSpace App
- Filename "App/App.as"
+ Filename "App/App"
Language C
EndAddressSpace
diff --git a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityMonolith/test.int b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityMonolith/test.int
index 161345b..361793a 100644
--- a/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityMonolith/test.int
+++ b/Tests/GhsMulti/GhsMultiIntegrity/GhsMultiIntegrityMonolith/test.int
@@ -1,8 +1,8 @@
Kernel
- Filename kernel/kernel.as
+ Filename kernel
EndKernel
AddressSpace App
- Filename "vas/vas.as"
+ Filename vas
Language C
EndAddressSpace