Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "fix flags for c++, sometimes lstdc++ link is not implicit"
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 21 Nov 2013 00:23:44 +0000 (01:23 +0100)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 21 Nov 2013 00:23:44 +0000 (01:23 +0100)
This reverts commit fb77c22c9319b16443e3035d885b9b87643a3ed7.

buildtools/Cmake/Flags.cmake

index 8e3176d..24c7c97 100644 (file)
@@ -2,8 +2,8 @@ set(warnCFLAGS "")
 set(optCFLAGS "")
 
 if(NOT __VISUALC__ AND NOT __BORLANDC__)
 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")
   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()
 
   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()
 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()