diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index a4aaa0bd322..0192386ddbe 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -28,8 +28,6 @@ #include "cppmodelmanager.h" #include "headerpathfilter.h" -#include - #include #include @@ -385,8 +383,11 @@ void CompilerOptionsBuilder::addProjectMacros() { static const int useMacros = qEnvironmentVariableIntValue("QTC_CLANG_USE_TOOLCHAIN_MACROS"); - if (m_projectPart.toolchainType == BareMetal::Constants::IAREW_TOOLCHAIN_TYPEID || useMacros) + if (m_projectPart.toolchainType == ProjectExplorer::Constants::CUSTOM_TOOLCHAIN_TYPEID + || m_projectPart.toolchainType.name().contains("BareMetal") + || useMacros) { addMacros(m_projectPart.toolChainMacros); + } addMacros(m_projectPart.projectMacros); }