Skip to content

Commit

Permalink
fix multicore
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrNamenlos123 committed Apr 7, 2024
1 parent 5577102 commit d6b92c0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ def build_generic_cmake_project(self,
cmake_args.append(f'-DCMAKE_C_COMPILER={self.cc_compiler}')
cmake_args.append(f'-DCMAKE_CXX_COMPILER={self.cxx_compiler}')

if self.compiler_id != 'msvc':
cmake_args.append(f'-j$(nproc)')

cmake_args.append(f'-DBUILD_SHARED_LIBS=OFF')
cmake_args.append(f'-DPython_ROOT_DIR={os.path.dirname(sys.executable)}')
cmake_args.append(f'-DPython3_ROOT_DIR={os.path.dirname(sys.executable)}')
Expand All @@ -139,14 +136,18 @@ def build_generic_cmake_project(self,
args_release.append(' '.join(cmake_args))
args_release.append(' '.join(cmake_args_release))

cmake_build_args = []
if self.compiler_id != 'msvc':
cmake_build_args.append(f'-j$(nproc)')

log(f'Building Debug configuration ...')
self.cmd(f'cmake -G Ninja {self.source_dir} -B {self.debug_build_dir} {" ".join(args_debug)}')
self.cmd(f'cmake --build {self.debug_build_dir} --config Debug --target install')
self.cmd(f'cmake --build {self.debug_build_dir} --config Debug --target install {" ".join(cmake_build_args)}')
log(f'Building Debug configuration ... Done')

log(f'Building Release configuration ...')
self.cmd(f'cmake -G Ninja {self.source_dir} -B {self.release_build_dir} {" ".join(args_release)}')
self.cmd(f'cmake --build {self.release_build_dir} --config Release --target install')
self.cmd(f'cmake --build {self.release_build_dir} --config Release --target install {" ".join(cmake_build_args)}')
log(f'Building Release configuration ... Done')

def archive_generic_package(self, files = None):
Expand Down

0 comments on commit d6b92c0

Please sign in to comment.