diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-10-24 14:58:25 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-10-24 14:58:25 (GMT) |
commit | e3e9fb633a3c8df6a34d2e0f6ee9262e3594a690 (patch) | |
tree | 9eeaef228430e754a787842d70596d4108654ad1 /Source/cmSubdirCommand.cxx | |
parent | 384fda81a9849f80365b75245e8b5f9407a476c6 (diff) | |
download | CMake-e3e9fb633a3c8df6a34d2e0f6ee9262e3594a690.zip CMake-e3e9fb633a3c8df6a34d2e0f6ee9262e3594a690.tar.gz CMake-e3e9fb633a3c8df6a34d2e0f6ee9262e3594a690.tar.bz2 |
Subdirs reports an error if the subdirectory does not exists
Diffstat (limited to 'Source/cmSubdirCommand.cxx')
-rw-r--r-- | Source/cmSubdirCommand.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index 7651c2a..10bb916 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -26,12 +26,25 @@ bool cmSubdirCommand::InitialPass(std::vector<std::string> const& argsIn) } std::vector<std::string> args; cmSystemTools::ExpandListArguments(argsIn, args); + bool res = true; for(std::vector<std::string>::const_iterator i = args.begin(); i != args.end(); ++i) { - m_Makefile->AddSubDirectory(i->c_str()); + std::string directory = std::string(m_Makefile->GetCurrentDirectory()) + + "/" + i->c_str(); + if ( cmSystemTools::FileIsDirectory(directory.c_str()) ) + { + m_Makefile->AddSubDirectory(i->c_str()); + } + else + { + std::string error = "Incorrect SUBDIRS command. Directory: "; + error += directory + " does not exists."; + this->SetError(error.c_str()); + res = false; + } } - return true; + return res; } |