Hi everyone,

On Mon, Nov 1, 2010 at 11:24 AM, David Cole <[email protected]> wrote:
> You could use a block like this:
>
> if(CMAKE_GENERATOR STREQUAL "Xcode")
>  ...
> endif()
>

Yes, that does work. The only problem is it doesn't scale very well;
at the moment I use MSVC and Xcode so I need to add two clauses. If I
start using another IDE in the future I'll have to update the
CMakeLists.txt as well.

On Mon, Nov 1, 2010 at 11:58 AM,  <[email protected]> wrote:
> I have a couple projects like that in my build. I just make a "dumby.cpp"
> file that is completely empty and give that to add_library() with the
> other headers. It seems to make everyone happy.

As described in my original post, this generates some ugly warnings
about the library having no symbols (at least on my version of gcc).

On Mon, Nov 1, 2010 at 4:12 PM, Ryan Pavlik <[email protected]> wrote:
> I've also done something like this:
> set(SOURCES
>    LockFreeBuffer.h
>    Saturate.h
>    Stride.h)
>
> add_custom_target(UtilityHeaders SOURCES ${SOURCES})

That's just what I was looking for, thanks! Now the project appears in
both Xcode and MSVC, and make still runs fine.

Cheers,

Pedro
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to