Fix up errors for unix compiles.

Signed-off-by: Mahmood(Thunder07) <m.a.hot.m+git@gmail.com>
This commit is contained in:
Marco Satti 2018-01-08 20:16:41 +08:00 committed by Mahmood(Thunder07)
parent 356b70af3b
commit 208c48d5a1
11 changed files with 41 additions and 21 deletions

View file

@ -1,15 +1,28 @@
language: cpp
compiler:
- clang
- gcc
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y cmake
- sudo apt-get install -y libboost-all-dev
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- cmake
- libboost-all-dev
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
install: true
before_script:
- eval "${MATRIX_EVAL}"
- echo "CC test... `${CC} --verison`"
- echo "CXX test... `${CXX} --verison`"
- mkdir -p build
- cd build
script:
- cmake ..
- cmake --build .

View file

@ -14,8 +14,14 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out")
set(BUILD_SHARED_LIBS on)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pthread")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pthread")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
add_subdirectory(external)
add_subdirectory(project)

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1)
project(external CXX)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
@ -13,4 +13,4 @@ find_package(Boost REQUIRED COMPONENTS log filesystem)
# Allow main projects to use
set(Boost_FOUND ${Boost_FOUND} PARENT_SCOPE)
set(Boost_INCLUDE_DIRS "${Boost_INCLUDE_DIRS}" PARENT_SCOPE)
set(Boost_LIBRARIES "${Boost_LIBRARIES}" PARENT_SCOPE)
set(Boost_LIBRARIES "${Boost_LIBRARIES}" PARENT_SCOPE)

View file

@ -3,6 +3,7 @@
#include <cstddef>
#include <cstdint>
#include <limits>
#include <climits>
/// PS2 Primative Data Types.
/// These types should be used throughout the emulator when operating on the PS2 system state.

View file

@ -1,6 +1,6 @@
#include "Core.hpp"
#include "Controller/EE/Timers/CEeTimers.hpp"
#include "Controller/Ee/Timers/CEeTimers.hpp"
#include "Resources/RResources.hpp"

View file

@ -3,7 +3,7 @@
#include "Common/Constants.hpp"
#include "Common/Types/Register/SizedWordRegister.hpp"
#include "Common/Types/Register/SizedQwordRegister.hpp"
#include "Common/Types/MIPS/BranchDelaySlot.hpp"
#include "Common/Types/Mips/BranchDelaySlot.hpp"
/// The R5900 is the EE Core's CPU.
/// It has been modified from a stock R5900 to include Sony specific instructions

View file

@ -54,7 +54,7 @@ class EeDmacChannel_Tadr : public EeDmacChannel_Base<EeDmacChannelRegister_Chcr_
{
public:
EeDmacChannel_Tadr(const int channel_id) :
EeDmacChannel_Base(channel_id)
EeDmacChannel_Base<EeDmacChannelRegister_Chcr_Ty>(channel_id)
{
}
@ -67,7 +67,7 @@ class EeDmacChannel_Asr : public EeDmacChannel_Tadr<EeDmacChannelRegister_Chcr_T
{
public:
EeDmacChannel_Asr(const int channel_id) :
EeDmacChannel_Tadr(channel_id)
EeDmacChannel_Tadr<EeDmacChannelRegister_Chcr_Ty>(channel_id)
{
}
@ -80,7 +80,7 @@ class EeDmacChannel_Sadr : public EeDmacChannel_Base<EeDmacChannelRegister_Chcr_
{
public:
EeDmacChannel_Sadr(const int channel_id) :
EeDmacChannel_Base(channel_id)
EeDmacChannel_Base<EeDmacChannelRegister_Chcr_Ty>(channel_id)
{
}
@ -93,7 +93,7 @@ class EeDmacChannel_Tadr_Sadr : public EeDmacChannel_Base<EeDmacChannelRegister_
{
public:
EeDmacChannel_Tadr_Sadr(const int channel_id) :
EeDmacChannel_Base(channel_id)
EeDmacChannel_Base<EeDmacChannelRegister_Chcr_Ty>(channel_id)
{
}

View file

@ -2,7 +2,7 @@
#include "Common/Constants.hpp"
#include "Common/Types/Register/SizedWordRegister.hpp"
#include "Common/Types/MIPS/BranchDelaySlot.hpp"
#include "Common/Types/Mips/BranchDelaySlot.hpp"
/// The IOP MIPS R3000 CPU (used as the IOP / PSX CPU).
/// It uses a little-endian configuration.

View file

@ -51,7 +51,7 @@ class IopDmacChannel_Tadr : public IopDmacChannel_Base<IopDmacChannelRegister_Ch
{
public:
IopDmacChannel_Tadr(const int channel_id) :
IopDmacChannel_Base(channel_id)
IopDmacChannel_Base<IopDmacChannelRegister_Chcr_Ty>(channel_id)
{
}

View file

@ -19,7 +19,6 @@ int main(int argc, char * argv[])
std::cout << argv[i] << ", ";
std::cout << std::endl << "Working directory: " << boost::filesystem::initial_path() << std::endl;
std::signal(SIGINT, signal_handler);
std::signal(SIGBREAK, signal_handler);
try
{

View file

@ -1,5 +1,6 @@
#pragma once
#include <functional>
#include <stdexcept>
#include <mutex>
#include <condition_variable>
@ -133,7 +134,7 @@ public:
/// Not thread safe.
void reset()
{
queue.reset()
queue.reset();
}
private: