ENH: LOAD_COMMAND command will now set a variable called CMAKE_LOADED_COMMAND_<COMMAND_NAME> to the full path of the loaded module if loading was successful. Otherwise the variable is not set (will evaluate to empty string). This is useful both in testing whether loading worked and for installing loaded command modules.

This commit is contained in:
Brad King
2005-02-22 14:52:55 -05:00
parent b9b4ea0f7b
commit ec497c7a23
2 changed files with 16 additions and 3 deletions

View File

@@ -70,7 +70,11 @@ public:
"The given locations are searched for a library whose name is "
"cmCOMMAND_NAME. If found, it is loaded as a module and the command "
"is added to the set of available CMake commands. Usually, TRY_COMPILE "
"is used before this command to compile the module.";
"is used before this command to compile the module. If the command "
"is successfully loaded a variable named\n"
" CMAKE_LOADED_COMMAND_<COMMAND_NAME>\n"
"will be set to the full path of the module that was loaded. "
"Otherwise the variable will not be set.";
}
cmTypeMacro(cmLoadCommandCommand, cmCommand);