{"id":4075,"date":"2021-04-28T09:57:40","date_gmt":"2021-04-28T00:57:40","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=4075"},"modified":"2021-06-07T08:41:05","modified_gmt":"2021-06-06T23:41:05","slug":"cmake-%e5%a4%89%e6%95%b0","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/4075","title":{"rendered":"[CMake] \u5909\u6570"},"content":{"rendered":"<h2>\u4f7f\u7528\u6587\u5b57<\/h2>\n<ul>\n<li>\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306f\u533a\u5225<\/li>\n<li>\u63a8\u5968\u6587\u5b57 : \u82f1\u6570\u5b57, <code>_<\/code> (\u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a2), <code>-<\/code> (\u30cf\u30a4\u30d5\u30f3)<\/li>\n<\/ul>\n<h2>\u7a2e\u985e<\/h2>\n<ul>\n<li>\u901a\u5e38\u5909\u6570 (nomal variable)<\/li>\n<li>\u30ad\u30e3\u30c3\u30b7\u30e5\u5909\u6570 (cache variable)<\/li>\n<li>\u74b0\u5883\u5909\u6570 (environment variable)<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2>\u901a\u5e38\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165<\/h2>\n<h3>\u66f8\u5f0f<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >set(&lt;variable&gt; &lt;value&gt;)<\/pre>\n<h3>\u4f8b<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >set(MAIN \"main.c\")<\/pre>\n<h2>\u901a\u5e38\u5909\u6570\u306e\u53c2\u7167<\/h2>\n<h3>\u66f8\u5f0f<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >${&lt;variable&gt;}<\/pre>\n<h3>\u4f8b<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >include_directories(${PROJECT_SOURCE_DIR}\/src ${GTEST_INCLUDE_DIRS})<\/pre>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-language.7.html#cmake-language-variables\">https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-language.7.html#cmake-language-variables<\/a><\/li>\n<li><a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-language.7.html#variable-references\">https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-language.7.html#variable-references<\/a><\/li>\n<li><a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/command\/set.html#command:set\">https:\/\/cmake.org\/cmake\/help\/latest\/command\/set.html#command:set<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u6587\u5b57 \u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306f\u533a\u5225 \u63a8\u5968\u6587\u5b57 : \u82f1\u6570\u5b57, _ (\u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a2), &#8211; (\u30cf\u30a4\u30d5\u30f3) \u7a2e\u985e \u901a\u5e38\u5909\u6570 (nomal variable) \u30ad\u30e3\u30c3\u30b7\u30e5\u5909\u6570 (cache variable) \u74b0\u5883\u5909\u6570 (envi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[111],"class_list":["post-4075","post","type-post","status-publish","format-standard","hentry","category-memo","tag-cmake"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/4075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=4075"}],"version-history":[{"count":9,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/4075\/revisions"}],"predecessor-version":[{"id":4269,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/4075\/revisions\/4269"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=4075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=4075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=4075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}