summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Teach compiler ABI check to tolerate try_compile COPY_FILE failureBrad King2013-07-175-0/+26
| | | | | | | | | | | | | | | | | In CMakeDetermineCompilerABI we use try_compile with the COPY_FILE option to get a copy of the compiled binary used to detect the ABI information. We already tolerate the case when compilation fails. However, when compilation appears to succeed but does not produce the expected executable the try_compile command immediately reports an error because the COPY_FILE fails. Tolerate COPY_FILE failure without stopping the overall configuration process by using the try_compile COPY_FILE_ERROR option to capture the error message. Log the full error to CMakeError.log and simply report failure to detect the ABI as if compilation had failed. Teach the RunCMake.Configure test to cover this case and verify that the messages show up as expected both in stdout and in CMakeError.log.
* Merge topic 'obsolete-qt4-macros'Brad King2013-07-1610-0/+47
|\ | | | | | | | | cb7f32f Mark qt4_use_modules and qt4_automoc as obsolete.
| * Mark qt4_use_modules and qt4_automoc as obsolete.Stephen Kelly2013-07-1410-0/+47
| | | | | | | | | | The QT_QMAKE_EXECUTABLE has to be passed through the cmake calls because the executable may not be in the PATH.
* | Merge topic 'target-policies'Brad King2013-07-157-0/+36
|\ \ | | | | | | | | | | | | 484bb88 Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
| * | Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICYStephen Kelly2013-07-117-0/+36
| | | | | | | | | | | | | | | | | | Use preprocessor loops and add a unit test for the appropriate policies. All policies whose value is recorded at target creation time should be part of this list.
* | | Merge topic 'INTERFACE_LINK_LIBRARIES-prop'Brad King2013-07-1528-0/+145
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | 3e30d9e TLL: Don't populate old link interface if CMP0022 is NEW. 574fec9 Export: Generate INTERFACE_LINK_LIBRARIES property on targets. d0a76ea Introduce the INTERFACE_LINK_LIBRARIES property. ddde61c Introduce the LINK_ONLY generator expression. 5aa9731 GenexEval: Add abstracted access to link interface for a target.
| * | TLL: Don't populate old link interface if CMP0022 is NEW.Stephen Kelly2013-07-089-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always populate the INTERFACE_LINK_LIBRARIES for interface entries. Don't populate the old interface properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? if CMP0022 is NEW. Because the INTERFACE_LINK_LIBRARIES property is now populated by the target_link_libraries when operating on a static library, make an equivalent change which populates the property with the same value when the old link_libraries() command is used. This silences the policy warning in that case.
| * | Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-087-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.
| * | Introduce the INTERFACE_LINK_LIBRARIES property.Stephen Kelly2013-07-0814-0/+69
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property replaces the properties which match (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?, and is enabled for IMPORTED targets, and for non-IMPORTED targets only with a policy. For static libraries, the INTERFACE_LINK_LIBRARIES property is also used as the source of transitive usage requirements content. Static libraries still require users to link to all entries in their LINK_LIBRARIES, but usage requirements such as INCLUDE_DIRECTORIES COMPILE_DEFINITIONS and COMPILE_OPTIONS can be restricted to only certain interface libraries. Because the INTERFACE_LINK_LIBRARIES property is populated unconditionally, we need to compare the evaluated result of it with the link implementation to determine whether to issue the policy warning for static libraries. For shared libraries, the policy warning is issued if the contents of the INTERFACE_LINK_LIBRARIES property differs from the contents of the relevant config-specific old LINK_INTERFACE_LIBRARIES property.
* | Merge topic 'try_compile-COPY_FILE_ERROR'Brad King2013-07-157-0/+16
|\ \ | | | | | | | | | | | | c28715b try_compile: Add COPY_FILE_ERROR option to capture failure
| * | try_compile: Add COPY_FILE_ERROR option to capture failureBrad King2013-07-157-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | When the COPY_FILE operation fails optionally capture the error message with a COPY_FILE_ERROR option instead of reporting the error immediately. This gives callers a chance to do something else or report the error. Teach the RunCMake.try_compile test to cover bad argument combinations involving COPY_FILE_ERROR. Teach the TryCompile test to cover the case of a COPY_FILE error message captured by COPY_FILE_ERROR.
* | cmake: On configure error suggest looking at CMake*.log filesBrad King2013-07-097-0/+18
|/ | | | | | | | | | When CMake reports failure to configure a project, especially when the toolchain does not initialize properly, the true reason may be clear from reading the CMakeFiles/CMake(Output|Error).log files. Advise users to look at these files if they exist when configuration fails. Add RunCMake.Configure test to check that the log files are mentioned when configuration fails.
* Merge branch 'master' into vs12-generatorBrad King2013-06-28109-4/+461
|\ | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * Genex: Report error if a target file is needed to evaluate link libraries.Stephen Kelly2013-06-246-0/+21
| | | | | | | | | | | | | | | | Constructs such as target_link_libraries(foo $<$<STREQUAL:$<TARGET_FILE:foo>,foo.so>:bar>) segfault before this patch.
| * Genex: Make LINK_LANGUAGE report an error when evaluating link libraries.Stephen Kelly2013-06-245-0/+19
| |
| * Merge topic 'add-whitespace'Brad King2013-06-241-1/+1
| |\ | | | | | | | | | | | | 2331b57 Add whitespace after colons in error messages.
| | * Add whitespace after colons in error messages.Stephen Kelly2013-06-211-1/+1
| | |
| * | try_compile: Add signature to allow multiple SOURCESBrad King2013-06-0610-0/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the signature try_compile(RESULT_VAR <bindir> <srcfile> ...) to allow multiple sources as try_compile(RESULT_VAR <bindir> SOURCES <srcfile>... ...) Process the sources to generate a CMakeLists.txt that enables all needed languages. Teach the TryCompile test to try cases with two sources of the same language and of mixed languages. Teach RunCMake.try_compile to cover error cases for the signature.
| * Merge topic 'fix-path-root-dot-dot'Brad King2013-06-051-0/+5
| |\ | | | | | | | | | | | | d26800b get_filename_component: Test ABSOLUTE of .. after root component
| | * get_filename_component: Test ABSOLUTE of .. after root componentBrad King2013-06-041-0/+5
| | | | | | | | | | | | | | | Teach the RunCMake.get_filename_component test to verify that ".." does not remove the root filename component.
| * | Merge topic 'VISIBILITY_PRESET-property'Brad King2013-06-057-0/+37
| |\ \ | | | | | | | | | | | | | | | | | | | | cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
| | * | Introduce target property <LANG>_VISIBILITY_PRESETStephen Kelly2013-06-027-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target property is used as the operand to the -fvisibility= compile option with GNU compilers and clang.
| * | | variable_watch: Print accesses as "CMake Debug Log" messagesBrad King2013-06-032-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use makefile->IssueMessage() to print the unprocessed watch message in a format consistent with other CMake messages and with a more complete call stack for the access.
| * | | variable_watch: Remove leftover debugging code (#14187)Brad King2013-06-033-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a watch does not specify a command to call then variable_watch prints out a message to stderr. Remove code after that which collects all variable values to construct a message that is never printed. Otherwise such code causes a READ_ACCESS watch to trigger on all variables in the currents scope. Reported-by: Yichao Yu <yyc1992@gmail.com>
| * | | variable_watch: Add test for MODIFIED_ACCESS reportBrad King2013-06-035-0/+13
| | |/ | |/| | | | | | | Add a RunCMake.variable_watch watch test to cover the basic use case.
| * | try_compile: Refactor argument processingBrad King2013-05-3111-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Process all arguments in a single loop using a simple state machine. While at it, fix some error message typos. Also allow LINK_LIBRARIES with no actual libraries to disable use of the -DLINK_LIBRARIES=... from the CMAKE_FLAGS. This was already possible in the old logic if LINK_LIBRARIES was immediately followed by another keyword argument instead of the end of the argument list, so allow it in general. Update the RunCMake.try_compile test cases accordingly.
| * | try_compile: Add test for bad call error casesBrad King2013-05-3132-0/+80
| | | | | | | | | | | | | | | Add a RunCMake.try_compile test to cover cases of bad invocation of the try_compile command.
| * | Merge topic 'fix-FileIsDirectory-SEGV'Brad King2013-05-307-0/+25
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 7378792 if: Add test for IS_DIRECTORY 4ab10e0 Merge branch 'master' into fix-FileIsDirectory-SEGV 045d6ae KWSys: Fix SystemTools::FileIsDirectory with long paths (#14176)
| | * | if: Add test for IS_DIRECTORYBrad King2013-05-287-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Add a RunCMake.if test to cover if() command behavior. Start with a test for IS_DIRECTORY cases with an existing directory and a long path, both with a trailing slash.
| * | | Merge topic 'ExternalData-no-re-stage'Brad King2013-05-283-0/+43
| |\ \ \ | | | | | | | | | | | | | | | | | | | | c35961b ExternalData: Do not re-stage staged object files
| | * | | ExternalData: Do not re-stage staged object filesBrad King2013-05-243-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalData_LINK_CONTENT option tells ExternalData to convert real data files it finds into content links and to "stage" the original content in a ".ExternalData_<algo>_<hash>" file. However, after a data object has been staged it is possible that a user-provided pattern in the "REGEX:" option will later match the staged object file. We must not process staged object files even when a user pattern matches them. Fix the implementation to not match a staged object file as a normal data file for conversion. Extend the RunCMake.ExternalData test to cover this case.
| * | | | Merge topic 'genex-generate-file'Brad King2013-05-2820-0/+71
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | b983a58 file: Add GENERATE command to produce files at generate time
| | * | | file: Add GENERATE command to produce files at generate timeStephen Kelly2013-05-2420-0/+71
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to write to a temp file which contains generator expressions, and at generate time, evaluate the generator expressions, and write the result to a file. Because executables on Windows are limited in the length of command line it is possible to use, it is common to write command line arguments to a file instead and specify the file as a source of arguments. This new FILE(GENERATE) subcommand allows the use of generator expressions to create such files so that they can be used with add_custom_command for example.
| * | | Merge topic 'error-on-exported-missing-include-dir'Brad King2013-05-214-0/+15
| |\ \ \ | | | | | | | | | | | | | | | | | | | | eabefa8 Error on relative path in INCLUDE_DIRECTORIES target property.
| | * | | Error on relative path in INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-214-0/+15
| | |/ / | | | | | | | | | | | | | | | | Add policy CMP0021 to preserve existing behavior in projects expecting it from earlier CMake versions.
| * | | Merge topic 'doc-improvements'Brad King2013-05-162-3/+3
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used" 2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames 56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES) 2bab472 VS10: add detailed comment about MIDL processing e619111 Explain distribution of Win9x binary on all Windows versions. 5ca4336 FindwxWidgets: add DOC strings with usual style f57800d Fix spelling and typos (product names) bf019d7 Fix spelling and typos (non-binary) ddac8d3 Fix spelling and typos (affecting binary data / module messages) 86832ce Fix spelling and typos (affecting users)
| | * | Fix spelling and typos (affecting binary data / module messages)Andreas Mohr2013-05-072-3/+3
| | |/
| * | Merge topic 'fix-per-config-tll-include-dirs'Brad King2013-05-162-0/+17
| |\ \ | | | | | | | | | | | | | | | | | | | | 88308bc Test that linking using the debug keyword to tll works. 20104ab Test transitive includes from setting the LINK_LIBRARIES property.
| | * | Test transitive includes from setting the LINK_LIBRARIES property.Stephen Kelly2013-05-062-0/+17
| | |/ | | | | | | | | | | | | | | | | | | | | | Commit b8259c3d (Centralize maintenance of usage requirement include directories, 2013-04-29) changed the handling of the property. Previously setting the property directly instead of via target_link_libraries would not result in transitive include directory handling.
| * | get_filename_component: Add DIRECTORY option (#14091)Brad King2013-04-161-9/+10
| | | | | | | | | | | | | | | The name "PATH" is not precise so add equivalent option "DIRECTORY". Document the latter as preferred and the former as a legacy alias.
| * | get_filename_component: Add explicit unit testsBrad King2013-04-167-0/+46
| |/ | | | | | | | | Add test RunCMake.get_filename_component to cover cases of the command. Remove redundant coverage of these cases from the "complex" tests.
* | VS12: Add Visual Studio 12 generator (#14251)Brad King2013-06-281-1/+1
|/ | | | | | | | | | | | | | Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator and update version numbers accordingly. Add the VS12 enumeration value. Add module CMakeVS12FindMake to find MSBuild. Look for MSBuild in its now-dedicated Windows Registry entry. Teach the platform module Windows-MSVC to set MSVC12 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 12 runtime libraries. Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11. Inspired-by: Minmin Gong <minmin.gong@gmail.com>
* add_dependencies: Distinguish target v. file dependencies in error (#14050)Brad King2013-03-296-0/+18
| | | | | | | When called with a non-existent LHS target name the user may be trying to add file-level dependencies. Clarify the error message to explain the difference between target-level and file-level dependencies. Point the reader at the commands and options needed for the latter.
* Merge topic 'fix-Qt5-incompatibility-check-version'Brad King2013-03-281-1/+1
|\ | | | | | | | | 535e53c Fix the Qt 5 version required to run the IncompatibleQt test.
| * Fix the Qt 5 version required to run the IncompatibleQt test.Stephen Kelly2013-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | The commit to add the INTERFACE_QT_MAJOR_VERSION in qtbase.git is 14054d45 (Set the INTERFACE_QT_MAJOR_VERSION to 5., 2013-03-16) which will be part of Qt 5.1.0. If there is a Qt 5.0.3 release, there is no guarantee it will contain that commit. Make sure such a Qt version does not fail with this test if not.
* | Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-264-0/+15
|/ | | | | | | | | We can do this check only if the TargetName is non-empty, which means that we're evaluating INTERFACE_INCLUDE_DIRECTORIES from a linked dependency which was set using target_link_libraries. It is possible to have relative paths in INCLUDE_DIRECTORIES already in CMake 2.8.10.2, so that part will require a policy to fix.
* Report an error on IMPORTED targets with a faulty INTERFACEStephen Kelly2013-03-265-2/+24
| | | | | | | | | | It is considered an error if the INTERFACE_INCLUDE_DIRECTORIES contains a directory which does not exist, which indicates a programmer error by the upstream, or a packaging error. One of the RunCMake.CompatibleInterface tests also needs to be updated due to this change. Non-existant includes were used in the test, but are not needed.
* install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-2611-0/+56
| | | | | | | | | | Check that source and binary directories are not part of the INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets. This is limited to directories which do not contain generator expressions to evaluate. Such paths can only be checked at time of use of the imported target, which will be done in a follow up patch.
* FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCoreStephen Kelly2013-03-187-0/+30
| | | | | | | With a similar commit in Qt 5, this will error at CMake time if an attempt is made to use target_link_libraries(foo Qt4::QtCore Qt5::Core)
* Merge topic 'cleanup-early-include-CTest-failure'Brad King2013-03-1315-60/+104
|\ | | | | | | | | | | | | d90f49b CTest: Fail early without PROJECT_BINARY_DIR (#14005) 2e1c2bd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005) 4e5cb37 Refactor RunCMake.build_command test to allow more cases