[CMake] Some Errors using cmake-2.6

David Cole david.cole at kitware.com
Fri Aug 1 11:57:47 EDT 2008


Rename your directory to get rid of the "++" in the name...
It's confusing some regular expression matching rules in the CMake scripts.



On Fri, Aug 1, 2008 at 11:43 AM, Jan Dinger <dinger.jan at googlemail.com>wrote:

> Hello folks,
>
> I've wrote a test program for testing cmake in Qt4. Iam using cmake-2.6
> Debian-sid.
>
> In the first time cmake crashs with some errors.
>
> RegularExpression::compile(): Nested *?+.
> RegularExpression::compile(): Error in compile.
> CMake Error at /usr/share/cmake-2.6/Modules/FindQt4.cmake:1003 (IF):
>   if had incorrect arguments: CMAKE_CURRENT_BINARY_DIR MATCHES
>   "${_checkinfile}" (Regular expression
> "/home/jan/workspace/c++/dummy/src/l"
>   cannot compile).
> Call Stack (most recent call first):
>   /usr/share/cmake-2.6/Modules/FindQt4.cmake:1076 (QT4_MAKE_OUTPUT_FILE)
>   CMakeLists.txt:47 (QT4_WRAP_CPP)
>
>
> RegularExpression::compile(): Nested *?+.
> RegularExpression::compile(): Error in compile.
> CMake Error at /usr/share/cmake-2.6/Modules/FindQt4.cmake:1003 (IF):
>   if had incorrect arguments: CMAKE_CURRENT_BINARY_DIR MATCHES
>   "${_checkinfile}" (Regular expression
> "/home/jan/workspace/c++/dummy/src/m"
>   cannot compile).
> Call Stack (most recent call first):
>   /usr/share/cmake-2.6/Modules/FindQt4.cmake:1076 (QT4_MAKE_OUTPUT_FILE)
>   CMakeLists.txt:47 (QT4_WRAP_CPP)
>
>
> CMake Error: Attempt to add a custom rule to output
> "/home/jan/workspace/c++/dummy/build/ui_mainwindow.h.rule" which already has
> a custom rule.
> -- Configuring done
>
> I don't know what I can do. I'vre read some tutorials and howtos, but no
> way.
>
> Here is my CMakelists.txt.
>
> ###snip###
> PROJECT( dummy )
>
> cmake_minimum_required(VERSION 2.6)
>
> FIND_PACKAGE( Qt4 REQUIRED )
> IF(QT_FOUND)
>     INCLUDE(${QT_USE_FILE})
>     IF(QT_QTSQL_FOUND)
>         INCLUDE_DIRECTORIES(${QT_QTSQL_INCLUDE_DIR})
>     ELSE(QT_QTSQL_FOUND)
>         MESSAGE(FATAL ERROR "Qt SQL libraries missing.")
>     ENDIF(QT_QTSQL_FOUND)
>     ELSE(QT_FOUND)
>         MESSAGE(FATAL ERROR "Qt4 not found.")
> ENDIF(QT_FOUND)
>
>
> SET( DUMMY_SRCS
>     ./src/main.cpp
>     ./src/logindialog/logindialog.cpp
>     ./src/mainwindow/mainwindow.cpp
> )
>
> SET( DUMMY_MOC_HDRS
>     ./src/logindialog/logindialog.h
>     ./src/mainwindow/mainwindow.h
> )
>
> SET( DUMMY_UIS
>     ./ui/logindialog.ui
>     ./ui/mainwindow.ui
> )
>
> SET( DUMMY_RCS
>     ./images/dummy.qrc
> )
>
> ADD_DEFINITIONS( -Wall )
>
> SET( QT_USE_QTSQL TRUE )
>
> QT4_ADD_RESOURCES( DUMMY_RC_SRCS ${DUMMY_RCS} )
>
> QT4_WRAP_UI( DUMMY_UIS_HDRS ${DUMMY_UIS} )
>
> IF(QT_WRAP_CPP)
>     QT4_WRAP_CPP( DUMMY_MOC_SRCS ${DUMMY_MOC_HDRS} )
> ENDIF(QT_WRAP_CPP)
>
> INCLUDE_DIRECTORIES( ${CCMAKE_BINARY_DIR} )
>
> ADD_EXECUTABLE( dummy ${DUMMY_SRCS} ${DUMMY_MOC_SRCS} ${DUMMY_RC_SRCS}
> ${DUMMY_UI_HDRS} )
>
> TARGET_LINK_LIBRARIES( dummy ${QT_LIBRARIES} ${QT_QTSQL_LIBRARIES} )
> ###snap###
>
> I hope someone can help me.
>
> so long
> jd
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080801/3adba165/attachment.htm>


More information about the CMake mailing list