Skip to content

Commit

Permalink
Merge pull request #70 from divy9881/fix_unix_build
Browse files Browse the repository at this point in the history
fix: unix build to fast fail when compile-time errors and fix file boostraping for VS.
  • Loading branch information
hsluoyz authored Jan 7, 2021
2 parents 5e3baa3 + 52929cb commit 978abe1
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 13 deletions.
6 changes: 3 additions & 3 deletions casbin/casbin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<ClCompile Include="exception\missing_required_sections.cpp" />
<ClCompile Include="exception\unsupported_operation_exception.cpp" />
<ClCompile Include="internal_api.cpp" />
<ClCompile Include="ip_parser\exception\ParserException.cpp" />
<ClCompile Include="ip_parser\exception\parser_exception.cpp" />
<ClCompile Include="ip_parser\parser\allFF.cpp" />
<ClCompile Include="ip_parser\parser\CIDRMask.cpp" />
<ClCompile Include="ip_parser\parser\dtoi.cpp" />
Expand Down Expand Up @@ -241,8 +241,8 @@
<ClInclude Include="exception\missing_required_sections.h" />
<ClInclude Include="exception\pch.h" />
<ClInclude Include="exception\unsupported_operation_exception.h" />
<ClInclude Include="ip_parser\exceptions\ParserException.h" />
<ClInclude Include="ip_parser\exceptions\pch.h" />
<ClInclude Include="ip_parser\exception\parser_exception.h" />
<ClInclude Include="ip_parser\exception\pch.h" />
<ClInclude Include="ip_parser\parser\allFF.h" />
<ClInclude Include="ip_parser\parser\byte.h" />
<ClInclude Include="ip_parser\parser\CIDR.h" />
Expand Down
16 changes: 8 additions & 8 deletions casbin/casbin.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<Filter Include="Source Files\ip_parser\parser">
<UniqueIdentifier>{deb02d53-9580-4fb9-b666-6b3a2713d286}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\ip_parser\exceptions">
<Filter Include="Source Files\ip_parser\exception">
<UniqueIdentifier>{c1a83ec0-b3e2-4b46-9755-6e20d8f26356}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\persist">
Expand Down Expand Up @@ -243,9 +243,6 @@
<ClCompile Include="rbac_api_with_domains.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ip_parser\exception\ParserException.cpp">
<Filter>Source Files\ip_parser\exceptions</Filter>
</ClCompile>
<ClCompile Include="ip_parser\parser\parseIPv4.cpp">
<Filter>Source Files\ip_parser\parser</Filter>
</ClCompile>
Expand All @@ -255,6 +252,9 @@
<ClCompile Include="enforcer_cached.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ip_parser\exception\parser_exception.cpp">
<Filter>Source Files\ip_parser\exception</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="config\config_interface.h">
Expand Down Expand Up @@ -347,10 +347,7 @@
<ClInclude Include="exception\unsupported_operation_exception.h">
<Filter>Header Files\exception</Filter>
</ClInclude>
<ClInclude Include="ip_parser\exceptions\ParserException.h">
<Filter>Header Files\ip_parser\exception</Filter>
</ClInclude>
<ClInclude Include="ip_parser\exceptions\pch.h">
<ClInclude Include="ip_parser\exception\pch.h">
<Filter>Header Files\ip_parser\exception</Filter>
</ClInclude>
<ClInclude Include="ip_parser\parser\allFF.h">
Expand Down Expand Up @@ -470,6 +467,9 @@
<ClInclude Include="enforcer_cached.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ip_parser\exception\parser_exception.h">
<Filter>Header Files\ip_parser\exception</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include=".clang-format" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "pch.h"

#include "./parserException.h"
#include "./parser_exception.h"

ParserException :: ParserException(string error_message){
this->error_message = error_message;
Expand Down
2 changes: 1 addition & 1 deletion casbin/ip_parser/parser/parseCIDR.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "./parseIPv4.h"
#include "./parseIPv6.h"
#include "./CIDRMask.h"
#include "../exception/parserException.h"
#include "../exception/parser_exception.h"

CIDR parseCIDR(string s);

Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ AR := ar
OBJ_FLAG := -c
FILE_FLAG := -o
STD_FLAG := -std=c++11
DIS_WARN := -w

# Define archive flags
AR_FLAG := crv
Expand Down Expand Up @@ -33,6 +34,16 @@ OBJ_DIRS := $(addprefix $(OBJ_DIR)/, $(INC_DIRS))

.PHONY: object
object:
$(foreach OBJ_DIR, $(OBJ_DIRS),\
$(MKDIR_P) $(OBJ_DIR);\
)
$(foreach SRC_FILE, $(SRC_FILES),\
set -e;\
$(CXX) $(DIS_WARN) $(STD_FLAG) $(OBJ_FLAG) $(FILE_FLAG) $(SRC_FILE:$(SRC_DIR)/%.$(SRC_EXT)=$(OBJ_DIR)/$(SRC_DIR)/%.$(OBJ_EXT)) $(SRC_FILE);\
)

.PHONY: debug
debug:
$(foreach OBJ_DIR, $(OBJ_DIRS),\
$(MKDIR_P) $(OBJ_DIR);\
)
Expand Down

0 comments on commit 978abe1

Please sign in to comment.