From 09e15aac7c2fb275dd8e1457490af45b7552ea37 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 27 Jul 2020 23:47:30 -0700 Subject: [PATCH] CMake: Minor cleanup --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e38433735..24e5b96bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,12 +20,15 @@ if(NOT MSVC) set(CMAKE_C_EXTENSIONS ON) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-field-initializers") if(WIN32) # mingw32 likes to complain about using the "wrong" format strings despite them actually working set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format") endif() else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267") endif() if(NOT DEFINED LIBMGBA_ONLY) @@ -165,10 +168,12 @@ set(PGO_POST_FLAGS "-fprofile-use=${PGO_DIR} -fbranch-probabilities") if(BUILD_PGO AND NOT PGO_STAGE_2) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_PRE_FLAGS}") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${PGO_PRE_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_PRE_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_PRE_FLAGS}") elseif(BUILD_PGO AND PGO_STAGE_2) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_POST_FLAGS}") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${PGO_POST_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_POST_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_POST_FLAGS}") endif() @@ -244,7 +249,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*") enable_language(ASM) endif() -if(PSP2 OR WII) +if(PSP2) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format") endif()