CMake/Tests/RunCMake/ObjectLibrary
Brad King d89e10cd58 Diagnose object library self-reference
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
2017-07-14 14:05:22 -04:00
..
a.c Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
b.c Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
bad.def
bad.obj
BadObjSource1-result.txt
BadObjSource1-stderr.txt add_library: Allow arbitrary non-linked sources in OBJECT libraries 2014-07-09 09:43:42 -04:00
BadObjSource1.cmake
BadObjSource2-result.txt
BadObjSource2-stderr.txt add_library: Allow arbitrary non-linked sources in OBJECT libraries 2014-07-09 09:43:42 -04:00
BadObjSource2.cmake
BadSourceExpression1-result.txt
BadSourceExpression1-stderr.txt cmTarget: Allow any generator expression in SOURCES property. 2014-04-02 23:12:56 +02:00
BadSourceExpression1.cmake
BadSourceExpression2-result.txt
BadSourceExpression2-stderr.txt cmGeneratorTarget: Compute consumed object libraries on demand. 2014-04-02 23:12:56 +02:00
BadSourceExpression2.cmake
BadSourceExpression3-result.txt
BadSourceExpression3-stderr.txt cmGeneratorTarget: Compute consumed object libraries on demand. 2014-04-02 23:12:56 +02:00
BadSourceExpression3.cmake
CMakeLists.txt
Dependencies.cmake Tests: Change RunCMake.ObjectLibrary dependencies case to C 2017-02-26 10:43:32 -05:00
depends_lib.c Tests: Change RunCMake.ObjectLibrary dependencies case to C 2017-02-26 10:43:32 -05:00
depends_main.c Tests: Change RunCMake.ObjectLibrary dependencies case to C 2017-02-26 10:43:32 -05:00
depends_obj0.c Tests: Change RunCMake.ObjectLibrary dependencies case to C 2017-02-26 10:43:32 -05:00
depends_obj1.c Tests: Change RunCMake.ObjectLibrary dependencies case to C 2017-02-26 10:43:32 -05:00
Export.cmake
ExportNotSupported-result.txt Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
ExportNotSupported-stderr.txt Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
ExportNotSupported.cmake Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
Import.cmake Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
ImportNotSupported-result.txt Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
ImportNotSupported-stderr.txt Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
ImportNotSupported.cmake Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
Install.cmake
InstallNotSupported-result.txt Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
InstallNotSupported-stderr.txt Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
InstallNotSupported.cmake Allow OBJECT libraries to be installed, exported, and imported 2017-04-18 11:36:10 -04:00
LinkObjLHS-result.txt
LinkObjLHS-stderr.txt
LinkObjLHS.cmake
LinkObjRHS1-result.txt
LinkObjRHS1-stderr.txt
LinkObjRHS1.cmake
LinkObjRHS2-result.txt
LinkObjRHS2-stderr.txt
LinkObjRHS2.cmake
MissingSource-result.txt Check for OBJECT_LIBRARY source files at start of generation 2013-11-01 14:46:58 -04:00
MissingSource-stderr.txt Check for OBJECT_LIBRARY source files at start of generation 2013-11-01 14:46:58 -04:00
MissingSource.cmake Check for OBJECT_LIBRARY source files at start of generation 2013-11-01 14:46:58 -04:00
ObjWithObj-result.txt
ObjWithObj-stderr.txt
ObjWithObj.cmake
OwnSources-result.txt Diagnose object library self-reference 2017-07-14 14:05:22 -04:00
OwnSources-stderr.txt Diagnose object library self-reference 2017-07-14 14:05:22 -04:00
OwnSources.cmake Diagnose object library self-reference 2017-07-14 14:05:22 -04:00
PostBuild-result.txt
PostBuild-stderr.txt
PostBuild.cmake
PreBuild-result.txt
PreBuild-stderr.txt
PreBuild.cmake
PreLink-result.txt
PreLink-stderr.txt
PreLink.cmake
RunCMakeTest.cmake Diagnose object library self-reference 2017-07-14 14:05:22 -04:00