parameters: (
      ctx,
      clean=False,
      build="Debug",
      perf=False,
      prof=False,
      sanitiser="None",
      nosgx=True,
  )
docstring: Configures the CMake build
docstring_summary: Configures the CMake build
docstring_tokens: Configures the CMake build
function: def cmake(
      ctx,
      clean=False,
      build="Debug",
      perf=False,
      prof=False,
      sanitiser="None",
      nosgx=True,
  ):
      """
      Configures the CMake build
      """
      if clean and exists(FAASM_BUILD_DIR):
          run("rm -rf {}/*".format(FAASM_BUILD_DIR), shell=True, check=True)
  
      if not exists(FAASM_BUILD_DIR):
          makedirs(FAASM_BUILD_DIR)
  
      if not exists(FAASM_INSTALL_DIR):
          makedirs(FAASM_INSTALL_DIR)
  
      cmd = [
          "cmake",
          "-GNinja",
          "-DCMAKE_BUILD_TYPE={}".format(build),
          "-DCMAKE_CXX_COMPILER=/usr/bin/clang++-13",
          "-DCMAKE_C_COMPILER=/usr/bin/clang-13",
          "-DCMAKE_INSTALL_PREFIX={}".format(FAASM_INSTALL_DIR),
          "-DFAASM_PERF_PROFILING=ON" if perf else "",
          "-DFAASM_SELF_TRACING=ON" if prof else "",
          "-DFAABRIC_SELF_TRACING=ON" if prof else "",
          "-DFAASM_USE_SANITISER={}".format(sanitiser),
          "-DFAABRIC_USE_SANITISER={}".format(sanitiser),
          "-DFAASM_SGX=OFF" if nosgx else "",
          PROJ_ROOT,
      ]
  
      cmd_str = " ".join(cmd)
      print(cmd_str)
      run(cmd_str, shell=True, check=True, cwd=FAASM_BUILD_DIR)
function_tokens: def cmake ( ctx , clean = False , build = "Debug" , perf = False , prof = False , sanitiser = "None" , nosgx = True , ) : if clean and exists ( FAASM_BUILD_DIR ) : run ( "rm -rf {}/*" . format ( FAASM_BUILD_DIR ) , shell = True , check = True ) if not exists ( FAASM_BUILD_DIR ) : makedirs ( FAASM_BUILD_DIR ) if not exists ( FAASM_INSTALL_DIR ) : makedirs ( FAASM_INSTALL_DIR ) cmd = [ "cmake" , "-GNinja" , "-DCMAKE_BUILD_TYPE={}" . format ( build ) , "-DCMAKE_CXX_COMPILER=/usr/bin/clang++-13" , "-DCMAKE_C_COMPILER=/usr/bin/clang-13" , "-DCMAKE_INSTALL_PREFIX={}" . format ( FAASM_INSTALL_DIR ) , "-DFAASM_PERF_PROFILING=ON" if perf else "" , "-DFAASM_SELF_TRACING=ON" if prof else "" , "-DFAABRIC_SELF_TRACING=ON" if prof else "" , "-DFAASM_USE_SANITISER={}" . format ( sanitiser ) , "-DFAABRIC_USE_SANITISER={}" . format ( sanitiser ) , "-DFAASM_SGX=OFF" if nosgx else "" , PROJ_ROOT , ] cmd_str = " " . join ( cmd ) print ( cmd_str ) run ( cmd_str , shell = True , check = True , cwd = FAASM_BUILD_DIR )