summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | | | | | Merge topic 'useless-MATCHES'Brad King2013-06-034-18/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd4451d replace string(... MATCHES "^const$) with string(... STREQUAL "const")
| * | | | | | replace string(... MATCHES "^const$) with string(... STREQUAL "const")Rolf Eike Beer2013-06-024-18/+12
| | |/ / / / | |/| | | |
* | | | | | Merge topic 'target-COMPILE_OPTIONS'Brad King2013-06-037-0/+105
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 24466f2 Add target_compile_options command. 80ca9c4 Add COMPILE_OPTIONS target property. 7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries 47f80d9 cmTarget: Rename struct to be more re-usable. 1319a14 Add <LANG>_COMPILER_ID generator expressions. 3549676 Add cmLocalGenerator::GetCompileOptions. f3ad863 VS6: Rename some variables to correspond to config values.
| * | | | | | Add target_compile_options command.Stephen Kelly2013-06-024-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This command populates the COMPILE_OPTIONS target property.
| * | | | | | Add COMPILE_OPTIONS target property.Stephen Kelly2013-06-024-0/+33
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method reads generator expressions from the COMPILE_OPTIONS target property, as well as INTERFACE_COMPILE_OPTIONS from linked dependents.
* | | | | | Merge topic 'refactor-try_compile-argument-processing'Brad King2013-06-0335-0/+88
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d06db7e try_compile: Refactor argument processing b680824 try_compile: Add test for bad call error cases
| * | | | | | 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 'qt4-qt5-CMAKE_AUTOMOC'Brad King2013-06-035-0/+53
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fa55751 QtAutomoc: Get the Qt version through the target link interface f776316 Use the qt5::moc imported target instead of a variable.
| * | | | | | QtAutomoc: Get the Qt version through the target link interfaceStephen Kelly2013-05-275-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.1, Qt5::Core has a INTERFACE_QT_MAJOR_VERSION property of '5', and since CMake 2.8.11, Qt4::QtCore has an INTERFACE_QT_MAJOR_VERSION of '4'. This was introduced in commit 4aa10cd6 (FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCore, 2013-03-16), to produce an error if Qt 4 and Qt 5 are erroneously used by the same target. This can also be used however to determine the Qt major version, and therefore the particular moc executable to use during automoc steps. This means that targets in a single buildsystem can use a selection of Qt 4 and Qt 5, and still take advantage of the CMAKE_AUTOMOC feature without conflicting.
* | | | | | | Merge topic 'rpath-on-mac'Brad King2013-06-0312-0/+249
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc1d025 OS X: Add test for rpaths on Mac. 8576b3f OS X: Add support for @rpath in export files. 00d71bd Xcode: Add rpath support in Xcode generator. 94e7fef OS X: Add RPATH support for Mac.
| * | | | | | | OS X: Add test for rpaths on Mac.Clinton Stimpson2013-06-0312-0/+249
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | This also tests rpaths through export/import.
* | | | | | | Merge topic 'framework-refactor'Brad King2013-06-031-2/+1
|\ \ \ \ \ \ \ | |/ / / / / / | | | / / / / | |_|/ / / / |/| | | | | 373faae Refactor how bundles and frameworks are supported.
| * | | | | Refactor how bundles and frameworks are supported.Clinton Stimpson2013-05-231-2/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make handling of directory separators consistent between non-bundle and bundle code. Remove xcode specific flag from cmTarget when getting install_name. Add (more) consistent convenience functions in cmTarget to get directories inside of bundles and frameworks to add files to. This refactor also fixes bug #12263 where frameworks had the wrong install name when SKIP_BUILD_RPATH. Also make install_name for frameworks consistent between Makefile and Xcode generator.
* | | | | Merge topic 'test-INCLUDE_DIRECTORIES-genex-read'Brad King2013-05-313-0/+33
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 07f9e15 GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.
| * | | | | GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-303-0/+33
| |/ / / /
* | | | | 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 'silence-vs6-warnings'Brad King2013-05-284-4/+18
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 015309f Tests/CompileDefinitions: Avoid spaces in defines on VS 6
| * | | | | Tests/CompileDefinitions: Avoid spaces in defines on VS 6Stephen Kelly2013-05-244-4/+18
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VS 6 IDE does not like spaces in definition values so CMake drops them and warns. The Tests/CompileDefinitions test C code that looks for the dropped definitions already knows to skip them, but CMake still warns. Silence the warnings by avoiding such values in the first place on VS 6.
* | | | | 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 'geh-cleanup-identifiers'Brad King2013-05-245-0/+44
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 7e24997 GenerateExportHeader: Generate only C identifiers as defines
| * | | | GenerateExportHeader: Generate only C identifiers as definesStephen Kelly2013-05-245-0/+44
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variables in this module are used to configure a header file with defines whose name depends on the name of the target. As valid names of targets may be invalid for use as defines, convert the names of the defines used to C identifiers first. This is already done in C++ code for the DEFINE_SYMBOL property. This is not as simple as ensuring that the BASE_NAME is a C identifier, because most of the define names are configurable, and because use of a BASE_NAME which is not a C identifier, such as 4square can become a C identifier by specifying a prefix in the generate_export_header macro.
* | | | Merge topic 'geh-add-missing-test'Brad King2013-05-241-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 74f24b2 Tests/Module/GenerateExportHeader: Test exported free-function
| * | | | Tests/Module/GenerateExportHeader: Test exported free-functionStephen Kelly2013-05-241-0/+1
| |/ / /