summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCommandCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-20 15:15:53 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-20 15:15:53 (GMT)
commit3bc549540e117a949707c51fcdf110fdc51e3d93 (patch)
treee736abff616bf3c411881074a156fdae490f6f71 /Source/cmLoadCommandCommand.cxx
parent64dc4efc511f766d0a099df717e2f35f9eccabce (diff)
parentbf241bcc1e5cda69775c05022e146a7f4f76b41b (diff)
downloadCMake-3bc549540e117a949707c51fcdf110fdc51e3d93.zip
CMake-3bc549540e117a949707c51fcdf110fdc51e3d93.tar.gz
CMake-3bc549540e117a949707c51fcdf110fdc51e3d93.tar.bz2
Merge branch 'master' into FindGTest-revert-no-release
Diffstat (limited to 'Source/cmLoadCommandCommand.cxx')
-rw-r--r--Source/cmLoadCommandCommand.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 5790e16..adebe02 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -24,6 +24,7 @@
#include "cmCommand.h"
#include "cmDynamicLoader.h"
#include "cmExecutionStatus.h"
+#include "cmListFileCache.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
@@ -36,8 +37,6 @@
# include <malloc.h> /* for malloc/free on QNX */
#endif
-class cmListFileBacktrace;
-
namespace {
const char* LastName = nullptr;
@@ -256,10 +255,12 @@ bool cmLoadCommandCommand(std::vector<std::string> const& args,
// if the symbol is found call it to set the name on the
// function blocker
if (initFunction) {
- status.GetMakefile().GetState()->AddScriptedCommand(
+ return status.GetMakefile().GetState()->AddScriptedCommand(
args[0],
- cmLegacyCommandWrapper(cm::make_unique<cmLoadedCommand>(initFunction)));
- return true;
+ BT<cmState::Command>(
+ cmLegacyCommandWrapper(cm::make_unique<cmLoadedCommand>(initFunction)),
+ status.GetMakefile().GetBacktrace()),
+ status.GetMakefile());
}
status.SetError("Attempt to load command failed. "
"No init function found.");