Skip to content

Commit

Permalink
CPP 20 flags
Browse files Browse the repository at this point in the history
Sigh. CPP20 has .u8string and .string not compatible. Apply the
flag in a few places we were missing to fix this with the
appropriate generator expression
  • Loading branch information
baconpaul committed Aug 19, 2024
1 parent 4b1972d commit f17f5f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ endif()
if (DEFINED CLAP_WRAPPER_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${CLAP_WRAPPER_CXX_STANDARD})
else()
set(CMAKE_CXX_STANDARD 17)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
elseif ( ${CMAKE_CXX_STANDARD} VERSION_LESS 17)
message(WARNING "CMAKE_CXX_STANDARD of ${CMAKE_CXX_STANDARD} < 17 not well tested")
endif()
endif()
message(STATUS "clap-wrapper: Building with C++ standard ${CMAKE_CXX_STANDARD}")

Expand Down
3 changes: 3 additions & 0 deletions cmake/shared_prologue.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ endif()

# Compiler options for warnings, errors etc
add_library(clap-wrapper-compile-options INTERFACE)

# This is useful for debugging cmake link problems
# target_compile_definitions(clap-wrapper-compile-options INTERFACE -DTHIS_BUILD_USED_CLAP_WRAPPER_COMPILE_OPTIONS=1)
add_library(clap-wrapper-sanitizer-options INTERFACE)

target_compile_options(clap-wrapper-compile-options INTERFACE -D${CLAP_WRAPPER_PLATFORM}=1 -DCLAP_WRAPPER_VERSION="${CLAP_WRAPPER_VERSION}")
Expand Down
1 change: 1 addition & 0 deletions cmake/wrap_auv2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function(target_add_auv2_wrapper)
set(bhsc "${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/detail/auv2/build-helper/")
add_executable(${bhtg} ${bhsc}/build-helper.cpp)
target_link_libraries(${bhtg} PRIVATE
clap-wrapper-compile-options
clap-wrapper-shared-detail
macos_filesystem_support
"-framework Foundation"
Expand Down
3 changes: 1 addition & 2 deletions cmake/wrap_standalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ function(target_add_standalone_wrapper)
)
target_link_libraries(${salib}
PUBLIC
clap-wrapper-compile-options
clap-wrapper-shared-detail
base-sdk-rtmidi
base-sdk-rtaudio
)
target_link_libraries(${salib} PRIVATE clap-wrapper-compile-options)

if (APPLE)
target_sources(${salib} PRIVATE)
Expand Down Expand Up @@ -185,7 +185,6 @@ function(target_add_standalone_wrapper)
)

target_link_libraries(${SA_TARGET} PRIVATE
clap-wrapper-compile-options
${salib}
)
endfunction(target_add_standalone_wrapper)

0 comments on commit f17f5f0

Please sign in to comment.