[Jderobot-admin] jderobot-r1242 - trunk/src/stable/libs/log

redstar en jderobot.org redstar en jderobot.org
Jue Oct 23 23:27:06 CEST 2014


Author: redstar
Date: 2014-10-23 23:27:06 +0200 (Thu, 23 Oct 2014)
New Revision: 1242

Modified:
   trunk/src/stable/libs/log/CMakeLists.txt
Log:
#283 Agregado soporte para evitar advertencias en versiones de g++ superiores
a la versi?\195?\179n 2.6 (agregar condicionalmente la opci?\195?\179n -std=c++11)


Modified: trunk/src/stable/libs/log/CMakeLists.txt
===================================================================
--- trunk/src/stable/libs/log/CMakeLists.txt	2014-10-23 20:42:32 UTC (rev 1241)
+++ trunk/src/stable/libs/log/CMakeLists.txt	2014-10-23 21:27:06 UTC (rev 1242)
@@ -1,8 +1,14 @@
 
 
 set(SRC_FILES Logger.h Logger.cpp) 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+  # Si el compilador es superior a 4.6 debemos incluir una opción adicional
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  endif()
+endif()
+
 ADD_LIBRARY(logger SHARED ${SRC_FILES})
 
 target_link_libraries(logger ${Boost_LIBRARIES})



More information about the Jderobot-admin mailing list