From 694ad836c765b2274530b6548ca6c879a12ffabe Mon Sep 17 00:00:00 2001 From: anatol Date: Thu, 23 May 2024 14:20:53 +0300 Subject: [PATCH] WIP --- CMakeLists.txt | 7 +++++-- utility/CMakeLists.txt | 2 +- wallet/client/CMakeLists.txt | 4 ++-- wallet/client/extensions/broadcast_gateway/CMakeLists.txt | 2 +- wallet/client/extensions/dex_board/CMakeLists.txt | 2 +- wallet/client/extensions/export/CMakeLists.txt | 2 +- wallet/client/extensions/news_channels/CMakeLists.txt | 2 +- wallet/client/extensions/notifications/CMakeLists.txt | 2 +- wallet/client/extensions/offers_board/CMakeLists.txt | 2 +- wallet/core/CMakeLists.txt | 2 +- 10 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9897d35a7..a421628c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,14 +122,17 @@ include(AddTest) option(BEAM_CPP_20_STANDARD "Build wallet with C++20 standard" OFF) message("BEAM_CPP_20_STANDARD is ${BEAM_CPP_20_STANDARD}") + if (BEAM_CPP_20_STANDARD) set(CMAKE_CXX_STANDARD 20) - target_compile_features(beam INTERFACE cxx_std_20) + set(BEAM_INTERFACE_STANDARD, cxx_std_20) else() set(CMAKE_CXX_STANDARD 17) - target_compile_features(beam INTERFACE cxx_std_17) + set(BEAM_INTERFACE_STANDARD, cxx_std_17) endif() +target_compile_features(beam INTERFACE ${BEAM_INTERFACE_STANDARD}) + set(CMAKE_CXX_STANDARD_REQUIRED ON) set(BEAM_USE_AVX FALSE) diff --git a/utility/CMakeLists.txt b/utility/CMakeLists.txt index 74c68c538..595a597ff 100644 --- a/utility/CMakeLists.txt +++ b/utility/CMakeLists.txt @@ -54,7 +54,7 @@ if (MSVC) endif() add_library(utility STATIC ${UTILITY_SRC} ${IO_SRC}) -target_compile_features(utility PUBLIC cxx_std_20) +target_compile_features(utility PUBLIC ${BEAM_INTERFACE_STANDARD}) if (NOT EMSCRIPTEN) add_library(cli STATIC ${CLI_SRC}) diff --git a/wallet/client/CMakeLists.txt b/wallet/client/CMakeLists.txt index f6d5d7e32..0982ece8d 100644 --- a/wallet/client/CMakeLists.txt +++ b/wallet/client/CMakeLists.txt @@ -33,8 +33,8 @@ target_link_libraries(wallet_client_no_ipfs PRIVATE http ) -target_compile_features(wallet_client PUBLIC cxx_std_20) -target_compile_features(wallet_client_no_ipfs PUBLIC cxx_std_20) +target_compile_features(wallet_client PUBLIC ${BEAM_INTERFACE_STANDARD}) +target_compile_features(wallet_client_no_ipfs PUBLIC ${BEAM_INTERFACE_STANDARD}) add_subdirectory(extensions) diff --git a/wallet/client/extensions/broadcast_gateway/CMakeLists.txt b/wallet/client/extensions/broadcast_gateway/CMakeLists.txt index 34ee8ba06..0e9e16dcb 100644 --- a/wallet/client/extensions/broadcast_gateway/CMakeLists.txt +++ b/wallet/client/extensions/broadcast_gateway/CMakeLists.txt @@ -18,5 +18,5 @@ target_link_libraries(broadcast_gateway wallet_core ) -target_compile_features(broadcast_gateway PUBLIC cxx_std_20) +target_compile_features(broadcast_gateway PUBLIC ${BEAM_INTERFACE_STANDARD}) diff --git a/wallet/client/extensions/dex_board/CMakeLists.txt b/wallet/client/extensions/dex_board/CMakeLists.txt index c9a69d59c..c1b1a4ab2 100644 --- a/wallet/client/extensions/dex_board/CMakeLists.txt +++ b/wallet/client/extensions/dex_board/CMakeLists.txt @@ -16,5 +16,5 @@ target_link_libraries(dex_board wallet ) -target_compile_features(dex_board PUBLIC cxx_std_20) +target_compile_features(dex_board PUBLIC ${BEAM_INTERFACE_STANDARD}) diff --git a/wallet/client/extensions/export/CMakeLists.txt b/wallet/client/extensions/export/CMakeLists.txt index cc3f44138..7ac4e22d1 100644 --- a/wallet/client/extensions/export/CMakeLists.txt +++ b/wallet/client/extensions/export/CMakeLists.txt @@ -21,5 +21,5 @@ if(BEAM_ATOMIC_SWAP_SUPPORT) target_compile_definitions(export PUBLIC BEAM_ATOMIC_SWAP_SUPPORT) endif() -target_compile_features(export PUBLIC cxx_std_20) +target_compile_features(export PUBLIC ${BEAM_INTERFACE_STANDARD}) diff --git a/wallet/client/extensions/news_channels/CMakeLists.txt b/wallet/client/extensions/news_channels/CMakeLists.txt index 3751390ce..f11d3edd3 100644 --- a/wallet/client/extensions/news_channels/CMakeLists.txt +++ b/wallet/client/extensions/news_channels/CMakeLists.txt @@ -24,5 +24,5 @@ target_link_libraries(news_channels wallet_core ) -target_compile_features(news_channels PUBLIC cxx_std_20) +target_compile_features(news_channels PUBLIC ${BEAM_INTERFACE_STANDARD}) diff --git a/wallet/client/extensions/notifications/CMakeLists.txt b/wallet/client/extensions/notifications/CMakeLists.txt index f19e2849d..2bd1fa397 100644 --- a/wallet/client/extensions/notifications/CMakeLists.txt +++ b/wallet/client/extensions/notifications/CMakeLists.txt @@ -17,5 +17,5 @@ target_link_libraries(notifications wallet_core ) -target_compile_features(notifications PUBLIC cxx_std_20) +target_compile_features(notifications PUBLIC ${BEAM_INTERFACE_STANDARD}) diff --git a/wallet/client/extensions/offers_board/CMakeLists.txt b/wallet/client/extensions/offers_board/CMakeLists.txt index 5faa01ab5..239801bbe 100644 --- a/wallet/client/extensions/offers_board/CMakeLists.txt +++ b/wallet/client/extensions/offers_board/CMakeLists.txt @@ -22,5 +22,5 @@ target_link_libraries(swap_offers_board wallet ) -target_compile_features(swap_offers_board PUBLIC cxx_std_20) +target_compile_features(swap_offers_board PUBLIC ${BEAM_INTERFACE_STANDARD}) diff --git a/wallet/core/CMakeLists.txt b/wallet/core/CMakeLists.txt index 6c14251af..637230d8e 100644 --- a/wallet/core/CMakeLists.txt +++ b/wallet/core/CMakeLists.txt @@ -46,7 +46,7 @@ target_link_libraries(wallet_core sqlite ) -target_compile_features(wallet_core PUBLIC cxx_std_20) +target_compile_features(wallet_core PUBLIC ${BEAM_INTERFACE_STANDARD}) if (NOT ANDROID AND NOT IOS)