diff --git a/src/lib_cxx/project/SourceGroupCxxEmpty.cpp b/src/lib_cxx/project/SourceGroupCxxEmpty.cpp index d0b68ea5..e5e29be7 100644 --- a/src/lib_cxx/project/SourceGroupCxxEmpty.cpp +++ b/src/lib_cxx/project/SourceGroupCxxEmpty.cpp @@ -113,6 +113,12 @@ std::vector> SourceGroupCxxEmpty::getIndexerComm } } + if (std::dynamic_pointer_cast(m_settings)) + { + compilerFlags.push_back(L"-x"); + compilerFlags.push_back(L"c++"); + } + utility::append(compilerFlags, m_settings->getCompilerFlags()); std::string languageStandard = SourceGroupSettingsWithCppStandard::getDefaultCppStandardStatic(); @@ -121,10 +127,10 @@ std::vector> SourceGroupCxxEmpty::getIndexerComm { languageStandard = cSettings->getCStandard(); } - else if (std::shared_ptr cppSettisngs = + else if (std::shared_ptr cppSettings = std::dynamic_pointer_cast(m_settings)) { - languageStandard = cppSettisngs->getCppStandard(); + languageStandard = cppSettings->getCppStandard(); } else {