[CMake] Concern with 2.6.3

Pau Garcia i Quiles pgquiles at elpauer.org
Mon Mar 9 11:07:52 EDT 2009


On Mon, Mar 9, 2009 at 2:58 PM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
> On Mar 9, 2009, at 8:57 AM, Pau Garcia i Quiles wrote:
>
>> On Wed, Mar 4, 2009 at 3:01 PM, Bill Hoffman <bill.hoffman at kitware.com>
>> wrote:
>>>
>>> Robert Dailey wrote:
>>>>
>>>> Hi,
>>>>
>>>> I noticed after switching to version 2.6.3 that header files (with HPP
>>>> extension) are marked as "Exclude from build" in Visual Studio 2008. Is
>>>> this
>>>> behavior by design? If so, why?
>>>>
>>> You don't want to compile .hpp files do you?
>>
>> There is at least one use case for that: if you are using the Qt VC++
>> integration, "compile" runs moc on that header file and creates the
>> moc_blah.cxx file.
>>
>
> But if you were using Qt then you would be using the Qt4 specific CMake
> macros for that.
>
> set (MXADataViewer_MOC_HDRS Something.hpp)
> # and finally this will run moc:
> QT4_WRAP_CPP( MXADataViewer_MOC_SRCS ${MXADataViewer_MOC_HDRS} )
>
> which will have the build system (what ever it is) run "moc" on the
> Something.hpp file to generate the moc_Something.cxx file and that resulting
> file will be compiled by the native build system.

Yes, I'm using QT4_WRAP_CPP (with plans to move to automoc), but that
"right-click, compile to run moc" is useful  (no need to close the
solution or reload projects) and it's what VC++ developers are used
to.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the CMake mailing list