summaryrefslogtreecommitdiffstats
path: root/Source/cmTryCompileCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-12-12 22:48:49 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-12-12 22:48:49 (GMT)
commite03219860ddc8aaedba056cbf6833d7eeff15299 (patch)
tree40a91a168928cdb7787139e90a08ace59e55c730 /Source/cmTryCompileCommand.cxx
parent57ddd33fd08afde9080e9930fde9ed810e38b675 (diff)
downloadCMake-e03219860ddc8aaedba056cbf6833d7eeff15299.zip
CMake-e03219860ddc8aaedba056cbf6833d7eeff15299.tar.gz
CMake-e03219860ddc8aaedba056cbf6833d7eeff15299.tar.bz2
Make try compile add a depend to re-run cmake if its source chagnes
Diffstat (limited to 'Source/cmTryCompileCommand.cxx')
-rw-r--r--Source/cmTryCompileCommand.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index a3a66cd..cece5a7 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -173,6 +173,12 @@ int cmTryCompileCommand::CoreTryCompileCode(
fclose(fout);
projectName = "CMAKE_TRY_COMPILE";
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