summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Add data symbols to GenerateExportHeader testMatthew Woehlke2016-09-123-0/+74
| | | | | | Add static data members and global variables to the GenerateExportHeader shared library, testing that export decoration for these works in addition to decoration of classes and free functions.
* Tests: Add failure test for GenerateExportHeaderMatthew Woehlke2016-09-126-18/+96
| | | | | | | | | | | | | | | | | | | | | | Modify notation of statements in the GenerateExportHeader test expected to result in link errors. Modify script used to build the test to also generate a suite of modified sources, each having exactly one of the failing lines enabled, and to generate EXCLUDE_FROM_ALL executables for the same. Modify RunCMake script used to drive the test to read the list of such executables and try to build each of them, verifying that they do in fact fail to build. This will verify that the _NO_EXPORT macros are working as expected, and will also catch errors like the one that commit 0cbaaf2d (GenerateExportHeader: Fix add_compiler_export_flags regression, 2016-09-01) fixed. When setting up the failure tests for GenerateExportHeader, check if the compiler actually hides non-exported stuff. If not, the failure tests won't fail, and will cause the overall test to fail. Since this typically is only the case for very old compilers, simply skipping them as opposed to trying to do something more fine grained seems reasonably safe.
* Merge topic 'genex-LINK_ONLY-not-linking'Brad King2016-09-064-0/+11
|\ | | | | | | | | f6fd0abc Genex: Diagnose invalid LINK_ONLY usage instead of crashing
| * Genex: Diagnose invalid LINK_ONLY usage instead of crashingBrad King2016-09-054-0/+11
| | | | | | | | | | | | | | | | When `$<LINK_ONLY:...>` is used outside of linking we may evaluate it without a `dagChecker`. Do not dereference the NULL pointer and issue a diagnostic instead. Closes: #16287
* | Merge topic 'test-GenerateExportHeader-with-RunCMake'Brad King2016-09-0638-0/+1519
|\ \ | | | | | | | | | | | | | | | | | | 72ecdd34 Tests: Cleanup RunCMake.GenerateExportHeader somewhat fc3dab0e Tests: Port GenerateExportHeader test to RunCMake infrastructure 4feba34d GNU: Do not use -fvisibility on AIX or HP-UX
| * | Tests: Cleanup RunCMake.GenerateExportHeader somewhatBrad King2016-09-0511-51/+14
| | |
| * | Tests: Port GenerateExportHeader test to RunCMake infrastructureBrad King2016-09-0539-0/+1556
| |/ | | | | | | This will allow build failure cases to be added later.
* | CPack/DEB: Add option to select archive typeDomen Vrankar2016-09-057-0/+59
|/ | | | | | | Add a `CPACK_DEBIAN_ARCHIVE_TYPE` option that can be used to select an archive type that supports long file names. Closes: #14332
* Merge topic '16101-xcode-fix-directory-exclude-from-all'Brad King2016-08-317-0/+36
|\ | | | | | | | | df32e564 Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101)
| * Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101)Gregor Jasny2016-08-317-0/+36
| |
* | Improve error message on unexpected end of fileBrad King2016-08-304-0/+9
| | | | | | | | Suggested-by: Stephen Kelly <steveire@gmail.com>
* | Merge topic 'ninja-add_custom_command-depfile'Brad King2016-08-307-0/+34
|\ \ | | | | | | | | | | | | 048d1adb add_custom_command: Add DEPFILE option for Ninja
| * | add_custom_command: Add DEPFILE option for NinjaKulla Christoph2016-08-307-0/+34
| |/ | | | | | | | | | | | | | | Provide a way for custom commands to inform the ninja build tool about their implicit dependencies. For now simply make use of the option an error on other generators. Closes: #15479
* | CPack/RPM: Add test for debuginfo package generationDomen Vrankar2016-08-264-0/+44
|/
* Merge topic 'extract-cmMessenger'Brad King2016-08-2519-119/+75
|\ | | | | | | | | | | | | | | | | | | 1462576b Parser: Port away from cmMakefile 421012a3 cmMessenger: Extract from cmake class 14a8d61f cmMakefile: Port nested error logic away from cmExecutionStatus 2af853de cmMakefile: Simplify IssueMessage implementation 33bb9cfa Parser: Issue messages through cmake, not cmSystemTools db7de303 Parser: Store the Backtrace for use in issuing messages
| * Parser: Issue messages through cmake, not cmSystemToolsStephen Kelly2016-08-2519-119/+75
| | | | | | | | | | Make these messages uniform with regard to other messages issued by cmake.
* | Tests: Fix RunCMake.CMP0040 custom command syntaxBrad King2016-08-245-5/+5
|/
* Merge topic 'android-platform-modules'Brad King2016-08-2452-0/+572
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7b637ebd Android: Add `ANDROID` variable to indicate the target c2f561e5 Android: Add test cases covering use of the NDK and standalone toolchains 6b84df8d Help: Document cross compiling for Android d7d40830 Android: Select the STL type for NDK builds b22294bc Android: Populate compiler flags for current ABI b6a3102a Android: Add a CMAKE_BUILD_TYPE default d1e3cec2 Android: Add Clang -target option for current ABI 504db72d Android: Add placeholders for compiler/abi-specific settings fa632578 Android: Avoid interfering with common pre-existing toolchain files 6299693f Android: Search for NDK and standalone toolchain in more places 29b51379 Android: Detect and save a standalone toolchain without the NDK 7d9b49fb Android: Detect settings from the CMAKE_SYSROOT if it is set 4389664a Android: Detect and save a toolchain from the NDK 328191f6 Android: Set CMAKE_SYSROOT automatically 9e032304 Android: Detect and save the architecture, ABI, and processor fde59c4d Android: Detect and save the API level ...
| * Android: Add `ANDROID` variable to indicate the targetBrad King2016-08-231-0/+4
| | | | | | | | | | Allow projects to use `if(ANDROID)` to condition their Android-specific code paths.
| * Android: Add test cases covering use of the NDK and standalone toolchainsBrad King2016-08-2352-0/+568
| |
* | cmake: Add `cmake -E capabilities` modeTobias Hunger2016-08-164-0/+5
|/ | | | | | | Add `cmake -E capabilities` to report on generators, cmake version and possibly other static capabilities of cmake. Closes: #15462
* Merge topic 'fix-test-macOS-case-sensitive'Brad King2016-08-101-1/+1
|\ | | | | | | | | 677e73cb Tests: Fix RunCMake.Framework on case sensitive file systems.
| * Tests: Fix RunCMake.Framework on case sensitive file systems.Chaoren Lin2016-08-091-1/+1
| | | | | | | | The file is lowercase: Tests/RunCMake/Framework/osx.cmake
* | Ninja: Add `$subdir/{test,install,package}` targetsBrad King2016-08-095-0/+17
|/ | | | | | | | | | | | | With the Makefile generator one can use `cd $subdir; make install` to build and install targets associated with a given subdirectory. This is not possible to do with the Ninja generator since there is only one `build.ninja` file at the top of the build tree. However, we can approximate it by allowing one to run `ninja $subdir/install` at the top of the tree to build the targets in the corresponding subdirectory and install them. This also makes sense for `test`, `package`, and other GLOBAL_TARGET targets. It was already done for `all` by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all` targets, 2016-03-11).
* prefer list(APPEND) over string(APPEND) where appropriateDaniel Pfeifer2016-08-081-2/+2
|
* Merge topic 'use-string-append'Brad King2016-08-0111-37/+37
|\ | | | | | | | | | | 7a649111 Use string(APPEND) in Tests 5d0d980d Use string(APPEND) in Modules
| * Use string(APPEND) in TestsDaniel Pfeifer2016-07-2711-37/+37
| | | | | | | | | | | | | | Automate with: find Tests -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* | Merge topic 'app-framework-bundle-extension'Brad King2016-08-013-4/+64
|\ \ | |/ |/| | | | | | | | | | | f951d0ad Add tests for BUNDLE_EXTENSION c63380b1 Update documentation about bundle extensions 134d5c1f Honor BUNDLE_EXTENSION also for Frameworks (#14742) 2b909c08 Honor BUNDLE_EXTENSION also for App Bundles (#16148)
| * Add tests for BUNDLE_EXTENSIONGregor Jasny2016-07-223-4/+64
| |
* | Merge topic 'tests-hide-ldd-check-errors'Brad King2016-07-221-1/+2
|\ \ | | | | | | | | | | | | d6a6024e Tests: Hide errors from `ldd --help` output check
| * | Tests: Hide errors from `ldd --help` output checkBrad King2016-07-211-1/+2
| |/ | | | | | | | | If `--help` is not a valid option then it may print content to stderr, so we need to capture that.
* | Merge topic 'windows-export-all-fix-objlib'Brad King2016-07-223-1/+9
|\ \ | |/ |/| | | | | 13a6ff31 VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object libraries
| * VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object librariesBrad King2016-07-213-1/+9
| | | | | | | | | | | | | | | | | | Teach Visual Studio generators to include object files from object libraries in the list of objects whose symbols are to be exported. The Makefile and Ninja generators already did this. Update the test to cover this case. Reported-by: Bertrand Bellenot <Bertrand.Bellenot@cern.ch>
* | Ninja: Fix inter-target order-only dependencies of custom commandsBrad King2016-07-202-0/+45
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Custom command dependencies are followed for each target's source files and add their transitive closure to the corresponding target. This means that when a custom command in one target has a dependency on a custom command in another target, both will appear in the dependent target's sources. For the Makefile, VS IDE, and Xcode generators this is not a problem because each target gets its own independent build system that is evaluated in target dependency order. By the time the dependent target is built the custom command that belongs to one of its dependencies will already have been brought up to date. For the Ninja generator we need to generate a monolithic build system covering all targets so we can have only one copy of a custom command. This means that we need to reconcile the target-level ordering dependencies from its appearance in multiple targets to include only the least-dependent common set. This is done by computing the set intersection of the dependencies of all the targets containing a custom command. However, we previously included only the direct dependencies so any target-level dependency not directly added to all targets into which a custom command propagates was discarded. Fix this by computing the transitive closure of dependencies for each target and then intersecting those sets. That will get the common set of dependencies. Also add a test to cover a case in which the incorrectly dropped target ordering dependencies would fail.
* Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-144-0/+73
| | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_EXE_LINKER_FLAGS_INIT "...") to string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used.
* Merge topic 'windows-export-all-from-exe'Brad King2016-07-133-0/+22
|\ | | | | | | | | | | 9da725cb Windows: Honor WINDOWS_EXPORT_ALL_SYMBOLS for executables with exports 2005b960 Makefile: Factor out WINDOWS_EXPORT_ALL_SYMBOLS helper
| * Windows: Honor WINDOWS_EXPORT_ALL_SYMBOLS for executables with exportsYury Zhuravlev2016-07-113-0/+22
| | | | | | | | | | For executables with ENABLE_EXPORTS set, export all symbols when instructed to do so by WINDOWS_EXPORT_ALL_SYMBOLS.
* | Fix typos.Felix Geyer2016-07-101-1/+1
| |
* | Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-064-0/+45
|/ | | | | | | | | | | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_C_FLAGS_INIT "...") to string(APPEND CMAKE_C_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used. Automate the conversion with: sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \ Modules/Compiler/*.cmake Modules/Platform/*.cmake and follow up with some manual fixes (e.g. to cases that already meant to append). Also revert the automated changes to contexts that are not protected from running multiple times.
* try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG>Brad King2016-06-295-0/+81
| | | | | | | | | | | | | | | | In the `try_compile` source file signature we propagate the caller's value of `CMAKE_<LANG>_FLAGS` into the test project. Extend this to propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the default value in the test project. This will be useful, for example, to allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`). However, some projects may currently depend on this not being done, so we need to activate the behavior using a policy. This change was originally made by commit v3.6.0-rc1~160^2 (try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11) but without the policy and so had to be reverted during the 3.6 release candidate cycle. Fixes #16174.
* Merge topic 'revert-try_compile-config-flags'Brad King2016-06-293-21/+0
|\ | | | | | | | | 943fe6e3 Revert "try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes"
| * Revert "try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes"Brad King2016-06-283-21/+0
| | | | | | | | | | | | | | | | | | | | Revert commit v3.6.0-rc1~160^2 (try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11). The behavior it introduced can break projects that depend on the lack of such behavior. We will have to introduce a policy or other mechanism to enable the behavior in a compatible way. Simply revert it for now. See issue #16174.
* | Merge topic 'cmake-trace-source'Brad King2016-06-204-0/+9
|\ \ | | | | | | | | | | | | e63151ff cmake: Add an option to control what files needs to be traced
| * | cmake: Add an option to control what files needs to be tracedAlex Turbov2016-06-174-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even in relatively small projects using `--trace` (and `--trace-expand`) may produce a lot of output. When developing a custom module usually one is interested in output of only a few particular modules. Add a `--trace-source=<file>` option to enable tracing only a subset of source files. The final output would be only from requested modules, ignoring anything else not matched to given filename(s).
* | | Merge topic 'cpack-deb-test-fixes'Brad King2016-06-203-10/+13
|\ \ \ | |/ / |/| / | |/ | | | | 6107fab4 CPack/Deb: Fix test to actually test the preinst script 302391ba CPack/Deb: Fix tests for SELinux-enabled systems
| * CPack/Deb: Fix test to actually test the preinst scriptDomen Vrankar2016-06-201-2/+2
| | | | | | | | | | | | | | The test regex variable name was invalid and did not test preinst script. Reported-by: Patrick <mail6543210@yahoo.com.tw>
| * CPack/Deb: Fix tests for SELinux-enabled systemsDomen Vrankar2016-06-203-10/+13
| | | | | | | | Suggested-by: Patrick <mail6543210@yahoo.com.tw>
* | Merge topic 'link_what_you_use'Brad King2016-06-1713-0/+62
|\ \ | | | | | | | | | | | | | | | a0902efa Help: Add notes for topic 'link_what_you_use' 96242f80 Add options to run `ldd -u -r` as a "link-what-you-use" tool
| * | Add options to run `ldd -u -r` as a "link-what-you-use" toolBill Hoffman2016-06-1713-0/+62
| | | | | | | | | | | | | | | | | | | | | Create a LINK_WHAT_YOU_USE target property and corresponding CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior. Extend link commands by running `ldd -u -r` to detect shared libraries that are linked but not needed.
* | | Parser: Issue file open error messages through dedicated APIStephen Kelly2016-06-134-20/+4
| | |