Skip to content

Commit 77f1a8e

Browse files
committed
windows parllel build off
1 parent 69a7a99 commit 77f1a8e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

quaddtype/subprojects/packagefiles/sleef/meson.build

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ project('sleef', version: '3.8')
33
cmake = find_program('cmake')
44
ninja = find_program('ninja', 'make', required: false)
55

6-
# Use relative paths from build directory
76
sleef_build_dir = 'sleef_build'
87
sleef_install_dir = 'sleef_install'
98

10-
# Configure SLEEF at configuration time
9+
# turning off parallel build in windows
10+
parallel_flag = ['--parallel']
11+
if host_machine.system() == 'windows'
12+
parallel_flag = []
13+
endif
14+
1115
sleef_configure = run_command([
1216
cmake,
1317
'-S', meson.current_source_dir(),
@@ -25,22 +29,18 @@ if sleef_configure.returncode() != 0
2529
error('SLEEF CMake configuration failed: ' + sleef_configure.stderr())
2630
endif
2731

28-
# Build target for SLEEF libraries - create a dummy output file
2932
sleef_build_target = custom_target('sleef_build',
30-
command: [cmake, '--build', meson.current_build_dir() / sleef_build_dir, '--target', 'install', '--parallel'],
31-
output: 'sleef_built.stamp', # Dummy stamp file
33+
command: [cmake, '--build', meson.current_build_dir() / sleef_build_dir, '--target', 'install'] + parallel_flag,
34+
output: 'sleef_built.stamp',
3235
console: true,
3336
build_always_stale: true,
3437
build_by_default: true
3538
)
3639

37-
# Path variables
3840
sleef_include_path = meson.current_build_dir() / sleef_install_dir / 'include'
3941

40-
# Create a dependency that ensures the build happens but doesn't link the dummy file
4142
sleef_build_dep = declare_dependency(sources: [sleef_build_target])
4243

43-
# Platform-specific define for static linking on Windows
4444
sleef_static_define = ''
4545
if host_machine.system() == 'windows'
4646
sleef_static_define = '-DSLEEF_STATIC_LIBS'
@@ -52,13 +52,13 @@ if sleef_static_define != ''
5252
endif
5353

5454
sleef_dep = declare_dependency(
55-
dependencies: [sleef_build_dep], # Ensures build happens first
55+
dependencies: [sleef_build_dep],
5656
compile_args: compile_args_list,
57-
link_args: ['-L' + meson.current_build_dir() / sleef_install_dir / 'lib', '-L' + meson.current_build_dir() / sleef_install_dir / 'lib64', '-lsleef']
57+
link_args: ['-L' + meson.current_build_dir() / sleef_install_dir / 'lib', '-L' + meson.current_build_dir() / sleef_install_dir / 'lib64', '-lsleef'] #both lib and lib64 because of ubuntu vs redhat compatibility
5858
)
5959

6060
sleefquad_dep = declare_dependency(
61-
dependencies: [sleef_build_dep], # Ensures build happens first
61+
dependencies: [sleef_build_dep],
6262
compile_args: compile_args_list,
6363
link_args: ['-L' + meson.current_build_dir() / sleef_install_dir / 'lib', '-L' + meson.current_build_dir() / sleef_install_dir / 'lib64', '-lsleefquad']
6464
)

0 commit comments

Comments
 (0)