634 Commits

Author SHA1 Message Date
Brad King
9bcaff02ff Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
Conflicts:
	Source/QtDialog/CMakeSetupDialog.cxx
2010-12-17 10:31:19 -05:00
Brad King
bfb7288f81 Record backtrace in cmCustomCommand
This will be used to report custom command errors to the user with a
backtrace pointing at the add_custom_command or add_custom_target call.
2010-12-15 14:53:24 -05:00
Brad King
999ce0aa9c Document target_link_libraries target scope (#11058)
The target_link_libraries command requires its first argument to be a
target in the current directory.  Document this and update the error
message to be more specific.  While at it, format the error message with
a call stack.
2010-12-15 12:18:59 -05:00
Brad King
0621362668 Fix dependency tracing of INSTALL and PACKAGE (#11598)
Commit e01cce28 (Allow add_dependencies() on imported targets,
2010-11-19) started using cmMakefile::FindTargetToUse to follow
dependencies, including those of GLOBAL_TARGETs like INSTALL and
PACKAGE.  Since global targets exist in every directory, dependencies
between them must be traced within each directory too.

Teach FindTargetToUse to check the current directory before checking
globally.  For global targets this will find the local copy.  For for
normal targets this will be a no-op because they are globally unique.
2010-12-13 12:56:47 -05:00
Ben Boeckel
8e8c9e4924 Don't check at destruction for usage 2010-12-07 16:38:37 -05:00
Ben Boeckel
668e005db5 Use cmake::IssueMessage for warnings 2010-12-07 16:38:25 -05:00
Ben Boeckel
88cd4c1e92 Use 'CMake Warning' versus 'warning' for CDash 2010-12-07 14:40:21 -05:00
Ben Boeckel
3c3b98ddd3 Initialize the class before setting warn flags
Since Initialize sets variables that we don't want to warn about, don't
leak the original class' settings.
2010-12-03 12:52:36 -05:00
Ben Boeckel
cf8b15a5c1 Ignore files under the CMakeFiles directory 2010-12-03 12:49:37 -05:00
Ben Boeckel
fd50f06b21 Don't check for unused vars at configure time
The generate step should catch all of them.
2010-12-02 16:57:30 -05:00
Ben Boeckel
c18c977ce8 When checking for variables, specify a reason
Allow reasons to begiven for checking for unused variables.
2010-11-15 10:32:15 -05:00
David Cole
b0fb2ad3e1 Merge topic 'AddCMAKE_CURRENT_LIST_DIR'
b011840 Use absolute path to FindPackageHandleStandardArgs.cmake everywhere
41e4f1a Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
f9fc79c Remove trailing whitespace
2010-10-19 15:53:16 -04:00
Ben Boeckel
3f1121f722 Use a long int since Line is a long as well 2010-10-08 13:49:39 -04:00
Ben Boeckel
8dbb2090a2 Wrong boolean value for CLI warnings 2010-10-07 12:28:25 -04:00
Ben Boeckel
d4ee998b61 Hard-code the --no-warn-unused-cli flag 2010-10-07 12:22:00 -04:00
Ben Boeckel
82ed104dcb Flag that the directories have been set 2010-10-05 13:45:34 -04:00
Ben Boeckel
367e5c37bb Revert "Revert "When calling CMake, set the args and the cache""
This reverts commit ab5d4e43d9a9ddde24a242092a0d5e5f9a6cbd01.
2010-10-05 12:27:37 -04:00
Ben Boeckel
ab5d4e43d9 Revert "When calling CMake, set the args and the cache"
This reverts commit 9b90040edba1f89395295c27cd9919b0d5efd30b.
2010-10-01 16:52:16 -04:00
Ben Boeckel
9b90040edb When calling CMake, set the args and the cache 2010-10-01 13:44:55 -04:00
Bill Hoffman
3d68dd230d Fix for bug #11274, VS10 custom commands that create files in INTDIR fix. 2010-09-29 17:02:04 -04:00
Alex Neundorf
41e4f1a210 Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
Comes with a simple test and docs.

Alex
2010-09-28 22:10:47 +02:00
Alex Neundorf
f9fc79cac5 Remove trailing whitespace
Alex
2010-09-28 21:44:22 +02:00
Ben Boeckel
535253f385 Initialize the warning variables earlier 2010-09-22 12:46:15 -04:00
Ben Boeckel
cbb286c0b2 Fix the path detection to work for top-level 2010-09-22 12:46:15 -04:00
Ben Boeckel
62be1f78ae Initialize the usage stack earlier 2010-09-22 12:46:15 -04:00
Ben Boeckel
c6e7fabc0f Factor out the checks for unused variables 2010-09-22 12:46:15 -04:00
Ben Boeckel
5e41ba8e4a When using the API, check for Add vs. Remove 2010-09-17 10:13:19 -04:00
Ben Boeckel
2c82f2b759 Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage 2010-09-16 17:50:07 -04:00
Ben Boeckel
bef3aeebab Use the API so that warnings can be tracked 2010-09-16 16:06:16 -04:00
Ben Boeckel
05cb0f4daf Check for unused variables in the dtor 2010-09-16 16:05:59 -04:00
Ben Boeckel
ca90f673a0 Fix detection of unused variables when setting 2010-09-16 13:53:41 -04:00
Ben Boeckel
995cfb0e2a Don't warn if the variable wasn't defined 2010-09-16 13:52:17 -04:00
Ben Boeckel
a8e97f8a08 Remove VarRemoved code since it's been superceded 2010-09-16 13:50:39 -04:00
Ben Boeckel
59463ef1a3 Rework CheckVariableForUnused usage 2010-09-16 11:50:57 -04:00
Ben Boeckel
f117423336 Fix line lengths to be no more than 78 2010-09-16 11:49:58 -04:00
Ben Boeckel
e49a935c20 Improve unused warning logic
Only warn when changing the definition of an initialized variable.
2010-09-15 11:41:27 -04:00
Ben Boeckel
02a114dfe8 Add method to allow variables to be marked as used 2010-09-15 11:34:35 -04:00
Ben Boeckel
ae3eff35b4 Fix the path used for ignoring system warnings 2010-09-14 17:14:25 -04:00
Ben Boeckel
056b44113f Fix missing case for usage of a variable 2010-09-14 17:10:22 -04:00
Ben Boeckel
980e048a7d Factor out checks for unused variables 2010-09-14 17:10:04 -04:00
Brad King
b06fb16684 No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)
Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE
into cmMakefile::GetConfigurations.  Read the former only in
multi-config generators.
2010-09-08 14:54:49 -04:00
Ben Boeckel
3801463c9f Use built-ins for readability and maintainability 2010-09-08 12:03:42 -04:00
Ben Boeckel
8b520158c3 Push the initialize and unused states when copying 2010-09-07 15:12:15 -04:00
Ben Boeckel
300fc15779 Fix detection of system files
Instead of looking to see if the file is under CMAKE_ROOT, check to see
if it is instead under the source or binary directories in use.
2010-09-02 11:33:34 -04:00
Ben Boeckel
d784e6af4d Run the unused variables check on the final pass 2010-09-02 11:29:05 -04:00
Ben Boeckel
74997000c8 Add a flag to warn about system files 2010-09-01 13:09:08 -04:00
Ben Boeckel
fff9f6d6f7 Rename flags again and use variablewatch for cli 2010-09-01 13:09:08 -04:00
Ben Boeckel
636e6c4ef7 Default to marking things as used
If we don't then:

    cmake --warn-unused --warn-unused-all

acts differently than:

    cmake --warn-unused-all --warn-unused
2010-09-01 13:08:15 -04:00
Ben Boeckel
4ff03402fc Rename find-unused to warn-unused 2010-09-01 13:08:14 -04:00
Ben Boeckel
e141bc950a Detect unused variables 2010-09-01 13:08:14 -04:00