summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a cmGlobalGenerator::ResolveLanguageCompiler functionPeter Collingbourne2011-10-021-0/+73
| | | | | | It is factored out of cmGlobalUnixMakefileGenerator3::EnableLanguage, and may be used by other generators to resolve CMAKE_*_COMPILER settings.
* Merge topic 'UsingCMakeLikePkgConfig2'David Cole2011-08-251-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 59238dc Fix --find-package mode on Cygwin, where enable_language(RC) is called 98472e4 Require the current cmake version in --find-package mode a6ccf3c Use $(CXXFLAGS) and $(LDFLAGS) in the --find-package test Makefile 4386918 Fix line length 7d69310 Only enable the test when using GNU make 3011149 Make the test harder by always having a space in the include dirs ab57ff6 Make the --find-package test harder 626fc71 Much improved test, should now be executed on all UNIXes ec6982d Disable any STATUS output in --find-package mode e552ae7 Dont check for -isysroot and -mmacosx-version on OSX in --find-package mode e589589 Rename helper macros print_compile_flags() to set_compile_flags_var() aecfc1f Fix test on OpenBSD with BSD make 6bb4ca3 The makefile for the test was kindof wrong fd15b5e Only run the test if we are using a makefile generator under UNIX 9fc87c6 Add a test for the new --find-package mode d3ae0ff Improve documentation for --find-package mode bf07375 Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfig b0e3578 Use the file-utility to test for 64bit if there is no /usr/lib64 53edfb2 Better support for lib64 and Debian multiarch b8fdaa1 Fix copyright notice in new CMakeFindPackageMode.cmake 7690edf Replace cmake::GetScriptMode() with GetWorkingMode() e4f603b Implement find-package mode of cmake a91d662 Add find-package mode, which does nothing yet b976e70 Make clLocalGenerator::GetTargetFlags() public
| * Replace cmake::GetScriptMode() with GetWorkingMode()Alex Neundorf2011-08-091-1/+1
| | | | | | | | | | | | | | GetWorkingMode() returns a new enum WorkingMode, which is one of NORMAL_MODE, SCRIPT_MODE and FIND_PACKAGE_MODE. Alex
* | Fix bootstrap test with automocAlex Neundorf2011-08-171-0/+2
| | | | | | | | Alex
* | Move automoc processing from add_executable/library to cmGlobalGeneratorAlex Neundorf2011-08-151-0/+32
| | | | | | | | | | | | | | Now automoc is enabled by setting the AUTOMOC target property to true, instead of using the AUTOMOC keyword in add_executable() or add_library() Alex
* | Remove trailing whitespaceAlex Neundorf2011-08-151-14/+14
| | | | | | | | Alex
* | RunSingleCommand: Replace verbose boolean with enumJohan Björk2011-07-281-3/+3
|/ | | | | No behaviour change, this prepares for adding a flag to skip the merging of output streams.
* Refine unused cache variable warningBrad King2011-03-241-2/+0
| | | | | List all unused variables in one warning. Cleanup implementation to run the check exactly once at the end of generation.
* Merge topic 'dev/strict-mode'Brad King2011-01-271-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+4
| |\ | | | | | | | | | | | | Conflicts: Tests/CMakeLists.txt
| * \ Merge branch 'ImprovedDotSupport2' into dev/strict-modeBrad King2010-12-171-2/+3
| |\ \ | | | | | | | | | | | | | | | | Conflicts: Source/cmake.cxx
| * \ \ Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-modeBrad King2010-12-171-12/+60
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: Source/QtDialog/CMakeSetupDialog.cxx
| * | | | Check for unused variables at the end of generateBen Boeckel2010-11-151-0/+2
| | | | |
* | | | | Merge topic 'recursive-CMAKE_USER_MAKE_RULES_OVERRIDE'Brad King2011-01-261-10/+34
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | c83a834 try_compile: Allow only languages loaded in caller (#11469)
| * | | | | try_compile: Allow only languages loaded in caller (#11469)Brad King2011-01-241-10/+34
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During a try_compile cmGlobalGenerator::EnableLanguage uses results from the outer project. Reject attempts to enable languages in the test project that are not "ready" in the outer project. Mark a language as "ready" when all its information has been loaded and we are ready to generate build rules. This also avoids infinite recursion introduced by commit 295b5b60 (Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile, 2010-06-29) for projects that set CMAKE_USER_MAKE_RULES_OVERRIDE to a file that uses try_compile. The file is loaded along with the information for a given langauge so the language is not yet "ready".
* | | | | Merge topic 'custom-command-generator-expressions'Brad King2010-12-211-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4499d50 Mark CustomCommand test perconfig.out as SYMBOLIC f0cdb60 Introduce "generator expression" syntax to custom commands (#11209) 4749e4c Record set of targets used in cmGeneratorExpression ef9e9de Optionally suppress errors in cmGeneratorExpression 45e1953 Factor per-config sample targets out of 'Testing' test 4091bca Factor generator expression docs out of add_test bfb7288 Record backtrace in cmCustomCommand
| * | | | Record backtrace in cmCustomCommandBrad King2010-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Remove unused GLOBAL_TARGET generation codeBrad King2010-12-131-20/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | Remove a boolean parameter of cmGlobalGenerator::CreateGlobalTarget that is never set to true anymore. Remove global target "consolidation" loop because no global targets exist before it runs anymore.
* | | | Merge topic 'vs8-direct-depends'David Cole2010-11-161-3/+2
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | 1a0c166 Store direct dependencies in solutions for VS >= 8
| * | | Store direct dependencies in solutions for VS >= 8Brad King2010-09-101-3/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | Since commit bc43b0f2 (Do not link library dependencies in VS solutions, 2009-10-20) CMake disables for VS >= 8 linking of a target to libraries that happen to be listed as solution-level dependencies. Therefore we can list the direct dependencies of each target in the solution file and let VS handle transitive dependencies automatically.
* | | Merge topic 'vs-project-groups'Brad King2010-10-051-2/+3
|\ \ \ | |/ / |/| | | | | | | | fd3249e New USE_FOLDERS property OFF by default. (#3796)
| * | New USE_FOLDERS property OFF by default. (#3796)David Cole2010-10-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visual Studio Express editions do not support solution folders, so default behavior should be as if USE_FOLDERS global property is OFF. Also, allow folder names to be the same as target names: internally, use a prefix to distinguish folder GUIDs from target GUIDs. Add a target and folder with the same name in the ExternalProject test to exercise this code. For CMake itself, provide a new option CMAKE_USE_FOLDERS that defaults to ON so that Visual Studio users get a nicely organized CMake project. Express edition users will have to turn off the CMAKE_USE_FOLDERS option in order to build CMake in the VS Express IDE.
* | | Merge topic 'vs-project-groups'Brad King2010-09-081-0/+40
|\ \ \ | |/ / | | | | | | | | | e6ac0aa Add FOLDER target property, for IDEs (#3796)
| * | Add FOLDER target property, for IDEs (#3796)David Cole2010-09-031-0/+40
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This work was started from a patch by Thomas Schiffer. Thanks, Thomas! See the newly added documentation of the FOLDER target property for details. Also added global properties, USE_FOLDERS and PREDEFINED_TARGETS_FOLDER. See new docs here, too. By default, the FOLDER target property is used to organize targets into folders in IDEs that have support for such organization. This commit adds "solution folder" support to the Visual Studio generators. Currently works with versions 7 through 10. Also, use the new FOLDER property in the ExternalProject test and in the CMake project itself.
* | Merge topic 'vs-utility-depends'Brad King2010-08-311-10/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | a99f620 Fix unused parameter warning in VS 7.1 generator 79a88c3 Refactor VS <= 7.1 utility-depends workaround 325bdb2 Factor out duplicate VS target dependency code 6bea843 Factor out global generator ComputeTargetDepends method
| * | Factor out global generator ComputeTargetDepends methodBrad King2010-08-241-10/+18
| |/ | | | | | | | | Put the global dependency analysis in its own method so individual generators can hook into this point.
* | Restore GetTargetDirectDepends const returnBrad King2010-08-251-2/+2
|/ | | | | The returned set should never be modified. Restore 'const' correctness unnecessarily removed by commit 6903d2df (remove const, 2008-01-30).
* Fix rule hash persistence file generationBrad King2010-02-121-4/+14
| | | | | | | | | | | | | | | | | | | | | We store custom command rule hashes in CMakeFiles/CMakeRuleHashes.txt persistently across CMake runs. When the rule hash changes we delete the custom command output file and write a new hash into the persistence file. This functionality was first added by the commit 'Introduce "rule hashes" to help rebuild files when rules change.' (2008-06-02). However, the implementation in cmGlobalGenerator::CheckRuleHashes kept the file open for read when attempting to rewrite a new file. On Windows filesystems this prevented the new version of the file from being written! This caused the first set of rule hashes to be used forever within a build tree, meaning that all custom commands whose rules changed would be rebuilt every time CMake regenerated the build tree. In this commit we address the problem by splitting the read and write operations into separate methods. This ensures that the input stream is closed before the output stream opens the file.
* Simplify CMake self-install special caseBrad King2009-12-101-13/+4
| | | | | | | | | | CMake has a special case for the "make install" target when building CMake itself. We use the just-built CMake to install itself since an existing CMake installation cannot replace itself (at least on Windows). We simplify the code that computes the location of the CMake binary by taking advantage of existing generator support for target lookup. This will make it robust to any changes in CMake's own CMakeLists.txt files in the future.
* Avoid non-root copies of root-only targetsBrad King2009-10-061-0/+12
| | | | | | | | | | | | | | In cmGlobalGenerator::GetTargetSets we collect targets from all local generators in a tree or subtree corresponding to a project() command. Some targets, such as ALL_BUILD, are duplicated in each subdirectory with a project() command. For such targets we should keep only the copy for the top-most (root) local generator. Previously this filtering was done in each VS IDE generator, but it is easier to do it in one place when the targets are first encountered. This also fixes bad ALL_BUILD dependencies generated for VS 7.0 because the cmGlobalVisualStudio7Generator::WriteTargetDepends method was not filtering out duplicates. Now we avoid duplicates from the start.
* Cleanup cmGlobalGenerator::GetTargetSets methodBrad King2009-10-011-18/+13
| | | | | | This commit cleans up the declaration, definition, and invocations of the GetTargetSets method and related code. There is no change in function except to make the method virtual.
* Fix warnings in CMake source code. Suppress warnings in Lexer and Parser ↵David Cole2009-09-301-3/+6
| | | | files that are 'too hard' to fix.
* 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.
* Speed up graph traversal for project->targets mapBrad King2009-09-021-8/+6
| | | | | | | | The cmGlobalGenerator::AddTargetDepends method traces the dependencies of targets recursively to collect the complete set of targets needed for a given project (for VS .sln files). This commit teaches the method to avoid tracing its dependencies more than once. Otherwise the code does an all-paths walk needlessly.
* No /fast targets in try_compile project modeBrad King2009-08-041-2/+2
| | | | | | | | 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.
* Fix recursive try_compile callsBrad King2009-08-031-3/+15
| | | | | | | | When building an entire source tree with try_compile instead of just a single source file, it is possible that the CMakeLists.txt file in the try-compiled project invokes try_compile. This commit fixes propagation of language-initialization results from the outer-most project into any number of try-compile levels.
* ENH: first pass at VS 10, can bootstrap CMake, but many tests still failBill Hoffman2009-06-251-1/+6
|
* ENH: Generate a central list of target directoriesBrad King2009-03-091-25/+11
| | | | | | | | This generalizes the previous CMakeFiles/LabelFiles.txt created at the top of the build tree to a CMakeFiles/TargetDirectories.txt file. It lists the target support directories for all targets in the project. Labels can still be loaded by looking for Labels.txt files in each target directory.
* ENH: Extend GG::Build method for pre-parsed argsBrad King2009-03-041-3/+12
| | | | | This adds an argument to the cmGlobalGenerator::Build method to pass a vector of arguments for the native build tool programatically.
* ENH: Enforce unique binary directoriesBrad King2009-02-271-0/+4
| | | | | | The second argument of add_subdirectory must name a unique binary directory or the build files will clobber each other. This enforces uniqueness with an error message.
* BUG: Fix logic of LabelFiles.txt generationBrad King2009-02-121-0/+1
| | | | | This fixes a dumb logic error which causes generation of LabelFiles.txt to try to open the file once for every target with labels.
* ENH: Define target and source property LABELSBrad King2009-02-101-0/+90
| | | | | | This creates a new LABELS property for targets and source files. We write the labels of each target and its source files in target-specific locations in the build tree for future use.
* COMP: Fix rule hash code during bootstrapBrad King2009-02-021-2/+1
| | | | | | During bootstrap we do not bother with rule hashing. This updates the dummy implementation to account for the recent change in rule hash method signatures.
* ENH: Refactor custom command rule hashingBrad King2009-02-021-10/+5
| | | | | | | | | | This simplifies computation of custom command rule hashes to hash content exactly chosen as the custom commands are generated. Unfortunately this will change the hashes of existing build trees from earlier CMake versions, but this is not a big deal. The change is necessary so that in the future we can make optional adjustments to custom command lines at generate time without changing the hashes every time the option is changed.
* BUG: fix package_source targetBill Hoffman2008-11-101-1/+1
|
* BUG: 4244, add a --build option to cmake that can build projects configured ↵Bill Hoffman2008-10-151-4/+7
| | | | by CMake
* STYLE: fix hidden variable warningBill Hoffman2008-10-011-2/+2
|
* BUG: fix for 7738, allow for spaces in the package target path to ↵Bill Hoffman2008-10-011-14/+23
| | | | CPackConfig files
* ENH: Make dir content cache work during configureBrad King2008-09-221-0/+1
| | | | | | Previously the cmGlobalGenerator::GetDirectoryContent method would work safely only during build system generation. These changes make it safe to use during each configure step by flushing it at the beginning.
* ENH: Simplify NOTFOUND variable checkBrad King2008-09-151-1/+2
| | | | | | | When looking for NOTFOUND libraries, use the direct dependencies of a target instead of all dependencies. At least one target will trigger the NOTFOUND error anyway because at least one must directly link it. This removes another use of the old-style link line computation.