https://github.com/Kitware/CMake
Raw File
Tip revision: 1ad4501ae97fb6c6deab096ff0ac7e03d554e26d authored by Brad King on 29 April 2021, 13:53:54 UTC
CMake 3.20.2
Tip revision: 1ad4501
BootstrapTest.cmake
file(MAKE_DIRECTORY "${bin_dir}")
include(ProcessorCount)
ProcessorCount(nproc)
if(generator MATCHES "Ninja")
  set(ninja_arg --generator=Ninja)
endif()
if(NOT nproc EQUAL 0)
  set(parallel_arg --parallel=${nproc})
endif()
message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}")
execute_process(
  COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg}
  WORKING_DIRECTORY "${bin_dir}"
  RESULT_VARIABLE result
  )
if(result)
  message(FATAL_ERROR "bootstrap failed: ${result}")
endif()
back to top