summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* try_compile: Add COPY_FILE_ERROR option to capture failureBrad King2013-07-158-0/+33
| | | | | | | | | | | 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.
* Merge topic 'vs12-generator'Brad King2013-07-015-6/+18
|\ | | | | | | | | | | | | | | | | 9a76d83 VS12: Find proper MSBuild for VSProjectInSubdir test 4e5cb39 Merge branch 'master' into vs12-generator 78fdbbc FindBoost: Add -vc120 mangling for VS 12 e99d7b1 VS12: Generate flag tables from MSBuild v120 tool files 77ac9b8 VS12: Add Visual Studio 12 generator (#14251)
| * VS12: Find proper MSBuild for VSProjectInSubdir testBrad King2013-06-281-3/+8
| | | | | | | | | | | | If the CTest make program is not msbuild we find the msbuild corresponding to the current test generator. In the case of VS 12 search for the msbuild it provides.
| * Merge branch 'master' into vs12-generatorBrad King2013-06-28284-689/+3161
| |\ | | | | | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * | VS12: Add Visual Studio 12 generator (#14251)Brad King2013-06-284-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge topic 'vs-windows-forms'Brad King2013-07-011-0/+1
|\ \ \ | | | | | | | | | | | | | | | | 6c9712c VS: Add Resx configuration to the vcxproj file
| * | | VS: Add Resx configuration to the vcxproj fileJonas Andersen2013-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my project group we are using CMake to generate c++/cli winform projects and I noticed the work done in commit 79ec7868 (VS: Add Windows Forms Support, 2013-04-29) was in the right direction for solving some of the problems we were facing. The changes as submitted was breaking some functionality in our projects, so I made some changes that fixes our problems and I believe that it will also work for others. * Resx files did not link correctly with the winform h-file so I added the Resx configuration to the vcxproj file. * I removed the functionality for setting <CLRSupport> true for the project based on if an resx-file is pressent. This is preventing us from using native cpp code. Also this do not address that some projects will need to set other options like clr:pure, clr:safe. This could be implemented as a cmake option, so it is possible to specify exactly what is needed. Existing VSWindowsFormsResx Test project is updated so it will be working with my changes.
* | | | Merge topic 'split-GeneratorExpression-test'Brad King2013-07-013-9/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | cacb938 Split the GeneratorExpression test into a third part.
| * | | | Split the GeneratorExpression test into a third part.Stephen Kelly2013-06-283-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid command lines beyond NMake limits. http://open.cdash.org/testDetails.php?test=196577461&build=2949683 expanded command line '...' too long
* | | | | Merge topic 'ninja_phony_targets'Brad King2013-07-011-0/+13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 539356f Ninja: Custom Command file depends don't need to exist before building 874e171 Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static 88d27ad Add a test to expose a bug with add_custom_command and ninja.
| * | | | | Add a test to expose a bug with add_custom_command and ninja.Robert Maynard2013-06-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ninja Generator is unable to handle an add_custom_command having a dependency that is generated at build time by a previous target.
* | | | | | Add generator expressions for compiler versions.Stephen Kelly2013-06-282-1/+23
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | New generator expressions allow retrieval of the version per language, as well as equality comparison.
* | | | | Escape target flags taken from COMPILE_OPTIONSBrad King2013-06-272-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor appending of individual flags out into an AppendFlagEscape method in cmLocalGenerator and teach it to use EscapeForShell. Update all COMPILE_OPTIONS handling to use AppendFlagEscape. Override the method in the Xcode generator to use its custom escape implementation. Teach the CompileOptions test to add an option that requires escaping everywhere instead of just with the GNU tools.
* | | | | Merge topic 'dag-LINKER_LANGUAGE'Brad King2013-06-2610-0/+40
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ff015ee Genex: Report error if a target file is needed to evaluate link libraries. b58aff9 Genex: Extend EvaluatingLinkLibraries to also check the top target name. b1c19ce Genex: Make LINK_LANGUAGE report an error when evaluating link libraries. 0e1cb07 Add missing return after error report.
| * | | | | 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 'version-compare-genex'Brad King2013-06-262-0/+12
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | e605528 Add generator expressions for version comparision. 48bb48e De-duplicate version comparison code.
| * | | | Add generator expressions for version comparision.Stephen Kelly2013-06-122-0/+12
| | | | |
* | | | | Merge topic 'export-COMPILE_OPTIONS-property'Brad King2013-06-263-1/+24
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | 77ff352 Generate INTERFACE_COMPILE_OPTIONS on export.
| * | | | Generate INTERFACE_COMPILE_OPTIONS on export.Stephen Kelly2013-06-103-1/+24
| |/ / / | | | | | | | | | | | | | | | | This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target property., 2013-05-16).
* | | | Merge topic 'add-whitespace'Brad King2013-06-242-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 2331b57 Add whitespace after colons in error messages.
| * | | | Add whitespace after colons in error messages.Stephen Kelly2013-06-212-2/+2
| | | | |
* | | | | Merge topic 'add-cmake_host_system_information-command'Brad King2013-06-246-0/+42
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | bb71a3a Add cmake_host_system_information command
| * | | | | Add cmake_host_system_information commandNils Gladitz2013-06-196-0/+42
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Expose the internal system information API to the CMake language. For example, it is useful to see how much memory the system has available to estimate an upper limit of tests that can run in parallel.
* | | | | Merge topic 'add-try_compile-options'Brad King2013-06-2415-0/+64
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | 482f112 try_compile: Add signature to allow multiple SOURCES
| * | | | try_compile: Add signature to allow multiple SOURCESBrad King2013-06-0615-0/+64
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'suppress-unused-cli-with-value-in-cache'Brad King2013-06-141-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | 6a6cda5 Don't run the WarnUnusedCliUnused test on Windows.
| * | | Don't run the WarnUnusedCliUnused test on Windows.Stephen Kelly2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even with the NMake Makefiles generator, it is not able to properly clean up after the test. http://open.cdash.org/testDetails.php?test=193424220&build=2934501 Internal cmake changing into directory: C:/Dashboards/My Tests/CMake-nmake10-x64-continuous/Tests/WarnUnusedCliUnused Error: cmake execution failed CMake Error: Error: generator : NMake Makefiles Does not match the generator used previously: Visual Studio 10 Either remove the CMakeCache.txt file or choose a different binary directory.
* | | | Merge topic 'fix-genex-HEAD-target'Brad King2013-06-052-0/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 5b22235 Genex: Fix the HEAD target used for evaluated expressions
| * | | | Genex: Fix the HEAD target used for evaluated expressionsStephen Kelly2013-06-052-0/+11
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the expression $<TARGET_PROPERTY:prop> appears in the content of a target property, the target that prop is read from is the 'head target' of the expression. In contexts such as evaluating the content of a target property during generation, such as INCLUDE_DIRECTORIES, the 'head target' is the one on which the initial request was made. If evaluating a generator expression which is not a target property content, the target must be explicitly specified. Such contexts include add_custom_command and file(GENERATE). The content might then look like $<TARGET_PROPERTY:tgt,prop> However, as there is no HeadTarget set, any generator expressions evaluated as part of reading prop from tgt which do not specify the tgt directly report an error. Modify the logic of the TARGET_PROPERTY generator expression so that in such contexts, the 'head target' is set to the appropriate target which was first encountered.
* | | | 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 'suppress-unused-cli-with-value-in-cache'Brad King2013-06-053-11/+33
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | 273ecab CLI: Suppress the unused warning if the key value pair is cached.
| * | | | CLI: Suppress the unused warning if the key value pair is cached.Stephen Kelly2013-06-043-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning for using it despite it not being used. The WarnUnusedCliUnused test relies on the warning being emitted each time cmake is run on an existing build. That behavior is changed by this patch to warn only on the first invokation of CMake, and not on subsequent invokations (because the variable is in the cache with the same value). For that test, a clean target is added which clears the cache and cause the warning to be emitted each time. As the Ninja generator does not support the feature needed to test this, it is not tested with that generator.
* | | | | Merge topic 'add_compile_options-command'Brad King2013-06-052-0/+25
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a984f32 Introduce add_compile_options command.
| * | | | | Introduce add_compile_options command.Stephen Kelly2013-06-042-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command is similar to add_definitions, in that it affects the compile options of all targets which follow it. The implementation is similar to the implementation of the include_directories command, in that it is based on populating a COMPILE_OPTIONS directory property and using that to initialize the same property on targets. Unlike the include_directories command however, the add_compile_options command does not affect previously defined targets. That is, in the following code, foo will not be compiled with -Wall, but bar will be: add_library(foo ...) add_compile_options(-Wall) add_library(bar ...)
* | | | | | Merge topic 'VISIBILITY_PRESET-property'Brad King2013-06-0512-0/+85
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
| * | | | | | Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.Stephen Kelly2013-06-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corresponds to the g++ and clang++ option -fvisibility-inlines-hidden on linux. On Windows with MinGW, this corresponds to -fno-keep-inline-dllexport. That option is not supported by clang currently.
| * | | | | | Introduce target property <LANG>_VISIBILITY_PRESETStephen Kelly2013-06-0212-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge topic 'fix-variable_watch-cases'Brad King2013-06-047-0/+28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 647745b variable_watch: Print accesses as "CMake Debug Log" messages 515f9af variable_watch: Remove leftover debugging code (#14187) c63d300 variable_watch: Add test for MODIFIED_ACCESS report 3d5bb38 variable_watch: Add missing string enumeration entry (#14188)
| * | | | | | | 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.
* | | | | | | Merge topic 'cfbundle-location'Brad King2013-06-041-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 483e208 OS X: Fix getting of CFBundle LOCATION property.
| * | | | | | | OS X: Fix getting of CFBundle LOCATION property.Clinton Stimpson2013-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #13797. The kinds of changes applied in 373faae5 for frameworks are now applied to CFBundle. The prefix and suffix for CFBundles are now handled in cmTarget::GetFullNameInternal.
* | | | | | | | Merge topic 'qt4-macros-TARGET-arg'Brad King2013-06-045-0/+78
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | 9ce60ff Qt4Macros: Allow specifying a TARGET in invokations of macros.
| * | | | | | | Qt4Macros: Allow specifying a TARGET in invokations of macros.Stephen Kelly2013-06-035-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will allow things like this: find_package(Qt4) qt4_generate_moc(myfile.h moc_myfile.cpp TARGET foo) # Note, foo target doesn't # exist until below. add_library(foo ...) The qt4_generate_moc call would use the INCLUDE_DIRECTORIES from the foo target using generator expressions. Currently it reads the INCLUDE_DIRECTORIES directory property, meaning that include_directories() is required. Support for the TARGET is also added to qt4_wrap_cpp, but not qt4_automoc, as that is deprecated in favor of the AUTOMOC target property. The moc tool reports failure if the Q_INTERFACES macro is used with an argument which has not appeared with Q_DECLARE_INTERFACE, so that is the basis of the unit test. The command line arguments are now always written to a file, which is passed to moc as the @atfile. This was already the case on Windows, but now it is used everywhere. The reason for that is that it is not currently possible to expand the list of includes from a target directly in a add_custom_command invokation (though that may become possible in the future). There is not a big disadvantage to using the file anyway on unix, so having one code path instead of two is also a motivation.
* | | | | | | | Merge topic 'escape-regex-specials-in-path'Brad King2013-06-037-37/+53
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e4e0921 Merge branch 'master' into escape-regex-specials-in-path c9b75dc Fix test failures caused by regexp-sensitive characters in the build paths
| * | | | | | | Merge branch 'master' into escape-regex-specials-in-pathRolf Eike Beer2013-06-03161-621/+2140
| |\ \ \ \ \ \ \ | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Resolve conflicts in Tests/CTestTestMemcheck/CMakeLists.txt by combining changes from both sides.
| * | | | | | | Fix test failures caused by regexp-sensitive characters in the build pathsModestas Vainius2013-06-037-36/+52
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checkout [1] as an example of the test failures. In that particular cases, the failures is caused by the plus sign in the path being pass unescaped (buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp. In addition to failures in the log, the following new tests also fail in 2.8.11: 243 - CTestTestMemcheckUnknown (Failed) 244 - CTestTestMemcheckUnknownQuoted (Failed) 248 - CTestTestMemcheckDummyValgrindFailPre (Failed) 249 - CTestTestMemcheckDummyValgrindFailPost (Failed) 250 - CTestTestMemcheckDummyPurify (Failed) 251 - CTestTestMemcheckDummyBC (Failed) 253 - CMake.List (Failed) [1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896