Skip to content

Commit 91589dd

Browse files
authored
Merge pull request #310 from azarzadavila/windows
Add CI for Windows
2 parents 6b06b1a + 0f5cd36 commit 91589dd

File tree

3 files changed

+62
-2
lines changed

3 files changed

+62
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ if(MINGW)
3838
CACHE STRING "Version of GCC in your MinGW installation")
3939

4040
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format -Wno-format-extra-args")
41-
set(CMAKE_CXX_STANDARD_LIBRARIES "-static -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")
42-
41+
# Linking mingw libs statically
42+
set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive, -static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")
43+
4344
# Check for gcc target architecture
4445
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE GCC_ARCH)
4546
string(STRIP "${GCC_ARCH}" GCC_ARCH_TRIPLE)

appveyor.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
version: 2.0.0-beta.1-{branch}+{build}
2+
image: Visual Studio 2015
3+
environment:
4+
BOOST_ROOT: C:\Libraries\boost_1_65_1
5+
6+
install:
7+
- 'git submodule update --init'
8+
- ps: '$env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "")'
9+
- ps: '$env:path = "C:\msys64\mingw64\bin;C:\msys64\usr\bin\;" + $env:path'
10+
11+
build_script:
12+
13+
# uninstall tcl/tk
14+
- pacman -Rdd --noconfirm mingw-w64-x86_64-tcl mingw-w64-x86_64-tk
15+
16+
# build tcl
17+
- cd C:\projects
18+
- wget -O tcl-release.tar.gz https://github.com/tcltk/tcl/archive/release.tar.gz
19+
- tar xf tcl-release.tar.gz
20+
- cd tcl-release/win/
21+
- bash configure --enable-threads --enable-64bit --prefix=C:/tcltk/
22+
- make
23+
- make install
24+
25+
# build tk
26+
- cd C:\projects
27+
- wget -O tk-release.tar.gz https://github.com/tcltk/tk/archive/release.tar.gz
28+
- tar xf tk-release.tar.gz
29+
- cd tk-release/win/
30+
- bash configure --enable-64bit --prefix=C:/tcltk/ --with-tcl=../../tcl-release/win/
31+
- make
32+
- make install
33+
34+
# build boost
35+
- cd %BOOST_ROOT%
36+
- call bootstrap.bat gcc
37+
- cat bootstrap.log
38+
- .\b2 toolset=gcc variant=release --with-thread --with-system --with-random --with-filesystem --with-program_options
39+
40+
# install emacs
41+
# We cannot use $(pacman -S *-emacs because ISS packs C:/.../emacs.exe/../* which would include all of msys)
42+
- choco install emacs64
43+
44+
# build mozart2
45+
- mkdir C:\projects\mozart2\build
46+
- cd C:\projects\mozart2\build
47+
- cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" -DCMAKE_PREFIX_PATH=C:/tcltk -DBOOST_ROOT="%BOOST_ROOT%" -DISS_INCLUDE_TCL=ON -DISS_INCLUDE_EMACS=ON C:\projects\mozart2
48+
- make check || true
49+
- cmake --build . --target installer -- VERBOSE=1
50+
51+
artifacts:
52+
- path: build\mozart2-2.0.0-beta.1-x86_64-windows.exe
53+
name: binary installer
54+

vm/boostenv/main/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,8 @@ include_directories(${GENERATED_BOOSTSOURCES_DIR})
116116

117117
add_library(mozartvmboost boostvm.cc boostenvmodules.cc)
118118
add_dependencies(mozartvmboost genboostsources)
119+
120+
# We add bcrypt lib(dynamically) for Windows
121+
if(WIN32)
122+
target_link_libraries(mozartvmboost bcrypt)
123+
endif()

0 commit comments

Comments
 (0)