File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,20 @@ else
167167 fi
168168fi
169169
170+ if [ $( uname) = " Darwin" ]; then
171+ if test -f $INSTALL_DIR /bin/mongoc-stat; then
172+ echo " mongoc-stat shouldn't have been installed"
173+ exit 1
174+ fi
175+ else
176+ if test ! -f $INSTALL_DIR /bin/mongoc-stat; then
177+ echo " mongoc-stat missing!"
178+ exit 1
179+ else
180+ echo " mongoc-stat check ok"
181+ fi
182+ fi
183+
170184if [ " $BUILD_SAMPLE_WITH_CMAKE " ]; then
171185 # Test our CMake package config file with CMake's find_package command.
172186 EXAMPLE_DIR=$SRCROOT /src/libmongoc/examples/cmake/find_package
Original file line number Diff line number Diff line change @@ -597,6 +597,13 @@ endif ()
597597add_executable (mongoc-stat ${PROJECT_SOURCE_DIR} /../../src/tools/mongoc-stat.c)
598598target_link_libraries (mongoc-stat mongoc_shared)
599599
600+ # mongoc-stat works if shared memory performance counters are enabled.
601+ if (ENABLE_SHM_COUNTERS STREQUAL "ON" )
602+ install (PROGRAMS ${PROJECT_BINARY_DIR} /mongoc-stat
603+ DESTINATION ${CMAKE_INSTALL_BINDIR}
604+ )
605+ endif ()
606+
600607function (mongoc_add_test test use_shared)
601608 if (ENABLE_TESTS)
602609 add_executable (${test} ${ARGN} )
You can’t perform that action at this time.
0 commit comments