diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml deleted file mode 100644 index 543eff2..0000000 --- a/conda/conda_build_config.yaml +++ /dev/null @@ -1,2 +0,0 @@ -c_compiler: - - m2w64-toolchain # [win] \ No newline at end of file diff --git a/conda/meta.yaml b/conda/meta.yaml index 82c1376..2ba78bc 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -19,8 +19,8 @@ source: build: number: 0 string: py{{ PY_VER }} - script_env: - - CC=gcc # [win] + #script_env: + # - CC=gcc # [win] preserve_egg_dir: True script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv @@ -35,7 +35,7 @@ requirements: {% for dep in build_deps %} - {{ dep }} {% endfor %} - - {{ compiler('fortran') }} # [not win] + - {{ compiler('fortran') }} - {{ compiler('c') }} - charset-normalizer run: diff --git a/native.ini b/native.ini new file mode 100644 index 0000000..f5f6b62 --- /dev/null +++ b/native.ini @@ -0,0 +1,3 @@ +[binaries] +fortran = 'flang' + diff --git a/src/openalea/ratp/meson.build b/src/openalea/ratp/meson.build index 0362fda..d786034 100644 --- a/src/openalea/ratp/meson.build +++ b/src/openalea/ratp/meson.build @@ -4,6 +4,13 @@ py_mod = import('python') py = py_mod.find_installation(pure: false) py_dep = py.dependency() + + +# Conditionally add Flang runtime linker flags only on Windows +if host_machine.system() == 'windows' + add_project_link_arguments(['-lFortranRuntime', '-lFortranDecimal'], language : 'fortran') +endif + sources = files([ '../../f90/mod_Constant_ValuesF2PY.f90', '../../f90/mod_Grid3DF2PY_64bit.f90',