-1

I use cmake 3.7.2 to compile a c++ source file. I set CMAKE_ANDROID_STANDALONE_TOOLCHAIN=/my/ndk-toolchain accronding to official guide, but the default compiler is clang and clang++. I don't know how to set complier to gcc and g++.

nannanmath
  • 11
  • 5

1 Answers1

0

As far as I know, clang is the default compiler for NDK applications. Probably, the toolchain you are using has configured 'clang' as the compiler, but it should be the correct option.

You can check the readme file of the googlesource site.

goe
  • 2,272
  • 1
  • 19
  • 34
  • I find that in source code of cmake, if `clang` and `clang++` exist in toolchain/bin, the cxx compiler will be set as clang. That means clang is default compiler in cmake 3.7.2 for ndk toolchain. – nannanmath Feb 20 '17 at 10:43