From: NAKAMURA Takumi Date: Wed, 19 Aug 2015 22:55:16 +0000 (+0000) Subject: [CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c8ad803340edbbcf39cc4a40e5163ad0b71cb25;p=oota-llvm.git [CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245516 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/examples/Kaleidoscope/Chapter2/CMakeLists.txt b/examples/Kaleidoscope/Chapter2/CMakeLists.txt index a02faa22130..6224d9ac864 100644 --- a/examples/Kaleidoscope/Chapter2/CMakeLists.txt +++ b/examples/Kaleidoscope/Chapter2/CMakeLists.txt @@ -1,5 +1,9 @@ -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field") - add_kaleidoscope_chapter(Kaleidoscope-Ch2 toy.cpp ) + +if(LLVM_COMPILER_IS_GCC_COMPATIBLE) + target_compile_options(Kaleidoscope-Ch2 PRIVATE + -Wno-unused-private-field + ) +endif()