summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-0120-135/+139
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* clang-format.bash: update to clang-format-6.0Brad King2018-06-012-2/+2
| | | | | | | | | | | | Update `.clang-format` with configuration to make the 6.0 format as close as possible to what 3.8 produced before. Then revise the style: * Indent preprocessor directives (a feature new since 3.8) * Add a newline and indentation before inheritance `:` and `,` Rename the Git attribute identifying the format to include the clang-format version number: `format.clang-format-6.0`. This will aid external infrastructure in knowing what version of the tool to run.
* Merge topic 'vs-toolset-version'Brad King2018-05-3011-0/+44
|\ | | | | | | | | | | | | | | 5f13168419 VS: Add option to select the version of the toolset used by VS 2017 Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Francisco Facioni <fran6co@gmail.com> Merge-request: !2093
| * VS: Add option to select the version of the toolset used by VS 2017Basil Fierz2018-05-2911-0/+44
| | | | | | | | | | | | | | | | Add new `version=` parameter in the toolset setting to select the version. Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the version, if one is set (blank indicates default). Fixes: #17549
* | Merge topic 'parallel_build_option'Brad King2018-05-2917-0/+43
|\ \ | |/ |/| | | | | | | | | | | 1ab3881ec9 cmake: Add options for parallel builds to --build mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Henry Schreiner <henryschreineriii@gmail.com> Merge-request: !1962
| * cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-2517-0/+43
| | | | | | | | | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* | FindLua: Add tests for this moduleAlexander Grund2018-05-249-0/+134
| |
* | target_link_libraries: Allow use with targets in other directoriesPatrick Stotko2018-05-1515-7/+94
| | | | | | | | | | | | | | | | Previously the command did not allow naming targets on the LHS that were not created in the calling directory. Lift this restriction to enable more flexible use by projects. Fixes: #17943
* | Merge topic 'custom-command-expand-empty'Brad King2018-05-152-0/+2
|\ \ | | | | | | | | | | | | | | | | | | 6e59491659 add_custom_{command,target}: Fix crash on empty expanded command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2074
| * | add_custom_{command,target}: Fix crash on empty expanded commandBrad King2018-05-142-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our custom command generation logic assumes that all command lines have at least `argv0`. In `add_custom_{command,target}` we already check that at least a `COMMAND` was given, but using `COMMAND_EXPAND_LISTS` in combination with a generator expression that expands to an empty string may produce an empty command line. In this case simply add an empty string as a command to maintain our internal invariant. Fixes: #17993
* | | FindPkgConfig: export the list of found libraries also as variableRolf Eike Beer2018-05-111-0/+12
| | |
* | | Merge topic 'restore-imported-lib-alias-diagnostic'Brad King2018-05-111-2/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e567d7eb63 add_library: Restore error on alias of non-global imported target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2058
| * | | add_library: Restore error on alias of non-global imported targetBrad King2018-05-101-2/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.11.0-rc1~433^2~1 (Add support for IMPORTED GLOBAL targets to be aliased, 2017-09-14) we accidentally dropped the error on calling `add_library` to alias an imported target that is not globally visible. The `add_executable` command's equivalent check was properly updated. Restore the check in `add_library` with the same update. Also fix the test case accordingly. Fixes: #17982
| * | Merge branch 'backport-fix-explicit-CMakeLists.txt' into release-3.11Brad King2018-04-136-0/+55
| |\ \ | | | | | | | | | | | | Merge-request: !1959
| * \ \ Merge branch 'cpack-trace-nullptr' into release-3.11Brad King2018-04-104-0/+13
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !1950
* | | | | ctest_start: read model from TAG fileKyle Edwards2018-05-0930-2/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reworks ctest_start() so that simply calling ctest_start(APPEND) will read all the information from the TAG file. On top of that, it relaxes the argument parsing for ctest_start() to allow greater flexibility in the argument ordering, and the documentation for ctest_start() has been cleaned up.
* | | | | cmVisualStudio10TargetGenerator: issue warning when adding static C# libMichael Stürmer2018-05-072-0/+11
| |_|_|/ |/| | |
* | | | Merge topic 'genex-complang-not-loaded'Brad King2018-05-043-10/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4f82199bef Genex: Allow COMPILE_LANGUAGE to name a language that is not loaded Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2031
| * | | | Genex: Allow COMPILE_LANGUAGE to name a language that is not loadedHenry Schreiner2018-05-033-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Evaluate to false on `$<COMPILE_LANGUAGE:Lang>` if language `Lang` is not loaded. This is helpful in exported targets consumed in other projects that may not enable all the same languages. Fixes: #17952
* | | | | install: add test for new NAMELINK_COMPONENT parameterKyle Edwards2018-05-0313-1/+285
|/ / / /
* | | | Merge topic 'csharp_reference_imported_targets'Brad King2018-04-2618-0/+332
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | de549083e3 cmVisualStudio10TargetGenerator: warn if /clr flag is set manually 59ec7d50bd cmVisualStudio10TargetGenerator: fix for backward compatibility 663f5120f4 cmGlobalVisualStudioGenerator: remove TargetCanBeReferenced() 359544a907 add tests for using target_link_libraries() with imported managed targets 43571073e0 cmVisualStudio10TargetGenerator: store managed reference information in maps 16fec7e2fc cmVisualStudio10TargetGenerator: make some methods config aware f3c6828876 cmVisualStudio10TargetGenerator: /clr compatible flags for managed tgt f9042d807d remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1805
| * | | | add tests for using target_link_libraries() with imported managed targetsMichael Stürmer2018-04-2418-0/+332
| | | | |
* | | | | Ninja: Avoid empty phony edges for target orderingBrad King2018-04-263-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.9.0-rc1~230^2~2 (ninja: break unnecessary target dependencies, 2017-04-17) we unconditionally generate a phony edge for target ordering. It is needed in case a later target depends on it. However, if the phony edge has no inputs then `ninja -d explain` prints: ninja explain: output ... of phony edge with no inputs doesn't exist Furthermore the phony edge's output is considered dirty and can cause dependents to be incorrectly considered dirty. Avoid this by always generating at least one input to the target ordering phony edges. If we have no real dependencies just use a path that always exists. Fixes: #17942
* | | | | Merge topic 'vs-dedup-custom-commands'Brad King2018-04-254-0/+31
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f59c33a763 VS: Generate a custom command only in the least dependent target d58d4daa6b cmVisualStudio10TargetGenerator: Use cmLocalVisualStudio10Generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1889
| * | | | | VS: Generate a custom command only in the least dependent targetFujii Hironori2018-04-234-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a custom command is assigned to multiple targets, generate the build rule only in the least-dependent `.vcxproj` file. Otherwise MSBuild will run the command on the first build of a dependent target even if its dependencies already brought the command up to date (in order to populates its build log). Generate targets in least-to-most-dependent order, and assign a custom command to the least dependent target. Added cmLocalVisualStudio10Generator::GenerateTargetsDepthFirst to call cmVisualStudio10TargetGenerator::Generate in least-dependent order. Moved SourcesVisited from cmVisualStudio10TargetGenerator to cmLocalVisualStudio10Generator to avoid attaching a custom command to multiple targets among the local generator. Fixes: #16767
* | | | | | Merge topic 'Genex-TARGET_GENEX_PROPERTY'Brad King2018-04-2426-0/+219
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4d15046edd Genex: Add $<TARGET_GENEX_EVAL:...> and $<GENEX_EVAL:...> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1984
| * | | | | | Genex: Add $<TARGET_GENEX_EVAL:...> and $<GENEX_EVAL:...>Marc Chevrier2018-04-2326-0/+219
| | |/ / / / | |/| | | | | | | | | | | | | | | | Fixes: #17884
* | | | | | Merge topic 'FindMatlab/mcr-compatibility'Brad King2018-04-244-2/+28
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 59fb9e89b2 FindMatlab: Matlab Runtime Compiler support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1970
| * | | | | FindMatlab: Matlab Runtime Compiler supportRaffi Enficiaud2018-04-234-2/+28
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Determining automatically the MCR version on OSX and Windows * Distinguishing between MCR and Matlab * Specific tests for the MCR * mexext on windows does not work properly: the mexext is hardcoded * Doc updates for the MCR Fixes: #16487
* | | | | Merge topic 'vs-sdk-dirs'Brad King2018-04-203-0/+100
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6ec3e880e7 VS: Add variables to set SDK directories in vcxproj files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1965
| * | | | | VS: Add variables to set SDK directories in vcxproj filesBastien Schatt2018-04-193-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create `CMAKE_VS_SDK_*_DIRECTORIES` variables to tell the VS generator how to populate fields in `.vcxproj` files that specify SDK directories. Fixes: #17908
* | | | | | Merge topic 'CheckIncludeFile-required-libs'Brad King2018-04-193-0/+176
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES 391a5837ee cmake_policy: Add undocumented PARENT_SCOPE option to GET 3c47ac5b25 OpenWatcom: Add workaround for lack of error on missing library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1978
| * | | | | | CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIESBrad King2018-04-183-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other check modules honor this variable, so include file checks should too. Add policy `CMP0075` to enable the behavior in a compatible way. This change was originally made by commit v3.11.0-rc1~108^2 (CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES, 2017-12-24) but it was reverted by commit v3.11.1~9^2 (Revert "CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES", 2018-04-04) because the behavior change could affect checks in existing projects in an incompatible way. Fixes: #9514
* | | | | | | Android: Add support for NDK r17Brad King2018-04-172-7/+9
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `armeabi` ABI is no longer available, so we can no longer use it by default unconditionally. Instead detect all available ABIs and choose the oldest arm ABI that is available. Also update the test suite to account for the lack of `armeabi` support and pass as of Android NDK r17-beta2.
* | | | | | Merge topic 'list-TRANSFORM'Brad King2018-04-1796-0/+589
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dca2347980 list: Add TRANSFORM sub-command cdae12f8f8 string() Refactoring: creates an helper for REGEX REPLACE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1938
| * | | | | list: Add TRANSFORM sub-commandMarc Chevrier2018-04-1696-0/+589
| |/ / / / | | | | | | | | | | | | | | | Issue: #17823
* | | | | Merge branch 'backport-fix-explicit-CMakeLists.txt'Brad King2018-04-136-0/+55
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| |
| * | | Restore support for explicitly referenced CMakeLists.txt sourcesBrad King2018-04-136-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to target sources but instead generate references to them directly. This broke projects that explicitly specify their `CMakeLists.txt` file as a source file because the explicit entry is no longer consolidated with the generated one. Teach the relevant generators to avoid duplicating `CMakeLists.txt` source references and add test cases. Fixes: #17828
* | | | Merge topic 'variable_watch-on-PARENT_SCOPE'Brad King2018-04-123-0/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1948
| * | | | variable_watch: trigger on variables set via PARENT_SCOPEMatteo Settenvini2018-04-113-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that we also trigger variable watches when a variable is set in the parent scope. Fixes: #17827
* | | | | Merge topic 'cpack-trace-nullptr'Brad King2018-04-114-0/+13
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | 6f2701abf6 CPack: Fix crash on invalid generator name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1950
| * | | | CPack: Fix crash on invalid generator nameBrad King2018-04-104-0/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.11.0-rc1~68^2 (CPack: accept --trace and --trace-expand, 2017-12-09) a nullptr dereference was added that occurs when `cpack -G NotAGenerator` is invoked. Add the needed condition. Fixes: #17900
* | | | Merge topic 'fix-crash-trace-exp-uninit-vars'Brad King2018-04-103-0/+10
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | aad360eb3d Fix crash with --trace-expand --warn-uninitialized together Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1944
| * | Fix crash with --trace-expand --warn-uninitialized togetherR2RT2018-04-093-0/+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
* | Merge topic 'ninja-fortran-rspfile'Brad King2018-04-065-0/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | d6390ce26e Ninja: Fix Fortran support with response files 8592c6326b cmNinjaTargetGenerator: Move force-rspfile check to earlier e0aa060352 cmNinjaTargetGenerator: Move depfile logic to later in its function Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1936
| * | Ninja: Fix Fortran support with response filesBrad King2018-04-055-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ninja generator splits preprocessing and compilation steps for Fortran. Fix this logic to work when using response files for compilation so that it works for the preprocessing step too. This fixes behavior under `CMAKE_NINJA_FORCE_RESPONSE_FILE`. Issue: #17877
* | | Merge topic 'glob_configure_depends'Brad King2018-04-0619-0/+159
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 6c4f8b4596 Adjust help documentation for file(GLOB), add topic notes 20612978c8 Add tests for `file(GLOB)` CONFIGURE_DEPENDS flag 3f4b81f540 Add glob verify support to XCode, VS, Ninja, and Makefile generators ca0befc2e1 Add `CONFIGURE_DEPENDS` flag support to cmFileCommand::HandleGlobCommand 599c93e22d Add cmGlobVerificationManager class, integrate with cmake and cmState Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1767
| * | Add tests for `file(GLOB)` CONFIGURE_DEPENDS flagShane Parris2018-04-0219-0/+159
| | |
* | | Merge topic 'wcdh-bare-features'Brad King2018-04-041-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | f38d050231 WCDH: introduce BARE_FEATURES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1869
| * | | WCDH: introduce BARE_FEATURESRolf Eike Beer2018-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows defining compat versions of some C/C++ features with the name of the keyword itself, so all code can look as if it was written for the new language standard.