summaryrefslogtreecommitdiff
path: root/examples/Kaleidoscope
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2015-08-19 22:55:16 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2015-08-19 22:55:16 +0000
commit3c8ad803340edbbcf39cc4a40e5163ad0b71cb25 (patch)
treeef6d7acb258ed7217f149fecaebf0b4ac91d89cd /examples/Kaleidoscope
parent3b7c3d3fe900139560a98a94e03934e5471b99a6 (diff)
[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
Diffstat (limited to 'examples/Kaleidoscope')
-rw-r--r--examples/Kaleidoscope/Chapter2/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
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()