<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:verdana, helvetica, sans-serif;font-size:10pt"><div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2">Hi everybody,</font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2">I´m mailing to find out what the community thinks of my feature request (</font><span class="Apple-style-span" style="font-family: verdana, helvetica, sans-serif; font-size: small; "><span><a target="_blank" href="http://public.kitware.com/Bug/view.php?id=5974">http://public.kitware.com/Bug/view.php?id=5974</a>)</span></span><span class="Apple-style-span" style="font-family: verdana, helvetica, sans-serif; font-size: small; ">, which was unfortunately rejected, and maybe come up with a better idea that serves
the same goal.</span></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2">However, first I want to say that I appreciate the effort that the CMake team is putting in this free software. If my feature request really doesn't make it into CMake, so be it :-)</font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2"><br></font></div><div><span class="Apple-style-span" style="font-family: verdana, helvetica, sans-serif; font-size: small; ">The plea that I would like to make is that the core functionality of CMake is to set up the compilation environment, and therefore CMake should avoid restrictions on which environments you can create. The current problem I see with ADD_SUBDIRECTORY is that you can create a solution with all your projects, but it does not give you full control of your environment: child projects will always inherit all settings from parent projects, including the ones
they don't need or don't want.</span></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2">A workaround was proposed: let all child projects depend on an empty parent project. This however will not work, because I'm depending on ADD_SUBDIRECTORY to create the >real< dependency structure of my project, as this structure will affect build order and linker dependencies (in fact, I don't think that ADD_SUBDIRECTORY should create a linker dependency either, but this is a related but different issue).</font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2">My point of view is that CMake should allow you to create exactly the project dependency structure you require (it already does a
good job on this), with the option to completely control the most common compilation environment variables (library paths, defines, source paths, etc) of every project. My proposal for the DONT_INHERIT keyword basically means that you either let CMake do most of the work (DONT_INHERIT = false), which makes life easy but doesn't give full control, OR that you put DONT_INHERIT = true and then you have to do more work yourself (but with complete control). In my opinion, this added flexibility is worth the possible confusion caused by DONT_INHERIT overruling cached values.</font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="verdana, helvetica, sans-serif" size="2">If you have an alternative idea about how to achieve these goals, I'd like to hear about it.</font></div><div><span class="Apple-style-span" style="font-family: verdana, helvetica, sans-serif;
font-size: small; "><br></span></div><div><span class="Apple-style-span" style="font-family: verdana, helvetica, sans-serif; font-size: small; ">Thanks for reading,</span></div><div><span class="Apple-style-span" style="font-family: verdana, helvetica, sans-serif; font-size: small; ">Maarten</span></div></div><div style="color: black; font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="position: fixed; color: black; font-family: verdana, helvetica, sans-serif; font-size: 10pt; "></div>
</div><br>
</body></html>