aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <Marc-Antoine@Perennou.com> 2021-02-15 10:31:35 +0100
committerAvatar Heiko Becker <heirecka@exherbo.org> 2021-06-16 20:46:02 +0000
commit5e91129f891188bce2a266e5afc739d59b72e0fc (patch)
treefe190d6c308f956c5bd3893ee3bc7d1f9d995c8f
parent0a26d11172817958eb3b5180aa00b714d3744db4 (diff)
downloadpaludis-5e91129f891188bce2a266e5afc739d59b72e0fc.tar.gz
paludis-5e91129f891188bce2a266e5afc739d59b72e0fc.tar.xz
ruby: fix build with ruby 3.0 and clangHEADmaster
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r--cmake/modules/PaludisCompileFlags.cmake2
-rw-r--r--ruby/CMakeLists.txt6
2 files changed, 8 insertions, 0 deletions
diff --git a/cmake/modules/PaludisCompileFlags.cmake b/cmake/modules/PaludisCompileFlags.cmake
index 7db849f37..2d3dae17f 100644
--- a/cmake/modules/PaludisCompileFlags.cmake
+++ b/cmake/modules/PaludisCompileFlags.cmake
@@ -76,3 +76,5 @@ append_if(CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden"
check_cxx_compiler_flag("-Werror -fno-strict-aliasing" CXX_SUPPORTS_FNO_STRICT_ALIASING)
check_cxx_compiler_flag("-Werror -g0" CXX_SUPPORTS_G0)
+check_cxx_compiler_flag("-Werror -fdeclspec" CXX_SUPPORTS_FDECLSPEC)
+
diff --git a/ruby/CMakeLists.txt b/ruby/CMakeLists.txt
index 1bcbed1a1..a200fe50d 100644
--- a/ruby/CMakeLists.txt
+++ b/ruby/CMakeLists.txt
@@ -28,6 +28,9 @@ if(ENABLE_RUBY)
target_include_directories(libpaludisruby SYSTEM
PRIVATE
${RUBY_INCLUDE_DIRS})
+ if(CXX_SUPPORTS_FDECLSPEC)
+ target_compile_options(libpaludisruby PRIVATE -fdeclspec)
+ endif()
target_link_libraries(libpaludisruby
PRIVATE
libpaludis
@@ -40,6 +43,9 @@ if(ENABLE_RUBY)
target_include_directories(Paludis SYSTEM
PRIVATE
${RUBY_INCLUDE_DIRS})
+ if(CXX_SUPPORTS_FDECLSPEC)
+ target_compile_options(Paludis PRIVATE -fdeclspec)
+ endif()
target_link_libraries(Paludis
PRIVATE
libpaludisruby)