Make try compile add a depend to re-run cmake if its source chagnes
This commit is contained in:
parent
57ddd33fd0
commit
e03219860d
@ -173,6 +173,12 @@ int cmTryCompileCommand::CoreTryCompileCode(
|
|||||||
fclose(fout);
|
fclose(fout);
|
||||||
projectName = "CMAKE_TRY_COMPILE";
|
projectName = "CMAKE_TRY_COMPILE";
|
||||||
targetName = "cmTryCompileExec";
|
targetName = "cmTryCompileExec";
|
||||||
|
// if the source is not in CMakeTmp
|
||||||
|
if(source.find(argv[1] + "/CMakeTmp") == source.npos)
|
||||||
|
{
|
||||||
|
mf->AddCMakeDependFile(source.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// else the srcdir bindir project target signature
|
// else the srcdir bindir project target signature
|
||||||
else
|
else
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* This is the core code for try compile. It is here so that other
|
* This is the core code for try compile. It is here so that other
|
||||||
* commands, such as TryRun can access the same logic without
|
* commands, such as TryRun can access the same logic without
|
||||||
* dumplication.
|
* duplication.
|
||||||
*/
|
*/
|
||||||
static int CoreTryCompileCode(
|
static int CoreTryCompileCode(
|
||||||
cmMakefile *mf, std::vector<std::string> const& argv, bool clean);
|
cmMakefile *mf, std::vector<std::string> const& argv, bool clean);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user