diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 406b6f8237..528c84e78c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -365,9 +365,8 @@ void cmLocalGenerator::GenerateInstallRules() // Create the install script file. std::string file = this->StateSnapshot.GetCurrentBinaryDirectory(); std::string homedir = this->GetState()->GetBinaryDirectory(); - std::string currdir = this->StateSnapshot.GetCurrentBinaryDirectory(); int toplevel_install = 0; - if ( currdir == homedir ) + if (file == homedir) { toplevel_install = 1; }