summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2022-11-01 15:04:54 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-01 18:59:24 (GMT)
commit73e84a392bc2edc53a4e7b4cc8356a4a0c2b5c8f (patch)
tree96446421940d7b41fdaa957952e14bbf65d2d7d2 /Modules/Compiler
parentb45f9b364382839995c76bc9794bb5ae8fb787b5 (diff)
downloadCMake-73e84a392bc2edc53a4e7b4cc8356a4a0c2b5c8f.zip
CMake-73e84a392bc2edc53a4e7b4cc8356a4a0c2b5c8f.tar.gz
CMake-73e84a392bc2edc53a4e7b4cc8356a4a0c2b5c8f.tar.bz2
IAR: Restore support for CMAKE_CXX_FLAGS_INIT
Prior to commit a9073db736 (IAR: update language specification detection, 2021-09-23, v3.22.0-rc1~83^2) the `--c++`/`--eec++` flags were stored in `CMAKE_IAR_CXX_FLAG` so that they would be used as part of the `CMAKE_CXX_COMPILE_OBJECT` rule variable. That commit moved the flags to `CMAKE_CXX_FLAGS`, which also broke initialization of `CMAKE_CXX_FLAGS` from `CMAKE_CXX_FLAGS_INIT`. Restore the original approach. Fixes: #24111
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/IAR-CXX.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake
index 6c15735..3f0ef1f 100644
--- a/Modules/Compiler/IAR-CXX.cmake
+++ b/Modules/Compiler/IAR-CXX.cmake
@@ -22,9 +22,9 @@ if(NOT CMAKE_IAR_CXX_FLAG)
set(_CMAKE_IAR_MODERNCXX_LIST 14 17)
if(${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} IN_LIST _CMAKE_IAR_MODERNCXX_LIST OR
("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM" AND ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} EQUAL 98))
- string(PREPEND CMAKE_CXX_FLAGS "--c++ ")
+ set(CMAKE_IAR_CXX_FLAG --c++)
else()
- string(PREPEND CMAKE_CXX_FLAGS "--eec++ ")
+ set(CMAKE_IAR_CXX_FLAG --eec++)
endif()
unset(_CMAKE_IAR_MODERNCXX_LIST)