Reworked cmake compiler arguments

This commit is contained in:
AlexandreRouma
2021-10-03 01:13:15 +02:00
parent 163e35727c
commit 4564475821
30 changed files with 98 additions and 92 deletions

View File

@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.13)
project(discord_integration)
if (MSVC)
set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc")
add_compile_options(/O2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup -fPIC")
add_compile_options(-O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -fPIC")
add_compile_options(-O3 -std=c++17)
endif ()
add_subdirectory("discord-rpc")