Skip to content

Commit

Permalink
cmake: default werror and tests to off, and enable on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmattkc committed Jul 26, 2022
1 parent f0ebbda commit d1ec2b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
env:
DOWNLOAD_TOOL: curl -fLOSs --retry 2 --retry-delay 60
UPLOAD_TOOL: curl -X POST --retry 2 --retry-delay 60
CMAKE_ARGS: -DUSE_WERROR=ON -DBUILD_TESTS=ON

jobs:
linux:
Expand Down Expand Up @@ -73,7 +74,8 @@ jobs:
cmake .. -G "${{ matrix.cmake-gen }}" \
-DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \
-DCMAKE_C_COMPILER="${{ matrix.cc-compiler }}" \
-DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}"
-DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" \
$CMAKE_ARGS
- name: Build
working-directory: build
Expand Down Expand Up @@ -204,7 +206,8 @@ jobs:
working-directory: ${{ runner.workspace }}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}" \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
$CMAKE_ARGS
- name: Build
working-directory: ${{ runner.workspace }}/build
Expand Down Expand Up @@ -356,7 +359,8 @@ jobs:
PATH=$DEP_LOCATION:$DEP_LOCATION/bin:$DEP_LOCATION/include:$DEP_LOCATION/lib:$DEP_LOCATION/crashpad:$PATH \
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.min-deploy }} -G "${{ matrix.cmake-gen }}" \
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.os-arch }}"
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.os-arch }}" \
$CMAKE_ARGS
- name: Build
working-directory: ${{ runner.workspace }}/build
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(olive-editor VERSION 0.2.0 LANGUAGES CXX)

option(BUILD_DOXYGEN "Build Doxygen documentation" OFF)
option(BUILD_TESTS "Build unit tests" ON)
option(USE_WERROR "Error on compile warning" ON)
option(BUILD_TESTS "Build unit tests" OFF)
option(USE_WERROR "Error on compile warning" OFF)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down

0 comments on commit d1ec2b9

Please sign in to comment.