mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: Newer CGAL versions break current CGAL wmake rules (issue #288)
On 64-bit systems, the system installations of boost, cgal are under
lib64/. The behaviour for a ThirdParty build is mostly lib/ but this
can also be changing.
Boost 1_62_0 and older build into 'lib/'.
CGAL-4.9 builds into 'lib64/', older versions into 'lib/'.
Future-proof things by using lib$WM_COMPILER_LIB_ARCH for boost and
cgal build rules, and forcing these as build targets in the ThirdParty
makeCGAL as well.
--
STYLE: check for boost/version.hpp, CGAL/version.h instead their directories
This commit is contained in:
@ -4,8 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Parse arguments for library compilation
|
# Parse arguments for library compilation
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||||
|
|
||||||
if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \
|
if [ -f "$CGAL_ARCH_PATH/include/CGAL/version.h" ] || \
|
||||||
[ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ]
|
[ "${CGAL_ARCH_PATH##*-}" = system -a -f /usr/include/CGAL/version.h ]
|
||||||
then
|
then
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
# Parse arguments for compilation (at least for error catching)
|
# Parse arguments for compilation (at least for error catching)
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||||
set -x
|
|
||||||
|
|
||||||
export COMPILE_FLAGS=''
|
export COMPILE_FLAGS=''
|
||||||
export LINK_FLAGS=''
|
export LINK_FLAGS=''
|
||||||
@ -21,6 +20,7 @@ then
|
|||||||
export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan"
|
export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
wmake $targetType
|
wmake $targetType
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -4,8 +4,8 @@ set -x
|
|||||||
|
|
||||||
unset COMPILE_FLAGS LINK_FLAGS
|
unset COMPILE_FLAGS LINK_FLAGS
|
||||||
|
|
||||||
if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \
|
if [ -f "$CGAL_ARCH_PATH/include/CGAL/version.h" ] || \
|
||||||
[ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ]
|
[ "${CGAL_ARCH_PATH##*-}" = system -a -f /usr/include/CGAL/version.h ]
|
||||||
then
|
then
|
||||||
wmake PolyhedronReader
|
wmake PolyhedronReader
|
||||||
export COMPILE_FLAGS='-IPolyhedronReader'
|
export COMPILE_FLAGS='-IPolyhedronReader'
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
EXE_NDEBUG = -DNDEBUG
|
EXE_NDEBUG = -DNDEBUG
|
||||||
/* EXE_NDEBUG = -g -O0 -DFULLDEBUG */
|
/* EXE_NDEBUG = -g -O0 -DFULLDEBUG */
|
||||||
|
|
||||||
|
|
||||||
c++CGALWARN = -Wno-old-style-cast
|
c++CGALWARN = -Wno-old-style-cast
|
||||||
|
|
||||||
/*-- Define CGAL_INEXACT to use inexact CGAL constructions */
|
/*-- Define CGAL_INEXACT to use inexact CGAL constructions */
|
||||||
@ -21,5 +20,5 @@ EXE_INC = \
|
|||||||
-I/usr/include/Qt
|
-I/usr/include/Qt
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-L${CGAL_ARCH_PATH}/lib \
|
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
||||||
-ltriSurface
|
-ltriSurface
|
||||||
|
|||||||
@ -68,12 +68,12 @@ endif
|
|||||||
|
|
||||||
set ending="${BOOST_ARCH_PATH:t}"
|
set ending="${BOOST_ARCH_PATH:t}"
|
||||||
if ( "$ending" != "boost-none" && "$ending" != "boost-system" ) then
|
if ( "$ending" != "boost-none" && "$ending" != "boost-system" ) then
|
||||||
_foamAddLib $BOOST_ARCH_PATH/lib
|
_foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set ending="${CGAL_ARCH_PATH:t}"
|
set ending="${CGAL_ARCH_PATH:t}"
|
||||||
if ( "$ending" != "cgal-none" && "$ending" != "cgal-system" ) then
|
if ( "$ending" != "cgal-none" && "$ending" != "cgal-system" ) then
|
||||||
_foamAddLib $CGAL_ARCH_PATH/lib
|
_foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
endif
|
endif
|
||||||
|
|
||||||
unset boost_version cgal_version ending
|
unset boost_version cgal_version ending
|
||||||
|
|||||||
@ -72,13 +72,13 @@ then
|
|||||||
ending="${BOOST_ARCH_PATH##*-}"
|
ending="${BOOST_ARCH_PATH##*-}"
|
||||||
if [ "$ending" != none -a "$ending" != system ]
|
if [ "$ending" != none -a "$ending" != system ]
|
||||||
then
|
then
|
||||||
_foamAddLib $BOOST_ARCH_PATH/lib
|
_foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ending="${CGAL_ARCH_PATH##*-}"
|
ending="${CGAL_ARCH_PATH##*-}"
|
||||||
if [ "$ending" != none -a "$ending" != system ]
|
if [ "$ending" != none -a "$ending" != system ]
|
||||||
then
|
then
|
||||||
_foamAddLib $CGAL_ARCH_PATH/lib
|
_foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset boost_version cgal_version ending
|
unset boost_version cgal_version ending
|
||||||
|
|||||||
@ -20,8 +20,8 @@ set -x
|
|||||||
|
|
||||||
wmake $targetType renumberMethods
|
wmake $targetType renumberMethods
|
||||||
|
|
||||||
if [ -d "$BOOST_ARCH_PATH/include/boost" ] || \
|
if [ -f "$BOOST_ARCH_PATH/include/boost/version.hpp" ] || \
|
||||||
[ "${BOOST_ARCH_PATH##*-}" = system -a -d /usr/include/boost ]
|
[ "${BOOST_ARCH_PATH##*-}" = system -a -f /usr/include/boost/version.hpp ]
|
||||||
then
|
then
|
||||||
wmake $targetType SloanRenumber
|
wmake $targetType SloanRenumber
|
||||||
else
|
else
|
||||||
|
|||||||
@ -5,7 +5,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/renumber/renumberMethods/lnInclude
|
-I$(LIB_SRC)/renumber/renumberMethods/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-L$(BOOST_ARCH_PATH)/lib -lboost_system \
|
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -lboost_system \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldecompositionMethods \
|
-ldecompositionMethods \
|
||||||
-lrenumberMethods
|
-lrenumberMethods
|
||||||
|
|||||||
@ -8,6 +8,6 @@ CGAL_INC = \
|
|||||||
CGAL_LIBS = \
|
CGAL_LIBS = \
|
||||||
-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
||||||
-L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
-L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
||||||
-L$(BOOST_ARCH_PATH)/lib \
|
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
||||||
-L$(CGAL_ARCH_PATH)/lib \
|
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
|
||||||
-lCGAL
|
-lCGAL
|
||||||
|
|||||||
Reference in New Issue
Block a user