소스 검색

BUG: Use NOINHERIT macro to avoid linking to project default libraries which may not exist.

Brad King 19 년 전
부모
커밋
5288d61ede
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      Source/cmLocalVisualStudio7Generator.cxx

+ 6 - 2
Source/cmLocalVisualStudio7Generator.cxx

@@ -778,8 +778,10 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
       fout << " " << cmLocalVisualStudio7Generator::EscapeForXML(
         extraLinkOptions.c_str()).c_str();
       }
+    // Use the NOINHERIT macro to avoid getting VS project default
+    // libraries which may be set by the user to something bad.
     fout << "\"\n"
-         << "\t\t\t\tAdditionalDependencies=\"";
+         << "\t\t\t\tAdditionalDependencies=\"$(NOINHERIT) ";
     this->OutputLibraries(fout, linkLibs);
     fout << "\"\n";
     temp = m_LibraryOutputPath;
@@ -846,8 +848,10 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
       fout << " " << cmLocalVisualStudio7Generator::EscapeForXML(
         extraLinkOptions.c_str()).c_str();
       }
+    // Use the NOINHERIT macro to avoid getting VS project default
+    // libraries which may be set by the user to something bad.
     fout << "\"\n"
-         << "\t\t\t\tAdditionalDependencies=\""
+         << "\t\t\t\tAdditionalDependencies=\"$(NOINHERIT) "
          << m_Makefile->GetRequiredDefinition("CMAKE_STANDARD_LIBRARIES") 
          << " ";
     this->OutputLibraries(fout, linkLibs);