diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index b240924b6..d951c13e9 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -498,9 +498,7 @@ cmGlobalUnixMakefileGenerator3 for(std::vector::iterator sdi = lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi) { - cmLocalUnixMakefileGenerator3* slg = - static_cast(*sdi); - std::string subdir = slg->GetMakefile()->GetCurrentBinaryDirectory(); + std::string subdir = (*sdi)->GetMakefile()->GetCurrentBinaryDirectory(); subdir += "/"; subdir += pass; depends.push_back(subdir);