From 26f509dda7e44cf41f7a935f90060422fd61d4a9 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 9 Jun 2005 14:34:27 -0400 Subject: [PATCH] ENH: deprecate old ITK wrap command --- Source/cmITKWrapTclCommand.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/cmITKWrapTclCommand.cxx b/Source/cmITKWrapTclCommand.cxx index 3f10e10d2..8c6ab5140 100644 --- a/Source/cmITKWrapTclCommand.cxx +++ b/Source/cmITKWrapTclCommand.cxx @@ -61,6 +61,19 @@ cmITKWrapTclCommand::AddDependencies(cmDependInformation const *info, // cmITKWrapTclCommand bool cmITKWrapTclCommand::InitialPass(std::vector const& args) { + // deprecated + const char* versionValue + = m_Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY"); + if (atof(versionValue) > 2.2) + { + this->SetError("The ITK_WRAP_TCL command was deprecated in CMake version 2.2 and will be removed in later versions of CMake. You should modify your CMakeLists.txt files to use the MACRO command or use CMake 2.2 or earlier for this project.\n"); + return false; + } + if (atof(versionValue) > 2.0) + { + cmSystemTools::Message("The ITK_WRAP_TCL command was deprecated in CMake version 2.2 and will be removed in later versions. You should modify your CMakeLists.txt files to use a MACRO or use CMake 2.2 or earlier.\n","Warning"); + } + if(args.size() < 2 ) { this->SetError("called with incorrect number of arguments");