summaryrefslogtreecommitdiffstats
path: root/Modules/CheckCCompilerFlag.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-10/+18
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* Check*CompilerFlag: make C and CXX modules share most error patterns (#14339)Rolf Eike Beer2013-08-131-11/+5
| | | | | | | This simplifies maintenance as most patterns will be for both modules and may be added at a central place. While at it add error patterns for XL and BCC.
* CheckC*CompilerFlag: add documentation what to expect from a positive resultRolf Eike Beer2013-08-131-0/+3
|
* Check*CompilerFlag: Document use of CMAKE_REQUIRED_DEFINITIONS (#14309)Brad King2013-07-251-2/+3
| | | | | Explain how CMAKE_REQUIRED_DEFINITIONS is set before calling the check_*_source_compiles macros.
* Check{C,CXX}CompilerFlag: Test using C locale (#14102)Brad King2013-04-221-0/+12
| | | | | | | Set the locale to C while running the compiler for these checks because we match the resulting warning messages in English only. Suggested-by: Marco Nolden <m.nolden@dkfz-heidelberg.de>
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-6/+6
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Check{C,CXX}CompilerFlag: catch more Intel warning types (#12576)Rolf Eike Beer2012-04-261-1/+3
| | | | Patch provided by Szilárd Páll.
* Check{C,CXX}CompilerFlag: detect ICC error messagesRolf Eike Beer2012-02-231-0/+1
| | | | Patch provided by Christopher Sean Morrison.
* Improve checks for Open64 and g++ incompatible flags (#12119)Matthias Kretz2012-02-121-0/+2
|
* CheckCCompilerFlag: Generalize "but not for C" case (#12633)Brad King2011-12-221-3/+2
| | | | | The "warning: " part is not necessary. The case can happen on any GNU compiler, not just an Apple version.
* Fix CHECK_(C|CXX)_COMPILER_FLAG for Clang (#12394)Brad King2011-08-081-0/+1
| | | | | This compiler warns and returns 0 for unrecognized flags. We fix the compiler flag check macros by looking for a warning in the output.
* Add fail regex to detect supported warning flags correctly.David Cole2011-07-271-1/+2
| | | | | | | | | | On Apple's gcc, the compiler emits a warning such as "warning: command line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C" when it is passed that flag on its command line. When testing for that flag with a plain C file, we should report that the flag is unsupported for C files. The new FAIL_REGEX option added here produces this behavior.
* CheckCCompilerFlag: Strict signature of 'main' (#11615)Brad King2010-12-161-1/+1
| | | | | | Use "int main(void)" instead of just "int main()" so that compiling with "gcc -Werror=strict-prototypes" works. Test this check using the flags "-Werror -Wstrict-prototypes" to work with old GCC versions.
* BUG: Fix compiler flag test for non-English MSVC (#11336)Brad King2010-11-041-1/+2
| | | | Approach suggested by John Stark.
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-4/+12
| | | | | | | This adds copyright/license notification blocks CMake's non-find modules. Most of the modules had no notices at all. Some had notices referring to the BSD license already. This commit normalizes existing notices and adds missing notices.
* Fix CHECK_(C|CXX)_COMPILER_FLAG for XL and SunProBrad King2009-09-181-1/+3
| | | | | | These compilers warn and return 0 for unrecognized flags. We fix the compiler flag check macros by looking for a warning in the output. We also update the regex for GNU on older Macs. See issue #9516.
* Fix CHECK_(C|CXX)_COMPILER_FLAG for HPBrad King2009-09-171-0/+1
| | | | | | This compiler warns and returns 0 for unrecognized flags. We fix the compiler flag check macros by looking for a warning in the output. See issue #9516.
* Fix CHECK_(C|CXX)_COMPILER_FLAG for GNU and MSVCBrad King2009-09-171-1/+5
| | | | | | These compilers warn and return 0 for unrecognized flags. We fix the compiler flag check macros by looking for a warning in the output. See issue #9516.
* Cleanup generic compiler check macro documentationBrad King2009-09-171-8/+6
| | | | | | | | | | | | | | | This commit improves formatting and style of the documentation for the general-purpose compiler check macros: CHECK_C_COMPILER_FLAG CHECK_C_SOURCE_COMPILES CHECK_C_SOURCE_RUNS CHECK_CXX_COMPILER_FLAG CHECK_CXX_SOURCE_COMPILES CHECK_CXX_SOURCE_RUNS This sytle is more consistent with CMake command documentation. It also looks nicer in the generated documentation text files.
* ENH: fix docs, bug 7590Bill Hoffman2008-09-091-0/+4
|
* ENH: two macros to check whether the C/CXX compiler supports a given flag:Alexander Neundorf2006-09-181-0/+21
CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL) Alex