LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dart-5.1.1_optflags.patch of Package dart5 (Project home:awissu:gazebo)

diff -U 3 -dHrN dart-5.1.1.orig/CMakeLists.txt dart-5.1.1/CMakeLists.txt
--- dart-5.1.1.orig/CMakeLists.txt	2015-11-06 17:43:25.000000000 +0300
+++ dart-5.1.1/CMakeLists.txt	2016-02-07 05:14:20.171855609 +0300
@@ -477,7 +477,7 @@
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${DART_RUNTIME_LIBRARY} /Zi /GL /Gy /W1 /EHsc /arch:SSE2")
   endif(NOT DART_MSVC_DEFAULT_OPTIONS)
 elseif(CMAKE_COMPILER_IS_GNUCXX)
-  set(CMAKE_CXX_FLAGS "-Wall -msse2 -fPIC")
+  set(CMAKE_CXX_FLAGS "-Wall -msse -fPIC ${CMAKE_C_FLAGS}" )
   execute_process(
     COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
   set(CXX_COMPILER_VERSION ${GCC_VERSION})
@@ -488,7 +488,7 @@
   endif()
   set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
   set(CMAKE_CXX_FLAGS_DEBUG "-g -fno-omit-frame-pointer -fno-inline-functions -fno-inline-functions-called-once -fno-optimize-sibling-calls")
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG}")
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
   set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_DEBUG} -pg")
 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set(CMAKE_CXX_FLAGS "-msse2 -fPIC")