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

cmGeneratorTarget: Return non-const sources from GetAllConfigSources

We need a non-const pointer to `cmSourceFile` instances in order to
call `GetOrDetermineLanguage` on them.
Brad King 6 лет назад
Родитель
Сommit
fd2c9fac10
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      Source/cmGeneratorTarget.h
  2. 1 1
      Source/cmLocalVisualStudio7Generator.cxx

+ 1 - 1
Source/cmGeneratorTarget.h

@@ -123,7 +123,7 @@ public:
 
   struct AllConfigSource
   {
-    cmSourceFile const* Source;
+    cmSourceFile* Source;
     cmGeneratorTarget::SourceKind Kind;
     std::vector<size_t> Configs;
   };

+ 1 - 1
Source/cmLocalVisualStudio7Generator.cxx

@@ -1329,7 +1329,7 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
   // Add CMakeLists.txt file with rule to re-run CMake for user convenience.
   if (target->GetType() != cmStateEnums::GLOBAL_TARGET &&
       target->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
-    if (cmSourceFile const* sf = this->CreateVCProjBuildRule()) {
+    if (cmSourceFile* sf = this->CreateVCProjBuildRule()) {
       cmGeneratorTarget::AllConfigSource acs;
       acs.Source = sf;
       acs.Kind = cmGeneratorTarget::SourceKindCustomCommand;