mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 22:47:26 +03:00
cmake: directly build the rust datapack libraries
Summary: Update Eden's top-level CMakeLists.txt file to build the Rust datapack libraries. Previously these were built by invoking CMake separately inside th `eden/scm` subdirectory. Now that the code has been combined into a single location we can use a single CMake invocation to drive the build of both these components. The old code did not build the Rust datapack code on Windows, and this diff does not change that behavior. I'm not aware of any reason to skip building this on Windows, so I plan to enable building this code on Windows in a subsequent diff. Reviewed By: pkaush Differential Revision: D18588006 fbshipit-source-id: 20f4f0ea9fef8595a9dd35a21115952b2808c824
This commit is contained in:
parent
d472f8348d
commit
cd9a1e0e88
@ -100,8 +100,7 @@ if (WIN32)
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(mercurial CONFIG QUIET)
|
||||
set(EDEN_HAVE_RUST_DATAPACK ${mercurial_FOUND})
|
||||
set(EDEN_HAVE_RUST_DATAPACK ON)
|
||||
endif()
|
||||
|
||||
set(EDEN_HAVE_MONONOKE OFF)
|
||||
|
@ -23,8 +23,8 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/external/install")
|
||||
|
||||
# CMake include directories
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake"
|
||||
# For in-fbsource builds on mac
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../opensource/fbcode_builder/CMake"
|
||||
# Eventually the files in eden/scm/CMake/ should be moved to CMake/
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/eden/scm/CMake"
|
||||
# For shipit-transformed builds
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/build/fbcode_builder/CMake"
|
||||
${CMAKE_MODULE_PATH})
|
||||
@ -57,6 +57,7 @@ endif()
|
||||
include(EdenConfigChecks)
|
||||
include(FBPythonBinary)
|
||||
include(FBThriftLibrary)
|
||||
include(RustStaticLibrary)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
@ -72,6 +73,9 @@ add_subdirectory(eden/cli)
|
||||
add_subdirectory(eden/fs)
|
||||
add_subdirectory(eden/integration)
|
||||
add_subdirectory(eden/py)
|
||||
if (NOT WIN32)
|
||||
add_subdirectory(eden/scm/lib)
|
||||
endif()
|
||||
add_subdirectory(eden/test_support)
|
||||
|
||||
configure_file(
|
||||
|
@ -17,25 +17,19 @@ add_library(
|
||||
${STORE_HG_SRCS}
|
||||
)
|
||||
|
||||
list(
|
||||
APPEND EDEN_STORE_HG_OPTIONAL_DEPS
|
||||
datapack
|
||||
eden_config
|
||||
)
|
||||
if (NOT WIN32)
|
||||
list(APPEND EDEN_STORE_HG_OPTIONAL_DEPS eden_store_mononoke)
|
||||
endif()
|
||||
|
||||
if(EDEN_HAVE_RUST_DATAPACK)
|
||||
list(
|
||||
APPEND EDEN_STORE_HG_OPTIONAL_DEPS
|
||||
Mercurial::backingstore
|
||||
)
|
||||
list(APPEND EDEN_STORE_HG_OPTIONAL_DEPS backingstore)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
eden_store_hg
|
||||
PUBLIC
|
||||
datapack
|
||||
eden_config
|
||||
eden_model
|
||||
eden_store
|
||||
eden_utils
|
||||
|
Loading…
Reference in New Issue
Block a user