thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
413 stars 146 forks source link

CMakeLists.txt: append instead of overwrite CMAKE_CXX_FLAGS #116

Closed biergaizi closed 1 year ago

biergaizi commented 1 year ago

Currently, on ARM and PPC, CMakeLists.txt uses:

set(CMAKE_CXX_FLAGS "-DNO_WARN_X86_INTRINSICS -DSSE_CORRECT_DENORMALS")

but this overwrites the default value of CMAKE_CXX_FLAGS from CMake, including user-specified CXXFLAGS via environmental variable, making it impossible to change CXXFLAGS.

This patch appends instead of overwrite CMAKE_CXX_FLAGS via:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_WARN_X86_INTRINSICS -DSSE_CORRECT_DENORMALS")