Commit e8f6099a authored by Mark Olesen's avatar Mark Olesen
Browse files

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
parent 55d3950b
......@@ -4,8 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ]
if [ -f "$CGAL_ARCH_PATH/include/CGAL/version.h" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -f /usr/include/CGAL/version.h ]
then
set -x
......
......@@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for compilation (at least for error catching)
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
export COMPILE_FLAGS=''
export LINK_FLAGS=''
......@@ -21,6 +20,7 @@ then
export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan"
fi
set -x
wmake $targetType
#------------------------------------------------------------------------------
......@@ -4,8 +4,8 @@ set -x
unset COMPILE_FLAGS LINK_FLAGS
if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ]
if [ -f "$CGAL_ARCH_PATH/include/CGAL/version.h" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -f /usr/include/CGAL/version.h ]
then
wmake PolyhedronReader
export COMPILE_FLAGS='-IPolyhedronReader'
......
EXE_NDEBUG = -DNDEBUG
/* EXE_NDEBUG = -g -O0 -DFULLDEBUG */
c++CGALWARN = -Wno-old-style-cast
/*-- Define CGAL_INEXACT to use inexact CGAL constructions */
......@@ -21,5 +20,5 @@ EXE_INC = \
-I/usr/include/Qt
LIB_LIBS = \
-L${CGAL_ARCH_PATH}/lib \
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-ltriSurface
......@@ -68,12 +68,12 @@ endif
set ending="${BOOST_ARCH_PATH:t}"
if ( "$ending" != "boost-none" && "$ending" != "boost-system" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
_foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
endif
set ending="${CGAL_ARCH_PATH:t}"
if ( "$ending" != "cgal-none" && "$ending" != "cgal-system" ) then
_foamAddLib $CGAL_ARCH_PATH/lib
_foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
endif
unset boost_version cgal_version ending
......
......@@ -72,13 +72,13 @@ then
ending="${BOOST_ARCH_PATH##*-}"
if [ "$ending" != none -a "$ending" != system ]
then
_foamAddLib $BOOST_ARCH_PATH/lib
_foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
fi
ending="${CGAL_ARCH_PATH##*-}"
if [ "$ending" != none -a "$ending" != system ]
then
_foamAddLib $CGAL_ARCH_PATH/lib
_foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
fi
unset boost_version cgal_version ending
......
......@@ -20,8 +20,8 @@ set -x
wmake $targetType renumberMethods
if [ -d "$BOOST_ARCH_PATH/include/boost" ] || \
[ "${BOOST_ARCH_PATH##*-}" = system -a -d /usr/include/boost ]
if [ -f "$BOOST_ARCH_PATH/include/boost/version.hpp" ] || \
[ "${BOOST_ARCH_PATH##*-}" = system -a -f /usr/include/boost/version.hpp ]
then
wmake $targetType SloanRenumber
else
......
......@@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/renumber/renumberMethods/lnInclude
LIB_LIBS = \
-L$(BOOST_ARCH_PATH)/lib -lboost_system \
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -lboost_system \
-lmeshTools \
-ldecompositionMethods \
-lrenumberMethods
......@@ -8,6 +8,6 @@ CGAL_INC = \
CGAL_LIBS = \
-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(BOOST_ARCH_PATH)/lib \
-L$(CGAL_ARCH_PATH)/lib \
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-lCGAL
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment