Fix: build: pass configure flags to cmake example
[lttng-ust.git] / doc / examples / Makefile.am
index 3cb3e3d7b12c031133fc93211412440c887fc952..5d67e79141f85e7269acc6f0aa09e59845aba8a4 100644 (file)
@@ -145,7 +145,20 @@ all-local:
        fi;
        if [ x"$(SUBDIRS_CMAKE)" != x"" ]; then \
                for subdir in $(SUBDIRS_CMAKE); do \
-                       (cd $(SUBDIRS_CMAKE) && mkdir -p build && cd build && cmake -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" .. && $(MAKE) && cd ..) || exit 1; \
+                       ( \
+                               cd $(SUBDIRS_CMAKE) && \
+                               $(MKDIR_P) build && \
+                               cd build && \
+                               cmake \
+                               -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \
+                               -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \
+                               -DCMAKE_C_FLAGS="$(CFLAGS) $(CPPFLAGS)" \
+                               -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
+                               -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
+                               .. && \
+                               $(MAKE) && \
+                               cd .. \
+                       ) || exit 1; \
                done; \
        fi;
 
This page took 0.023693 seconds and 4 git commands to generate.