summaryrefslogtreecommitdiff
path: root/configurecompiler.cmake
diff options
context:
space:
mode:
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>2019-05-30 08:35:37 (GMT)
committerJan Vorlicek <janvorli@microsoft.com>2019-05-30 08:35:37 (GMT)
commit41832cedbb2d46362239d2b272964a39ca37cd89 (patch)
treebba988e78374456f47a8803c112d4b017980ecae /configurecompiler.cmake
parentd4fadf03b9964ba9a1bf96f5a2136c2c8f4f38fe (diff)
downloadcoreclr-41832cedbb2d46362239d2b272964a39ca37cd89.zip
coreclr-41832cedbb2d46362239d2b272964a39ca37cd89.tar.gz
coreclr-41832cedbb2d46362239d2b272964a39ca37cd89.tar.bz2
Frkaya/gcc fix 052919 (#24845)
* fix compilation with gcc7.x In file included from src/inc/sstring.h:1029:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/inc/corpriv.h:21, from src/md/compiler/stdafx.h:20, from src/md/compiler/mdutil.cpp:12: src/inc/sstring.inl: In member function ‘const WCHAR* SString::GetUnicode() const’: src/inc/sstring.inl:650:5: error: nonnull argument ‘this’ compared to NULL [-Werror=nonnull-compare] if (this == NULL) ^~ add version check * Use the abstracted version of __nodebug__ * cc1: warning: command line option ‘-fpermissive’ is valid for C++/ObjC++ but not for C
Diffstat (limited to 'configurecompiler.cmake')
-rw-r--r--configurecompiler.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/configurecompiler.cmake b/configurecompiler.cmake
index 5b6d767..0ad08eb 100644
--- a/configurecompiler.cmake
+++ b/configurecompiler.cmake
@@ -509,6 +509,9 @@ if (CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-Wno-unused-but-set-variable)
add_compile_options(-fms-extensions)
add_compile_options(-Wno-unknown-pragmas)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
+ add_compile_options(-Wno-nonnull-compare)
+ endif()
if (COMPILER_SUPPORTS_F_ALIGNED_NEW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -faligned-new")
endif()