cmake_minimum_required(VERSION 3.6) project(cpu_features-download NONE) include(ExternalProject) ExternalProject_Add(cpu_features GIT_REPOSITORY https://github.com/google/cpu_features.git GIT_TAG v0.4.1 GIT_SHALLOW true SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpu_features-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpu_features-build" CONFIGURE_COMMAND "" CMAKE_ARGS "-DBUILD_PIC=ON" BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" )