diff --git a/CMakeLists.txt b/CMakeLists.txt index 64ad3822..479a96cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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")