Is it possible to use target_compile_options() only for C ++ files? I would like to use it for a purpose that is used as a dependency for other applications so that the library can distribute its compiler flags for these applications. However, there are certain flags, such as -std=c++14 , which lead to a build failure if they are used with C or ObjC files.
I read that instead of CXX_FLAGS I only need to add these flags to C ++ files, however it will not (automatically) propagate through the cmake package system.
source share