Просмотр исходного кода

ENH: add a property for HAS_CXX to a target that will force the use of a c++ compiler in the linking of an executable that contains only c code

Bill Hoffman 21 лет назад
Родитель
Сommit
86bf9f396e
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Source/cmTarget.cxx

+ 4 - 0
Source/cmTarget.cxx

@@ -421,6 +421,10 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
 
 bool cmTarget::HasCxx() const
 {
+  if(this->GetProperty("HAS_CXX"))
+    {
+    return true;
+    }
   for(std::vector<cmSourceFile*>::const_iterator i =  m_SourceFiles.begin();
       i != m_SourceFiles.end(); ++i)
     {