Hi Stefan,
Many IDEs provide the convenience to open a file directly at the position where
the compiler issued a message (warning or error). When the build system copies
the headers to another directory, the file where the error is found differs
from the file where the error should be fixed. Excuse me for being harsh, but
THIS SUCKS.
We had this issue before and I solved it back then by creating so called
"forwarding headers". Now you broke it again in trunk.
I see your point: You want to generate documentation from the exposed headers
and the forwarding headers cannot be used to generate documentation. So you
copy them (bang!).
I offer a different approach, which also solves a lot of other issues like the
ability to use pre-compiled headers, build both static and shared libraries and
modularized builds.
Consider the following two cmake functions:
> purple_add_library(<name> [SHARED|STATIC]
> [FORWARD] [HEADERS <list headers>]
> SOURCES <list of sources>
> [PCH <header file to pre-compile>]
> [HEADERS_DESTINATION <header destination path>]
> [LINK_LIBRARIES <libraries>]
> )
> purple_add_amalgamation(<name> <libraries>)
These functions are used as shown in this example:
> purple_add_library(eq_base
> FORWARD HEADERS ${BASE_HEADERS} base.h
> SOURCES ${BASE_SOURCES}
> HEADERS_DESTINATION eq
> LINK_LIBRARIES ${PTHREAD_LIBRARIES}
> )
> ...
> purple_add_amalgamation(Equalizer
> eq_base
> eq_net
> eq_fabric
> eq_client
> )
This generates:
* eq_base as a static library (no symbols are exported)
* eq_base as a shared library (with exported/visible symbols)
* internal documentation for eq_base
* external documentation for eq_base (without copying headers!)
* install rules for all libraries and public headers
* Equalizer as one big shared library which exports all functions that are
exported by the libraries it is `made of`.
Modularization will allow users (who think Equalizer is overkill) to use just
the modules they need. It will not break any compatibility, since the
amalgamation will be identical to the current monolythic build.
Interested? I am about 70% there. Should I complete it and commit?
cheers, Daniel
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com