summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: suppress cmcldeps only for source file signature try_compilesPeter Kümmel2012-09-051-0/+12
|
* Merge topic 'module-no-soname'David Cole2012-06-211-2/+6
|\ | | | | | | | | 56148fd Do not crash on SHARED library without language (#13324)
| * Do not crash on SHARED library without language (#13324)Brad King2012-06-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e1409ac5 (Support building shared libraries or modules without soname, 2012-04-22) CMake crashes on the code add_library(foo SHARED foo.nolang) because the logic to lookup the language's soname flag was moved from cmTarget::GetLibraryNames to cmMakefile::GetSONameFlag without its check for a NULL language. Restore the check for NULL. Add RunCMake.Languages test to cover language error cases like this one.
* | Print any evaluated 'elseif'/'else' commands in trace mode (#13220)Brian Helba2012-05-161-12/+18
|/ | | | | | In trace mode ('--trace'), any 'elseif' or 'else' commands that are evaluated as part of a conditional block will be printed. Previously, only the opening 'if' command of a conditional block was printed.
* Merge topic 'module-no-soname'David Cole2012-05-011-0/+8
|\ | | | | | | | | | | fdb3f87 Test NO_SONAME property (#13155) e1409ac Support building shared libraries or modules without soname (#13155)
| * Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean target property NO_SONAME which may be used to disable soname for the specified shared library or module even if the platform supports it. This property should be useful for private shared libraries or various plugins which live in private directories and have not been designed to be found or loaded globally. Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and hard-coded -install_name flags with a conditional <SONAME_FLAG> which is expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG definition as long as soname supports is enabled for the target in question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in rules in case third party projects still use it. Such projects would not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since -install_name is soname on OS X, this should not be a problem if this variable is expanded only if soname is enabled. The Ninja generator performs rule variable substitution only once globally per rule to put its own placeholders. Final substitution is performed by ninja at build time. Therefore we cannot conditionally replace the soname placeholders on a per-target basis. Rather than omitting $SONAME from rules.ninja, simply do not write its contents for targets which have NO_SONAME. Since 3 variables are affected by NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if soname is enabled.
* | Factor out custom command .rule file path generationBrad King2012-04-181-10/+4
| | | | | | | | | | | | | | 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.
* | Cleanup custom command .rule file internal handlingBrad King2012-04-181-18/+18
|/ | | | | | | | Teach cmMakefile::AddCustomCommandToOutput to return the cmSourceFile instance to which the custom command is attached. Use the return value instead of separately adding a .rule extension and searching for the source. Mark CMake-generated .rule files explicitly with a property instead of trusting the file extension.
* Classify known header file extensions as headersBrad King2012-03-281-2/+1
| | | | | | | | | | Commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source classification, 2012-03-19) introduced the first use of source classification from cmGeneratorTarget (which originated as Makefile generator logic) in a Visual Studio generator for handling of header files. Fix classification of header files to match known header extensions instead of only the HEADER_FILE_ONLY property. Make it consistent with the "Header Files" source group.
* Add a default source group for object files.David Cole2012-03-161-0/+1
|
* Add OBJECT_LIBRARY target typeBrad King2012-03-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | This library type can compile sources to object files but does not link or archive them. It will be useful to reference from executable and normal library targets for direct inclusion of object files in them. Diagnose and reject the following as errors: * An OBJECT library may not be referenced in target_link_libraries. * An OBJECT library may contain only compiling sources and supporting headers and custom commands. Other source types that are not normally ignored are not allowed. * An OBJECT library may not have PRE_BUILD, PRE_LINK, or POST_BUILD commands. * An OBJECT library may not be installed, exported, or imported. Some of these cases may be supported in the future but are not for now. Teach the VS generator that OBJECT_LIBRARY targets are "linkable" just like STATIC_LIBRARY targets for the LinkLibraryDependencies behavior.
* Rename/constify build-time config placeholder lookupBrad King2012-03-091-2/+2
| | | | | | 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.
* Merge topic 'target-include-directories'David Cole2012-03-081-71/+83
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d662dff Fix shadowed variable warning on dashboard results f66e735 Fix compiler warning reported on older Borland dashboard. d90eed4 Fix compiler error reported on older Borland dashboard. 8233636 Update the documentation regarding INCLUDE_DIRECTORIES. d899eb7 Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES c21db87 Make search paths ordered and unique 22021f0 Remove cmMakefile::GetIncludeDirectories 9106b56 Extract and use the INCLUDE_DIRECTORIES target properties. 840509b Keep the INCLUDE_DIRECTORIES target property up to date. a4d5f7b Add API to get the ordered includes for a target. 8adaee2 CMake: Eliminate cmMakefile::IncludeDirectories 7620932 Remove include flags memoization. 97a5faa Make it safe to call this method without creating duplicates. edd5303 Refactor GetIncludeFlags to take includes instead of fetching them
| * Fix shadowed variable warning on dashboard resultsDavid Cole2012-02-231-1/+1
| |
| * Update the documentation regarding INCLUDE_DIRECTORIES.David Cole2012-02-221-3/+16
| | | | | | | | | | It is now a target property and is affected by the use of the include_directories command.
| * Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIESDavid Cole2012-02-221-0/+14
| | | | | | | | | | | | For strict backwards compatibility only. This should be unnecessary at this point, but introducing a policy to deprecate it properly is a whole different topic branch...
| * Remove cmMakefile::GetIncludeDirectoriesDavid Cole2012-02-221-24/+0
| | | | | | | | | | After making the changes to use the new target level INCLUDE_DIRECTORIES property, there are no more callers of this method.
| * Keep the INCLUDE_DIRECTORIES target property up to date.Stephen Kelly2012-02-221-0/+9
| | | | | | | | The directory level property changes need to be added to it.
| * CMake: Eliminate cmMakefile::IncludeDirectoriesDavid Cole2012-02-221-66/+66
| | | | | | | | Instead, re-implement it in terms of the directory property INCLUDE_DIRECTORIES.
* | Rename UsedCommands to FinalPassCommandsYury G. Kudryashov2012-02-291-5/+5
|/ | | | | When I read 'UsedCommands' I thought that it holds all commands used in the file, not only those that have FinalPass().
* Optionally allow IMPORTED targets to be globally visibleBrad King2012-01-251-2/+7
| | | | | | | | | | | | 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.
* Add NEWLINE_STYLE option to configure_file (#3957)Peter Kuemmel2011-11-281-3/+15
|
* Refactor TargetTypeNames.Nicolas Despres2011-10-021-1/+1
| | | | | | Make it a static method instead of an array. It is safer for the type checking and if we add a new target type we will be warned to add a case to the switch.
* Merge topic 'UsingCMakeLikePkgConfig2'David Cole2011-08-251-5/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Disable any STATUS output in --find-package modeAlex Neundorf2011-08-151-2/+9
| | | | | | | | | | | | | | | | | | Any STATUS output will be fed directly to the compiler, which will not understand any status messages. Error messages are fine, since they are errors and it is ok if the compiler fails in such cases. Alex
| * Replace cmake::GetScriptMode() with GetWorkingMode()Alex Neundorf2011-08-091-4/+4
| | | | | | | | | | | | | | GetWorkingMode() returns a new enum WorkingMode, which is one of NORMAL_MODE, SCRIPT_MODE and FIND_PACKAGE_MODE. Alex
| * Add find-package mode, which does nothing yetAlex Neundorf2011-07-021-1/+3
| | | | | | | | | | | | | | | | -add command line argument --find-package and handle it, i.e. call an empty function cmake::FindPackage() -add basic help Alex
* | Add AUTOMOC to the add_library() commandAlex Neundorf2011-08-141-1/+2
| | | | | | | | Alex
* | Merge topic 'SetPropertyAppendString'Brad King2011-07-261-2/+3
|\ \ | | | | | | | | | | | | 9dbba1b Fix #12342: Add APPEND_STRING option to set_property()
| * | Fix #12342: Add APPEND_STRING option to set_property()Alex Neundorf2011-07-151-2/+3
| |/ | | | | | | | | | | | | | | | | set_property() has APPEND, which creates a list. E.g. when appending to COMPILE_FLAGS a string is needed, not a list. With the APPEND_STRING option the value is append as string, not as list. Alex
* | Only pay for unused variable checking if it is on.Bill Hoffman2011-06-211-0/+4
|/
* Merge topic 'validate-custom-commands-issue-11963'Brad King2011-03-151-0/+14
|\ | | | | | | | | 339d592 Validate custom command arguments (#11963)
| * Validate custom command arguments (#11963)Brad King2011-03-141-0/+14
| | | | | | | | | | Reject quoted commands immediately with an error message instead of allowing a later assertion failure.
* | Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828)David Cole2011-02-031-0/+16
| | | | | | | | For now, these variables are only available in -P script mode.
* | Add CMAKE_SCRIPT_MODE_FILE variable (#2828)David Cole2011-02-021-0/+5
|/ | | | | New CMake variable is set when processing a -P script file, but not when configuring a project.
* Merge topic 'dev/strict-mode'Brad King2011-01-271-3/+199
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+8
| |\ | | | | | | | | | | | | Conflicts: Tests/CMakeLists.txt
| * | Fix ArgumentExpansion test expected resultsBrad King2011-01-111-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | Teach the ArgumentExpansion test to expect flattened lists as has always been the case in the CMake language. Now that the test should pass enable the failure regex even when CMAKE_STRICT is not on. Replace the reference to the old ArgumentExpansion test behavior in the workaround comment in cmMakefile::TryCompile with a full inline explanation.
| * | Checking for a definition is a usageBen Boeckel2011-01-031-0/+1
| | |
| * | Merge branch 'ImprovedDotSupport2' into dev/strict-modeBrad King2010-12-171-0/+8
| |\ \ | | | | | | | | | | | | | | | | Conflicts: Source/cmake.cxx
| * \ \ Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-modeBrad King2010-12-171-20/+29
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: Source/cmMakefile.cxx
| * \ \ \ Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-modeBrad King2010-12-171-10/+26
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Source/QtDialog/CMakeSetupDialog.cxx
| * | | | | Don't check at destruction for usageBen Boeckel2010-12-071-3/+0
| | | | | |
| * | | | | Use cmake::IssueMessage for warningsBen Boeckel2010-12-071-6/+10
| | | | | |
| * | | | | Use 'CMake Warning' versus 'warning' for CDashBen Boeckel2010-12-071-1/+1
| | | | | |
| * | | | | Initialize the class before setting warn flagsBen Boeckel2010-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Initialize sets variables that we don't want to warn about, don't leak the original class' settings.
| * | | | | Ignore files under the CMakeFiles directoryBen Boeckel2010-12-031-2/+4
| | | | | |
| * | | | | Don't check for unused vars at configure timeBen Boeckel2010-12-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The generate step should catch all of them.
| * | | | | When checking for variables, specify a reasonBen Boeckel2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allow reasons to begiven for checking for unused variables.
| * | | | | Use a long int since Line is a long as wellBen Boeckel2010-10-081-1/+1
| | | | | |