Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "fix flags for c++, sometimes lstdc++ link is not implicit"
[simgrid.git] / buildtools / Cmake / Flags.cmake
index 8e3176d..24c7c97 100644 (file)
@@ -2,8 +2,8 @@ set(warnCFLAGS "")
 set(optCFLAGS "")
 
 if(NOT __VISUALC__ AND NOT __BORLANDC__)
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-g3")
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g")
 else()
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}/Zi")
@@ -97,11 +97,6 @@ if(NOT $ENV{LDFLAGS} STREQUAL "")
   set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} $ENV{LDFLAGS}")
 endif()
 
-if(NOT $ENV{LDFLAGS} STREQUAL "")
-  message(STATUS "Add LDFLAGS: \"$ENV{LDFLAGS}\" to CMAKE_CXX_LINK_FLAGS")
-  set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} $ENV{LDFLAGS} -lstdc++")
-endif()
-
 if(enable_model-checking AND enable_compile_optimizations)
   message(WARNING "Sorry for now GCC optimizations does not work with model checking.\nPlease turn off optimizations with command:\ncmake -Denable_compile_optimizations=off .")
 endif()