Re: [cmake-developers] _check_cxx_compiler_attribute macro from GenerateExportHeader.cmake

2012-02-21 Thread Rolf Eike Beer
Stephen Kelly wrote:
> Rolf Eike Beer wrote:
> > This macro does this:
> > 
> > macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
> > 
> >   check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
> >   
> > int main() { return somefunc();}" ${_RESULT}
> > # Some compilers do not fail with a bad flag
> > FAIL_REGEX "unrecognized .*option" # GNU
> > FAIL_REGEX "ignoring unknown option"   # MSVC
> > FAIL_REGEX "warning D9002" # MSVC, any
> > lang
> > FAIL_REGEX "[Uu]nknown option" # HP
> > FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
> > FAIL_REGEX "command option .* is not recognized"   # XL
> >   
> >   )
> > 
> > endmacro()
> > 
> > The FAIL_REGEX were copied from CheckCXXCompilerFlag and are to match
> > errors about broken command line arguments. I doubt they make any sense at
> > this point. Is this intentional or by accident?
> 
> When you say 'not make any sense' what do you mean?

You don't want to check for errors coming from bad command line options here, 
do you? So why are there expressions there at all?

Eike

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] _check_cxx_compiler_attribute macro from GenerateExportHeader.cmake

2012-02-21 Thread Stephen Kelly
Rolf Eike Beer wrote:

> This macro does this:
> 
> macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
>   check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
> int main() { return somefunc();}" ${_RESULT}
> # Some compilers do not fail with a bad flag
> FAIL_REGEX "unrecognized .*option" # GNU
> FAIL_REGEX "ignoring unknown option"   # MSVC
> FAIL_REGEX "warning D9002" # MSVC, any
> lang
> FAIL_REGEX "[Uu]nknown option" # HP
> FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
> FAIL_REGEX "command option .* is not recognized"   # XL
>   )
> endmacro()
> 
> The FAIL_REGEX were copied from CheckCXXCompilerFlag and are to match
> errors about broken command line arguments. I doubt they make any sense at
> this point. Is this intentional or by accident?

When you say 'not make any sense' what do you mean? 

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] _check_cxx_compiler_attribute macro from GenerateExportHeader.cmake

2012-02-21 Thread Rolf Eike Beer
This macro does this:

macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
  check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
int main() { return somefunc();}" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option"   # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized"   # XL
  )
endmacro()

The FAIL_REGEX were copied from CheckCXXCompilerFlag and are to match errors 
about broken command line arguments. I doubt they make any sense at this 
point. Is this intentional or by accident?

Eike

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers