Fix: CMake examples integration
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 20 Feb 2017 21:48:56 +0000 (16:48 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 20 Feb 2017 21:57:30 +0000 (16:57 -0500)
Fix multiple issues with the CMake examples integration with our build
system.

Fixes #1089

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
.gitignore
doc/examples/Makefile.am

index 0d322b19cd89b4043c3f3a86e3a4e184b60a9b40..e35e5d529cfe3d9d05ff8ac78e964624fa98f9d1 100644 (file)
@@ -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
index 5bc1f4c9c2aeb350b3fe5899bcba7626fc7705c3..239046fdb31a331673819cd3456f02737aa98a1b 100644 (file)
@@ -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)" \
                                .. && \
This page took 0.026378 seconds and 4 git commands to generate.