[CMake] race condition with target_objects

Juan E. Sanchez juan.e.sanchez at gmail.com
Tue Jun 26 13:32:26 EDT 2018


Hi,

The likely problem is that the symdiff_objects and the symdiff_tcl are 
in side-by-side directories.  They are both added using ADD_SUBDIRECTORY 
one level up.  If I put symdiff_python before symdiff_tcl, then that 
target will fail.  Please fix your Makefile generator.

Regards,

Juan


On 6/26/18 10:58 AM, Brad King wrote:
> On 06/25/2018 03:09 PM, Juan E. Sanchez wrote:
>> ADD_LIBRARY(symdiff_objects OBJECT ${CXX_SRCS} ${MC_SRCS})
>> set_property(TARGET symdiff_objects PROPERTY POSITION_INDEPENDENT_CODE ON)
>> TARGET_LINK_LIBRARIES (symdiff_tcl $<TARGET_OBJECTS:symdiff_objects> ${TCL_ARCHIVE})
>>
>> How do I tell cmake to wait?
> 
> Strange, our test suite covers that and the dependency appears.
> The TARGET_OBJECTS generator expression evaluation has special
> logic to forward the target-level dependency.
> 
>> This is cmake 3.9.0-rc4
> 
> Please try a more recent version, perhaps an actual release.
> 
> -Brad
> 



More information about the CMake mailing list