summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Convert no source/build dir error to warningCraig Scott2019-01-223-3/+15
| | | | | | | | | | Temporarily restore previous behavior that allowed specifying no source or build directory to work, even though it was neither documented nor supported. This commit is expected to eventually be reverted to restore the fatal error for such cases. Relates: #18817
* Merge topic 'implicit-includes'Brad King2019-01-2256-0/+1560
|\ | | | | | | | | | | | | | | | | | | | | 5990ecb741 Compute implicit include directories from compiler output d751d2d2ed CMakeDetermineCompilerABI: set locale to C for try_compile() c765ae495a CMakeDetermineCompilerABI: pass verbose flag during compilation 8c5221fb1f try_compile: Preserve special characters in COMPILE_DEFINITIONS 15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2716
| * Compute implicit include directories from compiler outputChuck Cranor2019-01-2156-0/+1560
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CMakeParseImplicitIncludeInfo.cmake: new parser that extracts the compiler's include path from verbose output. If the parser cannot parse the output, we fall back to the old behavior. On osx we skip over framework directories (handled elsewhere). - CMakeDetermineCompilerABI.cmake: - use verbose flag in try_compile for ${src} - use new cmake_parse_implicit_include_info() to attempt extract implicit include directory path and if successful set CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES - CMakeCCompiler.cmake.in and CMakeCXXCompiler.cmake.in - preserve CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES value between runs in the same way CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES is preserved - Tests/RunCMake/ParseImplicitIncludeInfo: tests for parse based on the older Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in. The test runs a set of verbose compiler outputs collected from various machines through the parser and checks the results. New compiler files can be added by dropping input/output files in the ParseImplicitIncludeInfo/data subdirectory and then adding the new set of files to the ${targets} list in ParseImplicitIncludeInfo.cmake. There is a helper CMakeLists.txt in ParseImplicitIncludeInfo/data that can help with the generation of test input files. NOTE: the standard cmake pre-commit hook rejects verbose compiler output with trailing spaces... you have to manually edit them out. This shouldn't impact the test. Note that both the parser and the test code can use CMAKE_${LANG}_COMPILER_* variables such as ${CMAKE_CXX_COMPILER_ID} to decide how to parse verbose compiler output. For the test code, this requires us to save the variables values in the test input files. Fixes: #16291
* | Merge topic 'help-mark-default-generator'Brad King2019-01-221-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | dfd5ae7da7 Help: Mark default CMake generator with asterisk 6023fe7ff2 ccmake: Append rather than replace Generators section of docs 7408cd3929 cmake: Return generator docs directly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2682
| * | Help: Mark default CMake generator with asteriskArtur Ryt2019-01-181-0/+4
| |/ | | | | | | | | | | | | | | Required extracting default generator evaluation to explicit function, as Visual Studio generators get validated during their construction. Fixes: #18544
* | Merge topic 'crosscompiling_emulator-fix'Brad King2019-01-221-0/+6
|\ \ | | | | | | | | | | | | | | | | | | ab3b549ee0 CROSSCOMPILING_EMULATOR: Fix test generation for empty value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2834
| * | CROSSCOMPILING_EMULATOR: Fix test generation for empty valueKyle Edwards2019-01-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | If CROSSCOMPILING_EMULATOR was set to an empty string, and a test was generated with the executable as the command, CMake would segfault upon trying to generate the test file. Fix this. Fixes: #18819
* | | FindGit: Add imported targetKyle Edwards2019-01-214-0/+47
|/ /
* | Merge topic 'ExternalProject-non-cmake-source-subdir'Brad King2019-01-213-0/+34
|\ \ | | | | | | | | | | | | | | | | | | c09ec79981 ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2823
| * | ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCEBen Boeckel2019-01-173-0/+34
| | |
* | | Merge topic 'fortran-compiler-id'Brad King2019-01-2110-4/+61
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a080914274 Fortran: Add compiler ID/Version generator expressions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2804
| * | | Fortran: Add compiler ID/Version generator expressionsAndrew Paprocki2019-01-1810-4/+61
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds `Fortran_COMPILER_ID` and `Fortran_COMPILER_VERSION` generator expression support to match equivalent `C_COMPILER_ID`, `CXX_COMPILER_ID`, `C_COMPILER_VERSION`, and `CXX_COMPILER_VERSION` support. This is very helpful in the case where the C/C++ compiler suite is a different type of compiler from the platform Fortran compiler and projects use generator expressions to assign compiler flags and definitions. (e.g. `GNU` C/C++ and `SunPro` Fortran on Linux)
* | | Merge topic 'cmake-role-fix'Brad King2019-01-213-2/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 264bdac185 CMAKE_ROLE: Fix value for ctest --build-and-test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2820
| * | | CMAKE_ROLE: Fix value for ctest --build-and-testKyle Edwards2019-01-183-2/+19
| | |/ | |/| | | | | | | | | | --build-and-test builds a CMake project, so CMAKE_ROLE should be PROJECT. Fix this and add a test case.
* | | Merge topic 'ctest-json-polish'Brad King2019-01-217-11/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cae9d2a61a CTest: Teach --show-only= to reject unknown values 7370b02c36 CTest: Teach --show-only=json-v1 to filter out not-available tests 62fec84ad7 Tests: Fix RunCMake.CTestCommandLine case when no python is found 75a7a23746 Tests: Rename RunCMake.CTestCommandLine show-only test cases fecbc87608 Tests: Fix RunCMake.CTestCommandLine to actually check json-v1 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2812
| * | | CTest: Teach --show-only= to reject unknown valuesBrad King2019-01-174-0/+5
| | | |
| * | | CTest: Teach --show-only=json-v1 to filter out not-available testsBrad King2019-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Avoid exposing the internal special value that we use to track tests not available in the tested configuration. This also prevents clients from having to do the filtering themselves.
| * | | Tests: Fix RunCMake.CTestCommandLine case when no python is foundBrad King2019-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | Do not try to run the python checks if the python executable is not available.
| * | | Tests: Rename RunCMake.CTestCommandLine show-only test casesBrad King2019-01-175-12/+12
| | | | | | | | | | | | | | | | | | | | The current name was chosen from an earlier design iteration of the command-line option name. Rename the case to match the final name.
| * | | Tests: Fix RunCMake.CTestCommandLine to actually check json-v1Brad King2019-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | Add a file missing from commit 67209a9291 (Tests: Add cases for ctest --show-only=json-v1, 2018-11-01) to actually hook up the content check.
* | | | Merge topic 'command_file_link'Brad King2019-01-2110-0/+47
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f08ed8936 cmSystemTools: Silence CreateLink and CreateSymlink errors 593d986470 Tests: Avoid cross-device links in CREATE_LINK test 9a3d85cfc5 Tests: Skip symlink tests on Windows e68ea269d7 Tests: CREATE_LINK subcommand negative test case 45aa9c65a1 Tests: file CREATE_LINK subcommand test cases 8bb7562f1a Help: Add documentation for file(CREATE_LINK) subcommand 81650e488c cmFileCommand: Add CREATE_LINK subcommand Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2759
| * | | | Tests: Avoid cross-device links in CREATE_LINK testTushar Maheshwari2019-01-163-1/+20
| | | | | | | | | | | | | | | | | | | | Add a test for COPY_ON_ERROR to cover that scenario.
| * | | | Tests: Skip symlink tests on WindowsTushar Maheshwari2019-01-165-10/+10
| | | | |
| * | | | Tests: CREATE_LINK subcommand negative test caseTushar Maheshwari2019-01-164-0/+7
| | | | |
| * | | | Tests: file CREATE_LINK subcommand test casesTushar Maheshwari2019-01-164-0/+21
| |/ / /
* | | | Merge topic 'find-package-resolve-symlinks'Brad King2019-01-216-0/+63
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS a5e948a36f find_package: optionally resolve symlinks when discovering packages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2798
| * | | | find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKSDavid Aguilar2019-01-166-0/+63
| |/ / /
* | | | Merge topic 'submit-url'Brad King2019-01-212-6/+4
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2915a75615 CTest: Add documentation and release notes for SubmitURL d6475daa79 Modules/CTest: Set SubmitURL 938f06fda6 ctest_submit: Add parameter SUBMIT_URL 65e725c957 CTest: Add option SubmitURL 65f1fc9d63 CTest: Add function GetSubmitURL 2bedd5fb7c ctest_submit: Remove submit method from log output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2719
| * | | ctest_submit: Remove submit method from log outputRegina Pfeifer2019-01-162-6/+4
| |/ /
* | | Merge topic 'automoc-test-in-place'Brad King2019-01-181-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 1c08652580 Tests: Fix Qt4And5Automoc tests to work on in-source build Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2817
| * | | Tests: Fix Qt4And5Automoc tests to work on in-source buildBrad King2019-01-171-4/+4
| |/ / | | | | | | | | | | | | | | | | | | Use a distinctly-named build directory for each case so that neither one uses its own source tree as the build tree. Fixes: #18159
* | | Merge topic 'GHS_updates'Brad King2019-01-18108-71/+1087
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 21ab58d3f8 GHS: Update test suite 72e0c115b7 GHS: Add Compiler ID detection 436cc5e991 GHS: try_compile() now uses GHS platform variables 4a1ec0de3d GHS: Fix toolset selection 1a66acdef2 GHS: Append ".gpj" to target name when generating build command 0c9e47d7cd GHS: Integrity Application updates 8044318431 GHS: Add support for some of the source file properties 73092b2213 GHS: Add support for object libraries ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2231
| * | GHS: Update test suiteFred Baksik2019-01-1619-104/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Allow for testing default toolset settings If CMake_TEST_GreenHillsMULTI_config is not defined then just run the GHS tests using defaults. -- Handle paths that contain spaces -- Update test suite to use "-non_shared" linker option Fixes linking issue if GHS is not shipped with shared libraries -- Other minor cleanup
| * | GHS: Add Compiler ID detectionFred Baksik2019-01-163-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Detect GHS compiler and version Detect ARCHITECTURE_ID for PPC / ARM / 86 targets Detect PLATFORM_ID for Integrity and Integrity178 platforms Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86 -- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator Works around issue with some GHS compilers not setting __ghs__ compiler define -- Tweak Compiler ID checking so major id of 002017 is not replaced with 217 -- Prefer try_compile() library targets when testing for working GHS compilers -- Avoid CMake errors if reading past end of file for checking if file is PE executable
| * | GHS: try_compile() now uses GHS platform variablesFred Baksik2019-01-163-14/+3
| | | | | | | | | | | | | | | | | | | | | -- Forward GHS platform variables to try_compile() CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only worked for source signature try_compile() -- Update tests to no longer add GHS platform variables to try_compile() -- Avoid linker error in GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt by building library
| * | GHS: Append ".gpj" to target name when generating build commandFred Baksik2019-01-163-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Add test demonstrating issue -- In the case of executable targets the target name is usually the same as used in "-o filename" But for static libraries the target name is usually "-o libname.a" "gbuild.exe target" will build whatever target matches against even the output from the compiler or linker But the targets in "cmake --build . --target name" should be target names in CMakeLists.txt not the actual filenames So change the "name" to "name.gpj" so it matches the target name in CMakeLists.txt. Fixes #15975
| * | GHS: Integrity Application updatesFred Baksik2019-01-166-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Check the property "ghs_integrity_app" on executables to set [INTEGRITY Application] If the property is not set then check if an integrate file is one of the source files (.int file). Dynamic Downloads that do not have an integrate file can use this property along with setting the compiler flag "-dynamic". -- Remove parsing for -dynamic flag; it is only used to print a comment The MULTI GUI will show if it is a Monolith or Dynamic Download application -- Use project references to specify which executables are part of the Integrity Application Usually Implicit Dependency Analysis will ensure that executable targets become part of the application. This does not work for Dynamic Download without integrate files. Use `add_dependencies(dd vas)` to mark that the vas target is part of dd target. -- Update file locations in the Integrate files.
| * | GHS: Cleanup how source files are listedFred Baksik2019-01-162-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Sort the items of the project files, previously they were unsorted The layout is similar to Visual Studio projects -- Do not make a make a tree of directories and projects files The main project file is in the binary folder The sub-project files are located in the project object directory This is similar to the Makefile generator -- Allow the creation of a single project file If the variable or target property GHS_NO_SOURCE_GROUP_FILE is set then all sources will be listed in the main project file
| * | GHS: Update test suiteFred Baksik2019-01-16101-67/+921
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Update test suite so that CMake can use multiple toolsets CMake_TEST_GreenHillsMULTI_config ghs_config_name ghs_target_arch ghs_tools ghs_toolset_name ghs_os_root ghs_os_dir ghs_target_platform ghs_bsp_name -- Change ARM Integrity test to generic Integrity test Add Monolithic build test -- Add other GHS generator tests
* | Merge topic 'cmake_role-global-property'Brad King2019-01-1710-0/+51
|\ \ | | | | | | | | | | | | | | | | | | 4568d046c4 Properties: Add CMAKE_ROLE global property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2805
| * | Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-1710-0/+51
| |/ | | | | | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* | Merge topic 'vs-debug-utility-targets'Brad King2019-01-178-72/+84
|\ \ | | | | | | | | | | | | | | | | | | 22b43b0009 VS: Add support for VS_DEBUGGER_* properties on custom targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2794
| * | VS: Add support for VS_DEBUGGER_* properties on custom targetsNils Gladitz2019-01-168-72/+84
| |/ | | | | | | | | | | Visual studio itself supports the corresponding `LocalDebugger*` properties on utility targets; support generating them from CMake as well.
* | Merge topic 'fix_csharp_defines'Brad King2019-01-173-0/+83
|\ \ | |/ |/| | | | | | | | | a541d113e6 VS: Honor target_compile_definitions for C# projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2809
| * VS: Honor target_compile_definitions for C# projectsWil Stark2019-01-163-0/+83
| | | | | | | | Fixes: #18698
* | Merge topic 'semi-warnings'Brad King2019-01-162-11/+13
|\ \ | | | | | | | | | | | | | | | | | | b056bc3425 Fix most clang -Wextra-semi-stmt warnings in C++ files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2795
| * | Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-152-11/+13
| |/ | | | | | | Suppress one in code generated by flex.
* | Merge topic 'autogen_adaptive_warning'Brad King2019-01-161-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | 5fe18eee13 Autogen: Adaptive missing Qt warning f2f1661334 Autogen: Add and use QtAutoGen::Tools method b2343ff086 Autogen: Fix rcc validity check Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2806
| * Autogen: Adaptive missing Qt warningSebastian Holtermann2019-01-151-1/+1
| | | | | | | | | | This makes the warning message for a missing Qt use the requested Qt version in the message text.
| * Autogen: Add and use QtAutoGen::Tools methodSebastian Holtermann2019-01-151-1/+1
| |