Commit Graph

82 Commits

Author SHA1 Message Date
Brad King
7d47c69365 Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so.  In the error suggest using a CMake 2.8.x release.

Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4.  They are not supported by CMake >= 3.0.

Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
2013-10-23 08:54:31 -04:00
Rolf Eike Beer
cd4451d1e7 replace string(... MATCHES "^const$) with string(... STREQUAL "const") 2013-06-02 22:18:19 +02:00
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
Kitware Robot
7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King
53d31c2426 complex: Remove unused option to test CMakeLib
Now that the Complex tests do not depend on cmSystemTools or other
classes from CMakeLib the COMPLEX_TEST_CMAKELIB option is useless.
2011-12-23 16:16:57 -05:00
Brad King
7dcfc8d23a Make Complex test of CMakeLib more optional
Previously we passed inputs to the decision to each Complex test and let
the test source decide.  This commit moves the decision out of the tests
and makes it an option() in their source.  This makes it possible to
build the Complex tests from outside the CMake test tree.
2009-10-07 16:11:52 -04:00
Brad King
d1aa17a7b0 ENH: Remove CMAKE_ANSI_CFLAGS from tests
As of CMake 2.6 this variable is not defined, and the ANSI flags for the
HP compiler are simply hard-coded in the default C flags.
2009-07-08 11:41:48 -04:00
Brad King
493f88ce55 ENH: Allow projects to disable per-rule echo lines
This creates global property RULE_MESSAGES which can be set to disbale
per-rule progress and action reporting.  On Windows, these reports may
cause a noticable delay due to the cost of starting extra processes.
This feature will allow scripted builds to avoid the cost since they do
not need detailed information anyway.  This replaces the RULE_PROGRESS
property created earlier as it is more complete.  See issue #8726.
2009-03-16 16:55:58 -04:00
Brad King
2f651c2e59 ENH: Allow projects to disable per-rule progress
This creates global property RULE_PROGRESS which can be set to disbale
per-rule progress reporting.  On Windows, progress reports may cause a
noticable delay due to the cost of starting an extra process.  This
feature will allow scripted builds to avoid the cost since they do not
need detailed progress anyway.  See issue #8726.
2009-03-16 16:22:19 -04:00
Brad King
7f7068e9d4 ENH: Add cmake_policy(GET) command mode
It is likely that projects or CMake modules in the future will need to
check the value of a policy setting.  For example, if we add a policy
that affects the results of FindXYZ.cmake modules, the module code will
need to be able to check the policy.
2008-08-18 09:53:06 -04:00
Ken Martin
19e891532a ENH: support parenthesis as arguments and in conditionals feature request #6191 2008-06-26 13:01:35 -04:00
Brad King
a6a673979d ENH: Add "if(POLICY policy-id)" option for IF command.
- This will help projects support multiple CMake versions.
  - In order to set a policy when using a newer CMake but still
    working with an older CMake one may write
      if(POLICY CMP1234)
        cmake_policy(SET CMP1234 NEW)
      endif(POLICY CMP1234)
  - Note that since CMake 2.4 does not have if(POLICY) supporting
    it will also require using "if(COMMAND cmake_policy)"
2008-03-20 18:25:59 -04:00
Brad King
9d57dbd098 ENH: Make per-configuration COMPILE_DEFINITIONS_<CONFIG> directory property initialized from parent. 2008-01-17 20:34:10 -05:00
Bill Hoffman
fcad93e172 ENH: user more memory for parser and add test to complex that sets a huge string 2007-07-20 14:08:37 -04:00
Brad King
cf7eeab37a ENH: Testing new target properties RUNTIME_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and ARCHIVE_OUTPUT_DIRECTORY. This is an incremental fix for bug#2240 and bug#4210. 2007-03-12 10:23:06 -04:00
Brad King
4400842135 ENH: Added test case for bug#3966. 2006-10-30 10:38:55 -05:00
Brad King
b646183f44 ENH: Added explicit name for option to test CMakeLib. Added option to disable testing of CMakeLib if system utility libraries are used until linking made easier. 2006-10-19 14:45:41 -04:00
Brad King
97e07dc162 BUG: Test -isystem without affecting other tests. Made separate Library/SystemDir for this purpose. 2006-10-05 12:04:30 -04:00
Brad King
c11cf31c9b ENH: Adding SYSTEM option to INCLUDE_DIRECTORIES command. This addresses bug #3462. 2006-10-05 08:55:59 -04:00
Ken Martin
a6e63f3a61 ENH: added test for elseif 2006-09-22 11:49:56 -04:00
Brad King
21089bf93f BUG: INCLUDE_DIRECTORIES should interpret relative path arguments with respect to the current source directory. 2006-05-12 10:54:09 -04:00
Brad King
5f20340c2a BUG: Disabling an EXECUTE_PROCESS test until problems on UNIX systems are fixed. 2006-05-08 10:02:28 -04:00
Brad King
1b6e55933b ENH: Strengthened EXECUTE_PROCESS output check test. 2006-02-10 11:47:18 -05:00
Brad King
9787e55ee8 ENH: Added test for new EXECUTE_PROCESS command. 2006-02-03 17:09:35 -05:00
Bill Hoffman
2c73d2e0f3 ENH: add new cmakedefine01 feature from bug report 2603 2006-01-03 16:40:51 -05:00
Andy Cedilnik
e37d8867b8 BUG: Flush the EXECUTABLE and LIBRARY output path to internal 2006-01-02 14:33:16 -05:00
Ken Martin
ba3b7c1588 ENH: added testing of the WHILE command 2005-06-30 13:39:38 -04:00
Ken Martin
859b517518 ENH: remove requirements on 1.2 2005-06-08 14:11:25 -04:00
Ken Martin
2e4258efc1 ENH: shift to using ADD_SUBDIRECTORY 2005-06-08 12:26:32 -04:00
Brad King
16b9edd17b ENH: Added partial test for include regular expressions. 2005-02-07 16:18:02 -05:00
Andy Cedilnik
28f6e1b194 ENH: Add ARGV and ARGN support to MACRO command. ARGV is the list of all arguments and ARGN is the list of all nonexpected arguments 2004-04-29 17:41:33 -04:00
Ken Martin
c63c23a617 added tests for var args with macros 2004-04-26 11:12:19 -04:00
Andy Cedilnik
23a154941b ENH: Add test for REMOVE_DEFINITION 2004-04-15 13:59:29 -04:00
Bill Hoffman
5523c4a967 BUG: fix the test 2003-08-07 16:54:45 -04:00
Bill Hoffman
7e54a53a3d ENH: improve coverage 2003-08-07 16:07:23 -04:00
Andy Cedilnik
b133b832fd Remove bogus flags from cmStandardIncludes and make complex test pass 2003-03-26 10:45:23 -05:00
Bill Hoffman
486da564ef ENH: add a better test for lib deps 2003-02-03 13:31:31 -05:00
Bill Hoffman
c4fa5d1fdf ENH: add a new command that allows exports of library dependencies from a project to a file 2003-01-20 16:59:02 -05:00
Bill Hoffman
bd2739feec BUG: fix for backwards compatibility 2002-12-20 11:20:14 -05:00
Brad King
526649127e ENH: Added test for generated header included by non-generated source. 2002-12-13 17:35:00 -05:00
Brad King
5203a92ef1 BUG: Can't double-quote foreach arguments. 2002-12-12 10:10:34 -05:00
Brad King
6ab16695d0 BUG: Fixed STRING(REGEX REPLACE ...) and added better test. 2002-11-06 18:05:39 -05:00
Brad King
42c464c05e ENH: Added STRING command. 2002-11-06 17:35:27 -05:00
Ken Martin
aef8110c36 added test of SET CACHE FORCE 2002-10-09 15:54:34 -04:00
Ken Martin
4918ce6593 Remove bogus exec_program 2002-10-01 12:59:18 -04:00
Andy Cedilnik
2f1052b0e5 Use cmake echo 2002-09-27 17:16:03 -04:00
Ken Martin
ae6e90e872 added new form of Set source file properties command 2002-08-26 15:20:47 -04:00
Bill Hoffman
85d1fc1425 no more dll for plugin 2002-08-23 16:25:41 -04:00
Bill Hoffman
40cf734152 BUG: fix for borland and a shared CMakeLib 2002-08-22 17:06:05 -04:00