diff options
-rw-r--r-- | Source/cmAuxSourceDirectoryCommand.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 17ccff0..00e974f 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -31,6 +31,10 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar std::string tdir = m_Makefile->GetCurrentDirectory(); tdir += "/"; tdir += templateDirectory; + // The Makefile should be dependent on the directory's last mod date, + // so that if a file is added or removed from the directory, it will + // be rescanned, and the makefile rebuilt. + m_Makefile->AddCMakeDependFile(tdir.c_str()); // Load all the files in the directory cmDirectory dir; if(dir.Load(tdir.c_str())) |