[petsc-dev] COPTFLAGS
Jed Brown
jedbrown at mcs.anl.gov
Wed Nov 13 12:10:49 CST 2013
Satish Balay <balay at mcs.anl.gov> writes:
> On Wed, 13 Nov 2013, Jed Brown wrote:
>
>> Satish Balay <balay at mcs.anl.gov> writes:
>> > I don't understand why this would be needed. Thid code sets the
>> > defaults for bopt='g' or 'O'. But if COPTFLAGS flags is set by user -
>> > it routine should not be called. [so the above 2 lines appear to be
>> > redundant]
>>
>> How do you figure that the routine is not called when COPTFLAGS is set
>> by the user?
>
> configureCompilerFlags() in compilerFlags.py does this magic..
For CFLAGS, but not for COPTFLAGS.
>>>>>>>>>>>>
> for bopt in bopts:
> if not bopt == '' and self.getOptionalFlagsName(language) in self.framework.argDB:
> # treat user supplied options as single option - as it could include options separated by spaces '-tp k8-64'
> flags = [self.framework.argDB[self.getOptionalFlagsName(language)]]
> elif bopt == '' and self.getCompilerFlagsName(language) in self.framework.argDB:
> self.logPrint('Ignoring default options which were overridden using --'+self.getCompilerFlagsName(language)+ ' ' + self.framework.argDB[self.getCompilerFlagsName(language)])
> flags = []
> else:
> flags = options.getCompilerFlags(language, self.setCompilers.getCompiler(), bopt)
Notice how this one is always called, regardless of COPTFLAGS. Are you
are saying that we should instead add getCompilerOptFlagsName() and a
similar guard here instead of putting it inside getCFlags?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131113/4875f313/attachment.sig>
More information about the petsc-dev
mailing list