doc/examples/Makefile.am: define C and C++ compilers for CMake
[lttng-ust.git] / doc / examples / Makefile.am
index 50a534e81a767471d68fa37ed062fa4655e12c43..5bc1f4c9c2aeb350b3fe5899bcba7626fc7705c3 100644 (file)
@@ -34,7 +34,7 @@ dist_doc_examples_python_DATA = python/hello.py
 endif
 
 if HAVE_CMAKE
-if HAVE_CXX
+if CXX_WORKS
 SUBDIRS_CMAKE = cmake-multiple-shared-libraries
 endif
 endif
@@ -147,9 +147,17 @@ all-local:
                for subdir in $(SUBDIRS_CMAKE); do \
                        ( \
                                cd $(SUBDIRS_CMAKE) && \
-                               mkdir -p build && \
+                               $(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" .. && \
+                               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)" \
+                               .. && \
                                $(MAKE) && \
                                cd .. \
                        ) || exit 1; \
This page took 0.026104 seconds and 4 git commands to generate.