fixed build with apple-clang

This commit is contained in:
Ende! 2015-02-06 03:16:39 +01:00
parent 9d5e02ebcb
commit 7af8c0e38b
4 changed files with 12 additions and 9 deletions

View File

@ -38,6 +38,7 @@
#include "VXDisassemblerTypesC.h"
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C"
@ -46,7 +47,7 @@ extern "C"
/* VXBaseDataSource ============================================================================ */
typedef struct _VXBaseDataSourceContext {} VXBaseDataSourceContext;
typedef struct _VXBaseDataSourceContext { int a; } VXBaseDataSourceContext;
void VXBaseDataSource_Release(
VXBaseDataSourceContext *ctx);
@ -102,7 +103,7 @@ typedef enum _VXInstructionSetVendor /* : uint8_t */
/* VXInstructionDecoder ======================================================================== */
typedef struct _VXInstructionDecoderContext {} VXInstructionDecoderContext;
typedef struct _VXInstructionDecoderContext { int a; } VXInstructionDecoderContext;
VXInstructionDecoderContext* VXInstructionDecoder_Create(void);

View File

@ -42,7 +42,7 @@ extern "C"
/* VXBaseSymbolResolver ======================================================================== */
typedef struct _VXBaseSymbolResolverContext {} VXBaseSymbolResolverContext;
typedef struct _VXBaseSymbolResolverContext { int a; } VXBaseSymbolResolverContext;
VXBaseSymbolResolverContext* VXBaseSymbolResolver_Create(void);
@ -85,7 +85,7 @@ typedef const char* (*VXResolveSymbol_t)(
/* VXBaseInstructionFormatter ================================================================== */
typedef struct _VXBaseInstructionFormatterContext {} VXBaseInstructionFormatterContext;
typedef struct _VXBaseInstructionFormatterContext {int a;} VXBaseInstructionFormatterContext;
VXBaseSymbolResolverContext* VXBaseInstructionFormatter_GetSymbolResolver(
const VXBaseInstructionFormatterContext *ctx);
@ -98,7 +98,7 @@ void VXBaseInstructionFormatter_Release(VXBaseInstructionFormatterContext *ctx);
/* VXIntelInstructionFormatter ================================================================ */
typedef struct _VXIntelInstructionFormatterContext {} VXIntelInstructionFormatterContext;
typedef struct _VXIntelInstructionFormatterContext {int a;} VXIntelInstructionFormatterContext;
VXBaseInstructionFormatterContext* VXIntelInstructionFormatter_Create(void);

View File

@ -8,12 +8,13 @@ option(BUILD_C_BINDINGS "Build C bindings" TRUE) # TODO: default to FALSE when r
if (NOT CONFIGURED_ONCE)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(compiler_specific "-std=c++0x -Werror")
set(compiler_specific "-Werror")
set(compiler_specific_cxx "-std=c++0x")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(compiler_specific "/WX /D_CRT_SECURE_NO_WARNINGS")
endif ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${compiler_specific}"
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${compiler_specific} ${compiler_specific_cxx}"
CACHE STRING "Flags used by the compiler during all build types." FORCE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${compiler_specific}"
CACHE STRING "Flags used by the compiler during all build types." FORCE)

View File

@ -33,6 +33,7 @@
#include <vector>
#include <unordered_map>
#include <string>
#include "VXDisassemblerTypes.h"
namespace Verteron