summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-27 20:34:07 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-01-27 20:34:07 (GMT)
commit182eb7c7eff70bc5af6ca77adf15b59e87400f2f (patch)
treed4a2bd71cb9993e6d354e8913444baf0d3a9255f /Modules
parent451c5f61c26fc1db154605dc5e4b1c07d584b24b (diff)
parentdd2f81491e6e17681dd18882a8ccfa01fa32a3f7 (diff)
downloadCMake-182eb7c7eff70bc5af6ca77adf15b59e87400f2f.zip
CMake-182eb7c7eff70bc5af6ca77adf15b59e87400f2f.tar.gz
CMake-182eb7c7eff70bc5af6ca77adf15b59e87400f2f.tar.bz2
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake18
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake4
2 files changed, 19 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index ed0b6fb..7f918e6 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -24,10 +24,18 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Compile the ABI identification source.
SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
+ SET(CMAKE_FLAGS )
+ IF(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
+ SET(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
+ ENDIF()
TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
- CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}"
+ CMAKE_FLAGS "${CMAKE_FLAGS}"
"-DCMAKE_${lang}_STANDARD_LIBRARIES="
+ # We need ignore these warnings because some platforms need
+ # CMAKE_${lang}_STANDARD_LIBRARIES to link properly and we
+ # don't care when we are just determining the ABI.
+ "--no-warn-unused-cli"
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${BIN}"
)
@@ -58,10 +66,16 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
SET(implicit_dirs "")
SET(implicit_libs "")
+ SET(MULTI_ARCH FALSE)
+ IF(DEFINED CMAKE_OSX_ARCHITECTURES)
+ IF( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
+ SET(MULTI_ARCH TRUE)
+ ENDIF()
+ ENDIF()
IF(CMAKE_${lang}_VERBOSE_FLAG
# Implicit link information cannot be used explicitly for
# multiple OS X architectures, so we skip it.
- AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
+ AND NOT MULTI_ARCH
# Skip this with Xcode for now.
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index bf78a5b..9a3884a 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -243,7 +243,9 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
-
+ IF(NOT DEFINED CMAKE_EXECUTABLE_FORMAT)
+ SET(CMAKE_EXECUTABLE_FORMAT)
+ ENDIF()
# Return the information extracted.
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)