{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6273","repository_url":"https://api.github.com/repos/travis-ci/travis-ci","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6273/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6273/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6273/events","html_url":"https://github.com/travis-ci/travis-ci/issues/6273","id":164195050,"number":6273,"title":"compiler options beyond gcc and clang","user":{"login":"jeffhammond","id":406118,"avatar_url":"https://avatars.githubusercontent.com/u/406118?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffhammond","html_url":"https://github.com/jeffhammond","followers_url":"https://api.github.com/users/jeffhammond/followers","following_url":"https://api.github.com/users/jeffhammond/following{/other_user}","gists_url":"https://api.github.com/users/jeffhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffhammond/subscriptions","organizations_url":"https://api.github.com/users/jeffhammond/orgs","repos_url":"https://api.github.com/users/jeffhammond/repos","events_url":"https://api.github.com/users/jeffhammond/events{/privacy}","received_events_url":"https://api.github.com/users/jeffhammond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-06T23:06:21Z","updated_at":"2016-07-13T06:24:10Z","closed_at":null,"body":"I'd like to test compilers other than gcc and clang, which I intend to install myself.  (If it matters, I want to test Intel compilers, which are discussed in https://github.com/travis-ci/travis-ci/issues/4604).\r\n\r\nUnfortunately, when I set\r\n```\r\ncompilers:\r\n  - gcc\r\n  - clang\r\n  - icc\r\n```\r\nTravis defines `CC=gcc` and `CXX=g++` first thing and then attempts to run `icc --version` (https://travis-ci.org/jeffhammond/PRK/jobs/142852013), both of which are wrong because the whole point is that I want `CC=icc` (and `CXX=icpc`).  Also, since obviously Travis can't install `icc` for me, running `icc --version` will fail before I have installed it.\r\n\r\nThus, I would like the following:\r\n```\r\nlanguage: c\r\ncompilers:\r\n  - anything\r\n```\r\nshould `export CC=anything` and never attempt to invoke `anything` directly.  The only time a compiler should be invoked is via `$CC` and I do not see any reason to redefine it from the value in `compiler:`.\r\n\r\nFurthermore, the statement [\"For C projects, env and compiler can be given as arrays to construct a build matrix.\"](https://docs.travis-ci.com/user/languages/c#Build-Matrix) is confusing (perhaps because I am an idiot).  I could not find any example where `compiler:` was a matrix, but I tried\r\n```\r\ncompiler:\r\n  - gcc\r\n    TRAVIS_CC=icc\r\n    TRAVIS_CXX=icpc\r\n    TRAVIS_FC=ifort\r\n```\r\nin https://travis-ci.org/jeffhammond/PRK/jobs/142901692 and it obviously didn't work.  It did the following:\r\n```\r\n$ export CXX=g++\r\n$ export CC=gcc\r\n$ gcc TRAVIS_CC=icc TRAVIS_CXX=icpc TRAVIS_FC=ifort --version\r\ngcc: error: TRAVIS_CC=icc: No such file or directory\r\ngcc: error: TRAVIS_CXX=icpc: No such file or directory\r\ngcc: error: TRAVIS_FC=ifort: No such file or directory\r\n```\r\nwhich again is exactly the opposite of what I want, because it is both redefining `CC` from the value in `compiler:` *and* attempting to use the value set in `compiler:` literally.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/232267297","html_url":"https://github.com/travis-ci/travis-ci/issues/6273#issuecomment-232267297","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6273","id":232267297,"user":{"login":"cbeck88","id":5683852,"avatar_url":"https://avatars.githubusercontent.com/u/5683852?v=3","gravatar_id":"","url":"https://api.github.com/users/cbeck88","html_url":"https://github.com/cbeck88","followers_url":"https://api.github.com/users/cbeck88/followers","following_url":"https://api.github.com/users/cbeck88/following{/other_user}","gists_url":"https://api.github.com/users/cbeck88/gists{/gist_id}","starred_url":"https://api.github.com/users/cbeck88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbeck88/subscriptions","organizations_url":"https://api.github.com/users/cbeck88/orgs","repos_url":"https://api.github.com/users/cbeck88/repos","events_url":"https://api.github.com/users/cbeck88/events{/privacy}","received_events_url":"https://api.github.com/users/cbeck88/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T06:24:10Z","updated_at":"2016-07-13T06:24:10Z","body":"What I usually do is ignore the whatever CXX travis sets, and use `export CXX=` whatever I want it to be. Since you will almost never use the compiler that travis actually installs. If you want to see an extremely well-developed custom compilers & new versions of C++ standard libraries travis.yml script, checkout this one: https://github.com/boostorg/hana/blob/master/.travis.yml This link has been circulated on /reddit/r/cpp a few times, this travis script is very well maintained."}}
{"actor":{"display_login":"cbeck88"}}