CMake Toolchain Files and _GNU_SOURCE definition

A CMake toolchain file is defined by the user/project and given to the CMake call via CMAKE_TOOLCHAIN_FILE variable. It’s not provided by CMake.

That file usually contains global compiler settings, depending on the compiler in use and the target system. You can add that define to the compiler flags, or I guess using add_compile_definitions.