build: CMake API parameter values handling and documentation improved

Relates to #581
This commit is contained in:
Mateusz Pusz committed 2024-06-05 08:27:48 +02:00
1 parent 760d48502d
commit 2876ae1ebd
3 files changed
+9 -12

No files matched your search

+3 -5
View File
@@ -85,7 +85,7 @@ check_cxx_feature_supported(__cpp_explicit_this_parameter ${projectPrefix}EXPLIC
# validate settings
if(NOT ${projectPrefix}API_FREESTANDING
AND ${projectPrefix}API_STD_FORMAT STREQUAL "TRUE"
AND "${projectPrefix}API_STD_FORMAT"
AND NOT
(${projectPrefix}LIB_FORMAT_SUPPORTED
# libc++ has a basic supports for std::format but does not set __cpp_lib_format
@@ -96,13 +96,11 @@ if(NOT ${projectPrefix}API_FREESTANDING
message(FATAL_ERROR "`std::format` enabled but not supported")
endif()
if(${projectPrefix}API_STRING_VIEW_RET STREQUAL "TRUE" AND NOT
${projectPrefix}STATIC_CONSTEXPR_VARS_IN_CONSTEXPR_FUNCTIONS
)
if("${projectPrefix}API_STRING_VIEW_RET" AND NOT ${projectPrefix}STATIC_CONSTEXPR_VARS_IN_CONSTEXPR_FUNCTIONS)
message(FATAL_ERROR "`std::string_view` returns enabled but not supported")
endif()
if(${projectPrefix}API_NO_CRTP STREQUAL "TRUE" AND NOT ${projectPrefix}EXPLICIT_THIS_PARAMETER_SUPPORTED)
if("${projectPrefix}API_NO_CRTP" AND NOT ${projectPrefix}EXPLICIT_THIS_PARAMETER_SUPPORTED)
message(FATAL_ERROR "`NO_CRTP` mode enabled but explicit `this` parameter is not supported")
endif()