diff options
author | Fred Baksik <fdk17@ftml.net> | 2021-11-15 18:15:10 (GMT) |
---|---|---|
committer | Fred Baksik <fdk17@ftml.net> | 2021-11-15 18:15:10 (GMT) |
commit | 831607889f6d197bba260fc604cd5df992d248b0 (patch) | |
tree | 47372a39aa91e53db765ce6b738d2d1190131d90 /Modules/CMakeDetermineCompilerId.cmake | |
parent | bff48c59080784217383a270cc5e6af4f0d7e510 (diff) | |
download | CMake-831607889f6d197bba260fc604cd5df992d248b0.zip CMake-831607889f6d197bba260fc604cd5df992d248b0.tar.gz CMake-831607889f6d197bba260fc604cd5df992d248b0.tar.bz2 |
GHS: Update selection of primaryTarget in MULTI project file
Changes to ``-A`` handling:
* Don't force CMAKE_GENERATOR_PLATFORM into cache when using default
value (breaks using CMake presets).
* Don't print message when using default value (breaks CMake tests).
Changes to ``GHS_PRIMARY_TARGET`` handling:
* Add as a cache variable so its known to GUI
* Don't always include``GHS_TARGET_PLATFORM``, it's only needed if
``GHS_PRIMARY_TARGET`` wasn't set by the user.
* Set ``GHS_PRIMARY_TARGET`` during platform selection instead of when
a language is enabled. By performing this sooner
``GHS_TARGET_PLATFORM`` is not always required to be set into cache.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index edfa016..b7119a8 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -662,12 +662,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} elseif("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI") set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR}) set(id_src "${src}") - if (GHS_PRIMARY_TARGET) - set(ghs_primary_target "${GHS_PRIMARY_TARGET}") - else() - set(ghs_primary_target "${CMAKE_GENERATOR_PLATFORM}_${GHS_TARGET_PLATFORM}.tgt") - endif() - if ("${GHS_TARGET_PLATFORM}" MATCHES "integrity") + set(ghs_primary_target "${GHS_PRIMARY_TARGET}") + if ("${ghs_primary_target}" MATCHES "integrity") set(bsp_name "macro GHS_BSP=${GHS_BSP_NAME}") set(os_dir "macro GHS_OS=${GHS_OS_DIR}") endif() |