diff --git a/CMakeLists.txt b/CMakeLists.txt index 52aed26..9ddd49a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,11 @@ if (NOT MSVC) set (CMAKE_RC_COMPILE_OBJECT "${CMAKE_RC_COMPILER} -O coff -I${CMAKE_CURRENT_SOURCE_DIR} ") endif () -add_definitions ("-Wall") +if (NOT MSVC) + add_definitions ("-Wall") +else () + add_definitions ("-W4") +endif () option(UNICODE "Compile with UNICODE support" OFF) if (UNICODE) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..24e01ac --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,44 @@ +version: #{build} + +os: + - Windows Server 2012 R2 + +environment: + matrix: + - GENERATOR: "Visual Studio 10 2010" + UNICODE: ON + - GENERATOR: "Visual Studio 10 2010" + UNICODE: OFF + - GENERATOR: "Visual Studio 11 2012" + UNICODE: ON + - GENERATOR: "Visual Studio 11 2012" + UNICODE: OFF + - GENERATOR: "Visual Studio 12 2013" + UNICODE: ON + - GENERATOR: "Visual Studio 12 2013" + UNICODE: OFF + +platform: + - x86 + - x64 + +configuration: + - Debug + +build: + verbosity: normal + +build_script: + - ps: if($env:PLATFORM -eq "x64") { $env:CMAKE_GEN_SUFFIX=" Win64" } + - cmake "-G%GENERATOR%%CMAKE_GEN_SUFFIX%" -H. -Bbuild + - cmake --build build --config %CONFIGURATION% + +before_test: + - copy /y build\example\DllLoader\%CONFIGURATION%\DllLoader.exe build\example\DllLoader\ + - copy /y build\example\DllLoader\%CONFIGURATION%\DllLoaderLoader.exe build\example\DllLoader\ + - copy /y build\example\SampleDLL\%CONFIGURATION%\SampleDLL.dll build\example\SampleDLL\ + +test_script: + - cd build\example\DllLoader + - DllLoader.exe + - DllLoaderLoader.exe