[geos-commits] r2885 - trunk

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Jan 22 20:32:47 EST 2010


Author: mloskot
Date: 2010-01-22 20:32:46 -0500 (Fri, 22 Jan 2010)
New Revision: 2885

Modified:
   trunk/CMakeLists.txt
Log:
Disabled GEOS_ENABLE_ASSERT option for Visual Studio builds - not supported, no sense (#317)

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2010-01-23 00:10:58 UTC (rev 2884)
+++ trunk/CMakeLists.txt	2010-01-23 01:32:46 UTC (rev 2885)
@@ -50,9 +50,10 @@
 option(GEOS_ENABLE_INLINE
   "Set to ON to enable GEOS compilation with small functions inlining" ON)
 
-option(GEOS_ENABLE_ASSERT
-  "Set to ON to build GEOS with assert() macro enabled" OFF) 
-
+if(NOT MSVC)
+  option(GEOS_ENABLE_ASSERT
+    "Set to ON to build GEOS with assert() macro enabled" OFF) 
+endif()
 #################################################################################
 # Setup C/C++ compiler options
 #################################################################################
@@ -107,12 +108,12 @@
 message(STATUS
   "Setting GEOS compilation with small functions inlining - ${GEOS_ENABLE_INLINE}")
 
-if(GEOS_ENABLE_ASSERT AND CMAKE_BUILD_TYPE MATCHES "Rel")
-  string(REPLACE "-DNDEBUG" "-UNDEBUG"
+if(NOT MSVC AND GEOS_ENABLE_ASSERT)
+  string(REGEX REPLACE "[-/]D.*NDEBUG" "-U NDEBUG"
     CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+  message(STATUS
+    "Setting GEOS compilation with assert() macro enabled - ${GEOS_ENABLE_ASSERT}")
 endif()
-message(STATUS
-  "Setting GEOS compilation with assert() macro enabled - ${GEOS_ENABLE_ASSERT}")
 
 #################################################################################
 # Setup C/C++ library features



More information about the geos-commits mailing list