ARM64 doesn't work with ExternalProject_Add command

cmake_minimum_required(VERSION 3.0)
project(TestMe)

set(CMAKE_CXX_STANDARD 11)
find_package(Boost REQUIRED COMPONENTS system thread filesystem)
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external)
include(ExternalProject)

ExternalProject_Add(externalhttp
    GIT_REPOSITORY https://github.com/eidheim/Simple-Web-Server
    GIT_TAG origin/master
    GIT_SHALLOW 1
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
)

ExternalProject_Add(externaljson
    GIT_REPOSITORY https://github.com/nlohmann/json
    GIT_TAG origin/master
    GIT_SHALLOW 1
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
)

include_directories(src/VTD
${EXTERNAL_INSTALL_LOCATION}/include)

add_executable(TestMe src/main.cpp)
target_link_libraries(TestMe VTD_RDB pthread  ${Boost_LIBRARIES})

(Bear in mind I changed some related stuff a bit so there could be some syntax error etc )

Problem is after cmake command , when I try install It should download external repos
It does exactly that in Ubuntu x86 18 04, but in Arm64 it just skips those and tries to build actual code and gives error on include commands since it didnt download them

What do you mean by “it just skips those”? Without those the only thing we can do is speculate. In general ExternalProject works on ARM64 platforms.

This could be caused by the fact that ExternalProject are commands that are invoked at build time, CMake is unaware of the outputs of those commands. What this means ,is that CMake sees no relationship between the external projects and TestMe, and therefore it can build TestMe before any of the External Projects. Normally people use add_dependencies to fix this problem.