Skip to content

Commit 29c9ec8

Browse files
committed
fix OSX build
Change-Id: I43c9b7ca703f49b242a7915ed71a07405e131ef0
1 parent 2c4a1fb commit 29c9ec8

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tests/utests/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@ enable_testing()
1010
include_directories(${CMAKE_SOURCE_DIR}/src/)
1111
include_directories("${GMOCK_DIR}/include")
1212

13+
if(APPLE)
14+
add_subdirectory("${CMAKE_SOURCE_DIR}/src/MacMSRDriver")
15+
include_directories("${CMAKE_SOURCE_DIR}/src/MacMSRDriver") # target_include_directories doesn't work
16+
endif()
17+
1318
file(GLOB LSPCI_TEST_FILES lspci-utest.cpp ${CMAKE_SOURCE_DIR}/src/lspci.cpp)
14-
set(LIBS Threads::Threads PCM_STATIC)
19+
20+
if(APPLE)
21+
set(LIBS PcmMsr Threads::Threads PCM_STATIC)
22+
else()
23+
set(LIBS Threads::Threads PCM_STATIC)
24+
endif()
25+
1526
add_executable(lspci-utest ${LSPCI_TEST_FILES})
1627

1728
target_link_libraries(

0 commit comments

Comments
 (0)