Merge branch 'master' of https://github.com/falkTX/sfizz into falkTX-master

This commit is contained in:
paulfd 2019-09-16 19:01:09 +02:00
commit 8d3e8299dd
6 changed files with 54 additions and 7 deletions

10
.gitignore vendored
View file

@ -7,3 +7,13 @@ build-debug
.vscode .vscode
perf.data perf.data
perf.data.old perf.data.old
Makefile
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
compile_commands.json
*.a
clients/sfizz_jack
clients/sfzprint

View file

@ -8,6 +8,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT ANDROID)
add_compile_options(-stdlib=libc++) add_compile_options(-stdlib=libc++)
# Presumably need the above for linking too, maybe other options missing as well # Presumably need the above for linking too, maybe other options missing as well
add_link_options(-stdlib=libc++) # New command on CMake master, not in 3.12 release add_link_options(-stdlib=libc++) # New command on CMake master, not in 3.12 release
else()
add_link_options(-lstdc++fs)
endif() endif()
if (UNIX) if (UNIX)

View file

@ -23,8 +23,8 @@
#include "Parser.h" #include "Parser.h"
#include "StringViewHelpers.h" #include "StringViewHelpers.h"
#include "filesystem.h"
#include <iostream> #include <iostream>
#include <filesystem>
#include <string_view> #include <string_view>
#include <absl/flags/parse.h> #include <absl/flags/parse.h>
#include <absl/types/span.h> #include <absl/types/span.h>

View file

@ -27,9 +27,9 @@
#include "LeakDetector.h" #include "LeakDetector.h"
#include "AudioBuffer.h" #include "AudioBuffer.h"
#include "Voice.h" #include "Voice.h"
#include "filesystem.h"
#include "readerwriterqueue.h" #include "readerwriterqueue.h"
#include <absl/container/flat_hash_map.h> #include <absl/container/flat_hash_map.h>
#include <filesystem>
#include <optional> #include <optional>
#include <string_view> #include <string_view>
#include <thread> #include <thread>

View file

@ -23,7 +23,7 @@
#pragma once #pragma once
#include "Opcode.h" #include "Opcode.h"
#include <filesystem> #include "filesystem.h"
#include <map> #include <map>
#include <regex> #include <regex>
#include <string> #include <string>

35
sfizz/filesystem.h Normal file
View file

@ -0,0 +1,35 @@
// Copyright (c) 2019, Paul Ferrand
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once
#if defined(__cpp_lib_filesystem) || (defined(__has_include) && __has_include(<filesystem>))
#include <filesystem>
#elif defined(__cpp_lib_experimental_filesystem) || (defined(__has_include) && __has_include(<experimental/filesystem>))
#include <experimental/filesystem>
namespace std {
namespace filesystem = std::experimental::filesystem;
}
#else
#error no filesystem support
#endif