diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 5477d69129..d043e8cda7 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -168,8 +168,8 @@ if(NOT MSVC) if(concept-checks) set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCPP_CONCEPT_CHECKS") endif() - set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS}" CACHE TYPE STRING FORCE) - set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -O -g -D_DEBUG" CACHE TYPE STRING FORCE) + set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS} -fno-strict-aliasing " CACHE TYPE STRING FORCE) + set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -fno-strict-aliasing -O -g -D_DEBUG" CACHE TYPE STRING FORCE) if(MINGW) set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O2 -DNDEBUG" CACHE TYPE STRING FORCE) else()