susumu.yata
null+****@clear*****
Wed Oct 8 13:19:14 JST 2014
susumu.yata 2014-10-08 13:19:14 +0900 (Wed, 08 Oct 2014) New Revision: 9707d01003b0d6d90ea3e2f1f0152ec15a63c3d3 https://github.com/mroonga/mroonga/commit/9707d01003b0d6d90ea3e2f1f0152ec15a63c3d3 Message: cmake: fix a bug that compiler flag checks are skipped GitHub: fixes #21 Modified files: CMakeLists.txt Modified: CMakeLists.txt (+10 -4) =================================================================== --- CMakeLists.txt 2014-10-08 11:41:09 +0900 (8f00790) +++ CMakeLists.txt 2014-10-08 13:19:14 +0900 (d917f8d) @@ -81,15 +81,21 @@ set(MRN_C_COMPILE_FLAGS "") set(MRN_CXX_COMPILE_FLAGS "") macro(mrn_check_cflag flag) - check_c_compiler_flag(${flag} is_available) - if(${is_available}) + string(REGEX REPLACE "[-=]" "_" temporary_variable_name ${flag}) + string(TOUPPER "${temporary_variable_name}" temporary_variable_name) + set(temporary_variable_name "CFLAG${temporary_variable_name}") + check_c_compiler_flag(${flag} ${temporary_variable_name}) + if(${temporary_variable_name}) set(MRN_C_COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS} ${flag}") endif() endmacro() macro(mrn_check_cxxflag flag) - check_cxx_compiler_flag(${flag} is_available) - if(${is_available}) + string(REGEX REPLACE "[-=]" "_" temporary_variable_name ${flag}) + string(TOUPPER "${temporary_variable_name}" temporary_variable_name) + set(temporary_variable_name "CXXFLAG${temporary_variable_name}") + check_cxx_compiler_flag(${flag} ${temporary_variable_name}) + if(${temporary_variable_name}) set(MRN_CXX_COMPILE_FLAGS "${MRN_CXX_COMPILE_FLAGS} ${flag}") endif() endmacro() -------------- next part -------------- HTML����������������������������...Télécharger