Author: akhaldi
Date: Wed Jun 22 00:06:10 2011
New Revision: 52414
URL:
http://svn.reactos.org/svn/reactos?rev=52414&view=rev
Log:
[CMAKE]
* Handle the case where we may initially set some CMAKE_C_FLAGS and/or CMAKE_CXX_FLAGS.
Modified:
trunk/reactos/cmake/compilerflags.cmake
Modified: trunk/reactos/cmake/compilerflags.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/compilerflags.cmake?…
==============================================================================
--- trunk/reactos/cmake/compilerflags.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/compilerflags.cmake [iso-8859-1] Wed Jun 22 00:06:10 2011
@@ -4,8 +4,18 @@
foreach(flag ${ARGN})
set(flags_list "${flags_list} ${flag}")
endforeach()
- set(CMAKE_C_FLAGS ${flags_list})
- set(CMAKE_CXX_FLAGS ${flags_list})
+
+ if(CMAKE_C_FLAGS)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flags_list}")
+ else()
+ set(CMAKE_C_FLAGS ${flags_list})
+ endif()
+
+ if(CMAKE_CXX_FLAGS)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flags_list}")
+ else()
+ set(CMAKE_CXX_FLAGS ${flags_list})
+ endif()
endmacro()
macro(add_linkerflag MODULE _flag)