Hi CMake community,

the option EXCLUDE_FROM_ALL
<https://cmake.org/cmake/help/v3.14/prop_dir/EXCLUDE_FROM_ALL.html?highlight=exclude_from_all>
of *add_subdirectory* command affects in CMake 3.14.3 the content of the
Visual Studio solution file in the added subdirectory.
The difference is subtle: if the subdirectory A added with EXCLUDE_FROM_ALL
from source root contains another subdirectory B, a solution file in A
does *not
contain* project from B.
The behavior changed between versions 3.13.5 and 3.14.3. Tested also on
3.15.0, which produces same output as 3.14.3.Observed on Win 10 using *Visual
Studio 16 2019* and *Visual Studio 12 2013 Win64 *generators.
Test with *CodeBlocks - Unix Makefiles *generator does not show this issue.

Is there a way to retain the old behavior?
Thanks for an advice.

-------------------------------------------------------------------
Minimal example (attached):

$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(main)
add_subdirectory(subdir EXCLUDE_FROM_ALL)

$ cat subdir/CMakeLists.txt
project(utilities)
add_subdirectory(subsubdir)

$ cat subdir/subsubdir/CMakeLists.txt
project(util)
add_executable(util util.cpp)

With CMake 3.13.5 the utilities solution file contains project util,
whereas with CMake 3.14.3 or 3.15.0 it does not.

--

Jakub Imriška

*Programmer and research developer*, Photoneo s. r. o. - Focused on 3D

-- 
Meet us:
CIIF <http://www.ciif-expo.com/en/>, IAS 
<http://www.industrial-automation-show.com/>, booth #C010, Hall 8.1 H, 
17-21 September 2019, Shanghai (CN)
MOTEK <https://www.motek-messe.de/en>, 
booth  #7513, Hall 7,  7-10 October 2019, Stuttgart (DE)
International 
Engineering Fair Brno 2019 <https://www.bvv.cz/en/msv/>, ABB booth #093, 
Hall P, 7-11 October 2019, Brno (CZ)  


CRAV.ai 
<https://www.robotics.org/collaborative-robots-advanced-vision-and-ai-conference>,
 
tabletop 3, 12-13 November 2019, San Jose (CA)

SPS IPC Drives 
<https://sps.mesago.com/events/en.html?ovs_force_web=1&sid=3db8da8e0409fc89fd1c3b914c44be78&stamp=1541992980>,
 
booth #202, Hall 8, 26-28 November 2019, Nuremberg (DE) 





---


This 
e-mail was sent by Photoneo s.r.o. and may contain confidential and/or 
proprietary information. If you are not the intended addressee, please 
inform the sender immediately and delete this e-mail.

<<attachment: CMake_EXCLUDE_FROM_ALL_example.zip>>

-- 

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

Reply via email to