I am including an external project with ExternalProject_Add. What I want is to be able to do
cmake -DCMAKE_CXX_COMPILER=<some compiler> <assume correct path>
for the top-level project so that my chosen compiler propagates to the externally included projects. I expect something that I can put in the ExternalProject_Add command:
ExternalProject_Add (
some_external_project
PREFIX ... # Assume this works.
GIT_REPOSITORY ... # Assume this works too.
# What should I write here to tell it to use the ${CMAKE_CXX_COMPILER}
# of the top-level project ?
)