[lttng-dev] [PATCH lttng-ust] Fix: CMake examples integration
Jonathan Rajotte Julien
Jonathan.rajotte-julien at efficios.com
Mon Feb 20 21:52:18 UTC 2017
Hi,
On 2017-02-20 04:48 PM, Michael Jeanson wrote:
> Fix multiple issues with the CMake examples integration with our build
> system.
Could you provide more context?
Cheers
>
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
> .gitignore | 1 +
> doc/examples/Makefile.am | 12 ++++++------
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/.gitignore b/.gitignore
> index 0d322b1..e35e5d5 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -41,6 +41,7 @@ doc/examples/gen-tp/sample
> doc/examples/gen-tp/sample_tracepoint.h
> doc/examples/demo-tracef/demo-tracef
> doc/examples/demo-tracelog/demo-tracelog
> +doc/examples/cmake-multiple-shared-libraries/build/
>
> doc/man/*.xml
> doc/man/lttng-gen-tp.1
> diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
> index 5bc1f4c..239046f 100644
> --- a/doc/examples/Makefile.am
> +++ b/doc/examples/Makefile.am
> @@ -135,26 +135,26 @@ all-local:
> done; \
> if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
> for subdir in $(SUBDIRS_JUL); do \
> - (cd $(SUBDIRS_JUL) && $(MAKE) JAVA_CLASSPATH_OVERRIDE_JUL="../../../liblttng-ust-java-agent/java/lttng-ust-agent-jul" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
> + (cd $$subdir && $(MAKE) JAVA_CLASSPATH_OVERRIDE_JUL="../../../liblttng-ust-java-agent/java/lttng-ust-agent-jul" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
> done; \
> fi; \
> if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \
> for subdir in $(SUBDIRS_LOG4J); do \
> - (cd $(SUBDIRS_LOG4J) && $(MAKE) JAVA_CLASSPATH_OVERRIDE_LOG4J="../../../liblttng-ust-java-agent/java/lttng-ust-agent-log4j" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
> + (cd $$subdir && $(MAKE) JAVA_CLASSPATH_OVERRIDE_LOG4J="../../../liblttng-ust-java-agent/java/lttng-ust-agent-log4j" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
> done; \
> - fi;
> + fi; \
> if [ x"$(SUBDIRS_CMAKE)" != x"" ]; then \
> for subdir in $(SUBDIRS_CMAKE); do \
> ( \
> - cd $(SUBDIRS_CMAKE) && \
> + cd $$subdir && \
> $(MKDIR_P) build && \
> cd build && \
> + CC=$(CC) \
> + CXX=$(CXX) \
> cmake \
> -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \
> -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \
> - -DCMAKE_C_COMPILER="$(CC)" \
> -DCMAKE_C_FLAGS="$(CFLAGS) $(CPPFLAGS)" \
> - -DCMAKE_CXX_COMPILER="$(CXX)" \
> -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
> -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
> .. && \
>
--
Jonathan R. Julien
Efficios
More information about the lttng-dev
mailing list