ENH: Teach Fortran compiler identification about the Portland Group compiler (PGI).
This commit is contained in:
parent
10db44a81d
commit
0c6ba12efd
|
@ -8,6 +8,8 @@ PROGRAM CMakeFortranCompilerId
|
||||||
PRINT *, 'INFO:compiler[GNU]'
|
PRINT *, 'INFO:compiler[GNU]'
|
||||||
#elif defined(__IBM__) || defined(__IBMC__)
|
#elif defined(__IBM__) || defined(__IBMC__)
|
||||||
PRINT *, 'INFO:compiler[VisualAge]'
|
PRINT *, 'INFO:compiler[VisualAge]'
|
||||||
|
#elif defined(__PGI)
|
||||||
|
PRINT *, 'INFO:compiler[PGI]'
|
||||||
#elif defined(_COMPILER_VERSION)
|
#elif defined(_COMPILER_VERSION)
|
||||||
PRINT *, 'INFO:compiler[MIPSpro]'
|
PRINT *, 'INFO:compiler[MIPSpro]'
|
||||||
! This compiler is either not known or is too old to define an
|
! This compiler is either not known or is too old to define an
|
||||||
|
|
|
@ -533,12 +533,16 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||||
(limit_input < 0 || static_cast<int>(fin.tellg()) < limit_input) &&
|
(limit_input < 0 || static_cast<int>(fin.tellg()) < limit_input) &&
|
||||||
(c = fin.get(), fin))
|
(c = fin.get(), fin))
|
||||||
{
|
{
|
||||||
if(c == '\0')
|
if(c == '\0' || c == '\f')
|
||||||
{
|
{
|
||||||
// A terminating null character has been found. Check if the
|
// A terminating character has been found. In most cases it is
|
||||||
// current string matches the requirements. Since it was
|
// a NULL character, but at least one compiler (Portland Group
|
||||||
// terminated by a null character, we require that the length be
|
// Fortran) produces binaries that terminate strings with a form
|
||||||
// at least one no matter what the user specified.
|
// feed.
|
||||||
|
|
||||||
|
// Check if the current string matches the requirements. Since
|
||||||
|
// it was terminated by a null character, we require that the
|
||||||
|
// length be at least one no matter what the user specified.
|
||||||
if(s.length() >= minlen && s.length() >= 1 &&
|
if(s.length() >= minlen && s.length() >= 1 &&
|
||||||
(!have_regex || regex.find(s.c_str())))
|
(!have_regex || regex.find(s.c_str())))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue