Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ target_include_directories(sqlite_orm INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

include(ucm)

if (MSVC)
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
add_compile_options(/EHsc)

if ("${CMAKE_GENERATOR}" MATCHES "(Win64|x64)")
message(STATUS "Add /bigobj flag to compiler")
add_compile_options(/bigobj)
endif()
endif()

ucm_print_flags()
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

# Tests
include(CTest)
if(SqliteOrm_BuildTests AND BUILD_TESTING)
Expand Down
42 changes: 42 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2012-2019 Sebastien Rombauts (sebastien.rombauts@gmail.com)

# build format
version: "{build}"

# scripts that run after cloning repository
install:
- git submodule update --init --recursive

image:
- Visual Studio 2017

# configurations to add to build matrix
# TODO: MinGW Makefiles and MSYS Makefiles
configuration:
- Debug
- Release

environment:
matrix:
- arch: Win32
- arch: Win64

init:
- echo %APPVEYOR_BUILD_WORKER_IMAGE% - %configuration% - %arch%
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (set vs=Visual Studio 15 2017)
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (set vs=Visual Studio 14 2015)
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (set vs=Visual Studio 12 2013)
- if "%arch%"=="Win64" (set generator="%vs% Win64")
- if "%arch%"=="Win32" (set generator="%vs%")
- echo %generator%

# scripts to run before build
before_build:
- mkdir compile
- cd compile
- cmake -DSqliteOrm_BuildTests=ON .. -G %generator%

# build examples, and run tests (ie make & make test)
build_script:
- cmake --build . --config %configuration%
- ctest --output-on-failure --build-config %configuration%
Loading