[CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add
Saad Khattak
saadrustam at gmail.com
Wed Jan 31 12:36:24 EST 2018
I have the following setup:
Superbuild
- ExternalProject_Add(a...)
- ExternalProject_Add(b...)
- ExternalProject_Add(c...)
- ExternalProject_Add(d...)
The SuperBuild is built from command line with some options e.g.
-DMY_OPTION=TRUE. I would like all these options to be passed to each of
the ExternalProject_Add CMAKE_ARGS.
I tried to capture the arguments using the solution posted here:
https://stackoverflow.com/a/10218582/368599
The arguments are captured properly (i.e. I printed them out to make sure
they are correct) but relaying them to ExternalProject_Add appears to be
problematic. I tried the following ways to forward the arguments (as
outlined in the stackoverflow solution):
ExternalProject_Add(...
CMAKE_ARGS ${CMAKE_ARGS}
)
ExternalProject_Add(...
CMAKE_ARGS "${CMAKE_ARGS}" # quotes
)
ExternalProject_Add(...
CMAKE_ARGS "${MY_CMAKE_ARGS}" # changed the variable name in case it
conflicts
)
None of that seems to work. CMake appears to ignore the commands forwarded.
Is there something I am missing?
Thanks,
Saad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180131/3d6b23c1/attachment.html>
More information about the CMake
mailing list