summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'dev/strict-mode'Brad King2011-01-271-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Merge branch 'dev/add_test-working-directory' into dev/strict-modeBrad King2011-01-271-23/+14
| |\ | | | | | | | | | | | | Conflicts: Tests/CMakeLists.txt
| * | CMAKE_DO_TRY_COMPILE is no longer usedBen Boeckel2010-09-141-3/+1
| | |
* | | Merge topic 'outdir-CMAKE_USER_MAKE_RULES_OVERRIDE'Brad King2011-01-261-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | 5792d3a Always place try_compile executables predictably (#11724) a5300f1 Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
| * | | Always place try_compile executables predictably (#11724)Brad King2011-01-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Set CMAKE_RUNTIME_OUTPUT_DIRECTORY explicitly in try_compile projects so that the COPY_FILE feature knows where to look. This makes the feature robust against CMAKE_USER_MAKE_RULES_OVERRIDE files that set variables like CMAKE_RUNTIME_OUTPUT_DIRECTORY or EXECUTABLE_OUTPUT_PATH.
* | | | Merge topic 'fix-try_compile-source-language-issue-11731'Brad King2011-01-261-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 699a725 Use shortest extension to verify try_compile language (#11731)
| * | | | Use shortest extension to verify try_compile language (#11731)Brad King2011-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the source-file form of try_compile is given a file name with multiple '.' characters such as "a.b.c" use only the shortest extension to check the language. This is the expected behavior and is consistent with normal language extension determination in the method cmSourceFileLocation::UpdateExtension.
* | | | | Merge topic 'improve-try_compile-error-messages'Brad King2011-01-261-36/+32
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | 1bee6b1 Improve try_compile and try_run error messages
| * | | Improve try_compile and try_run error messagesBrad King2011-01-201-36/+32
| | | | | | | | | | | | | | | | Use IssueMessage to give the messages context and better formatting.
* | | | Merge topic 'try_compile-RemoveFile'Brad King2010-12-161-21/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 097294e Fix try_compile RemoveFile anti-virus loop (#11503)
| * | | | Fix try_compile RemoveFile anti-virus loop (#11503)Brad King2010-12-031-21/+11
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Commit 3827991e (...fix...not being able to remove try compile code, 2008-03-26) introduced a loop of RemoveFile attempts to overcome anti-virus locks on recently created try_compile executables. Fix the logic in this loop to work when the file is already missing.
* | | | Write full version into try_compile CMakeListsBrad King2010-12-141-2/+3
|/ / / | | | | | | | | | | | | | | | Pass the full version to cmake_minimum_required(VERSION) in generated CMake files for try_compile projects. This tells CMake not to use any backward compatibility behavior while processing code it generates.
* | | Use same type in both cases of '?:' operatorBrad King2010-06-291-1/+1
| |/ |/| | | | | | | | | Both possible result values need to be convertible to the same type. Some compilers fail to recognize that they can construct std::string from the empty string literal, so state it explicitly.
* | Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile (#10902)David Genest2010-06-291-0/+17
|/
* Fix try_compile when file cannot be foundBrad King2009-10-281-1/+2
| | | | | | The try_compile() command's COPY_FILE option should not try to actually copy the file if it cannot be found. Some C runtime library's fopen cannot handle an empty file name.
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* No /fast targets in try_compile project modeBrad King2009-08-041-0/+1
| | | | | | | | The try_compile command builds the cmTryCompileExec executable using the cmTryCompileExec/fast target with Makefile generators in order to save time since dependencies are not needed. However, in project mode the command builds an entire source tree that may have dependencies. Therefore we can use the /fast target approach only in one-source mode.
* BUG: fix for #0009051 CMake does not pass CMAKE_OSX_SYSROOT and ↵Bill Hoffman2009-05-191-0/+14
| | | | CMAKE_OSX_DEPLOYMENT_TARGET when running TRY_COMPILE
* ENH: Emit a little more information in the error message when the output ↵David Cole2009-01-291-1/+8
| | | | file is not found during a core try compile.
* STYLE: Emit filenames in try_compile error message to get more information ↵David Cole2009-01-271-1/+5
| | | | from the Continuous dashboard test that is failing.
* ENH: make sure numAttempts is incrementedBill Hoffman2008-03-261-0/+1
|
* ENH: try to fix dashboard issue with not being able to remove try compile codeBill Hoffman2008-03-261-3/+19
|
* BUG: Change generated try-compile projects to use cmake_minimum_required ↵Brad King2008-03-191-1/+1
| | | | instead of cmake_policy to set the version now that CMP0000 requires it.
* BUG: Generated try-compile CMakeLists.txt file should call cmake_policy with ↵Brad King2008-03-071-1/+2
| | | | the current version of CMake, not just 2.6.
* ENH: make sure policy is set in generated cmakelist filesBill Hoffman2008-03-061-0/+1
|
* ENH: for try compile do not put the rules to rebuild the project with cmake ↵Bill Hoffman2007-12-061-0/+1
| | | | inside it. This has caused infinite loops of builds in some cases, and it is just a waste of time anyway.
* ENH: determine typesize by compiling a file and reading strings from the ↵Alexander Neundorf2007-06-041-5/+22
| | | | | | | | | compiled output. Tested with various gcc, XCode, MSVC7, sdcc For OSX when doing TRY_COMPILE() CMAKE_OSX_ARCHITECTURES is used, if there are different results an error is generated. CMAKE_OSX_ARCHITECTURES can be overwritten for the TRY_COMPILES with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES. Alex
* ENH: add COPY_FILE argument to TRY_COMPILE, so the compiled executable canAlexander Neundorf2007-05-241-0/+32
| | | | | | be used e.g. for getting strings out of it. Alex
* ENH: add two simple tests for TRY_RUN()Alexander Neundorf2007-05-241-0/+376
STYLE: create a new base class cmCoreTryCompile, from which cmTryCompileCommand and cmTryRunCommand are derived, so there are no public static functions with lots of arguments anymore Alex