summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'target-sources-error-conditions' into releaseBrad King2014-12-0114-5/+41
|\
| * Export: Disallow export of targets with INTERFACE_SOURCESStephen Kelly2014-11-297-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be allowed in the next release, but it needs to have some features present and tested such as * Ensuring that relative paths do not appear in the generated property. * Ensuring that paths to the source or build directories do not appear. * Generating a check in the file for CMake 3.1 or later so that the resulting property will be consumed. * Ensuring that any referenced targets are part of an export set and generating a check for them. * INSTALL_INTERFACE and BUILD_INTERFACE content. All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES, but it is too late to add them for INTERFACE_SOURCES for CMake 3.1. As the checks introduce some new error conditions, it is better to disallow exporting fully for this case and introduce proper error conditions later instead of policies.
| * cmTarget: Don't allow relative paths in INTERFACE_SOURCESStephen Kelly2014-11-298-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES. Existence is already checked by cmSourceFile::GetFullPath. Add a check to disallow relative paths in source directories. Otherwise code such as target_sources(lib1 INTERFACE foo.cpp) would fail if consumed by a target in a different directory. Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether the entry comes from an IMPORTED target or not. In the include directories case, the directory for a non-imported target might not exist yet but might be created. In the sources case, a file which does not yet exist in the filesystem must be explicitly marked with the GENERATED property. Adjust existing tests and add a new test for the error.
* | Genex: Fix evaluation context propagation for TARGET_OBJECTS.Stephen Kelly2014-11-261-1/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | Extract a new method to encapsulate the requirements of evaluating dependent-expressions, namely, propagation of the EvaluateForBuildsystem setting, which is missing from the getLinkedTargetsContent implementation. Commit v3.1.0-rc1~688^2 (Genex: Only evaluate TARGET_OBJECTS to determine target sources., 2014-03-20) introduced an error case for use of TARGET_OBJECTS outside of the context of generating the buildsystem, as the path to object files may be dependent on buildsystem variables (See bug #15226). Commit v3.1.0-rc1~314^2 (Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970), 2014-07-09) made it possible to propagate such content to dependent targets. While that commit propagated the EvaluateForBuildsystem setting for the case of a TARGET_PROPERTY expression, as generated for direct dependencies of a target in cmTargetInternals::AddInterfaceEntries, it did not add propagation for content from further transitive target dependencies, as determined by getLinkedTargetsContent.
* Merge branch 'C-features-Wundef' into releaseBrad King2014-11-262-0/+14
|\
| * 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.
* | 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.
* 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 branch 'parent-scope-tests' into variable-pull-failureBen Boeckel2014-10-245-0/+266
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * parent-scope-tests: test: add a test for PARENT_SCOPE with multiple scopes test: add test for PARENT_SCOPE behavior Conflicts: Tests/RunCMake/set/RunCMakeTest.cmake
| | * test: add a test for PARENT_SCOPE with multiple scopesBen Boeckel2014-10-243-0/+249
| | | | | | | | | | | | See the comment in the test for what is being tested here.
| | * test: add test for PARENT_SCOPE behaviorBen Boeckel2014-10-243-0/+17
| | | | | | | | | | | | Test code courtesy of Alex Merry <alex.merry@kde.org>.
* | | Tests/ExternalProject: Skip Windows hg tests with cygwin hgBrad King2014-10-221-0/+7
| | | | | | | | | | | | | | | The cygwin hg client is a text file with a '#!/bin/python" line. This cannot run on Windows.
* | | Merge topic 'fix-ninja-rc-include-flags'Brad King2014-10-133-1/+17
|\ \ \ | | | | | | | | | | | | | | | | f4c5eade Ninja: Fix RC include directories regression
| * | | Ninja: Fix RC include directories regressionBrad King2014-10-133-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in commit b9aa5041 (cmLocalGenerator: Simplify GetIncludeFlags output formatting, 2014-03-04) caused Windows Resource Compiler include directories to be computed as relative paths in the Ninja generator. This breaks the cmcldeps handling of include paths. The reason for the regression is that several cmLocalGenerator::GetIncludeFlags callers treated the fourth "bool forResponseFile" argument as if it controlled whether include directories were a full path. It actually did control that by accident until the above commit. Add an explicit "bool forceFullPaths" argument to GetIncludeFlags and thread the value through ConvertToIncludeReference as needed. Update GetIncludeFlags call sites that really wanted to control the forResponseFile setting to be aware of the new argument. Extend the VSResource test to cover this case.
* | | | Merge topic 'fix-OSX-bundle-rpaths-and-Qt5'Brad King2014-10-101-1/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 631fadea Help: Add notes for topic 'fix-OSX-bundle-rpaths-and-Qt5' 50e261dd OSX: Warn when attempting to change runtime paths on OS X 10.5 9b98fd52 cmake-gui: Make sure we bundle Qt5 Cocoa platform plugin 83a06bb4 BundleUtilities: Framework codesign Resources/Info.plist & Current f7df82ac BundleUtilities: Resolve & replace @rpath placeholders 14bc686f GetPrerequisites: Make sure dyld placeholders are prefixes 6c313797 BundleUtilities: Use find on UNIX for fast executable lookup
| * | | OSX: Warn when attempting to change runtime paths on OS X 10.5Clinton Stimpson2014-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though 10.5 supports @rpath, the support is not complete enough for CMake. For instance, install_name_tool doesn't support adding and removing rpaths. Also modifying BundleUtilities test to remove an undesirable cmake generated runtime path. The intent was to build with the install rpath as is done with the other cases in this test.
* | | | Merge topic 'FPHSA_exact_version'Brad King2014-10-0824-0/+53
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | ba907f7d FPHSA: fix when requested or found version is exactly 0 4f9bf446 FPHSA: when EXACT version match is requested only compare the components given
| * | | | FPHSA: fix when requested or found version is exactly 0Rolf Eike Beer2014-10-074-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Until now it was checked with "if(VAR)", which will be false in case "0" is the content of the variable.
| * | | | FPHSA: when EXACT version match is requested only compare the components givenRolf Eike Beer2014-10-0721-0/+45
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that you have a foobar that identifies itself as 1.2.3 from now on a find_package(foobar 1.2 EXACT) will succeed, as 1.2.3 will now be considered as being 1.2. Until now this was only the case for version 1.2.0.
* | | | Merge topic 'ctest-memcheck-sanitizers'Brad King2014-10-083-3/+87
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e0e75a72 Help: Add notes for topic 'ctest-memcheck-sanitizers' 7345a1f7 tests: Add a test for ctest_memcheck MemorySanitizer 0c6330da ctest_memcheck: Add support for MemorySanitizer msan 9ba8bf12 tests: add a test for ctest_memcheck UndefinedBehaviorSanitizer 816c100a ctest_memcheck: Add support for UndefinedBehaviorSanitizer ubsan b67ef537 ctest_memcheck: Order sanitizer type code consistently f48a2968 Tests: Organize CTestTestMemcheck inner test code
| * | | | tests: Add a test for ctest_memcheck MemorySanitizerBill Hoffman2014-10-072-0/+44
| | | | |
| * | | | tests: add a test for ctest_memcheck UndefinedBehaviorSanitizerBen Boeckel2014-10-072-0/+38
| | | | |
| * | | | Tests: Organize CTestTestMemcheck inner test codeBrad King2014-10-071-3/+5
| | | | | | | | | | | | | | | | | | | | Update some whitespace and add comment dividers.
* | | | | Merge topic 'ctest-memcheck-sanitizers'Brad King2014-10-072-5/+4
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f25e431d tests: set sanitizer options properly f0661bf3 tests: fix copy/paste from tsan -> asan comments ca9cc25c ctest: add support for additional sanitizer options 0b9ffffc ctest: update documentation for CTEST_MEMORYCHECK_TYPE
| * | | | tests: set sanitizer options properlyBen Boeckel2014-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | Prior to this, these options were just being set in the environment.
| * | | | tests: fix copy/paste from tsan -> asan commentsBen Boeckel2014-10-061-3/+2
| |/ / /
* | | | Merge topic 'vs-intel-15'Brad King2014-10-031-8/+9
|\ \ \ \ | |/ / / |/| | | | | | | | | | | a128129a VS: Support Intel Fortran 15 .vfproj generation (#15175)
| * | | VS: Support Intel Fortran 15 .vfproj generation (#15175)Brad King2014-09-301-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version of the Intel Fortran plugin to Visual Studio says: please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile) We must set TargetName and TargetExt in addition to the existing setting for OutputDirectory. The settings do not appear to hurt older versions of Intel Fortran, so set them unconditionally. Extend the FortranOnly test to cover a corresponding use case by using the OUTPUT_NAME target property. Inspired-by: Ian Harvey <Ian.Harvey@megms.com.au>
* | | | Merge topic 'vs-nsight-tegra-generator'Brad King2014-09-309-1/+207
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | df84281d Help: Add notes for topic 'vs-nsight-tegra-generator' 69e198dc VS: Generate Nsight Tegra project revision number 5365c9ac VS: Map Nsight Tegra file types in .vcxproj files 178f56a5 VS: Fix Tegra-Android platform linking of libraries by name 7115702f Tests: Add test for VS Nsight Tegra generator support a6289499 VS: Generate ANDROID_GUI executables as app packages c12e4699 Add 'ANDROID_API' target property to set Android Target API 9a4df52a Add 'ANDROID_GUI' target property to mark Android applications 16569abf cmTarget: Track internally whether platform is Android ef0fd4f0 VS: Teach vcxproj generation about the Tegra-Android platform d09b60f5 VS: Detect compiler id of Nsight Tegra-Android toolchains 2f071466 VS: Teach VS >= 10 to recognize CMAKE_SYSTEM_NAME 'Android'
| * | | | VS: Fix Tegra-Android platform linking of libraries by nameBrad King2014-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nsight Tegra Visual Studio Edition handles prefixing of library names with '-l' automatically, so teach the generator not to do so. Reported-by: Mourad Boufarguine <mourad@boufarguine.name>
| * | | | Tests: Add test for VS Nsight Tegra generator supportBrad King2014-09-309-1/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a VSNsightTegra test based on the "two-libs" example from the Android NDK. Add it whenever testing on a machine with VS 11 or 12 and the NVIDIA Nsight Tegra Visual Studio Edition installed. Exclude it when there is a space in the path to the source or build tree because the tools do not seem to support it.
* | | | | Merge topic 'vs-minor-cleanups'Brad King2014-09-291-14/+17
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | | | | | | | | | c655f0c4 VS: Drop GenerateManifest from .vcxproj files for non-MS tools 227a3367 VS: Use case-insensitive check for hlsl,jpg,png,xml file extensions 4a24015a Tests: Always detect VS and SDK availability on Windows
| * | | Tests: Always detect VS and SDK availability on WindowsBrad King2014-09-291-14/+17
| | | | | | | | | | | | | | | | | | | | Move the detection block out of the Windows >= 8 conditional so it can be used on other versions.
* | | | Tests: Adjust expected error message in FailedSubmit-ftpTony Kelman2014-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error message from cygwin's curl (using `--system-libs`) in CTestTestFailedSubmit-ftp was: Failed to connect to port 21: Connection timed out ^^^ Update our regex to match this.
* | | | Merge topic 'ninja-compiler-change'Brad King2014-09-241-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 6120fca8 Ninja: Prevent compilers to be silently modified
| * | | | Ninja: Prevent compilers to be silently modifiedSylvain Joubert2014-09-221-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Unlike with Unix Makefiles generator modifying compiler paths was not protected with Ninja generator. It was possible to modify them in the cache without the expected effect on the generated solution. Also activate corresponding tests with Ninja.
* | | | Merge topic 'autogen-fixes'Brad King2014-09-226-0/+139
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | e3c97a19 QtAutogen: Process all ui files in a source file (#14981). b8877b1d QtAutogen: Add source files to target when only AUTORCC is used.
| * | | | QtAutogen: Process all ui files in a source file (#14981).Stephen Kelly2014-09-185-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | Use a vector to store a list of matched ui_ includes, instead of overwriting the previous match.
| * | | | QtAutogen: Add source files to target when only AUTORCC is used.Stephen Kelly2014-09-172-0/+12
| | | | | | | | | | | | | | | | | | | | Add missing entry to if condition.
* | | | | Tests: Fix CMP0054 warningsBrad King2014-09-168-11/+11
| |/ / / |/| | | | | | | | | | | | | | | Hack the CMP0054 warning locally to be an error and run the test suite. Resolve CMP0054 in Tests/* code as appropriate for each case.
* | | | Merge topic 'vs-generator-platform'Brad King2014-09-1520-9/+68
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be6a555d Tests: Test setting a generator platform in a toolchain file d506fee8 Tests: Use -A option to pass generator platform selection 11c9ddd6 ExternalProject: Use -A option to pass generator platform 29bd843e CTest: Use -A option to pass generator platform selection eb7d8156 cmake: Add -A option to specify a generator platform
| * | | | Tests: Test setting a generator platform in a toolchain fileBrad King2014-09-159-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | Teach the RunCMake.GeneratorPlatform test to cover setting CMAKE_GENERATOR_PLATFORM in a file loaded by CMAKE_TOOLCHAIN_FILE.
| * | | | Tests: Use -A option to pass generator platform selectionBrad King2014-09-157-8/+8
| | | | | | | | | | | | | | | | | | | | This is less verbose than defining CMAKE_GENERATOR_PLATFORM.
| * | | | cmake: Add -A option to specify a generator platformBrad King2014-09-155-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the 'cmake -A' option to set CMAKE_GENERATOR_PLATFORM without having to spell out the whole variable name. We choose the name '-A' for "platform" because '-P' is already taken, and in the common use case the "platform" is actually an architecture (e.g. x64). Teach the RunCMake test infrastructure to use -A to pass the generator platform. Extend the RunCMake.GeneratorPlatform test with a case to verify that the -A option cannot be repeated.
* | | | | Merge topic 'if-sanity'Brad King2014-09-1527-1/+437
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin e177e7af FPHSA: Avoid if() dereferencing of quoted variable 425acc52 cmcurl: Use if(DEFINED) to simplify conditions cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable 2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable 0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions 188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if() b900c1cc If: Extract cmConditionEvaluator from if() implementation
| * | | | | Fix if() checks of CMAKE_SYSTEM_NAME on CygwinBrad King2014-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMAKE_SYSTEM_NAME is "CYGWIN", but we also define a variable named "CYGWIN" to "1". Avoid allowing if() to expand the "CYGWIN" string as a variable.
| * | | | | If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-1126-0/+436
| | | | | |