Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bill Hoffman
CMake
Commits
bb77dc0c
Commit
bb77dc0c
authored
Jul 07, 2018
by
Fred Baksik
Browse files
GHS: Set primary target using arch/platform values (or user specified value)
parent
f80692cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Help/generator/Green Hills MULTI.rst
View file @
bb77dc0c
...
...
@@ -19,6 +19,11 @@ Default to ``integrity``.
Usual values are ``integrity``, ``threadx``, ``uvelosity``,
``velosity``, ``vxworks``, ``standalone``.
* ``GHS_PRIMARY_TARGET``
Sets ``primaryTarget`` field in project file.
Defaults to ``<arch>_<GHS_TARGET_PLATFORM>.tgt``.
* ``GHS_TOOLSET_ROOT``
Default to ``C:/ghs``. Root path for ``toolset``.
...
...
Modules/Platform/GHS-MULTI-Initialize.cmake
View file @
bb77dc0c
...
...
@@ -33,7 +33,6 @@ if (NOT GHS_INT_DIRECTORY)
endif
()
set
(
GHS_OS_DIR
${
GHS_INT_DIRECTORY
}
CACHE PATH
"OS directory"
)
set
(
GHS_PRIMARY_TARGET
"arm_integrity.tgt"
CACHE STRING
"target for compilation"
)
set
(
GHS_BSP_NAME
"simarm"
CACHE STRING
"BSP name"
)
set
(
GHS_CUSTOMIZATION
""
CACHE FILEPATH
"optional GHS customization"
)
mark_as_advanced
(
GHS_CUSTOMIZATION
)
...
...
Source/cmGlobalGhsMultiGenerator.cxx
View file @
bb77dc0c
...
...
@@ -335,8 +335,26 @@ void cmGlobalGhsMultiGenerator::WriteMacros()
void
cmGlobalGhsMultiGenerator
::
WriteHighLevelDirectives
()
{
*
this
->
GetBuildFileStream
()
<<
"primaryTarget=arm_integrity.tgt"
<<
std
::
endl
;
/* set primary target */
std
::
string
tgt
;
const
char
*
t
=
this
->
GetCMakeInstance
()
->
GetCacheDefinition
(
"GHS_PRIMARY_TARGET"
);
if
(
t
)
{
tgt
=
t
;
this
->
GetCMakeInstance
()
->
MarkCliAsUsed
(
"GHS_PRIMARY_TARGET"
);
}
else
{
const
char
*
a
=
this
->
GetCMakeInstance
()
->
GetCacheDefinition
(
"CMAKE_GENERATOR_PLATFORM"
);
const
char
*
p
=
this
->
GetCMakeInstance
()
->
GetCacheDefinition
(
"GHS_TARGET_PLATFORM"
);
tgt
=
(
a
?
a
:
""
);
tgt
+=
"_"
;
tgt
+=
(
p
?
p
:
""
);
tgt
+=
".tgt"
;
}
*
this
->
GetBuildFileStream
()
<<
"primaryTarget="
<<
tgt
<<
std
::
endl
;
char
const
*
const
customization
=
this
->
GetCMakeInstance
()
->
GetCacheDefinition
(
"GHS_CUSTOMIZATION"
);
if
(
NULL
!=
customization
&&
strlen
(
customization
)
>
0
)
{
...
...
Tests/CMakeLists.txt
View file @
bb77dc0c
...
...
@@ -2256,7 +2256,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-generator
"Green Hills MULTI"
--build-project ReturnNum
--build-config $<CONFIGURATION>
--build-options -DGHS_PRIMARY_TARGET=
"
arm_integrity.tgt
"
--build-options -DGHS_PRIMARY_TARGET=arm_integrity.tgt
-DGHS_BSP_NAME=
"simarm"
)
endif
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment