File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -372,25 +372,7 @@ endif ()
372
372
373
373
set (MONGOC_ENABLE_SHM_COUNTERS 0 )
374
374
375
- if (NOT ENABLE_SHM_COUNTERS MATCHES "ON|OFF|AUTO" )
376
- message (FATAL_ERROR "ENABLE_SHM_COUNTERS option must be ON, OFF, or AUTO" )
377
- endif ()
378
-
379
- if (ENABLE_SHM_COUNTERS STREQUAL "AUTO" )
380
- if (UNIX AND NOT APPLE )
381
- set (ENABLE_SHM_COUNTERS ON )
382
- endif ()
383
- if (APPLE AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64" )
384
- set (ENABLE_SHM_COUNTERS ON )
385
- endif ()
386
- endif ()
387
-
388
- if (ENABLE_SHM_COUNTERS STREQUAL "ON" )
389
- if (( NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64" AND APPLE ) OR NOT UNIX )
390
- message (
391
- FATAL_ERROR
392
- "Shared memory performance counters only supported on arm64 Mac and Linux" )
393
- endif ()
375
+ if (ENABLE_SHM_COUNTERS )
394
376
set (MONGOC_ENABLE_SHM_COUNTERS 1 )
395
377
find_library (RT_LIBRARY rt HINTS /usr/lib32 )
396
378
if (RT_LIBRARY )
@@ -848,7 +830,7 @@ add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c)
848
830
target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES} )
849
831
850
832
# mongoc-stat works if shared memory performance counters are enabled.
851
- if (ENABLE_SHM_COUNTERS STREQUAL "ON" )
833
+ if (ENABLE_SHM_COUNTERS )
852
834
install (TARGETS mongoc-stat
853
835
EXPORT mongoc_targets
854
836
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} " )
You can’t perform that action at this time.
0 commit comments