diff options
author | Brad King <brad.king@kitware.com> | 2001-12-17 21:19:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-12-17 21:19:27 (GMT) |
commit | 1b6ca3eba06ce8eb525370ec2413facd0143d706 (patch) | |
tree | 8378223fd69d35f2c47ce7ef45274136a34dc170 /Source | |
parent | 213582db3c803a928c0d1271f12bef9504f64484 (diff) | |
download | CMake-1b6ca3eba06ce8eb525370ec2413facd0143d706.zip CMake-1b6ca3eba06ce8eb525370ec2413facd0143d706.tar.gz CMake-1b6ca3eba06ce8eb525370ec2413facd0143d706.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
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 |