From 1b6ca3eba06ce8eb525370ec2413facd0143d706 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 17 Dec 2001 16:19:27 -0500 Subject: ENH: Each cmake command now adds a cmake variable of its own name, set to ON. This allows constructs in CMakeLists.txt files like: IF(FOO_COMMAND) FOO_COMMAND() ENDIF(FOO_COMMAND) This provides the option to add CMake commands for extra functionality without breaking compatability with earlier versions of CMake. --- Source/cmMakefile.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 81b4b33..ac48b82 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -390,6 +390,7 @@ void cmMakefile::AddCommand(cmCommand* wg) { std::string name = wg->GetName(); m_Commands.insert( RegisteredCommandsMap::value_type(name, wg)); + this->AddDefinition(name.c_str(), true); } // Set the make file -- cgit v0.12