Commit Graph

11 Commits

Author SHA1 Message Date
Fred Baksik
2bae6a1346 GHS: Update tests and notes
-- add new tests for custom commands
-- minor test cleanup

Fixes #15995
Fixes #18909
Fixes #15902
2019-04-11 13:15:51 -04:00
Naren Manimohan
2060a1445c Tests: Fix file name case in GHS object library test 2019-03-21 12:57:38 -04:00
Fred Baksik
21ab58d3f8 GHS: Update test suite
-- Allow for testing default toolset settings
   If CMake_TEST_GreenHillsMULTI_config is not defined then
   just run the GHS tests using defaults.
-- Handle paths that contain spaces
-- Update test suite to use "-non_shared" linker option
   Fixes linking issue if GHS is not shipped with shared libraries
-- Other minor cleanup
2019-01-16 10:42:08 -05:00
Fred Baksik
72e0c115b7 GHS: Add Compiler ID detection
-- Detect GHS compiler and version
   Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
   Detect PLATFORM_ID for Integrity and Integrity178 platforms
   Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
   Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
2019-01-16 10:42:04 -05:00
Fred Baksik
436cc5e991 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
2019-01-16 10:42:00 -05:00
Fred Baksik
1a66acdef2 GHS: Append ".gpj" to target name when generating build command
-- Add test demonstrating issue
-- In the case of executable targets the target name is usually the same as used in "-o filename"
   But for static libraries the target name is usually "-o libname.a"
   "gbuild.exe target" will build whatever target matches against even the output from the compiler or linker
   But the targets in "cmake --build . --target name" should be target names in CMakeLists.txt not the actual filenames
   So change the "name" to "name.gpj" so it matches the target name in CMakeLists.txt.

Fixes #15975
2019-01-16 10:41:53 -05:00
Fred Baksik
0c9e47d7cd 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.
2019-01-16 10:41:49 -05:00
Fred Baksik
e7825386e2 GHS: Cleanup how source files are listed
-- Sort the items of the project files, previously they were unsorted
   The layout is similar to Visual Studio projects
-- Do not make a make a tree of directories and projects files
   The main project file is in the binary folder
   The sub-project files are located in the project object directory
   This is similar to the Makefile generator
-- Allow the creation of a single project file
   If the variable or target property GHS_NO_SOURCE_GROUP_FILE is set
   then all sources will be listed in the main project file
2019-01-16 10:41:15 -05:00
Fred Baksik
5cef3c61fc 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
2019-01-16 10:41:03 -05:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Geoff Viola
48004d9dbe Add a 'Green Hills MULTI' generator on Windows
Green Hills MULTI is an IDE for embedded real-time systems.  The IDE's
product page can be found here:

 http://www.ghs.com/products/MULTI_IDE.html

It supports cross compiling on ARM, Intel x86, and other architectures
with various operating systems.  The IDE exists on Linux and Windows
host systems, but CMake will currently only generate the project files
on Windows host systems.
2015-04-20 13:55:40 -04:00