#3707·SFML

Allow SFML to compile with exceptions disabled

Author: JoshuaVandaeleCreated Apr 23, 2026Updated Apr 23, 2026
Labelsfeature

Prerequisite Checklist

Describe your feature request here

Certain libraries such as Qt and PugiXML have a PUGIXML_NO_EXCEPTIONS and QT_NO_EXCEPTIONS compile-time flag respectively, to allow their library to be compiled with the -fno-exceptions flag. I would like to see the same thing for SFML, with a SFML_NO_EXCEPTIONS flag.

Use Cases

I would like to be able to compile my application statically with SFML with exceptions disabled, without having to fall back to dirty CMake tricks to only allow exceptions for SFML.

API Example

cmake
set(SFML_NO_EXCEPTIONS ON CACHE BOOL "" FORCE)

add_subdirectory(SFML)