diff --git a/cmake/shared_prologue.cmake b/cmake/shared_prologue.cmake index 5c46c9cf..2265af77 100644 --- a/cmake/shared_prologue.cmake +++ b/cmake/shared_prologue.cmake @@ -94,6 +94,17 @@ add_library(clap-wrapper-compile-options INTERFACE) add_library(clap-wrapper-compile-options-public INTERFACE) target_link_libraries(clap-wrapper-compile-options INTERFACE clap-wrapper-compile-options-public) +# The wrapper sources need C++17 - std::filesystem, if-initializers - and carry that requirement +# themselves rather than leaving it to whoever is building them. The top-level CMakeLists sets +# CMAKE_CXX_STANDARD, but only when it *is* the top level, so a project that reaches the wrapper +# through add_subdirectory got no floor at all and failed in clap_proxy.cpp and +# preset_discovery.cpp against a generator default older than 17 - Xcode's, for one, which is how +# this surfaced while following docs/ios.md. +# +# A floor, not a pin: a consumer building at 20 stays at 20. It only raises a build that was +# below 17, which was never a configuration this project supported. +target_compile_features(clap-wrapper-compile-options-public INTERFACE cxx_std_17) + # This is useful for debugging cmake link problems2 # target_compile_definitions(clap-wrapper-compile-options INTERFACE -DTHIS_BUILD_USED_CLAP_WRAPPER_COMPILE_OPTIONS=1) # target_compile_definitions(clap-wrapper-compile-options-public INTERFACE -DTHIS_BUILD_USED_CLAP_WRAPPER_COMPILE_OPTIONS_PUBLIC=1) diff --git a/docs/ios.md b/docs/ios.md index 733ae39e..4bad4c8f 100644 --- a/docs/ios.md +++ b/docs/ios.md @@ -254,6 +254,7 @@ still installed and still works normally in external hosts. | Host shows "Factory class ... is not linked" | Host target missing the entry source / impl library, or AU codes differ between host and appex | | Plugin appears on iPhone but not on iPad | Device family mismatch; both bundles must be `1,2` | | GUI stays empty | Plugin does not implement the `CLAP_WINDOW_API_UIKIT` window API | +| Errors in `clap_proxy.cpp` or `preset_discovery.cpp` about `std::filesystem` or `if` initializers | The project is building below C++17. The wrapper now carries a `cxx_std_17` floor, so this only appears against older wrapper versions; set `CMAKE_CXX_STANDARD` to 17 or higher in your own project | ## Current limitations