summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Diagnose object library self-referenceBrad King2017-07-141-0/+1
| | | | | | | | | | | | | | | | | | | The code add_library(A OBJECT a.c) target_sources(A PRIVATE $<TARGET_OBJECTS:A>) used to crash CMake via infinite recursion while evaluating the generator expression. Then the change in commit v3.9.0-rc1~266^2~1 (cmGeneratorTarget: Replace source classifier implementation, 2017-04-07) avoided the infinite recursion because GetKindedSources now creates a map entry and initializes it once. If it is called again on the same target during that initialization, the partially computed results are returned. This is still wrong but does not crash. Detect and diagnose this case instead. Co-Author: Ben Boeckel <ben.boeckel@kitware.com> Fixes: #16578
* Allow OBJECT libraries to be installed, exported, and importedRobert Maynard2017-04-181-3/+9
| | | | | | | | Teach install() and export() to handle the actual object files. Disallow this on Xcode with multiple architectures because it still cannot be cleanly supported there. Co-Author: Brad King <brad.king@kitware.com>
* Tests: Change RunCMake.ObjectLibrary dependencies case to CBrad King2017-02-261-2/+2
|
* Tests: Fix RunCMake.ObjectLibrary dependency delayBrad King2017-02-261-5/+11
| | | | | | Sleep before the second copy to avoid the need for a touch. Sleep for longer on generators whose build tools have low resolution timestamps.
* Add test for object library dependenciesGregor Jasny2017-02-221-0/+19
| | | | Issue: #16615
* Merge topic 'object-library-missing-source'Brad King2013-11-021-0/+1
|\ | | | | | | | | 5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
| * Check for OBJECT_LIBRARY source files at start of generationBrad King2013-11-011-0/+1
| | | | | | | | | | | | | | Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets in the check for source file existence. Extend the RunCMake.ObjectLibrary test to cover this case.
* | Make ExportLanguages a subtest of the ObjectLibrary testStephen Kelly2013-10-241-1/+0
|/ | | | | | It was a subtest of the RunCMake.ObjectLibrary test. However, we need to test a build with ExternalProject after running CMake, which RunCMake tests do not do.
* Test OBJECT library language propagationBrad King2012-03-161-0/+1
| | | | | | 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-161-0/+17
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.