Dear All,

I try to understand the install logic for ExternalProjects. I added
several CMake-based external projects to my main build, using the
ExternalProject_Add() method. If I generate the build system and issue
'make install', the external projects install routines are also
triggered. Is that the expected behaviour? (I have set INSTALL_COMMAND
to "" in the ExternalProject_Add() call.)

Is there a way, to switch this behaviour on or off? The only way I could
achieve this was to put the CMakeLists.txt with the
ExternalProject_Add() call into a subfolder and call that subfolder with
add_subdirectory(.... EXCLUDE_FROM_ALL). But this is somewhat
inconvinient, since I have to switch the installation on and off
depending on a variable, so I have to add

if(BUILD_API)
  add_subdirectory(...)
else()
  add_subdirectory(... EXCLUDE_FROM_ALL)
endif()

branches for each subproject.

Setting EXCLUDE_FROM_ALL TRUE or FALSE in ExternalProject_Add() routine
did not help either.

Any other suggestions?

Thanks in advance.

Best regards,

Bálint

Attachment: signature.asc
Description: OpenPGP digital signature

-- 

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