mirror of https://github.com/mgba-emu/mgba.git
CMake: Minor cleanup
This commit is contained in:
parent
9ba0a0250f
commit
09e15aac7c
|
@ -20,12 +20,15 @@ if(NOT MSVC)
|
||||||
set(CMAKE_C_EXTENSIONS ON)
|
set(CMAKE_C_EXTENSIONS ON)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
|
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)
|
if(WIN32)
|
||||||
# mingw32 likes to complain about using the "wrong" format strings despite them actually working
|
# 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_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267")
|
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()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED LIBMGBA_ONLY)
|
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)
|
if(BUILD_PGO AND NOT PGO_STAGE_2)
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_PRE_FLAGS}")
|
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_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
|
||||||
elseif(BUILD_PGO AND PGO_STAGE_2)
|
elseif(BUILD_PGO AND PGO_STAGE_2)
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_POST_FLAGS}")
|
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_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_POST_FLAGS}")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_POST_FLAGS}")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_POST_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -244,7 +249,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PSP2 OR WII)
|
if(PSP2)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue