title: Force CMake in verbose mode via Gradle and the Android NDK
body: <p>I'm using Gradle and CMake to compile an Android NDK project from the command line. Previously, I was using Ant and <code>ndk-build</code> but I'm trying to migrate the project completely to Gradle and CMake.</p>
  
  <p>In my <code>build.gradle</code> I have the following lines to invoke CMake:</p>
  
  <pre><code>externalNativeBuild {
      cmake {
          path "src/main/cpp/CMakeLists.txt"
      }
  }
  </code></pre>
  
  <p>Now how can I force CMake to print all compiler calls to the console before it makes them? Specifically, I want to see just how CMake runs the compiler and linker.</p>
  
  <p>I've already tried the following, all to no avail:</p>
  
  <p>1) In my <code>CMakeLists.txt</code> I have put the following line:</p>
  
  <pre><code>set(CMAKE_VERBOSE_MAKEFILE on)
  </code></pre>
  
  <p>Didn't have any effect.</p>
  
  <p>2) I have started the build like this:</p>
  
  <pre><code>./gradlew build --info
  </code></pre>
  
  <p>Gradle printed some stuff, but no compiler calls.</p>
  
  <p>3) And like this:</p>
  
  <pre><code>./gradlew build --debug
  </code></pre>
  
  <p>Gradle printed lots of stuff, but no compiler calls.</p>
  
  <p>So none of those three attempts did what I wanted which makes me wonder how can I see how CMake runs clang on my individual source files?</p>