cmPgmOpts.c : Fix bug where 'flag' type was always reported as 'required'.

This commit is contained in:
kevin 2020-07-20 17:43:54 -04:00
parent e9e405f4a9
commit ce2412aae3

View File

@ -722,7 +722,10 @@ cmPoRC_t cmPgmOptParse( cmPgmOptH_t h, unsigned argCnt, char* argArray[] )
cmPgmOptInstallBool(h, kVersionPoId, 'v', "version", 0, false, NULL,0,"Print version information." );
if( _cmPgmOptNumIdToOptRecd(p,kPrintParmsPoId) == NULL )
cmPgmOptInstallBool(h, kPrintParmsPoId,'p', "parms", 0, false, NULL,0,"Print the arguments.");
cmPgmOptInstallBool(h, kPrintParmsPoId,'p', "parms", 0, false, NULL,0,"Print the arguments.");
if((rc = cmErrLastRC(&p->err)) != kOkPoRC )
return rc;
while(i<argCnt)
@ -1247,7 +1250,7 @@ void cmPgmOptPrintHelp( cmPgmOptH_t h, cmRpt_t* rpt )
if( _cmPoOptUsesValue(r) )
valueTypeLabel = _cmPoTypeFlagToLabel(r->sflags & kTypeMaskPoFl,r->cflags);
if( cmIsNotFlag(r->sflags,kEnumPoFl) && cmIsFlag(r->sflags,kReqPoFl) )
if( cmIsNotFlag(r->sflags,kEnumPoFl) && cmIsFlag(r->cflags,kReqPoFl) )
reqLabel = reqStr;
if( mstr != NULL )