mirror of https://github.com/inolen/redream.git
fix travis ci
This commit is contained in:
parent
b32ffe7a68
commit
a60442724f
15
.travis.yml
15
.travis.yml
|
@ -1,4 +1,4 @@
|
|||
language: cpp
|
||||
language: c
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
@ -7,18 +7,23 @@ matrix:
|
|||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- kubuntu-backports
|
||||
- george-edison55-precise-backports
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- cmake
|
||||
- gcc-4.9
|
||||
- g++-4.9
|
||||
- cmake-data
|
||||
- gcc-6
|
||||
- g++-6
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
compiler: clang
|
||||
before_install:
|
||||
- brew upgrade
|
||||
- brew install cmake
|
||||
|
||||
script:
|
||||
- if [ "$CC" = "gcc" ]; then export CC="gcc-4.9" CXX="g++-4.9"; fi
|
||||
- if [ "$CC" = "gcc" ]; then export CC="gcc-6" CXX="g++-6"; fi
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
|
@ -15,9 +15,9 @@ endif()
|
|||
|
||||
list(APPEND REDREAM_LANGUAGES C CXX)
|
||||
if(WIN32)
|
||||
list(APPEND REDREAM_LANGUAGES ASM_MASM)
|
||||
list(APPEND REDREAM_LANGUAGES ASM_MASM)
|
||||
else()
|
||||
list(APPEND REDREAM_LANGUAGES ASM)
|
||||
list(APPEND REDREAM_LANGUAGES ASM)
|
||||
endif()
|
||||
|
||||
project(redream ${REDREAM_LANGUAGES})
|
||||
|
@ -25,6 +25,9 @@ project(redream ${REDREAM_LANGUAGES})
|
|||
# export compile_commands.json for clang-tidy
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
#--------------------------------------------------
|
||||
# config file
|
||||
#--------------------------------------------------
|
||||
|
@ -214,8 +217,8 @@ endif()
|
|||
# assign source groups for visual studio projects
|
||||
source_group_by_dir(REDREAM_SOURCES)
|
||||
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(REDREAM_COMPILE_FLAGS $<$<COMPILE_LANGUAGE:CXX>:-std=c++11 -fno-operator-names> $<$<COMPILE_LANGUAGE:C>:-std=c11> -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-strict-aliasing -D_GNU_SOURCE)
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
||||
set(REDREAM_COMPILE_FLAGS -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-strict-aliasing -D_GNU_SOURCE)
|
||||
|
||||
# some flavors of GCC require this to be defined for the PR* macros in inttypes.h
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include <capstone.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#define XBYAK_NO_OP_NAMES
|
||||
#include <xbyak/xbyak.h>
|
||||
|
||||
extern "C" {
|
||||
|
@ -1450,10 +1452,10 @@ EMITTER(AND) {
|
|||
}
|
||||
|
||||
if (x64_backend_can_encode_imm(instr->arg[1])) {
|
||||
e.and (result, (uint32_t)ir_zext_constant(instr->arg[1]));
|
||||
e.and_(result, (uint32_t)ir_zext_constant(instr->arg[1]));
|
||||
} else {
|
||||
const Xbyak::Reg b = x64_backend_register(backend, instr->arg[1]);
|
||||
e.and (result, b);
|
||||
e.and_(result, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1466,10 +1468,10 @@ EMITTER(OR) {
|
|||
}
|
||||
|
||||
if (x64_backend_can_encode_imm(instr->arg[1])) {
|
||||
e.or (result, (uint32_t)ir_zext_constant(instr->arg[1]));
|
||||
e.or_(result, (uint32_t)ir_zext_constant(instr->arg[1]));
|
||||
} else {
|
||||
const Xbyak::Reg b = x64_backend_register(backend, instr->arg[1]);
|
||||
e.or (result, b);
|
||||
e.or_(result, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1482,10 +1484,10 @@ EMITTER(XOR) {
|
|||
}
|
||||
|
||||
if (x64_backend_can_encode_imm(instr->arg[1])) {
|
||||
e.xor (result, (uint32_t)ir_zext_constant(instr->arg[1]));
|
||||
e.xor_(result, (uint32_t)ir_zext_constant(instr->arg[1]));
|
||||
} else {
|
||||
const Xbyak::Reg b = x64_backend_register(backend, instr->arg[1]);
|
||||
e.xor (result, b);
|
||||
e.xor_(result, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1497,7 +1499,7 @@ EMITTER(NOT) {
|
|||
e.mov(result, a);
|
||||
}
|
||||
|
||||
e.not(result);
|
||||
e.not_(result);
|
||||
}
|
||||
|
||||
EMITTER(SHL) {
|
||||
|
|
|
@ -22,7 +22,7 @@ static struct sh4_opdef s_opdefs[NUM_SH4_OPS] = {
|
|||
#include "jit/frontend/sh4/sh4_instr.inc"
|
||||
#undef SH4_INSTR
|
||||
};
|
||||
static struct sh4_opdef *s_opdef_lookup[UINT16_MAX] = {};
|
||||
static struct sh4_opdef *s_opdef_lookup[UINT16_MAX];
|
||||
|
||||
static void sh4_arg_mask(const char *instr_code, char c, uint16_t *mask,
|
||||
uint16_t *shift) {
|
||||
|
|
|
@ -268,7 +268,7 @@ static void rb_destroy_program(struct shader_program *program) {
|
|||
static bool rb_compile_program(struct shader_program *program,
|
||||
const char *header, const char *vertex_source,
|
||||
const char *fragment_source) {
|
||||
char buffer[16384] = {0};
|
||||
char buffer[16384] = {};
|
||||
|
||||
memset(program, 0, sizeof(*program));
|
||||
program->program = glCreateProgram();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "core/string.h"
|
||||
|
||||
const char *fs_appdir() {
|
||||
static char appdir[PATH_MAX] = {};
|
||||
static char appdir[PATH_MAX];
|
||||
|
||||
if (appdir[0]) {
|
||||
return appdir;
|
||||
|
|
|
@ -319,7 +319,7 @@ static struct key keys[] = {{K_UNKNOWN, "unknown"},
|
|||
{K_AXIS15, "axis15"}};
|
||||
|
||||
enum keycode get_key_by_name(const char *keyname) {
|
||||
char buffer[256] = {0};
|
||||
char buffer[256] = {};
|
||||
int len = 0;
|
||||
|
||||
while (*keyname) {
|
||||
|
|
Loading…
Reference in New Issue