Hi folks,

before I file this as a bug, I want to make sure I'm doing it right.

I have a small demo project that codes up the classic dining philosophers problem using Qt4 to demonstrate deadlocks in the high- performance computing class I teach. I basically have two classes - Fork representing a mutex and Philosopher representing a thread, each with a header and implementation file.

CMake (both 2.4.8 and the cvs version as of today) generates correct makefiles and KDevelop3 projects. But in Xcode 3.0, the header files fail to show up in the project, and no dependencies seem to be generated. This means I can modify the headers without Xcode complaining or the build system triggering a recompile.

Also, for the Philosopher class, a moc file is correctly being generated. But additionally, a spurious moc_philosopher.cxx.rule file shows up in the source file list that Xcode complains about. I can safely manually remove this file from the project and everything still works.

Here's the CMakeLists.txt file I use:

---- snip ---
PROJECT(dining_philosophers)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)

FIND_PACKAGE(Qt4 REQUIRED)

INCLUDE(${QT_USE_FILE})

SET(dining_philosophers_SRCS
    main.cpp
    fork.cpp
    philosopher.cpp
)

SET(dining_philosophers_MOC_HDRS
    philosopher.h
)

QT4_WRAP_CPP(dining_philosophers_MOC_SRCS $ {dining_philosophers_MOC_HDRS})

ADD_EXECUTABLE(dining_philosophers ${dining_philosophers_SRCS} $ {dining_philosop
hers_MOC_SRCS})

TARGET_LINK_LIBRARIES(dining_philosophers ${QT_LIBRARIES})
---- snap -----

Any comments are welcome.

Thanks,

Jens

--
Dr.-Ing. Jens Hannemann --- [EMAIL PROTECTED] --- GPG Key Available
University of Kentucky -- Dept. of Electrical and Computer Engineering
Center for Visualization and Virtual Environments

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to