[CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 19 Aug 2015 22:55:16 +0000 (22:55 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 19 Aug 2015 22:55:16 +0000 (22:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245516 91177308-0d34-0410-b5e6-96231b3b80d8

examples/Kaleidoscope/Chapter2/CMakeLists.txt

index a02faa2..6224d9a 100644 (file)
@@ -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()