I've been doing C++ for a long long time, but I come from the land of Windows.
I've been handed a project that uses CMake. I've googled around trying to learn it.
I run cmake . I assume it always looks for CMakeLists.txt and generates makefiles.
This creates a bunch more cmake files and make files. I was then instructed to run make package. I assume package is just a target name that could be anything.
I then get errors:
c++: error: unrecognized command line option ‘-mthumb-interwork’ c++: error: unrecognized command line option ‘-mfloat-abi=hard’ c++: error: unrecognized command line option ‘-mfpu=neon’ I think those are due to the fact that I am trying to compile for a different architecture then the one I am on. I assume all the cmake files would set that up correctly for me. I also assume that nothing there is proprietary.
I see the line in the CMakeLists.txt
SET(CMAKE_CXX_FLAGS "-march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 -std=c++11 -O3") If I look at the official cmake documentation, it says, and I quote "Flags for all build types." ....Not very helpful
I am thinking it isn't using the correct compiler, but I also don't see where in the CMakeLists.txt the compiler is specified at all.
The question is: Why would these flags be unrecognized?
make package VERBOSE=1? That should show you the command line calls. You may have to do something likeCXX=<path-to-gcc-arm-cross-compiler> cmake <remaining-args>