On 12/13/2012 05:15 AM, Alexander Neundorf wrote:
> There was a request on the KDE buildsystem list to make this the default 
> behaviour of cmake:
> http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/7570
[snip]
> AFAIK, CMakeSystemSpecificInformation.cmake is executed very early during a 
> cmake run, at least if there is no project() call in the CMakeLists.txt.
> This makes it hard to use a policy for changing this behaviour, right ?

Furthermore the policy setting should have per-target granularity based
on its value when each target is created.  We can't have a single policy
control the entire build tree's default.

Instead, when the policy is NEW, *ignore* CMAKE_SHARED_MODULE_PREFIX
and always use an empty default prefix for MODULE libraries.  Projects
can always set the PREFIX property.  Optionally a new variable can be
introduced to use with cmTarget's SetPropertyDefault to get a default
value for the property.

If the explicit property is not set such that the logic reaches the
point of needing the old variable value, then check the policy value
recorded at the target's creation.  If it is NEW, use "".  If it is
OLD, use the variable.  If it is not set, use the variable and warn
if its value is not "".

-Brad
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to