Benjamin Bannier created MESOS-7470:
---------------------------------------

             Summary: CMake build does not make sure proto outputs are 
generated before attempting to compile users
                 Key: MESOS-7470
                 URL: https://issues.apache.org/jira/browse/MESOS-7470
             Project: Mesos
          Issue Type: Bug
          Components: cmake
            Reporter: Benjamin Bannier


For each protobuf file, our cmake setup creates a dedicated target generating 
both the header and implementation file and adds these as dependencies directly 
to some other target (typically a library). At least for the Make generator, 
this under the covers introduces a dependency edge from the library to an 
object file generated from compiling the protobuf implementation file.

If a protobuf file has an {{import}} for another protobuf file, the generated 
C++ will include the corresponding generated header file. We currently do not 
ensure all input files (e.g., headers) are generated from their sources before 
compiling users.

This can lead to faulty builds where

1) a consuming protobuf file is compiled before its inputs are generated, or
2) in incremental builds, a consuming protobuf is compiled from an outdated 
generated protobuf header file.

It seems we should ensure all protobuf files are created before allowing 
compilation of users.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to