{"id":3126,"date":"2016-06-30T07:29:19","date_gmt":"2016-06-30T13:29:19","guid":{"rendered":"http:\/\/dev.iachieved.it\/iachievedit\/?p=3126"},"modified":"2016-07-03T17:36:55","modified_gmt":"2016-07-03T23:36:55","slug":"upgrading-cmake-for-a-happier-swift-build","status":"publish","type":"post","link":"https:\/\/dev.iachieved.it\/iachievedit\/upgrading-cmake-for-a-happier-swift-build\/","title":{"rendered":"Upgrading CMake for a Happier Swift Build"},"content":{"rendered":"<p>There have been a number of updates to Open Source Swift that take advantage of newer versions of <a href=\"https:\/\/cmake.org\/\">CMake<\/a> to <b>build swift on Linux<\/b>.  In particular, the default version of <code>cmake<\/code> that comes with Ubuntu 14.04 (2.8.12.2) is no longer up to the task.<\/p>\n<p>Let&#8217;s get our Ubuntu 14.04 environment updated with CMake 3.4.3, the version <a href=\"https:\/\/lists.swift.org\/pipermail\/swift-dev\/Week-of-Mon-20160627\/002299.html\">proposed by the developers<\/a> that work in this area.<\/p>\n<p>On systems I&#8217;m installing software by source, I usually have a build area in <code>\/usr\/local\/src<\/code> and an area of archives (so I can keep track of the versions I built) in <code>\/usr\/local\/archive<\/code>:<\/p>\n<p>As <code>root<\/code> or using <code>sudo<\/code>:<\/p>\n<pre class=\"crayon:false\">\n# cd \/usr\/local\/archive\n# wget https:\/\/cmake.org\/files\/v3.4\/cmake-3.4.3.tar.gz\n# cd ..\/src\/\n# tar -xzvf ..\/archive\/cmake-3.4.3.tar.gz\n<\/pre>\n<p>Now, to configure and build:<\/p>\n<pre class=\"crayon:false\">\n# cd cmake-3.4.3\n# .\/configure --prefix=\/usr\/local\n...\nCMake has bootstrapped.  Now run make.\n# make\n<\/pre>\n<p>Finally, <code>make install<\/code> will install <code>cmake<\/code> and its associated configuration to <code>\/usr\/local<\/code>.<\/p>\n<pre class=\"crayon:false\">\n# make install\n# which cmake\n# cmake --version\ncmake version 3.4.3\n\nCMake suite maintained and supported by Kitware (kitware.com\/cmake).\n<\/pre>\n<p>That&#8217;s all it takes.  Happy building!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There have been a number of updates to Open Source Swift that take advantage of newer versions of CMake to build swift on Linux. In particular, the default version of cmake that comes with Ubuntu 14.04 (2.8.12.2) is no longer up to the task. Let&#8217;s get our Ubuntu 14.04 environment updated with CMake 3.4.3, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3108,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,5],"tags":[51],"class_list":["post-3126","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-swift","tag-build-swift-on-linux"],"_links":{"self":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3126"}],"collection":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/comments?post=3126"}],"version-history":[{"count":6,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3126\/revisions"}],"predecessor-version":[{"id":3149,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3126\/revisions\/3149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media\/3108"}],"wp:attachment":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media?parent=3126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/categories?post=3126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/tags?post=3126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}