Ver código fonte

build: port solution to VS2013. Muahahaha.

undefined
Sam Hocevar 10 anos atrás
pai
commit
59a157a58c
6 arquivos alterados com 21 adições e 8 exclusões
  1. +5
    -3
      build/vs2012/Lol.Core.Config.props
  2. +3
    -1
      build/vs2012/Lol.Core.Rules.props
  3. +0
    -4
      src/lol/base/array.h
  4. +1
    -0
      src/lolcore.vcxproj
  5. +3
    -0
      src/lolcore.vcxproj.filters
  6. +9
    -0
      test/unit/array.cpp

+ 5
- 3
build/vs2012/Lol.Core.Config.props Ver arquivo

@@ -11,13 +11,15 @@
</PropertyGroup>
<PropertyGroup Label="Configuration">
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
<UseOfMfc>false</UseOfMfc>
<ExceptionHandling>false</ExceptionHandling>
<FloatingPointModel>Fast</FloatingPointModel>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='Win32'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='PS3'" Label="Configuration">
<PlatformToolset>SNC</PlatformToolset>


+ 3
- 1
build/vs2012/Lol.Core.Rules.props Ver arquivo

@@ -12,7 +12,9 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>

<FloatingPointModel>Fast</FloatingPointModel>
<!-- We should use %(RelativeDir) here but for some reason it's an _absolute_ dir. WTF. -->
<ObjectFileName>$(IntDir)/%(Directory)/</ObjectFileName>

<AdditionalIncludeDirectories>$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\src\bullet;$(FlexIncludes);$(BtPhysIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Platform)'=='Win32'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Platform)'=='x64'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>


+ 0
- 4
src/lol/base/array.h Ver arquivo

@@ -24,9 +24,7 @@
#include <new> /* for placement new */
#include <algorithm> /* for std::swap */
#include <stdint.h>
#if 0 // disabled: Visual Studio 2012 doesn't have this
#include <initializer_list>
#endif

namespace lol
{
@@ -49,7 +47,6 @@ public:
{
}

#if 0
inline ArrayBase(std::initializer_list<Element> list)
: m_data(0),
m_count(0),
@@ -59,7 +56,6 @@ public:
for (auto elem : list)
Push(elem);
}
#endif

inline ~ArrayBase()
{


+ 1
- 0
src/lolcore.vcxproj Ver arquivo

@@ -143,6 +143,7 @@
<ClCompile Include="image\codec\dummy-image.cpp" />
<ClCompile Include="image\codec\gdiplus-image.cpp" />
<ClCompile Include="image\codec\ios-image.cpp" />
<ClCompile Include="image\codec\oric-image.cpp" />
<ClCompile Include="image\codec\ps3-image.cpp" />
<ClCompile Include="image\codec\sdl-image.cpp" />
<ClCompile Include="image\codec\zed-image.cpp" />


+ 3
- 0
src/lolcore.vcxproj.filters Ver arquivo

@@ -165,6 +165,9 @@
<ClCompile Include="image\codec\ios-image.cpp">
<Filter>image\codec</Filter>
</ClCompile>
<ClCompile Include="image\codec\oric-image.cpp">
<Filter>image\codec</Filter>
</ClCompile>
<ClCompile Include="image\codec\ps3-image.cpp">
<Filter>image\codec</Filter>
</ClCompile>


+ 9
- 0
test/unit/array.cpp Ver arquivo

@@ -53,6 +53,15 @@ LOLUNIT_FIXTURE(ArrayTest)
LOLUNIT_ASSERT_EQUAL(a[3], 3);
}

LOLUNIT_TEST(ArrayInitializer)
{
Array<int> a = { 2, 4, 6 };

LOLUNIT_ASSERT_EQUAL(a[0], 2);
LOLUNIT_ASSERT_EQUAL(a[1], 4);
LOLUNIT_ASSERT_EQUAL(a[2], 6);
}

LOLUNIT_TEST(ArrayPushWithShift)
{
Array<int> a;


Carregando…
Cancelar
Salvar