From 032b7faa491acdaed207f72edfe089326663dbbb Mon Sep 17 00:00:00 2001 From: seleznevae Date: Sat, 17 Mar 2018 21:43:48 +0300 Subject: [PATCH] [A] Added appveyour --- CMakeLists.txt | 5 +++-- appveyor.yml | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 appveyor.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 4607e82..b5a55a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(libfort) option(FORT_TEST_BUILD "Test build with sanitizers and small library stack size" ON) option(FORT_GCC_BUILD "Build with gcc" ON) +option(CERAII_MSVC_BUILD "Build with msvc" OFF) set(CMAKE_VERBOSE_MAKEFILE ON) @@ -49,11 +50,11 @@ target_link_libraries(libfort_test cmocka) -if(FORT_TEST_BUILD) +if(FORT_TEST_BUILD AND NOT CERAII_MSVC_BUILD) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") if(FORT_GCC_BUILD) target_link_libraries(${PROJECT_NAME}_example asan) target_link_libraries(${PROJECT_NAME}_test asan) endif(FORT_GCC_BUILD) -endif(FORT_TEST_BUILD) +endif(FORT_TEST_BUILD AND NOT CERAII_MSVC_BUILD) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..ca15e9c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,24 @@ +version: '{build}' + +image: Visual Studio 2017 + +platform: + - x64 + +configuration: + - Debug + +install: + - git submodule update --init --recursive + +before_build: + - dir + - cd build + - dir + - cmake -G "Visual Studio 15 2017 Win64" .. -DFORT_TEST_BUILD=OFF -DFORT_GCC_BUILD=OFF -DFORT_MSVC_BUILD=ON + +build: + project: $(APPVEYOR_BUILD_FOLDER)\build\$(APPVEYOR_PROJECT_NAME).sln + +test_script: +- '%APPVEYOR_BUILD_FOLDER%\build\Debug\libfort_test.exe' \ No newline at end of file