Navigation Menu

Skip to content

Commit

Permalink
cmake mruby: disable some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 17, 2015
1 parent 85d9406 commit 40f20ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Expand Up @@ -182,7 +182,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX)
check_build_flag("-Wdisabled-optimization")
check_build_flag("-Wfloat-equal")
check_build_flag("-Wpointer-arith")
check_cflag("-Wdeclaration-after-statement")
check_cflag("-Wbad-function-cast")
if(NOT CMAKE_COMPILER_IS_CLANGCXX)
check_build_flag("-Wcast-align")
Expand Down
14 changes: 11 additions & 3 deletions vendor/mruby/CMakeLists.txt
Expand Up @@ -67,11 +67,19 @@ if(GRN_WITH_MRUBY)
${MRUBY_BUILT_SOURCES}
)
add_library(mruby STATIC ${MRUBY_ALL_SOURCES})
set_source_files_properties(${MRUBY_ALL_SOURCES}
PROPERTIES
COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS}")
set_target_properties(
mruby
PROPERTIES
POSITION_INDEPENDENT_CODE ON)

set(MRUBY_C_COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS}")
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANGCC)
set(MRUBY_C_COMPILE_FLAGS
"${MRUBY_C_COMPILE_FLAGS} -Wno-float-equal")
set(MRUBY_C_COMPILE_FLAGS
"${MRUBY_C_COMPILE_FLAGS} -Wno-bad-function-cast")
endif()
set_source_files_properties(${MRUBY_ALL_SOURCES}
PROPERTIES
COMPILE_FLAGS "${MRUBY_C_COMPILE_FLAGS}")
endif()

0 comments on commit 40f20ee

Please sign in to comment.