Hi all, I'm wondering if there's a way to touch files on cached var changes. Let's say I have an option to enable or disable a feature in my application, and depending on its setting a preprocessor macro is defined (or not defined) in the CMakeLists.txt file:
OPTION(FEATURE_X "Check to enable feature X" OFF) IF(FEATURE_X) ADD_DEFINITIONS(-DUSE_FEATURE_X=1) ELSE(FEATURE_X) ADD_DEFINITIONS(-DUSE_FEATURE_X=0) ENDIF(FEATURE_X) and in "features.c": ... #if USE_FEATURE_X // Code for feature X #endif ... The source code file "features.c" that have code depending on the preprocessor macro needs to be recompiled each time the option changes, which does not automatically happen if the macro is defined like above (and I _really_ need to have it defined, either to zero or one...). So I pretty much need to hook a dependency of "features.c" to change of cached cmake options/vars... Ideas? TIA /Rob _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake