Skip to content

Commit

Permalink
[Fix] Windows binaries (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadisaad authored Apr 11, 2018
1 parent 5302117 commit 77eda65
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
45 changes: 45 additions & 0 deletions #.appveyor.yml#
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: "{branch}-ci-{build}"
image: Visual Studio 2017


environment:
matrix:
- build: g++
platform: x64
MINGW_ROOT: C:\msys64\mingw64
BOOST_ROOT: C:\msys64\mingw64\include\boost
LIBELF_INCLUDE: C:\msys64\mingw64\include\libelf
MINGW_ARCH: x86_64
MSYSTEM: MINGW64


install:
- set PATH="c:\minGW";c:\MinGW\bin;%MINGW_ROOT%;%MINGW_ROOT%\bin;C:\msys64\usr\bin\;"C:\Program Files\LLVM\bin";%PATH%
- bash -lc "pacman --needed --noconfirm -S mingw-w64-%MINGW_ARCH%-libelf"
- bash -lc "pacman --needed --noconfirm -S mingw-w64-%MINGW_ARCH%-boost"
- set CPATH=%LIBELF_INCLUDE%;%CPATH%
- set CPLUS_INCLUDE_PATH=%LIBELF_INCLUDE%;%BOOST_ROOT%;%CPLUS_INCLUDE_PATH%
- set BINARY_NAME=dinamo-windows-%platform%.exe


build_script:
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && make "
# - bash -lc "cd $APPVEYOR_BUILD_FOLDER && scripts/run_tests.sh" ## RUN TESTS ON LINUX ONLY (WITH TRAVIS)
- bash -lc true

artifacts:
- path: bin\%BINARY_NAME%
name: Releases

deploy:
#release: DiNAMO-v$(APPVEYOR_REPO_TAG)
description: 'Mac OSX, Linux and Windows 64 binaries'
provider: GitHub
auth_token:
secure: 4pbkaIiW4tf9KoszzJw02C1c5Levwbj1F2jmZIARZlmwdI67OSEiJFaQJ1EMHTdQ
artifact: /dinamo/
draft: false
prerelease: false
on:
appveyor_repo_tag: true
platform: x64
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ matrix:


- os: osx
osx_image: xcode8
osx_image: xcode8.2
compiler: clang
sudo: false
env:
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ SRCEXT := cpp
SOURCES := $(wildcard $(SRCDIR)/*.$(SRCEXT))
OBJECTS := $(patsubst %.$(SRCEXT),$(BUILDDIR)/%.o,$(notdir $(SOURCES)))

CXXFLAGS := --std=c++14 -Wall -Ofast -static -static-libgcc -static-libstdc++
CXXFLAGS := --std=c++14 -Wall -Ofast
LDFLAGS =


TARGET := bin/dinamo
Expand All @@ -18,7 +19,9 @@ else
TARGET := bin/dinamo
endif


ifeq ($(BINARY_NAME),dinamo-windows-x64.exe)
LDFLAGS = -static -static-libgcc -static-libstdc++
endif


all: $(TARGET)
Expand All @@ -27,7 +30,7 @@ all: $(TARGET)
$(TARGET): $(OBJECTS)
@echo " Linking..."
@mkdir -p $(EXECDIR)
@echo " $(CXX) $^ -o $(TARGET) "; $(CXX) $^ -o $(TARGET)
@echo " $(CXX) $^ -o $(TARGET) "; $(CXX) $(LDFLAGS) $^ -o $(TARGET)

$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
@mkdir -p $(BUILDDIR)
Expand Down

0 comments on commit 77eda65

Please sign in to comment.