Skip to content

Commit

Permalink
Use CONDA_BUILD in build.meson
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaem committed Sep 10, 2024
1 parent 873562c commit f1896f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ project('leg2cheb', 'c', 'cython', 'cpp',
c = meson.get_compiler('c')
cy = meson.get_compiler('cython')
cpp = meson.get_compiler('cpp')
conda_build = getenv('CONDA_BUILD', '0') == '1'

conda_build = run_command('sh', '-c', 'echo $CONDA_BUILD', check : false).stdout().strip()

add_global_arguments(['-fomit-frame-pointer'], language : 'c')
add_global_link_arguments(['-lm'], language : 'c')
Expand Down Expand Up @@ -37,7 +38,8 @@ endif

subdir('C')
subdir('cython')
if not conda_build
if not (conda_build == '1')
message(conda_build)
subdir('python')
subdir('ctypes')
subdir('bin')
Expand Down

0 comments on commit f1896f6

Please sign in to comment.