File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -192,14 +192,10 @@ target_compile_options(${target}
192192# '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
193193
194194include (Portability)
195- message ("${PROJECT_OS_FAMILY} " )
196195if ("${PROJECT_OS_FAMILY} " STREQUAL "macos" )
197- message ("PROJECT FAMILY IS MACOS" )
198196 if ("${CMAKE_C_COMPILER_ID} " STREQUAL "AppleClang" OR "${CMAKE_C_COMPILER_ID} " STREQUAL "AppleClang*" OR "${CMAKE_C_COMPILER_ID} " STREQUAL "Clang" )
199- message ("${CMAKE_C_COMPILER_ID} inside if clause" )
200197 target_compile_options (${target} PRIVATE "-fdeclspec" )
201198 endif ()
202- message ("After if for Ruby compiler bug fix on MacOSX" )
203199endif ()
204200
205201
Original file line number Diff line number Diff line change @@ -221,6 +221,17 @@ target_compile_options(${SWIG_MODULE_${target}_REAL_NAME}
221221 INTERFACE
222222)
223223
224+ # Fix Ruby MacOSX LLVM bug
225+ # '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
226+
227+ include (Portability)
228+ if ("${PROJECT_OS_FAMILY} " STREQUAL "macos" )
229+ if ("${CMAKE_C_COMPILER_ID} " STREQUAL "AppleClang" OR "${CMAKE_C_COMPILER_ID} " STREQUAL "AppleClang*" OR "${CMAKE_C_COMPILER_ID} " STREQUAL "Clang" )
230+ target_compile_options (${target} PRIVATE "-fdeclspec" )
231+ endif ()
232+ endif ()
233+
234+
224235#
225236# Linker options
226237#
You can’t perform that action at this time.
0 commit comments