<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 30-07-17 04:36, jupiter wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAA=hcWQDAkCDPUZuF1YFbAhy6W4O606e4tavJvNS1-NHeRZvAg@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>I thought if I add -DCMAKE_CC_COMPILER=gcc that error
            should go, no, it still compile with the specific default
            cc:<br>
            <br>
          </div>
          /usr/bin/cc ....<br>
          <br>
        </div>
        How could I fix it?<br>
        <div>
          <div>
            <div><br>
            </div>
            <div>Thank you.<br>
            </div>
            <div>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">On Sun, Jul 30, 2017 at 11:51
                  AM, jupiter <span dir="ltr"><<a target="_blank"
                      href="mailto:jupiter.hce@gmail.com"
                      moz-do-not-send="true">jupiter.hce@gmail.com</a>></span>
                  wrote:<br>
                  <blockquote style="margin:0px 0px 0px
                    0.8ex;border-left:1px solid
                    rgb(204,204,204);padding-left:1ex"
                    class="gmail_quote">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>Hi,<br>
                            <br>
                          </div>
                          How can I set up the cmake not to check
                          /usr/bin/cc but to check $CC (which link to
                          gcc without hard corded path in the
                          environment)?<br>
                          <br>
                        </div>
                        Thank you.<br>
                        <br>
                      </div>
                      Regards<br>
                      <div>
                        <div><br>
                          <br>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    Hello Jupiter,<br>
    <br>
    Running the following sets the compiler to gcov:<br>
    <br>
    CC=/usr/bin/gcov cmake ../<br>
    <br>
    This outputs:<br>
    <br>
    -- The C compiler identification is unknown<br>
    -- The CXX compiler identification is GNU 7.1.1<br>
    -- Check for working C compiler: /usr/bin/gcov<br>
    -- Check for working C compiler: /usr/bin/gcov -- works<br>
    -- Detecting C compiler ABI info<br>
    -- Detecting C compiler ABI info - failed<br>
    -- Check for working CXX compiler: /usr/bin/c++<br>
    -- Check for working CXX compiler: /usr/bin/c++ -- works<br>
    -- Detecting CXX compiler ABI info<br>
    -- Detecting CXX compiler ABI info - done<br>
    -- Detecting CXX compile features<br>
    -- Detecting CXX compile features - done<br>
    -- Configuring done<br>
    -- Generating done<br>
    <br>
    <br>
    As you can see cmake definitely uses the CC environment variable.
    What is your OS? What do you set $CC to? What is the full
    commandline you use to call cmake?<br>
    What happens if you set it the way I did?<br>
    <br>
    Regards,<br>
    Micha<br>
  </body>
</html>