I got the following errors when CMake tests my compilers.  The problem is that it seems CMake is checking /usr/bin/gcc, instead of the /usr/bin/armv7a-cros-linux-gnueabi-gcc it should have checked.<br><br>I manually tried /usr/bin/armv7a-cros-linux-gnueabi-gcc, and it compiles fine, and manually tried /usr/bin/gcc, it failed with the same errors as below.<br>
<br>So why CMake identified the correct compiler (armv7a-cros-linux-gnueabi-gcc), but when it checked the compiler (gcc), it used the wrong one?<br><br>Thanks in advance for any help.<br><br>- Mo<br><br>---------------------------------------------------------------------------------------------------------<br>
below is the error messages.<br>---------------------------------------------------------------------------------------------------------<br><br>-- The C compiler identification is unknown<br>-- The CXX compiler identification is unknown<br>
-- Check for working C compiler: /usr/bin/armv7a-cros-linux-gnueabi-gcc<br>-- Check for working C compiler: /usr/bin/armv7a-cros-linux-gnueabi-gcc -- broken<br>CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):<br>
  The C compiler &quot;/usr/bin/armv7a-cros-linux-gnueabi-gcc&quot; is not able to<br>  compile a simple test program.<br><br>  It fails with the following output:<br><br>   Change Dir: /build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp<br>
<br><br><br>  Run Build Command:/usr/bin/gmake &quot;cmTryCompileExec/fast&quot;<br><br>  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make<br>  CMakeFiles/cmTryCompileExec.dir/build<br><br>  gmake[1]: Entering directory<br>
  `/build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp&#39;<br><br><br>  /usr/bin/cmake -E cmake_progress_report<br>  /build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp/CMakeFiles<br>
  1<br><br>  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o<br><br>  /usr/bin/gcc -O2 -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon<br>  -mfloat-abi=softfp -I/build/arm-generic/usr/include/<br>  -I/build/arm-generic/include/ -o<br>
  CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c<br>  /build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp/testCCompiler.c<br><br>