[CMake] Fwd: cmp0065

J Decker d3ck0r at gmail.com
Wed Jul 6 11:45:41 EDT 2016


(probably breaks thread coherance; misreplied)
---------- Forwarded message ----------
From: J Decker <d3ck0r at gmail.com>
Date: Wed, Jul 6, 2016 at 8:43 AM
Subject: Re: [CMake] cmp0065
To: Johannes Zarl-Zierl <johannes.zarl-zierl at jku.at>




On Wed, Jul 6, 2016 at 2:52 AM, Johannes Zarl-Zierl <
johannes.zarl-zierl at jku.at> wrote:

> Hi,
>
> On Tuesday 05 July 2016 23:46:16 J Decker wrote:
> > https://cmake.org/cmake/help/v3.4/policy/CMP0065.html
> > while I like the idea it suggests, I don't use the flags for -rdynamic so
> > this is meaningless to me
>
> I'm not sure I understood you correctly, but if the policy is meaningless
> to
> you, it shouldn't affect you...
>
> >
> https://cmake.org/cmake/help/v3.4/prop_tgt/ENABLE_EXPORTS.html#prop_tgt:ENAB
> > LE_EXPORTS
> >   SET_PROPERTY(TARGET ${project} APPEND PROPERTY COMPILE_DEFINITIONS
> > TARGET_LABEL=${TARGET_LABEL};TARETNAME=\"${TARGETNAME}\" )
> >
> > or
> >
> >     SET_PROPERTY( TARGET ${project} APPEND PROPERTY COMPILE_DEFINITIONS
> > "CONSOLE_SHELL" )
> >
> > to indicate it's non-WIN32....
>
> First of all, there are the usual standard definitions provided by the
> compiler, so you can just use
>
> #if defined(WIN32)
> #endif
>

not WIN32 that way... as in add_executable( something WIN32 ... )  (or not
WIN32)


>
> target_compile_definitions( yourTarget PRIVATE COMPILE_SHELL)
> https://cmake.org/cmake/help/v3.4/command/target_compile_definitions.html
>
> Is that what you are searching for?
>

it says "tems will populate theCOMPILE_DEFINITIONS
<https://cmake.org/cmake/help/v3.4/prop_tgt/COMPILE_DEFINITIONS.html#prop_tgt:COMPILE_DEFINITIONS>
property
of"
sounds like that will trigger the same CMP0065 warnings.


>
> > I noted at the bottom of that the the default behavior will eventually be
> > phased out... but then can we have some other flag to phase it back in?
>
> You can always set policies to “OLD” to revert to the old behavior (until
> it
> is finally phased out). In the case of cmp0065 the documentation explains
> what
> you can do to have the same behavior with the policiy enabled:
> Just set the ENABLE_EXPORTS property on the targets that need to export
> their
> symbols.
>

again though; the flags specified have nothing to do with exporting
symbols; so enabling that is false;  I want to provide COMPILE_DEFINITIONS
for many targets that don't export symbols and are DLLs.



>
> HTH,
>   Johannes
> --
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160706/931990e5/attachment.html>


More information about the CMake mailing list