Skip to content

Commit

Permalink
gcc-10 error (with RVM): mark Ruby_INCLUE_DIRS as SYSTEM
Browse files Browse the repository at this point in the history
Avoid 

```
/home/julien/.conan/data/openstudio_ruby/2.7.2/nrel/testing/package/8c98c8e7c8941d8bf2c5b65aa3303761e4c9336c/include/ruby-2.7.0/ruby/backward/cxxanyargs.hpp: In function 'VALUE ruby::backward::cxxanyargs::rb_rescue(VALUE (*)(...), VALUE, VALUE (*)(...), VALUE)':
/home/julien/.conan/data/openstudio_ruby/2.7.2/nrel/testing/package/8c98c8e7c8941d8bf2c5b65aa3303761e4c9336c/include/ruby-2.7.0/ruby/backward/cxxanyargs.hpp:202:14: error: 'VALUE ruby::backward::cxxanyargs::rb_rescue(VALUE (*)(...), VALUE, VALUE (*)(...), VALUE)' is deprecated: Use of ANYARGS in this function is deprecated [-Werror=deprecated-declarations]
```
  • Loading branch information
jmarrec committed Feb 23, 2021
1 parent 6227f38 commit f691471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ProjectMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ macro(MAKE_SWIG_TARGET NAME SIMPLENAME KEY_I_FILE I_FILES PARENT_TARGET PARENT_S
set_target_properties(${swig_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ruby/")
set_target_properties(${swig_target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ruby/")
target_link_libraries(${swig_target} ${${PARENT_TARGET}_depends})
target_include_directories(${swig_target} PRIVATE ${RUBY_INCLUDE_DIRS})
target_include_directories(${swig_target} SYSTEM PRIVATE ${RUBY_INCLUDE_DIRS})
add_dependencies(${swig_target} ${PARENT_TARGET})

# QT-Separation-Move
Expand Down
4 changes: 2 additions & 2 deletions ruby/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ add_library( init_openstudio OBJECT
init_openstudio.cpp
RubyAPI.hpp
)
target_include_directories(init_openstudio PRIVATE ${RUBY_INCLUDE_DIRS})
target_include_directories(init_openstudio SYSTEM PRIVATE ${RUBY_INCLUDE_DIRS})

if(MSVC)
# TODO: JM 2019-01-04: @macumber it seems like all three targets use the same COMPILE_FLAGS,
Expand All @@ -39,7 +39,7 @@ add_library(
)
set_target_properties(openstudio_rb PROPERTIES PREFIX "")
set_target_properties(openstudio_rb PROPERTIES OUTPUT_NAME openstudio)
target_include_directories(openstudio_rb PRIVATE ${RUBY_INCLUDE_DIRS})
target_include_directories(openstudio_rb SYSTEM PRIVATE ${RUBY_INCLUDE_DIRS})

# change output directory so the openstudio.pdb file does not conflict between this target and the CLI
set_target_properties(openstudio_rb PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/ruby/")
Expand Down

0 comments on commit f691471

Please sign in to comment.