Undocumented change of behavior when using EXCLUDE_FROM_ALL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Undocumented change of behavior when using EXCLUDE_FROM_ALL

Jakub Imriska
Hi CMake community,

the option 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, IAS, booth #C010, Hall 8.1 H, 17-21 September 2019, Shanghai (CN)
MOTEK, booth  #7513, Hall 7,  7-10 October 2019, Stuttgart (DE)
International Engineering Fair Brno 2019, ABB booth #093, Hall P, 7-11 October 2019, Brno (CZ)  

CRAV.ai, tabletop 3, 12-13 November 2019, San Jose (CA)

SPS IPC Drives, 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.


--

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

CMake_EXCLUDE_FROM_ALL_example.zip (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented change of behavior when using EXCLUDE_FROM_ALL

CMake mailing list
On 9/23/19 10:24 AM, Jakub Imriska wrote:
> Is there a way to retain the old behavior?

We thought the change was backward compatible with existing projects but perhaps not.
I've opened an issue:

  https://gitlab.kitware.com/cmake/cmake/issues/19753

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented change of behavior when using EXCLUDE_FROM_ALL

Jakub Imriska
Thanks for letting me know.

--

Jakub Imriška

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


Meet us:
CIIF, IAS, booth #C010, Hall 8.1 H, 17-21 September 2019, Shanghai (CN)
MOTEK, booth  #7513, Hall 7,  7-10 October 2019, Stuttgart (DE)
International Engineering Fair Brno 2019, ABB booth #093, Hall P, 7-11 October 2019, Brno (CZ)  

CRAV.ai, tabletop 3, 12-13 November 2019, San Jose (CA)

SPS IPC Drives, 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.


--

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