def run_cmake():
"""
Runs CMake to determine configuration for this build.
"""
if _spawn.find_executable('cmake') is None:
print("CMake is required to build this package.")
print("Please install/load CMake and re-run setup.")
sys.exit(-1)
_build_dir = os.path.join(os.path.split(__file__)[0], 'build')
_dir_util.mkpath(_build_dir)
os.chdir(_build_dir)
try:
_spawn.spawn(['cmake', '-DCMAKE_BUILD_TYPE=release', '-DENABLE_OPENMP=True', '..'])
except _spawn.DistutilsExecError:
print("Error while running CMake")
sys.exit(-1)
评论列表
文章目录