From one brief use of ExternalProject, I came to the conclusion that it should 
be used when it makes sense to let CMake handle downloading the project in 
question, and to otherwise use add_subdirectory. Others with more 
ExternalProject experience may have greater insight, though.

--
Todd Greer
Principal Scientist, Affinegy, Inc.

From: [email protected] [mailto:[email protected]] On Behalf Of 
Ansis Malinš
Sent: Monday, February 4, 2013 2:23 AM
To: cmake
Subject: [CMake] When should I use add_subdirectory and when ExternalProject?

If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory 
just fine, should I still use ExternalProject_Add instead? Given both ways 
work, what should I prefer? What are the tradeoffs?
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to