summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'WCDH-multi-file'Brad King2014-11-2614-23/+115
|\ | | | | | | | | 4cf5179c WCDH: Make it possible to generate multiple files.
| * WCDH: Make it possible to generate multiple files.Stephen Kelly2014-11-2414-23/+115
| | | | | | | | | | | | Extend the write_compiler_detection_header interface to allow specifying a location for supplementary files, and getting the list of resulting files as a variable.
* | Merge topic 'C-features-Wundef'Brad King2014-11-262-0/+14
|\ \ | | | | | | | | | | | | d0af0fae WCDH: Make the header -Wundef safe for the C language.
| * | WCDH: Make the header -Wundef safe for the C language.Stephen Kelly2014-11-252-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The __STDC_VERSION__ macro may be defined or not depending on the implementation dialect of C. Test that it is defined before testing its value. The CXX tests do not need such a change because they define __cplusplus in all dialects.
* | | Merge topic 'default-lang-dialect-for-master'Brad King2014-11-255-42/+101
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f327a9fd Merge branch 'default-lang-dialect' into step2 36bb100e Fix the test for running the CxxDialog unit test. a3d0ae17 Features: Fix the default C dialect for Clang and GNU. 49e2b689 Features: Fix references to CXX compiler version in Clang-C.cmake. 7565ab2c Features: Test the CXX compiler only if it has features.
| * \ \ Merge branch 'default-lang-dialect' into step2Stephen Kelly2014-11-205-42/+101
| |\ \ \ | | |_|/ | |/| | | | | | | | | | Conflicts: Modules/Compiler/Clang-C.cmake
| | * | Fix the test for running the CxxDialog unit test.Stephen Kelly2014-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing versions have been used since commit v3.1.0-rc1~635^2~8 (cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties., 2013-10-13), but further discussions since then increased the initial minimum compiler versions this feature is available for.
| | * | Features: Fix the default C dialect for Clang and GNU.Stephen Kelly2014-11-204-12/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default: http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379 GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default: https://gcc.gnu.org/gcc-5/changes.html Test that the default compiler settings result in the expected dialect macros being defined for both C and CXX. Remove the unused main.c file from the CompileFeatures unit test.
| | * | Features: Test the CXX compiler only if it has features.Stephen Kelly2014-11-181-28/+30
| | |/ | | | | | | | | | | | | If using different C and CXX compilers, we might not have a feature-full CXX compiler at this point.
* | | Merge topic 'file-GENERATE-rerun'Brad King2014-11-254-0/+38
|\ \ \ | | | | | | | | | | | | | | | | 26e98c34 file(GENERATE): Re-run cmake when appropriate.
| * | | file(GENERATE): Re-run cmake when appropriate.Stephen Kelly2014-11-184-0/+38
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-run if the input file changes or if the output file is removed. This only works with the Makefile generators currently. The limitation of the Ninja generator is tracked as issue #15256. The IDE generators will need larger refactoring as they currently rely on being able to determine the depends and output files at the start of generate-time, which is too early for the file(GENERATE) case.
* | | Merge topic 'custom-command-byproducts'Brad King2014-11-2524-0/+201
|\ \ \ | |/ / |/| | | | | | | | | | | 557aef0b ExternalProject: Add options to specify BYPRODUCTS (#14963) e15a7075 Add an option for explicit BYPRODUCTS of custom commands (#14963)
| * | ExternalProject: Add options to specify BYPRODUCTS (#14963)Brad King2014-11-174-0/+31
| | | | | | | | | | | | | | | | | | | | | The external project's build process may generate byproducts on which other rules in the driving project's build later depend. Provide a way for the driving project to specify what byproducts it expects to be made available by the custom commands that drive the external project.
| * | Add an option for explicit BYPRODUCTS of custom commands (#14963)Brad King2014-11-1422-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common idiom in CMake-based build systems is to have custom commands that generate files not listed explicitly as outputs so that these files do not have to be newer than the inputs. The file modification times of such "byproducts" are updated only when their content changes. Then other build rules can depend on the byproducts explicitly so that their dependents rebuild when the content of the original byproducts really does change. This "undeclared byproduct" approach is necessary for Makefile, VS, and Xcode build tools because if a byproduct were listed as an output of a rule then the rule would always rerun when the input is newer than the byproduct but the byproduct may never be updated. Ninja solves this problem by offering a 'restat' feature to check whether an output was really modified after running a rule and tracking the fact that it is up to date separately from its timestamp. However, Ninja also stats all dependencies up front and will only restat files that are listed as outputs of rules with the 'restat' option enabled. Therefore an undeclared byproduct that does not exist at the start of the build will be considered missing and the build will fail even if other dependencies would cause the byproduct to be available before its dependents build. CMake works around this limitation by adding 'phony' build rules for custom command dependencies in the build tree that do not have any explicit specification of what produces them. This is not optimal because it prevents Ninja from reporting an error when an input to a rule really is missing. A better approach is to allow projects to explicitly specify the byproducts of their custom commands so that no phony rules are needed for them. In order to work with the non-Ninja generators, the byproducts must be known separately from the outputs. Add a new "BYPRODUCTS" option to the add_custom_command and add_custom_target commands to specify byproducts explicitly. Teach the Ninja generator to specify byproducts as outputs of the custom commands. In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets that link, the byproducts must be specified as outputs of the link rule that runs the commands. Activate 'restat' for such rules so that Ninja knows it needs to check the byproducts, but not for link rules that have no byproducts.
* | | Merge topic 'ninja-minor-refactoring'Brad King2014-11-171-5/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | 67bd514a Ninja: Refactor restat to be a string internally ef42e57d Ninja: Use a TARGET_FILE variable to hold the link output file 592644c4 Tests/BuildDepends: Drop unneeded help for Ninja
| * | Tests/BuildDepends: Drop unneeded help for NinjaBrad King2014-11-141-5/+1
| | | | | | | | | | | | | | | The extra post-modification invocations of 'ninja' does not seem to be needed anymore for the BuildDepends test to pass.
* | | Merge topic 'console-pool'Brad King2014-11-179-0/+37
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 2d75d7e5 Help: Add notes for topic 'console-pool' f42d86f0 Ninja: Implement USES_TERMINAL using the console pool if available f281ae01 Ninja: Remove unused declaration d5eae556 Ninja: factor out the test for console pool support 4d1fedf4 Give the interactive cache editor the USES_TERMINAL property fe5d6e8c Add USES_TERMINAL option for custom commands ad6ee426 Rename doing_verbatim to doing_nothing
| * | Add USES_TERMINAL option for custom commandsPeter Collingbourne2014-11-149-0/+37
| | | | | | | | | | | | | | | | | | Teach the add_custom_command and add_custom_target commands a new USES_TERMINAL option. Use it to tell the generator to give the command direct access to the terminal if possible.
* | | Merge topic 'test-custom-command-errors'Brad King2014-11-1729-0/+85
|\ \ \ | |/ / | | | | | | | | | 39baf728 Tests: Test add_custom_command and add_custom_target error cases
| * | Tests: Test add_custom_command and add_custom_target error casesBrad King2014-11-1429-0/+85
| | | | | | | | | | | | | | | Add RunCMake.add_custom_command and RunCMake.add_custom_target tests to cover the error messages for these commands.
* | | Merge topic 'string-SUBSTRING-truncate'Brad King2014-11-172-6/+9
|\ \ \ | |/ / |/| | | | | | | | 474bbb9d string: Tolerate SUBSTRING length exceeding end index
| * | string: Tolerate SUBSTRING length exceeding end indexDomen Vrankar2014-11-132-6/+9
| | | | | | | | | | | | | | | | | | string SUBSTRING command now ignores length if it points past end of string and uses end of string instead. String SUBSTRING tests now cover more corner cases.
* | | Merge topic 'fix-config-dependent-tests'Brad King2014-11-141-3/+6
|\ \ \ | |/ / |/| | | | | | | | 0854d45b Tests: Build config-dependent tests in the same config they run
| * | Tests: Build config-dependent tests in the same config they runBrad King2014-11-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | The CPackComponentsForAll-*, GeneratorExpression, and TestsWorkingDirectory tests all build binaries that they later need to run or package for the tested configuration. Tell the 'ctest --build-and-test' call to use the same configuration for driving the build process.
* | | Merge topic 'file-GENERATE-source'Brad King2014-11-1314-0/+85
|\ \ \ | | | | | | | | | | | | | | | | | | | | b80557c7 file(GENERATE): Evaluate early to allow generating source files 0019d54b Genex: Fix whitespace issue.
| * | | file(GENERATE): Evaluate early to allow generating source filesStephen Kelly2014-11-1214-0/+85
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation files must be known before cmTargetTraceDependencies attempts to find them, but we must actually generate the files after cmTargetTraceDependencies, as that can add to target SOURCES. The limitation is that the generated output name must not depend on the SOURCES of a target if the generated file is used by that target. Mark the output files as GENERATED so that trace dependencies does not expect them to already exist in the filesystem. Move the invokation of ForceLinkerLanguage in the Generate logic to after the generated file names are known. ForceLinkerLanguage tries to determine the sources of a target (in order to determine an already-known language) and otherwise fails to get information about the generated file. Test that the output of file(GENERATE) can be used as a target source file and that accessing the target SOURCES in the name of the output file is an error. Accessing the TARGET_OBJECTS would be a similar error if it was legal to use that generator expression in this context. That is not currently possible and is a different error condition, so test the current error output as a reminder to change the expected output if that becomes possible in the future. Test that generated rule files resulting from cmTargetTraceDependencies appear in the SOURCES generated in the output file.
* | | Merge topic 'ExternalProject_UPDATE_DISCONNECTED'Brad King2014-11-132-0/+108
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 3c497f11 Help: Add notes for topic 'ExternalProject_UPDATE_DISCONNECTED' aba5cec6 ExternalProject: Add unit tests for UPDATE_DISCONNECTED 3f606fa7 ExternalProject: Add UPDATE_DISCONNECTED option c0b749cf ExternalProject: Always add a command to a step
| * | ExternalProject: Add unit tests for UPDATE_DISCONNECTEDDaniele E. Domenichelli2014-11-062-0/+108
| | |
* | | Merge topic 'fix_link-line-dedup_regression'Brad King2014-11-115-0/+37
|\ \ \ | | |/ | |/| | | | | | | 4db31095 Fix link line order when shared libraries are de-duplicated
| * | Fix link line order when shared libraries are de-duplicatedDaniele E. Domenichelli2014-11-105-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in generated link lines, 2014-07-30) we de-duplicate shared library targets on the link line. However, some toolchains will fail linking if an executable is linking to a shared library that is not used directly and a static library that depends on the shared one. The linker may not keep the reference to the shared library the first time and then the symbols needed by the static library may not be found. Fix this by reversing the direction of the for loop that removes the duplicate shared libraries, in order to ensure that the last occurrence of the library is left instead of the first one. Extend Tests/Dependency with a case covering this behavior. Create an executable that links to a shared library and a static library but only needs the shared library as a dependency of the static library. Co-Author: Brad King <brad.king@kitware.com>
| * | Merge branch 'revert-definition-map-lookup' into releasev3.1.0-rc1Brad King2014-10-245-0/+266
| |\ \
* | \ \ Merge topic 'update-curl'Brad King2014-11-101-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c02c747b Tests: Update expected CTestTestFailedSubmit output a427ed0c curl: Skip sanity check that triggers Clang warning 17b24d55 curl: Disable warnings to avoid changing 3rd party code 4c3bd340 curl: Skip check for inet_pton on Windows 54cb23c6 curl: Restore installation of OpenSSL DLLs c50f0327 curl: Restore CURL_CA_BUNDLE option 681693c9 curl: Restore CMake-specific zlib selection code 10d80b68 curl: Restore CMake-specific test and install code 19593042 curl: Configure build to work within CMake cf54aebb curl: Fix curl.h inclusion of curlbuild.h from CMake sources c17e3207 curl: Use arch-aware CHECK_TYPE_SIZE results 1f7cb7e2 curl: Fix detection of headers with dependencies b18c9044 curl: Drop inclusion of .rc file for static lib 860f0a2d curl: Select file APIs on Windows 5a3b55ed curl: Do not use 'dl' on HP-UX 59242702 curl: Simplify if() conditions on check result variables ...
| * | | | Tests: Update expected CTestTestFailedSubmit outputBrad King2014-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | Add another error message that curl now produces.
* | | | | Merge topic 'make-fortran-preprocessor-assembly-targets'Brad King2014-11-103-0/+38
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b6b37e30 Makefile: Add assembly and preprocessed targets for Fortran 0842b084 Makefile: Refactor checks for lang-specific targets and export compile cmds
| * | | | | Makefile: Add assembly and preprocessed targets for FortranTim Gallagher2014-11-103-0/+38
| | |_|_|/ | |/| | | | | | | | | | | | | Extend the FortranOnly test to cover "make <src>.i" targets.
* | | | | file(GENERATE): Use permissions of input file if present.Stephen Kelly2014-11-045-0/+28
|/ / / /
* | | | ExternalProject: Add unit testsDaniele E. Domenichelli2014-11-036-1/+89
| | | |
* | | | Merge topic 'fix-configure_file-COPYONLY'Brad King2014-11-033-0/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1531df2b configure_file: Warn about unknown arguments 4abbb140 Qt4: Fix configure_file call to use COPYONLY, not COPY_ONLY bd7ba8e2 KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY e9282782 Help: Fix configure_file call to use COPYONLY, not COPY_ONLY
| * | | | configure_file: Warn about unknown argumentsBrad King2014-10-313-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the RunCMake.configure_file test with a case covering possible common typos of the COPYONLY option. Reported-by: Iosif Neitzke <iosif.neitzke@gmail.com>
* | | | | Merge topic 'ExternalProject_CMAKE_CACHE_DEFAULT_ARGS'Brad King2014-10-3113-12/+117
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 609037f4 ExternalProject: Add unit tests for CMAKE_CACHE_DEFAULT_ARGS 98cdb658 ExternalProject: Add CMAKE_CACHE_DEFAULT_ARGS arguments 36cf8a1e Tests/Tutorial: Fix when USE_MYMATH is OFF
| * | | | | ExternalProject: Add unit tests for CMAKE_CACHE_DEFAULT_ARGSDaniele E. Domenichelli2014-10-316-0/+80
| | | | | |
| * | | | | ExternalProject: Add CMAKE_CACHE_DEFAULT_ARGS argumentsDaniele E. Domenichelli2014-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This argument allows to set default arguments that are written in the initial cache file, but that are not forced, and therefore allows the user to change these values later (CMAKE_ARGS and CMAKE_CACHE_ARGS always overwrite the values). Also add some documentation to explain the differences between these 3 arguments. Extend ExternalProjectLocal test to cover CMAKE_CACHE_DEFAULT_ARGS.
| * | | | | Tests/Tutorial: Fix when USE_MYMATH is OFFDaniele E. Domenichelli2014-10-316-12/+36
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit tests for the square root of "-25" currently fail when USE_MYMATH is disabled. The "mysqrt" method in the tutorials, returns "0" for a negative value, while "sqrt" returns "NaN", and therefore the output is not accepted by the test. This patch checks if the number is negative and eventually returns "0" before calling "sqrt" or "mysqrt" to fix this issue. Printing a NaN might cause issues with the string catched by the tests on some platform. Therefore assume that "0" is correct and "fix" the USE_MYMATH=OFF version by checking if the number is negative and eventually returning "0" before calling "sqrt" or "mysqrt".
* | | | | Merge topic 'VERSION_no_sscanf'Brad King2014-10-311-6/+82
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef09df64 cmSystemTools: reimplement verson comparison without sscanf() 667560c8 extend the testing for version comparison
| * | | | | cmSystemTools: reimplement verson comparison without sscanf()Rolf Eike Beer2014-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This now has the advantage that it works with version strings with any number of components.
| * | | | | extend the testing for version comparisonRolf Eike Beer2014-10-291-6/+80
| |/ / / / | | | | | | | | | | | | | | | | | | | | This now checks also the negative outcome of the comparision operation, and adds a bunch more different cases.
* | | | | Merge topic 'wince-tests'Brad King2014-10-301-1/+52
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 5bd29b88 Tests: Run Tutorial steps 1-4 as tests for Windows CE
| * | | | | Tests: Run Tutorial steps 1-4 as tests for Windows CEPascal Bach2014-10-291-1/+52
| | | | | |
* | | | | | Merge topic 'fix--D-command-line-parsing'Brad King2014-10-306-0/+15
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | aee7e4a0 cmCacheManager: parse -D flags more strictly 368e8de4 Tests: test -D parsing on the command line
| * | | | | cmCacheManager: parse -D flags more strictlyBen Boeckel2014-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of: -DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE the variable is parsed out as: CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG because the parser allows '=' in the variable name. Disallow such a name on the command line.