mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
CMake: Improve to support build type. Default to release.
This commit is contained in:
parent
ab7a45aede
commit
6b148d1d4c
@ -2,5 +2,14 @@ cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(ASMJIT_STATIC TRUE)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "No build type selected, default to Release")
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
|
||||
endif()
|
||||
|
||||
add_subdirectory( asmjit )
|
||||
add_subdirectory( rpcs3 )
|
||||
|
@ -7,22 +7,28 @@ project(rpcs3)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
message(FATAL_ERROR "GCC ${CMAKE_CXX_COMPILER_VERSION} is too old.")
|
||||
endif()
|
||||
add_definitions(-DwxGUI)
|
||||
#add_definitions(-D__WXGTK__)
|
||||
#add_definitions(-Wfatal-errors)
|
||||
add_definitions(-w) # TODO: remove me
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
|
||||
add_definitions(-fpermissive) # TODO: remove me
|
||||
add_definitions(-g) # Debugging!!
|
||||
add_definitions(-msse2)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# TODO: stdlib?
|
||||
endif()
|
||||
|
||||
if (NOT MSVC)
|
||||
add_definitions(-DwxGUI)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fexceptions")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1 -D_NDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O1 -g -D_NDEBUG")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -D_DEBUG")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O1 -D_NDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O1 -g -D_NDEBUG")
|
||||
add_definitions(-msse2)
|
||||
endif()
|
||||
|
||||
If( NOT RPCS3_SRC_DIR)
|
||||
@ -48,11 +54,6 @@ find_package(OpenAL REQUIRED)
|
||||
|
||||
include("${wxWidgets_USE_FILE}")
|
||||
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
set(PLATFORM_ARCH "macosx/x86_64")
|
||||
elseif(WIN32)
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/Log.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "rpcs3/Ini.h"
|
||||
|
||||
#include "OpenALThread.h"
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include "Utilities/Log.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryBlock.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
MemoryBase Memory;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user