Skip to content

Commit

Permalink
Fixed msys2 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcphillips committed Nov 6, 2017
1 parent f12cabe commit 80ce884
Show file tree
Hide file tree
Showing 10 changed files with 634 additions and 8 deletions.
7 changes: 7 additions & 0 deletions gcc/yw-common/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include ../yw.setup.makefile
include ../cpp.setup.makefile

LIB_TARGET = libywcommon.a
LIB_SRC = $(wildcard ../../src/yw-common/*.cpp)

include ../lib.targets.makefile
606 changes: 606 additions & 0 deletions gcc/yw-graph-app/wf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions gcc/yw.setup.makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ YW_DIR = ../..
YW_SRC_DIR = $(YW_DIR)/src
YW_GCC_DIR = $(YW_DIR)/gcc

YW_INCLUDES += -I$(YW_SRC_DIR)/yw-common
YW_INCLUDES += -I$(YW_SRC_DIR)/yw-cli
YW_INCLUDES += -I$(YW_SRC_DIR)/yw-graph
YW_INCLUDES += -I$(YW_SRC_DIR)/yw-model
Expand All @@ -24,6 +25,7 @@ YW_LIBS += -lywdb -L$(YW_GCC_DIR)/yw-db
YW_LIBS += -lsqlitedb -L$(YW_GCC_DIR)/sqlite-db
YW_LIBS += -lywconfig -L$(YW_GCC_DIR)/yw-config
YW_LIBS += -lsqlite3 -L$(YW_GCC_DIR)/sqlite3
YW_LIBS += -lywcommon -L$(YW_GCC_DIR)/yw-common

ANTLR_LIB += -lantlr4 -L$(YW_GCC_DIR)/antlr4-runtime
ANTLR_INCLUDES += -I$(ANTLR4_RUNTIME_SRC)
Expand Down
8 changes: 7 additions & 1 deletion msvc/yw.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2005
VisualStudioVersion = 15.0.27004.2006
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yw-extract", "yw-extract\yw-extract.vcxproj", "{158B1288-0CC1-426B-8967-800EDBD8C278}"
ProjectSection(ProjectDependencies) = postProject
Expand Down Expand Up @@ -306,6 +306,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yw-common-tests", "yw-commo
{53F368BF-5AE1-4D98-BF66-E2D100E90E8C} = {53F368BF-5AE1-4D98-BF66-E2D100E90E8C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "yw-common", "yw-common", "{549611AB-FBB2-4168-BCBB-99335AF54FDC}"
ProjectSection(SolutionItems) = preProject
..\gcc\yw-common\Makefile = ..\gcc\yw-common\Makefile
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -575,6 +580,7 @@ Global
{4FFEE26C-A586-4DEC-A7B7-E61F3DE416D4} = {BFFDE3BA-F86B-4FCA-A0B1-D4D035806F75}
{4520D083-3914-444C-9B11-590BDD272DC5} = {67337B64-473B-4676-AF06-D1EDCE123B6D}
{FE656FA7-CC96-49A7-928B-F4C05547E52E} = {67337B64-473B-4676-AF06-D1EDCE123B6D}
{549611AB-FBB2-4168-BCBB-99335AF54FDC} = {67337B64-473B-4676-AF06-D1EDCE123B6D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEF8164-5EBC-432F-98B9-C7C5704935A3}
Expand Down
2 changes: 2 additions & 0 deletions src/yw-common/yw_io.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <string>

#ifdef _MSC_VER
Expand Down
2 changes: 1 addition & 1 deletion src/yw-extract/annotation_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace yw {
void enterResource(YWParser::ResourceContext *context);

protected:
bool AnnotationListener::inProgramBlock();
bool inProgramBlock();
row_id getLineId(antlr4::ParserRuleContext* context);
AnnotationRange getRangeInLine(antlr4::ParserRuleContext* context);
};
Expand Down
4 changes: 2 additions & 2 deletions src/yw-parse/parsing_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace yw {
updateMessage();
}

const char* ParsingException::what() const {
const char* ParsingException::what() const noexcept {
return getMessage().c_str();
};
}

const std::string& ParsingException::getMessage() const {
return messageBacking;
Expand Down
2 changes: 1 addition & 1 deletion src/yw-parse/parsing_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace yw {
const std::string& what = "<sliced instance of yw::parse::ParsingException>"
);

virtual const char* what() const override;
virtual const char* what() const noexcept override;
virtual nullable_string getDetails() const;
virtual const std::string& getMessage() const;
virtual nullable_string getSource() const;
Expand Down
8 changes: 5 additions & 3 deletions test/yw-test/random_testing.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <string>

namespace yw {
Expand All @@ -6,15 +8,15 @@ namespace yw {
class RandomTextGenerator {

public:
void RandomTextGenerator::setSeed(unsigned int seed) {
void setSeed(unsigned int seed) {
srand(seed);
}

char RandomTextGenerator::getRandomASCIICharacter() {
char getRandomASCIICharacter() {
return rand() % 128;
}

std::string RandomTextGenerator::getRandomASCIIText(size_t size) {
std::string getRandomASCIIText(size_t size) {
std::stringstream ss;
for (size_t i = 0; i < size; ++i) {
ss << getRandomASCIICharacter();
Expand Down
1 change: 1 addition & 0 deletions test/yw-test/yw_test.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "yw_io.h"
#include "nullable.h"
#include "yw_test_msvc.h"
#include "yw_test_cpputest.h"
Expand Down

0 comments on commit 80ce884

Please sign in to comment.