mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Cmake build: Remove unnecessary duplication of c++ flags
Apparently cmake concatenates CMAKE_CXX_FLAGS to the Release and Debug flags Also eliminated the mix of '-std=c++*' and '-std=gnu++*' flags
This commit is contained in:
parent
89ac3916f3
commit
0f881e202e
@ -8,6 +8,10 @@ cmake_minimum_required(VERSION 2.6.4)
|
||||
|
||||
set(LYX_PROJECT LyX)
|
||||
|
||||
# Instruct cmake to not use gnu extensions,
|
||||
# this prevents the mix of '-std=c++*' and '-std=gnu++*' flags
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
enable_testing()
|
||||
|
||||
get_filename_component(lyx_dir_readme ${CMAKE_SOURCE_DIR}/README REALPATH) # Resolve symlinks
|
||||
@ -593,11 +597,11 @@ if(NOT MSVC)
|
||||
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
endif()
|
||||
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 -O0 -g3 -D_DEBUG" CACHE TYPE STRING FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -D_DEBUG" CACHE TYPE STRING FORCE)
|
||||
if(MINGW)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O2 -DNDEBUG" CACHE TYPE STRING FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE TYPE STRING FORCE)
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O3 -DNDEBUG" CACHE TYPE STRING FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE TYPE STRING FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user