> On Sept. 25, 2015, 5:39 p.m., Joseph Wu wrote:
> > src/CMakeLists.txt, lines 34-38
> > <https://reviews.apache.org/r/38756/diff/1/?file=1084616#file1084616line34>
> >
> >     This seems macro-able.
> >     
> >     A macro which would let you do something like:
> >     ```
> >     BUILD_PROTO(MESOS)
> >     BUILD_PROTO(V1_MESOS)
> >     BUILD_PROTO(AUTHENTICATION)
> >     ...
> >     ```

Hmm, I see your point about there being a lot of duplicated code, so let me 
bounce this idea off of you. I think we will end up having to have two 
protoc-generating functions, like `PROTOC_TO_MESOS_INCLUDE_DIR(V1_MESOS)` and 
`PROTOC_TO_MESOS_SRC_DIR(MESSAGES)`.

The reason is that there are actually two flavors of `protoc` being generated 
here -- one where we are generating protobuf code and putting it in `include/` 
and one where we are putting it in `src/`. This means practically that at least 
two things need to be able to change: (1) `protoc` flags need to change to tell 
where to put the generated code, and (2) `DEPENDS` needs to change to make sure 
we depend on build targets that will generate that folder before we try to dump 
the generated code there.

So, at the very least, I think `BUILD_PROTO` would have to look something like: 
`BUILD_PROTO(MESOS, make_bin_include_dir, ${MESOS_BIN_INCLUDE_DIR})`, but on 
top of that, we also have other baked-in assumptions like what the working dir 
is, and what the rest of the `-I` flags are. By splitting it up, it seems like 
these assumptions are much more explicit, which is attractive to me.

Thoughts?


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38756/#review100625
-----------------------------------------------------------


On Sept. 25, 2015, 6:20 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38756/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2015, 6:20 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Bugs: MESOS-3385
>     https://issues.apache.org/jira/browse/MESOS-3385
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> CMake: Add support for compiling the agent with CMake.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 3b6f4af337466d33cb915959a5995e4307b27be3 
>   cmake/MesosConfigure.cmake b530da4c1e6f202b682ad7d6892da95d2181f8c8 
>   src/CMakeLists.txt PRE-CREATION 
>   src/cmake/MesosProtobuf.cmake PRE-CREATION 
>   src/slave/cmake/AgentConfigure.cmake PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38756/diff/
> 
> 
> Testing
> -------
> 
> Compiled and ran made sure libprocess and stout tests ran and passed on the 
> following platforms:
> 
> * OS X 10.10
> * Ubuntu 14.04.2
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>

Reply via email to