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
-- 

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