mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
enforce include modularization in cmake
This commit is contained in:
parent
e28a8401fb
commit
d35445a868
@ -105,15 +105,12 @@ set(FDB_PACKAGE_NAME "${FDB_MAJOR}.${FDB_MINOR}")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/versions.target.cmake ${CMAKE_CURRENT_BINARY_DIR}/versions.target)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/version.txt ${FDB_VERSION})
|
||||
|
||||
message(STATUS "FDB version is ${FDB_VERSION}")
|
||||
message(STATUS "FDB package name is ${FDB_PACKAGE_NAME}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fdbclient/versions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/fdbclient/versions.h)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Flow
|
||||
################################################################################
|
||||
|
||||
include(utils)
|
||||
|
||||
# Flow and other tools are written in C# - so we need that dependency
|
||||
include(EnableCsharp)
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <stdio.h>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/DeterministicRandom.h"
|
||||
#include "flow/SystemMonitor.h"
|
||||
#include "flow/TLSConfig.actor.h"
|
||||
|
@ -64,9 +64,6 @@ add_compile_definitions(BOOST_ERROR_CODE_HEADER_ONLY BOOST_SYSTEM_NO_DEPRECATED)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-DBOOST_USE_WINDOWS_H)
|
||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
|
@ -147,6 +147,42 @@ function(strip_debug_symbols target)
|
||||
add_dependencies(strip_targets strip_${target})
|
||||
endfunction()
|
||||
|
||||
function(copy_headers)
|
||||
set(options)
|
||||
set(oneValueArgs NAME OUT_DIR INC_DIR)
|
||||
set(multiValueArgs SRCS)
|
||||
cmake_parse_arguments(CP "${options}" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
|
||||
get_filename_component(dir_name ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
set(include_dir "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
set(incl_dir "${include_dir}/${dir_name}")
|
||||
make_directory("${incl_dir}")
|
||||
foreach(f IN LISTS CP_SRCS)
|
||||
is_prefix(bd "${CMAKE_CURRENT_BINARY_DIR}" "${f}")
|
||||
is_prefix(sd "${CMAKE_CURRENT_SOURCE_DIR}" "${f}")
|
||||
if (bd OR sd)
|
||||
continue()
|
||||
endif()
|
||||
is_header(hdr "${f}")
|
||||
if(NOT hdr)
|
||||
continue()
|
||||
endif()
|
||||
get_filename_component(fname ${f} NAME)
|
||||
get_filename_component(dname ${f} DIRECTORY)
|
||||
if (dname)
|
||||
make_directory(${incl_dir}/${dname})
|
||||
endif()
|
||||
set(fpath "${incl_dir}/${dname}/${fname}")
|
||||
add_custom_command(OUTPUT "${fpath}"
|
||||
DEPENDS "${f}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${f}" "${fpath}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
list(APPEND out_files "${fpath}")
|
||||
endforeach()
|
||||
add_custom_target("${CP_NAME}_incl" DEPENDS ${out_files})
|
||||
set("${CP_OUT_DIR}" "${incl_dir}" PARENT_SCOPE)
|
||||
set("${CP_INC_DIR}" ${include_dir} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(add_flow_target)
|
||||
set(options EXECUTABLE STATIC_LIBRARY
|
||||
DYNAMIC_LIBRARY)
|
||||
@ -159,42 +195,77 @@ function(add_flow_target)
|
||||
if(NOT AFT_SRCS)
|
||||
message(FATAL_ERROR "No sources provided")
|
||||
endif()
|
||||
copy_headers(NAME ${AFT_NAME} SRCS "${AFT_SRCS};${AFT_DISABLE_ACTOR_DIAGNOSTICS}" OUT_DIR incl_dir INC_DIR include_dir)
|
||||
#foreach(src IN LISTS AFT_SRCS)
|
||||
# is_header(h "${src}")
|
||||
# if(NOT h)
|
||||
# list(SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
|
||||
# endif()
|
||||
#endforeach()
|
||||
if(OPEN_FOR_IDE)
|
||||
# Intentionally omit ${AFT_DISABLE_ACTOR_DIAGNOSTICS} since we don't want diagnostics
|
||||
set(sources ${AFT_SRCS} ${AFT_ADDL_SRCS})
|
||||
add_library(${AFT_NAME} OBJECT ${sources})
|
||||
else()
|
||||
foreach(src IN LISTS AFT_SRCS AFT_DISABLE_ACTOR_DIAGNOSTICS)
|
||||
set(actor_compiler_flags "")
|
||||
is_header(hdr ${src})
|
||||
set(in_filename "${src}")
|
||||
if(${src} MATCHES ".*\\.actor\\.(h|cpp)")
|
||||
list(APPEND actors ${src})
|
||||
list(APPEND actor_compiler_flags "--generate-probes")
|
||||
set(is_actor_file YES)
|
||||
if(${src} MATCHES ".*\\.h")
|
||||
string(REPLACE ".actor.h" ".actor.g.h" generated ${src})
|
||||
string(REPLACE ".actor.h" ".actor.g.h" out_filename ${in_filename})
|
||||
else()
|
||||
string(REPLACE ".actor.cpp" ".actor.g.cpp" generated ${src})
|
||||
string(REPLACE ".actor.cpp" ".actor.g.cpp" out_filename ${in_filename})
|
||||
endif()
|
||||
else()
|
||||
set(is_actor_file NO)
|
||||
set(out_filename "${src}")
|
||||
endif()
|
||||
|
||||
if(hdr)
|
||||
set(in_file "${incl_dir}/${in_filename}")
|
||||
set(out_file "${incl_dir}/${out_filename}")
|
||||
else()
|
||||
set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${in_filename}")
|
||||
if(is_actor_file)
|
||||
set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${out_filename}")
|
||||
else()
|
||||
set(out_file "${in_file}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
is_prefix(in_src_dir "${CMAKE_CURRENT_SOURCE_DIR}" ${src})
|
||||
is_prefix(in_bin_dir "${CMAKE_CURRENT_BINARY_DIR}" ${src})
|
||||
is_prefix(in_incl_dir "${incl_dir}" ${src})
|
||||
if(in_src_dir OR in_bin_dir)
|
||||
set(in_file "${src}")
|
||||
set(out_file "${src}")
|
||||
endif()
|
||||
|
||||
list(APPEND sources ${out_file})
|
||||
set(actor_compiler_flags "")
|
||||
if(is_actor_file)
|
||||
list(APPEND actors ${in_file})
|
||||
list(APPEND actor_compiler_flags "--generate-probes")
|
||||
foreach(s IN LISTS AFT_DISABLE_ACTOR_DIAGNOSTICS)
|
||||
if("${s}" STREQUAL "${src}")
|
||||
list(APPEND actor_compiler_flags "--disable-diagnostics")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
list(APPEND sources ${generated})
|
||||
list(APPEND generated_files ${CMAKE_CURRENT_BINARY_DIR}/${generated})
|
||||
|
||||
list(APPEND generated_files ${out_file})
|
||||
if(WIN32)
|
||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${generated}"
|
||||
COMMAND $<TARGET_FILE:actorcompiler> "${CMAKE_CURRENT_SOURCE_DIR}/${src}" "${CMAKE_CURRENT_BINARY_DIR}/${generated}" ${actor_compiler_flags}
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${src}" ${actor_exe}
|
||||
add_custom_command(OUTPUT "${out_file}"
|
||||
COMMAND $<TARGET_FILE:actorcompiler> "${in_file}" "${out_file}" ${actor_compiler_flags}
|
||||
DEPENDS "${in_file}" ${actor_exe}
|
||||
COMMENT "Compile actor: ${src}")
|
||||
else()
|
||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${generated}"
|
||||
COMMAND ${MONO_EXECUTABLE} ${actor_exe} "${CMAKE_CURRENT_SOURCE_DIR}/${src}" "${CMAKE_CURRENT_BINARY_DIR}/${generated}" ${actor_compiler_flags} > /dev/null
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${src}" ${actor_exe}
|
||||
add_custom_command(OUTPUT "${out_file}"
|
||||
COMMAND ${MONO_EXECUTABLE} ${actor_exe} "${in_file}" "${out_file}" ${actor_compiler_flags} > /dev/null
|
||||
DEPENDS "${in_file}" ${actor_exe}
|
||||
COMMENT "Compile actor: ${src}")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND sources ${src})
|
||||
endif()
|
||||
endforeach()
|
||||
if(AFT_EXECUTABLE)
|
||||
@ -226,8 +297,9 @@ function(add_flow_target)
|
||||
set_property(TARGET ${AFT_NAME} PROPERTY SOURCE_FILES ${AFT_SRCS})
|
||||
set_property(TARGET ${AFT_NAME} PROPERTY COVERAGE_FILTERS ${AFT_SRCS})
|
||||
|
||||
target_include_directories("${AFT_NAME}" PUBLIC "${include_dir}")
|
||||
add_custom_target(${AFT_NAME}_actors DEPENDS ${generated_files})
|
||||
add_dependencies(${AFT_NAME}_actors actorcompiler)
|
||||
add_dependencies(${AFT_NAME}_actors actorcompiler "${AFT_NAME}_incl")
|
||||
add_dependencies(${AFT_NAME} ${AFT_NAME}_actors)
|
||||
if(NOT WIN32)
|
||||
assert_no_version_h(${AFT_NAME}_actors)
|
||||
|
31
cmake/utils.cmake
Normal file
31
cmake/utils.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
# sets out_var to YES if filename has extension .h or .hpp, NO otherwise
|
||||
function(is_header out_var filename)
|
||||
set(res "NO")
|
||||
get_filename_component(ext "${filename}" LAST_EXT)
|
||||
if((ext STREQUAL ".h") OR (ext STREQUAL ".hpp"))
|
||||
set(res "YES")
|
||||
endif()
|
||||
set("${out_var}" "${res}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(remove_prefix out prefix str)
|
||||
string(LENGTH "${prefix}" len)
|
||||
string(SUBSTRING "${str}" ${len} -1 res)
|
||||
set("${out}" "${res}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(is_prefix out prefix str)
|
||||
string(LENGTH "${prefix}" plen)
|
||||
string(LENGTH "${str}" slen)
|
||||
if(plen GREATER slen)
|
||||
set(res NO)
|
||||
else()
|
||||
string(SUBSTRING "${str}" 0 ${plen} pstr)
|
||||
if(pstr STREQUAL prefix)
|
||||
set(res YES)
|
||||
else()
|
||||
set(res NO)
|
||||
endif()
|
||||
endif()
|
||||
set(${out} ${res} PARENT_SCOPE)
|
||||
endfunction()
|
@ -19,7 +19,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/flow.h"
|
||||
#include "flow/Platform.h"
|
||||
#include "flow/DeterministicRandom.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbbackup/BackupTLSConfig.h"
|
||||
#include "fdbclient/JsonBuilder.h"
|
||||
#include "flow/Arena.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "boost/lexical_cast.hpp"
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbcli/fdbcli.actor.h"
|
||||
|
||||
#include "fdbclient/IClientApi.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include "fdbcli/fdbcli.actor.h"
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <cinttypes>
|
||||
|
||||
#include "boost/lexical_cast.hpp"
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include "fdbcli/fdbcli.actor.h"
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include "fdbcli/fdbcli.actor.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "boost/lexical_cast.hpp"
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/ClusterConnectionFile.h"
|
||||
#include "fdbclient/NativeAPI.actor.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <ostream>
|
||||
|
||||
// FIXME: Trim this down
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/Platform.actor.h"
|
||||
#include "fdbclient/AsyncTaskThread.h"
|
||||
#include "fdbclient/BackupContainer.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define FDBCLIENT_BACKUP_CONTAINER_FILESYSTEM_H
|
||||
#pragma once
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BackupContainer.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
#include "flow/Trace.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/serialize.h"
|
||||
#include "fdbclient/BlobGranuleFiles.h"
|
||||
#include "fdbclient/Knobs.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/AsyncFileS3BlobStore.actor.h"
|
||||
#include "fdbclient/BlobGranuleCommon.h"
|
||||
#include "fdbclient/BlobGranuleFiles.h"
|
||||
|
@ -171,6 +171,9 @@ set(FDBCLIENT_SRCS
|
||||
zipf.c
|
||||
zipf.h)
|
||||
|
||||
message(STATUS "FDB version is ${FDB_VERSION}")
|
||||
message(STATUS "FDB package name is ${FDB_PACKAGE_NAME}")
|
||||
|
||||
set(options_srcs ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp)
|
||||
|
||||
vexillographer_compile(TARGET fdboptions LANG cpp OUT ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g
|
||||
@ -224,6 +227,7 @@ if(WITH_AWS_BACKUP)
|
||||
endif()
|
||||
|
||||
add_flow_target(STATIC_LIBRARY NAME fdbclient SRCS ${FDBCLIENT_SRCS} ADDL_SRCS ${options_srcs})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/versions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/versions.h)
|
||||
add_dependencies(fdbclient fdboptions)
|
||||
target_link_libraries(fdbclient PUBLIC fdbrpc msgpack)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BackupAgent.actor.h"
|
||||
#include "fdbclient/BackupContainer.h"
|
||||
#include "fdbclient/DatabaseContext.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/Knobs.h"
|
||||
#include "flow/Arena.h"
|
||||
#include "fdbclient/ClusterConnectionMemoryRecord.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "boost/algorithm/string.hpp"
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include "fdbclient/FDBOptions.g.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/Error.h"
|
||||
#include "flow/flow.h"
|
||||
#include "flow/network.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(FDBMONITOR_SRCS fdbmonitor.cpp)
|
||||
|
||||
add_executable(fdbmonitor ${FDBMONITOR_SRCS})
|
||||
target_include_directories(fdbmonitor PUBLIC "${CMAKE_BINARY_DIR}/flow/include" "${CMAKE_BINARY_DIR}/fdbclient/include")
|
||||
strip_debug_symbols(fdbmonitor)
|
||||
assert_no_version_h(fdbmonitor)
|
||||
if(UNIX AND NOT APPLE)
|
||||
|
@ -10,6 +10,7 @@ set(FDBRPC_SRCS
|
||||
AsyncFileCached.actor.cpp
|
||||
AsyncFileEncrypted.actor.cpp
|
||||
AsyncFileNonDurable.actor.cpp
|
||||
AsyncFileWriteChecker.h
|
||||
AsyncFileWriteChecker.cpp
|
||||
Base64UrlDecode.h
|
||||
Base64UrlDecode.cpp
|
||||
@ -22,6 +23,7 @@ set(FDBRPC_SRCS
|
||||
genericactors.actor.cpp
|
||||
HealthMonitor.actor.cpp
|
||||
HTTP.actor.cpp
|
||||
IAsyncFile.h
|
||||
IAsyncFile.actor.cpp
|
||||
IPAllowList.cpp
|
||||
LoadBalance.actor.cpp
|
||||
@ -43,6 +45,7 @@ set(FDBRPC_SRCS
|
||||
SimExternalConnection.h
|
||||
Stats.actor.cpp
|
||||
Stats.h
|
||||
simulator.h
|
||||
sim2.actor.cpp
|
||||
sim_validation.cpp
|
||||
TimedRequest.h
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbrpc/simulator.h"
|
||||
#include "flow/Arena.h"
|
||||
#define BOOST_SYSTEM_NO_LIB
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BlobGranuleCommon.h"
|
||||
#include "fdbclient/CommitTransaction.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BackupContainerFileSystem.h"
|
||||
#include "fdbclient/BlobGranuleCommon.h"
|
||||
#include "fdbclient/BlobWorkerInterface.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
#include "fdbclient/SystemData.h"
|
||||
#include "fdbclient/BackupContainerFileSystem.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#define SQLITE_THREADSAFE 0 // also in sqlite3.amalgamation.c!
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/crc32c.h"
|
||||
#include "fdbserver/IKeyValueStore.h"
|
||||
#include "fdbserver/CoroFlow.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "fdbserver/SimKmsConnector.h"
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbrpc/sim_validation.h"
|
||||
#include "fdbserver/KmsConnectorInterface.h"
|
||||
#include "fdbserver/Knobs.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <cinttypes>
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BlobWorkerInterface.h"
|
||||
#include "fdbclient/KeyBackedTypes.h"
|
||||
#include "fdbserver/Status.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
#include "fdbserver/Knobs.h"
|
||||
#include "flow/Error.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbserver/NetworkTest.h"
|
||||
#include "flow/Knobs.h"
|
||||
#include "flow/ActorCollection.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
#include "fdbrpc/fdbrpc.h"
|
||||
#include "fdbrpc/LoadBalance.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <cinttypes>
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbserver/workloads/ApiWorkload.h"
|
||||
#include "fdbclient/MultiVersionTransaction.h"
|
||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbserver/workloads/workloads.actor.h"
|
||||
#include "flow/ActorCollection.h"
|
||||
#include "flow/IRandom.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BlobGranuleReader.actor.h"
|
||||
#include "fdbclient/ManagementAPI.actor.h"
|
||||
#include "fdbclient/NativeAPI.actor.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbclient/BlobGranuleReader.actor.h"
|
||||
#include "fdbclient/ManagementAPI.actor.h"
|
||||
#include "fdbclient/NativeAPI.actor.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <cinttypes>
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbserver/workloads/workloads.actor.h"
|
||||
#include "fdbrpc/IAsyncFile.h"
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <ctime>
|
||||
#include <cinttypes>
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbserver/workloads/workloads.actor.h"
|
||||
#include "fdbserver/IKeyValueStore.h"
|
||||
#include "flow/ActorCollection.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbrpc/simulator.h"
|
||||
#include "fdbclient/BackupAgent.actor.h"
|
||||
#include "fdbclient/BackupContainer.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "fdbserver/workloads/workloads.actor.h"
|
||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||
|
||||
|
@ -26,6 +26,7 @@ set(FLOW_SRCS
|
||||
FastRef.h
|
||||
FaultInjection.cpp
|
||||
FaultInjection.h
|
||||
FileIdentifier.h
|
||||
FileTraceLogWriter.cpp
|
||||
FileTraceLogWriter.h
|
||||
Hash3.c
|
||||
@ -53,6 +54,8 @@ set(FLOW_SRCS
|
||||
Net2.actor.cpp
|
||||
Net2Packet.cpp
|
||||
Net2Packet.h
|
||||
ObjectSerializer.h
|
||||
ObjectSerializerTraits.h
|
||||
PKey.h
|
||||
PKey.cpp
|
||||
Platform.actor.cpp
|
||||
@ -60,6 +63,7 @@ set(FLOW_SRCS
|
||||
Platform.h
|
||||
Profiler.actor.cpp
|
||||
Profiler.h
|
||||
ProtocolVersion.h
|
||||
ScopeExit.h
|
||||
SendBufferIterator.h
|
||||
SimpleOpt.h
|
||||
@ -84,6 +88,8 @@ set(FLOW_SRCS
|
||||
TypeTraits.h
|
||||
UnitTest.cpp
|
||||
UnitTest.h
|
||||
Util.h
|
||||
WriteOnlySet.h
|
||||
WriteOnlySet.actor.cpp
|
||||
XmlTraceLogFormatter.cpp
|
||||
XmlTraceLogFormatter.h
|
||||
@ -95,7 +101,7 @@ set(FLOW_SRCS
|
||||
crc32_wrapper.h
|
||||
crc32_wrapper.c
|
||||
error_definitions.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SourceVersion.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/flow/SourceVersion.h
|
||||
flat_buffers.cpp
|
||||
flat_buffers.h
|
||||
flow.cpp
|
||||
@ -107,9 +113,11 @@ set(FLOW_SRCS
|
||||
rte_memcpy.h
|
||||
serialize.cpp
|
||||
serialize.h
|
||||
sse2neon.h
|
||||
stacktrace.h
|
||||
test_memcpy.cpp
|
||||
test_memcpy_perf.cpp
|
||||
unactorcompiler.h
|
||||
version.cpp
|
||||
xxhash.c
|
||||
xxhash.h)
|
||||
@ -133,8 +141,9 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
list(APPEND FLOW_SRCS aarch64/memcmp.S aarch64/memcpy.S)
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/SourceVersion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/SourceVersion.h)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
make_directory(${CMAKE_CURRENT_BINARY_DIR}/include/flow)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/SourceVersion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/flow/SourceVersion.h)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/flow/config.h)
|
||||
|
||||
add_flow_target(STATIC_LIBRARY NAME flow SRCS ${FLOW_SRCS})
|
||||
target_link_libraries(flow PRIVATE stacktrace)
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/DeterministicRandom.h"
|
||||
|
||||
#include <cstring>
|
||||
|
@ -21,7 +21,7 @@
|
||||
// At the moment, this file just contains tests. IndexedSet<> is a template
|
||||
// and so all the important implementation is in the header file
|
||||
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/IndexedSet.h"
|
||||
#include "flow/IRandom.h"
|
||||
#include "flow/ThreadPrimitives.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include "contrib/fmt-8.1.1/include/fmt/format.h"
|
||||
#include "fmt/format.h"
|
||||
#include "flow/Platform.h"
|
||||
#include "flow/Platform.actor.h"
|
||||
#include "flow/Arena.h"
|
||||
|
@ -456,7 +456,7 @@ dev_t getDeviceId(std::string path);
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__)
|
||||
#include "sse2neon.h"
|
||||
#include "flow/sse2neon.h"
|
||||
// aarch64 does not have rdtsc counter
|
||||
// Use cntvct_el0 virtual counter instead
|
||||
inline static uint64_t timestampCounter() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user