diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-12-12 22:48:49 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-12-12 22:48:49 (GMT) |
commit | e03219860ddc8aaedba056cbf6833d7eeff15299 (patch) | |
tree | 40a91a168928cdb7787139e90a08ace59e55c730 /Source | |
parent | 57ddd33fd08afde9080e9930fde9ed810e38b675 (diff) | |
download | CMake-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')
-rw-r--r-- | Source/cmTryCompileCommand.cxx | 6 | ||||
-rw-r--r-- | Source/cmTryCompileCommand.h | 2 |
2 files changed, 7 insertions, 1 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 diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index dee337a..dd1a71a 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -58,7 +58,7 @@ public: /** * This is the core code for try compile. It is here so that other * commands, such as TryRun can access the same logic without - * dumplication. + * duplication. */ static int CoreTryCompileCode( cmMakefile *mf, std::vector<std::string> const& argv, bool clean); |