Commit Graph

17 Commits

Author SHA1 Message Date
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
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
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
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
2012-08-13 14:19:16 -04:00
Rolf Eike Beer f621ead8b7 Check{C,CXX}CompilerFlag: catch more Intel warning types (#12576)
Patch provided by Szilárd Páll.
2012-04-27 00:52:55 +02:00
Rolf Eike Beer f6ecb900fb Check{C,CXX}CompilerFlag: detect ICC error messages
Patch provided by Christopher Sean Morrison.
2012-02-23 23:08:04 +01:00
Matthias Kretz 9b4e4c92ae Improve checks for Open64 and g++ incompatible flags (#12119) 2012-02-12 10:42:54 +01:00
David Cole 482a235bff Merge topic 'generate_export_header'
6a6393c Don't use a variable name that might be used in other files.
5ca8c56 Fix up verbatim code sections of the dox.
75596e6 Don't start a line with a dash(-)
826374a Remove blank line at the start of the file.
8b9b8e1 Add documentation about the prefix and no_deprecated options.
51bc63a Fix the feature of using a specific prefix for macros.
3449f6b Add quotes in case cmake is installed in a prefix with a space.
36d28f2 Fix Compiler id variable name.
99b2aab Disable the tests for Watcom.
7ac0ab1 Quote paths in case there is a space in one of them.
89108b9 Look for errors reported by PGI too.
e0cc024 Add missing NO_EXPORT macro variant.
1b031d1 More consistency in the macro options.
03d60c7 Try to make the macros do almost nothing for Watcom.
6adeda9 Possibly fix configuration test on AIX.
e253348 Possibly fix test on HPUX.
32eff0c Test for too-old-intel compilers.
42154ec Fix up the regex command for Intel.
a147a06 Add some settings for non-truncation of test output.
bf73e75 Hopefully add version extraction for Intel.
aa4f0b6 Fix the version extraction regex for clang.
a493d1a Test the correct cxx variable.
b6ee2ee Comment the test assertion for now
a9a8b9e Exclude win32 from hidden visibility checks.
afae7a9 Start testing expected values for compiler flags.
1ae3365 Exclude PGI from exports and deprecated.
f426496 Exclude cygwin from the hidden visibility feature.
f84c7db Don't enable deprecated on old GCC
9672b33 Don't enable deprecated on HP.
10d8c44 Disable testing of deprecated macros.
97392a7d Fixup forgotten part of aed84517c9
2aeab4f Borland can't do deprecated.
c41c68b Try to error on deprecated on Intel and SunCC.
aed8451 Test for deprecated attribute before declspec.
c448b09 Perform the -Werror test only once.
fb88c6e Add some messaging output to make remaining issues findable.
01e9e98 Test -Werror instead of enabling it per compiler.
9aab2aa Expect the tests to pass if hidden visibilty is not enabled.
856bdb3 Don't change the expected build result based on the platform.
df4615e Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
78a6e1c Exclude the XL compiler from the hidden-visibility test.
e1f7ee3 Test for compiler features, instead of for specific platforms.
9554e10 Split the deprecated available check from setting macro values.
1590d5f Don't export methods on already exported classes.
750b67c Don't use hidden visibility on non-mingw windows either.
1f3be45 Make sure the hidden visibility variables never get set on MINGW.
399f415 Only set the deprecated attribute if hidden visibilty is enabled.
1c6b41b Remember to surround the other deprecated test in the Borland check.
3f7e036 Export deprecated free methods too.
7fa5592 Add some debug output to narrow down deprecation test issues
7924c1d Another attempt at fixing Borland.
50460ea Fix off-by-not in test for Borland.
b443459 Use the correct project name compiletest not compilefail
fc3772e Another attempt to fix the tests on Borland.
bab4a22 Disable all export macros on Borland.
cff9493 Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
af443b8 Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY for windows builds.
61726f8 Only run the failure tests with gcc >= 4.2
002ddf2 Fix typo and tests failing as a result.
4443037 Fix tests with clang.
ffaa127 Test expected no-op instead of aborting the build.
6aca0e2 Short-circuit the tests on unsupported compilers.
d123bce Add some debug output.
3574b75 Simplify the compiler feature check
c7a937b Simplify. We already know we have hidden visibility at this point.
3b188c8 Test for features, not specific compilers.
4718233 Remove the fatal_warnings option which is no longer used.
b19911e Add missing licence header.
706ed2b Add a newline at the end of the file.
8963716 Add a newline at the end of the file.
def0a54 Handle the case where the user changes the DEFINE_SYMBOL property.
3088070 Add the GenerateExportMacro with unit tests.
2011-09-01 15:14:01 -04:00
Stephen Kelly 89108b99ec Look for errors reported by PGI too. 2011-08-24 19:43:04 +02:00
Stephen Kelly 6adeda9f55 Possibly fix configuration test on AIX. 2011-08-23 19:58:42 +02:00
Brad King ed6be501de Fix CHECK_(C|CXX)_COMPILER_FLAG for Clang (#12394)
This compiler warns and returns 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
2011-08-08 12:53:17 -04:00
Brad King 79e02333a6 BUG: Fix compiler flag test for non-English MSVC (#11336)
Approach suggested by John Stark.
2010-11-04 08:50:17 -04:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 3a666595c9 Convert CMake non-find modules to BSD License
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.
2009-09-28 11:46:51 -04:00
Brad King 83957d9e0d Fix CHECK_(C|CXX)_COMPILER_FLAG for XL and SunPro
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.
2009-09-18 09:49:44 -04:00
Brad King 53fb07ef5d Fix CHECK_(C|CXX)_COMPILER_FLAG for HP
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.
2009-09-17 17:16:43 -04:00
Brad King 7e3d437d0a Fix CHECK_(C|CXX)_COMPILER_FLAG for GNU and MSVC
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.
2009-09-17 15:32:54 -04:00
Brad King 80af3ae35d Cleanup generic compiler check macro documentation
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.
2009-09-17 15:28:51 -04:00
Alexander Neundorf 86c63dca11 ENH: two macros to check whether the C/CXX compiler supports a given flag:
CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL)

Alex
2006-09-18 17:55:22 -04:00