3

Is it possible to build only a specific target when using ExternalProject? In particular, I need to download and build only the MPI version of the OpenCoarrays library. I tried

ExternalProject_Add(
  OpenCoarrays-fallback
  EXCLUDE_FROM_ALL 1
  URL https://github.com/sourceryinstitute/opencoarrays/archive/1.0.1.tar.gz
  BUILD_COMMAND make caf_mpi
)

but it builds both serial and MPI versions. If it is not possible, any hack is also welcome.

1 Answer 1

-2

make install installs all flows of OpenCoarrays, so even you build only caf_mpi at build stage, caf_single is built automatically on install stage.

For install only caf_mpi library flow you can try to modify package sources using PATCH_COMMAND argument of ExternalProject_add command.

E.g, you may replace content of src/CMakeLists.txt file to this one:

add_subdirectory(mpi)

Probably, this will work.

1
  • For now I've decided to redefine the install command with a simple ${CMAKE_COMMAND} -E copy, but I'll keep your suggestion also in mind. Aug 3, 2015 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.