summaryrefslogtreecommitdiffstats
path: root/Modules/UseEcos.cmake
diff options
context:
space:
mode:
authorantmak <antmak.pub@gmail.com>2018-11-29 03:58:24 (GMT)
committerBrad King <brad.king@kitware.com>2018-12-06 14:49:28 (GMT)
commit620e4e5e21ca9070e50038c999dfae20cf5416ef (patch)
tree0519a367a33c13ff29fcee8ff6de7d100f31db75 /Modules/UseEcos.cmake
parent772edffbf0c08fc0a6fcf74fb98545b7afcfee13 (diff)
downloadCMake-620e4e5e21ca9070e50038c999dfae20cf5416ef.zip
CMake-620e4e5e21ca9070e50038c999dfae20cf5416ef.tar.gz
CMake-620e4e5e21ca9070e50038c999dfae20cf5416ef.tar.bz2
UseEcos: Append C and CXX flags instead of overwriting them
Diffstat (limited to 'Modules/UseEcos.cmake')
-rw-r--r--Modules/UseEcos.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake
index 6d13d42..9f84847 100644
--- a/Modules/UseEcos.cmake
+++ b/Modules/UseEcos.cmake
@@ -191,8 +191,8 @@ macro(ECOS_ADD_EXECUTABLE _exe_NAME )
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
# some strict compiler flags
- set (CMAKE_C_FLAGS "-Wstrict-prototypes")
- set (CMAKE_CXX_FLAGS "-Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-prototypes")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions")
add_executable(${_exe_NAME} ${ARGN})
set_target_properties(${_exe_NAME} PROPERTIES SUFFIX ".elf")