Skip to content

Commit

Permalink
Use Boost pre-installed on Appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodr committed Aug 5, 2018
1 parent 44aa4c4 commit 22174f8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 25 deletions.
41 changes: 24 additions & 17 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ init:
- set PATH=%PATH:C:\Python27\Scripts;=%
# Add Anaconda to PATH
- set PATH=C:\Deps\conda\Scripts;C:\Deps\conda\library\bin;%PATH%
# Add system Boost to PATH
- set PATH=C:\Libraries\boost_1_67_0\lib64-msvc-14.1;%PATH%

cache:
- c:\tools\vcpkg\installed\ -> testing\dependencies\appveyor\install.bat
Expand All @@ -72,23 +74,28 @@ before_build:
build_script:
- bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv lock"
- bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv install"
- if "%ANACONDA_TESTS_ONLY%"=="1" (
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-04'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-05'"
) else (
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-10/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-13/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-09/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-01/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-02/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-03/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-04/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-05/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-06/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-07/recipe-*'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-01'" &&
bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-12/recipe-*'"
)
- bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-04/recipe-04'"
- bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-09/recipe-04'"
- bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-03/recipe-08'"
- bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-04/recipe-01'"
#- if "%ANACONDA_TESTS_ONLY%"=="1" (
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-04'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-05'"
# ) else (
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-13/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-09/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-01/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-02/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-03/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-04/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-05/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-06/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-07/recipe-*'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-10/recipe-0[1-3]'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-01'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-12/recipe-*'"
# )
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-10/recipe-04'" &&
# bash -c "cd /c/projects/cmake-cookbook-no-symlinks && pipenv run python testing/collect_tests.py 'chapter-11/recipe-0[2-3]'" &&

deploy: off
3 changes: 2 additions & 1 deletion chapter-03/recipe-08/cxx-example/menu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
appveyor-vs:
definitions:
- BOOST_ROOT: 'C:\tools\vcpkg\installed\x64-windows'
- BOOST_ROOT: 'C:\Libraries\boost_1_67_0'
- CMAKE_CXX_FLAGS: '-DBOOST_ALL_NO_LIB'

travis-osx:
definitions:
Expand Down
3 changes: 2 additions & 1 deletion chapter-04/recipe-01/cxx-example/menu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
appveyor-vs:
definitions:
- BOOST_ROOT: 'C:\tools\vcpkg\installed\x64-windows'
- BOOST_ROOT: 'C:\Libraries\boost_1_67_0'
- CMAKE_CXX_FLAGS: '-DBOOST_ALL_NO_LIB'

travis-osx:
definitions:
Expand Down
3 changes: 2 additions & 1 deletion chapter-04/recipe-04/cxx-example/menu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
appveyor-vs:
definitions:
- BOOST_ROOT: 'C:\tools\vcpkg\installed\x64-windows'
- BOOST_ROOT: 'C:\Libraries\boost_1_67_0'
- CMAKE_CXX_FLAGS: '-DBOOST_ALL_NO_LIB'

travis-osx:
definitions:
Expand Down
3 changes: 0 additions & 3 deletions chapter-09/recipe-04/cxx-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ list(
set(_boost_component_found "")

foreach(_component IN ITEMS ${_components})
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME ON)
find_package(Boost COMPONENTS ${_component})
if(Boost_FOUND)
set(_boost_component_found ${_component})
Expand Down
4 changes: 3 additions & 1 deletion chapter-09/recipe-04/cxx-example/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ appveyor-vs:
env:
- VERBOSE_OUTPUT: 'True'
definitions:
- BOOST_ROOT: 'C:\tools\vcpkg\installed\x64-windows'
- BOOST_ROOT: 'C:\Libraries\boost_1_67_0'
- CMAKE_CXX_FLAGS: '-DBOOST_ALL_NO_LIB'
- CMAKE_BUILD_TYPE: 'Release'
- CMAKE_CONFIGURATION_TYPES: 'Release'
# fails because packaged boost only provides python27
Expand All @@ -12,6 +13,7 @@ appveyor-vs:
appveyor-msys:
definitions:
- CMAKE_BUILD_TYPE: 'Release'
- Boost_USE_STATIC_RUNTIME: 'ON'

travis-osx:
definitions:
Expand Down
2 changes: 1 addition & 1 deletion testing/dependencies/appveyor/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if "%nonVSGenerator%"=="true" (
echo "Using VS generator %GENERATOR%"
echo "Let's get VcPkg working"

vcpkg install boost-filesystem boost-system boost-test boost-python zeromq eigen3 --triplet x64-windows
vcpkg install zeromq eigen3 --triplet x64-windows
cd c:\tools\vcpkg
vcpkg integrate install
cd %APPVEYOR_BUILD_FOLDER%
Expand Down

0 comments on commit 22174f8

Please sign in to comment.