From 23d3d38a312ee09a30d28a7ea80c1540397d08bc Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 9 Feb 2014 21:55:17 +0100 Subject: CMakeLists: Generate the cmCommands.cxx file. Define the list of commands in the CMakeLists.txt file. List the sources in the CMakeLib target, but mark them as HEADER_FILE_ONLY. This has the effect that IDEs will show the files, though they will not be built again. Add a cmCommandsForBootstrap.cxx file for bootstrapping purposes. Rename the cmExportLibraryDependencies file to match the common pattern. --- Source/CMakeLists.txt | 46 +++++- Source/cmCommands.cxx | 86 ----------- Source/cmCommands.cxx.in | 19 +++ Source/cmCommandsForBootstrap.cxx | 16 ++ Source/cmExportLibraryDependencies.cxx | 208 -------------------------- Source/cmExportLibraryDependencies.h | 37 ----- Source/cmExportLibraryDependenciesCommand.cxx | 208 ++++++++++++++++++++++++++ Source/cmExportLibraryDependenciesCommand.h | 37 +++++ bootstrap | 2 +- 9 files changed, 326 insertions(+), 333 deletions(-) delete mode 100644 Source/cmCommands.cxx create mode 100644 Source/cmCommands.cxx.in create mode 100644 Source/cmCommandsForBootstrap.cxx delete mode 100644 Source/cmExportLibraryDependencies.cxx delete mode 100644 Source/cmExportLibraryDependencies.h create mode 100644 Source/cmExportLibraryDependenciesCommand.cxx create mode 100644 Source/cmExportLibraryDependenciesCommand.h diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index dbb922d..175a034 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -127,7 +127,7 @@ set(SRCS cmBootstrapCommands2.cxx cmCacheManager.cxx cmCacheManager.h - cmCommands.cxx + "${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx" cmCommands.h cmCommandArgumentLexer.cxx cmCommandArgumentParser.cxx @@ -298,6 +298,50 @@ set(SRCS cm_utf8.c ) +set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n") +list(APPEND SRCS cmTargetPropCommandBase.cxx) +set_property(SOURCE cmTargetPropCommandBase.cxx PROPERTY HEADER_FILE_ONLY ON) +set(NEW_COMMANDS "") +foreach(command_file + cmAddCompileOptionsCommand + cmAuxSourceDirectoryCommand + cmBuildNameCommand + cmCMakeHostSystemInformationCommand + cmElseIfCommand + cmExportCommand + cmExportLibraryDependenciesCommand + cmFLTKWrapUICommand + cmIncludeExternalMSProjectCommand + cmInstallProgramsCommand + cmLinkLibrariesCommand + cmLoadCacheCommand + cmOutputRequiredFilesCommand + cmQTWrapCPPCommand + cmQTWrapUICommand + cmRemoveCommand + cmRemoveDefinitionsCommand + cmSourceGroupCommand + cmSubdirDependsCommand + cmTargetCompileDefinitionsCommand + cmTargetCompileOptionsCommand + cmTargetIncludeDirectoriesCommand + cmUseMangledMesaCommand + cmUtilitySourceCommand + cmVariableRequiresCommand + cmVariableWatchCommand + cmWriteFileCommand + # This one must be last because it includes windows.h and + # windows.h #defines GetCurrentDirectory which is a member + # of cmMakefile + cmLoadCommandCommand + ) + set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.cxx\"\n") + set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n") + list(APPEND SRCS ${command_file}.cxx) + set_property(SOURCE ${command_file}.cxx PROPERTY HEADER_FILE_ONLY ON) +endforeach() +configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY) + # Kdevelop only works on UNIX and not windows if(UNIX) set(SRCS ${SRCS} cmGlobalKdevelopGenerator.cxx) diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx deleted file mode 100644 index 1e2a85c..0000000 --- a/Source/cmCommands.cxx +++ /dev/null @@ -1,86 +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 "cmCommands.h" -#if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cmAddCompileOptionsCommand.cxx" -#include "cmAuxSourceDirectoryCommand.cxx" -#include "cmBuildNameCommand.cxx" -#include "cmCMakeHostSystemInformationCommand.cxx" -#include "cmElseIfCommand.cxx" -#include "cmExportCommand.cxx" -#include "cmExportLibraryDependencies.cxx" -#include "cmFLTKWrapUICommand.cxx" -#include "cmIncludeExternalMSProjectCommand.cxx" -#include "cmInstallProgramsCommand.cxx" -#include "cmLinkLibrariesCommand.cxx" -#include "cmLoadCacheCommand.cxx" -#include "cmOutputRequiredFilesCommand.cxx" -#include "cmQTWrapCPPCommand.cxx" -#include "cmQTWrapUICommand.cxx" -#include "cmRemoveCommand.cxx" -#include "cmRemoveDefinitionsCommand.cxx" -#include "cmSourceGroupCommand.cxx" -#include "cmSubdirDependsCommand.cxx" -#include "cmTargetCompileDefinitionsCommand.cxx" -#include "cmTargetCompileOptionsCommand.cxx" -#include "cmTargetIncludeDirectoriesCommand.cxx" -#include "cmTargetPropCommandBase.cxx" -#include "cmUseMangledMesaCommand.cxx" -#include "cmUtilitySourceCommand.cxx" -#include "cmVariableRequiresCommand.cxx" -#include "cmVariableWatchCommand.cxx" - -#include "cmWriteFileCommand.cxx" - -// This one must be last because it includes windows.h and -// windows.h #defines GetCurrentDirectory which is a member -// of cmMakefile -#include "cmLoadCommandCommand.cxx" -#endif - -void GetPredefinedCommands(std::list& -#if defined(CMAKE_BUILD_WITH_CMAKE) - commands -#endif - ) -{ -#if defined(CMAKE_BUILD_WITH_CMAKE) - commands.push_back(new cmAddCompileOptionsCommand); - commands.push_back(new cmAuxSourceDirectoryCommand); - commands.push_back(new cmBuildNameCommand); - commands.push_back(new cmCMakeHostSystemInformationCommand); - commands.push_back(new cmElseIfCommand); - commands.push_back(new cmExportCommand); - commands.push_back(new cmExportLibraryDependenciesCommand); - commands.push_back(new cmFLTKWrapUICommand); - commands.push_back(new cmIncludeExternalMSProjectCommand); - commands.push_back(new cmInstallProgramsCommand); - commands.push_back(new cmLinkLibrariesCommand); - commands.push_back(new cmLoadCacheCommand); - commands.push_back(new cmLoadCommandCommand); - commands.push_back(new cmOutputRequiredFilesCommand); - commands.push_back(new cmQTWrapCPPCommand); - commands.push_back(new cmQTWrapUICommand); - commands.push_back(new cmRemoveCommand); - commands.push_back(new cmRemoveDefinitionsCommand); - commands.push_back(new cmSourceGroupCommand); - commands.push_back(new cmSubdirDependsCommand); - commands.push_back(new cmTargetIncludeDirectoriesCommand); - commands.push_back(new cmTargetCompileDefinitionsCommand); - commands.push_back(new cmTargetCompileOptionsCommand); - commands.push_back(new cmUseMangledMesaCommand); - commands.push_back(new cmUtilitySourceCommand); - commands.push_back(new cmVariableRequiresCommand); - commands.push_back(new cmVariableWatchCommand); - commands.push_back(new cmWriteFileCommand); -#endif -} diff --git a/Source/cmCommands.cxx.in b/Source/cmCommands.cxx.in new file mode 100644 index 0000000..f0745d7 --- /dev/null +++ b/Source/cmCommands.cxx.in @@ -0,0 +1,19 @@ +/*============================================================================ + 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 "cmCommands.h" + +@COMMAND_INCLUDES@ + +void GetPredefinedCommands(std::list& commands) +{ +@NEW_COMMANDS@ +} diff --git a/Source/cmCommandsForBootstrap.cxx b/Source/cmCommandsForBootstrap.cxx new file mode 100644 index 0000000..15b664e --- /dev/null +++ b/Source/cmCommandsForBootstrap.cxx @@ -0,0 +1,16 @@ +/*============================================================================ + 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 "cmCommands.h" + +void GetPredefinedCommands(std::list&) +{ +} diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx deleted file mode 100644 index 4624e92..0000000 --- a/Source/cmExportLibraryDependencies.cxx +++ /dev/null @@ -1,208 +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 "cmExportLibraryDependencies.h" -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmGeneratedFileStream.h" -#include "cmake.h" -#include "cmVersion.h" - -#include - -bool cmExportLibraryDependenciesCommand -::InitialPass(std::vector const& args, cmExecutionStatus &) -{ - if(this->Disallowed(cmPolicies::CMP0033, - "The export_library_dependencies command should not be called; " - "see CMP0033.")) - { return true; } - if(args.size() < 1 ) - { - this->SetError("called with incorrect number of arguments"); - return false; - } - - // store the arguments for the final pass - this->Filename = args[0]; - this->Append = false; - if(args.size() > 1) - { - if(args[1] == "APPEND") - { - this->Append = true; - } - } - return true; -} - - -void cmExportLibraryDependenciesCommand::FinalPass() -{ - // export_library_dependencies() shouldn't modify anything - // ensure this by calling a const method - this->ConstFinalPass(); -} - -void cmExportLibraryDependenciesCommand::ConstFinalPass() const -{ - // Use copy-if-different if not appending. - cmsys::auto_ptr foutPtr; - if(this->Append) - { - cmsys::auto_ptr ap( - new cmsys::ofstream(this->Filename.c_str(), std::ios::app)); - foutPtr = ap; - } - else - { - cmsys::auto_ptr ap( - new cmGeneratedFileStream(this->Filename.c_str(), true)); - ap->SetCopyIfDifferent(true); - foutPtr = ap; - } - std::ostream& fout = *foutPtr.get(); - - if (!fout) - { - cmSystemTools::Error("Error Writing ", this->Filename.c_str()); - cmSystemTools::ReportLastSystemError(""); - return; - } - - // Collect dependency information about all library targets built in - // the project. - cmake* cm = this->Makefile->GetCMakeInstance(); - cmGlobalGenerator* global = cm->GetGlobalGenerator(); - const std::vector& locals = global->GetLocalGenerators(); - std::map libDepsOld; - std::map libDepsNew; - std::map libTypes; - for(std::vector::const_iterator i = locals.begin(); - i != locals.end(); ++i) - { - const cmLocalGenerator* gen = *i; - const cmTargets &tgts = gen->GetMakefile()->GetTargets(); - for(cmTargets::const_iterator l = tgts.begin(); - l != tgts.end(); ++l) - { - // Get the current target. - cmTarget const& target = l->second; - - // Skip non-library targets. - if(target.GetType() < cmTarget::STATIC_LIBRARY - || target.GetType() > cmTarget::MODULE_LIBRARY) - { - continue; - } - - // Construct the dependency variable name. - std::string targetEntry = target.GetName(); - targetEntry += "_LIB_DEPENDS"; - - // Construct the dependency variable value. It is safe to use - // the target GetLinkLibraries method here because this code is - // called at the end of configure but before generate so library - // dependencies have yet to be analyzed. Therefore the value - // will be the direct link dependencies. - std::string valueOld; - std::string valueNew; - cmTarget::LinkLibraryVectorType const& libs = target.GetLinkLibraries(); - for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin(); - li != libs.end(); ++li) - { - std::string ltVar = li->first; - ltVar += "_LINK_TYPE"; - std::string ltValue; - switch(li->second) - { - case cmTarget::GENERAL: - valueNew += "general;"; - ltValue = "general"; - break; - case cmTarget::DEBUG: - valueNew += "debug;"; - ltValue = "debug"; - break; - case cmTarget::OPTIMIZED: - valueNew += "optimized;"; - ltValue = "optimized"; - break; - } - std::string lib = li->first; - if(cmTarget* libtgt = global->FindTarget(0, lib.c_str())) - { - // Handle simple output name changes. This command is - // deprecated so we do not support full target name - // translation (which requires per-configuration info). - if(const char* outname = libtgt->GetProperty("OUTPUT_NAME")) - { - lib = outname; - } - } - valueOld += lib; - valueOld += ";"; - valueNew += lib; - valueNew += ";"; - - std::string& ltEntry = libTypes[ltVar]; - if(ltEntry.empty()) - { - ltEntry = ltValue; - } - else if(ltEntry != ltValue) - { - ltEntry = "general"; - } - } - libDepsNew[targetEntry] = valueNew; - libDepsOld[targetEntry] = valueOld; - } - } - - // Generate dependency information for both old and new style CMake - // versions. - const char* vertest = - "\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4"; - fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; - fout << "if(" << vertest << ")\n"; - fout << " # Information for CMake 2.6 and above.\n"; - for(std::map::const_iterator - i = libDepsNew.begin(); - i != libDepsNew.end(); ++i) - { - if(!i->second.empty()) - { - fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; - } - } - fout << "else()\n"; - fout << " # Information for CMake 2.4 and lower.\n"; - for(std::map::const_iterator - i = libDepsOld.begin(); - i != libDepsOld.end(); ++i) - { - if(!i->second.empty()) - { - fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; - } - } - for(std::map::const_iterator i = libTypes.begin(); - i != libTypes.end(); ++i) - { - if(i->second != "general") - { - fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; - } - } - fout << "endif()\n"; - return; -} diff --git a/Source/cmExportLibraryDependencies.h b/Source/cmExportLibraryDependencies.h deleted file mode 100644 index 29b568f..0000000 --- a/Source/cmExportLibraryDependencies.h +++ /dev/null @@ -1,37 +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 cmExportLibraryDependenciesCommand_h -#define cmExportLibraryDependenciesCommand_h - -#include "cmCommand.h" - -class cmExportLibraryDependenciesCommand : public cmCommand -{ -public: - cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); - virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; } - virtual bool InitialPass(std::vector const& args, - cmExecutionStatus &status); - virtual const char* GetName() const { return "export_library_dependencies";} - virtual bool IsDiscouraged() const { return true; } - - virtual void FinalPass(); - virtual bool HasFinalPass() const { return true; } - -private: - std::string Filename; - bool Append; - void ConstFinalPass() const; -}; - - -#endif diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx new file mode 100644 index 0000000..5d6f094 --- /dev/null +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -0,0 +1,208 @@ +/*============================================================================ + 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 "cmExportLibraryDependenciesCommand.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmGeneratedFileStream.h" +#include "cmake.h" +#include "cmVersion.h" + +#include + +bool cmExportLibraryDependenciesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(this->Disallowed(cmPolicies::CMP0033, + "The export_library_dependencies command should not be called; " + "see CMP0033.")) + { return true; } + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // store the arguments for the final pass + this->Filename = args[0]; + this->Append = false; + if(args.size() > 1) + { + if(args[1] == "APPEND") + { + this->Append = true; + } + } + return true; +} + + +void cmExportLibraryDependenciesCommand::FinalPass() +{ + // export_library_dependencies() shouldn't modify anything + // ensure this by calling a const method + this->ConstFinalPass(); +} + +void cmExportLibraryDependenciesCommand::ConstFinalPass() const +{ + // Use copy-if-different if not appending. + cmsys::auto_ptr foutPtr; + if(this->Append) + { + cmsys::auto_ptr ap( + new cmsys::ofstream(this->Filename.c_str(), std::ios::app)); + foutPtr = ap; + } + else + { + cmsys::auto_ptr ap( + new cmGeneratedFileStream(this->Filename.c_str(), true)); + ap->SetCopyIfDifferent(true); + foutPtr = ap; + } + std::ostream& fout = *foutPtr.get(); + + if (!fout) + { + cmSystemTools::Error("Error Writing ", this->Filename.c_str()); + cmSystemTools::ReportLastSystemError(""); + return; + } + + // Collect dependency information about all library targets built in + // the project. + cmake* cm = this->Makefile->GetCMakeInstance(); + cmGlobalGenerator* global = cm->GetGlobalGenerator(); + const std::vector& locals = global->GetLocalGenerators(); + std::map libDepsOld; + std::map libDepsNew; + std::map libTypes; + for(std::vector::const_iterator i = locals.begin(); + i != locals.end(); ++i) + { + const cmLocalGenerator* gen = *i; + const cmTargets &tgts = gen->GetMakefile()->GetTargets(); + for(cmTargets::const_iterator l = tgts.begin(); + l != tgts.end(); ++l) + { + // Get the current target. + cmTarget const& target = l->second; + + // Skip non-library targets. + if(target.GetType() < cmTarget::STATIC_LIBRARY + || target.GetType() > cmTarget::MODULE_LIBRARY) + { + continue; + } + + // Construct the dependency variable name. + std::string targetEntry = target.GetName(); + targetEntry += "_LIB_DEPENDS"; + + // Construct the dependency variable value. It is safe to use + // the target GetLinkLibraries method here because this code is + // called at the end of configure but before generate so library + // dependencies have yet to be analyzed. Therefore the value + // will be the direct link dependencies. + std::string valueOld; + std::string valueNew; + cmTarget::LinkLibraryVectorType const& libs = target.GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin(); + li != libs.end(); ++li) + { + std::string ltVar = li->first; + ltVar += "_LINK_TYPE"; + std::string ltValue; + switch(li->second) + { + case cmTarget::GENERAL: + valueNew += "general;"; + ltValue = "general"; + break; + case cmTarget::DEBUG: + valueNew += "debug;"; + ltValue = "debug"; + break; + case cmTarget::OPTIMIZED: + valueNew += "optimized;"; + ltValue = "optimized"; + break; + } + std::string lib = li->first; + if(cmTarget* libtgt = global->FindTarget(0, lib.c_str())) + { + // Handle simple output name changes. This command is + // deprecated so we do not support full target name + // translation (which requires per-configuration info). + if(const char* outname = libtgt->GetProperty("OUTPUT_NAME")) + { + lib = outname; + } + } + valueOld += lib; + valueOld += ";"; + valueNew += lib; + valueNew += ";"; + + std::string& ltEntry = libTypes[ltVar]; + if(ltEntry.empty()) + { + ltEntry = ltValue; + } + else if(ltEntry != ltValue) + { + ltEntry = "general"; + } + } + libDepsNew[targetEntry] = valueNew; + libDepsOld[targetEntry] = valueOld; + } + } + + // Generate dependency information for both old and new style CMake + // versions. + const char* vertest = + "\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4"; + fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; + fout << "if(" << vertest << ")\n"; + fout << " # Information for CMake 2.6 and above.\n"; + for(std::map::const_iterator + i = libDepsNew.begin(); + i != libDepsNew.end(); ++i) + { + if(!i->second.empty()) + { + fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; + } + } + fout << "else()\n"; + fout << " # Information for CMake 2.4 and lower.\n"; + for(std::map::const_iterator + i = libDepsOld.begin(); + i != libDepsOld.end(); ++i) + { + if(!i->second.empty()) + { + fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; + } + } + for(std::map::const_iterator i = libTypes.begin(); + i != libTypes.end(); ++i) + { + if(i->second != "general") + { + fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; + } + } + fout << "endif()\n"; + return; +} diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h new file mode 100644 index 0000000..29b568f --- /dev/null +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -0,0 +1,37 @@ +/*============================================================================ + 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 cmExportLibraryDependenciesCommand_h +#define cmExportLibraryDependenciesCommand_h + +#include "cmCommand.h" + +class cmExportLibraryDependenciesCommand : public cmCommand +{ +public: + cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); + virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; } + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + virtual const char* GetName() const { return "export_library_dependencies";} + virtual bool IsDiscouraged() const { return true; } + + virtual void FinalPass(); + virtual bool HasFinalPass() const { return true; } + +private: + std::string Filename; + bool Append; + void ConstFinalPass() const; +}; + + +#endif diff --git a/bootstrap b/bootstrap index c0a3e3b..5c754a7 100755 --- a/bootstrap +++ b/bootstrap @@ -284,7 +284,7 @@ CMAKE_CXX_SOURCES="\ cmNewLineStyle \ cmBootstrapCommands1 \ cmBootstrapCommands2 \ - cmCommands \ + cmCommandsForBootstrap \ cmTarget \ cmTest \ cmCustomCommand \ -- cgit v0.12