Skip to content

Commit fc173da

Browse files
authored
Merge pull request #227 from alex85k/msys2-appveor
Add Msys2 building appveor
2 parents 8bf6702 + 0a281c0 commit fc173da

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

appveyor.yml

+18-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
environment:
88
matrix:
9-
- config: Dev
9+
- config: MSYS2
1010
autocrlf: true
1111
- config: Dev
12-
autocrlf: false
12+
autocrlf: true
1313
- config: RelWithDebInfo
1414
autocrlf: true
15+
- config: Dev
16+
autocrlf: false
1517
- config: RelWithDebInfo
1618
autocrlf: false
1719

@@ -25,13 +27,26 @@ init:
2527
- git config --global core.autocrlf %autocrlf%
2628
- git config --get core.autocrlf
2729

30+
install:
31+
- cd c:\projects
32+
- git clone https://github.com/osmcode/osm-testdata
33+
- if [%config%]==[MSYS2] (
34+
C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade
35+
&& C:\msys64\usr\bin\pacman -Rc --noconfirm mingw-w64-x86_64-gcc-libs
36+
)
37+
2838
# clone directory
2939
clone_folder: c:\projects\libosmium
3040

3141
platform: x64
3242

3343
build_script:
34-
- build-appveyor.bat
44+
- cd c:\projects\libosmium
45+
- if [%config%]==[MSYS2] (
46+
build-msys2.bat
47+
) else (
48+
build-appveyor.bat
49+
)
3550

3651
# remove garbage VS messages
3752
# http://help.appveyor.com/discussions/problems/4569-the-target-_convertpdbfiles-listed-in-a-beforetargets-attribute-at-c-does-not-exist-in-the-project-and-will-be-ignored

build-msys2.bat

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
echo "Adding MSYS2 to path..."
2+
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
3+
echo %PATH%
4+
5+
echo "Installing MSYS2 packages..."
6+
bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-geos mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-cppcheck mingw-w64-x86_64-doxygen mingw-w64-x86_64-gdb mingw-w64-x86_64-sparsehash mingw-w64-x86_64-gdal mingw-w64-x86_64-ruby mingw-w64-x86_64-libspatialite mingw-w64-x86_64-spatialite-tools mingw-w64-x86_64-clang-tools-extra"
7+
bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-postgresql mingw-w64-x86_64-netcdf mingw-w64-x86_64-crypto++"
8+
call C:\msys64\mingw64\bin\gem.cmd install json
9+
10+
echo "Setting PROJ_LIB variable for correct PROJ.4 working"
11+
set PROJ_LIB=c:\msys64\mingw64\share\proj
12+
13+
echo "Generating makefiles"
14+
mkdir build
15+
cd build
16+
cmake .. -G "MSYS Makefiles" -DBUILD_DATA_TESTS=ON -DBUILD_HEADERS=OFF
17+
18+
echo "Building"
19+
make
20+
21+
echo "Testing"
22+
ctest

cmake/FindGem.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
22
#
3+
# Version 0.31 2017-09-15
4+
# - find gem executable gem.cmd on Windows
35
# Version 0.3 2013-07-02
46
# - rely on `gem content` to find library and header
57
# - introduce GEM_OS_PKG to allow search via pkgconfig
@@ -28,7 +30,7 @@
2830
# Check for how 'gem' should be called
2931
include(FindPackageHandleStandardArgs)
3032
find_program(GEM_EXECUTABLE
31-
NAMES "gem${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}"
33+
NAMES "gem.cmd" "gem${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}"
3234
"gem${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}"
3335
"gem-${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}"
3436
"gem-${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}"

0 commit comments

Comments
 (0)