From c88930814704caba563bff34d06dde321a04c4ba Mon Sep 17 00:00:00 2001 From: Mark Callow <2244683+MarkCallow@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:49:03 +0900 Subject: [PATCH] Specify c++ standard to use for building libktx. (#806) Avoid inadvertent compilation with a later standard when included in another project. Later standards may raise warnings or even errors on the library code. Fixes #774 and #656. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4a9d9add9..454c0f04b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -470,6 +470,9 @@ macro(common_libktx_settings target enable_write library_type) VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES" + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED YES + ) if(IOS) set_target_properties(${target} PROPERTIES