Instead of relying on fragile and complex logic to decide if a compiler flag is available or not, use the check_c_compiler_flag() macro provided by the CMake standard library. This for example avoids using -fcf-protection on architectures that don't support this option. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit dd2d181755a6e642c0a8e3225ef5407fff49eb3a) When resolving the conflict from applying the patch, I also took the liberty of re-indenting the snippet correcly and fixing mismatching HAS_FCF_PROTECTION and HAS_FSTACK_PROTECTOR_STRONG variables (the conditionals used GCC_ prefix but the variables were definded without it). Signed-off-by: Jan Tojnar <jtojnar@gmail.com> |
||
|---|---|---|
| .. | ||
| msvc_conan_profiles | ||
| compilerFlags.cmake | ||
| compilerFlagsExiv2.cmake | ||
| config.h.cmake | ||
| Doxyfile.in | ||
| exiv2_uninstall.cmake | ||
| exiv2.pc.in | ||
| findDependencies.cmake | ||
| FindIconv.cmake | ||
| FindRegex.cmake | ||
| generateConfigFile.cmake | ||
| generateDoc.cmake | ||
| mainSetup.cmake | ||
| packaging.cmake | ||
| printSummary.cmake | ||