code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Bug: wrong option for compiling on Darwin #101

Closed paspro closed 1 year ago

paspro commented 1 year ago

In file cs_auto_flags.sh the code reads:

case "$host_os" in
  darwin*)
    cflags_default_shared="-fPIC -DPIC"
    fcflags_default_shared="-fPIC -DPIC"
    cxxflags_default_shared="--fPIC -DPIC"
    ldflags_default_shared="-dynamiclib -undefined dynamic_lookup -undefined error"
    ldflags_default_soname="-install_name @rpath/"
    ;;
  *)
    cflags_default_shared="-fPIC -DPIC"
    fcflags_default_shared="-fPIC -DPIC"
    cxxflags_default_shared="-fPIC -DPIC"
    ldflags_default_shared="-shared"
    ldflags_default_soname="-Wl,-soname -Wl,"
    ;;
esac

the line:

cxxflags_default_shared="--fPIC -DPIC"

is wrong and it should be instead:

cxxflags_default_shared="-fPIC -DPIC"

YvanFournier commented 1 year ago

Fixed in commit 27dc89793 (master), 02e38907 (v8.0), and 8950f733 (v7.3).