summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-02-06 04:31:14 -0800
committerJan Vorlicek <janvorli@microsoft.com>2015-02-06 04:31:14 -0800
commit2646f6c12a46f859ba35fafa2a42576741443eb3 (patch)
tree5dadc2374fe0e0de9f70bd22828b270bcfc8248a /src/CMakeLists.txt
parent89d4ba21430c0be10b5fb8287d8fca6f8a941c5e (diff)
downloadcoreclr-2646f6c12a46f859ba35fafa2a42576741443eb3.tar.gz
coreclr-2646f6c12a46f859ba35fafa2a42576741443eb3.tar.bz2
coreclr-2646f6c12a46f859ba35fafa2a42576741443eb3.zip
Fix several warnings in Linux build
1) Usage of partially uninitialized variable when the compiler didn't know the condition is always true. This condition was calling a VolatileRead and only the VolatileRead actually matters so that right PDB annotation is generated and not optimized out in debug optimized builds. So I've removed the if. 2) Usage of nostdinc++ option as a general option - it complained when building C files 3) Usage of an unknown warning disabling compiler option with clang 3.5. The option was needed for clang 3.5.1 and later. 4) Usage of partially uninitialized variable in daccess.cpp - there is a code path that the compiler can see that doesn't initialize the status variable. 5) Empty body of a for loop warning in one or two PAL tests. [tfs-changeset: 1411579]
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 35914f2f10..2822facb71 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,8 +14,10 @@ if(WIN32)
enable_language(ASM_MASM)
else(WIN32)
enable_language(ASM)
-# This prevents inclusion of standard compiler headers
-add_compile_options(-nostdinc -nostdinc++)
+# This prevents inclusion of standard C compiler headers
+add_compile_options(-nostdinc)
+# This prevents inclusion of standard C++ compiler headers
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++")
endif(WIN32)
add_subdirectory(utilcode)