summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt
index a02faa22130..6224d9ac864 100644
--- a/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt
+++ b/llvm/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()
OpenPOWER on IntegriCloud