Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More windows compatibility for context.
[simgrid.git] / buildtools / Cmake / Flags.cmake
index a5a863b..7c9ee10 100644 (file)
@@ -1,9 +1,15 @@
 set(warnCFLAGS "")
 set(optCFLAGS "")
 
-if(NOT WIN32)
-       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3 ${custom_flags}")
-endif(NOT WIN32)
+if(NOT __VISUALC__ AND NOT __BORLANDC__)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
+else(NOT __VISUALC__ AND NOT __BORLANDC__)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}/Zi")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}/Zi")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}/DEBUG")
+endif(NOT __VISUALC__ AND NOT __BORLANDC__)
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${custom_flags}")
 
 if(enable_supernovae)
        set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")