[CMake] Concern with 2.6.3
Michael Jackson
mike.jackson at bluequartz.net
Mon Mar 9 09:58:00 EDT 2009
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.
>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
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.
----
Mike Jackson
More information about the CMake
mailing list