mirror of
https://github.com/hch12907/orbum.git
synced 2024-06-02 19:38:16 -04:00
Fix up errors for unix compiles.
This commit is contained in:
parent
356b70af3b
commit
cb485ab942
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -2,6 +2,3 @@
|
|||
path = external/boost
|
||||
url = https://github.com/boostorg/boost.git
|
||||
ignore = dirty
|
||||
[submodule "external/boost"]
|
||||
path = external/boost
|
||||
url = https://github.com/Orphis/boost-cmake.git
|
||||
|
|
49
.travis.yml
49
.travis.yml
|
@ -1,15 +1,44 @@
|
|||
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
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
||||
|
||||
install: true
|
||||
|
||||
before_script:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
|
||||
script:
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
script:
|
||||
- cmake ..
|
||||
- cmake --build .
|
||||
- export BUILD_DIR=`pwd`
|
||||
- echo $BUILD_DIR
|
||||
|
||||
# Install Boost headers (1.65.1)
|
||||
- BOOST_URL="https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz"
|
||||
- mkdir -p boost && cd boost && travis_retry wget --quiet -O - ${BOOST_URL} | tar --strip-components=1 -xz
|
||||
- ./bootstrap.sh
|
||||
- travis_wait 30 ./b2 -d0 -j 4
|
||||
- export BOOST_ROOT=`pwd`
|
||||
- cd $BUILD_DIR
|
||||
|
||||
# Install recent CMake (3.8.2)
|
||||
- CMAKE_URL="https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz"
|
||||
- mkdir -p cmake && cd cmake && travis_retry wget --quiet --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz
|
||||
- export PATH=`pwd`:$PATH
|
||||
- cd $BUILD_DIR
|
||||
|
||||
- echo $PATH
|
||||
- cmake --version
|
||||
|
||||
- cmake -DBOOST_ROOT=${BOOST_ROOT} ..
|
||||
- make -j 4
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.8.2)
|
||||
|
||||
#if(APPLE and not TARGET_IOS)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" cache string "Minimum OS X deployment version")
|
||||
#endif()
|
||||
|
||||
project(orbum CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_package(Threads)
|
||||
|
||||
|
@ -14,8 +13,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)
|
4
external/CMakeLists.txt
vendored
4
external/CMakeLists.txt
vendored
|
@ -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)
|
||||
|
|
1
external/boost
vendored
1
external/boost
vendored
|
@ -1 +0,0 @@
|
|||
Subproject commit 6c418d1fb143b9a9647845207f6d52d0fcb831ea
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.8.2)
|
||||
|
||||
add_subdirectory(liborbum)
|
||||
add_subdirectory(orbumfront)
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.8.2)
|
||||
|
||||
project(liborbum CXX)
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Core.hpp"
|
||||
|
||||
#include "Controller/EE/Timers/CEeTimers.hpp"
|
||||
#include "Controller/Ee/Timers/CEeTimers.hpp"
|
||||
|
||||
#include "Resources/RResources.hpp"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.8.2)
|
||||
|
||||
project(orbumfront CXX)
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue