{"action":"created","issue":{"url":"https://api.github.com/repos/energymon/energymon/issues/12","labels_url":"https://api.github.com/repos/energymon/energymon/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/energymon/energymon/issues/12/comments","events_url":"https://api.github.com/repos/energymon/energymon/issues/12/events","html_url":"https://github.com/energymon/energymon/issues/12","id":113234207,"number":12,"title":"Bad Makefile produced when using both -DCMAKE_TOOLCHAIN_FILE and -DDEFAULT","user":{"login":"connorimes","id":5701850,"avatar_url":"https://avatars.githubusercontent.com/u/5701850?v=3","gravatar_id":"","url":"https://api.github.com/users/connorimes","html_url":"https://github.com/connorimes","followers_url":"https://api.github.com/users/connorimes/followers","following_url":"https://api.github.com/users/connorimes/following{/other_user}","gists_url":"https://api.github.com/users/connorimes/gists{/gist_id}","starred_url":"https://api.github.com/users/connorimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connorimes/subscriptions","organizations_url":"https://api.github.com/users/connorimes/orgs","repos_url":"https://api.github.com/users/connorimes/repos","events_url":"https://api.github.com/users/connorimes/events{/privacy}","received_events_url":"https://api.github.com/users/connorimes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-25T16:11:19Z","updated_at":"2015-10-25T16:21:03Z","closed_at":null,"body":"When using both a toolchain file and specifying a default implementation, build scripts are not produced properly.\r\n\r\nRunning `make` produces:\r\n<pre>\r\nLinking C executable bin/energymon\r\n/local/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lenergymon-default\r\nCMakeFiles/energymon.dir/src/app/energymon.c.o:energymon.c:function main: error: undefined reference to 'energymon_get_default'\r\ncollect2: error: ld returned 1 exit status\r\nCMakeFiles/energymon.dir/build.make:85: recipe for target 'bin/energymon' failed\r\nmake[2]: *** [bin/energymon] Error 1\r\nCMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/energymon.dir/all' failed\r\nmake[1]: *** [CMakeFiles/energymon.dir/all] Error 2\r\nMakefile:116: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n</pre>\r\n\r\nTrying to specify `make energymon-default-static` produces:\r\n<pre>\r\nmake: *** No rule to make target 'energymon-default-static'.  Stop.\r\n</pre>\r\n\r\nOnly the `dummy` implementation appears to be available."},"comment":{"url":"https://api.github.com/repos/energymon/energymon/issues/comments/150938575","html_url":"https://github.com/energymon/energymon/issues/12#issuecomment-150938575","issue_url":"https://api.github.com/repos/energymon/energymon/issues/12","id":150938575,"user":{"login":"connorimes","id":5701850,"avatar_url":"https://avatars.githubusercontent.com/u/5701850?v=3","gravatar_id":"","url":"https://api.github.com/users/connorimes","html_url":"https://github.com/connorimes","followers_url":"https://api.github.com/users/connorimes/followers","following_url":"https://api.github.com/users/connorimes/following{/other_user}","gists_url":"https://api.github.com/users/connorimes/gists{/gist_id}","starred_url":"https://api.github.com/users/connorimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connorimes/subscriptions","organizations_url":"https://api.github.com/users/connorimes/orgs","repos_url":"https://api.github.com/users/connorimes/repos","events_url":"https://api.github.com/users/connorimes/events{/privacy}","received_events_url":"https://api.github.com/users/connorimes/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T16:21:03Z","updated_at":"2015-10-25T16:21:03Z","body":"As it turns out, this is caused by the checking of `CMAKE_SYSTEM_NAME` for `Linux` before adding subprojects other than `dummy`.  The android configuration specifies `Android` instead for newer versions of CMake.  We just need to add this check."}}