summaryrefslogtreecommitdiffstats
path: root/Source/CMakeBuildTargets.cxx
diff options
context:
space:
mode:
authorDan Blezek <blezek@crd.ge.com>2000-10-02 18:21:23 (GMT)
committerDan Blezek <blezek@crd.ge.com>2000-10-02 18:21:23 (GMT)
commit0cfdc33d4a4aed98473f69941236445a91ba1886 (patch)
tree3d4f018d6f629e7f2d0004c8a249a4fbdad14ce6 /Source/CMakeBuildTargets.cxx
parentfa7d6abed40facfcea357c150f6a5bc1f53e59b2 (diff)
downloadCMake-0cfdc33d4a4aed98473f69941236445a91ba1886.zip
CMake-0cfdc33d4a4aed98473f69941236445a91ba1886.tar.gz
CMake-0cfdc33d4a4aed98473f69941236445a91ba1886.tar.bz2
BUG: if the path to your source directory has a -S in it, it will be picked up as the source directory by the command line parser, because it matches -S at any character position in the argements. Bad, should have used getopt, except that it is not cross platform.
Diffstat (limited to 'Source/CMakeBuildTargets.cxx')
-rw-r--r--Source/CMakeBuildTargets.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/CMakeBuildTargets.cxx b/Source/CMakeBuildTargets.cxx
index eea02d9..d29ce74 100644
--- a/Source/CMakeBuildTargets.cxx
+++ b/Source/CMakeBuildTargets.cxx
@@ -23,19 +23,19 @@ main(int ac, char** av)
{
std::string arg = av[i];
// Set the current source directory with a -S dir options
- if(arg.find("-S",0) != std::string::npos)
+ if(arg.find("-S",0) == 0)
{
std::string path = arg.substr(2);
mf.SetCurrentDirectory(path.c_str());
}
// Set the output or binary directory with a -B dir option
- if(arg.find("-B",0) != std::string::npos)
+ if(arg.find("-B",0) == 0)
{
std::string path = arg.substr(2);
mf.SetOutputHomeDirectory(path.c_str());
}
// Set the source home directory with a -H dir option
- if(arg.find("-H",0) != std::string::npos)
+ if(arg.find("-H",0) == 0)
{
std::string path = arg.substr(2);
mf.SetHomeDirectory(path.c_str());