VTK should not force -no-cpp-precomp compiler flag on Mac OS X
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
In VTK's main vtkDetermineCompilerFlags.cmake there is the following:
IF(APPLE) IF(CMAKE_COMPILER_IS_GNUCXX) SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -no-cpp-precomp") SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -no-cpp-precomp")
I would like to request that the "-no-cpp-precomp" be removed. Basically, it is an obsolete flag that is only in Apple's gcc and not the FSF gcc. It's not even in the man page.
The reason I make this request is that in beta versions of Apple's gcc 4.2 the flag is gone, and so VTK cannot be built the way it is now. If I remove the flag, VTK builds fine.
This link has more info: http://gcc.gnu.org/ml/gcc-prs/2003-05/msg01546.html
The only reason I see to keep it is if it is absolutely needed for some really old Apple gcc, like 2.95. And even then it would need to be conditionalised.
Since VTK 5.4 will probably be out long after gcc 4.2 (given VTK's release frequency), I'd really like to see this fixed for VTK 5.2, so VTK will work with gcc 4.2 when it arrives in a future Xcode update.