Hi,

in CMake 3.14 the EXCLUDE_FROM_ALL option of add_subdirectory had a
behavior change.
Here is the MR: https://gitlab.kitware.com/cmake/cmake/merge_requests/2816,
implementing the requirement from this ticket:
https://gitlab.kitware.com/cmake/cmake/issues/17149.

We are negatively impacted by this change, as we are in the same exact
scenario as this user:
https://cmake.org/pipermail/cmake/2019-September/069978.html

Except we used this behavior to have separate VS solutions for our unit
tests and demos.

Our hierarchy looks something like this:
|- MainLibrary
|- Extension1
|- Extension2
|- UnitTests
  | - [lots of tests]
|- Demos
  | - [lots of demos]

This had the very nice result of having a root solution containing all of
our libraries and extensions, another solution in the UnitTests folder, and
another in the Demos folder (and likewise on linux, we could build with
'ninja UnitTests/all').

The new behavior leads to the inability to build all our tests/demos in one
fell swoop, and removing the EXCLUDE_FROM_ALL directive would result in a
VS solution way too large for daily use.

This currently is blocking us to upgrade to CMake > 3.13, which prevents us
from using VS 2019.

I know this change occurred about two years ago, so changing the behavior
the other way is not a good way forward, and do not know enough to find out
by myself how the previous behavior can be re-introduced.

I would like advice on how to re-introduce the previous behavior without
perturbing the new one, e.g. a way to set EXCLUDE_FROM_ALL to FALSE on all
the targets of a folder that is itself excluded from the ALL target.

Thanks for your help.

-- 
 - Always keep in mind that you may be wrong -
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to