mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	Remove checks for CMake < 3.16
This commit is contained in:
		
				
					committed by
					
						
						manojsdoshi
					
				
			
			
				
	
			
			
			
						parent
						
							375af87a86
						
					
				
				
					commit
					bea9610440
				
			@@ -998,13 +998,11 @@ message(STATUS "Reporting mode build: rippled renamed ${BIN_NAME}")
 | 
			
		||||
  target_compile_definitions(rippled PRIVATE RIPPLED_REPORTING)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
 | 
			
		||||
  # any files that don't play well with unity should be added here
 | 
			
		||||
  if (tests)
 | 
			
		||||
    set_source_files_properties(
 | 
			
		||||
      # these two seem to produce conflicts in beast teardown template methods
 | 
			
		||||
      src/test/rpc/ValidatorRPC_test.cpp
 | 
			
		||||
      src/test/rpc/ShardArchiveHandler_test.cpp
 | 
			
		||||
      PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
 | 
			
		||||
  endif () #tests
 | 
			
		||||
endif ()
 | 
			
		||||
# any files that don't play well with unity should be added here
 | 
			
		||||
if (tests)
 | 
			
		||||
  set_source_files_properties(
 | 
			
		||||
    # these two seem to produce conflicts in beast teardown template methods
 | 
			
		||||
    src/test/rpc/ValidatorRPC_test.cpp
 | 
			
		||||
    src/test/rpc/ShardArchiveHandler_test.cpp
 | 
			
		||||
    PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
 | 
			
		||||
endif () #tests
 | 
			
		||||
 
 | 
			
		||||
@@ -10,13 +10,8 @@ option (tests "Build tests" ON)
 | 
			
		||||
 | 
			
		||||
option (unity "Creates a build using UNITY support in cmake. This is the default" ON)
 | 
			
		||||
if (unity)
 | 
			
		||||
  if (CMAKE_VERSION VERSION_LESS 3.16)
 | 
			
		||||
    message (WARNING "unity option only supported for with cmake 3.16+ (please upgrade)")
 | 
			
		||||
    set (unity OFF CACHE BOOL "unity only available for cmake 3.16+" FORCE)
 | 
			
		||||
  else ()
 | 
			
		||||
    if (NOT is_ci)
 | 
			
		||||
      set (CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
 | 
			
		||||
    endif ()
 | 
			
		||||
  if (NOT is_ci)
 | 
			
		||||
    set (CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
 | 
			
		||||
  endif ()
 | 
			
		||||
endif ()
 | 
			
		||||
if (is_gcc OR is_clang)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
option (validator_keys "Enables building of validator-keys-tool as a separate target (imported via FetchContent)" OFF)
 | 
			
		||||
 | 
			
		||||
if (validator_keys AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
 | 
			
		||||
if (validator_keys)
 | 
			
		||||
  git_branch (current_branch)
 | 
			
		||||
  # default to tracking VK develop branch unless we are on master/release
 | 
			
		||||
  if (NOT (current_branch STREQUAL "master" OR current_branch STREQUAL "release"))
 | 
			
		||||
@@ -20,5 +20,3 @@ if (validator_keys AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
 | 
			
		||||
  endif ()
 | 
			
		||||
  add_subdirectory (${validator_keys_src_SOURCE_DIR} ${CMAKE_BINARY_DIR}/validator-keys)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -125,7 +125,7 @@ if (local_libarchive)
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --target archive_static
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -43,7 +43,7 @@ else()
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      --target lz4_static
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -8,40 +8,24 @@
 | 
			
		||||
 | 
			
		||||
if (is_root_project) # NuDB not needed in the case of xrpl_core inclusion build
 | 
			
		||||
  add_library (nudb INTERFACE)
 | 
			
		||||
  if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
 | 
			
		||||
    FetchContent_Declare(
 | 
			
		||||
      nudb_src
 | 
			
		||||
      GIT_REPOSITORY https://github.com/CPPAlliance/NuDB.git
 | 
			
		||||
      GIT_TAG        2.0.5
 | 
			
		||||
    )
 | 
			
		||||
    FetchContent_GetProperties(nudb_src)
 | 
			
		||||
    if(NOT nudb_src_POPULATED)
 | 
			
		||||
      message (STATUS "Pausing to download NuDB...")
 | 
			
		||||
      FetchContent_Populate(nudb_src)
 | 
			
		||||
    endif()
 | 
			
		||||
  else ()
 | 
			
		||||
    ExternalProject_Add (nudb_src
 | 
			
		||||
      PREFIX ${nih_cache_path}
 | 
			
		||||
      GIT_REPOSITORY https://github.com/CPPAlliance/NuDB.git
 | 
			
		||||
      GIT_TAG 2.0.5
 | 
			
		||||
      CONFIGURE_COMMAND ""
 | 
			
		||||
      BUILD_COMMAND ""
 | 
			
		||||
      TEST_COMMAND ""
 | 
			
		||||
      INSTALL_COMMAND ""
 | 
			
		||||
    )
 | 
			
		||||
    ExternalProject_Get_Property (nudb_src SOURCE_DIR)
 | 
			
		||||
    set (nudb_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
    file (MAKE_DIRECTORY ${nudb_src_SOURCE_DIR}/include)
 | 
			
		||||
    add_dependencies (nudb nudb_src)
 | 
			
		||||
  endif ()
 | 
			
		||||
 | 
			
		||||
  file(TO_CMAKE_PATH "${nudb_src_SOURCE_DIR}" nudb_src_SOURCE_DIR)
 | 
			
		||||
# specify as system includes so as to avoid warnings
 | 
			
		||||
  target_include_directories (nudb SYSTEM INTERFACE ${nudb_src_SOURCE_DIR}/include)
 | 
			
		||||
  target_link_libraries (nudb
 | 
			
		||||
    INTERFACE
 | 
			
		||||
      Boost::thread
 | 
			
		||||
      Boost::system)
 | 
			
		||||
  add_library (NIH::nudb ALIAS nudb)
 | 
			
		||||
  target_link_libraries (ripple_libs INTERFACE NIH::nudb)
 | 
			
		||||
  FetchContent_Declare(
 | 
			
		||||
    nudb_src
 | 
			
		||||
    GIT_REPOSITORY https://github.com/CPPAlliance/NuDB.git
 | 
			
		||||
    GIT_TAG        2.0.5
 | 
			
		||||
  )
 | 
			
		||||
  FetchContent_GetProperties(nudb_src)
 | 
			
		||||
  if(NOT nudb_src_POPULATED)
 | 
			
		||||
    message (STATUS "Pausing to download NuDB...")
 | 
			
		||||
    FetchContent_Populate(nudb_src)
 | 
			
		||||
  endif()
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
file(TO_CMAKE_PATH "${nudb_src_SOURCE_DIR}" nudb_src_SOURCE_DIR)
 | 
			
		||||
# specify as system includes so as to avoid warnings
 | 
			
		||||
target_include_directories (nudb SYSTEM INTERFACE ${nudb_src_SOURCE_DIR}/include)
 | 
			
		||||
target_link_libraries (nudb
 | 
			
		||||
  INTERFACE
 | 
			
		||||
    Boost::thread
 | 
			
		||||
    Boost::system)
 | 
			
		||||
add_library (NIH::nudb ALIAS nudb)
 | 
			
		||||
target_link_libraries (ripple_libs INTERFACE NIH::nudb)
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ if (local_protobuf OR NOT (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE AND pro
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
    TEST_COMMAND ""
 | 
			
		||||
    INSTALL_COMMAND
 | 
			
		||||
      ${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ if (local_rocksdb)
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ else()
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -113,7 +113,7 @@ else()
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ else()
 | 
			
		||||
      ${CMAKE_COMMAND}
 | 
			
		||||
      --build .
 | 
			
		||||
      --config $<CONFIG>
 | 
			
		||||
      $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
      --parallel ${ep_procs}
 | 
			
		||||
      $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
        COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -9,41 +9,10 @@
 | 
			
		||||
 | 
			
		||||
find_package (date QUIET)
 | 
			
		||||
if (NOT TARGET date::date)
 | 
			
		||||
  if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
 | 
			
		||||
    FetchContent_Declare(
 | 
			
		||||
      hh_date_src
 | 
			
		||||
      GIT_REPOSITORY https://github.com/HowardHinnant/date.git
 | 
			
		||||
      GIT_TAG        fc4cf092f9674f2670fb9177edcdee870399b829
 | 
			
		||||
    )
 | 
			
		||||
    FetchContent_MakeAvailable(hh_date_src)
 | 
			
		||||
  else ()
 | 
			
		||||
    ExternalProject_Add (hh_date_src
 | 
			
		||||
      PREFIX ${nih_cache_path}
 | 
			
		||||
      GIT_REPOSITORY https://github.com/HowardHinnant/date.git
 | 
			
		||||
      GIT_TAG        fc4cf092f9674f2670fb9177edcdee870399b829
 | 
			
		||||
      CONFIGURE_COMMAND ""
 | 
			
		||||
      BUILD_COMMAND ""
 | 
			
		||||
      TEST_COMMAND ""
 | 
			
		||||
      INSTALL_COMMAND ""
 | 
			
		||||
    )
 | 
			
		||||
    ExternalProject_Get_Property (hh_date_src SOURCE_DIR)
 | 
			
		||||
    set (hh_date_src_SOURCE_DIR "${SOURCE_DIR}")
 | 
			
		||||
    file (MAKE_DIRECTORY ${hh_date_src_SOURCE_DIR}/include)
 | 
			
		||||
    add_library (date_interface INTERFACE)
 | 
			
		||||
    add_library (date::date ALIAS date_interface)
 | 
			
		||||
    add_dependencies (date_interface hh_date_src)
 | 
			
		||||
    file (TO_CMAKE_PATH "${hh_date_src_SOURCE_DIR}" hh_date_src_SOURCE_DIR)
 | 
			
		||||
    target_include_directories (date_interface
 | 
			
		||||
      SYSTEM INTERFACE
 | 
			
		||||
          $<BUILD_INTERFACE:${hh_date_src_SOURCE_DIR}/include>
 | 
			
		||||
          $<INSTALL_INTERFACE:include>)
 | 
			
		||||
    install (
 | 
			
		||||
      FILES
 | 
			
		||||
        ${hh_date_src_SOURCE_DIR}/include/date/date.h
 | 
			
		||||
      DESTINATION include/date)
 | 
			
		||||
    install (TARGETS date_interface
 | 
			
		||||
      EXPORT RippleExports
 | 
			
		||||
      INCLUDES DESTINATION include)
 | 
			
		||||
  endif ()
 | 
			
		||||
  FetchContent_Declare(
 | 
			
		||||
    hh_date_src
 | 
			
		||||
    GIT_REPOSITORY https://github.com/HowardHinnant/date.git
 | 
			
		||||
    GIT_TAG        fc4cf092f9674f2670fb9177edcdee870399b829
 | 
			
		||||
  )
 | 
			
		||||
  FetchContent_MakeAvailable(hh_date_src)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@ else ()
 | 
			
		||||
        ${CMAKE_COMMAND}
 | 
			
		||||
          --build .
 | 
			
		||||
          --config $<CONFIG>
 | 
			
		||||
          $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
          --parallel ${ep_procs}
 | 
			
		||||
      TEST_COMMAND ""
 | 
			
		||||
      INSTALL_COMMAND
 | 
			
		||||
        ${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
 | 
			
		||||
@@ -169,7 +169,7 @@ else ()
 | 
			
		||||
          ${CMAKE_COMMAND}
 | 
			
		||||
            --build .
 | 
			
		||||
            --config $<CONFIG>
 | 
			
		||||
            $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
            --parallel ${ep_procs}
 | 
			
		||||
        TEST_COMMAND ""
 | 
			
		||||
        INSTALL_COMMAND
 | 
			
		||||
          ${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
 | 
			
		||||
@@ -237,7 +237,7 @@ else ()
 | 
			
		||||
        ${CMAKE_COMMAND}
 | 
			
		||||
        --build .
 | 
			
		||||
        --config $<CONFIG>
 | 
			
		||||
        $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
 | 
			
		||||
        --parallel ${ep_procs}
 | 
			
		||||
        $<$<BOOL:${is_multiconfig}>:
 | 
			
		||||
          COMMAND
 | 
			
		||||
            ${CMAKE_COMMAND} -E copy
 | 
			
		||||
 
 | 
			
		||||
@@ -25,12 +25,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake")
 | 
			
		||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/deps")
 | 
			
		||||
 | 
			
		||||
include (CheckCXXCompilerFlag)
 | 
			
		||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
 | 
			
		||||
  include (FetchContent)
 | 
			
		||||
endif ()
 | 
			
		||||
if (MSVC AND CMAKE_VERSION VERSION_LESS 3.12)
 | 
			
		||||
  message (FATAL_ERROR "MSVC requires cmake 3.12 or greater for proper boost support")
 | 
			
		||||
endif ()
 | 
			
		||||
include (FetchContent)
 | 
			
		||||
include (ExternalProject)
 | 
			
		||||
include (CMakeFuncs) # must come *after* ExternalProject b/c it overrides one function in EP
 | 
			
		||||
include (ProcessorCount)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user