title: CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
body: <p>When I build an android project which includes ndk code. I got the following error:</p>
  
  <pre><code>Build command failed. 
  Error while executing process /home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app -B/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/.externalNativeBuild/cmake/debug/armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=/home/gongzelong/Android/Sdk/ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/build/intermediates/cmake/debug/obj/armeabi -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/ninja -DCMAKE_TOOLCHAIN_FILE=/home/gongzelong/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-14 -DCMAKE_CXX_FLAGS=} 
  /media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo 
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage 
  -- Configuring incomplete, errors occurred! 
  Build command failed. 
  Error while executing process /home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app -B/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/.externalNativeBuild/cmake/release/armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=/home/gongzelong/Android/Sdk/ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/build/intermediates/cmake/release/obj/armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/ninja -DCMAKE_TOOLCHAIN_FILE=/home/gongzelong/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-14 -DCMAKE_CXX_FLAGS=} 
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage 
  -- Configuring incomplete, errors occurred! 
  </code></pre>
  
  <p>I try to locate the cause.</p>
  
  <p>I found the following:</p>
  
  <pre><code>gongzelong@gongzelong:~/Android/Sdk/cmake/3.6.4111459/bin$ cmake -version
  CMake Error: Could not find CMAKE_ROOT !!!
  CMake has most likely not been installed correctly.
  Modules directory not found in
  /home/gongzelong/Android/Sdk/cmake/3.6.4111459/share/cmake-3.5
  cmake version 3.5.1
  
  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  </code></pre>
  
  <p>It seems that the cmake has separately versions 3.5 and 3.6.</p>
  
  <p>Could anyone point out how to fix it and build the android project successfully?</p>
  
  <p>Update:</p>
  
  <p>I delete the cmake and install it again in android studio sdk manager.</p>
  
  <p>I still got this:</p>
  
  <pre><code>null    
  Build command failed.   
  Error while executing process /home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app -B/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/.externalNativeBuild/cmake/debug/armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=/home/gongzelong/Android/Sdk/ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/build/intermediates/cmake/debug/obj/armeabi -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/ninja -DCMAKE_TOOLCHAIN_FILE=/home/gongzelong/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-14 -DCMAKE_CXX_FLAGS=}    
  /media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo    
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage   
  -- Configuring incomplete, errors occurred! 
  Build command failed.   
  Error while executing process /home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app -B/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/.externalNativeBuild/cmake/release/armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=/home/gongzelong/Android/Sdk/ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/media/gongzelong/TOSHIBA/Code/Code/ImageLoaderEncapsulation/ImageLoader/ImageLoaderDemo/app/build/intermediates/cmake/release/obj/armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/home/gongzelong/Android/Sdk/cmake/3.6.4111459/bin/ninja -DCMAKE_TOOLCHAIN_FILE=/home/gongzelong/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-14 -DCMAKE_CXX_FLAGS=}  
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage   
  -- Configuring incomplete, errors occurred! 
  </code></pre>