summaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash with --trace-expand --warn-uninitialized togetherR2RT2018-04-092-8/+10
| | | | | | | | Some code paths in `ExpandVariablesInString{New,Old}` were not checking the `filename` parameter for a null pointer, but this can happen when using the above flags together. Add the checks and a test case. Fixes: #17896
* CMake 3.11.0v3.11.0Brad King2018-03-281-1/+1
|
* Merge branch 'ctest_update-memory-problems' into release-3.11Brad King2018-03-272-7/+10
|\ | | | | | | Merge-request: !1893
| * ctest_update: Fix crash when handling svn externalsBrad King2018-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.9.0-rc1~156^2 (c++: prefer vectors over lists, 2017-05-04) switched `cmCTestSVN::Repositories` from `std::list` to `std::vector`. This can cause re-allocation when svn externals are processed and break the `RootInfo` pointer that is supposed to point at the first repository element. Switch back to `std::list` so that the address remains stable. Fixes: #17854
| * cmSystemTools: Fix ParseArguments out-of-bounds readBrad King2018-03-271-6/+7
| | | | | | | | | | | | | | When checking for a Windows-style leading path, do not read past the null terminator. Issue: #17854
* | Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF"Brad King2018-03-261-7/+4
|/ | | | | | | | | | | | | Revert commit v3.8.0-rc1~305^2 (Remove CTestTestfile.cmake when BUILD_TESTING is OFF, 2016-11-14) again. We reverted it once in commit v3.8.0-rc3~22^2 (Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF", 2017-03-06) but it was accidentally restored by commit v3.11.0-rc1~387^2 (server: add "ctestInfo" request to get test info, 2017-10-25), perhaps due to conflict resolution during rebase. We cannot remove `CTestTestfile.cmake` when testing is off because it breaks projects that never enable testing but create their own `CTestTestfile.cmake` manually instead. Revert the change again and add a test case.
* CMake 3.11.0-rc4v3.11.0-rc4Brad King2018-03-191-1/+1
|
* Merge branch 'genex-COMPILE_LANGUAGE-system-include' into release-3.11Brad King2018-03-138-24/+40
|\ | | | | | | Merge-request: !1844
| * Genex: Fix COMPILE_LANGUAGE propagation through try_compileBrad King2018-03-123-9/+18
| | | | | | | | | | | | | | | | When evaluating include directories during export to a `try_compile` test project, thread the compile language through to the generator expression evaluator so it can support `$<COMPILE_LANGUAGE:...>`. Issue: #17811
| * Genex: Fix COMPILE_LANGUAGE in SYSTEM include directoriesBrad King2018-03-125-15/+22
| | | | | | | | | | | | | | | | | | When evaluating `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`, or evaluating `INTERFACE_INCLUDE_DIRECTORIES` on an imported target, thread the compile language through to the generator expression evaluator so that it can support `$<COMPILE_LANGUAGE:...>`. Fixes: #17811
* | Merge branch 'ccmake-stack-smashing' into release-3.11Brad King2018-03-131-1/+1
|\ \ | |/ |/| | | Merge-request: !1836
| * ccmake: fix status line buffer overflow on very wide terminalsTianhao Chai2018-03-131-1/+1
| | | | | | | | | | A mistyped length calculation will memset across stack frame when the user's terminal width is larger than 270.
| * CMake 3.10.2v3.10.2Brad King2018-01-181-1/+1
| |
| * Merge branch 'backport-autogen-nexist-source-fix' into release-3.10Brad King2018-01-101-5/+17
| |\ | | | | | | | | | Merge-request: !1650
| | * Autogen: Ignore not existing source files in cmMakefileSebastian Holtermann2018-01-101-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until CMake 3.10 a list of source files that had the AUTOUIC_OPTIONS property populated was kept in `cmMakefile::QtUiFilesWithOptions`. In the process to remove all AUTOUIC related code from `cmMakefile` for CMake 3.10, the pre filtered list was replaced by a loop in `cmQtAutoGeneratorInitializer` over all source files in the `cmMakefile`. This loop introduced the problem that file paths were computed for source files that weren't in the target's sources and that might not even have existed. If the path for an unused and not existing file was computed a `cmake::FATAL_ERROR` with the error message "Cannot find source file:" was thrown nevertheless. This caused some projects to fail in CMake 3.10. This patch adds a test for path errors in the loops in `cmQtAutoGeneratorInitializer` that iterate over all source files in a `cmMakefile`. If a path error appears, the file is silently ignored. If the file is part of the target's sources, the path error will still be caught in the loop over all the target's sources. This is the fix for CMake 3.10.1.
| * | Merge branch 'backport-autogen-nested-lists-fix' into release-3.10Brad King2017-12-202-1/+4
| |\ \ | | | | | | | | | | | | Merge-request: !1606
| | * | Autogen: Fix for problematic nested list separatorSebastian Holtermann2017-12-202-1/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the AutogenInfo.cmake file the separator for nested lists was `@LSEP@` which led to a speed regression because the `@` character triggered an (unsuccessful) expression evaluation. By setting the policy version of the CMake instance in the `_autogen` target to 3.9, the OLD `@` evaluating behavior controlled by policy CMP0053 is disabled. Also the nested lists separator string is changed to `<<<S>>>`, which solves the problem twofold. Issue: #17570
* | | CMake 3.11.0-rc3v3.11.0-rc3Brad King2018-03-091-1/+1
| | |
* | | Merge branch 'update-kwsys' into release-3.11Brad King2018-03-074-16/+25
|\ \ \ | | | | | | | | | | | | Merge-request: !1830
| * | | Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-03-074-16/+25
| | | | | | | | | | | | | | | | | | | | * upstream-KWSys: KWSys 2018-03-07 (2ad561e7)
* | | | Autogen: Check if a file is empty before reading itSebastian Holtermann2018-03-061-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling `std::string::front()` on an empty string results in an undefined behavior by the C++ standard. In gcc8 it causes an assertion to fail. This adds a check to `AUTOGEN` if a file to read is empty and in case avoids the use of an empty `std::string` buffer. Closes #17793
* | | | CMake 3.11.0-rc2v3.11.0-rc2Brad King2018-02-271-1/+1
| | | |
* | | | Merge branch '14297-partial-xcode-zero-check' into release-3.11Brad King2018-02-231-1/+5
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !1790
| * | | | Xcode: Generate ZERO_CHECK generator target only onceGregor Jasny2018-02-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY has been enabled generate only the root-level ZERO_CHECK target so targets in subdirectories pick up the root generator target of ZERO_CHECK. For the case that CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is not enabled more investigation and a proper and final fix is still needed. Issue: 14297
* | | | | Merge branch 'std-thread-link' into release-3.11Brad King2018-02-221-0/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | Merge-request: !1789
| * | | | CMakeLib: Link to system thread libraries to support std::threadBrad King2018-02-221-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some environments require linking to thread libraries for `std::thread`. Express this direct dependency of CMakeLib explicitly. Previously this was done indirectly through our bundled libuv, but that does not work when using a system libuv. Fixes: #17757
* | | | Merge branch 'export-android-mk' into release-3.11v3.11.0-rc1Brad King2018-02-151-12/+16
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !1766
| * | | | Android.mk: Fix export of static libraries with PRIVATE dependenciesBrad King2018-02-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `LINK_ONLY` generator expression is used to represent private dependencies of static libraries in their `INTERFACE_LINK_LIBRARIES` property value. Fix evaluation of generator expressions during export to support the `LINK_ONLY` genex. Extend the RunCMake.AndroidMK test with a case for this.
| * | | | Android.mk: Evaluate generator expressions up frontBrad King2018-02-141-12/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | When exporting `INTERFACE_LINK_LIBRARIES`, we must evaluate generator expressions first, before expanding the `;` list, in case they contain or generate semicolons.
* | | | Merge branch 'autogen-write-on-change-only' into release-3.11Brad King2018-02-131-34/+12
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !1753
| * | | | Autogen: Overwrite info files when changed onlySebastian Holtermann2018-02-061-34/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | Check if the content of the AUTOMOC/UIC/RCC info file will change before overwriting it. This avoids unnecessary AUTORCC rebuilds when AUTORCC unrelated CMake settings change.
* | | | Merge branch '17711-reset-xcode-target-var' into release-3.11Brad King2018-02-131-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !1757
| * | | | cmGlobalXCodeGenerator: Properly initialize TARGETS variableGregor Jasny2018-02-131-0/+1
| |/ / / | | | | | | | | | | | | Fixes: #17711
* | | | CMake 3.11.0-rc1 version updateBrad King2018-02-051-3/+3
|/ / /
* | | Merge topic 'autogen-improve-multi-config'Brad King2018-02-058-471/+421
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a8ee7406 Autogen: Improved multi-config include scheme Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1735
| * | | Autogen: Improved multi-config include schemeSebastian Holtermann2018-02-028-471/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For multi configuration generators AUTOMOC generates the moc files that are included in `mocs_compilation.cpp` in `AUTOGEN_BUILD_DIR/include_$<CONFIG>/`. By doing so each configuration reads different moc files when compiling `mocs_compilation.cpp`. Since we do not (need to) rewrite `mocs_compilation.cpp` on a configuration change anymore, the files also does not need to be recompiled anymore. Not having to rewrite and recompile `mocs_compilation.cpp` on a configuration change anymore was the main objective of this patch. In a similar fashion AUTORCC generates a `qrc_BASE_CMAKE.cpp` file below `AUTOGEN_BUILD_DIR/include_$<CONFIG>/` and `qrc_BASE.cpp` becomes a mere wrapper that includes this actuall rcc output file (when using multi configuration generators). The template files `Modules/AutoRccInfo.cmake.in` and `Modules/AutogenInfo.cmake.in` were removed in favor of writing the info `.cmake` files manually. Closes #17230
* | | | Merge topic 'vs-static-ConvertToWindowsSlash'Brad King2018-02-052-51/+52
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d148d6d cmVisualStudio10TargetGenerator: Limit scope of ConvertToWindowsSlash() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1741
| * | | | cmVisualStudio10TargetGenerator: Limit scope of ConvertToWindowsSlash()Vitaly Stakhovsky2018-02-022-51/+52
| |/ / / | | | | | | | | | | | | It is no longer used outside this class, so its scope can be limited to file.
* | | | CMake Nightly Date StampKitware Robot2018-02-051-1/+1
| | | |
* | | | CMake Nightly Date StampKitware Robot2018-02-041-1/+1
| | | |
* | | | CMake Nightly Date StampKitware Robot2018-02-031-1/+1
| | | |
* | | | Merge topic 'simplify-ccg-converter'Brad King2018-02-021-3/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | df1693bd cmCustomCommandGenerator: Simplify cmOutputConverter access Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1738
| * | | | cmCustomCommandGenerator: Simplify cmOutputConverter accessBrad King2018-02-011-3/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.4.0-rc1~480^2~3 (cmCustomCommandGenerator: Port to cmOutputConverter, 2015-06-04), cmCustomCommandGenerator's access to the local generator was removed so it needed to construct its own cmOutputConverter instance. Access to the local generator was then restored by commit v3.4.0-rc1~285^2~21 (cmCustomCommandGenerator: Require cmLocalGenerator in API, 2015-07-25), so now we can use its cmOutputConverter base class methods directly.
* | | | Merge topic 'ninja-unused-device-link'Brad King2018-02-021-28/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 20676cba Ninja: Remove unused device link line code Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1737
| * | | | Ninja: Remove unused device link line codeBrad King2018-02-011-28/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the `PRE_LINK` and `POST_BUILD` variables. They are not referenced by `WriteDeviceLinkRule`. Remove the `byproducts` local variable from `WriteDeviceLinkStatement` and all the code populating it. We never used the result.
* | | | Merge topic 'update-kwsys'Brad King2018-02-023-98/+89
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be46f9fb Merge branch 'upstream-KWSys' into update-kwsys 854feacc KWSys 2018-02-01 (04fcc449) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1736
| * | | | Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-02-013-98/+89
| |/ / / | | | | | | | | | | | | | | | | * upstream-KWSys: KWSys 2018-02-01 (04fcc449)
* | | | CMake Nightly Date StampKitware Robot2018-02-021-1/+1
|/ / /
* | | Merge topic 'std-string-apis'Brad King2018-02-01120-506/+470
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 653b8946 Reduce raw string pointers usage. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1729
| * | | Reduce raw string pointers usage.Pavel Solodovnikov2018-01-31120-507/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.