compilation options for cmake (on windows) for ARM target system but when I run configure it's starting compiler tests:
CMake Error at D:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler "D:/Program Files/yagarto/bin/arm-none-eabi-gcc.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/merge/complex/build/CMakeFiles/CMakeTmp Run Build Command:D:/PROGRA~1/YAGART~1/bin/make.exe "cmTryCompileExec/fast" D:/PROGRA~1/YAGART~1/bin/make.exe -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build make.exe[1]: Entering directory `D:/merge/complex/build/CMakeFiles/CMakeTmp' "D:/Program Files/CMake 2.8/bin/cmake.exe" -E cmake_progress_report D:/merge/complex/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o "D:/Program Files/yagarto/bin/arm-none-eabi-gcc.exe" -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c D:/merge/complex/build/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec "D:/Program Files/yagarto/bin/arm-none-eabi-gcc.exe" "CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o" -o cmTryCompileExec -rdynamic arm-none-eabi-gcc.exe: error: unrecognized option '-rdynamic' make.exe[1]: *** [cmTryCompileExec] Error 1
Using Yagatdo 4.6.* cross-compilation toolchain
How can I skip this tests or fix -rdynamic error that I am getting?
At a minimum, using CMake requires a C compiler, that compiler's native build tools, and a CMake executable. CMake was written in C++, requires only a C++ compiler to build, and precompiled binaries are available for most systems.
Inspecting the Default Compiler. When CMake is invoked to read a configuration file, temporary files are generated, including a cache and a CMakeFiles directory containing information specific to the environment. CMake uses this information to select the most appropriate compiler for the project.
Compilers. CMake supports an extensive list of compilers, including: Apple Clang, Clang, GNU GCC, MSVC, Oracle Developer Studio, and Intel C++ Compiler.
You can set CMAKE_<LANG>_COMPILER_WORKS
to true to suppress further compiler checks for that language.
set(CMAKE_C_COMPILER_WORKS 1)
You can skip the compiler checks by adding NONE
to your project
call:
project(<projectname> NONE)
but this can have pretty far-reaching effects. For full details, run
cmake --help-command project
I'm not familiar with ARM, so this is probably not your best option here. I guess you'd be better to see if there's a way to fix the -rdynamic
flag.
It looks like this was identified as a bug which is effectively still unresolved. The comments in the bug report mention adding the following lines as a workaround (presumably before your project
call):
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With