Skip to content

Commit

Permalink
Merge pull request #6 from izvolov/windows-compile-#5
Browse files Browse the repository at this point in the history
refs #5 Компилируемость под Виндой
  • Loading branch information
izvolov committed Aug 16, 2019
2 parents 2213529 + 90d21b5 commit ac7713f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 21 deletions.
24 changes: 24 additions & 0 deletions .appveyor.yml
@@ -0,0 +1,24 @@
version: '{build}'

image: Visual Studio 2017

platform:
- Win32
- x64

configuration:
- Debug
- Release

install:
- git clone https://github.com/onqtam/doctest.git third_party\doctest
- git -C third_party\doctest checkout 2.3.3
- cmake -S third_party\doctest -B Build\third_party\doctest -A %PLATFORM% -DDOCTEST_WITH_TESTS=OFF
- cmake --build Build\third_party\doctest --config Release --target install

build_script:
- cmake -S . -B Build\mylib -A %PLATFORM%
- cmake --build Build\mylib --config %CONFIGURATION% --target mylib-unit-tests

test_script:
- cmake --build Build\mylib --config %CONFIGURATION% --target check
44 changes: 24 additions & 20 deletions CMakeLists.txt
Expand Up @@ -24,26 +24,30 @@ option(MYLIB_COVERAGE "Включить измерение покрытия ко
##
###################################################################################################

add_compile_options(
-Werror

-Wall
-Wextra
-Wpedantic

-Wcast-align
-Wcast-qual
-Wconversion
-Wctor-dtor-privacy
-Wenum-compare
-Wfloat-equal
-Wnon-virtual-dtor
-Wold-style-cast
-Woverloaded-virtual
-Wredundant-decls
-Wsign-conversion
-Wsign-promo
)
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
add_compile_options(
-Werror

-Wall
-Wextra
-Wpedantic

-Wcast-align
-Wcast-qual
-Wconversion
-Wctor-dtor-privacy
-Wenum-compare
-Wfloat-equal
-Wnon-virtual-dtor
-Wold-style-cast
-Woverloaded-virtual
-Wredundant-decls
-Wsign-conversion
-Wsign-promo
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(/W4 /WX)
endif()

if(NOT CMAKE_CXX_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@

Скопировать, поменять "Mylib" на нужное название — и в путь.

[![Статус сборки](https://travis-ci.org/izvolov/mylib.svg?branch=master)](https://travis-ci.org/izvolov/mylib) [![Статус покрытия](https://coveralls.io/repos/github/izvolov/mylib/badge.svg?branch=master)](https://coveralls.io/github/izvolov/mylib?branch=master) [![Попробовать онлайн на Wandbox.org](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/QElvxuMzHgL9fqci)
[![Статус сборки](https://travis-ci.org/izvolov/mylib.svg?branch=master)](https://travis-ci.org/izvolov/mylib) [![Статус сборки под Виндой](https://ci.appveyor.com/api/projects/status/github/izvolov/mylib?branch=master&svg=true)](https://ci.appveyor.com/project/izvolov/mylib/branch/master) [![Статус покрытия](https://coveralls.io/repos/github/izvolov/mylib/badge.svg?branch=master)](https://coveralls.io/github/izvolov/mylib?branch=master) [![Попробовать онлайн на Wandbox.org](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/QElvxuMzHgL9fqci)


Содержание
Expand Down

0 comments on commit ac7713f

Please sign in to comment.