Browse Source

build: port solution to VS2013. Muahahaha.

undefined
Sam Hocevar 10 years ago
parent
commit
59a157a58c
6 changed files with 21 additions and 8 deletions
  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 View File

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


+ 3
- 1
build/vs2012/Lol.Core.Rules.props View File

@@ -12,7 +12,9 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild> <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>$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\src\bullet;$(FlexIncludes);$(BtPhysIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Platform)'=='Win32'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Platform)'=='Win32'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Platform)'=='x64'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Platform)'=='x64'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>


+ 0
- 4
src/lol/base/array.h View File

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


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


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


inline ~ArrayBase() inline ~ArrayBase()
{ {


+ 1
- 0
src/lolcore.vcxproj View File

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


+ 3
- 0
src/lolcore.vcxproj.filters View File

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


+ 9
- 0
test/unit/array.cpp View File

@@ -53,6 +53,15 @@ LOLUNIT_FIXTURE(ArrayTest)
LOLUNIT_ASSERT_EQUAL(a[3], 3); 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) LOLUNIT_TEST(ArrayPushWithShift)
{ {
Array<int> a; Array<int> a;


Loading…
Cancel
Save