aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2009-07-05 18:43:52 +0000
committerOscar Fuentes <ofv@wanadoo.es>2009-07-05 18:43:52 +0000
commitaa49d6ce63fbb1f6b28940116eac06f41f1575c4 (patch)
treee0c035d5344a0288f6fcbde73b42c1bf8b025525
parent09557100d78987872ee0ed5eac0a1d8c625d6b72 (diff)
downloadexternal_llvm-aa49d6ce63fbb1f6b28940116eac06f41f1575c4.zip
external_llvm-aa49d6ce63fbb1f6b28940116eac06f41f1575c4.tar.gz
external_llvm-aa49d6ce63fbb1f6b28940116eac06f41f1575c4.tar.bz2
CMake: Avoids defining _DEBUG on MSVC Release builds. Fixes PR 4379.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74794 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56f9355..6abfa4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,10 @@ else()
endif()
if( LLVM_ENABLE_ASSERTIONS )
- add_definitions( -D_DEBUG )
+ # MSVC doesn't like _DEBUG on release builds. See PR 4379.
+ if( NOT MSVC OR NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+ add_definitions( -D_DEBUG )
+ endif()
# On Release builds cmake automatically defines NDEBUG, so we
# explicitly undefine it:
if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )