From e9e25d52bc35ce81b86692396090253faa2f32c4 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 22 Jun 2023 11:01:13 -0600 Subject: [PATCH] Loosen restrictions on unrecognized compilers A core tenet of CMake is the idea that you can use any valid C++ compiler. By enumerating all supported compilers and emitting and hard error when an unrecognized compiler is detected, we are violating that tenet. Relaxing this message from a fatal error to merely a warning continues to communicate to users that their build may not succeed but it leaves the door open for the build to potential succeed if the compiler meets all of our requirements. --- cmake/Config.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 2ce5ac46d..48bf1d03d 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -131,6 +131,5 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) set(SFML_COMPILER_GCC_W64 1) endif() else() - message(FATAL_ERROR "Unsupported compiler") - return() + message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}. Use at your own risk.") endif()