summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Apple: Properly lookup XCTest for iOS and tvOSGregor Jasny2019-05-112-0/+18
| | | | Closes: #19172
* VS: Provide the default platform name to project codeBrad King2019-04-192-0/+2
| | | | | | | | | | | | | | | | | | The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio generators based on `CMAKE_GENERATOR_PLATFORM` or some default. Prior to the VS 2019 generator, the default was always `Win32`. However, for the `Visual Studio 16 2019` generator, the default is based on the host platform. Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for use by project code. This is particularly useful in toolchain files because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so `CMAKE_VS_PLATFORM_NAME` is not yet known. Of course the toolchain file author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that will be used. Fixes: #19177
* Fix implicit include directory extraction for adaptive relative pathsBrad King2019-04-085-0/+45
| | | | | | | | | | In some cases GCC reports *relative* implicit include directories. They are computed adaptively with respect to the current working directory such that the effective implicit include directory is an unchanging absolute path. Teach our implicit include directory extraction to recognize such paths and normalize them. Fixes: #19133
* Tests: Teach RunCMake.ParseImplicitIncludeInfo to match output by regexBrad King2019-04-0816-17/+17
|
* Tests: Clarify hand-written cases in RunCMake.ParseImplicitIncludeInfoBrad King2019-04-085-2/+2
|
* Merge branch 'implicit-includes' into release-3.14Brad King2019-03-2916-70/+78
|\ | | | | | | Merge-request: !3157
| * ParseImplicitIncludeInfo: Canonicalize implicit include dirsBrad King2019-03-2916-70/+78
| | | | | | | | | | | | | | | | | | | | | | | | The implicit include directory extraction added by commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2) leaves paths like `/usr/lib/../include` unchanged. Fix the logic to canonicalize such paths (e.g. to `/usr/include`) as we do for implicit link directories already. This is important to ensure the set of implicit directories is represented in the same form as the include directories that will be compared to them. Issue: #19095
* | Restore support for include_directories() in toolchain filesBrad King2019-03-255-0/+17
|/ | | | | | | | | | | | | | | | Any `include_directories()` calls in toolchain files are used during our ABI detection step even though it does not include any system headers. Since commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2), that check is also used to detect implicit include directories. Any `include_directories()` in a toolchain file are detected as implicit and later excluded from explicit specification on compiler command lines, thus breaking the purpose of the calls in the first place. Fix the implicit include directory detection step to avoid using paths from `include_directories()` calls in the toolchain file. Fixes: #19079
* Merge branch 'install-no-imported-global' into release-3.14Brad King2019-03-074-0/+9
|\ | | | | | | Merge-request: !3071
| * install: Do not crash on imported global targetBrad King2019-03-074-0/+9
| | | | | | | | | | | | | | | | | | | | | | Since commit e89ad0f94e (install: Allow installing targets created in another directory, 2018-06-18, v3.13.0-rc1~407^2) the `install(TARGETS)` command may find a global-scoped target outside the calling directory. Ignore an `IMPORTED GLOBAL` target if it is found in this way. Imported targets cannot be installed, and trying to do so violates internal invariants. Fixes: #19022
* | iOS: Add IOS variableRuslan Baratov2019-03-051-0/+4
|/ | | | | | | Since commit 11da882a12 (Apple: Introduce separate system name for iOS, tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) we support setting `CMAKE_SYSTEM_NAME` to `iOS`. Existing iOS toolchain files already set `IOS` as a short-hand variable, so do the same here.
* Merge branch 'cmake_role-vs-fix' into release-3.14Brad King2019-02-272-0/+7
|\ | | | | | | Merge-request: !3028
| * CMAKE_ROLE: Fix value in --build for Visual Studio generatorsKyle Edwards2019-02-262-0/+7
| | | | | | | | Fixes: #18990
* | Merge branch 'restore-min-cmake-3.1' into release-3.14Brad King2019-02-271-3/+3
|\ \ | |/ |/| | | Merge-request: !3021
| * Tests: Restore support for CMake 3.1 through 3.6 with MSVCBrad King2019-02-261-3/+3
| | | | | | | | | | | | | | | | | | | | The change in commit a5dd159990 (Tests: Fix RunCMake.try_compile CxxStandard case on MSVC, 2017-09-22, v3.10.0-rc1~63^2) introduced use of `if()` conditions not supported until CMake 3.7, so while it was intended to restore support for CMake versions prior to 3.9, it actually only did so for 3.7 and 3.8. Backport the logic to work with CMake 3.1. Fixes: #18987
* | EXCLUDE_FROM_ALL: Don't warn if installing target excluded from allCraig Scott2019-02-211-1/+0
|/ | | | | | | | | The original warning pre-dates support for install components. There are now legitimate scenarios where an install(TARGETS) command may list a target that is excluded from all, e.g. hierarchical projects that will never install the component such a target belongs to. Fixes: #18938
* Merge branch 'genex-GENEX_EVAL-fix-recursion' into release-3.14Brad King2019-02-132-4/+5
|\ | | | | | | Merge-request: !2954
| * genex: Fix erroneous handling of recursion for $<GENEX_EVAL:>Marc Chevrier2019-02-132-4/+5
| | | | | | | | Fixes: #18894
* | VS: Fix nowarn compiler option to accept warning numbers.Wil Stark2019-02-073-0/+79
|/ | | | | | Warning disables are transferred to the VS IDE `<NoWarn>` node. Fixes: #18878
* Merge topic '17870-iphone-friendly-cmake'Brad King2019-02-057-94/+73
|\ | | | | | | | | | | | | | | | | e8ee8cab97 Xcode: Completely disable code signing for compiler id detection 11da882a12 Apple: Introduce separate system name for iOS, tvOS, and watchOS 36cf44a7a3 Tests: Isolate RunCMake.XcodeProject per-device cases from host arch Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2392
| * Apple: Introduce separate system name for iOS, tvOS, and watchOSGregor Jasny2019-02-047-64/+38
| | | | | | | | | | | | | | | | | | | | | | - Remove code signing requirements for non-macOS - Do not set deployment target for non-macOS - Build static library for compiler feature detection for non-macOS - Use framework to run CompilerId tests for watchOS - Port tests to new SDK handling - Add new Apple cross-compiling section to toolchain documentation Closes: #17870
| * Tests: Isolate RunCMake.XcodeProject per-device cases from host archBrad King2019-02-041-30/+35
| | | | | | | | | | Run all host cases before per-device cases. Do not expose the host `CMAKE_OSX_ARCHITECTURES` environment value to the per-device tests.
* | Merge topic 'vs-wince-deployment'Brad King2019-02-041-0/+8
|\ \ | | | | | | | | | | | | | | | | | | f5d72be57a VS: Fix deployment for WinCE projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2907
| * | VS: Fix deployment for WinCE projectsWil Stark2019-02-011-0/+8
| | | | | | | | | | | | Fixes: #18868
* | | Merge topic 'set-env-warning'Brad King2019-02-043-0/+8
|\ \ \ | |/ / |/| | | | | | | | | | | | | | cb01b8c8ba set: warn of extra arguments after ENV value. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2903
| * | set: warn of extra arguments after ENV value.Taylor Holberton2019-02-013-0/+8
| | | | | | | | | | | | Fixes: #18842
* | | Merge topic 'implicit-incs-cleanup'Brad King2019-02-0117-1/+332
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 1293ed8507 ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmake eaf53158f4 CrayPrgEnv/ParseImplicitIncludes: simplify for new implict include parser ef8f237686 ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray fix Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2894
| * | ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray fixChuck Cranor2019-01-2917-1/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add implicit include parser for PGI compiler ID. PGI verbose output for CXX differs from C and Fortran, so CXX is broken out into its own case. The C and Fortran compilers take "-YI,path" and "-Mnostdinc" to change or disable the builtin include path. The last arg on the command line appears to override previous args (e.g. "-YI,path1 -YI,path2" will set the path to "path2" ... the previous "-YI,path1" gets undone). The CXX compiler verbose output reports with "-I" rather than "-stdinc" for the built in path. In addition with CXX "-Mnostdinc" does not completely zero the include path (e.g. "#include <stdio.h>" still works with "-Mnostdinc"... "-I/usr/include" still shows up in the verbose output). Minor adjustments to get the SunPro parser to handle Fortran as well. Fixes for Cray compiler support (Modules/Compiler/Cray-{C,CXX}.cmake): The *_COMPILE_OPTION flags contain options like "-h c99,gnu" ... these options need to be in double quotes (they are currently not). Otherwise, cmake treats them as lists and tries to run the compiler with "-h;c99,gnu" and fails when it is "Detecting C compile features"... Also, the Cray-CXX.cmake contains "__compiler_cray(C)" instead of "__compiler_cray(CXX)" -- this error prevents the correct VERBOSE flags for CXX from being defined which prevents the implicit include parser from running. Add additional test cases for PGI and SunPro Fortran to the Tests/RunCMake/ParseImplicitIncludeInfo area.
* | | Merge topic 'set-validate-cache-type'Brad King2019-01-313-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 198650ae73 set: warn if CACHE type is not recognized Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2874
| * | | set: warn if CACHE type is not recognizedTaylor Holberton2019-01-303-0/+7
| | |/ | |/|
* | | Merge topic 'autogen-qt-version-from-dirprops'Brad King2019-01-316-1/+72
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 91d98542d2 Merge branch 'autogen-qt-version-from-dirprops-release' into autogen-qt-version-from-dirprops-master 062d21c36a Autogen: Read the Qt version from directory properties as well 17ac7c4024 Tests: add cases for providing Qt5Core_VERSION manually 2df6d69014 AutoGen: query Qt5 version from directory properties b598dfb65e Tests: add cases for providing Qt5Core_VERSION manually Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2883
| * | | Tests: add cases for providing Qt5Core_VERSION manuallyBen Boeckel2019-01-306-1/+72
| | | |
* | | | Merge topic 'restore-install-late-framework'Brad King2019-01-313-0/+14
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f64099cf5e Merge branch 'backport-restore-install-late-framework' 95210d027a macOS: Restore compatibility for setting FRAMEWORK after install() d9dd68cb60 macOS: Restore compatibility for setting FRAMEWORK after install() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !2878
| * | | macOS: Restore compatibility for setting FRAMEWORK after install()Brad King2019-01-303-0/+14
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `FRAMEWORK` target property affects the way the `install()` command treats the target and so should be set first. Our implementation assumed that this was always the case and led to an assertion failure. Prior to CMake 3.12 this was visible only when using an explicit `LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c762 (install: add NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made it possible with a simple `LIBRARY DESTINATION`. Fully supporting out-of-order specification will require non-trivial refactoring to defer install generator creation to generate time. For now simply restore the old behavior of installing the framework to the library destination and warn about the case. Fixes: #18848
* | | Merge topic 'fetchcontent-reduce-boilerplate'Brad King2019-01-3010-0/+52
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | a94355c7b7 FetchContent: Add new command FetchContent_MakeAvailable() 611d5274de Sphinx: Add limited support for nested variables in docs 1a07e1b47d FetchContent: Trivial doc corrections Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2830
| * | FetchContent: Add new command FetchContent_MakeAvailable()Craig Scott2019-01-2610-0/+52
| | | | | | | | | Relates: #18754
* | | Merge topic 'add_consistent_verbose_build_flag'Brad King2019-01-2911-1/+50
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 66801f4d40 cmake: Add tests for verbose output to --build mode 439fe2e253 cmake: Add options for verbose output to --build mode 638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments 3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option 1a45266cb5 cmGlobalGenerator: Add a class that represent the build command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2708
| * | | cmake: Add tests for verbose output to --build modeRobert Maynard2019-01-2811-1/+50
| | | |
* | | | VS: Teach VS 2019 generator to select host tools matching host archBrad King2019-01-282-1/+14
| | | | | | | | | | | | | | | | | | | | This generator is new so we can introduce the long-desired behavior of selecting ``host=x64`` tools by default on x64 hosts.
* | | | VS: Add support for explicit 32-bit toolset selection via host=x86Brad King2019-01-286-4/+10
| |_|/ |/| | | | | | | | | | | Generalize the ``host=x64`` option in `CMAKE_GENERATOR_TOOLSET` to also support ``host=x86``.
* | | Merge topic 'cmake-E-compare_files-eol'Brad King2019-01-2810-0/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a5098cad94 cmake: Add --ignore-eol option to `-E compare_files` command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2778
| * | | cmake: Add --ignore-eol option to `-E compare_files` commandTaylor Braun-Jones2019-01-2810-0/+12
| | | | | | | | | | | | | | | | Fixes: #13007
* | | | Merge topic 'get_filename_component_last_ext'Brad King2019-01-281-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2a9220c34d Help: Add notes for topic 'get_filename_component_last_ext' edda30d0f5 Tests: Add tests for LAST_EXT and NAME_WLE 7a25ef326b Help: Add documentation for new get_filename_component components e50a36df48 cmGetFilenameComponentCommand: Add more components Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2853
| * | | | Tests: Add tests for LAST_EXT and NAME_WLETushar Maheshwari2019-01-241-1/+3
| | |/ / | |/| |
* | | | ParseImplicitIncludeInfo: add Fortran implicit include handlingChuck Cranor2019-01-2515-6/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently cmake is only setting CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES the first time it runs (the implicit includes parser is only run when the cache variables are initially populated). It is left unset during additional runs. This behavior is both confusing and inconsistent. Modify CMakeFortranCompiler.cmake.in to preserve the value of CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES so that cmake's Fortran behavior matches C and CXX (i.e. CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES retains its value across runs). The implicit includes variable may not be as useful for Fortran as it is for C and CXX, but we do want cmake to be consistent in how it is handled. Adjust CMakeParseImplicitIncludeInfo to parse verbose Fortran output for Cray and XL compiler IDs (GNU and clang were already ok since they use the same verbose output format as they do with C/CXX). Allow Tests/RunCMake/ParseImplicitIncludeInfo/data/CMakeLists.txt to generate test inputs for Fortran too, and add some sample Fortran input files for the Tests/RunCMake/ParseImplicitIncludeInfo test.
* | | | ParseImplicitIncludeInfo: handle/add SunPro, XL, and -nostdinc test casesChuck Cranor2019-01-2532-2/+650
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add parser code for compiler IDs SunPro and XL. For SunPro, /usr/include appears to be hardwired in and it does not have a -nostdinc-type flag. For XL, the "xlc" and "xlC" commands determine if you are C or C++ based on input filename. So compiling x.c with "xlC" reverts to C and compiling x.cc with "xlc" upgrades to CXX. System include paths are specified by: -qc_stdinc=[path] and -qgcc_c_stdinc=[path] (for C) -qcpp_stdinc=[path] and -qgcc_cpp_stdinc=[path] (for CXX) If you specify "-qnostdinc" then the above flags are ignored. Specifying an empty path reverts the value to the default path (e.g. "-qgcc_c_stdinc=" reverts that to the default). Adjust the code to handle parsing the case where the user specifies additional compiler include flags via CMAKE_C_FLAGS/CMAKE_CXX_FLAGS. For example: "-DCMAKE_C_FLAGS=-nostdinc" ... note that gcc and clang output slightly differ when -nostdinc is specified (clang skips printing 'search starts here:' with the angle brackets, gcc always prints it). Enable sunos-{C,CXX}-SunPro test cases and add XL test cases. Also add a few -nostdinc style tests.
* | | Merge topic 'max-recursion-depth'Brad King2019-01-2590-0/+657
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a6982cff0d cmMakefile: Impose maximum recursion limit Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Juraj Oršulić <juraj.orsulic@fer.hr> Merge-request: !2746
| * | | cmMakefile: Impose maximum recursion limitKyle Edwards2019-01-2390-0/+657
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | In order to keep infinitely-recursive scripts from causing a stack overflow in the CMake executable, CMake now imposes a maximum recursion limit before issuing an error message. The limit can be adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH. Fixes: #18694
* | | Merge topic 'exclude_from_all'Brad King2019-01-253-0/+61
|\ \ \ | |/ / |/| | | | | | | | | | | | | | dc6888573d Pass EXCLUDE_FROM_ALL from directory to targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2816
| * | Pass EXCLUDE_FROM_ALL from directory to targetsZack Galbreath2019-01-213-0/+61
| | | | | | | | | | | | | | | | | | When a target is created it now inherits the EXCLUDE_FROM_ALL property from its directory. This change makes it possible to include a target in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.