Skip to content

C,CXX: Compile when possible with explicit language flag

I placed the _CMAKE_COMPILE_AS_C_FLAG and _CMAKE_COMPILE_AS_CXX_FLAG as the first parameter to compiler so that projects that are already injecting -x ... flags for certain files will have current behavior maintained.

Though if we want to be cautious I can add a policy.

Fixes: #14516 (closed), #20716 (closed)

Edited by Robert Maynard

Merge request reports