[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Tweak CMake project to include non-buildable files in the CodeBlocks project file
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2015-01-12 12:47:42
Message-ID: CAExHGmSqeF8BLFod28G2teK1ELggQUCz7UDX_NixxOyPCaR+PQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Nils,

On Mon, Jan 12, 2015 at 11:50 AM, Nils Gladitz <nilsgladitz@gmail.com>
wrote:

> On 01/12/2015 11:40 AM, Andreas Pakulat wrote:
>
>> Ah, that works. Its a little ugly in the CMake files but I guess I can
>> live with that. Ideally I was hoping to simply have a 'complete' list
>> including actual sources and sources for other platforms and hand that
>> to a special function - without passing the source-for-other-platform to
>> the actual target. Oh well, I have to stop dreaming :)
>>
>
> You can also use add_custom_target(my_new_target SOURCES src1.cpp
> src2.cpp).
>
> That will list the given sources in the IDE without adding build semantics
> to them.
>
> Since this lists the sources as part of a new target rather than an
> existing target this will be visually distinct from the other approach in
> some IDEs but should afaik make no difference in QtCreator.
>

Thanks for that idea, having a dedicated target wouldn't be so bad even if
its visible. With a bit of restructuring of the cmakelists.txt this may
actually make the file quite a bit more 'declarative' and less convoluted.

Andreas

[Attachment #5 (text/html)]

<div dir="ltr">Hi Nils,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, \
Jan 12, 2015 at 11:50 AM, Nils Gladitz <span dir="ltr">&lt;<a \
href="mailto:nilsgladitz@gmail.com" \
target="_blank">nilsgladitz@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 01/12/2015 11:40 AM, Andreas Pakulat \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"> Ah, that works. Its a little ugly in the CMake files \
but I guess I can<br> live with that. Ideally I was hoping to simply have a \
&#39;complete&#39; list<br> including actual sources and sources for other platforms \
and hand that<br> to a special function - without passing the \
source-for-other-platform to<br> the actual target. Oh well, I have to stop dreaming \
:)<br> </blockquote>
<br></span>
You can also use add_custom_target(my_new_<u></u>target SOURCES src1.cpp \
src2.cpp).<br> <br>
That will list the given sources in the IDE without adding build semantics to \
them.<br> <br>
Since this lists the sources as part of a new target rather than an existing target \
this will be visually distinct from the other approach in some IDEs but should afaik \
make no difference in QtCreator.<br></blockquote><div><br></div><div>Thanks for that \
idea, having a dedicated target wouldn&#39;t be so bad even if its visible. With a \
bit of restructuring of the cmakelists.txt this may actually make the file quite a \
bit more &#39;declarative&#39; and less convoluted.</div><div><br></div><div>Andreas  \
</div></div></div></div>



-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic