Commit Graph

1509 Commits

Author SHA1 Message Date
Eric NOULARD b8da1a1378 Avoid foreach IN LISTS syntax which is not supported by CMake 2.6 2011-01-31 17:25:29 +01:00
Eric NOULARD 92ced20fa1 CPack Tests the different ways of packaging components 2011-01-30 13:11:25 +01:00
Brad King ecfe0f7ca8 Merge topic 'fix-11695-spaces-in-vs10-rc-defs'
008d116 VSResource: Avoid windres /D with quoted spaces (#11695)
8f9919d Avoid space in rc /D values for VS6 and Cygwin (#11695)
78fe97f Fix line too long KWStyle issue (#11695)
6627560 VS10: Escape double quote chars in defines for rc files (#11695)
2011-01-28 14:17:54 -05:00
Brad King ba718fb827 Merge topic 'avoid-purify-in-CTestTest2'
2b082aa CTestTest2: Avoid running purify unless requested
2011-01-28 14:17:44 -05:00
Brad King 7457a0fd80 Merge topic 'MakeCMakeBuildWithCMakeLess263'
ccbdc24 Make cmake build again with cmake < 2.6.3
2011-01-28 14:17:12 -05:00
David Cole 008d116b17 VSResource: Avoid windres /D with quoted spaces (#11695)
Improve test: print out what's happening along the way.
2011-01-27 18:28:36 -05:00
Brad King 182eb7c7ef Merge topic 'dev/strict-mode'
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 Revert "Revert "When calling CMake, set the args and the cache""
ab5d4e4 Revert "When calling CMake, set the args and the cache"
9b90040 When calling CMake, set the args and the cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
2011-01-27 15:34:07 -05:00
Brad King dd2f81491e Merge branch 'dev/add_test-working-directory' into dev/strict-mode
Conflicts:
	Tests/CMakeLists.txt
2011-01-27 14:39:55 -05:00
David Cole 2b082aa353 CTestTest2: Avoid running purify unless requested 2011-01-27 14:36:14 -05:00
Alex Neundorf ccbdc24ae1 Make cmake build again with cmake < 2.6.3
cmake_minimum_required() still says 2.4.5, but in Tests/CMakeLists.txt
there was a parenthesis expression, which is new since 2.6.3.

Alex
2011-01-26 21:52:22 +01:00
Brad King 0159424fda Merge topic 'dev/add_test-working-directory'
d94f9c6 Only set the property if the property was given
b6c302b Default the working dir to the current binary dir
0594287 Add more tests for WorkingDirectory for tests
2011-01-26 15:23:05 -05:00
David Cole 8f9919d93c Avoid space in rc /D values for VS6 and Cygwin (#11695)
Change to the test only. Using a space in an rc /D value will
not work at present with VS6 or Cygwin rc compilers.
2011-01-26 08:26:31 -05:00
David Cole 662756036e VS10: Escape double quote chars in defines for rc files (#11695)
To get rc defines to work in the VS10 IDE requires \" when
constructing PreprocessorDefinitions strings. This is different
than defines for cl.

Also, per-file rc defines were not being generated. Fix that, too.
2011-01-25 19:01:13 -05:00
Ben Boeckel 0594287606 Add more tests for WorkingDirectory for tests 2011-01-20 13:47:53 -05:00
Brad King 6c075284f6 Merge topic 'test-SubDirSpaces-workaround-gnu-make-3.82'
19cb2ca Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
2011-01-19 14:28:05 -05:00
Brad King ab8ea7c413 Merge topic 'resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout'
aeb6cd8 Merge branch 'honor-explicit-zero-timeout' into resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout
20d87c8 Teach Simple_Mingw_Linux2Win test to use windres
2011-01-19 14:03:41 -05:00
Brad King 7af41c3492 Test that missing source mentions directory (#11677)
Teach the MissingSourceFile test to verify that the directory portion of
a missing source file is mentioned in the error message.
2011-01-15 08:16:50 -05:00
Brad King aeb6cd8a89 Merge branch 'honor-explicit-zero-timeout' into resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout
Conflicts:
	Tests/CMakeLists.txt
2011-01-14 10:44:41 -05:00
Brad King 20d87c8026 Teach Simple_Mingw_Linux2Win test to use windres
This test was broken by commit b2f308c8 (Add support for windows
resources with mingw/msys, 2010-12-22) because the test does not set a
resource compiler which is now required on MinGW for the 'RC' language.
Use windres as the resource compiler for the test.
2011-01-14 10:22:15 -05:00
Brad King 729db484ef Fix ArgumentExpansion test expected results
Teach the ArgumentExpansion test to expect flattened lists as has always
been the case in the CMake language.  Now that the test should pass
enable the failure regex even when CMAKE_STRICT is not on.  Replace the
reference to the old ArgumentExpansion test behavior in the workaround
comment in cmMakefile::TryCompile with a full inline explanation.
2011-01-11 17:10:28 -05:00
Brad King 7decc70eea Merge topic 'build_nightly_from_nightly_branch'
faf1c1e Change the nightly tests to build from the nightly branch and not next.
2011-01-11 15:52:52 -05:00
Brad King 9a81f0dd0c Merge topic 'ep-fix-substitutions'
d67a513 ExternalProject: Replace location tags in CMAKE_CACHE_ARGS
d7a87b5 Merge branch 'ep-log-output-under-vs' into ep-fix-substitutions
2011-01-11 15:52:36 -05:00
Brad King 764015c284 Merge topic 'policy-CMP0017'
ce28737 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017
7db8db5 Improve documentation and messages for the new CMP0017
db44848 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
1e69c6f Merge branch 'user-policy-defaults' into policy-CMP0017
65a0a2a Merge branch 'include-command-whitespace' into policy-CMP0017
2011-01-11 15:52:13 -05:00
Brad King d4ed72e3bb Merge topic 'user-policy-defaults'
a364daf Allow users to specify defaults for unset policies
8e45c11 Fix indentation in cmPolicies::ApplyPolicyVersion()
2011-01-11 15:52:07 -05:00
Brad King af94289f5a Merge topic 'fix-11461-add-midl-vs10'
e33cbda VSMidl Test: Use correct include_directories with VS6 (#11461)
262da91 Prohibit space in HOME value for VSMidl test.
13caaa3 VS10: Finish Midl support (#11461)
2011-01-11 15:51:08 -05:00
David Cole 5a9e8e701e CPack: Add CPACK_NSIS_INSTALL_ROOT variable (#9148)
Control the root directory of the default directory presented to
the end user of an NSIS installer by a CPack variable.

Previously, the value used in the NSIS script was $PROGRAMFILES,
which is equivalent to the "ProgramFiles" environment variable.
That default value is still the same, but now a project may
override the value by setting this new variable.
2011-01-11 15:42:42 -05:00
Brad King 19cb2ca47f Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
GNU Make 3.82 incorrectly parses make dependencies involving parentheses
in path names.  See related upstream issue:

  http://savannah.gnu.org/bugs/?30612

Skip testing the ()-named subdirectory.
2011-01-11 10:01:30 -05:00
David Cole 1bbe4e6917 CPack: Detect more URLs in CPACK_NSIS_MENU_LINKS (#10644)
Previously, only strings containing "http:" qualified as
URLs when found in CPACK_NSIS_MENU_LINKS. Now, we use a
regex to detect strings beginning with any of the following:

  ftp://
  ftps://
  http://
  https://
  news://
  mailto:

This commit also moves the caller of CreateMenuLinks outside
the "if (cpackPackageExecutables)" block, allowing clients to
use CPACK_NSIS_MENU_LINKS without also having CPACK_PACKAGE_EXECUTABLES
defined. That bit of this commit fixes the remainder of the
issue described in http://public.kitware.com/Bug/view.php?id=7828

Also, added a set(CPACK_NSIS_MENU_LINKS ...) to the CPackComponents
test to enable verifying that all of this actually works.
2011-01-07 14:24:04 -05:00
Bill Hoffman faf1c1e49f Change the nightly tests to build from the nightly branch and not next.
This will make sure that the nightly test matches the dashboard nightly section.
When it was next, it used next from when the test was run.
2011-01-07 13:50:36 -05:00
David Cole d67a513447 ExternalProject: Replace location tags in CMAKE_CACHE_ARGS
When we added CMAKE_CACHE_ARGS, we did not try it with any
<SOURCE_DIR> or <INSTALL_DIR> references. This commit fixes
that accidental omission.
2011-01-07 08:04:16 -05:00
David Cole e33cbda5c4 VSMidl Test: Use correct include_directories with VS6 (#11461)
VS6 builds put midl output directly in CMAKE_CURRENT_BINARY_DIR.
Adjust test include_directories to match. Fixes test failure
on dashboard machine DASH3.
2011-01-06 09:12:20 -05:00
David Cole 262da91e26 Prohibit space in HOME value for VSMidl test.
Some Windows machines actually define HOME in their
environment. And some of them actually put a directory
with a space in the name as the value.

Make sure the HOME value (CMake variable) in this CMakeLists
file does not contain a space.
2011-01-05 11:30:12 -05:00
David Cole 13caaa3eb7 VS10: Finish Midl support (#11461)
This commit addresses all of the following:
  http://public.kitware.com/Bug/view.php?id=8165
  http://public.kitware.com/Bug/view.php?id=10687
  http://public.kitware.com/Bug/view.php?id=11311
  http://public.kitware.com/Bug/view.php?id=11461

With this commit, the midl support for VS10 is as
complete as midl support ever was for VS9 and earlier.
The VSMidl test should run on all Visual Studio
generator based dashboards.

CMake no longer sends C++ compiler /D flag values
to the midl compiler in Visual Studio generated
projects. I think if we want to add that in the
future, we should add a way to pass midl compiler
specific flags and perhaps an optional way to add
in the C++ definitions, too. For now, not sending
them along gets past the immediate problem wherein
idl files in a CMake VS generated project just didn't
work at all.

The VSMidl test added in this commit was inspired by
the patch attached to 8165.

The test had to be modified such that it will run in
a directory whose name contains no spaces. There is an
existing bug filed against VS10's midl asking Microsoft
to fix that problem. But for now, the test added in this
commit works by copying the source directory to a location
that avoids spaces in the directory names.

Inspired-By: Robert Lenhardt
2011-01-05 10:37:14 -05:00
Brad King d04e10dd7e Merge topic 'negative-test-costs'
6b0c7de Support explicitly set test costs in non-parallel testing.
2011-01-04 15:46:16 -05:00
Brad King 70950edde0 Merge topic 'honor-explicit-zero-timeout'
51bb493 Test TIMEOUT property explicitly set to zero should be honored
2011-01-04 15:46:07 -05:00
Brad King 45b61209f9 Merge topic 'vs-force-multiple-include'
b29eadd Map multiple /FI flags for VS < 10 (#11649)
2011-01-04 15:45:51 -05:00
Brad King 2bb193a7f2 Merge topic 'dev/add_test-working-directory'
6529d7f Pass the expected value as the first argument
2011-01-04 15:45:41 -05:00
Brad King fff676d8cd Merge topic 'make-install-test-serial'
bce24e1 Avoid running CMake.Install test simultaneously with other tests
2011-01-04 15:45:14 -05:00
Brad King cc6ae138d9 Merge topic 'add-trilinos-contract-test'
8113621 Establish pass criteria for the Trilinos contract test.
7348561 Use m prefix in shorttag value to indicate "md5 of tarball"
c8ac930 Add contract test for Trilinos 10.6.1 snapshot.
2011-01-04 15:44:18 -05:00
Brad King 3556ab9f72 Merge topic 'add_support_for_windres'
971692c Build enable_language command during bootstrap
960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
060d6e8 Add support for windres to cygwin.
b2f308c Add support for windows resources with mingw/msys.
2011-01-04 15:44:07 -05:00
Brad King f1d7a5600f Merge topic 'add_preprocessor_def_vs2010_resources'
8c7b19d Only run resource test for MSVC compilers.
753e208 Disable incremental testing for this test, it crashes vs9 linker.
16e7d4b Add flags to resource builds on vs 2010 with a test.
2011-01-04 15:44:01 -05:00
Alex Neundorf 7db8db5b72 Improve documentation and messages for the new CMP0017
This patch incorporates the comments from Brad:
-some improvements to the documentation of CMP0017
-make the test QUIETLY search for zlib
2011-01-04 08:19:33 -05:00
Alex Neundorf db44848f44 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
This patch makes include() and find_package() prefer cmake files
located in CMAKE_ROOT over those in CMAKE_MODULE_PATH.
This makes sure that the including file gets that file included
which it expects, i.e. the one from cmake with which it was tested.
It only changes behaviour when such an included file exists both
in CMAKE_MODULE_PATH and in CMAKE_ROOT.
This comes together with a new policy CMP0017, with default
behaviour it behaves as it always did, but warns.
With NEW behaviour it includes the file from CMAKE_ROOT
instead from CMAKE_MODULE_PATH. This fixes (if CMP0017 is set)
building KDE 4.5 with cmake >= 2.8.3.
Also a basic test for this policy in included.
2011-01-04 08:06:20 -05:00
Brad King a364daf1fd Allow users to specify defaults for unset policies
Check CMAKE_POLICY_DEFAULT_CMP<NNNN> for a default when policy CMP<NNNN>
would otherwise be left unset.  This allows users to set policies on the
command line when the project does not set them.  One may do this to
quiet warnings or test whether a project will build with new behavior
without modifying code.  There may also be cases when users want to
build an existing project release using new behavior for policies
unknown to the project at the time of the release.
2011-01-04 07:46:10 -05:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -05:00
Zach Mullen 6b0c7ded57 Support explicitly set test costs in non-parallel testing. 2011-01-03 11:25:46 -05:00
Brad King b29eadd8f3 Map multiple /FI flags for VS < 10 (#11649)
The /FI flag may be repeated so the flag table entry needs to be marked
with SemicolonAppendable.  This was already the case for VS 10.
2011-01-03 10:02:16 -05:00
Ben Boeckel 6529d7f67e Pass the expected value as the first argument
When the path has regular expression special characters, the
PASS_REGULAR_EXPRESSION value can fail to compile.
2011-01-03 08:39:22 -05:00
David Cole bce24e14b8 Avoid running CMake.Install test simultaneously with other tests 2010-12-31 09:18:52 -05:00
Brad King 97c5171d6c Merge topic 'dev/add_test-working-directory'
667a90a Fix sentence break in add_test documentation
96309fc Make TestsWorkingDirectory test a C file
a4a5e37 Use iostream to make Borland happy
cfe53cd Fully specify the path to old-signature add_test
017d4e9 Group adding tests with its properties
561cc33 Only test the default cwd with Makefiles
d87bae7 Simplify the _default_cwd derivation
992c74f Use --><-- markers to denote the path
5249551 Flip slashes around on Windows
0a014da Add ctype.h include for toupper()
af12f83 Fix header includes for C++ and Visual Studio
5597aa2 Rename the project to match the test
9bf4165 Add tests for WORKING_DIRECTORY arg to add_test
42de5d0 Add WORKING_DIRECTORY argument to add_test
7679f9f Rename WorkingDirectory test
d95f817 Add the WORKING_DIRECTORY property to tests
2010-12-28 15:25:49 -05:00