[llvm] r245516 - [CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 15:55:16 PDT 2015
Author: chapuni
Date: Wed Aug 19 17:55:16 2015
New Revision: 245516
URL: http://llvm.org/viewvc/llvm-project?rev=245516&view=rev
Log:
[CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally.
Modified:
llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt
Modified: llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt?rev=245516&r1=245515&r2=245516&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt Wed Aug 19 17:55:16 2015
@@ -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()
More information about the llvm-commits
mailing list