mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
129d87fe23
Summary: While EdenFS does not use a separate privhelper process on Windows, it still defines a stub PrivHelper class. However, this class was previously defined in a separate win/utils/Stub.h header file, which led to awkward `#ifdef`s to include the correct platform-specific header file. This diff moves the definition of the dummy PrivHelper class in Windows into the same `PrivHelper.h` header file used on POSIX platforms. This results in a few more `ifdef`s in the PrivHelper files, but fewer `ifdef`s in the calling code, and will make it easier to start unifying more of the `EdenMain` logic on Windows and non-Windows platforms. Reviewed By: xavierd Differential Revision: D21332568 fbshipit-source-id: c63bf2b4a8b7e767d7db7dcda28675f735c23bf8
56 lines
953 B
CMake
56 lines
953 B
CMake
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2.
|
|
|
|
if(WIN32)
|
|
set(
|
|
TESTHARNESS_SRCS
|
|
"FakeBackingStore.cpp"
|
|
"FakeBackingStore.h"
|
|
"FakePrivHelper.cpp"
|
|
"FakePrivHelper.h"
|
|
"FakeTreeBuilder.cpp"
|
|
"FakeTreeBuilder.h"
|
|
"TempFile.cpp"
|
|
"TempFile.h"
|
|
"TestMount.cpp"
|
|
"TestMount.h"
|
|
"TestUtil.cpp"
|
|
"TestUtil.h"
|
|
)
|
|
else()
|
|
file(GLOB TESTHARNESS_SRCS "*.cpp")
|
|
endif()
|
|
|
|
add_library(
|
|
eden_testharness STATIC
|
|
${TESTHARNESS_SRCS}
|
|
)
|
|
target_include_directories(eden_testharness
|
|
SYSTEM
|
|
PUBLIC
|
|
${LIBGMOCK_INCLUDE_DIR}
|
|
)
|
|
target_link_libraries(
|
|
eden_testharness
|
|
PUBLIC
|
|
eden_config
|
|
eden_inodes
|
|
eden_model
|
|
eden_store
|
|
eden_utils
|
|
${BOOST_LIBRARIES}
|
|
Folly::folly_test_util
|
|
${LIBGMOCK_LIBRARIES}
|
|
${GLOG_LIBRARY}
|
|
)
|
|
|
|
if(NOT WIN32)
|
|
target_link_libraries(
|
|
eden_testharness
|
|
PUBLIC
|
|
eden_fuse
|
|
)
|
|
endif()
|