On 03/14/2016 05:04 AM, Charles Huet wrote:
> I modified my patch a bit to use C++98 only, and try to stick
> to the coding conventions.
Thanks. While reviewing the logic I realized my suggestion to include
all targets was not quite consistent with my observation that this matches
the Makefile generator "cd dir; make" behavior. The latter still excludes
targets that have the EXCLUDE_FROM_ALL target property, as seen by this
code in cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2:
> if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
This is per-target and is different than add_subdirectory EXCLUDE_FROM_ALL.
We should still honor this. Such targets are meant to be built only upon
explicit request. Also later in WriteDirectoryRule2 is this section:
> // The directory-level rule should depend on the directory-level
> // rules of the subdirectories.
The rules we're generating here could work like that too. Each one
depends on all the targets defined in its own directory and on the
directory-level target for subdirectories. The goal is to match the
Makefile generator behavior for target selection in each directory.
I don't think matching subdirectory name prefixes is needed for that.
> These targets are prefixed with "path/" in order to set them apart of
> normal CMake targets.
I think the names can instead use a "/all" suffix e.g. "sub/dir/all".
This would be consistent with the "ninja all" one can now do at the
top.
Thanks,
-Brad
--
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-developers