Skip to content

Commit

Permalink
Allow disabling of HardwareCounter
Browse files Browse the repository at this point in the history
HardwareCounter depends on linux specific ioctls
and kernel hooks.  This makes them unusable on other platforms.
  • Loading branch information
sgolemon committed Aug 18, 2012
1 parent 52cb344 commit 7761a65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CMake/HPHPSetup.cmake
Expand Up @@ -42,10 +42,6 @@ if(APPLE)
endif()
endif()

if(NOT LINUX)
add_definitions(-DNO_HARDWARE_COUNTERS)
endif()

include(HPHPFunctions)
include(HPHPFindLibs)

Expand Down
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -48,6 +48,12 @@ foreach (dir ${RECURSIVE_SOURCE_SUBDIRS})

endforeach(dir ${RECURSIVE_SOURCE_SUBDIRS})

# Disable hardware counters off of Linux
if(NOT LINUX)
add_definitions(-DNO_HARDWARE_COUNTERS)
list(REMOVE_ITEM CXX_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/util/hardware_counter.cpp)
endif()

# remove ext_hhvm
foreach (file ${CXX_SOURCES})
if (${file} MATCHES "ext_hhvm")
Expand Down

0 comments on commit 7761a65

Please sign in to comment.