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
23 changes: 23 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
clone_depth: 1
version: "{build}"
image: Visual Studio 2015
platform:
- x86
- x64
environment:
matrix:
- compiler: msvc
install:
- vcpkg install --triplet %PLATFORM%-windows fftw3 libsamplerate libsndfile sdl2
- nuget install clcache -Version 4.1.0
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- mkdir build
- cd build
- ps: $env:CMAKE_PLATFORM="$(if ($env:PLATFORM -eq 'x64') { 'x64' } else { '' })"
- ps: $env:QT_SUFFIX="$(if ($env:PLATFORM -eq 'x64') { '_64' } else { '' })"
- cmake -DUSE_COMPILE_CACHE=ON -DCACHE_TOOL=%APPVEYOR_BUILD_FOLDER%/clcache.4.1.0/clcache-4.1.0/clcache.exe -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=c:/Qt/5.9.5/msvc2015%QT_SUFFIX%;c:/tools/vcpkg/installed/%PLATFORM%-windows -DCMAKE_GENERATOR_PLATFORM="%CMAKE_PLATFORM%" ..
- cmake --build . -- /maxcpucount:4
- cmake --build . --target tests
cache:
- c:/tools/vcpkg/installed
14 changes: 2 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ ELSE()
ENDIF(WANT_DEBUG_FPE)

# check for libsamplerate
FIND_PACKAGE(Samplerate 0.1.8 REQUIRED)
FIND_PACKAGE(Samplerate 0.1.8 MODULE REQUIRED)

# set compiler flags
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
Expand Down Expand Up @@ -546,17 +546,7 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
ENDIF()

# use ccache
OPTION(USE_CCACHE "Use ccache for compilation" OFF)
IF(USE_CCACHE)
FIND_PROGRAM(CCACHE ccache)
IF (CCACHE)
MESSAGE(STATUS "Using ccache found in PATH")
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
ELSE()
MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
ENDIF()
ENDIF()
include(CompileCache)

# make sub-directories
ADD_SUBDIRECTORY(cmake)
Expand Down
25 changes: 25 additions & 0 deletions cmake/modules/CompileCache.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
option(USE_COMPILE_CACHE "Use ccache or clcache for compilation" OFF)

# Compatibility for old option name
if(USE_CCACHE)
set(USE_COMPILE_CACHE ON)
endif()

if(USE_COMPILE_CACHE)
if(MSVC)
set(CACHE_TOOL_NAME clcache)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|AppleClang|Clang)")
set(CACHE_TOOL_NAME ccache)
else()
message(WARNING "Compile cache only available with MSVC or GNU")
endif()

find_program(CACHE_TOOL ${CACHE_TOOL_NAME})
if (CACHE_TOOL)
message(STATUS "Using ${CACHE_TOOL} found for caching")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CACHE_TOOL})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CACHE_TOOL})
else()
message(WARNING "USE_COMPILE_CACHE enabled, but no ${CACHE_TOOL_NAME} found")
endif()
endif()
4 changes: 2 additions & 2 deletions include/AudioSdl.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class AudioSdl : public AudioDevice
surroundSampleFrame * m_outBuf;

#ifdef LMMS_HAVE_SDL2
uint64_t m_currentBufferFramePos;
uint64_t m_currentBufferFramesCount;
size_t m_currentBufferFramePos;
size_t m_currentBufferFramesCount;
#else
Uint8 * m_convertedBuf;
int m_convertedBufPos;
Expand Down