Compile with static libraries with -fPIC for static linkage with Python .so

main
lib 2 years ago
parent 0130991747
commit d6db3a52e5
  1. 16
      cmake-exodus

@ -73,8 +73,8 @@ then
CXX=g++ CXX=g++
CC=gcc CC=gcc
FC=gfortran FC=gfortran
CFLAGS="-Wall -Wunused -pedantic -std=c11" CFLAGS="-Wall -Wunused -pedantic -std=c11 -fPIC"
CXXFLAGS="-Wall -Wunused -pedantic" CXXFLAGS="-Wall -Wunused -pedantic -fPIC"
fi fi
if [ "$COMPILER" == "gnubrew" ] if [ "$COMPILER" == "gnubrew" ]
@ -83,8 +83,8 @@ then
CXX=g++-${VER} CXX=g++-${VER}
CC=gcc-${VER} CC=gcc-${VER}
FC=gfortran-${VER} FC=gfortran-${VER}
CFLAGS="-Wall -Wunused -pedantic -std=c11" CFLAGS="-Wall -Wunused -pedantic -std=c11 -fPIC"
CXXFLAGS="-Wall -Wunused -pedantic" CXXFLAGS="-Wall -Wunused -pedantic -fPIC"
fi fi
if [ "$COMPILER" == "gnumacport" ] if [ "$COMPILER" == "gnumacport" ]
@ -93,8 +93,8 @@ then
CXX=g++-mp-${VER} CXX=g++-mp-${VER}
CC=gcc-mp-${VER} CC=gcc-mp-${VER}
FC=gfortran-mp-${VER} FC=gfortran-mp-${VER}
CFLAGS="-Wall -Wunused -pedantic -std=c11" CFLAGS="-Wall -Wunused -pedantic -std=c11 -fPIC"
CXXFLAGS="-Wall -Wunused -pedantic" CXXFLAGS="-Wall -Wunused -pedantic -fPIC"
fi fi
if [ "$COMPILER" == "clangmacport" ] if [ "$COMPILER" == "clangmacport" ]
@ -128,8 +128,8 @@ then
CXX=icpc CXX=icpc
CC=icc CC=icc
FC=ifort FC=ifort
CFLAGS="-Wall -Wunused" CFLAGS="-Wall -Wunused -fPIC"
CXXFLAGS="-Wall -Wunused" CXXFLAGS="-Wall -Wunused -fPIC"
fi fi
# When building: "scan-build make -j8" # When building: "scan-build make -j8"

Loading…
Cancel
Save