diff options
author | Brad King <brad.king@kitware.com> | 2013-10-18 17:09:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-22 13:09:52 (GMT) |
commit | 248d1dc057564dc00e3374d7797a1e42ea57032d (patch) | |
tree | f02f66efaede660545b5ed228e36587f80164872 /Source | |
parent | 6865c8fe05d407077a598fcc0921ef62dfeaf021 (diff) | |
download | CMake-248d1dc057564dc00e3374d7797a1e42ea57032d.zip CMake-248d1dc057564dc00e3374d7797a1e42ea57032d.tar.gz CMake-248d1dc057564dc00e3374d7797a1e42ea57032d.tar.bz2 |
Add policy CMP0033 to disallow export_library_dependencies
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportLibraryDependencies.cxx | 4 | ||||
-rw-r--r-- | Source/cmExportLibraryDependencies.h | 39 | ||||
-rw-r--r-- | Source/cmPolicies.cxx | 5 | ||||
-rw-r--r-- | Source/cmPolicies.h | 1 |
4 files changed, 14 insertions, 35 deletions
diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx index e3b1626..064ffa3 100644 --- a/Source/cmExportLibraryDependencies.cxx +++ b/Source/cmExportLibraryDependencies.cxx @@ -21,6 +21,10 @@ bool cmExportLibraryDependenciesCommand ::InitialPass(std::vector<std::string> 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"); diff --git a/Source/cmExportLibraryDependencies.h b/Source/cmExportLibraryDependencies.h index a384a7c..29b568f 100644 --- a/Source/cmExportLibraryDependencies.h +++ b/Source/cmExportLibraryDependencies.h @@ -14,50 +14,19 @@ #include "cmCommand.h" -/** \class cmExportLibraryDependenciesCommand - * \brief Add a test to the lists of tests to run. - * - * cmExportLibraryDependenciesCommand adds a test to the list of tests to run - * - */ class cmExportLibraryDependenciesCommand : public cmCommand { public: - /** - * This is a virtual constructor for the command. - */ - virtual cmCommand* Clone() - { - return new cmExportLibraryDependenciesCommand; - } - - /** - * This is called when the command is first encountered in - * the CMakeLists.txt file. - */ + cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); + virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; } virtual bool InitialPass(std::vector<std::string> const& args, cmExecutionStatus &status); + virtual const char* GetName() const { return "export_library_dependencies";} + virtual bool IsDiscouraged() const { return true; } - /** - * This is called at the end after all the information - * specified by the command is accumulated. - */ virtual void FinalPass(); virtual bool HasFinalPass() const { return true; } - /** - * The name of the command as specified in CMakeList.txt. - */ - virtual const char* GetName() const { return "export_library_dependencies";} - - /** This command is kept for compatibility with older CMake versions. */ - virtual bool IsDiscouraged() const - { - return true; - } - - cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); - private: std::string Filename; bool Append; diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index bf4d2c1..7852d9a 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -266,6 +266,11 @@ cmPolicies::cmPolicies() CMP0032, "CMP0032", "The output_required_files command should not be called.", 3,0,0,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0033, "CMP0033", + "The export_library_dependencies command should not be called.", + 3,0,0,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 851fdb8..99982c4 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -84,6 +84,7 @@ public: CMP0030, ///< Disallow command: use_mangled_mesa CMP0031, ///< Disallow command: load_command CMP0032, ///< Disallow command: output_required_files + CMP0033, ///< Disallow command: export_library_dependencies /** \brief Always the last entry. * |