<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    thank you this is exactly what I am looking for. It is working well.<br>
    <div class="moz-forward-container">
      <div class="moz-forward-container">
        <p>From the documentation:</p>
        <p>«It is loaded after CMake’s builtin compiler and platform
          information modules have been loaded but before the
          information is used.»</p>
        <p>since CMakeCInformation.cmake:</p>
        <p># compile a C file into an object file<br>
          if(NOT CMAKE_C_COMPILE_OBJECT)<br>
            set(CMAKE_C_COMPILE_OBJECT<br>
              "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES>
          <FLAGS> -o <OBJECT>   -c <SOURCE>")<br>
          endif()</p>
        <p><br>
        </p>
        <p>CMAKE_USER_MAKE_RULES_OVERRIDE_C must be set before the
          language is set, i.e. before any `enable_language()` or
          `project()` instruction. <br>
        </p>
        <p><br>
        </p>
        <div class="moz-cite-prefix">On 30/08/2019 06:47, Eric Doenges
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:509c4819-db0f-6e5f-e972-d93412b59c2d@mvtec.com">
          <p>The way I understand the documentation,
            CMAKE_USER_MAKE_RULES_OVERRIDE applies for all generators,
            not just the Makefile one. What you are apparently supposed
            to do is create a file that sets all the "rule variables" as
            required (in this case, CMAKE_C_COMPILE_OBJECT), and then
            include that file via CMAKE_USER_MAKE_RULES_OVERRIDE. I'm
            not sure if these 'rule variables' are documented anywhere -
            but you can look into "<path where CMake is
            installed>/share/cmake-<version>/Modules/Compiler"
            for inspiration. Another good starting point would be
"<...>/share/cmake-<version>/Modules/CMakeCInformation.cmake".<br>
          </p>
          <p>With kind regards,<br>
            Eric</p>
          <div class="moz-signature">
            <div style="width:480px; text-align: left; font-family:
              Arial, Helvetica, sans-serif;">
              <p style="color: #062d64; font-size: 14px; text-align:
                left; font-family: Arial, Helvetica, sans-serif;"><b>
                  Dr. Eric Dönges </b><br>
                Senior Software Engineer </p>
              <p style="color: #062d64; font-size: 12px; text-align:
                left; font-family: Arial, Helvetica, sans-serif;">MVTec
                Software GmbH | Arnulfstr. 205 | 80634 Munich | Germany<br>
                <a style="font-size: 12px; font-family: Arial,
                  Helvetica, sans-serif; color: #062d64;"
                  href="mailto:doenges@mvtec.com" moz-do-not-send="true">doenges@mvtec.com</a>
                | Tel: +49 89 457 695-0 | <a style="font-size: 12px;
                  font-family: Arial, Helvetica, sans-serif; color:
                  #062d64;" href="http://www.mvtec.com"
                  moz-do-not-send="true">www.mvtec.com</a> </p>
              <p style="color: #062d64; font-size: 12px; text-align:
                left; font-family: Arial, Helvetica, sans-serif;"><img
src="https://mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/newsletter-icon.png"
                  valign="bottom" moz-do-not-send="true" width="16"
                  height="16"> <a style="font-size: 12px; font-family:
                  Arial, Helvetica, sans-serif; color: #062d64;
                  font-weight: bold;"
                  href="http://www.mvtec.com/newsletter"
                  moz-do-not-send="true">Sign up</a> for our MVTec
                Newsletter!</p>
              <p style="margin: 0px; color: #666; font-size: 12px;
                text-align: left; font-family: Arial, Helvetica,
                sans-serif;">Geschäftsführer: Dr. Wolfgang Eckstein, Dr.
                Olaf Munkelt<br>
                Amtsgericht München HRB 114695</p>
              <p style="margin: 0px; color: #666; font-size: 12px;
                text-align: left; font-family: Arial, Helvetica,
                sans-serif;"> </p>
              <img
src="https://www.mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/mvtec-logo-line.png"
                alt="MVTec Software GmbH Logo" moz-do-not-send="true"></div>
          </div>
          <br>
        </blockquote>
      </div>
    </div>
  </body>
</html>