Browse Source

Merge pull request #2 from skypjack/appveyor

See #1 for further details.
Michele Caini 8 years ago
parent
commit
d4f3f7b9e7
5 changed files with 52 additions and 1 deletions
  1. 1 1
      CMakeLists.txt
  2. 1 0
      README.md
  3. 23 0
      appveyor.yml
  4. 23 0
      deps.bat
  5. 4 0
      src/component_pool.hpp

+ 1 - 1
CMakeLists.txt

@@ -106,7 +106,7 @@ endif(${GOOGLETEST_FOUND})
 
 
 file(
 file(
     GLOB_RECURSE PROJECT_FILES FOLLOW_SYMLINKS
     GLOB_RECURSE PROJECT_FILES FOLLOW_SYMLINKS
-    *.txt *.c *.cpp *.hpp *.h *.in *.cmake *.sh *.md AUTHORS LICENSE
+    *.txt *.c *.cpp *.hpp *.h *.in *.cmake *.sh *.md *.yml *.bat AUTHORS LICENSE
 )
 )
 
 
 add_custom_target(
 add_custom_target(

+ 1 - 0
README.md

@@ -1,6 +1,7 @@
 # EnTT - Entity-Component System in modern C++
 # EnTT - Entity-Component System in modern C++
 
 
 [![Build Status](https://travis-ci.org/skypjack/entt.svg?branch=master)](https://travis-ci.org/skypjack/uvw)
 [![Build Status](https://travis-ci.org/skypjack/entt.svg?branch=master)](https://travis-ci.org/skypjack/uvw)
+[![Build status](https://ci.appveyor.com/api/projects/status/rvhaabjmghg715ck?svg=true)](https://ci.appveyor.com/project/skypjack/entt)
 
 
 # Introduction
 # Introduction
 
 

+ 23 - 0
appveyor.yml

@@ -0,0 +1,23 @@
+# can use variables like {build} and {branch}
+version: 1.0.{build}
+
+image: Visual Studio 2015
+
+environment:
+  BUILD_DIR: "%APPVEYOR_BUILD_FOLDER%\\build"
+
+platform:
+  - Win32
+
+configuration:
+  - Release
+
+before_build:
+  - deps.bat
+  - cd %BUILD_DIR%
+  - cmake .. -G"%CMAKE_GENERATOR_NAME%"
+
+build:
+  parallel: true
+  project: build/entt.sln
+  verbosity: minimal

+ 23 - 0
deps.bat

@@ -0,0 +1,23 @@
+@echo off
+set SRC_DIR=%~dp0
+
+if not defined ARCH set ARCH=x86
+
+@rem init/update submodules
+cd %SRC_DIR%
+git submodule update --init
+
+@rem compile dependencies
+
+set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
+
+set GTEST_BUILD_DIR=%SRC_DIR%deps\googletest\build
+if exist %GTEST_BUILD_DIR%\NUL rd /s /q %GTEST_BUILD_DIR%
+md %GTEST_BUILD_DIR%
+cd %GTEST_BUILD_DIR%
+cmake .. -Dgtest_force_shared_crt=ON -G"%CMAKE_GENERATOR_NAME%"
+msbuild googlemock\gmock.sln /p:Configuration=%config% /p:Platform="%msbuild_platform%" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /m
+msbuild googlemock\gtest\gtest.sln /p:Configuration=%config% /p:Platform="%msbuild_platform%" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /m
+
+@rem go back home
+cd %SRC_DIR%

+ 4 - 0
src/component_pool.hpp

@@ -125,7 +125,11 @@ public:
     using entity_type = typename Pool<Component>::entity_type;
     using entity_type = typename Pool<Component>::entity_type;
 
 
     explicit ComponentPool(size_type dim = 4098) noexcept
     explicit ComponentPool(size_type dim = 4098) noexcept
+#ifdef _MSC_VER
+        : pools(Pool<Component>{dim}, Pool<Components>{dim}...)
+#else
         : pools{Pool<Component>{dim}, Pool<Components>{dim}...}
         : pools{Pool<Component>{dim}, Pool<Components>{dim}...}
+#endif
     {
     {
         assert(!(dim < 0));
         assert(!(dim < 0));
     }
     }