mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Remove compiler optimizations to avoid strange issues
This commit is contained in:
parent
7c9cc7a1e9
commit
580d478f65
@ -58,21 +58,21 @@ add_definitions(-DPROJECT_DISPNAME="${PROJECT_DISPNAME}")
|
||||
# Compiler flags
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
if(WIN32 AND MINGW)
|
||||
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -g0 -funroll-loops")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
||||
elseif (WIN32 AND MSVC)
|
||||
set(CMAKE_CXX_FLAGS "/O2 /W3 /GL /arch:AVX2 /fp:fast /Zi")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/OPT:REF /OPT:ICF /LTCG /DEBUG")
|
||||
elseif(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -g0 -flto=full -funroll-loops")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-dead_strip -flto=full")
|
||||
elseif(UNIX)
|
||||
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -g0 -flto -funroll-loops")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -flto")
|
||||
endif()
|
||||
endif()
|
||||
#if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
# if(WIN32 AND MINGW)
|
||||
# set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -g0 -funroll-loops")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
||||
# elseif (WIN32 AND MSVC)
|
||||
# set(CMAKE_CXX_FLAGS "/O2 /W3 /GL /arch:AVX2 /fp:fast /Zi")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/OPT:REF /OPT:ICF /LTCG /DEBUG")
|
||||
# elseif(APPLE)
|
||||
# set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -g0 -flto=full -funroll-loops")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "-Wl,-dead_strip -flto=full")
|
||||
# elseif(UNIX)
|
||||
# set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -g0 -flto -funroll-loops")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -flto")
|
||||
# endif()
|
||||
#endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(PROJECT_EXECUTABLE "serial-studio")
|
||||
|
Loading…
x
Reference in New Issue
Block a user