Files
openfoam/src/OSspecific/MSwindows/Allwmake
Mark Olesen d086cc5a0e COMP: stricter handling of openmp vs no-openmp
- give precedence to ~openmp (-no-openmp) over +openmp (-openmp)
  in the general rules and in the Makefile. This makes it robuster
  when specifying +openmp in general, but ~openmp for specific build
  components.

- disable openmp for OSspecific and Pstream components.
  Neither should contain any openmp code anyhow.

  Additionally, since OSspecific is generally built as a static
  object, it can become problematic (eg, with AMD ROCm) if the
  compiler generates information that openmp is required but then uses
  static linkage.
2023-12-11 15:56:00 +01:00

26 lines
820 B
Bash
Executable File

#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
targetType=libo # Preferred library type
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments $*
#------------------------------------------------------------------------------
if [ -f /usr/include/FlexLexer.h ] && [ ! -f FlexLexer.h ]
then
echo "Adding FlexLexer.h link to ${PWD##*/} for cross-compilation"
ln -sf /usr/include/FlexLexer.h FlexLexer.h
if [ -d lnInclude ]
then
(cd lnInclude && ln -sf ../FlexLexer.h .)
fi
fi
unset COMP_FLAGS LINK_FLAGS
# Make object (non-shared by default)
# Never want/need openmp, especially for static objects
wmake -no-openmp $targetType
#------------------------------------------------------------------------------