summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Refactor generation of shared library flagsStephen Kelly2012-06-128-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
* Add platform variable for flags specific to shared librariesStephen Kelly2012-06-121-0/+2
| | | | | | Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared libraries.
* Add platform variables for position independent code flagsStephen Kelly2012-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | Store in new platform variables CMAKE_${lang}_COMPILE_OPTIONS_PIC CMAKE_${lang}_COMPILE_OPTIONS_PIE flags for position independent code generation. In almost all cases, this means duplication of the CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the assumed pie equivalent for the _PIE case. Note that the GNU compiler has supported -fPIE since 3.4 and that there is no -fPIC on GNU for Windows or Cygwin. There is a possibility that the _PIE variables are not correct. However, as there is no backwards compatibility to be concerned about (as the POSITION_INDEPENDENT_CODE property is not used anywhere yet), the current state suffices.
* Merge topic 'HandleEmptySIZEOF_VOID_P'David Cole2012-05-241-0/+12
|\ | | | | | | | | | | 14b213c add test for #13241: empty SIZEOF_VOIDP in write_basic_package_version_file 00ae36f write_basic_package_version_file() now works with unset CMAKE_SIZEOF_VOID_P
| * add test for #13241: empty SIZEOF_VOIDP in write_basic_package_version_fileAlex Neundorf2012-05-231-0/+12
| | | | | | | | Alex
* | Merge topic 'CPack-activateRPM-DEB-onMacOS'David Cole2012-05-241-12/+36
|\ \ | |/ |/| | | | | | | 801ea70 Calm down Borland compiler warning about "always true" 2a34b57 CPack allow RPM and DEB generator to be used on OSX.
| * CPack allow RPM and DEB generator to be used on OSX.Eric NOULARD2012-05-201-12/+36
| | | | | | | | | | | | | | | | | | More generally add the check for possible generator "activation" at runtime depending on a generator specific check. The dynamic behavior is currently implemented only for MacOS and should be fully backward compatible for other system. Inspired-By Tom Hughes <tomtheengineer@gmail.com>
* | Merge topic 'mumps_coverage'David Cole2012-05-179-0/+1951
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c806b23 CDash now supports lots of files in coverage. So, show all files. 761d931 Do not try to run bullseye coverage if COVFILE env is empty. 5b69ce4 Update test data to match new coverage format. 1b418f1 Change GT.M Coverage Parser global b0c07a1 Disable bullseye coverage for mumps coverage test. 0a169e6 Remove uncovered files from cache coverage data. a7abf5e Add ability to specify more than one package directory or coverage directory. 220afca Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE. 62f6bce Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2. f5c5db0 Fix some warnings and a bug where it went past the length of a vector. 7955e99 Add support for Cache coverage. a86cd33 Add virutal destructor to silence warning. 319eeb0 Add test for mumps coverage. Also refactor code to prepare for cache coverage. 72210c2 Fix line length. dd07161 Fix warning about char* instead of const char*. e6412e0 Add support to ctest for GTM mumps coverage.
| * | Update test data to match new coverage format.Bill Hoffman2012-05-071-1441/+1441
| | |
| * | Disable bullseye coverage for mumps coverage test.Bill Hoffman2012-05-041-2/+4
| | |
| * | Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE.Bill Hoffman2012-05-023-26/+10
| | | | | | | | | | | | Also add -crlf to the .gitconfig to handle the coverage data.
| * | Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2.Bill Hoffman2012-05-022-8/+24
| | | | | | | | | | | | | | | add_test with WORKING_DIRECTORY is too new to use in cmake. This change uses a configured script to run the command in the right directory.
| * | Add support for Cache coverage.Bill Hoffman2012-05-014-0/+330
| | | | | | | | | | | | | | | This adds support for Cache coverage parsing. A test is added that does a basic run of the coverage on a small bit of data.
| * | Add test for mumps coverage. Also refactor code to prepare for cache coverage.Bill Hoffman2012-05-016-0/+1619
| | | | | | | | | | | | | | | Add a simple test to make sure the GTM mumps coverage is working. Also refactor the code so that cache coverage can be added.
* | | Merge topic 'module-no-soname'David Cole2012-05-012-0/+58
|\ \ \ | | | | | | | | | | | | | | | | | | | | fdb3f87 Test NO_SONAME property (#13155) e1409ac Support building shared libraries or modules without soname (#13155)
| * | | Test NO_SONAME property (#13155)Brad King2012-04-302-0/+58
| |/ / | | | | | | | | | | | | | | | | | | Teach the Plugin test to check that the NO_SONAME target property works as documented. Check that the IMPORTED targets are written with the correct properties. When readelf is available use it to check the actual binary files for SONAME fields.
* | | Merge topic 'enhance-include_external_msproject'David Cole2012-04-2511-0/+138
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b803410 VS: Fix line-too-long style errors 8787f94 Merge branch 'list-empty-error' into enhance-include_external_msproject 4a30258 include_external_msproject: Test TYPE, GUID, PLATFORM options (#13120) f3191f5 Merge branch 'test-RunCMake-check' into enhance-include_external_msproject 5913903 include_external_msproject: Add TYPE, GUID, PLATFORM options (#13120)
| * \ \ Merge branch 'list-empty-error' into enhance-include_external_msprojectBrad King2012-04-1912-0/+30
| |\ \ \ | | | | | | | | | | | | | | | Resolve conflict in Tests/RunCMake/CMakeLists.txt by adding both tests.
| * | | | include_external_msproject: Test TYPE, GUID, PLATFORM options (#13120)Brad King2012-04-1911-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "RunCMake.include_external_msproject" test to use the TYPE, GUID, and PLATFORM options to include_external_msproject. Since projects with custom types and platforms cannot be loaded without special VS plugins validate the results by directly parsing the generated solution (.sln). Co-Author: Leonid Yurchenko <nocturne@qarea.com>
* | | | | Merge topic 'list-empty-error'David Cole2012-04-2512-0/+30
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | 05604eb list: Handle errors on empty lists more gracefully (#13138)
| * | | | list: Handle errors on empty lists more gracefully (#13138)Brad King2012-04-1712-0/+30
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ed1ea24c (Fix INSERT to allow inserting to empty list, 2006-05-15) the list command allows insertion into an empty list at index 0. Fix rejection of insertion at non-zero (negative) indices to present an error message instead of crashing. While at it, fix the error message of the GET and REMOVE_AT operations when the list is empty to not present a bogus allowed range. Add a "RunCMake.list" test to cover failure cases on empty lists.
* | | | Merge topic 'test-RunCMake-check'David Cole2012-04-252-9/+19
|\ \ \ \ | | |/ / | |/| | | | | | | | | | 38c3943 Teach RunCMake tests to allow custom checks
| * | | Teach RunCMake tests to allow custom checksBrad King2012-04-192-9/+19
| |/ / | | | | | | | | | | | | | | | Look for a <SubTest>-check.cmake script and load it to check side effects of the sub test. Provide it with the test source and build tree paths in variables. Check for a failure message in a result variable.
* | | FindPkgConfig.cmake: fix documented output variable not set (#13125,#13132)Rolf Eike Beer2012-04-151-2/+1
|/ / | | | | | | | | The real fix is from Yury G. Kudryashov while I added the surrounding cleanups. An additional hint to really get this fixed came from Rex Dieter.
* | Merge topic 'test-generated-def'David Cole2012-04-034-1/+14
|\ \ | | | | | | | | | | | | 89987c2 Test generated module .def files
| * | Test generated module .def filesBrad King2012-04-024-1/+14
| | | | | | | | | | | | | | | Teach the ModuleDefinition test to cover the case that a .def file is generated by a custom command.
* | | automoc: add define to test which caused bug #13018Alex Neundorf2012-03-261-1/+1
| |/ |/| | | | | | | | | | | | | | | This does not really test that the bug is fixed, but at least it makes it easy to check manually whether the bug is there or not. I have to see whether I can build a test which does test that a target is not rebuilt everytime. Alex
* | Merge topic 'fix-CTestUpdateHG-url'Brad King2012-03-231-1/+4
|\ \ | | | | | | | | | | | | d0702f8 CTest.UpdateHG: Fix repo URL for leading slash
| * | CTest.UpdateHG: Fix repo URL for leading slashBrad King2012-03-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "file:///..." instead of "file:////..." when the file system path starts in a slash. Commit 0916cc88 (CTest.UpdateHG: Fix repo URL for local filesystem, 2012-03-02) added a third slash after "file://" unconditionally. This worked for many file systems but not on Cygwin where "file:////cygdrive/..." looks like "file://" followed by a network file path "//cygdrive/...". Add the slash only if the file system path does not already start with one.
* | | Merge topic 'fix-AllFindModules-version-check'David Cole2012-03-211-3/+13
|\ \ \ | | | | | | | | | | | | | | | | a5ee628 Tests: Relax restrictions on version variable contents
| * | | Tests: Relax restrictions on version variable contentsDavid Cole2012-03-201-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our only expectation of version number variables should be that they begin with a decimal digit for VERSION_LESS, VERSION_EQUAL and VERSION_GREATER comparison purposes. If people put extra blah blah after a version number like "1.2.3 (this is some super special extra information about our funky proprietary build of the official 1.2.3 release)" then we should be ok with that. So: now we have the following expectations for version number variable content for the purposes of the AllFindModules test: - it should start with a decimal digit (match "^[0-9]") - it should not be empty - it should not be VERSION_EQUAL 0 - it should not be NOT VERSION_GREATER 0
* | | | Merge topic 'watcom-object-library'David Cole2012-03-214-12/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | fb7348f Fix ObjectLibrary test on Watcom
| * | | | Fix ObjectLibrary test on WatcomBrad King2012-03-204-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Watcom compiler interprets "-DB" as option -db generate browsing information so define "A_DEF" and "B_DEF" instead of just "A" and "B". Skip CMAKE_SHARED_LIBRARY_C_FLAGS for Watcom because it is set to -bd build Dynamic link library which adds a DLL entry point to each object.
* | | | | Merge topic 'vs10-object-items'David Cole2012-03-212-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b291d9e VS10: Fix external objects generated outside target (#13047) 328c0f6 Simplify cmVisualStudio10TargetGenerator source classification
| * | | | | VS10: Fix external objects generated outside target (#13047)Brad King2012-03-202-0/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9a6ff950 (Fix for bug where VS2010 did not use .obj files, 2011-04-01) assumed that if an external object is GENERATED that it is the output of a custom command in the current target. If it is generated by another target then VS will not automatically include the external object in the current target. This bug was preserved by the refactoring in the parent commit. Instead use <None> for external objects generated by a custom command in the current target and <Object> for all other external objects. Update the ExternalOBJ test to cover this case.
* | | | | Merge topic 'ImprovedCOMPONENTSSupportInFindPackage2'David Cole2012-03-217-0/+43
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d100f9 find_package: Test rejection of required+optional components d81d83c add macro check_required_components() to configure_package_config_file() b15c0b4 FPHSA(): add HANDLE_COMPONENTS option 34108cd find_package: add documentation for OPTIONAL_COMPONENTS cdabde8 FPHSA(): add missing "]" to documentation f2e0a18 find_package: add OPTIONAL_COMPONENTS keyword
| * | | | find_package: Test rejection of required+optional componentsBrad King2012-03-194-0/+11
| | | | |
| * | | | add macro check_required_components() to configure_package_config_file()Alex Neundorf2012-03-192-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed on cmake-developers, this patch adds a macro check_required_components() to the file configured via configure_package_config_file(), so for proper handling of components in Config.cmake files users can simply call check_required_components(PackageName) and this will do the right thing. Alex
| * | | | FPHSA(): add HANDLE_COMPONENTS optionAlex Neundorf2012-03-192-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if the HANDLE_COMPONENTS is used, FPHSA() now also checks all required COMPONENTS, i.e. all elements from <name>_FIND_COMPONENTS for which <name>_FIND_REQUIRED_<comp> is true, and sets <name>_FOUND only to true if all have been found. As discussed on cmake-developers. Alex
* | | | | Merge topic 'object-library'David Cole2012-03-2071-0/+340
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93d5509 Merge branch 'ninja-object-library' into object-library 821037c Merge branch 'xcode-object-library' into object-library eb24c99 Merge branch 'object-library' into xcode-object-library 63d1be8 Xcode: Honor $<TARGET_OBJECTS:...> source expressions 020ba38 Merge branch 'object-library' into xcode-object-library e8ea615 Build object library targets in Xcode 8045e17 Pre-compute object file names before Xcode generation 247a132 Allow txt files as ExtraSources in object library targets b063599 Add a default source group for object files. be01f3b Xcode: Re-factor some existing methods into "FromPath" variants 2693dbe Merge branch 'object-library' into ninja-object-library 51997cb Ninja: Honor $<TARGET_OBJECTS:...> source expressions 23ec258 Merge branch 'object-library' into ninja-object-library 61124de Build object library targets in Ninja f5b06cd Pre-compute object file names before Ninja generation a2514f1 Simplify cmNinjaTargetGenerator using cmGeneratorTarget ...
| * | | | Merge branch 'object-library' into ninja-object-libraryBrad King2012-03-1671-0/+340
| |\ \ \ \
| | * | | | Test OBJECT library use without other sourcesBrad King2012-03-165-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reference OBJECT libraries for inclusion in targets that have no other sources to verify that the linker language propagates correctly from the object libraries. Test with a STATIC library, a SHARED library, and an EXECUTABLE target. Use the static and shared libraries each in executables that end up using the object library symbols. In VS 6, 7, and 7.1 add a dummy object file to convince the IDE to build the targets without sources. In Xcode add a dummy source file to convince it to build targets without sources.
| | * | | | Test OBJECT library language propagationBrad King2012-03-163-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the RunCMake.ObjectLibrary test to verify that languages used in an OBJECT library are propagated to targets that use it so that the languages can be included in link analysis.
| | * | | | Test OBJECT library failure casesBrad King2012-03-1651-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "RunCMake.ObjectLibrary" test to verify that unsupported use cases are rejected with errors: * An OBJECT library may not reference another object library * An OBJECT library may not be referenced in target_link_libraries * An OBJECT library may not contain non-compiling sources * An OBJECT library may not have pre/post build/link commands * An OBJECT library may not be installed, exported, or imported Also verify that invalid $<TARGET_OBJECTS:...> expressions are diagnosed.
| | * | | | Test OBJECT library success casesBrad King2012-03-1614-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "ObjectLibrary" test to build and use OBJECT libraries. Build multiple object libraries in separate directories with different flags. Use a custom command to generate a source file in one OBJECT library. Reference the OBJECT libraries for inclusion in a STATIC library, a SHARED library, and an EXECUTABLE target. Use the static and shared libraries each in executables that end up using the object library symbols. Verify that object library symbols are exported from the shared library.
| * | | | | Merge branch 'object-library' into ninja-object-libraryBrad King2012-03-1681-249/+907
| |\ \ \ \ \ | | |/ / / /
* | | | | | Merge topic 'find_package_set_FOUND_VariableInConfigFile'Brad King2012-03-197-0/+27
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 0cf8447 find_package: additional test for checking the error message 56ae3f9 find_package: add test for setting Foo_FOUND to FALSE in a Config file 16c0c73 find_package: allow <pkg>Config.cmake to set <pkg>_FOUND to FALSE
| * | | | | find_package: additional test for checking the error messageAlex Neundorf2012-03-134-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a test which checks the error message, which is produced in the case that a Config file has set Foo_FOUND to FALSE by itself. Alex
| * | | | | find_package: add test for setting Foo_FOUND to FALSE in a Config fileAlex Neundorf2012-03-133-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Alex
* | | | | | Merge topic 'ninja-generator'Brad King2012-03-194-3/+22
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8485208 Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR) df84767 Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case 48eb7fc Ninja: Avoid using 'this' in member initializers bba37dd Ninja: Fix for PDB files with spaces in the path. ac800f4 Ninja: Constify use of cmCustomCommand 9a0d5a8 Ninja: add /DEF: flag to linker call d40eebd Ninja: Add a cache option CMAKE_ENABLE_NINJA to enable the ninja generator. 8c63433 Ninja: Add friend struct so it can access the private ConvertToNinjaPath. dbe3dce Ninja: add .def file support f1bb08f Ninja: ensure the output dir exists at compile time 7a6b5f4 Ninja: Remove an unnecessary variable 80ff210 Ninja: Use cmSystemTools::ExpandListArgument to split compile/link commands d2731a3 Ninja: Add a missed license header eabc9b0 Ninja: CMake: Adapt Ninja generator for per-target include dirs bada88e Merge branch 'target-include-directories' into ninja-generator 54bd175 Ninja: windows msvc: create for each target a .pdb file ...