<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>System Integrity Protection (SIP, introduced with macOS 10.11)
      prevents you from writing into various system directories (like
      /usr) even as the root user. You can either install cmake to a
      different location (like /usr/local, which apparently is not
      protected), or disable SIP entirely (which is not recommended).
      See <a moz-do-not-send="true"
        href="https://en.wikipedia.org/wiki/System_Integrity_Protection">this
        Wikipedia article</a> for more information on SIP.<br>
    </p>
    <div class="moz-cite-prefix">Am 15.10.19 um 07:05 schrieb Jeffrey
      Walton:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAH8yC8mqaTJtfdSHcyVNR+qYsf1nFYUDCy0JXjLYm2Xw+e5bZw@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">I'm building CMake cmake-3.15.4.tar.gz on OS X 10.12. The machine is
stripped down, and only has the COmmand Line tools. No Xcode and
friends.

I configured with:

    ./configure --prefix=/usr

Configure appears OK. Make appears OK. Install is failing:

    $ sudo make install VERBOSE=1
    ...
[100%] Built target foo
/Users/jwalton/cmake-3.15.4/Bootstrap.cmk/cmake -E
cmake_progress_start /Users/jwalton/cmake-3.15.4/CMakeFiles 0
/Library/Developer/CommandLineTools/usr/bin/make -f
CMakeFiles/Makefile2 preinstall
make[1]: Nothing to be done for `preinstall'.
Install the project...
bin/cmake -P cmake_install.cmake
-- Install configuration: ""
CMake Error at Source/kwsys/cmake_install.cmake:36 (file):
  file cannot create directory: /usr/doc/cmake-3.15/cmsys.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:37 (include)

make: *** [install] Error 1
</pre>
    </blockquote>
    <div class="moz-signature">-- <br>
      <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:mustermann@mvtec.com">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">www.mvtec.com</a>
          <br>
        </p>
        <p>
          <span style="font-size: 12px; font-family: Arial, Helvetica,
            sans-serif; color: #062d64;">Find our privacy policy <a
              style="font-size: 12px; font-family: Arial, Helvetica,
              sans-serif; color: #062d64;"
              href="https://www.mvtec.com/imprint">here</a>.</span> </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" width="16" height="16"> <a style="font-size:
            12px; font-family: Arial, Helvetica, sans-serif; color:
            #062d64; font-weight: bold;"
            href="https://www.mvtec.com/newsletter">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"></div>
    </div>
  </body>
</html>