<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>@Eike, indeed, that's the behaviour I wanted to change.<br>
</p>
<p>Digging in the src code it seems that what I'm looking is the var
CMAKE_C_COMPILER_NAMES, apparently undocumented.<br>
</p>
<pre style="background-color:#ffffff;color:#000000;font-family:'DejaVu Sans Mono';font-size:11.3pt;">set(<span style="color:#008000;font-weight:bold;">CMAKE_C_COMPILER_NAMES clang gcc icc cc</span>)
set(<span style="color:#008000;font-weight:bold;">CMAKE_CXX_COMPILER_NAMES clang++ g++ icpc c++ cxx</span>)
project(<span style="color:#008000;font-weight:bold;">hellogtest</span>)
set(<span style="color:#008000;font-weight:bold;">CMAKE_CXX_STANDARD 17</span>)</pre>
<br>
<div class="moz-cite-prefix">On 24/06/18 12:20, Rolf Eike Beer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2906758.kGEBsEiAbQ@daneel.sf-tec.de">
<pre wrap="">Am Sonntag, 24. Juni 2018, 11:32:32 CEST schrieb Quaquaraquà:
</pre>
<blockquote type="cite">
<pre wrap="">Dear users,
how do you specify the order of compilers to select from the system?
That is, if the user didn't set neither CMAKE_C_COMPILER nor the env.
var. CC, I wish the build system would pick one of the compilers from a
given list. In AutoConf, this is achieved through AC_PROG_CC([clang gcc
icc cc]) [1]. What would be the corresponding snippet in cmake?
</pre>
</blockquote>
<pre wrap="">
CMake will look at /usr/bin/cc if nothing else is set.
Eike</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>