CMake cross-compiling: C flags from toolchain file ignored

I’ve found a temporary solution by replacing the line

SET(CMAKE_C_FLAGS "-std=gnu99")

by

SET(CMAKE_C_FLAGS "-std=gnu99" CACHE STRING "" FORCE)

Leave a Comment