summaryrefslogtreecommitdiff
path: root/Source/cmLoadCommandCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-16 17:09:08 -0500
committerBrad King <brad.king@kitware.com>2006-03-16 17:09:08 -0500
commit1d38a3e09e071e16c38d46a7bd67e1730bbee7ab (patch)
treea360c2271b2b50ee53bf7c7cb1b2608060a3dc5c /Source/cmLoadCommandCommand.cxx
parentdbe7d397381cba4c3f180f39f377b8b7236b679f (diff)
downloadcmake-1d38a3e09e071e16c38d46a7bd67e1730bbee7ab.tar.gz
BUG: Removed compiled-in CMAKE_SHARED_MODULE_PREFIX and CMAKE_SHARED_MODULE_SUFFIX for loaded commands in favor of using the settings from the platform files.
Diffstat (limited to 'Source/cmLoadCommandCommand.cxx')
-rw-r--r--Source/cmLoadCommandCommand.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 4ade0530a7..e13449ca1a 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -230,8 +230,11 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args)
this->Makefile->RemoveDefinition(reportVar.c_str());
// the file must exist
- std::string fullPath = cmDynamicLoader::LibPrefix();
- fullPath += "cm" + args[0] + cmDynamicLoader::LibExtension();
+ std::string moduleName =
+ this->Makefile->GetRequiredDefinition("CMAKE_SHARED_MODULE_PREFIX");
+ moduleName += "cm" + args[0];
+ moduleName +=
+ this->Makefile->GetRequiredDefinition("CMAKE_SHARED_MODULE_SUFFIX");
// search for the file
std::vector<std::string> path;
@@ -246,13 +249,13 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args)
}
// Try to find the program.
- fullPath = cmSystemTools::FindFile(fullPath.c_str(), path);
+ std::string fullPath = cmSystemTools::FindFile(moduleName.c_str(), path);
if (fullPath == "")
{
- fullPath = "Attempt to load command failed from file : ";
- fullPath += cmDynamicLoader::LibPrefix();
- fullPath += "cm" + args[0] + cmDynamicLoader::LibExtension();
- this->SetError(fullPath.c_str());
+ cmOStringStream e;
+ e << "Attempt to load command failed from file \""
+ << moduleName << "\"";
+ this->SetError(e.str().c_str());
return false;
}