[vtk-developers] syntax error near unexpected token `('
David Doria
daviddoria at gmail.com
Wed May 2 15:51:48 EDT 2012
On Wed, May 2, 2012 at 3:25 PM, Chris Harris <chris.harris at kitware.com> wrote:
> Hi David,
>
> The problem is that Qt4Macros.cmake, does not quote the -D options
> that contain '(' before it passes them to moc so they get interpreted
> by the shell. I copied the Qt4Macros.cmake and made the following
> change:
>
> +++ /usr/local/share/cmake-2.8/Modules/Qt4Macros.cmake 2012-04-25 16:59:00.2441
> 51165 -0400
> @@ -77,9 +78,11 @@
> SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
> ENDIF("${_current}" MATCHES "\\.framework/?$")
> ENDFOREACH(_current ${_inc_DIRS})
> GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
> FOREACH(_current ${_defines})
> - SET(${_moc_flags} ${${_moc_flags}} "-D${_current}")
> + SET(${_moc_flags} ${${_moc_flags}} "-D\"${_current}\"")
>
> ENDFOREACH(_current ${_defines})
>
> IF(Q_WS_WIN)
>
> Hope that helps.
>
> Chris
Awesome, that did the trick, thanks. Have you pushed this fix to CMake?
David
More information about the vtk-developers
mailing list