[CMake] cached variable not getting changed in ExternalProject

Arunkumar Dhananjayn darunkumar at clusterwireless.com
Wed Jun 6 01:14:33 EDT 2012


Hi All,

I have a setup where, the main project consists of a number of 
subprojects which are added to the build using the ExternalProject_Add() 
function. I have a few cached variables in the main project's cmake file 
which can be configured by the user. These are passed to the subproject 
using the CMAKE_ARGS parameter in ExternalProject_Add().

After I generated the makefiles from the main project, I do a 'make 
edit_cache' and update the cache variables. Then I give make in the main 
project. But the new values of the cached variables are not being used 
in the sub project.

Is there any way I can make the external project to be reconfigured and 
built automatically when the cached variable is changed in the main project?

thanks,
arun


More information about the CMake mailing list