diff options
77 files changed, 64 insertions, 4221 deletions
diff --git a/.gitattributes b/.gitattributes index d3f7280..cb3565f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,7 +10,6 @@ configure crlf=input *.bat -crlf *.bat.in -crlf *.dsp -crlf -*.dsptemplate -crlf *.dsw -crlf *.pfx -crlf *.png -crlf diff --git a/Help/command/build_command.rst b/Help/command/build_command.rst index 1298c1f..b83edaf 100644 --- a/Help/command/build_command.rst +++ b/Help/command/build_command.rst @@ -35,7 +35,7 @@ compatibility. Use the first signature instead. It sets the given ``<cachevariable>`` to a command-line string as above but without the ``--target`` option. The ``<makecommand>`` is ignored but should be the full path to -msdev, devenv, nmake, make or one of the end user build tools +devenv, nmake, make or one of the end user build tools for legacy invocations. .. note:: diff --git a/Help/command/include_external_msproject.rst b/Help/command/include_external_msproject.rst index 595762d..18a2b50 100644 --- a/Help/command/include_external_msproject.rst +++ b/Help/command/include_external_msproject.rst @@ -19,5 +19,4 @@ command to make things depend on the external project. ``TYPE``, ``GUID`` and ``PLATFORM`` are optional parameters that allow one to specify the type of project, id (GUID) of the project and the name of the target platform. This is useful for projects requiring values -other than the default (e.g. WIX projects). These options are not -supported by the Visual Studio 6 generator. +other than the default (e.g. WIX projects). diff --git a/Help/generator/Visual Studio 6.rst b/Help/generator/Visual Studio 6.rst index 855589c..2dd07e0 100644 --- a/Help/generator/Visual Studio 6.rst +++ b/Help/generator/Visual Studio 6.rst @@ -1,10 +1,6 @@ Visual Studio 6 --------------- -Deprected. Generates Visual Studio 6 project files. - -.. note:: - This generator is deprecated and will be removed - in a future version of CMake. It will still be - possible to build with VS 6 tools using the - :generator:`NMake Makefiles` generator. +Removed. This once generated Visual Studio 6 project files, but the +generator has been removed since CMake 3.6. It is still possible to +build with VS 6 tools using the :generator:`NMake Makefiles` generator. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 444a706..cb50051 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -78,7 +78,6 @@ Variables that Provide Information /variable/CMAKE_VS_DEVENV_COMMAND /variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION /variable/CMAKE_VS_MSBUILD_COMMAND - /variable/CMAKE_VS_MSDEV_COMMAND /variable/CMAKE_VS_NsightTegra_VERSION /variable/CMAKE_VS_PLATFORM_NAME /variable/CMAKE_VS_PLATFORM_TOOLSET diff --git a/Help/prop_dir/COMPILE_DEFINITIONS.rst b/Help/prop_dir/COMPILE_DEFINITIONS.rst index ab7e7f0..85adcb5 100644 --- a/Help/prop_dir/COMPILE_DEFINITIONS.rst +++ b/Help/prop_dir/COMPILE_DEFINITIONS.rst @@ -17,8 +17,7 @@ This property will be initialized in each directory by its value in the directory's parent. CMake will automatically drop some definitions that are not supported -by the native build tool. The VS6 IDE does not support definition -values with spaces (but NMake does). +by the native build tool. .. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt diff --git a/Help/prop_sf/COMPILE_DEFINITIONS.rst b/Help/prop_sf/COMPILE_DEFINITIONS.rst index 7f7e7c7..1626825 100644 --- a/Help/prop_sf/COMPILE_DEFINITIONS.rst +++ b/Help/prop_sf/COMPILE_DEFINITIONS.rst @@ -13,8 +13,7 @@ the name COMPILE_DEFINITIONS_<CONFIG> where <CONFIG> is an upper-case name (ex. "COMPILE_DEFINITIONS_DEBUG"). CMake will automatically drop some definitions that are not supported -by the native build tool. The VS6 IDE does not support definition -values with spaces (but NMake does). Xcode does not support -per-configuration definitions on source files. +by the native build tool. Xcode does not support per-configuration +definitions on source files. .. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt diff --git a/Help/prop_tgt/COMPILE_DEFINITIONS.rst b/Help/prop_tgt/COMPILE_DEFINITIONS.rst index 00c49c3..059f913 100644 --- a/Help/prop_tgt/COMPILE_DEFINITIONS.rst +++ b/Help/prop_tgt/COMPILE_DEFINITIONS.rst @@ -11,8 +11,7 @@ automatically escape the value correctly for the native build system values). CMake will automatically drop some definitions that are not supported -by the native build tool. The VS6 IDE does not support definition -values with spaces (but NMake does). +by the native build tool. .. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt diff --git a/Help/prop_tgt/COMPILE_PDB_NOTE.txt b/Help/prop_tgt/COMPILE_PDB_NOTE.txt index 5941d72..43003d9 100644 --- a/Help/prop_tgt/COMPILE_PDB_NOTE.txt +++ b/Help/prop_tgt/COMPILE_PDB_NOTE.txt @@ -3,6 +3,3 @@ ``/Fd`` compiler flag and are not the same as linker-generated program database files specified by the ``/pdb`` linker flag. Use the |PDB_XXX| property to specify the latter. - - This property is not implemented by the :generator:`Visual Studio 6` - generator. diff --git a/Help/prop_tgt/PDB_NOTE.txt b/Help/prop_tgt/PDB_NOTE.txt index f90ea81..b5ada07 100644 --- a/Help/prop_tgt/PDB_NOTE.txt +++ b/Help/prop_tgt/PDB_NOTE.txt @@ -7,6 +7,3 @@ ``/pdb`` linker flag and are not the same as compiler-generated program database files specified by the ``/Fd`` compiler flag. Use the |COMPILE_PDB_XXX| property to specify the latter. - - This property is not implemented by the :generator:`Visual Studio 6` - generator. diff --git a/Help/release/dev/remove-vs6-generator.rst b/Help/release/dev/remove-vs6-generator.rst new file mode 100644 index 0000000..921b93a --- /dev/null +++ b/Help/release/dev/remove-vs6-generator.rst @@ -0,0 +1,4 @@ +remove-vs6-generator +-------------------- + +* The :generator:`Visual Studio 6` generator has been removed. diff --git a/Help/variable/CMAKE_CFG_INTDIR.rst b/Help/variable/CMAKE_CFG_INTDIR.rst index dcc1aed..ba25a35 100644 --- a/Help/variable/CMAKE_CFG_INTDIR.rst +++ b/Help/variable/CMAKE_CFG_INTDIR.rst @@ -12,7 +12,6 @@ Example values: :: - $(IntDir) = Visual Studio 6 $(ConfigurationName) = Visual Studio 7, 8, 9 $(Configuration) = Visual Studio 10 $(CONFIGURATION) = Xcode diff --git a/Help/variable/CMAKE_GENERATOR.rst b/Help/variable/CMAKE_GENERATOR.rst index 3f6ebc1..cce04c1 100644 --- a/Help/variable/CMAKE_GENERATOR.rst +++ b/Help/variable/CMAKE_GENERATOR.rst @@ -4,4 +4,4 @@ CMAKE_GENERATOR The generator used to build the project. See :manual:`cmake-generators(7)`. The name of the generator that is being used to generate the build -files. (e.g. ``Unix Makefiles``, ``Visual Studio 6``, etc.) +files. (e.g. ``Unix Makefiles``, ``Ninja``, etc.) diff --git a/Help/variable/CMAKE_MAKE_PROGRAM.rst b/Help/variable/CMAKE_MAKE_PROGRAM.rst index edf2732..a3b997a 100644 --- a/Help/variable/CMAKE_MAKE_PROGRAM.rst +++ b/Help/variable/CMAKE_MAKE_PROGRAM.rst @@ -34,12 +34,11 @@ to configure the project: the CMake cache then CMake will use the specified value. * The :ref:`Visual Studio Generators` set this to the full path to - ``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9), - ``VCExpress.exe`` (VS Express 8,9), or ``msdev.exe`` (VS 6). + ``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9), or + ``VCExpress.exe`` (VS Express 8,9). (See also variables - :variable:`CMAKE_VS_MSBUILD_COMMAND`, - :variable:`CMAKE_VS_DEVENV_COMMAND`, and - :variable:`CMAKE_VS_MSDEV_COMMAND`.) + :variable:`CMAKE_VS_MSBUILD_COMMAND` and + :variable:`CMAKE_VS_DEVENV_COMMAND`. These generators prefer to lookup the build tool at build time rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache diff --git a/Help/variable/CMAKE_MFC_FLAG.rst b/Help/variable/CMAKE_MFC_FLAG.rst index f60e7a5..1543677 100644 --- a/Help/variable/CMAKE_MFC_FLAG.rst +++ b/Help/variable/CMAKE_MFC_FLAG.rst @@ -5,7 +5,7 @@ Tell cmake to use MFC for an executable or dll. This can be set in a ``CMakeLists.txt`` file and will enable MFC in the application. It should be set to ``1`` for the static MFC library, and ``2`` -for the shared MFC library. This is used in Visual Studio 6 and 7 +for the shared MFC library. This is used in Visual Studio 7 project files. The CMakeSetup dialog used MFC and the ``CMakeLists.txt`` looks like this: diff --git a/Help/variable/CMAKE_VS_MSDEV_COMMAND.rst b/Help/variable/CMAKE_VS_MSDEV_COMMAND.rst deleted file mode 100644 index 718baaf..0000000 --- a/Help/variable/CMAKE_VS_MSDEV_COMMAND.rst +++ /dev/null @@ -1,10 +0,0 @@ -CMAKE_VS_MSDEV_COMMAND ----------------------- - -The :generator:`Visual Studio 6` generator sets this variable to the -``msdev.exe`` command installed with Visual Studio 6. - -This variable is not defined by other generators even if ``msdev.exe`` -is installed on the computer. - -See also the :variable:`CMAKE_MAKE_PROGRAM` variable. diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake index 4783d68..685cd52 100644 --- a/Modules/CMakeBackwardCompatibilityC.cmake +++ b/Modules/CMakeBackwardCompatibilityC.cmake @@ -17,10 +17,6 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 7") include(CMakeVS7BackwardCompatibility) set(CMAKE_SKIP_COMPATIBILITY_TESTS 1) endif() -if(CMAKE_GENERATOR MATCHES "Visual Studio 6") - include(CMakeVS6BackwardCompatibility) - set(CMAKE_SKIP_COMPATIBILITY_TESTS 1) -endif() if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) # Old CMake versions did not support OS X universal binaries anyway, diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index feae1c4..b133b78 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -149,11 +149,7 @@ Id flags: ${testflags} ") # Compile the compiler identification source. - if(CMAKE_GENERATOR STREQUAL "Visual Studio 6" AND - lang STREQUAL "Fortran") - set(CMAKE_${lang}_COMPILER_ID_RESULT 1) - set(CMAKE_${lang}_COMPILER_ID_OUTPUT "No Intel Fortran in VS 6") - elseif("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)") + if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)") set(vs_version ${CMAKE_MATCH_1}) set(id_platform ${CMAKE_VS_PLATFORM_NAME}) set(id_lang "${lang}") @@ -175,13 +171,10 @@ Id flags: ${testflags} elseif(NOT "${vs_version}" VERSION_LESS 10) set(v 10) set(ext vcxproj) - elseif(NOT "${vs_version}" VERSION_LESS 7) + else() set(id_version ${vs_version}.00) set(v 7) set(ext vcproj) - else() - set(v 6) - set(ext dsp) endif() if(CMAKE_VS_PLATFORM_TOOLSET) if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") @@ -235,8 +228,6 @@ Id flags: ${testflags} ) elseif(CMAKE_VS_DEVENV_COMMAND) set(command "${CMAKE_VS_DEVENV_COMMAND}" "CompilerId${lang}.${ext}" "/build" "Debug") - elseif(CMAKE_VS_MSDEV_COMMAND) - set(command "${CMAKE_VS_MSDEV_COMMAND}" "CompilerId${lang}.${ext}" "/make") else() set(command "") endif() diff --git a/Modules/CMakeVS6BackwardCompatibility.cmake b/Modules/CMakeVS6BackwardCompatibility.cmake deleted file mode 100644 index ca48b85..0000000 --- a/Modules/CMakeVS6BackwardCompatibility.cmake +++ /dev/null @@ -1,26 +0,0 @@ - -#============================================================================= -# Copyright 2002-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# hard code these for fast backwards compatibility tests -set (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type") -set (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type") -set (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type") -set (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type") -set (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type") -set (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type") -set (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type") -set (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL - "Does the compiler support ansi for scope.") -set (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.") -set (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes") diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 8278c5c..a27eb4b 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -230,9 +230,6 @@ if(BUILD_TESTING) get_filename_component(DART_CXX_NAME "${CMAKE_MAKE_PROGRAM}" ${DART_NAME_COMPONENT}) endif() - if(DART_CXX_NAME MATCHES "msdev") - set(DART_CXX_NAME "vs60") - endif() if(DART_CXX_NAME MATCHES "devenv") GET_VS_VERSION_STRING("${CMAKE_GENERATOR}" DART_CXX_NAME) endif() diff --git a/Modules/CompilerId/VS-6.dsp.in b/Modules/CompilerId/VS-6.dsp.in deleted file mode 100644 index 48c9a23..0000000 --- a/Modules/CompilerId/VS-6.dsp.in +++ /dev/null @@ -1,48 +0,0 @@ -# Microsoft Developer Studio Project File - Name="CompilerId@id_lang@" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=CompilerId@id_lang@ - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "CompilerId@id_lang@.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "CompilerId@id_lang@.mak" CFG="CompilerId@id_lang@ - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -CPP=cl.exe -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "." -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD CPP /nologo /MDd /c -LINK32=link.exe -# ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:x86 /out:"CompilerId@id_lang@.exe" /IGNORE:4089 -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=for %%i in (@id_cl@) do @echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i -# End Special Build Tool -# Begin Target - -# Name "CompilerId@id_lang@ - Win32 Debug" -# Begin Group "Source Files" - -# Begin Source File - -SOURCE="@id_src@" -# End Source File -# End Group -# End Target -# End Project diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index a61413a..f1bc659 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -47,10 +47,6 @@ else() endif() set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 1) -if(CMAKE_GENERATOR MATCHES "Visual Studio 6") - set (CMAKE_NO_BUILD_TYPE 1) - set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 0) # not implemented for VS6 -endif() if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") set (CMAKE_NO_BUILD_TYPE 1) endif() diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake index 0beba73..b31cb11 100644 --- a/Modules/Platform/Windows-df.cmake +++ b/Modules/Platform/Windows-df.cmake @@ -30,9 +30,6 @@ set(CMAKE_Fortran_LINK_EXECUTABLE set(CMAKE_CREATE_WIN32_EXE /winapp) set(CMAKE_CREATE_CONSOLE_EXE ) -if(CMAKE_GENERATOR MATCHES "Visual Studio 6") - set (CMAKE_NO_BUILD_TYPE 1) -endif() if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") set (CMAKE_NO_BUILD_TYPE 1) endif() diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index ab70568..6129293 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -452,8 +452,6 @@ if (WIN32) cmGlobalNMakeMakefileGenerator.h cmGlobalJOMMakefileGenerator.cxx cmGlobalJOMMakefileGenerator.h - cmGlobalVisualStudio6Generator.cxx - cmGlobalVisualStudio6Generator.h cmGlobalVisualStudio71Generator.cxx cmGlobalVisualStudio71Generator.h cmGlobalVisualStudio7Generator.cxx @@ -481,8 +479,6 @@ if (WIN32) cmIDEFlagTable.h cmIDEOptions.cxx cmIDEOptions.h - cmLocalVisualStudio6Generator.cxx - cmLocalVisualStudio6Generator.h cmLocalVisualStudio7Generator.cxx cmLocalVisualStudio7Generator.h cmLocalVisualStudioGenerator.cxx diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 6e819d3..14c7d67 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -241,11 +241,6 @@ public: */ virtual void FindMakeProgram(cmMakefile*); -#if defined(_WIN32) && !defined(__CYGWIN__) - /** Is this the Visual Studio 6 generator? */ - bool IsForVS6() const { return this->GetName() == "Visual Studio 6"; } -#endif - ///! Find a target by name by searching the local generators. cmTarget* FindTarget(const std::string& name, bool excludeAliases = false) const; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index bb5f921..83422b7 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -642,7 +642,6 @@ void cmGlobalNinjaGenerator // cmGlobalUnixMakefileGenerator3 // cmGlobalGhsMultiGenerator // cmGlobalVisualStudio10Generator -// cmGlobalVisualStudio6Generator // cmGlobalVisualStudio7Generator // cmGlobalXCodeGenerator // Called by: diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx deleted file mode 100644 index 5866c0e..0000000 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ /dev/null @@ -1,451 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "cmGlobalVisualStudio6Generator.h" -#include "cmLocalVisualStudio6Generator.h" -#include "cmMakefile.h" -#include "cmake.h" -#include "cmGeneratedFileStream.h" -#include <cmsys/FStream.hxx> - -// Utility function to make a valid VS6 *.dsp filename out -// of a CMake target name: -// -std::string GetVS6TargetName(const std::string& targetName) -{ - std::string name(targetName); - - // Eliminate hyphens. VS6 cannot handle hyphens in *.dsp filenames... - // Replace them with underscores. - // - cmSystemTools::ReplaceString(name, "-", "_"); - - return name; -} - -cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator(cmake* cm) - : cmGlobalVisualStudioGenerator(cm) -{ - this->MSDevCommandInitialized = false; - this->Version = VS6; -} - -void cmGlobalVisualStudio6Generator -::EnableLanguage(std::vector<std::string>const& lang, - cmMakefile *mf, - bool optional) -{ - mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); - mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); - this->GenerateConfigurations(mf); - this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); -} - -void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf) -{ - std::string fname= mf->GetRequiredDefinition("CMAKE_ROOT"); - const char* def= mf->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY"); - if(def) - { - fname = def; - } - else - { - fname += "/Templates"; - } - fname += "/CMakeVisualStudio6Configurations.cmake"; - if(!mf->ReadDependentFile(fname.c_str())) - { - cmSystemTools::Error("Cannot open ", fname.c_str(), - ". Please copy this file from the main " - "CMake/Templates directory and edit it for " - "your build configurations."); - } - else if(!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::Error("CMAKE_CONFIGURATION_TYPES not set by ", - fname.c_str(), - ". Please copy this file from the main " - "CMake/Templates directory and edit it for " - "your build configurations."); - } -} - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio6Generator::FindMakeProgram(cmMakefile* mf) -{ - this->cmGlobalVisualStudioGenerator::FindMakeProgram(mf); - mf->AddDefinition("CMAKE_VS_MSDEV_COMMAND", - this->GetMSDevCommand().c_str()); -} - -//---------------------------------------------------------------------------- -std::string const& cmGlobalVisualStudio6Generator::GetMSDevCommand() -{ - if(!this->MSDevCommandInitialized) - { - this->MSDevCommandInitialized = true; - this->MSDevCommand = this->FindMSDevCommand(); - } - return this->MSDevCommand; -} - -//---------------------------------------------------------------------------- -std::string cmGlobalVisualStudio6Generator::FindMSDevCommand() -{ - std::string vscmd; - std::string vskey = this->GetRegistryBase() + "\\Setup;VsCommonDir"; - if(cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd, - cmSystemTools::KeyWOW64_32)) - { - cmSystemTools::ConvertToUnixSlashes(vscmd); - vscmd += "/MSDev98/Bin/"; - } - vscmd += "msdev.exe"; - return vscmd; -} - -//---------------------------------------------------------------------------- -void -cmGlobalVisualStudio6Generator::GenerateBuildCommand( - std::vector<std::string>& makeCommand, - const std::string& makeProgram, - const std::string& projectName, - const std::string& /*projectDir*/, - const std::string& targetName, - const std::string& config, - bool /*fast*/, bool /*verbose*/, - std::vector<std::string> const& makeOptions - ) -{ - // now build the test - makeCommand.push_back( - this->SelectMakeProgram(makeProgram, this->GetMSDevCommand()) - ); - - makeCommand.push_back(std::string(projectName)+".dsw"); - makeCommand.push_back("/MAKE"); - std::string targetArg; - bool clean = false; - std::string realTarget = targetName; - if ( realTarget == "clean" ) - { - clean = true; - realTarget = "ALL_BUILD"; - } - if (!realTarget.empty()) - { - targetArg += realTarget; - } - else - { - targetArg += "ALL_BUILD"; - } - targetArg += " - "; - if(!config.empty()) - { - targetArg += config; - } - else - { - targetArg += "Debug"; - } - makeCommand.push_back(targetArg); - if(clean) - { - makeCommand.push_back("/CLEAN"); - } - else - { - makeCommand.push_back("/BUILD"); - } - makeCommand.insert(makeCommand.end(), - makeOptions.begin(), makeOptions.end()); -} - -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator * -cmGlobalVisualStudio6Generator::CreateLocalGenerator(cmMakefile* mf) -{ - return new cmLocalVisualStudio6Generator(this, mf); -} - - -void cmGlobalVisualStudio6Generator::Generate() -{ - // first do the superclass method - this->cmGlobalVisualStudioGenerator::Generate(); - - // Now write out the DSW - this->OutputDSWFile(); - - if (!this->CMakeInstance->GetIsInTryCompile()) - { - const char* cmakeWarnVS6 = - this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS6"); - if (!cmakeWarnVS6 || !cmSystemTools::IsOff(cmakeWarnVS6)) - { - this->CMakeInstance->IssueMessage( - cmake::WARNING, - "The \"Visual Studio 6\" generator is deprecated " - "and will be removed in a future version of CMake." - "\n" - "Add CMAKE_WARN_VS6=OFF to the cache to disable this warning." - ); - } - } -} - -// Write a DSW file to the stream -void cmGlobalVisualStudio6Generator -::WriteDSWFile(std::ostream& fout,cmLocalGenerator* root, - std::vector<cmLocalGenerator*>& generators) -{ - // Write out the header for a DSW file - this->WriteDSWHeader(fout); - - // Collect all targets under this root generator and the transitive - // closure of their dependencies. - TargetDependSet projectTargets; - TargetDependSet originalTargets; - this->GetTargetSets(projectTargets, originalTargets, root, generators); - OrderedTargetDependSet orderedProjectTargets(projectTargets, "ALL_BUILD"); - - for(OrderedTargetDependSet::const_iterator - tt = orderedProjectTargets.begin(); - tt != orderedProjectTargets.end(); ++tt) - { - cmGeneratorTarget const* target = *tt; - if(target->GetType() == cmState::INTERFACE_LIBRARY) - { - continue; - } - // Write the project into the DSW file - const char* expath = target->GetProperty("EXTERNAL_MSPROJECT"); - if(expath) - { - std::string project = target->GetName(); - std::string location = expath; - this->WriteExternalProject(fout, project.c_str(), - location.c_str(), target->GetUtilities()); - } - else - { - std::string dspname = GetVS6TargetName(target->GetName()); - std::string dir = - target->GetLocalGenerator()->GetCurrentBinaryDirectory(); - dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT); - this->WriteProject(fout, dspname.c_str(), dir.c_str(), target); - } - } - - // Write the footer for the DSW file - this->WriteDSWFooter(fout); -} - -void cmGlobalVisualStudio6Generator -::OutputDSWFile(cmLocalGenerator* root, - std::vector<cmLocalGenerator*>& generators) -{ - if(generators.empty()) - { - return; - } - std::string fname = root->GetMakefile()->GetCurrentBinaryDirectory(); - fname += "/"; - fname += root->GetProjectName(); - fname += ".dsw"; - cmsys::ofstream fout(fname.c_str()); - if(!fout) - { - cmSystemTools::Error("Error can not open DSW file for write: ", - fname.c_str()); - cmSystemTools::ReportLastSystemError(""); - return; - } - this->WriteDSWFile(fout, root, generators); -} - -// output the DSW file -void cmGlobalVisualStudio6Generator::OutputDSWFile() -{ - std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it; - for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) - { - this->OutputDSWFile(it->second[0], it->second); - } -} - -// Write a dsp file into the DSW file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, - const std::string& dspname, - const char* dir, - const cmGeneratorTarget *target) -{ - fout << "#########################################################" - "######################\n\n"; - fout << "Project: \"" << dspname << "\"=" - << dir << "\\" << dspname << ".dsp - Package Owner=<4>\n\n"; - fout << "Package=<5>\n{{{\n}}}\n\n"; - fout << "Package=<4>\n"; - fout << "{{{\n"; - VSDependSet const& depends = this->VSTargetDepends[target]; - for(VSDependSet::const_iterator di = depends.begin(); - di != depends.end(); ++di) - { - const char* name = di->c_str(); - fout << "Begin Project Dependency\n"; - fout << "Project_Dep_Name " << GetVS6TargetName(name) << "\n"; - fout << "End Project Dependency\n"; - } - fout << "}}}\n\n"; - - UtilityDependsMap::iterator ui = this->UtilityDepends.find(target); - if(ui != this->UtilityDepends.end()) - { - const char* uname = ui->second.c_str(); - fout << "Project: \"" << uname << "\"=" - << dir << "\\" << uname << ".dsp - Package Owner=<4>\n\n"; - fout << - "Package=<5>\n{{{\n}}}\n\n" - "Package=<4>\n" - "{{{\n" - "Begin Project Dependency\n" - "Project_Dep_Name " << dspname << "\n" - "End Project Dependency\n" - "}}}\n\n"; - ; - } -} - - -// Write a dsp file into the DSW file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, - const std::string& name, - const char* location, - const std::set<std::string>& dependencies) -{ - fout << "#########################################################" - "######################\n\n"; - fout << "Project: \"" << name << "\"=" - << location << " - Package Owner=<4>\n\n"; - fout << "Package=<5>\n{{{\n}}}\n\n"; - fout << "Package=<4>\n"; - fout << "{{{\n"; - - - std::set<std::string>::const_iterator i, end; - // write dependencies. - i = dependencies.begin(); - end = dependencies.end(); - for(;i!= end; ++i) - { - fout << "Begin Project Dependency\n"; - fout << "Project_Dep_Name " << GetVS6TargetName(*i) << "\n"; - fout << "End Project Dependency\n"; - } - fout << "}}}\n\n"; -} - - - -// Standard end of dsw file -void cmGlobalVisualStudio6Generator::WriteDSWFooter(std::ostream& fout) -{ - fout << "######################################################" - "#########################\n\n"; - fout << "Global:\n\n"; - fout << "Package=<5>\n{{{\n}}}\n\n"; - fout << "Package=<3>\n{{{\n}}}\n\n"; - fout << "#####################################################" - "##########################\n\n"; -} - - -// ouput standard header for dsw file -void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout) -{ - fout << "Microsoft Developer Studio Workspace File, Format Version 6.00\n"; - fout << "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n\n"; -} - -//---------------------------------------------------------------------------- -std::string -cmGlobalVisualStudio6Generator::WriteUtilityDepend( - const cmGeneratorTarget *target) -{ - std::string pname = target->GetName(); - pname += "_UTILITY"; - pname = GetVS6TargetName(pname.c_str()); - std::string fname = - target->GetLocalGenerator()->GetCurrentBinaryDirectory(); - fname += "/"; - fname += pname; - fname += ".dsp"; - cmGeneratedFileStream fout(fname.c_str()); - fout.SetCopyIfDifferent(true); - fout << - "# Microsoft Developer Studio Project File - Name=\"" - << pname << "\" - Package Owner=<4>\n" - "# Microsoft Developer Studio Generated Build File, Format Version 6.00\n" - "# ** DO NOT EDIT **\n" - "\n" - "# TARGTYPE \"Win32 (x86) Generic Project\" 0x010a\n" - "\n" - "CFG=" << pname << " - Win32 Debug\n" - "!MESSAGE \"" << pname << " - Win32 Debug\"" - " (based on \"Win32 (x86) Generic Project\")\n" - "!MESSAGE \"" << pname << " - Win32 Release\" " - "(based on \"Win32 (x86) Generic Project\")\n" - "!MESSAGE \"" << pname << " - Win32 MinSizeRel\" " - "(based on \"Win32 (x86) Generic Project\")\n" - "!MESSAGE \"" << pname << " - Win32 RelWithDebInfo\" " - "(based on \"Win32 (x86) Generic Project\")\n" - "\n" - "# Begin Project\n" - "# Begin Target\n" - "# Name \"" << pname << " - Win32 Debug\"\n" - "# Name \"" << pname << " - Win32 Release\"\n" - "# Name \"" << pname << " - Win32 MinSizeRel\"\n" - "# Name \"" << pname << " - Win32 RelWithDebInfo\"\n" - "# End Target\n" - "# End Project\n" - ; - return pname; -} - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio6Generator -::GetDocumentation(cmDocumentationEntry& entry) -{ - entry.Name = cmGlobalVisualStudio6Generator::GetActualName(); - entry.Brief = "Deprecated. Generates Visual Studio 6 project files."; -} - -//---------------------------------------------------------------------------- -void -cmGlobalVisualStudio6Generator -::AppendDirectoryForConfig(const std::string& prefix, - const std::string& config, - const std::string& suffix, - std::string& dir) -{ - if(!config.empty()) - { - dir += prefix; - dir += config; - dir += suffix; - } -} diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h deleted file mode 100644 index ae2988e..0000000 --- a/Source/cmGlobalVisualStudio6Generator.h +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef cmGlobalVisualStudio6Generator_h -#define cmGlobalVisualStudio6Generator_h - -#include "cmGlobalVisualStudioGenerator.h" -#include "cmGlobalGeneratorFactory.h" - -/** \class cmGlobalVisualStudio6Generator - * \brief Write a Unix makefiles. - * - * cmGlobalVisualStudio6Generator manages UNIX build process for a tree - */ -class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator -{ -public: - cmGlobalVisualStudio6Generator(cmake* cm); - static cmGlobalGeneratorFactory* NewFactory() { - return new cmGlobalGeneratorSimpleFactory - <cmGlobalVisualStudio6Generator>(); } - - ///! Get the name for the generator. - virtual std::string GetName() const { - return cmGlobalVisualStudio6Generator::GetActualName();} - static std::string GetActualName() {return "Visual Studio 6";} - - /** Get the documentation entry for this generator. */ - static void GetDocumentation(cmDocumentationEntry& entry); - - /** - * Utilized by the generator factory to determine if this generator - * supports toolsets. - */ - static bool SupportsToolset() { return false; } - - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf); - - /** - * Try to determine system information such as shared library - * extension, pthreads, byte order etc. - */ - virtual void EnableLanguage(std::vector<std::string>const& languages, - cmMakefile *, bool optional); - - /** - * Try running cmake and building a file. This is used for dynalically - * loaded commands, not as part of the usual build process. - */ - virtual void GenerateBuildCommand( - std::vector<std::string>& makeCommand, - const std::string& makeProgram, - const std::string& projectName, - const std::string& projectDir, - const std::string& targetName, - const std::string& config, - bool fast, bool verbose, - std::vector<std::string> const& makeOptions = std::vector<std::string>() - ); - - /** - * Generate the DSW workspace file. - */ - virtual void OutputDSWFile(); - virtual void OutputDSWFile(cmLocalGenerator* root, - std::vector<cmLocalGenerator*>& generators); - virtual void WriteDSWFile(std::ostream& fout, - cmLocalGenerator* root, - std::vector<cmLocalGenerator*>& generators); - - /** Append the subdirectory for the given configuration. */ - virtual void AppendDirectoryForConfig(const std::string& prefix, - const std::string& config, - const std::string& suffix, - std::string& dir); - - ///! What is the configurations directory variable called? - virtual const char* GetCMakeCFGIntDir() const { return "$(IntDir)"; } - - virtual void FindMakeProgram(cmMakefile*); - -protected: - virtual void Generate(); - virtual const char* GetIDEVersion() { return "6.0"; } -private: - virtual std::string GetVSMakeProgram() { return this->GetMSDevCommand(); } - void GenerateConfigurations(cmMakefile* mf); - void WriteDSWFile(std::ostream& fout); - void WriteDSWHeader(std::ostream& fout); - void WriteProject(std::ostream& fout, - const std::string& name, const char* path, - cmGeneratorTarget const* t); - void WriteExternalProject(std::ostream& fout, - const std::string& name, const char* path, - const std::set<std::string>& dependencies); - void WriteDSWFooter(std::ostream& fout); - virtual std::string WriteUtilityDepend(const cmGeneratorTarget *target); - std::string MSDevCommand; - bool MSDevCommandInitialized; - std::string const& GetMSDevCommand(); - std::string FindMSDevCommand(); -}; - -#endif diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index f827f26..ac9111e 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -26,7 +26,6 @@ public: /** Known versions of Visual Studio. */ enum VSVersion { - VS6 = 60, VS7 = 70, VS71 = 71, VS8 = 80, diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6a6359a..1be39a9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2455,7 +2455,7 @@ void cmLocalGenerator::JoinDefines(const std::set<std::string>& defines, else { // Make the definition appear properly on the command line. Use - // -DNAME="value" instead of -D"NAME=value" to help VS6 parser. + // -DNAME="value" instead of -D"NAME=value" for historical reasons. std::string::size_type eq = defineIt->find("="); def += defineIt->substr(0, eq); if(eq != defineIt->npos) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx deleted file mode 100644 index cdacb9e..0000000 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ /dev/null @@ -1,2002 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "cmGlobalGenerator.h" -#include "cmLocalVisualStudio6Generator.h" -#include "cmMakefile.h" -#include "cmSystemTools.h" -#include "cmSourceFile.h" -#include "cmGeneratorTarget.h" -#include "cmCustomCommandGenerator.h" -#include "cmake.h" - -#include "cmComputeLinkInformation.h" - -#include <cmsys/RegularExpression.hxx> -#include <cmsys/FStream.hxx> - -cmLocalVisualStudio6Generator -::cmLocalVisualStudio6Generator(cmGlobalGenerator* gg, cmMakefile* mf): - cmLocalVisualStudioGenerator(gg, mf) -{ -} - -cmLocalVisualStudio6Generator::~cmLocalVisualStudio6Generator() -{ -} - -//---------------------------------------------------------------------------- -// Helper class to write build events. -class cmLocalVisualStudio6Generator::EventWriter -{ -public: - EventWriter(cmLocalVisualStudio6Generator* lg, - const std::string& config, std::string& code): - LG(lg), Config(config), Code(code), First(true) {} - void Start(const char* event) - { - this->First = true; - this->Event = event; - } - void Finish() - { - this->Code += (this->First? "" : "\n"); - } - void Write(std::vector<cmCustomCommand> const& ccs) - { - for(std::vector<cmCustomCommand>::const_iterator ci = ccs.begin(); - ci != ccs.end(); ++ci) - { - this->Write(*ci); - } - } - void Write(cmCustomCommand const& cc) - { - cmCustomCommandGenerator ccg(cc, this->Config, this->LG); - if(this->First) - { - this->Code += this->Event + "_Cmds="; - this->First = false; - } - else - { - this->Code += "\\\n\t"; - } - this->Code += this->LG->ConstructScript(ccg, "\\\n\t"); - } -private: - cmLocalVisualStudio6Generator* LG; - std::string Config; - std::string& Code; - bool First; - std::string Event; -}; - -void cmLocalVisualStudio6Generator::AddCMakeListsRules() -{ - std::vector<cmGeneratorTarget*> tgts = this->GetGeneratorTargets(); - for(std::vector<cmGeneratorTarget*>::iterator l = tgts.begin(); - l != tgts.end(); ++l) - { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY - || (*l)->GetType() == cmState::GLOBAL_TARGET) - { - continue; - } - - // Add a rule to regenerate the build system when the target - // specification source changes. - const char* suppRegenRule = - this->Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION"); - if (!cmSystemTools::IsOn(suppRegenRule)) - { - this->AddDSPBuildRule(*l); - } - } -} - -void cmLocalVisualStudio6Generator::Generate() -{ - this->OutputDSPFile(); -} - -void cmLocalVisualStudio6Generator::OutputDSPFile() -{ - // If not an in source build, then create the output directory - if(strcmp(this->GetCurrentBinaryDirectory(), - this->GetSourceDirectory()) != 0) - { - if(!cmSystemTools::MakeDirectory - (this->GetCurrentBinaryDirectory())) - { - cmSystemTools::Error("Error creating directory ", - this->GetCurrentBinaryDirectory()); - } - } - - // Create the DSP or set of DSP's for libraries and executables - - std::vector<cmGeneratorTarget*> tgts = this->GetGeneratorTargets(); - for(std::vector<cmGeneratorTarget*>::iterator l = tgts.begin(); - l != tgts.end(); ++l) - { - switch((*l)->GetType()) - { - case cmState::STATIC_LIBRARY: - case cmState::OBJECT_LIBRARY: - this->SetBuildType(STATIC_LIBRARY, - (*l)->GetName().c_str(), *l); - break; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - this->SetBuildType(DLL, - (*l)->GetName().c_str(), *l); - break; - case cmState::EXECUTABLE: - this->SetBuildType(EXECUTABLE, - (*l)->GetName().c_str(), *l); - break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - this->SetBuildType(UTILITY, - (*l)->GetName().c_str(), *l); - break; - case cmState::INTERFACE_LIBRARY: - continue; - default: - cmSystemTools::Error("Bad target type: ", (*l)->GetName().c_str()); - break; - } - // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace - // so don't build a projectfile for it - const char* path = - (*l)->GetProperty("EXTERNAL_MSPROJECT"); - if(!path) - { - // check to see if the dsp is going into a sub-directory - std::string::size_type pos = (*l)->GetName().rfind('/'); - if(pos != std::string::npos) - { - std::string dir = this->GetCurrentBinaryDirectory(); - dir += "/"; - dir += (*l)->GetName().substr(0, pos); - if(!cmSystemTools::MakeDirectory(dir.c_str())) - { - cmSystemTools::Error("Error creating directory: ", dir.c_str()); - } - } - this->CreateSingleDSP((*l)->GetName().c_str(), *l); - } - } -} - -// Utility function to make a valid VS6 *.dsp filename out -// of a CMake target name: -// -extern std::string GetVS6TargetName(const std::string& targetName); - -void cmLocalVisualStudio6Generator::CreateSingleDSP(const std::string& lname, - cmGeneratorTarget* target) -{ - // add to the list of projects - std::string pname = GetVS6TargetName(lname); - - // create the dsp.cmake file - std::string fname; - fname = this->GetCurrentBinaryDirectory(); - fname += "/"; - fname += pname; - fname += ".dsp"; - // save the name of the real dsp file - std::string realDSP = fname; - fname += ".cmake"; - cmsys::ofstream fout(fname.c_str()); - if(!fout) - { - cmSystemTools::Error("Error Writing ", fname.c_str()); - cmSystemTools::ReportLastSystemError(""); - } - this->WriteDSPFile(fout,pname.c_str(),target); - fout.close(); - // if the dsp file has changed, then write it. - cmSystemTools::CopyFileIfDifferent(fname.c_str(), realDSP.c_str()); -} - - -void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmGeneratorTarget *tgt) -{ - std::string dspname = GetVS6TargetName(tgt->GetName()); - dspname += ".dsp.cmake"; - cmCustomCommandLine commandLine; - commandLine.push_back(cmSystemTools::GetCMakeCommand()); - std::string makefileIn = this->GetCurrentSourceDirectory(); - makefileIn += "/"; - makefileIn += "CMakeLists.txt"; - if(!cmSystemTools::FileExists(makefileIn.c_str())) - { - return; - } - std::string comment = "Building Custom Rule "; - comment += makefileIn; - std::string args; - args = "-H"; - args += this->GetSourceDirectory(); - commandLine.push_back(args); - args = "-B"; - args += this->GetBinaryDirectory(); - commandLine.push_back(args); - - std::vector<std::string> const& listFiles = this->Makefile->GetListFiles(); - - cmCustomCommandLines commandLines; - commandLines.push_back(commandLine); - const char* no_working_directory = 0; - this->Makefile->AddCustomCommandToOutput(dspname.c_str(), listFiles, - makefileIn.c_str(), commandLines, - comment.c_str(), - no_working_directory, true); - if(this->Makefile->GetSource(makefileIn.c_str())) - { - tgt->AddSource(makefileIn); - } - else - { - cmSystemTools::Error("Error adding rule for ", makefileIn.c_str()); - } -} - - -void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, - const std::string& libName, - cmGeneratorTarget *target) -{ - // For utility targets need custom command since pre- and post- - // build does not do anything in Visual Studio 6. In order for the - // rules to run in the correct order as custom commands, we need - // special care for dependencies. The first rule must depend on all - // the dependencies of all the rules. The later rules must each - // depend only on the previous rule. - if ((target->GetType() == cmState::UTILITY || - target->GetType() == cmState::GLOBAL_TARGET) && - (!target->GetPreBuildCommands().empty() || - !target->GetPostBuildCommands().empty())) - { - // Accumulate the dependencies of all the commands. - std::vector<std::string> depends; - for (std::vector<cmCustomCommand>::const_iterator cr = - target->GetPreBuildCommands().begin(); - cr != target->GetPreBuildCommands().end(); ++cr) - { - depends.insert(depends.end(), - cr->GetDepends().begin(), cr->GetDepends().end()); - } - for (std::vector<cmCustomCommand>::const_iterator cr = - target->GetPostBuildCommands().begin(); - cr != target->GetPostBuildCommands().end(); ++cr) - { - depends.insert(depends.end(), - cr->GetDepends().begin(), cr->GetDepends().end()); - } - - // Add the pre- and post-build commands in order. - int count = 1; - for (std::vector<cmCustomCommand>::const_iterator cr = - target->GetPreBuildCommands().begin(); - cr != target->GetPreBuildCommands().end(); ++cr) - { - this->AddUtilityCommandHack(target, count++, depends, *cr); - } - for (std::vector<cmCustomCommand>::const_iterator cr = - target->GetPostBuildCommands().begin(); - cr != target->GetPostBuildCommands().end(); ++cr) - { - this->AddUtilityCommandHack(target, count++, depends, *cr); - } - } - - // We may be modifying the source groups temporarily, so make a copy. - std::vector<cmSourceGroup> sourceGroups = this->Makefile->GetSourceGroups(); - - // get the classes from the source lists then add them to the groups - std::vector<cmSourceFile*> classes; - if (!target->GetConfigCommonSourceFiles(classes)) - { - return; - } - - // now all of the source files have been properly assigned to the target - // now stick them into source groups using the reg expressions - for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); - i != classes.end(); i++) - { - if (!(*i)->GetObjectLibrary().empty()) - { - continue; - } - - // Add the file to the list of sources. - std::string source = (*i)->GetFullPath(); - cmSourceGroup* sourceGroup = - this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); - sourceGroup->AssignSource(*i); - // while we are at it, if it is a .rule file then for visual studio 6 we - // must generate it - if ((*i)->GetPropertyAsBool("__CMAKE_RULE")) - { - if(!cmSystemTools::FileExists(source.c_str())) - { - cmSystemTools::ReplaceString(source, "$(IntDir)/", ""); - // Make sure the path exists for the file - std::string path = cmSystemTools::GetFilenamePath(source); - cmSystemTools::MakeDirectory(path.c_str()); -#if defined(_WIN32) || defined(__CYGWIN__) - cmsys::ofstream sourceFout(source.c_str(), - std::ios::binary | std::ios::out - | std::ios::trunc); -#else - cmsys::ofstream sourceFout(source.c_str(), - std::ios::out | std::ios::trunc); -#endif - if(sourceFout) - { - sourceFout.write("# generated from CMake",22); - sourceFout.flush(); - sourceFout.close(); - } - } - } - } - - // Write the DSP file's header. - this->WriteDSPHeader(fout, libName, target, sourceGroups); - - - // Loop through every source group. - for(std::vector<cmSourceGroup>::const_iterator sg = sourceGroups.begin(); - sg != sourceGroups.end(); ++sg) - { - this->WriteGroup(&(*sg), target, fout, libName); - } - - // Write the DSP file's footer. - this->WriteDSPFooter(fout); -} - -void cmLocalVisualStudio6Generator -::WriteGroup(const cmSourceGroup *sg, cmGeneratorTarget* target, - std::ostream &fout, const std::string& libName) -{ - const std::vector<const cmSourceFile *> &sourceFiles = - sg->GetSourceFiles(); - // If the group is empty, don't write it at all. - - if(sourceFiles.empty() && sg->GetGroupChildren().empty()) - { - return; - } - - // If the group has a name, write the header. - std::string name = sg->GetName(); - if(name != "") - { - this->WriteDSPBeginGroup(fout, name.c_str(), ""); - } - - // Loop through each source in the source group. - for(std::vector<const cmSourceFile *>::const_iterator sf = - sourceFiles.begin(); sf != sourceFiles.end(); ++sf) - { - if (!(*sf)->GetObjectLibrary().empty()) - { - continue; - } - - std::string source = (*sf)->GetFullPath(); - const cmCustomCommand *command = - (*sf)->GetCustomCommand(); - std::string compileFlags; - std::vector<std::string> depends; - std::string objectNameDir; - if(target->HasExplicitObjectName(*sf)) - { - objectNameDir = - cmSystemTools::GetFilenamePath(target->GetObjectName(*sf)); - } - - // Add per-source file flags. - if(const char* cflags = (*sf)->GetProperty("COMPILE_FLAGS")) - { - compileFlags += cflags; - } - - const std::string& lang = this->GetSourceFileLanguage(*(*sf)); - if(lang == "CXX") - { - // force a C++ file type - compileFlags += " /TP "; - } - else if(lang == "C") - { - // force to c file type - compileFlags += " /TC "; - } - - // Add per-source and per-configuration preprocessor definitions. - std::map<std::string, std::string> cdmap; - - { - std::set<std::string> targetCompileDefinitions; - - this->AppendDefines(targetCompileDefinitions, - (*sf)->GetProperty("COMPILE_DEFINITIONS")); - this->JoinDefines(targetCompileDefinitions, compileFlags, lang); - } - - if(const char* cdefs = (*sf)->GetProperty("COMPILE_DEFINITIONS_DEBUG")) - { - std::set<std::string> debugCompileDefinitions; - this->AppendDefines(debugCompileDefinitions, cdefs); - this->JoinDefines(debugCompileDefinitions, cdmap["DEBUG"], lang); - } - if(const char* cdefs = (*sf)->GetProperty("COMPILE_DEFINITIONS_RELEASE")) - { - std::set<std::string> releaseCompileDefinitions; - this->AppendDefines(releaseCompileDefinitions, cdefs); - this->JoinDefines(releaseCompileDefinitions, cdmap["RELEASE"], lang); - } - if(const char* cdefs = - (*sf)->GetProperty("COMPILE_DEFINITIONS_MINSIZEREL")) - { - std::set<std::string> minsizerelCompileDefinitions; - this->AppendDefines(minsizerelCompileDefinitions, cdefs); - this->JoinDefines(minsizerelCompileDefinitions, cdmap["MINSIZEREL"], - lang); - } - if(const char* cdefs = - (*sf)->GetProperty("COMPILE_DEFINITIONS_RELWITHDEBINFO")) - { - std::set<std::string> relwithdebinfoCompileDefinitions; - this->AppendDefines(relwithdebinfoCompileDefinitions, cdefs); - this->JoinDefines(relwithdebinfoCompileDefinitions, - cdmap["RELWITHDEBINFO"], lang); - } - - bool excludedFromBuild = - (!lang.empty() && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY")); - - // Check for extra object-file dependencies. - const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS"); - if(dependsValue) - { - cmSystemTools::ExpandListArgument(dependsValue, depends); - } - if (GetVS6TargetName(source) != libName || - target->GetType() == cmState::UTILITY || - target->GetType() == cmState::GLOBAL_TARGET) - { - fout << "# Begin Source File\n\n"; - - // Tell MS-Dev what the source is. If the compiler knows how to - // build it, then it will. - fout << "SOURCE=" << - this->ConvertToOutputFormat(source.c_str(), SHELL) << "\n\n"; - if(!depends.empty()) - { - // Write out the dependencies for the rule. - fout << "USERDEP__HACK="; - for(std::vector<std::string>::const_iterator d = depends.begin(); - d != depends.end(); ++d) - { - fout << "\\\n\t" << - this->ConvertToOutputFormat(d->c_str(), SHELL); - } - fout << "\n"; - } - if (command) - { - const char* flags = compileFlags.size() ? compileFlags.c_str(): 0; - this->WriteCustomRule(fout, source.c_str(), *command, flags); - } - else if(!compileFlags.empty() || !objectNameDir.empty() || - excludedFromBuild || !cdmap.empty()) - { - for(std::vector<std::string>::iterator i - = this->Configurations.begin(); - i != this->Configurations.end(); ++i) - { - // Strip the subdirectory name out of the configuration name. - std::string config = this->GetConfigName(*i); - if (i == this->Configurations.begin()) - { - fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl; - } - else - { - fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl; - } - if(excludedFromBuild) - { - fout << "# PROP Exclude_From_Build 1\n"; - } - if(!compileFlags.empty()) - { - fout << "\n# ADD CPP " << compileFlags << "\n\n"; - } - std::map<std::string, std::string>::iterator cdi = - cdmap.find(cmSystemTools::UpperCase(config)); - if(cdi != cdmap.end() && !cdi->second.empty()) - { - fout << "\n# ADD CPP " << cdi->second << "\n\n"; - } - if(!objectNameDir.empty()) - { - // Setup an alternate object file directory. - fout << "\n# PROP Intermediate_Dir \"" - << config << "/" << objectNameDir << "\"\n\n"; - } - } - fout << "!ENDIF\n\n"; - } - fout << "# End Source File\n"; - } - } - - std::vector<cmSourceGroup> const& children = sg->GetGroupChildren(); - - for(unsigned int i=0;i<children.size();++i) - { - this->WriteGroup(&children[i], target, fout, libName); - } - - - - - // If the group has a name, write the footer. - if(name != "") - { - this->WriteDSPEndGroup(fout); - } - -} - - -void -cmLocalVisualStudio6Generator -::AddUtilityCommandHack(cmGeneratorTarget *target, int count, - std::vector<std::string>& depends, - const cmCustomCommand& origCommand) -{ - // Create a fake output that forces the rule to run. - char* output = new char[(strlen(this->GetCurrentBinaryDirectory()) - + target->GetName().size() + 30)]; - sprintf(output,"%s/%s_force_%i", this->GetCurrentBinaryDirectory(), - target->GetName().c_str(), count); - const char* comment = origCommand.GetComment(); - if(!comment && origCommand.GetOutputs().empty()) - { - comment = "<hack>"; - } - - // Add the rule with the given dependencies and commands. - std::string no_main_dependency = ""; - if(cmSourceFile* outsf = - this->Makefile->AddCustomCommandToOutput( - output, depends, no_main_dependency, - origCommand.GetCommandLines(), comment, - origCommand.GetWorkingDirectory().c_str())) - { - target->AddSource(outsf->GetFullPath()); - } - - // Replace the dependencies with the output of this rule so that the - // next rule added will run after this one. - depends.clear(); - depends.push_back(output); - - // Free the fake output name. - delete [] output; -} - -void -cmLocalVisualStudio6Generator -::WriteCustomRule(std::ostream& fout, - const char* source, - const cmCustomCommand& command, - const char* flags) -{ - // Write the rule for each configuration. - std::vector<std::string>::iterator i; - for(i = this->Configurations.begin(); i != this->Configurations.end(); ++i) - { - std::string config = this->GetConfigName(*i); - cmCustomCommandGenerator ccg(command, config, this); - std::string comment = - this->ConstructComment(ccg, "Building Custom Rule $(InputPath)"); - if(comment == "<hack>") - { - comment = ""; - } - - std::string script = - this->ConstructScript(ccg, "\\\n\t"); - - if (i == this->Configurations.begin()) - { - fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl; - } - else - { - fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl; - } - if(flags) - { - fout << "\n# ADD CPP " << flags << "\n\n"; - } - // Write out the dependencies for the rule. - fout << "USERDEP__HACK="; - for(std::vector<std::string>::const_iterator d = - ccg.GetDepends().begin(); - d != ccg.GetDepends().end(); - ++d) - { - // Lookup the real name of the dependency in case it is a CMake target. - std::string dep; - if(this->GetRealDependency(d->c_str(), config.c_str(), dep)) - { - fout << "\\\n\t" << - this->ConvertToOutputFormat(dep.c_str(), SHELL); - } - } - fout << "\n"; - - fout << "# PROP Ignore_Default_Tool 1\n"; - fout << "# Begin Custom Build -"; - if(!comment.empty()) - { - fout << " " << comment.c_str(); - } - fout << "\n\n"; - if(ccg.GetOutputs().empty()) - { - fout << source - << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t"; - fout << script.c_str() << "\n\n"; - } - else - { - for(std::vector<std::string>::const_iterator o = - ccg.GetOutputs().begin(); - o != ccg.GetOutputs().end(); - ++o) - { - // Write a rule for every output generated by this command. - fout << this->ConvertToOutputFormat(o->c_str(), SHELL) - << " : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t"; - fout << script.c_str() << "\n\n"; - } - } - fout << "# End Custom Build\n\n"; - } - - fout << "!ENDIF\n\n"; -} - - -void cmLocalVisualStudio6Generator::WriteDSPBeginGroup(std::ostream& fout, - const char* group, - const char* filter) -{ - fout << "# Begin Group \"" << group << "\"\n" - "# PROP Default_Filter \"" << filter << "\"\n"; -} - - -void cmLocalVisualStudio6Generator::WriteDSPEndGroup(std::ostream& fout) -{ - fout << "# End Group\n"; -} - - - - -void cmLocalVisualStudio6Generator::SetBuildType(BuildType b, - const std::string& libName, - cmGeneratorTarget *target) -{ - std::string root= this->Makefile->GetRequiredDefinition("CMAKE_ROOT"); - const char *def= - this->Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY"); - - if( def) - { - root = def; - } - else - { - root += "/Templates"; - } - - switch(b) - { - case WIN32_EXECUTABLE: - break; - case STATIC_LIBRARY: - this->DSPHeaderTemplate = root; - this->DSPHeaderTemplate += "/staticLibHeader.dsptemplate"; - this->DSPFooterTemplate = root; - this->DSPFooterTemplate += "/staticLibFooter.dsptemplate"; - break; - case DLL: - this->DSPHeaderTemplate = root; - this->DSPHeaderTemplate += "/DLLHeader.dsptemplate"; - this->DSPFooterTemplate = root; - this->DSPFooterTemplate += "/DLLFooter.dsptemplate"; - break; - case EXECUTABLE: - if ( target->GetPropertyAsBool("WIN32_EXECUTABLE") ) - { - this->DSPHeaderTemplate = root; - this->DSPHeaderTemplate += "/EXEWinHeader.dsptemplate"; - this->DSPFooterTemplate = root; - this->DSPFooterTemplate += "/EXEFooter.dsptemplate"; - } - else - { - this->DSPHeaderTemplate = root; - this->DSPHeaderTemplate += "/EXEHeader.dsptemplate"; - this->DSPFooterTemplate = root; - this->DSPFooterTemplate += "/EXEFooter.dsptemplate"; - } - break; - case UTILITY: - this->DSPHeaderTemplate = root; - this->DSPHeaderTemplate += "/UtilityHeader.dsptemplate"; - this->DSPFooterTemplate = root; - this->DSPFooterTemplate += "/UtilityFooter.dsptemplate"; - break; - } - - // once the build type is set, determine what configurations are - // possible - cmsys::ifstream fin(this->DSPHeaderTemplate.c_str()); - - cmsys::RegularExpression reg("# Name "); - if(!fin) - { - cmSystemTools::Error("Error Reading ", this->DSPHeaderTemplate.c_str()); - } - - // reset this->Configurations - this->Configurations.erase(this->Configurations.begin(), - this->Configurations.end()); - - // now add all the configurations possible - std::string vs6name = GetVS6TargetName(libName); - std::string line; - while(cmSystemTools::GetLineFromStream(fin, line)) - { - cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME", vs6name.c_str()); - if (reg.find(line)) - { - this->Configurations.push_back(line.substr(reg.end())); - } - } -} - -//---------------------------------------------------------------------------- -cmsys::auto_ptr<cmCustomCommand> -cmLocalVisualStudio6Generator::MaybeCreateOutputDir(cmGeneratorTarget* target, - const std::string& config) -{ - cmsys::auto_ptr<cmCustomCommand> pcc; - - // VS6 forgets to create the output directory for archives if it - // differs from the intermediate directory. - if(target->GetType() != cmState::STATIC_LIBRARY) { return pcc; } - - std::string outDir = target->GetDirectory(config, false); - - // Add a pre-link event to create the directory. - cmCustomCommandLine command; - command.push_back(cmSystemTools::GetCMakeCommand()); - command.push_back("-E"); - command.push_back("make_directory"); - command.push_back(outDir); - std::vector<std::string> no_output; - std::vector<std::string> no_byproducts; - std::vector<std::string> no_depends; - cmCustomCommandLines commands; - commands.push_back(command); - pcc.reset(new cmCustomCommand(0, no_output, no_byproducts, - no_depends, commands, 0, 0)); - pcc->SetEscapeOldStyle(false); - pcc->SetEscapeAllowMakeVars(true); - return pcc; -} - -// look for custom rules on a target and collect them together -std::string -cmLocalVisualStudio6Generator::CreateTargetRules(cmGeneratorTarget *target, - const std::string& configName, - const std::string& /* libName */) -{ - if (target->GetType() >= cmState::UTILITY ) - { - return ""; - } - - std::string customRuleCode = "# Begin Special Build Tool\n"; - EventWriter event(this, configName, customRuleCode); - - // Write the pre-build and pre-link together (VS6 does not support both). - event.Start("PreLink"); - event.Write(target->GetPreBuildCommands()); - event.Write(target->GetPreLinkCommands()); - cmsys::auto_ptr<cmCustomCommand> pcc( - this->MaybeCreateImplibDir(target, configName, false)); - if(pcc.get()) - { - event.Write(*pcc); - } - pcc = this->MaybeCreateOutputDir(target, configName); - if(pcc.get()) - { - event.Write(*pcc); - } - event.Finish(); - - // Write the post-build rules. - event.Start("PostBuild"); - event.Write(target->GetPostBuildCommands()); - event.Finish(); - - customRuleCode += "# End Special Build Tool\n"; - return customRuleCode; -} - - -inline std::string removeQuotes(const std::string& s) -{ - if(s[0] == '\"' && s[s.size()-1] == '\"') - { - return s.substr(1, s.size()-2); - } - return s; -} - - -std::string -cmLocalVisualStudio6Generator::GetTargetIncludeOptions( - cmGeneratorTarget *target, - const std::string& config) -{ - std::string includeOptions; - - // Setup /I and /LIBPATH options for the resulting DSP file. VS 6 - // truncates long include paths so make it as short as possible if - // the length threatens this problem. - unsigned int maxIncludeLength = 3000; - bool useShortPath = false; - - for(int j=0; j < 2; ++j) - { - std::vector<std::string> includes; - this->GetIncludeDirectories(includes, target, "C", config); - - std::vector<std::string>::iterator i; - for(i = includes.begin(); i != includes.end(); ++i) - { - std::string tmp = - this->ConvertToOutputFormat(i->c_str(), SHELL); - if(useShortPath) - { - cmSystemTools::GetShortPath(tmp.c_str(), tmp); - } - includeOptions += " /I "; - - // quote if not already quoted - if (tmp[0] != '"') - { - includeOptions += "\""; - includeOptions += tmp; - includeOptions += "\""; - } - else - { - includeOptions += tmp; - } - } - - if(j == 0 && includeOptions.size() > maxIncludeLength) - { - includeOptions = ""; - useShortPath = true; - } - else - { - break; - } - } - - return includeOptions; -} - - -// Code in blocks surrounded by a test for this definition is needed -// only for compatibility with user project's replacement DSP -// templates. The CMake templates no longer use them. -#define CM_USE_OLD_VS6 - -void cmLocalVisualStudio6Generator -::WriteDSPHeader(std::ostream& fout, - const std::string& libName, cmGeneratorTarget* target, - std::vector<cmSourceGroup> &) -{ - bool targetBuilds = (target->GetType() >= cmState::EXECUTABLE && - target->GetType() <= cmState::MODULE_LIBRARY); -#ifdef CM_USE_OLD_VS6 - // Lookup the library and executable output directories. - std::string libPath; - if(this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) - { - libPath = this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"); - } - std::string exePath; - if(this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) - { - exePath = this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"); - } - - // Make sure there are trailing slashes. - if(!libPath.empty()) - { - if(libPath[libPath.size()-1] != '/') - { - libPath += "/"; - } - } - if(!exePath.empty()) - { - if(exePath[exePath.size()-1] != '/') - { - exePath += "/"; - } - } - - std::set<std::string> pathEmitted; - - // determine the link directories - std::string libOptions; - std::string libDebugOptions; - std::string libOptimizedOptions; - - std::string libMultiLineOptions; - std::string libMultiLineOptionsForDebug; - std::string libMultiLineDebugOptions; - std::string libMultiLineOptimizedOptions; - - if(!libPath.empty()) - { - std::string lpath = - this->ConvertToOutputFormat(libPath.c_str(), SHELL); - if(lpath.empty()) - { - lpath = "."; - } - std::string lpathIntDir = libPath + "$(INTDIR)"; - lpathIntDir = - this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL); - if(pathEmitted.insert(lpath).second) - { - libOptions += " /LIBPATH:"; - libOptions += lpathIntDir; - libOptions += " "; - libOptions += " /LIBPATH:"; - libOptions += lpath; - libOptions += " "; - libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; - libMultiLineOptions += lpathIntDir; - libMultiLineOptions += " "; - libMultiLineOptions += " /LIBPATH:"; - libMultiLineOptions += lpath; - libMultiLineOptions += " \n"; - libMultiLineOptionsForDebug += "# ADD LINK32 /LIBPATH:"; - libMultiLineOptionsForDebug += lpathIntDir; - libMultiLineOptionsForDebug += " "; - libMultiLineOptionsForDebug += " /LIBPATH:"; - libMultiLineOptionsForDebug += lpath; - libMultiLineOptionsForDebug += " \n"; - } - } - if(!exePath.empty()) - { - std::string lpath = - this->ConvertToOutputFormat(exePath.c_str(), SHELL); - if(lpath.empty()) - { - lpath = "."; - } - std::string lpathIntDir = exePath + "$(INTDIR)"; - lpathIntDir = - this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL); - - if(pathEmitted.insert(lpath).second) - { - libOptions += " /LIBPATH:"; - libOptions += lpathIntDir; - libOptions += " "; - libOptions += " /LIBPATH:"; - libOptions += lpath; - libOptions += " "; - libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; - libMultiLineOptions += lpathIntDir; - libMultiLineOptions += " "; - libMultiLineOptions += " /LIBPATH:"; - libMultiLineOptions += lpath; - libMultiLineOptions += " \n"; - libMultiLineOptionsForDebug += "# ADD LINK32 /LIBPATH:"; - libMultiLineOptionsForDebug += lpathIntDir; - libMultiLineOptionsForDebug += " "; - libMultiLineOptionsForDebug += " /LIBPATH:"; - libMultiLineOptionsForDebug += lpath; - libMultiLineOptionsForDebug += " \n"; - } - } - std::vector<std::string>::const_iterator i; - const std::vector<std::string>& libdirs = - target->GetLinkDirectories(); - for(i = libdirs.begin(); i != libdirs.end(); ++i) - { - std::string path = *i; - if(path[path.size()-1] != '/') - { - path += "/"; - } - std::string lpath = - this->ConvertToOutputFormat(path.c_str(), SHELL); - if(lpath.empty()) - { - lpath = "."; - } - std::string lpathIntDir = path + "$(INTDIR)"; - lpathIntDir = - this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL); - if(pathEmitted.insert(lpath).second) - { - libOptions += " /LIBPATH:"; - libOptions += lpathIntDir; - libOptions += " "; - libOptions += " /LIBPATH:"; - libOptions += lpath; - libOptions += " "; - - libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; - libMultiLineOptions += lpathIntDir; - libMultiLineOptions += " "; - libMultiLineOptions += " /LIBPATH:"; - libMultiLineOptions += lpath; - libMultiLineOptions += " \n"; - libMultiLineOptionsForDebug += "# ADD LINK32 /LIBPATH:"; - libMultiLineOptionsForDebug += lpathIntDir; - libMultiLineOptionsForDebug += " "; - libMultiLineOptionsForDebug += " /LIBPATH:"; - libMultiLineOptionsForDebug += lpath; - libMultiLineOptionsForDebug += " \n"; - } - } - // find link libraries - const cmTarget::LinkLibraryVectorType& libs = - target->Target->GetLinkLibrariesForVS6(); - cmTarget::LinkLibraryVectorType::const_iterator j; - for(j = libs.begin(); j != libs.end(); ++j) - { - // add libraries to executables and dlls (but never include - // a library in a library, bad recursion) - // NEVER LINK STATIC LIBRARIES TO OTHER STATIC LIBRARIES - if ((target->GetType() != cmState::SHARED_LIBRARY - && target->GetType() != cmState::STATIC_LIBRARY - && target->GetType() != cmState::MODULE_LIBRARY) || - (target->GetType()==cmState::SHARED_LIBRARY - && libName != GetVS6TargetName(j->first)) || - (target->GetType()==cmState::MODULE_LIBRARY - && libName != GetVS6TargetName(j->first))) - { - // Compute the proper name to use to link this library. - std::string lib; - std::string libDebug; - cmGeneratorTarget* tgt = - this->GlobalGenerator->FindGeneratorTarget(j->first.c_str()); - if(tgt) - { - lib = cmSystemTools::GetFilenameWithoutExtension - (tgt->GetFullName().c_str()); - libDebug = cmSystemTools::GetFilenameWithoutExtension - (tgt->GetFullName("Debug").c_str()); - lib += ".lib"; - libDebug += ".lib"; - } - else - { - lib = j->first.c_str(); - libDebug = j->first.c_str(); - if(j->first.find(".lib") == std::string::npos) - { - lib += ".lib"; - libDebug += ".lib"; - } - } - lib = this->ConvertToOutputFormat(lib.c_str(), SHELL); - libDebug = - this->ConvertToOutputFormat(libDebug.c_str(), SHELL); - - if (j->second == GENERAL_LibraryType) - { - libOptions += " "; - libOptions += lib; - libMultiLineOptions += "# ADD LINK32 "; - libMultiLineOptions += lib; - libMultiLineOptions += "\n"; - libMultiLineOptionsForDebug += "# ADD LINK32 "; - libMultiLineOptionsForDebug += libDebug; - libMultiLineOptionsForDebug += "\n"; - } - if (j->second == DEBUG_LibraryType) - { - libDebugOptions += " "; - libDebugOptions += lib; - - libMultiLineDebugOptions += "# ADD LINK32 "; - libMultiLineDebugOptions += libDebug; - libMultiLineDebugOptions += "\n"; - } - if (j->second == OPTIMIZED_LibraryType) - { - libOptimizedOptions += " "; - libOptimizedOptions += lib; - - libMultiLineOptimizedOptions += "# ADD LINK32 "; - libMultiLineOptimizedOptions += lib; - libMultiLineOptimizedOptions += "\n"; - } - } - } -#endif - - // Get include options for this target. - std::string includeOptionsDebug = this->GetTargetIncludeOptions(target, - "DEBUG"); - std::string includeOptionsRelease = this->GetTargetIncludeOptions(target, - "RELEASE"); - std::string includeOptionsRelWithDebInfo = this->GetTargetIncludeOptions( - target, - "RELWITHDEBINFO"); - std::string includeOptionsMinSizeRel = this->GetTargetIncludeOptions(target, - "MINSIZEREL"); - - // Get extra linker options for this target type. - std::string extraLinkOptions; - std::string extraLinkOptionsDebug; - std::string extraLinkOptionsRelease; - std::string extraLinkOptionsMinSizeRel; - std::string extraLinkOptionsRelWithDebInfo; - if(target->GetType() == cmState::EXECUTABLE) - { - extraLinkOptions = this->Makefile-> - GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); - extraLinkOptionsDebug = this->Makefile-> - GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_DEBUG"); - extraLinkOptionsRelease = this->Makefile-> - GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_RELEASE"); - extraLinkOptionsMinSizeRel = this->Makefile-> - GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_MINSIZEREL"); - extraLinkOptionsRelWithDebInfo = this->Makefile-> - GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO"); - } - if(target->GetType() == cmState::SHARED_LIBRARY) - { - extraLinkOptions = this->Makefile-> - GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); - extraLinkOptionsDebug = this->Makefile-> - GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_DEBUG"); - extraLinkOptionsRelease = this->Makefile-> - GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_RELEASE"); - extraLinkOptionsMinSizeRel = this->Makefile-> - GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL"); - extraLinkOptionsRelWithDebInfo = this->Makefile-> - GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO"); - } - if(target->GetType() == cmState::MODULE_LIBRARY) - { - extraLinkOptions = this->Makefile-> - GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); - extraLinkOptionsDebug = this->Makefile-> - GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_DEBUG"); - extraLinkOptionsRelease = this->Makefile-> - GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_RELEASE"); - extraLinkOptionsMinSizeRel = this->Makefile-> - GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL"); - extraLinkOptionsRelWithDebInfo = this->Makefile-> - GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO"); - } - - // Get extra linker options for this target. - if(const char* targetLinkFlags = target->GetProperty("LINK_FLAGS")) - { - extraLinkOptions += " "; - extraLinkOptions += targetLinkFlags; - } - - if(const char* targetLinkFlags = target->GetProperty("LINK_FLAGS_DEBUG")) - { - extraLinkOptionsDebug += " "; - extraLinkOptionsDebug += targetLinkFlags; - } - - if(const char* targetLinkFlags = target->GetProperty("LINK_FLAGS_RELEASE")) - { - extraLinkOptionsRelease += " "; - extraLinkOptionsRelease += targetLinkFlags; - } - - if(const char* targetLinkFlags = - target->GetProperty("LINK_FLAGS_MINSIZEREL")) - { - extraLinkOptionsMinSizeRel += " "; - extraLinkOptionsMinSizeRel += targetLinkFlags; - } - - if(const char* targetLinkFlags = - target->GetProperty("LINK_FLAGS_RELWITHDEBINFO")) - { - extraLinkOptionsRelWithDebInfo += " "; - extraLinkOptionsRelWithDebInfo += targetLinkFlags; - } - - // Get standard libraries for this language. - if(targetBuilds) - { - // Get the language to use for linking. - std::vector<std::string> configs; - target->Target->GetMakefile()->GetConfigurations(configs); - std::vector<std::string>::const_iterator it = configs.begin(); - const std::string& linkLanguage = target->GetLinkerLanguage(*it); - for ( ; it != configs.end(); ++it) - { - const std::string& configLinkLanguage = target->GetLinkerLanguage(*it); - if (configLinkLanguage != linkLanguage) - { - cmSystemTools::Error - ("Linker language must not vary by configuration for target: ", - target->GetName().c_str()); - } - } - if(linkLanguage.empty()) - { - cmSystemTools::Error - ("CMake can not determine linker language for target: ", - target->GetName().c_str()); - return; - } - - // Compute the variable name to lookup standard libraries for this - // language. - std::string standardLibsVar = "CMAKE_"; - standardLibsVar += linkLanguage; - standardLibsVar += "_STANDARD_LIBRARIES"; - - // Add standard libraries. - if(const char* stdLibs = - this->Makefile->GetDefinition(standardLibsVar.c_str())) - { - extraLinkOptions += " "; - extraLinkOptions += stdLibs; - } - } - - // Compute version number information. - std::string targetVersionFlag; - if(target->GetType() == cmState::EXECUTABLE || - target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY) - { - int major; - int minor; - target->GetTargetVersion(major, minor); - std::ostringstream targetVersionStream; - targetVersionStream << "/version:" << major << "." << minor; - targetVersionFlag = targetVersionStream.str(); - } - - // Compute the real name of the target. - std::string outputName = - "(OUTPUT_NAME is for libraries and executables only)"; - std::string outputNameDebug = outputName; - std::string outputNameRelease = outputName; - std::string outputNameMinSizeRel = outputName; - std::string outputNameRelWithDebInfo = outputName; - if(target->GetType() == cmState::EXECUTABLE || - target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY) - { - outputName = target->GetFullName(); - outputNameDebug = target->GetFullName("Debug"); - outputNameRelease = target->GetFullName("Release"); - outputNameMinSizeRel = target->GetFullName("MinSizeRel"); - outputNameRelWithDebInfo = target->GetFullName("RelWithDebInfo"); - } - else if(target->GetType() == cmState::OBJECT_LIBRARY) - { - outputName = target->GetName(); - outputName += ".lib"; - outputNameDebug = outputName; - outputNameRelease = outputName; - outputNameMinSizeRel = outputName; - outputNameRelWithDebInfo = outputName; - } - - // Compute the output directory for the target. - std::string outputDirOld; - std::string outputDirDebug; - std::string outputDirRelease; - std::string outputDirMinSizeRel; - std::string outputDirRelWithDebInfo; - if(target->GetType() == cmState::EXECUTABLE || - target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY) - { -#ifdef CM_USE_OLD_VS6 - outputDirOld = - removeQuotes(this->ConvertToOutputFormat - (target->GetDirectory().c_str(), SHELL)); -#endif - outputDirDebug = - removeQuotes(this->ConvertToOutputFormat( - target->GetDirectory("Debug").c_str(), SHELL)); - outputDirRelease = - removeQuotes(this->ConvertToOutputFormat( - target->GetDirectory("Release").c_str(), SHELL)); - outputDirMinSizeRel = - removeQuotes(this->ConvertToOutputFormat( - target->GetDirectory("MinSizeRel").c_str(), SHELL)); - outputDirRelWithDebInfo = - removeQuotes(this->ConvertToOutputFormat( - target->GetDirectory("RelWithDebInfo").c_str(), SHELL)); - } - else if(target->GetType() == cmState::OBJECT_LIBRARY) - { - std::string outputDir = cmake::GetCMakeFilesDirectoryPostSlash(); - outputDirDebug = outputDir + "Debug"; - outputDirRelease = outputDir + "Release"; - outputDirMinSizeRel = outputDir + "MinSizeRel"; - outputDirRelWithDebInfo = outputDir + "RelWithDebInfo"; - } - - // Compute the proper link information for the target. - std::string optionsDebug; - std::string optionsRelease; - std::string optionsMinSizeRel; - std::string optionsRelWithDebInfo; - if(target->GetType() == cmState::EXECUTABLE || - target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY) - { - extraLinkOptionsDebug = - extraLinkOptions + " " + extraLinkOptionsDebug; - extraLinkOptionsRelease = - extraLinkOptions + " " + extraLinkOptionsRelease; - extraLinkOptionsMinSizeRel = - extraLinkOptions + " " + extraLinkOptionsMinSizeRel; - extraLinkOptionsRelWithDebInfo = - extraLinkOptions + " " + extraLinkOptionsRelWithDebInfo; - this->ComputeLinkOptions(target, "Debug", extraLinkOptionsDebug, - optionsDebug); - this->ComputeLinkOptions(target, "Release", extraLinkOptionsRelease, - optionsRelease); - this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptionsMinSizeRel, - optionsMinSizeRel); - this->ComputeLinkOptions(target, "RelWithDebInfo", - extraLinkOptionsRelWithDebInfo, - optionsRelWithDebInfo); - } - - // Compute the path of the import library. - std::string targetImplibFlagDebug; - std::string targetImplibFlagRelease; - std::string targetImplibFlagMinSizeRel; - std::string targetImplibFlagRelWithDebInfo; - if(target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY || - target->GetType() == cmState::EXECUTABLE) - { - std::string fullPathImpDebug = target->GetDirectory("Debug", true); - std::string fullPathImpRelease = target->GetDirectory("Release", true); - std::string fullPathImpMinSizeRel = - target->GetDirectory("MinSizeRel", true); - std::string fullPathImpRelWithDebInfo = - target->GetDirectory("RelWithDebInfo", true); - fullPathImpDebug += "/"; - fullPathImpRelease += "/"; - fullPathImpMinSizeRel += "/"; - fullPathImpRelWithDebInfo += "/"; - fullPathImpDebug += target->GetFullName("Debug", true); - fullPathImpRelease += target->GetFullName("Release", true); - fullPathImpMinSizeRel += target->GetFullName("MinSizeRel", true); - fullPathImpRelWithDebInfo += target->GetFullName("RelWithDebInfo", true); - - targetImplibFlagDebug = "/implib:"; - targetImplibFlagRelease = "/implib:"; - targetImplibFlagMinSizeRel = "/implib:"; - targetImplibFlagRelWithDebInfo = "/implib:"; - targetImplibFlagDebug += - this->ConvertToOutputFormat(fullPathImpDebug.c_str(), SHELL); - targetImplibFlagRelease += - this->ConvertToOutputFormat(fullPathImpRelease.c_str(), SHELL); - targetImplibFlagMinSizeRel += - this->ConvertToOutputFormat(fullPathImpMinSizeRel.c_str(), SHELL); - targetImplibFlagRelWithDebInfo += - this->ConvertToOutputFormat(fullPathImpRelWithDebInfo.c_str(), SHELL); - } - -#ifdef CM_USE_OLD_VS6 - // Compute link information for the target. - if(!extraLinkOptions.empty()) - { - libOptions += " "; - libOptions += extraLinkOptions; - libOptions += " "; - libMultiLineOptions += "# ADD LINK32 "; - libMultiLineOptions += extraLinkOptions; - libMultiLineOptions += " \n"; - libMultiLineOptionsForDebug += "# ADD LINK32 "; - libMultiLineOptionsForDebug += extraLinkOptions; - libMultiLineOptionsForDebug += " \n"; - } -#endif - - // are there any custom rules on the target itself - // only if the target is a lib or exe - std::string customRuleCodeRelease - = this->CreateTargetRules(target, "RELEASE", libName); - std::string customRuleCodeDebug - = this->CreateTargetRules(target, "DEBUG", libName); - std::string customRuleCodeMinSizeRel - = this->CreateTargetRules(target, "MINSIZEREL", libName); - std::string customRuleCodeRelWithDebInfo - = this->CreateTargetRules(target, "RELWITHDEBINFO", libName); - - cmsys::ifstream fin(this->DSPHeaderTemplate.c_str()); - if(!fin) - { - cmSystemTools::Error("Error Reading ", this->DSPHeaderTemplate.c_str()); - } - std::string staticLibOptions; - std::string staticLibOptionsDebug; - std::string staticLibOptionsRelease; - std::string staticLibOptionsMinSizeRel; - std::string staticLibOptionsRelWithDebInfo; - if(target->GetType() == cmState::STATIC_LIBRARY ) - { - const char *libflagsGlobal = - this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS"); - this->AppendFlags(staticLibOptions, libflagsGlobal); - this->AppendFlags(staticLibOptionsDebug, libflagsGlobal); - this->AppendFlags(staticLibOptionsRelease, libflagsGlobal); - this->AppendFlags(staticLibOptionsMinSizeRel, libflagsGlobal); - this->AppendFlags(staticLibOptionsRelWithDebInfo, libflagsGlobal); - - this->AppendFlags(staticLibOptionsDebug, this->Makefile-> - GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS_DEBUG")); - this->AppendFlags(staticLibOptionsRelease, this->Makefile-> - GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS_RELEASE")); - this->AppendFlags(staticLibOptionsMinSizeRel, this->Makefile-> - GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL")); - this->AppendFlags(staticLibOptionsRelWithDebInfo, this->Makefile-> - GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO")); - - const char *libflags = target->GetProperty("STATIC_LIBRARY_FLAGS"); - this->AppendFlags(staticLibOptions, libflags); - this->AppendFlags(staticLibOptionsDebug, libflags); - this->AppendFlags(staticLibOptionsRelease, libflags); - this->AppendFlags(staticLibOptionsMinSizeRel, libflags); - this->AppendFlags(staticLibOptionsRelWithDebInfo, libflags); - - this->AppendFlags(staticLibOptionsDebug, - target->GetProperty("STATIC_LIBRARY_FLAGS_DEBUG")); - this->AppendFlags(staticLibOptionsRelease, - target->GetProperty("STATIC_LIBRARY_FLAGS_RELEASE")); - this->AppendFlags(staticLibOptionsMinSizeRel, - target->GetProperty("STATIC_LIBRARY_FLAGS_MINSIZEREL")); - this->AppendFlags(staticLibOptionsRelWithDebInfo, - target->GetProperty("STATIC_LIBRARY_FLAGS_RELWITHDEBINFO")); - - std::string objects; - this->OutputObjects(target, "LIB", objects); - if(!objects.empty()) - { - objects = "\n" + objects; - staticLibOptionsDebug += objects; - staticLibOptionsRelease += objects; - staticLibOptionsMinSizeRel += objects; - staticLibOptionsRelWithDebInfo += objects; - } - } - - // Add the export symbol definition for shared library objects. - std::string exportSymbol; - if(const char* exportMacro = target->GetExportMacro()) - { - exportSymbol = exportMacro; - } - - std::string line; - std::string libnameExports; - if(!exportSymbol.empty()) - { - libnameExports = "/D \""; - libnameExports += exportSymbol; - libnameExports += "\""; - } - while(cmSystemTools::GetLineFromStream(fin, line)) - { - const char* mfcFlag = this->Makefile->GetDefinition("CMAKE_MFC_FLAG"); - if(!mfcFlag) - { - mfcFlag = "0"; - } - cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS", - libnameExports.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG", - mfcFlag); - if(target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::OBJECT_LIBRARY) - { - cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_DEBUG", - staticLibOptionsDebug.c_str()); - cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_RELEASE", - staticLibOptionsRelease.c_str()); - cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_MINSIZEREL", - staticLibOptionsMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_RELWITHDEBINFO", - staticLibOptionsRelWithDebInfo.c_str()); - cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS", - staticLibOptions.c_str()); - } - if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) - { - cmSystemTools::ReplaceString(line, "/nologo", ""); - } - -#ifdef CM_USE_OLD_VS6 - cmSystemTools::ReplaceString(line, "CM_LIBRARIES", - libOptions.c_str()); - cmSystemTools::ReplaceString(line, "CM_DEBUG_LIBRARIES", - libDebugOptions.c_str()); - cmSystemTools::ReplaceString(line, "CM_OPTIMIZED_LIBRARIES", - libOptimizedOptions.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_LIBRARIES_FOR_DEBUG", - libMultiLineOptionsForDebug.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_LIBRARIES", - libMultiLineOptions.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_DEBUG_LIBRARIES", - libMultiLineDebugOptions.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIMIZED_LIBRARIES", - libMultiLineOptimizedOptions.c_str()); -#endif - - // Substitute the rules for custom command. When specifying just the - // target name for the command the command can be different for - // different configs - cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELEASE", - customRuleCodeRelease.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_DEBUG", - customRuleCodeDebug.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_MINSIZEREL", - customRuleCodeMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO", - customRuleCodeRelWithDebInfo.c_str()); - - // Substitute the real output name into the template. - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG", - outputNameDebug.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE", - outputNameRelease.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL", - outputNameMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO", - outputNameRelWithDebInfo.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_NAME", outputName.c_str()); - - // Substitute the proper link information into the template. - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_DEBUG", - optionsDebug.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE", - optionsRelease.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL", - optionsMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO", - optionsRelWithDebInfo.c_str()); - - cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_DEBUG", - includeOptionsDebug.c_str()); - cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_RELEASE", - includeOptionsRelease.c_str()); - cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_MINSIZEREL", - includeOptionsMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_RELWITHDEBINFO", - includeOptionsRelWithDebInfo.c_str()); - - cmSystemTools::ReplaceString(line, "TARGET_VERSION_FLAG", - targetVersionFlag.c_str()); - cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_DEBUG", - targetImplibFlagDebug.c_str()); - cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_RELEASE", - targetImplibFlagRelease.c_str()); - cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_MINSIZEREL", - targetImplibFlagMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_RELWITHDEBINFO", - targetImplibFlagRelWithDebInfo.c_str()); - - std::string vs6name = GetVS6TargetName(libName); - cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME", vs6name.c_str()); - -#ifdef CM_USE_OLD_VS6 - // because LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH - // are already quoted in the template file, - // we need to remove the quotes here, we still need - // to convert to output path for unix to win32 conversion - cmSystemTools::ReplaceString - (line, "LIBRARY_OUTPUT_PATH", - removeQuotes(this->ConvertToOutputFormat - (libPath.c_str(), SHELL)).c_str()); - cmSystemTools::ReplaceString - (line, "EXECUTABLE_OUTPUT_PATH", - removeQuotes(this->ConvertToOutputFormat - (exePath.c_str(), SHELL)).c_str()); -#endif - - if(targetBuilds || target->GetType() == cmState::OBJECT_LIBRARY) - { - cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_DEBUG", - outputDirDebug.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELEASE", - outputDirRelease.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_MINSIZEREL", - outputDirMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELWITHDEBINFO", - outputDirRelWithDebInfo.c_str()); - if(!outputDirOld.empty()) - { - cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY", - outputDirOld.c_str()); - } - } - - cmSystemTools::ReplaceString(line, - "EXTRA_DEFINES", - this->Makefile->GetDefineFlags()); - const char* debugPostfix - = this->Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); - cmSystemTools::ReplaceString(line, "DEBUG_POSTFIX", - debugPostfix?debugPostfix:""); - if(target->GetType() >= cmState::EXECUTABLE && - target->GetType() <= cmState::OBJECT_LIBRARY) - { - // store flags for each configuration - std::string flags = " "; - std::string flagsRelease = " "; - std::string flagsMinSizeRel = " "; - std::string flagsDebug = " "; - std::string flagsRelWithDebInfo = " "; - std::vector<std::string> configs; - target->Target->GetMakefile()->GetConfigurations(configs); - std::vector<std::string>::const_iterator it = configs.begin(); - const std::string& linkLanguage = target->GetLinkerLanguage(*it); - for ( ; it != configs.end(); ++it) - { - const std::string& configLinkLanguage = target->GetLinkerLanguage(*it); - if (configLinkLanguage != linkLanguage) - { - cmSystemTools::Error - ("Linker language must not vary by configuration for target: ", - target->GetName().c_str()); - } - } - if(linkLanguage.empty()) - { - cmSystemTools::Error - ("CMake can not determine linker language for target: ", - target->GetName().c_str()); - return; - } - // if CXX is on and the target contains cxx code then add the cxx flags - std::string baseFlagVar = "CMAKE_"; - baseFlagVar += linkLanguage; - baseFlagVar += "_FLAGS"; - flags = this->Makefile->GetSafeDefinition(baseFlagVar.c_str()); - - std::string flagVar = baseFlagVar + "_RELEASE"; - flagsRelease = this->Makefile->GetSafeDefinition(flagVar.c_str()); - flagsRelease += " -DCMAKE_INTDIR=\\\"Release\\\" "; - - flagVar = baseFlagVar + "_MINSIZEREL"; - flagsMinSizeRel = this->Makefile->GetSafeDefinition(flagVar.c_str()); - flagsMinSizeRel += " -DCMAKE_INTDIR=\\\"MinSizeRel\\\" "; - - flagVar = baseFlagVar + "_DEBUG"; - flagsDebug = this->Makefile->GetSafeDefinition(flagVar.c_str()); - flagsDebug += " -DCMAKE_INTDIR=\\\"Debug\\\" "; - - flagVar = baseFlagVar + "_RELWITHDEBINFO"; - flagsRelWithDebInfo = this->Makefile->GetSafeDefinition(flagVar.c_str()); - flagsRelWithDebInfo += " -DCMAKE_INTDIR=\\\"RelWithDebInfo\\\" "; - - this->AddCompileOptions(flags, target, linkLanguage, ""); - this->AddCompileOptions(flagsDebug, target, linkLanguage, "Debug"); - this->AddCompileOptions(flagsRelease, target, linkLanguage, "Release"); - this->AddCompileOptions(flagsMinSizeRel, target, linkLanguage, - "MinSizeRel"); - this->AddCompileOptions(flagsRelWithDebInfo, target, linkLanguage, - "RelWithDebInfo"); - - // if _UNICODE and _SBCS are not found, then add -D_MBCS - std::string defs = this->Makefile->GetDefineFlags(); - if(flags.find("D_UNICODE") == flags.npos && - defs.find("D_UNICODE") == flags.npos && - flags.find("D_SBCS") == flags.npos && - defs.find("D_SBCS") == flags.npos) - { - flags += " /D \"_MBCS\""; - } - - // Add per-target and per-configuration preprocessor definitions. - std::set<std::string> definesSet; - std::set<std::string> debugDefinesSet; - std::set<std::string> releaseDefinesSet; - std::set<std::string> minsizeDefinesSet; - std::set<std::string> debugrelDefinesSet; - - this->AddCompileDefinitions(definesSet, target, "", linkLanguage); - this->AddCompileDefinitions(debugDefinesSet, target, - "DEBUG", linkLanguage); - this->AddCompileDefinitions(releaseDefinesSet, target, - "RELEASE", linkLanguage); - this->AddCompileDefinitions(minsizeDefinesSet, target, - "MINSIZEREL", linkLanguage); - this->AddCompileDefinitions(debugrelDefinesSet, target, - "RELWITHDEBINFO", linkLanguage); - - std::string defines = " "; - std::string debugDefines = " "; - std::string releaseDefines = " "; - std::string minsizeDefines = " "; - std::string debugrelDefines = " "; - - this->JoinDefines(definesSet, defines, ""); - this->JoinDefines(debugDefinesSet, debugDefines, ""); - this->JoinDefines(releaseDefinesSet, releaseDefines, ""); - this->JoinDefines(minsizeDefinesSet, minsizeDefines, ""); - this->JoinDefines(debugrelDefinesSet, debugrelDefines, ""); - - flags += defines; - flagsDebug += debugDefines; - flagsRelease += releaseDefines; - flagsMinSizeRel += minsizeDefines; - flagsRelWithDebInfo += debugrelDefines; - - // The template files have CXX FLAGS in them, that need to be replaced. - // There are not separate CXX and C template files, so we use the same - // variable names. The previous code sets up flags* variables to - // contain the correct C or CXX flags - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL", - flagsMinSizeRel.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG", - flagsDebug.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELWITHDEBINFO", - flagsRelWithDebInfo.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE", - flagsRelease.c_str()); - cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS", flags.c_str()); - - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_MINSIZEREL", - minsizeDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_DEBUG", - debugDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_RELWITHDEBINFO", - debugrelDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_RELEASE", - releaseDefines.c_str()); - cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS", - defines.c_str()); - } - - fout << line.c_str() << std::endl; - } -} - -void cmLocalVisualStudio6Generator::WriteDSPFooter(std::ostream& fout) -{ - cmsys::ifstream fin(this->DSPFooterTemplate.c_str()); - if(!fin) - { - cmSystemTools::Error("Error Reading ", - this->DSPFooterTemplate.c_str()); - } - std::string line; - while(cmSystemTools::GetLineFromStream(fin, line)) - { - fout << line << std::endl; - } -} - -//---------------------------------------------------------------------------- -void cmLocalVisualStudio6Generator -::ComputeLinkOptions(cmGeneratorTarget *target, - const std::string& configName, - const std::string extraOptions, - std::string& options) -{ - // Compute the link information for this configuration. - cmComputeLinkInformation* pcli = target->GetLinkInformation(configName); - if(!pcli) - { - return; - } - cmComputeLinkInformation& cli = *pcli; - typedef cmComputeLinkInformation::ItemVector ItemVector; - ItemVector const& linkLibs = cli.GetItems(); - std::vector<std::string> const& linkDirs = cli.GetDirectories(); - - this->OutputObjects(target, "LINK", options); - - // Build the link options code. - for(std::vector<std::string>::const_iterator d = linkDirs.begin(); - d != linkDirs.end(); ++d) - { - std::string dir = *d; - if(!dir.empty()) - { - if(dir[dir.size()-1] != '/') - { - dir += "/"; - } - dir += "$(IntDir)"; - options += "# ADD LINK32 /LIBPATH:"; - options += this->ConvertToOutputFormat(dir.c_str(), SHELL); - options += " /LIBPATH:"; - options += this->ConvertToOutputFormat(d->c_str(), SHELL); - options += "\n"; - } - } - for(ItemVector::const_iterator l = linkLibs.begin(); - l != linkLibs.end(); ++l) - { - options += "# ADD LINK32 "; - if(l->IsPath) - { - options += - this->ConvertToOutputFormat(l->Value.c_str(), SHELL); - } - else if (!l->Target - || l->Target->GetType() != cmState::INTERFACE_LIBRARY) - { - options += l->Value; - } - options += "\n"; - } - - // Add extra options if any. - if(!extraOptions.empty()) - { - options += "# ADD LINK32 "; - options += extraOptions; - options += "\n"; - } -} - -//---------------------------------------------------------------------------- -void cmLocalVisualStudio6Generator -::OutputObjects(cmGeneratorTarget* target, const char* tool, - std::string& options) -{ - // VS 6 does not support per-config source locations so we - // list object library content on the link line instead. - std::vector<std::string> objs; - target->UseObjectLibraries(objs, ""); - for(std::vector<std::string>::const_iterator - oi = objs.begin(); oi != objs.end(); ++oi) - { - options += "# ADD "; - options += tool; - options += "32 "; - options += this->ConvertToOutputFormat(oi->c_str(), SHELL); - options += "\n"; - } -} - -std::string -cmLocalVisualStudio6Generator -::GetTargetDirectory(cmGeneratorTarget const*) const -{ - // No per-target directory for this generator (yet). - return ""; -} - -//---------------------------------------------------------------------------- -std::string -cmLocalVisualStudio6Generator -::ComputeLongestObjectDirectory(cmGeneratorTarget const*) const -{ - // Compute the maximum length configuration name. - std::string config_max; - for(std::vector<std::string>::const_iterator - i = this->Configurations.begin(); - i != this->Configurations.end(); ++i) - { - // Strip the subdirectory name out of the configuration name. - std::string config = this->GetConfigName(*i); - if(config.size() > config_max.size()) - { - config_max = config; - } - } - - // Compute the maximum length full path to the intermediate - // files directory for any configuration. This is used to construct - // object file names that do not produce paths that are too long. - std::string dir_max; - dir_max += this->GetCurrentBinaryDirectory(); - dir_max += "/"; - dir_max += config_max; - dir_max += "/"; - return dir_max; -} - -std::string -cmLocalVisualStudio6Generator -::GetConfigName(std::string const& configuration) const -{ - // Strip the subdirectory name out of the configuration name. - std::string config = configuration; - std::string::size_type pos = config.find_last_of(" "); - config = config.substr(pos+1, std::string::npos); - config = config.substr(0, config.size()-1); - return config; -} - -//---------------------------------------------------------------------------- -bool -cmLocalVisualStudio6Generator -::CheckDefinition(std::string const& define) const -{ - // Perform the standard check first. - if(!this->cmLocalGenerator::CheckDefinition(define)) - { - return false; - } - - // Now do the VS6-specific check. - if(define.find_first_of(" ") != define.npos && - define.find_first_of("\"$;") != define.npos) - { - std::ostringstream e; - e << "WARNING: The VS6 IDE does not support preprocessor definition " - << "values with spaces and '\"', '$', or ';'.\n" - << "CMake is dropping a preprocessor definition: " << define << "\n" - << "Consider defining the macro in a (configured) header file.\n"; - cmSystemTools::Message(e.str().c_str()); - return false; - } - - // Assume it is supported. - return true; -} diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h deleted file mode 100644 index dab32a5..0000000 --- a/Source/cmLocalVisualStudio6Generator.h +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef cmLocalVisualStudio6Generator_h -#define cmLocalVisualStudio6Generator_h - -#include "cmLocalVisualStudioGenerator.h" - -class cmSourceFile; -class cmSourceGroup; -class cmCustomCommand; - -/** \class cmLocalVisualStudio6Generator - * \brief Write a LocalUnix makefiles. - * - * cmLocalVisualStudio6Generator produces a LocalUnix makefile from its - * member this->Makefile. - */ -class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator -{ -public: - ///! Set cache only and recurse to false by default. - cmLocalVisualStudio6Generator(cmGlobalGenerator* gg, cmMakefile* mf); - - virtual ~cmLocalVisualStudio6Generator(); - - virtual void AddCMakeListsRules(); - - /** - * Generate the makefile for this directory. - */ - virtual void Generate(); - - void OutputDSPFile(); - - enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY}; - - /** - * Specify the type of the build: static, dll, or executable. - */ - void SetBuildType(BuildType, const std::string& libName, cmGeneratorTarget*); - - virtual - std::string GetTargetDirectory(cmGeneratorTarget const* target) const; - virtual std::string - ComputeLongestObjectDirectory(cmGeneratorTarget const*) const; -private: - std::string DSPHeaderTemplate; - std::string DSPFooterTemplate; - - void CreateSingleDSP(const std::string& lname, cmGeneratorTarget* tgt); - void WriteDSPFile(std::ostream& fout, const std::string& libName, - cmGeneratorTarget* tgt); - void WriteDSPBeginGroup(std::ostream& fout, - const char* group, - const char* filter); - void WriteDSPEndGroup(std::ostream& fout); - - void WriteDSPHeader(std::ostream& fout, const std::string& libName, - cmGeneratorTarget* tgt, std::vector<cmSourceGroup> &sgs); - - void WriteDSPFooter(std::ostream& fout); - void AddDSPBuildRule(cmGeneratorTarget* tgt); - void WriteCustomRule(std::ostream& fout, - const char* source, - const cmCustomCommand& command, - const char* flags); - void AddUtilityCommandHack(cmGeneratorTarget* target, int count, - std::vector<std::string>& depends, - const cmCustomCommand& origCommand); - void WriteGroup(const cmSourceGroup *sg, cmGeneratorTarget* target, - std::ostream &fout, const std::string& libName); - class EventWriter; - friend class EventWriter; - cmsys::auto_ptr<cmCustomCommand> - MaybeCreateOutputDir(cmGeneratorTarget *target, const std::string& config); - std::string CreateTargetRules(cmGeneratorTarget* target, - const std::string& configName, - const std::string& libName); - void ComputeLinkOptions(cmGeneratorTarget* target, - const std::string& configName, - const std::string extraOptions, - std::string& options); - void OutputObjects(cmGeneratorTarget* target, const char* tool, - std::string& options); - std::string GetTargetIncludeOptions(cmGeneratorTarget* target, - const std::string& config); - std::vector<std::string> Configurations; - - std::string GetConfigName(std::string const& configuration) const; - - // Special definition check for VS6. - virtual bool CheckDefinition(std::string const& define) const; -}; - -#endif - diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 950b247..8f59e2c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -733,26 +733,6 @@ void cmMakefile::ConfigureFinalPass() "with CMake 2.4 or later. For compatibility with older versions please " "use any CMake 2.8.x release or lower."); } -#if defined(_WIN32) && !defined(__CYGWIN__) - // Do old-style link dependency analysis only for CM_USE_OLD_VS6. - if(this->GetGlobalGenerator()->IsForVS6()) - { - for (cmTargets::iterator l = this->Targets.begin(); - l != this->Targets.end(); l++) - { - if (l->second.GetType() == cmState::INTERFACE_LIBRARY) - { - continue; - } - // Erase any cached link information that might have been comptued - // on-demand during the configuration. This ensures that build - // system generation uses up-to-date information even if other cache - // invalidation code in this source file is buggy. - - l->second.AnalyzeLibDependenciesForVS6(*this); - } - } -#endif } //---------------------------------------------------------------------------- @@ -1334,14 +1314,6 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) return false; } - // VS6 IDE does not support definition values with spaces in - // combination with '"', '$', or ';'. - if((this->GetGlobalGenerator()->GetName() == "Visual Studio 6") && - (def.find(" ") != def.npos && def.find_first_of("\"$;") != def.npos)) - { - return false; - } - // Definitions with non-trivial values require a policy check. static cmsys::RegularExpression trivial("^[-/]D[A-Za-z_][A-Za-z0-9_]*(=[A-Za-z0-9_.]+)?$"); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1986e5f..576189f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -55,9 +55,6 @@ public: cmTarget::cmTarget() { this->Makefile = 0; -#if defined(_WIN32) && !defined(__CYGWIN__) - this->LinkLibrariesForVS6Analyzed = false; -#endif this->HaveInstallRule = false; this->DLLPlatform = false; this->IsAndroid = false; @@ -699,9 +696,6 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, cmTarget::LibraryID tmp; tmp.first = lib; tmp.second = llt; -#if defined(_WIN32) && !defined(__CYGWIN__) - this->LinkLibrariesForVS6.push_back( tmp ); -#endif this->OriginalLinkLibraries.push_back(tmp); // Add the explicit dependency information for this target. This is @@ -811,298 +805,6 @@ cmBacktraceRange cmTarget::GetLinkImplementationBacktraces() const return cmMakeRange(this->Internal->LinkImplementationPropertyBacktraces); } -#if defined(_WIN32) && !defined(__CYGWIN__) -//---------------------------------------------------------------------------- -void -cmTarget::AnalyzeLibDependenciesForVS6( const cmMakefile& mf ) -{ - // There are two key parts of the dependency analysis: (1) - // determining the libraries in the link line, and (2) constructing - // the dependency graph for those libraries. - // - // The latter is done using the cache entries that record the - // dependencies of each library. - // - // The former is a more thorny issue, since it is not clear how to - // determine if two libraries listed on the link line refer to the a - // single library or not. For example, consider the link "libraries" - // /usr/lib/libtiff.so -ltiff - // Is this one library or two? The solution implemented here is the - // simplest (and probably the only practical) one: two libraries are - // the same if their "link strings" are identical. Thus, the two - // libraries above are considered distinct. This also means that for - // dependency analysis to be effective, the CMake user must specify - // libraries build by his project without using any linker flags or - // file extensions. That is, - // LINK_LIBRARIES( One Two ) - // instead of - // LINK_LIBRARIES( -lOne ${binarypath}/libTwo.a ) - // The former is probably what most users would do, but it never - // hurts to document the assumptions. :-) Therefore, in the analysis - // code, the "canonical name" of a library is simply its name as - // given to a LINK_LIBRARIES command. - // - // Also, we will leave the original link line intact; we will just add any - // dependencies that were missing. - // - // There is a problem with recursive external libraries - // (i.e. libraries with no dependency information that are - // recursively dependent). We must make sure that the we emit one of - // the libraries twice to satisfy the recursion, but we shouldn't - // emit it more times than necessary. In particular, we must make - // sure that handling this improbable case doesn't cost us when - // dealing with the common case of non-recursive libraries. The - // solution is to assume that the recursion is satisfied at one node - // of the dependency tree. To illustrate, assume libA and libB are - // extrenal and mutually dependent. Suppose libX depends on - // libA, and libY on libA and libX. Then - // TARGET_LINK_LIBRARIES( Y X A B A ) - // TARGET_LINK_LIBRARIES( X A B A ) - // TARGET_LINK_LIBRARIES( Exec Y ) - // would result in "-lY -lX -lA -lB -lA". This is the correct way to - // specify the dependencies, since the mutual dependency of A and B - // is resolved *every time libA is specified*. - // - // Something like - // TARGET_LINK_LIBRARIES( Y X A B A ) - // TARGET_LINK_LIBRARIES( X A B ) - // TARGET_LINK_LIBRARIES( Exec Y ) - // would result in "-lY -lX -lA -lB", and the mutual dependency - // information is lost. This is because in some case (Y), the mutual - // dependency of A and B is listed, while in another other case (X), - // it is not. Depending on which line actually emits A, the mutual - // dependency may or may not be on the final link line. We can't - // handle this pathalogical case cleanly without emitting extra - // libraries for the normal cases. Besides, the dependency - // information for X is wrong anyway: if we build an executable - // depending on X alone, we would not have the mutual dependency on - // A and B resolved. - // - // IMPROVEMENTS: - // -- The current algorithm will not always pick the "optimal" link line - // when recursive dependencies are present. It will instead break the - // cycles at an aribtrary point. The majority of projects won't have - // cyclic dependencies, so this is probably not a big deal. Note that - // the link line is always correct, just not necessary optimal. - - { - // Expand variables in link library names. This is for backwards - // compatibility with very early CMake versions and should - // eventually be removed. This code was moved here from the end of - // old source list processing code which was called just before this - // method. - for(LinkLibraryVectorType::iterator p = this->LinkLibrariesForVS6.begin(); - p != this->LinkLibrariesForVS6.end(); ++p) - { - this->Makefile->ExpandVariablesInString(p->first, true, true); - } - } - - // The dependency map. - DependencyMap dep_map; - - // 1. Build the dependency graph - // - for(LinkLibraryVectorType::reverse_iterator lib - = this->LinkLibrariesForVS6.rbegin(); - lib != this->LinkLibrariesForVS6.rend(); ++lib) - { - this->GatherDependenciesForVS6( mf, *lib, dep_map); - } - - // 2. Remove any dependencies that are already satisfied in the original - // link line. - // - for(LinkLibraryVectorType::iterator lib = this->LinkLibrariesForVS6.begin(); - lib != this->LinkLibrariesForVS6.end(); ++lib) - { - for( LinkLibraryVectorType::iterator lib2 = lib; - lib2 != this->LinkLibrariesForVS6.end(); ++lib2) - { - this->DeleteDependencyForVS6( dep_map, *lib, *lib2); - } - } - - - // 3. Create the new link line by simply emitting any dependencies that are - // missing. Start from the back and keep adding. - // - std::set<DependencyMap::key_type> done, visited; - std::vector<DependencyMap::key_type> newLinkLibrariesForVS6; - for(LinkLibraryVectorType::reverse_iterator lib = - this->LinkLibrariesForVS6.rbegin(); - lib != this->LinkLibrariesForVS6.rend(); ++lib) - { - // skip zero size library entries, this may happen - // if a variable expands to nothing. - if (!lib->first.empty()) - { - this->EmitForVS6( *lib, dep_map, done, visited, newLinkLibrariesForVS6 ); - } - } - - // 4. Add the new libraries to the link line. - // - for( std::vector<DependencyMap::key_type>::reverse_iterator k = - newLinkLibrariesForVS6.rbegin(); - k != newLinkLibrariesForVS6.rend(); ++k ) - { - // get the llt from the dep_map - this->LinkLibrariesForVS6.push_back( std::make_pair(k->first,k->second) ); - } - this->LinkLibrariesForVS6Analyzed = true; -} - -//---------------------------------------------------------------------------- -void cmTarget::InsertDependencyForVS6( DependencyMap& depMap, - const LibraryID& lib, - const LibraryID& dep) -{ - depMap[lib].push_back(dep); -} - -//---------------------------------------------------------------------------- -void cmTarget::DeleteDependencyForVS6( DependencyMap& depMap, - const LibraryID& lib, - const LibraryID& dep) -{ - // Make sure there is an entry in the map for lib. If so, delete all - // dependencies to dep. There may be repeated entries because of - // external libraries that are specified multiple times. - DependencyMap::iterator map_itr = depMap.find( lib ); - if( map_itr != depMap.end() ) - { - DependencyList& depList = map_itr->second; - DependencyList::iterator begin = - std::remove(depList.begin(), depList.end(), dep); - depList.erase(begin, depList.end()); - } -} - -//---------------------------------------------------------------------------- -void cmTarget::EmitForVS6(const LibraryID lib, - const DependencyMap& dep_map, - std::set<LibraryID>& emitted, - std::set<LibraryID>& visited, - DependencyList& link_line ) -{ - // It's already been emitted - if( emitted.find(lib) != emitted.end() ) - { - return; - } - - // Emit the dependencies only if this library node hasn't been - // visited before. If it has, then we have a cycle. The recursion - // that got us here should take care of everything. - - if( visited.insert(lib).second ) - { - if( dep_map.find(lib) != dep_map.end() ) // does it have dependencies? - { - const DependencyList& dep_on = dep_map.find( lib )->second; - DependencyList::const_reverse_iterator i; - - // To cater for recursive external libraries, we must emit - // duplicates on this link line *unless* they were emitted by - // some other node, in which case we assume that the recursion - // was resolved then. We making the simplifying assumption that - // any duplicates on a single link line are on purpose, and must - // be preserved. - - // This variable will keep track of the libraries that were - // emitted directly from the current node, and not from a - // recursive call. This way, if we come across a library that - // has already been emitted, we repeat it iff it has been - // emitted here. - std::set<DependencyMap::key_type> emitted_here; - for( i = dep_on.rbegin(); i != dep_on.rend(); ++i ) - { - if( emitted_here.find(*i) != emitted_here.end() ) - { - // a repeat. Must emit. - emitted.insert(*i); - link_line.push_back( *i ); - } - else - { - // Emit only if no-one else has - if( emitted.find(*i) == emitted.end() ) - { - // emit dependencies - this->EmitForVS6( *i, dep_map, emitted, visited, link_line ); - // emit self - emitted.insert(*i); - emitted_here.insert(*i); - link_line.push_back( *i ); - } - } - } - } - } -} - -//---------------------------------------------------------------------------- -void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf, - const LibraryID& lib, - DependencyMap& dep_map) -{ - // If the library is already in the dependency map, then it has - // already been fully processed. - if( dep_map.find(lib) != dep_map.end() ) - { - return; - } - - const char* deps = mf.GetDefinition( lib.first+"_LIB_DEPENDS" ); - if( deps && strcmp(deps,"") != 0 ) - { - // Make sure this library is in the map, even if it has an empty - // set of dependencies. This distinguishes the case of explicitly - // no dependencies with that of unspecified dependencies. - dep_map[lib]; - - // Parse the dependency information, which is a set of - // type, library pairs separated by ";". There is always a trailing ";". - cmTargetLinkLibraryType llt = GENERAL_LibraryType; - std::string depline = deps; - std::string::size_type start = 0; - std::string::size_type end; - end = depline.find( ";", start ); - while( end != std::string::npos ) - { - std::string l = depline.substr( start, end-start ); - if(!l.empty()) - { - if (l == "debug") - { - llt = DEBUG_LibraryType; - } - else if (l == "optimized") - { - llt = OPTIMIZED_LibraryType; - } - else if (l == "general") - { - llt = GENERAL_LibraryType; - } - else - { - LibraryID lib2(l,llt); - this->InsertDependencyForVS6( dep_map, lib, lib2); - this->GatherDependenciesForVS6( mf, lib2, dep_map); - llt = GENERAL_LibraryType; - } - } - start = end+1; // skip the ; - end = depline.find( ";", start ); - } - // cannot depend on itself - this->DeleteDependencyForVS6( dep_map, lib, lib); - } -} -#endif - //---------------------------------------------------------------------------- static bool whiteListedInterfaceProperty(const std::string& prop) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 97b0871..4e97c2c 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -245,13 +245,6 @@ public: cmStringRange GetLinkImplementationEntries() const; cmBacktraceRange GetLinkImplementationBacktraces() const; -#if defined(_WIN32) && !defined(__CYGWIN__) - const LinkLibraryVectorType &GetLinkLibrariesForVS6() const { - return this->LinkLibrariesForVS6;} - - void AnalyzeLibDependenciesForVS6( const cmMakefile& mf ); -#endif - struct StrictTargetComparison { bool operator()(cmTarget const* t1, cmTarget const* t2) const; }; @@ -259,57 +252,6 @@ public: private: bool HandleLocationPropertyPolicy(cmMakefile* context) const; -#if defined(_WIN32) && !defined(__CYGWIN__) - /** - * A list of direct dependencies. Use in conjunction with DependencyMap. - */ - typedef std::vector< LibraryID > DependencyList; - - /** - * This map holds the dependency graph. map[x] returns a set of - * direct dependencies of x. Note that the direct depenencies are - * ordered. This is necessary to handle direct dependencies that - * themselves have no dependency information. - */ - typedef std::map< LibraryID, DependencyList > DependencyMap; - - /** - * Inserts \a dep at the end of the dependency list of \a lib. - */ - void InsertDependencyForVS6( DependencyMap& depMap, - const LibraryID& lib, - const LibraryID& dep); - - /* - * Deletes \a dep from the dependency list of \a lib. - */ - void DeleteDependencyForVS6( DependencyMap& depMap, - const LibraryID& lib, - const LibraryID& dep); - - /** - * Emits the library \a lib and all its dependencies into link_line. - * \a emitted keeps track of the libraries that have been emitted to - * avoid duplicates--it is more efficient than searching - * link_line. \a visited is used detect cycles. Note that \a - * link_line is in reverse order, in that the dependencies of a - * library are listed before the library itself. - */ - void EmitForVS6( const LibraryID lib, - const DependencyMap& dep_map, - std::set<LibraryID>& emitted, - std::set<LibraryID>& visited, - DependencyList& link_line); - - /** - * Finds the dependencies for \a lib and inserts them into \a - * dep_map. - */ - void GatherDependenciesForVS6( const cmMakefile& mf, - const LibraryID& lib, - DependencyMap& dep_map); -#endif - const char* GetSuffixVariableInternal(bool implib) const; const char* GetPrefixVariableInternal(bool implib) const; @@ -338,9 +280,6 @@ private: std::vector<std::pair<TLLSignature, cmListFileContext> > TLLCommands; LinkLibraryVectorType PrevLinkedLibraries; LinkLibraryVectorType OriginalLinkLibraries; -#if defined(_WIN32) && !defined(__CYGWIN__) - LinkLibraryVectorType LinkLibrariesForVS6; -#endif cmMakefile* Makefile; cmTargetInternalPointer Internal; cmState::TargetType TargetTypeValue; @@ -351,9 +290,6 @@ private: bool IsImportedTarget; bool ImportedGloballyVisible; bool BuildInterfaceIncludesAppended; -#if defined(_WIN32) && !defined(__CYGWIN__) - bool LinkLibrariesForVS6Analyzed; -#endif std::string ProcessSourceItemCMP0049(const std::string& s); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 8f6b952..c197dae 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -51,7 +51,6 @@ // include the generator #if defined(_WIN32) && !defined(__CYGWIN__) # if !defined(CMAKE_BOOT_MINGW) -# include "cmGlobalVisualStudio6Generator.h" # include "cmGlobalVisualStudio7Generator.h" # include "cmGlobalVisualStudio71Generator.h" # include "cmGlobalVisualStudio8Generator.h" @@ -1429,7 +1428,6 @@ int cmake::ActualConfigure() const char* GeneratorName; }; VSRegistryEntryName version[] = { - {"6.0", "Visual Studio 6"}, {"7.0", "Visual Studio 7"}, {"7.1", "Visual Studio 7 .NET 2003"}, {"8.0", "Visual Studio 8 2005"}, @@ -1839,8 +1837,6 @@ void cmake::AddDefaultGenerators() this->Generators.push_back( cmGlobalVisualStudio7Generator::NewFactory()); this->Generators.push_back( - cmGlobalVisualStudio6Generator::NewFactory()); - this->Generators.push_back( cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back( cmGlobalNMakeMakefileGenerator::NewFactory()); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index c60b962..600cc1a 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -461,13 +461,6 @@ static int do_build(int ac, char const* const* av) return 1; } - // Hack for vs6 that passes ".\Debug" as "$(IntDir)" value: - // - if (cmSystemTools::StringStartsWith(config.c_str(), ".\\")) - { - config = config.substr(2); - } - cmake cm; return cm.Build(dir, target, config, nativeOptions, clean); #endif diff --git a/Templates/CMakeVisualStudio6Configurations.cmake b/Templates/CMakeVisualStudio6Configurations.cmake deleted file mode 100644 index 6355969..0000000 --- a/Templates/CMakeVisualStudio6Configurations.cmake +++ /dev/null @@ -1,3 +0,0 @@ -# When the dll templates are changed, this list should be -# updated with the list of possible configurations. -set(CMAKE_CONFIGURATION_TYPES Debug Release MinSizeRel RelWithDebInfo) diff --git a/Templates/DLLFooter.dsptemplate b/Templates/DLLFooter.dsptemplate deleted file mode 100644 index 0d0682a..0000000 --- a/Templates/DLLFooter.dsptemplate +++ /dev/null @@ -1,4 +0,0 @@ -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/Templates/DLLHeader.dsptemplate b/Templates/DLLHeader.dsptemplate deleted file mode 100644 index d9bccaf..0000000 --- a/Templates/DLLHeader.dsptemplate +++ /dev/null @@ -1,192 +0,0 @@ -# Microsoft Developer Studio Project File - Name="OUTPUT_LIBNAME" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=OUTPUT_LIBNAME - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# ITK DSP Header file
-# This file is read by the build system of itk, and is used as the top part of
-# a microsoft project dsp header file
-# IF this is in a dsp file, then it is not the header, but has
-# already been used, so do not edit here...
-
-# variables to REPLACE
-#
-# BUILD_INCLUDES == include path
-# EXTRA_DEFINES == compiler defines
-# OUTPUT_DIRECTORY == override in output directory
-# OUTPUT_LIBNAME == name of output library
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
-# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
-# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELEASE
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELEASE
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /machine:I386 /out:"OUTPUT_DIRECTORY_RELEASE/OUTPUT_NAME_RELEASE" TARGET_IMPLIB_FLAG_RELEASE
-CM_MULTILINE_OPTIONS_RELEASE
-
-CMAKE_CUSTOM_RULE_CODE_RELEASE
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
-# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
-# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_DEBUG
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_DEBUG
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /debug /machine:I386 /out:"OUTPUT_DIRECTORY_DEBUG/OUTPUT_NAME_DEBUG" /pdbtype:sept TARGET_IMPLIB_FLAG_DEBUG
-CM_MULTILINE_OPTIONS_DEBUG
-
-CMAKE_CUSTOM_RULE_CODE_DEBUG
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "MinSizeRel"
-# PROP BASE Intermediate_Dir "MinSizeRel"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
-# PROP Intermediate_Dir "MinSizeRel"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c OUTPUT_LIBNAME_EXPORTS
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
-# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /machine:I386 /out:"OUTPUT_DIRECTORY_MINSIZEREL/OUTPUT_NAME_MINSIZEREL" TARGET_IMPLIB_FLAG_MINSIZEREL
-CM_MULTILINE_OPTIONS_MINSIZEREL
-
-CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "RelWithDebInfo"
-# PROP BASE Intermediate_Dir "RelWithDebInfo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
-# PROP Intermediate_Dir "RelWithDebInfo"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
-# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
-# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /debug /machine:I386 /pdbtype:sept /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO/OUTPUT_NAME_RELWITHDEBINFO" TARGET_IMPLIB_FLAG_RELWITHDEBINFO
-CM_MULTILINE_OPTIONS_RELWITHDEBINFO
-
-CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
-
-!ENDIF
-
-# Begin Target
-
-# Name "OUTPUT_LIBNAME - Win32 Release"
-# Name "OUTPUT_LIBNAME - Win32 Debug"
-# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/EXEFooter.dsptemplate b/Templates/EXEFooter.dsptemplate deleted file mode 100644 index 0d0682a..0000000 --- a/Templates/EXEFooter.dsptemplate +++ /dev/null @@ -1,4 +0,0 @@ -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/Templates/EXEHeader.dsptemplate b/Templates/EXEHeader.dsptemplate deleted file mode 100644 index 3a6d2fe..0000000 --- a/Templates/EXEHeader.dsptemplate +++ /dev/null @@ -1,183 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pcbuilder" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# CM DSP Header file
-# This file is read by the build system of cm, and is used as the top part of
-# a microsoft project dsp header file
-# IF this is in a dsp file, then it is not the header, but has
-# already been used, so do not edit here...
-
-# variables to REPLACE
-#
-# BUILD_INCLUDES == include path
-# OUTPUT_DIRECTORY == override in output directory
-# EXTRA_DEFINES == compiler defines
-# OUTPUT_LIBNAME == name of output library
-# CM_LIBRARIES == libraries linked in
-# TARGTYPE "Win32 (x86) Application" 0x0103
-
-CFG=OUTPUT_LIBNAME - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Application")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Application")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELEASE
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELEASE
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELEASE\OUTPUT_NAME_RELEASE" TARGET_IMPLIB_FLAG_RELEASE
-CM_MULTILINE_OPTIONS_RELEASE
-
-CMAKE_CUSTOM_RULE_CODE_RELEASE
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_DEBUG
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_DEBUG
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_DEBUG\OUTPUT_NAME_DEBUG" TARGET_IMPLIB_FLAG_DEBUG
-CM_MULTILINE_OPTIONS_DEBUG
-
-CMAKE_CUSTOM_RULE_CODE_DEBUG
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "MinSizeRel"
-# PROP BASE Intermediate_Dir "MinSizeRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
-# PROP Intermediate_Dir "MinSizeRel"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# ADD CPP /nologo /D "WIN32" BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /FD /c
-# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_MINSIZEREL\OUTPUT_NAME_MINSIZEREL" TARGET_IMPLIB_FLAG_MINSIZEREL
-CM_MULTILINE_OPTIONS_MINSIZEREL
-
-CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "RelWithDebInfo"
-# PROP BASE Intermediate_Dir "RelWithDebInfo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
-# PROP Intermediate_Dir "RelWithDebInfo"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO\OUTPUT_NAME_RELWITHDEBINFO" TARGET_IMPLIB_FLAG_RELWITHDEBINFO
-CM_MULTILINE_OPTIONS_RELWITHDEBINFO
-
-CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
-
-!ENDIF
-
-# Begin Target
-
-# Name "OUTPUT_LIBNAME - Win32 Release"
-# Name "OUTPUT_LIBNAME - Win32 Debug"
-# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/EXEWinHeader.dsptemplate b/Templates/EXEWinHeader.dsptemplate deleted file mode 100644 index 350e3ea..0000000 --- a/Templates/EXEWinHeader.dsptemplate +++ /dev/null @@ -1,187 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pcbuilder" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# CM DSP Header file
-# This file is read by the build system of cm, and is used as the top part of
-# a microsoft project dsp header file
-# IF this is in a dsp file, then it is not the header, but has
-# already been used, so do not edit here...
-
-# variables to REPLACE
-#
-# BUILD_INCLUDES == include path
-# OUTPUT_DIRECTORY == override in output directory
-# EXTRA_DEFINES == compiler defines
-# OUTPUT_LIBNAME == name of output library
-# CM_LIBRARIES == libraries linked in
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=OUTPUT_LIBNAME - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Application")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Application")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELEASE
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELEASE
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:windows /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELEASE\OUTPUT_NAME_RELEASE" TARGET_IMPLIB_FLAG_RELEASE
-CM_MULTILINE_OPTIONS_RELEASE
-
-CMAKE_CUSTOM_RULE_CODE_RELEASE
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /GZ /c
-# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_DEBUG
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_DEBUG
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_DEBUG\OUTPUT_NAME_DEBUG" TARGET_IMPLIB_FLAG_DEBUG
-CM_MULTILINE_OPTIONS_DEBUG
-
-CMAKE_CUSTOM_RULE_CODE_DEBUG
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "MinSizeRel"
-# PROP BASE Intermediate_Dir "MinSizeRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
-# PROP Intermediate_Dir "MinSizeRel"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /pdbtype:sept /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:windows /machine:I386 /pdbtype:sept /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_MINSIZEREL\OUTPUT_NAME_MINSIZEREL" TARGET_IMPLIB_FLAG_MINSIZEREL
-CM_MULTILINE_OPTIONS_MINSIZEREL
-
-CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "RelWithDebInfo"
-# PROP BASE Intermediate_Dir "RelWithDebInfo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
-# PROP Intermediate_Dir "RelWithDebInfo"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /IGNORE:4089
-# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
-# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO\OUTPUT_NAME_RELWITHDEBINFO" TARGET_IMPLIB_FLAG_RELWITHDEBINFO
-CM_MULTILINE_OPTIONS_RELWITHDEBINFO
-
-CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
-
-!ENDIF
-
-# Begin Target
-
-# Name "OUTPUT_LIBNAME - Win32 Release"
-# Name "OUTPUT_LIBNAME - Win32 Debug"
-# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/UtilityFooter.dsptemplate b/Templates/UtilityFooter.dsptemplate deleted file mode 100644 index 941fb44..0000000 --- a/Templates/UtilityFooter.dsptemplate +++ /dev/null @@ -1,2 +0,0 @@ -# End Target
-# End Project
diff --git a/Templates/UtilityHeader.dsptemplate b/Templates/UtilityHeader.dsptemplate deleted file mode 100644 index 509f597..0000000 --- a/Templates/UtilityHeader.dsptemplate +++ /dev/null @@ -1,95 +0,0 @@ -# Microsoft Developer Studio Project File - Name="OUTPUT_LIBNAME" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Generic Project" 0x010a
-
-CFG=OUTPUT_LIBNAME - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Generic Project")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Generic Project")
-!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Generic Project")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Generic Project")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-MTL=midl.exe
-
-!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-
-CMAKE_CUSTOM_RULE_CODE_RELEASE
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-
-CMAKE_CUSTOM_RULE_CODE_DEBUG
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "MinSizeRel"
-# PROP BASE Intermediate_Dir "MinSizeRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Intermediate_Dir "MinSizeRel"
-# PROP Target_Dir ""
-
-CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "RelWithDebInfo"
-# PROP BASE Intermediate_Dir "RelWithDebInfo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Intermediate_Dir "RelWithDebInfo"
-# PROP Target_Dir ""
-
-CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
-
-!ENDIF
-
-# Begin Target
-
-# Name "OUTPUT_LIBNAME - Win32 Release"
-# Name "OUTPUT_LIBNAME - Win32 Debug"
-# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/staticLibFooter.dsptemplate b/Templates/staticLibFooter.dsptemplate deleted file mode 100644 index 0d0682a..0000000 --- a/Templates/staticLibFooter.dsptemplate +++ /dev/null @@ -1,4 +0,0 @@ -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/Templates/staticLibHeader.dsptemplate b/Templates/staticLibHeader.dsptemplate deleted file mode 100644 index a8892e1..0000000 --- a/Templates/staticLibHeader.dsptemplate +++ /dev/null @@ -1,173 +0,0 @@ -# Microsoft Developer Studio Project File - Name="OUTPUT_LIBNAME" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# CMAKE DSP Header file
-# This file is read by the CMAKE, and is used as the top part of
-# a microsoft project dsp header file
-# IF this is in a dsp file, then it is not the header, but has
-# already been used, so do not edit in that case.
-
-# variables to REPLACE
-#
-# BUILD_INCLUDES == include path
-# EXTRA_DEFINES == compiler defines
-# OUTPUT_DIRECTORY == override in output directory
-# OUTPUT_LIBNAME == name of output library
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=OUTPUT_LIBNAME - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Static Library")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Static Library")
-!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Static Library")
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
-# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
-# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELEASE
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELEASE
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_RELEASE/OUTPUT_NAME_RELEASE" CM_STATIC_LIB_ARGS_RELEASE
-
-CMAKE_CUSTOM_RULE_CODE_RELEASE
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /c
-# ADD CPP /nologo /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c
-# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_DEBUG
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_DEBUG
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_DEBUG/OUTPUT_NAME_DEBUG" CM_STATIC_LIB_ARGS_DEBUG
-
-CMAKE_CUSTOM_RULE_CODE_DEBUG
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "MinSizeRel"
-# PROP BASE Intermediate_Dir "MinSizeRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
-# PROP Intermediate_Dir "MinSizeRel"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
-# ADD CPP /nologo /D "NDEBUG" /D "_ATL_DLL" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
-# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_MINSIZEREL/OUTPUT_NAME_MINSIZEREL" CM_STATIC_LIB_ARGS_MINSIZEREL
-
-CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
-
-!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
-
-# PROP BASE Use_MFC CMAKE_MFC_FLAG
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "RelWithDebInfo"
-# PROP BASE Intermediate_Dir "RelWithDebInfo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC CMAKE_MFC_FLAG
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
-# PROP Intermediate_Dir "RelWithDebInfo"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
-# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
-# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES
-# ADD CPP CMAKE_CXX_FLAGS
-# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
-# ADD RSC COMPILE_DEFINITIONS
-# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO/OUTPUT_NAME_RELWITHDEBINFO" CM_STATIC_LIB_ARGS_RELWITHDEBINFO
-
-CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
-
-!ENDIF
-
-# Begin Target
-
-# Name "OUTPUT_LIBNAME - Win32 Release"
-# Name "OUTPUT_LIBNAME - Win32 Debug"
-# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
-# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
-
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 36987de..9b48b14 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -42,7 +42,7 @@ list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}") list(APPEND _cmake_options "-DCMAKE_FORCE_DEPFILES=1") -if(NOT CMAKE_GENERATOR MATCHES "Visual Studio ([^6789]|[6789][0-9])") +if(NOT CMAKE_GENERATOR MATCHES "Visual Studio ([^789]|[789][0-9])") set(TEST_MULTI3 1) list(APPEND _cmake_options "-DTEST_MULTI3=1") endif() @@ -304,9 +304,6 @@ message("Run result: ${runResult} Output: \"${out}\"") if("${out}" STREQUAL "HEADER_STRING: ninja changed ") message("Worked!") -elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 6") - # Tolerate failure because VS 6 does not seem to recompile ninjadep.cpp - # when the "dir/header.h" it includes changes. else() message(SEND_ERROR "Project did not rebuild properly. Output[${out}]\n" " expected [HEADER_STRING: ninja changed]") diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c7d2138..8646c09 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -624,8 +624,8 @@ if(BUILD_TESTING) endif() # test for correct sub-project generation - # not implemented in VS 6, VS 7.0, Xcode, or Ninja - if(NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]$|Xcode|Ninja") + # not implemented in VS 7.0, Xcode, or Ninja + if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 7$|Xcode|Ninja") # run cmake and configure all of SubProject # but only build the independent executable car add_test(SubProject ${CMAKE_CTEST_COMMAND} @@ -1873,7 +1873,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() if(MSVC AND NOT MSVC_VERSION LESS 1310 - AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]( |$)" + AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7( |$)" AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio [89]( |$)" OR CMAKE_SIZEOF_VOID_P EQUAL 4) ) @@ -1885,7 +1885,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ADD_TEST_MACRO(SBCS SBCS) endif() - if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio [6789]( |$)" + if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio [789]( |$)" AND NOT CMAKE_GENERATOR_TOOLSET) ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) endif() @@ -1914,7 +1914,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CMake_TEST_DEVENV) # The test (and tested property) works with .sln files, so it's skipped when: - # * Using VS6, which doesn't use .sln files # * cmake --build is set up to use MSBuild, since the MSBuild invocation does not use the .sln file set(_last_test "") foreach(config ${CMAKE_CONFIGURATION_TYPES}) diff --git a/Tests/CompileDefinitions/CMakeLists.txt b/Tests/CompileDefinitions/CMakeLists.txt index 13d1b01..1d8afbf 100644 --- a/Tests/CompileDefinitions/CMakeLists.txt +++ b/Tests/CompileDefinitions/CMakeLists.txt @@ -1,11 +1,6 @@ cmake_minimum_required(VERSION 2.8) project(CompileDefinitions) -if ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 6") - add_definitions(-DNO_SPACES_IN_DEFINE_VALUES) - set(NO_SPACES_IN_DEFINE_VALUES 1) -endif() - # Use compile flags to tell executables which config is built # without depending on the compile definitions functionality. foreach(c DEBUG RELEASE RELWITHDEBINFO MINSIZEREL) diff --git a/Tests/CustomCommand/wrapper.cxx b/Tests/CustomCommand/wrapper.cxx index 93cb079..97912de 100644 --- a/Tests/CustomCommand/wrapper.cxx +++ b/Tests/CustomCommand/wrapper.cxx @@ -16,18 +16,12 @@ int main(int argc, char *argv[]) fprintf(fp,"int wrapped_help() { return 5; }\n"); fclose(fp); #ifdef CMAKE_INTDIR - /* The VS6 IDE passes a leading ".\\" in its variable expansion. */ -# if defined(_MSC_VER) && _MSC_VER == 1200 -# define CFG_DIR ".\\" CMAKE_INTDIR -# else -# define CFG_DIR CMAKE_INTDIR -# endif const char* cfg = (argc >= 4)? argv[3] : ""; - if(strcmp(cfg, CFG_DIR) != 0) + if(strcmp(cfg, CMAKE_INTDIR) != 0) { fprintf(stderr, "Did not receive expected configuration argument:\n" - " expected [" CFG_DIR "]\n" + " expected [" CMAKE_INTDIR "]\n" " received [%s]\n", cfg); return 1; } diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index c2ecb0b..f504c7b 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -79,12 +79,6 @@ set_property(TARGET testLib7 PROPERTY OUTPUT_NAME_DEBUG testLib7D-$<CONFIG>) set_property(TARGET testLib7 PROPERTY OUTPUT_NAME_RELEASE testLib7R-$<CONFIG>) set_property(TARGET testLib7 PROPERTY OUTPUT_NAME testLib7-$<CONFIG>) -# Work-around: Visual Studio 6 does not support per-target object files. -set(VS6) -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") - set(VS6 1) -endif() - # Test using the target_link_libraries command to set the # LINK_INTERFACE_LIBRARIES* properties. We construct two libraries # providing the same two symbols. In each library one of the symbols @@ -93,8 +87,8 @@ endif() # configuration in which it is built. If the proper library is not # used via the link interface the import test will fail to link. add_library(testLib4lib STATIC testLib4lib.c) -add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg${VS6}.c) -add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt${VS6}.c) +add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg.c) +add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt.c) set_property(TARGET testLib4libdbg PROPERTY COMPILE_DEFINITIONS LIB_DBG) set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT) target_link_libraries(testLib4 diff --git a/Tests/ExportImport/Export/testLib4libdbg1.c b/Tests/ExportImport/Export/testLib4libdbg1.c deleted file mode 100644 index cc56cf9..0000000 --- a/Tests/ExportImport/Export/testLib4libdbg1.c +++ /dev/null @@ -1 +0,0 @@ -#include "testLib4libdbg.c" diff --git a/Tests/ExportImport/Export/testLib4libopt1.c b/Tests/ExportImport/Export/testLib4libopt1.c deleted file mode 100644 index d9b5587..0000000 --- a/Tests/ExportImport/Export/testLib4libopt1.c +++ /dev/null @@ -1 +0,0 @@ -#include "testLib4libopt.c" diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt index e1a67db..17f1630 100644 --- a/Tests/ExternalProjectLocal/CMakeLists.txt +++ b/Tests/ExternalProjectLocal/CMakeLists.txt @@ -23,18 +23,6 @@ set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test) if(NOT DEFINED can_build_tutorial_step5) set(can_build_tutorial_step5 1) - # Tutorial Step5 cannot build correctly using Visual Studio 6 - # on Windows 98 if the path of its build tree exceeds 72 - # characters in length... So don't attempt to build it - # in a long path on Win98: - # - if(CMAKE_SYSTEM STREQUAL "Windows-4.10") - string(LENGTH "${binary_base}/TutorialStep5-Local" n) - if(n GREATER 72) - set(can_build_tutorial_step5 0) - endif() - endif() - # The ExternalProject builds of Tutorial Step5 cannot be built # correctly 2nd and later times in an in-source build... # (because the CMakeCache.txt from the real in-source build of diff --git a/Tests/ExternalProjectSubdir/CMakeLists.txt b/Tests/ExternalProjectSubdir/CMakeLists.txt index e65087a..3a67ea0 100644 --- a/Tests/ExternalProjectSubdir/CMakeLists.txt +++ b/Tests/ExternalProjectSubdir/CMakeLists.txt @@ -3,11 +3,8 @@ project(ExternalProjectSubdir NONE) include(ExternalProject) # Remove the custom target output to be sure it runs in an -# incremental test. Skip this on VS 6 because it sometimes -# re-runs CMake after the custom command runs. -if(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 6") - file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/PreSubdir1.txt) -endif() +# incremental test. +file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/PreSubdir1.txt) add_custom_target(PreSubdir1 COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/PreSubdir1.txt diff --git a/Tests/ObjectLibrary/A/CMakeLists.txt b/Tests/ObjectLibrary/A/CMakeLists.txt index c24c5ed..188fd64 100644 --- a/Tests/ObjectLibrary/A/CMakeLists.txt +++ b/Tests/ObjectLibrary/A/CMakeLists.txt @@ -12,11 +12,8 @@ add_custom_command( ) # Remove the custom command output to be sure it runs in an -# incremental test. Skip this on VS 6 because it sometimes -# re-runs CMake after the custom command runs. -if(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 6") - file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/a.cmake) -endif() +# incremental test. +file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/a.cmake) add_custom_command( OUTPUT a.cmake COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/a.cmake diff --git a/Tests/ObjectLibrary/B/CMakeLists.txt b/Tests/ObjectLibrary/B/CMakeLists.txt index 2158084..ecace4f 100644 --- a/Tests/ObjectLibrary/B/CMakeLists.txt +++ b/Tests/ObjectLibrary/B/CMakeLists.txt @@ -1,8 +1,4 @@ project(ObjectLibraryB C) -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") - # VS 6 generator does not use per-target object locations. - set(vs6 _vs6) -endif() # Add -fPIC so objects can be used in shared libraries. set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -11,7 +7,7 @@ add_library(B OBJECT b1.c b2.c) target_include_directories(B PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_definitions(B PUBLIC B_DEF) -add_library(Bexport OBJECT b1${vs6}.c b2${vs6}.c) +add_library(Bexport OBJECT b1.c b2.c) set_property(TARGET Bexport PROPERTY COMPILE_DEFINITIONS Bexport) target_include_directories(Bexport PRIVATE $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>) target_compile_definitions(Bexport PRIVATE $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>) diff --git a/Tests/ObjectLibrary/B/b1_vs6.c b/Tests/ObjectLibrary/B/b1_vs6.c deleted file mode 100644 index b606e10..0000000 --- a/Tests/ObjectLibrary/B/b1_vs6.c +++ /dev/null @@ -1 +0,0 @@ -#include "b1.c" diff --git a/Tests/ObjectLibrary/B/b2_vs6.c b/Tests/ObjectLibrary/B/b2_vs6.c deleted file mode 100644 index d96a43e..0000000 --- a/Tests/ObjectLibrary/B/b2_vs6.c +++ /dev/null @@ -1 +0,0 @@ -#include "b2.c" diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt index e9f553e..e3476df 100644 --- a/Tests/ObjectLibrary/CMakeLists.txt +++ b/Tests/ObjectLibrary/CMakeLists.txt @@ -16,8 +16,8 @@ add_custom_command(TARGET UseCshared POST_BUILD COMMAND ${CMAKE_COMMAND} -P ${CM add_executable(UseCinternal main.c c.c $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:B>) -if("${CMAKE_GENERATOR}" MATCHES "^Visual Studio (6|7|7 .NET 2003)$") - # VS 6 and 7 generators do not add objects as sources so we need a +if("${CMAKE_GENERATOR}" MATCHES "^Visual Studio (7|7 .NET 2003)$") + # VS 7 generators do not add objects as sources so we need a # dummy object to convince the IDE to build the targets below. set(dummy dummy.obj) # In MinGW: gcc -c dummy.c -o dummy.obj elseif("${CMAKE_GENERATOR}" MATCHES "Xcode") diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt index 180f9fe..100d064 100644 --- a/Tests/PDBDirectoryAndName/CMakeLists.txt +++ b/Tests/PDBDirectoryAndName/CMakeLists.txt @@ -65,11 +65,6 @@ target_link_libraries(myexe2 mylibA mylibD) #----------------------------------------------------------------------------- # Check that PDB files actually appear where expected. -# The PDB_NAME and PDB_OUTPUT_DIRECTORY options do not work in VS 6. -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") - return() -endif() - set(pdbs "") foreach(t ${my_targets}) get_property(pdb_name TARGET ${t} PROPERTY PDB_NAME) diff --git a/Tests/PrecompiledHeader/CMakeLists.txt b/Tests/PrecompiledHeader/CMakeLists.txt index 98bdd88..a804538 100644 --- a/Tests/PrecompiledHeader/CMakeLists.txt +++ b/Tests/PrecompiledHeader/CMakeLists.txt @@ -17,14 +17,8 @@ else() file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/PCH) endif() -# The VS6 IDE does not support renaming .pch files with /Fp. -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") - set(PCH_USE_INCLUDE_DIR 1) - set(PCH_FILE) -else() - set(PCH_USE_INCLUDE_DIR 0) - set(PCH_FILE "\"/Fp${PCH_DIR}/foo_precompiled.pch\"") -endif() +set(PCH_USE_INCLUDE_DIR 0) +set(PCH_FILE "\"/Fp${PCH_DIR}/foo_precompiled.pch\"") # Choose between an explicit include path and using /I during # precompilation. The /I form is used to test that the PCH is diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt index 15e2aca..b930f56 100644 --- a/Tests/Preprocess/CMakeLists.txt +++ b/Tests/Preprocess/CMakeLists.txt @@ -10,9 +10,6 @@ project(Preprocess) if("${CMAKE_GENERATOR}" MATCHES "Xcode") set(PP_XCODE 1) endif() -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") - set(PP_VS6 1) -endif() if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles") set(PP_UMAKE 1) endif() @@ -60,20 +57,15 @@ if(NOT BORLAND AND NOT PP_VS70) set(SEMICOLON "\;") endif() -if(NOT PP_VS6) - # VS 6 IDE: spaces and '"', '$', or ';' - # The project parser cannot handle spaces if there are quotes. - # Since we test passing in a quoted string, we cannot have spaces. - set(STRING_EXTRA "${STRING_EXTRA} ") +set(STRING_EXTRA "${STRING_EXTRA} ") - if(NOT PP_BORLAND AND NOT PP_WATCOM) - # Borland, WMake: multiple spaces - # The make tool seems to remove extra whitespace from inside - # quoted strings when passing to the compiler. It does not have - # trouble passing to other tools, and the compiler may be directly - # invoked from the command line. - set(STRING_EXTRA "${STRING_EXTRA} ") - endif() +if(NOT PP_BORLAND AND NOT PP_WATCOM) + # Borland, WMake: multiple spaces + # The make tool seems to remove extra whitespace from inside + # quoted strings when passing to the compiler. It does not have + # trouble passing to other tools, and the compiler may be directly + # invoked from the command line. + set(STRING_EXTRA "${STRING_EXTRA} ") endif() if(NOT PP_VS) @@ -201,14 +193,10 @@ endif() set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DPREPROCESS_DEBUG") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DPREPROCESS_DEBUG") -# Inform the test if it built from Xcode or VS6 IDE. +# Inform the test if it built from Xcode. if(PP_XCODE) set(PREPROCESS_XCODE 1) endif() -if(PP_VS6) - set(PREPROCESS_VS6 1) - set(VS6 _vs6) -endif() # Test old-style definitions. add_definitions(-DOLD_DEF -DOLD_EXPR=2) @@ -220,7 +208,7 @@ if(NOT "${OLD_DEFS}" STREQUAL "${OLD_DEFS_EXPECTED}") message(SEND_ERROR "add_definitions not converted to directory property!") endif() -add_executable(Preprocess preprocess.c preprocess${VS6}.cxx) +add_executable(Preprocess preprocess.c preprocess.cxx) set(FILE_PATH "${Preprocess_SOURCE_DIR}/file_def.h") set(TARGET_PATH "${Preprocess_SOURCE_DIR}/target_def.h") @@ -236,17 +224,14 @@ foreach(c "" "_DEBUG" "_RELEASE") PROPERTY COMPILE_DEFINITIONS${c} "TARGET_DEF${c}" ) set_property( - SOURCE preprocess.c preprocess${VS6}.cxx + SOURCE preprocess.c preprocess.cxx PROPERTY COMPILE_DEFINITIONS${c} "FILE_DEF${c}" ) endforeach() # Add definitions with values. -if(NOT PREPROCESS_VS6) - # The path might have spaces, which VS6 does not support. - set(DEF_TARGET_PATH "TARGET_PATH=\"${TARGET_PATH}\"") - set(DEF_FILE_PATH "FILE_PATH=\"${FILE_PATH}\"") -endif() +set(DEF_TARGET_PATH "TARGET_PATH=\"${TARGET_PATH}\"") +set(DEF_FILE_PATH "FILE_PATH=\"${FILE_PATH}\"") set_property( TARGET Preprocess APPEND PROPERTY COMPILE_DEFINITIONS @@ -255,7 +240,7 @@ set_property( ${DEF_TARGET_PATH} ) set_property( - SOURCE preprocess.c preprocess${VS6}.cxx + SOURCE preprocess.c preprocess.cxx APPEND PROPERTY COMPILE_DEFINITIONS "FILE_STRING=\"${STRING_VALUE}${SEMICOLON}\"" "FILE_EXPR=${EXPR}" diff --git a/Tests/Preprocess/preprocess.h.in b/Tests/Preprocess/preprocess.h.in index 3e1c7a0..e058a58 100644 --- a/Tests/Preprocess/preprocess.h.in +++ b/Tests/Preprocess/preprocess.h.in @@ -2,12 +2,6 @@ #define STRING_VALUE "@STRING_VALUE@" #define EXPR @EXPR@ #cmakedefine PREPROCESS_XCODE -#cmakedefine PREPROCESS_VS6 - -#ifdef PREPROCESS_VS6 -# define FILE_PATH "@FILE_PATH@" -# define TARGET_PATH "@TARGET_PATH@" -#endif /* Declarations and macros shared by all sources. */ #define TO_STRING(x) TO_STRING0(x) diff --git a/Tests/Preprocess/preprocess_vs6.cxx b/Tests/Preprocess/preprocess_vs6.cxx deleted file mode 100644 index 9df89f6..0000000 --- a/Tests/Preprocess/preprocess_vs6.cxx +++ /dev/null @@ -1,3 +0,0 @@ -// The VS6 IDE does not support object name configuration so we need a -// source file with a different name. Include the real source file. -#include "preprocess.cxx" diff --git a/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake b/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake index 3784a6a..f268de7 100644 --- a/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake +++ b/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake @@ -6,8 +6,8 @@ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") # configure the AutoExport test run_cmake(AutoExport) unset(RunCMake_TEST_OPTIONS) -# don't run this test on VS 6 as it is not supported -if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 6|Watcom WMake|Borland Makefiles") +# don't run this test on Watcom or Borland make as it is not supported +if("${RunCMake_GENERATOR}" MATCHES "Watcom WMake|Borland Makefiles") return() endif() # we build debug so the say.exe will be found in Debug/say.exe for diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index 31c72fb..d2924f1 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -30,7 +30,7 @@ function(run_BuildDepends CASE) endfunction() run_BuildDepends(C-Exe) -if(NOT RunCMake_GENERATOR MATCHES "Visual Studio [67]|Xcode") +if(NOT RunCMake_GENERATOR MATCHES "Visual Studio 7|Xcode") if(RunCMake_GENERATOR MATCHES "Visual Studio 10") # VS 10 forgets to re-link when a manifest changes set(run_BuildDepends_skip_step_2 1) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 23b9b42..588f3a1 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -232,12 +232,12 @@ if(PKG_CONFIG_FOUND) add_RunCMake_test(FindPkgConfig) endif() -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio [^6]") +if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") add_RunCMake_test(include_external_msproject) add_RunCMake_test(SolutionGlobalSections) endif() -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([^6789]|[6789][0-9])") +if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([^789]|[789][0-9])") add_RunCMake_test(VS10Project) endif() diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake +++ /dev/null diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt deleted file mode 100644 index 1b6a510..0000000 --- a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Warning: - The "Visual Studio 6" generator is deprecated and will be removed in a - future version of CMake. - - Add CMAKE_WARN_VS6=OFF to the cache to disable this warning.$ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake +++ /dev/null diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index a07bbbe..3b5504e 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -72,12 +72,7 @@ if(RunCMake_GENERATOR STREQUAL "Ninja") unset(RunCMake_TEST_NO_CLEAN) endif() -if(RunCMake_GENERATOR STREQUAL "Visual Studio 6") - set(RunCMake_WARN_VS6 1) - run_cmake(DeprecateVS6-WARN-ON) - unset(RunCMake_WARN_VS6) - run_cmake(DeprecateVS6-WARN-OFF) -elseif(RunCMake_GENERATOR STREQUAL "Visual Studio 7") +if(RunCMake_GENERATOR STREQUAL "Visual Studio 7") set(RunCMake_WARN_VS70 1) run_cmake(DeprecateVS70-WARN-ON) unset(RunCMake_WARN_VS70) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index db9911d..9d44a8a 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -51,9 +51,6 @@ function(run_cmake test) if(APPLE) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW) endif() - if(RunCMake_GENERATOR STREQUAL "Visual Studio 6" AND NOT RunCMake_WARN_VS6) - list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_WARN_VS6=OFF) - endif() if(RunCMake_GENERATOR STREQUAL "Visual Studio 7" AND NOT RunCMake_WARN_VS70) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_WARN_VS70=OFF) endif() diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index e497503..d11cfc5 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -108,9 +108,7 @@ endif() # try to compile a file that should compile set(_c_flags "${CMAKE_C_FLAGS}") -if(CMAKE_GENERATOR STREQUAL "Visual Studio 6") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D \"TESTDEF\"") -elseif(WATCOM) +if(WATCOM) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -dTESTDEF") else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \"-DTESTDEF\"") diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 73ea05a..20301c2 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -1,13 +1,10 @@ cmake_minimum_required (VERSION 2.6) project(VSExternalInclude) -if(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") - set(PROJECT_EXT dsp) -else() - set(PROJECT_EXT vcproj) -endif() if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124]") set(PROJECT_EXT vcxproj) +else() + set(PROJECT_EXT vcproj) endif() # make sure directories exists diff --git a/Tests/VSMidl/src/CMakeLists.txt b/Tests/VSMidl/src/CMakeLists.txt index 86c04ed..e745fdd 100644 --- a/Tests/VSMidl/src/CMakeLists.txt +++ b/Tests/VSMidl/src/CMakeLists.txt @@ -1,12 +1,6 @@ cmake_minimum_required(VERSION 2.8) project(VSMidl) -if(MSVC_VERSION GREATER 1200) - include_directories("${CMAKE_CURRENT_BINARY_DIR}/\$(IntDir)") -else() - # midl generated headers end up directly in CMAKE_CURRENT_BINARY_DIR with - # VS6 builds. - include_directories("${CMAKE_CURRENT_BINARY_DIR}") -endif() +include_directories("${CMAKE_CURRENT_BINARY_DIR}/\$(IntDir)") add_executable(VSMidl main.cpp test.idl) |