do it correctly this time

This commit is contained in:
Andrew Cassidy 2021-04-12 20:26:03 -07:00
parent 148fb36273
commit 803dccae2d

View File

@ -56,6 +56,11 @@ class CMakeBuild(build_ext):
if not cmake_generator: if not cmake_generator:
cmake_args += ["-GNinja"] cmake_args += ["-GNinja"]
# If this is a CI build, make sure not to use any advanced CPU features
if bool(os.environ.get('CI', False)):
print('forcing use of base x86_64 instruction set for CI build')
cmake_args += ['-DCMAKE_CXX_FLAGS=-mtune=x86_64']
else: else:
# Single config generators are handled "normally" # Single config generators are handled "normally"
single_config = any(x in cmake_generator for x in {"NMake", "Ninja"}) single_config = any(x in cmake_generator for x in {"NMake", "Ninja"})
@ -84,11 +89,6 @@ class CMakeBuild(build_ext):
] ]
build_args += ["--config", cfg] build_args += ["--config", cfg]
# If this is a CI build, make sure not to use any advanced CPU features
if bool(os.environ.get('CI', False)):
cmake_args += ['-DCMAKE_CXX_FLAGS=-mtune=x86_64']
build_args += ['-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON']
# Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
# across all generators. # across all generators.
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ: if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ: