projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally.
[oota-llvm.git]
/
examples
/
Kaleidoscope
/
Chapter2
/
CMakeLists.txt
diff --git
a/examples/Kaleidoscope/Chapter2/CMakeLists.txt
b/examples/Kaleidoscope/Chapter2/CMakeLists.txt
index a02faa221304adfdd4084eb52da09e4cd6203aa0..6224d9ac86406379480b255d917c8896d4786a31 100644
(file)
--- 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
)
add_kaleidoscope_chapter(Kaleidoscope-Ch2
toy.cpp
)
+
+if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
+ target_compile_options(Kaleidoscope-Ch2 PRIVATE
+ -Wno-unused-private-field
+ )
+endif()