[CMake] Overloading the install make rule

Dixon, Shane Shane.Dixon at atmel.com
Thu Oct 8 17:28:03 EDT 2009


I have two different version of my program: one that runs in simulation mode, and the other that runs in "real" mode.  Right now I just select which I want using an option -DEMULATION_MODE=ON or -DEMULATION_MODE=OFF.  The flag is checked later and generates an installer (NSIS) that has -emul or -real at the end so I know which I'm installing.  

My question is whether I can overload the install target to "install/real" and "install/emul" with "install" just pointing to emul as a safe default.  

Additionally I'd like to be able to setup NSIS so that when I install, I can select which version is installed at runtime there.  

Is all or any of this possible?

--
Shane


More information about the CMake mailing list