ããããã°ã©ã ãã³ã³ãã¤ã«ããã¨ãã« $ make -DUSE_HELLO=yes all ã¨ããããããï¼ãmain.cppã®ä¸ã§ã¯ int main (int argc, char** argv) { #ifdef USE_HELLO cout << "-- hello --\n"; #else cout << "hello is not defined.\n"; #endif return 0; } ã¿ãããªæãã§#ifã#endifã§åãåããã ãããcmakeã§ã©ãããã°ããã®ãã調ã¹ãã ï¼ããç解ããã®ã«ããªãæéãè¦ããããã¥ã¼ããªã¢ã«ã®æ¸ãæ¹ãå£æ» çã«æªãï¼ æ¦è¦ æé ã¯ãããªæãã CMakeLists.txtã®ä¸ã§ããªãã·ã§ã³ããå®ç¾©ããï¼ãã«ãã¿ã¤ããæå®ããCMAKE_BUILD_TYPEã¨åãæ±ãï¼ã Config.hpp.inããç¾å¨ã®è¨å®ãåæ ããConf
{{#tags}}- {{label}}
{{/tags}}