summaryrefslogtreecommitdiffstats
path: root/Tests/BootstrapTest.cmake
blob: 137de78bc1dd6c2634f1ccf9282f75d818242d73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()