[vtk-developers] OS X vtkDetermineCompilerFlags.cmake broken for gcc 4.5 up -mlong-branch only relevant to PPC
Kent Williams
nkwmailinglists at gmail.com
Fri Apr 13 13:54:18 EDT 2012
There seems to be some really old PPC-specific stuff laying around
that is problematic after e.g. gcc 4.2. In particular,
'-mlong-branch' is not supported. I'm not sure it even exists in gcc
versions other than Apple's custom builds.
Is OS X & Power Macs even still supported?
In particular, around line 105 in vtkDetermineCompilerFlags.cmake there's this:
IF(NOT BUILD_SHARED_LIBS)
SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -mlong-branch")
SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -mlong-branch")
ENDIF(NOT BUILD_SHARED_LIBS)
Apparently this is silently ignored by compilers other than CLang and
home-built GCC, who get upset because they don't recognize it.
This is why Slicer won't build on Apple with anything other than the
default gcc-llvm compiler, too.
Shouldn't it be something like this?
set(BUILDING_ON_PPC_OS_X <whatever flag(s) tell you you're building
on OS X with PPC>)
if(NOT BUILD_SHARED_LIBS AND ${BUILDING_ON_PPC_OS_X})
More information about the vtk-developers
mailing list