From: <man...@us...> - 2013-07-06 23:14:30
|
Revision: 2512 http://sourceforge.net/p/modplug/code/2512 Author: manxorist Date: 2013-07-06 23:14:22 +0000 (Sat, 06 Jul 2013) Log Message: ----------- [Ref] libopenmpt: Add separate project configuration for test suite and do not build tests by default for VS2010. Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/libopenmpt/libopenmpt.cpp trunk/OpenMPT/libopenmpt/libopenmpt.sln trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj Property Changed: ---------------- trunk/OpenMPT/libopenmpt/ Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2013-07-06 22:47:52 UTC (rev 2511) +++ trunk/OpenMPT/common/BuildSettings.h 2013-07-06 23:14:22 UTC (rev 2512) @@ -132,8 +132,11 @@ #elif defined(LIBOPENMPT_BUILD) +#if !defined(_MSC_VER) || defined(LIBOPENMPT_BUILD_TEST) #define ENABLE_TESTS -//#define MODPLUG_NO_FILESAVE +#else +#define MODPLUG_NO_FILESAVE +#endif //#define NO_LOGGING #define NO_ARCHIVE_SUPPORT //#define NO_FILEREADER_STD_ISTREAM Index: trunk/OpenMPT/libopenmpt =================================================================== --- trunk/OpenMPT/libopenmpt 2013-07-06 22:47:52 UTC (rev 2511) +++ trunk/OpenMPT/libopenmpt 2013-07-06 23:14:22 UTC (rev 2512) Property changes on: trunk/OpenMPT/libopenmpt ___________________________________________________________________ Modified: svn:ignore ## -1,17 +1,18 ## +*.d DebugStatic Release ReleaseStatic +Test ipch libopenmpt.opensdf libopenmpt.sdf libopenmpt.suo libopenmpt.vcxproj.user +libopenmpt_foobar2000.opensdf libopenmpt_foobar2000.sdf +libopenmpt_foobar2000.suo libopenmpt_foobar2000.vcxproj.user libopenmpt_settings-Debug libopenmpt_settings-Release libopenmpt_settings.vcxproj.user -libopenmpt_foobar2000.opensdf -libopenmpt_foobar2000.suo x64 -*.d Modified: trunk/OpenMPT/libopenmpt/libopenmpt.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.cpp 2013-07-06 22:47:52 UTC (rev 2511) +++ trunk/OpenMPT/libopenmpt/libopenmpt.cpp 2013-07-06 23:14:22 UTC (rev 2512) @@ -25,6 +25,23 @@ } // namespace openmpt +#if defined( LIBOPENMPT_BUILD_TEST ) + +int main( int argc, char * argv [] ) { + try { + MptTest::DoTests(); + } catch ( const std::exception & e ) { + std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl; + return 1; + } catch ( ... ) { + std::cerr << "TEST ERROR: unknown exception" << std::endl; + return 1; + } + return 0; +} + +#endif // LIBOPENMPT_BUILD_TEST + #if defined( LIBOPENMPT_BUILD_DLL ) #if defined( _WIN32 ) Modified: trunk/OpenMPT/libopenmpt/libopenmpt.sln =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-07-06 22:47:52 UTC (rev 2511) +++ trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-07-06 23:14:22 UTC (rev 2512) @@ -16,6 +16,8 @@ Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 + Test|Win32 = Test|Win32 + Test|x64 = Test|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -26,6 +28,10 @@ {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|Win32.Build.0 = Release|Win32 {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|x64.ActiveCfg = Release|x64 {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|x64.Build.0 = Release|x64 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|Win32.ActiveCfg = Test|Win32 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|Win32.Build.0 = Test|Win32 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|x64.ActiveCfg = Test|x64 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|x64.Build.0 = Test|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 @@ -34,12 +40,19 @@ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = ReleaseWithoutAsm|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Test|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Test|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Test|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Test|x64.Build.0 = ReleaseWithoutAsm|x64 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|Win32.ActiveCfg = Debug|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|Win32.Build.0 = Debug|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|x64.ActiveCfg = Debug|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|Win32.ActiveCfg = Release|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|Win32.Build.0 = Release|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|x64.ActiveCfg = Release|Win32 + {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Test|Win32.ActiveCfg = Release|Win32 + {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Test|Win32.Build.0 = Release|Win32 + {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Test|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-07-06 22:47:52 UTC (rev 2511) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-07-06 23:14:22 UTC (rev 2512) @@ -33,6 +33,14 @@ <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Test|Win32"> + <Configuration>Test</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Test|x64"> + <Configuration>Test</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{812A654D-99BE-4D13-B97F-86332AD3E363}</ProjectGuid> @@ -65,12 +73,24 @@ <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> @@ -101,9 +121,15 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> @@ -114,10 +140,18 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <OutDir>bin\</OutDir> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'"> + <OutDir>bin\</OutDir> + <TargetName>$(ProjectName)-test</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <OutDir>bin\</OutDir> <TargetName>$(ProjectName)64</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'"> + <OutDir>bin\</OutDir> + <TargetName>$(ProjectName)64-test</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> @@ -228,6 +262,34 @@ </Command> </PostBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Full</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <FloatingPointModel>Fast</FloatingPointModel> + <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..;../common;../common/svn_version_subwcrev;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <StringPooling>true</StringPooling> + <WholeProgramOptimization>false</WholeProgramOptimization> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <DelayLoadDLLs>libopenmpt_settings.dll</DelayLoadDLLs> + <SubSystem>Console</SubSystem> + </Link> + <PreBuildEvent> + <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\common\svn_version_subwcrev\svn_version.h || del ..\common\svn_version_subwcrev\svn_version.h || true</Command> + </PreBuildEvent> + <PostBuildEvent /> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -258,6 +320,34 @@ </Command> </PostBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Full</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <FloatingPointModel>Fast</FloatingPointModel> + <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..;../common;../common/svn_version_subwcrev;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <StringPooling>true</StringPooling> + <WholeProgramOptimization>false</WholeProgramOptimization> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <DelayLoadDLLs>libopenmpt_settings.dll</DelayLoadDLLs> + <SubSystem>Console</SubSystem> + </Link> + <PreBuildEvent> + <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\common\svn_version_subwcrev\svn_version.h || del ..\common\svn_version_subwcrev\svn_version.h || true</Command> + </PreBuildEvent> + <PostBuildEvent /> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -467,7 +557,9 @@ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">CompileAsC</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">CompileAsC</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">CompileAsC</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsC</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Test|x64'">CompileAsC</CompileAs> </ClCompile> <ClCompile Include="libopenmpt_version.cpp" /> <ClCompile Include="libopenmpt_winamp.cpp" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |