Skip to content

Commit

Permalink
CMakeLists.txt: actually set deafult CMAKE_BUILD_TYPE to Release
Browse files Browse the repository at this point in the history
workflow: use the deafult CMake build type.
  • Loading branch information
Asd-g committed Jan 6, 2024
1 parent 2f78712 commit 234f693
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Build AviSynth/VapourSynth plugin
run: |
cmake -S . -B build_avs -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_DAV1D=OFF -DENABLE_MFX=OFF -DENABLE_XML2S=OFF -DBUILD_VS_PLUGIN=OFF
cmake -S . -B build_avs -G Ninja -DENABLE_DAV1D=OFF -DENABLE_MFX=OFF -DENABLE_XML2S=OFF -DBUILD_VS_PLUGIN=OFF
cmake --build build_avs -j 2
cmake -S . -B build_vs -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_DAV1D=OFF -DENABLE_MFX=OFF -DENABLE_XML2S=OFF -DBUILD_AVS_PLUGIN=OFF
cmake -S . -B build_vs -G Ninja -DENABLE_DAV1D=OFF -DENABLE_MFX=OFF -DENABLE_XML2S=OFF -DBUILD_AVS_PLUGIN=OFF
cmake --build build_vs -j 2
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 3.1)

if (NOT CMAKE_GENERATOR MATCHES "Visual Studio")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
endif()

project(LSMASHSource)

option(BUILD_AVS_PLUGIN "Build plugin for AviSynth" ON)
Expand Down Expand Up @@ -170,10 +176,6 @@ endif()
target_compile_features(LSMASHSource PRIVATE cxx_std_17)

if (NOT CMAKE_GENERATOR MATCHES "Visual Studio")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()

string(TOLOWER ${CMAKE_BUILD_TYPE} build_type)
if (build_type STREQUAL debug)
target_compile_definitions(LSMASHSource PRIVATE DEBUG_BUILD)
Expand Down

0 comments on commit 234f693

Please sign in to comment.