summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into generator-toolsetBrad King2013-02-071-1/+3
|\ | | | | | | We need the latest Tests/CMakeLists.txt so we can refactor all tests.
| * Merge topic 'clean-include-dirs-debugging'Brad King2013-01-231-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | 6063fef Output include directories as LOG messages, not warnings. aa66748 Specify the target whose includes are being listed. d70204a Only output includes once after the start of 'generate-time' when debugging. 0d46e9a Store includes from the same include_directories call together.
| | * Only output includes once after the start of 'generate-time' when debugging.Stephen Kelly2013-01-211-0/+1
| | | | | | | | | | | | | | | | | | During configure-time, GetIncludeDirectories may be called too, for example if using the export() command. As the content can be different, it should be output each time then.
| * | Merge topic 'automoc-object'Brad King2013-01-231-1/+2
| |\ \ | | |/ | |/| | | | | | | | | | 0e35cac Automoc: add OBJECT library to QtAutomoc test cf3faac Automoc: Fix automoc for OBJECT libraries.
| | * Automoc: Fix automoc for OBJECT libraries.Yury G. Kudryashov2013-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | | Before this patch, add_library(obj OBJECT helper.cpp) add_executable(tgt $<TARGET_OBJECTS:obj>) didn't run automoc on helper.cpp.
* | | CMake: Add -T option to choose a generator toolsetBrad King2013-02-071-0/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_TOOLSET and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorToolset test to cover basic "-T" option cases. Verify that CMAKE_GENERATOR_TOOLSET is empty without -T, that -T is rejected when the generator doesn't support it, and that two -T options are always rejected.
* | Make the BUILD_INTERFACE of export()ed targets work.Stephen Kelly2013-01-151-13/+1
|/ | | | | The existing BUILD_INTERFACE code is executed at generate time, which is too late for export().
* Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable.Stephen Kelly2013-01-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | This makes set(CMAKE_BUILD_INTERFACE_INCLUDES ON) add the equivalent of set_property(TARGET tgt APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}> ) to every target. If the headers are in CMAKE_CURRENT_SOURCE_DIR, and the generated headers are in CMAKE_CURRENT_BINARY_DIR, this is a convenient way to build a target bar, which depends on foo, just by using target_link_libraries() and adding the INTERFACE_INCLUDE_DIRECTORIES to the INCLUDE_DIRECTORIES of the target being linked. There will be more-convenient porcelain API to consume the property in the future.
* VS11: Allow using folders with the VS11 Express Edition (#13770)David Cole2012-12-031-1/+1
| | | | | | | | Solution folders are supported as read-only in the VS11 Express Edition, so do not prohibit their use just because we detect the express edition (as we did in the VS10 generator). Inspired-by: Paris
* Merge topic 'generator-factory'Brad King2012-11-201-8/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 75ebebc VS: Remove platform specific generator files 8b62080 VS: Remove EnableLanguage from platform-specific generators 5bdf011 VS: Remove GetPlatformName from platform-specific generators 8d42ab4 VS: Fix ArchitectureId of Visual Studio 10 IA64 generator 6f439b3 VS: Remove AddPlatformDefinitions from platform-specific generators 5170a88 Make cmGlobalGenerator::GetDocumentation() a static function 04ff866 Allow a GeneratorFactory handling of more than one generator 984ebc3 Search generator in cmake::ExtraGenerators before in cmake::Generators 30a6950 Add cmGlobalGeneratorFactory::GetGenerators() e8f8414 Introduce the abstract class cmGlobalGeneratorFactory
| * Make cmGlobalGenerator::GetDocumentation() a static functionPatrick Gansterer2012-11-191-8/+0
| | | | | | | | | | Making the function static allows us to call it directly, without creating and removing an instance of the generator.
* | Merge topic 'fix-IMPORTED-GLOBAL-reconfigure'Brad King2012-11-201-0/+1
|\ \ | |/ |/| | | | | 5ff7587 Initialize IMPORTED GLOBAL targets on reconfigure (#13702)
| * Initialize IMPORTED GLOBAL targets on reconfigure (#13702)Brad King2012-11-191-0/+1
| | | | | | | | | | | | | | | | | | Since commit ca39c5cd (Optionally allow IMPORTED targets to be globally visible, 2012-01-25) cmGlobalGenerator has a second member that tracks targets with global scope. We must initialize the new 'ImportedTargets' member wherever the old 'TotalTargets' member is initialized. Without this initialization the ImportedTargets member is left with dangling pointers during a same-process re-configuration.
* | GenEx: Create cmGeneratorTargets for imported targets.Stephen Kelly2012-10-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | We're going to need to link to them, and all the linking API is moving to cmGeneratorTarget. Skip imported targets when iterating over cmGeneratorTargets in places where we only want targets we build. The GetGeneratorTargets result now includes IMPORTED targets where it didn't before. The GetTargets result, which was what used to be called in these methods does not include IMPORTED targets. This doesn't relate to any known bugs, but in some future uses of GetGeneratorTargets it will be important, so starting the convention and being deliberate now is a good idea.
* | GenEx: Fix reporting about not-found include directories and libraries.Stephen Kelly2012-10-171-6/+16
| | | | | | | | | | | | This fixes a regression introduced in commit 290e92ad (Move GetIncludeDirectories to cmGeneratorTarget, 2012-09-16) which loops over cmGeneratorTargets before they get created, so the container is empty.
* | Merge topic 'documentation-cleanup'Brad King2012-10-011-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 4ad0233 Remove period at the end of the check message. 50b1ea5 Fix minor typos. 19c3206 Remove unused parameter marker and the unused parameter. 9d462b2 Document that generator expressions can be used in target properties. daf88c3 Fix punctuation in some variables documentation. 3172cde Fix the layout of the generator expression documentation.
| * | Fix minor typos.Stephen Kelly2012-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | nothe -> note than -> that duplicat -> duplicate directory -> directly Wipe wipe -> Wipe
* | | Merge topic 'AutomocUseTargetProperties' into export-setsAlex Neundorf2012-09-301-10/+33
|\ \ \ | |/ / | | | | | | | | | Conflicts: Source/cmGlobalGenerator.h
| * | Append the COMPILE_DEFINITIONS from the Makefile to all targets.Stephen Kelly2012-09-191-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | This way we don't need to check the definitions from the Makefile when generating later, and can more easily add generator expressions. Duplication is not a problem as the definitions are de-duplicated before generating.
| * | Move GetIncludeDirectories to cmGeneratorTarget.Stephen Kelly2012-09-191-6/+6
| | |
| * | Store cmGeneratorTargets with the makefile.Stephen Kelly2012-09-191-4/+8
| | |
* | | exports: cmGlobalGenerator::ExportSets destructor will clear itYury G. Kudryashov2012-09-281-1/+0
| | |
* | | exports: Add cmExportSetMap classYury G. Kudryashov2012-09-281-29/+0
| | | | | | | | | | | | This is a map<string, cmExportSet *> with overloaded operator[] and destructor.
* | | exports: Create class cmExportSetYury G. Kudryashov2012-09-281-22/+14
| | | | | | | | | | | | | | | Replace direct use of 'std::vector<cmTargetExport const*>' with a dedicated class.
* | | exports: Rename cmGlobalGenerator::AddTargetToExport{s,}Yury G. Kudryashov2012-09-281-1/+1
| | | | | | | | | | | | This function adds target to one export, not to several exports.
* | | exports: Remove cmTargetExport constructorYury G. Kudryashov2012-09-281-12/+4
| | | | | | | | | | | | | | | The constructor was used exactly once. Setting members explicitly makes the code more readable.
* | | exports: Move cmTargetExport to a dedicated header fileYury G. Kudryashov2012-09-281-1/+1
|/ /
* | Make platform information files specific to the CMake versionBrad King2012-08-241-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the top of a build tree we configure inside the CMakeFiles directory files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to save information detected about the system and compilers in use. The method of detection and the exact results store varies across CMake versions as things improve. This leads to problems when loading files configured by a different version of CMake. Previously we ignored such existing files only if the major.minor part of the CMake version component changed, and depended on the CMakeCache.txt to tell us the last version of CMake that wrote the files. This led to problems if the user deletes the CMakeCache.txt or we add required information to the files in a patch-level release of CMake (still a "feature point" release by modern CMake versioning convention). Ensure that we always have version-consistent platform information files by storing them in a subdirectory named with the CMake version. Every version of CMake will do its own system and compiler identification checks even when a build tree has already been configured by another version of CMake. Stored results will not clobber those from other versions of CMake which may be run again on the same tree in the future. Loaded results will match what the system and language modules expect. Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to CMAKE_PLATFORM_INFO_DIR to clarify its purpose. The new variable points at the version-specific directory while the old variable did not.
* | Cleanly enable a language in multiple subdirectoriesBrad King2012-08-221-11/+13
| | | | | | | | | | | | | | When a language is not enabled at the top level of a project but is enabled in multiple disjoint subdirectories we should re-use the CMake<lang>Compiler.cmake file from the first directory. Load the file whenever it exists and is not left from a different version of CMake.
* | Merge topic 'position-independent-targets'David Cole2012-06-121-0/+21
|\ \ | | | | | | | | | | | | | | | | | | bd34963 Refactor generation of shared library flags 55d7aa4 Add platform variable for flags specific to shared libraries 31d7a0f Add platform variables for position independent code flags
| * | Refactor generation of shared library flagsStephen Kelly2012-06-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
* | | Move the EscapeJSON method to a sharable location.Stephen Kelly2012-06-041-0/+13
|/ /
* | Factor out custom command .rule file path generationBrad King2012-04-181-0/+15
| | | | | | | | | | | | | | Add cmGlobalGenerator::GenerateRuleFile to compute a generator-specific rule file location. This will allow specific generators to override the location of .rule files without changing the behavior of other generators.
* | Rename/constify build-time config placeholder lookupBrad King2012-03-091-1/+1
| | | | | | | | | | | | Rename cmGlobalGenerator::GetCMakeCFG{InitDirectory => IntDir} to have a shorter name without a typo. Add a 'const' qualifier since the method is only for lookup and never needs to modify anything.
* | Pre-compute object file names before Makefile generationBrad King2012-03-091-1/+9
| | | | | | | | | | | | | | Add a virtual cmGlobalGenerator::ComputeTargetObjects method invoked during cmGeneratorTarget construction. Implement it in the Makefile generator to pre-compute all object file names for each target. Use the results during generation instead of re-computing it later.
* | Create a cmGeneratorTarget for each cmTarget during generationBrad King2012-03-091-0/+47
| | | | | | | | | | | | | | Construct the instances after the final set of targets is known but before computing inter-target dependencies. This order will allow initialization of cmGeneratorTarget instances to adjust and finalize declared inter-target dependencies.
* | Extract and use the INCLUDE_DIRECTORIES target properties.Stephen Kelly2012-02-221-19/+20
|/ | | | | | | | | Eliminate callers of cmMakefile::GetIncludeDirectories. All callers of GetIncludeDirectories should go through the local generator object. Only the local generator calls cmTarget::GetIncludeDirectories directly.
* Optionally allow IMPORTED targets to be globally visibleBrad King2012-01-251-3/+14
| | | | | | | | | | | | Consider the case motivating commit e01cce28 (Allow add_dependencies() on imported targets, 2010-11-19). An imported target references a file generated at build time by a custom target on which it depends. Had the file been built directly using add_library or add_executable its target name would have been visible globally. Therefore the imported target representing the file should be globally visible also. Teach the IMPORTED signature of add_(executable|library) to accept a new "GLOBAL" option to make the imported target visible globally.
* 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