[mlpack-git] mlpack-2.0.x: Don't add unknown options for Visual Studio. (c5a1c5c)

gitdub at mlpack.org gitdub at mlpack.org
Wed Jul 20 15:45:54 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : mlpack-2.0.x
Link       : https://github.com/mlpack/mlpack/compare/e434bc4ac042534529a2a440a44d86935b4d7164...fc4195d27bb9e642356a384d1fa6fe10cbdf89a6

>---------------------------------------------------------------

commit c5a1c5c84d0a0a3d55ea221c01bd074e265b8fc7
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Jul 18 13:46:21 2016 -0400

    Don't add unknown options for Visual Studio.
    
    (this should trigger the AppVeyor build again)


>---------------------------------------------------------------

c5a1c5c84d0a0a3d55ea221c01bd074e265b8fc7
 CMakeLists.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 321cb63..d68577d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,9 +76,12 @@ endif()
 
 # Debugging CFLAGS.  Turn optimizations off; turn debugging symbols on.
 if(DEBUG)
-  add_definitions(-DDEBUG)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -ftemplate-backtrace-limit=0")
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -g -O0")
+  if (NOT MSVC)
+    add_definitions(-DDEBUG)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -ftemplate-backtrace-limit=0")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -g -O0")
+  endif ()
+
   # mlpack uses it's own mlpack::backtrace class based on Binary File Descriptor
   # <bfd.h> and linux Dynamic Loader <libdl.h> and more portable version in future
   if(CMAKE_SYSTEM_NAME STREQUAL "Linux")




More information about the mlpack-git mailing list