diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2021-10-21 13:45:54 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-10-27 14:32:39 -0400 |
commit | ac9b554b9b4c546fc009037b8e3586f2e052f115 (patch) | |
tree | f014b154deefeedfb33549888e93216731f76d7f | |
parent | ff13b8cef989e8711a7c7b4e0679673682f61bf3 (diff) |
Soapy: Make sure target uses expected C++ standard
This is a guess, but it seems SoapySDR was exporting its C++ standard (C++11).
This led to problems when using C++17 features in gr-soapy
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
(cherry picked from commit 79d7e06e40513f2f15d904d5d7dbd323aadc8767)
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-soapy/lib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-soapy/python/soapy/bindings/CMakeLists.txt | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index feff39c34f..8d8f7a11ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,8 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD 17) set(CMAKE_C_STANDARD 11) +set(GR_CXX_VERSION_FEATURE cxx_std_${CMAKE_CXX_STANDARD}) + ######################################################################## # Environment setup ######################################################################## diff --git a/gr-soapy/lib/CMakeLists.txt b/gr-soapy/lib/CMakeLists.txt index c7667a2a59..fd767ab43f 100644 --- a/gr-soapy/lib/CMakeLists.txt +++ b/gr-soapy/lib/CMakeLists.txt @@ -15,6 +15,8 @@ add_library(gnuradio-soapy sink_impl.cc ) +target_compile_features(gnuradio-soapy PRIVATE ${GR_CXX_VERSION_FEATURE}) + target_link_libraries(gnuradio-soapy PUBLIC gnuradio-runtime ${SoapySDR_LIBRARIES} diff --git a/gr-soapy/python/soapy/bindings/CMakeLists.txt b/gr-soapy/python/soapy/bindings/CMakeLists.txt index 6ba329bfa1..ad4d9c122e 100644 --- a/gr-soapy/python/soapy/bindings/CMakeLists.txt +++ b/gr-soapy/python/soapy/bindings/CMakeLists.txt @@ -27,4 +27,6 @@ GR_PYBIND_MAKE_CHECK_HASH(soapy gr::soapy "${soapy_python_files}") +target_compile_features(soapy_python PRIVATE ${GR_CXX_VERSION_FEATURE}) + install(TARGETS soapy_python DESTINATION ${GR_PYTHON_DIR}/gnuradio/soapy COMPONENT pythonapi) |