Fix conditional per-target flags for lexer
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/29768a72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/29768a72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/29768a72 Branch: refs/heads/adaptive-bloom-filters Commit: 29768a7297746606089c6b2ebca1a9bf44180614 Parents: 31e9e4c Author: Craig Chasseur <spoonbo...@gmail.com> Authored: Tue Jun 14 00:51:52 2016 -0700 Committer: Craig Chasseur <spoonbo...@gmail.com> Committed: Tue Jun 14 00:51:52 2016 -0700 ---------------------------------------------------------------------- parser/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/29768a72/parser/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index 9738c2c..2488d30 100644 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -374,12 +374,15 @@ set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/SqlParser_gen.cpp APPEND PROPERT include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-Wno-deprecated-register" COMPILER_HAS_WNO_DEPRECATED_REGISTER) if (COMPILER_HAS_WNO_DEPRECATED_REGISTER) - set_target_properties(quickstep_parser_SqlLexer PROPERTIES COMPILE_FLAGS "-Wno-deprecated-register") + set_property(TARGET quickstep_parser_SqlLexer APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-deprecated-register") endif() # GCC will make a warning for unsigned-signed comparisons which are inherent # in the lexer. For this, we turn off the sign compare. -set_target_properties(quickstep_parser_SqlLexer PROPERTIES COMPILE_FLAGS "-Wno-sign-compare") +CHECK_CXX_COMPILER_FLAG("-Wno-sign-compare" COMPILER_HAS_WNO_SIGN_COMPARE) +if (COMPILER_HAS_WNO_SIGN_COMPARE) + set_property(TARGET quickstep_parser_SqlLexer APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-sign-compare") +endif() add_subdirectory(tests)