chore: remove skeleton build mode and stub #ifdef scaffolding
Drop the M0 no-deps skeleton preset and all VOICECAT_HAS_NET/AUDIO/OPUS/NS guards that it required. Every subsystem is fully implemented; the stub #else paths were dead code that added noise to every header and source file. - CMakePresets.json: remove skeleton configure/build/test entries - CMakeLists.txt (root/core/tests): remove VOICECAT_USE_VCPKG_DEPS option and guards; all targets now build unconditionally - 17 C++ source files: unwrap HAS_* guards, delete stub #else blocks - apm_processor.cpp: delete ApmPassthrough no-op class; create() always returns RnnoiseProcessor - 18 test files: remove HAS_* guards and stub int main() skip bodies - docs/building.md: remove skeleton from preset table and prose VOICECAT_HAS_LOOPBACK (Windows WASAPI loopback platform gate) unchanged. 29/29 ctest green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include "conn_session.h"
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
@@ -845,5 +843,3 @@ void ConnSession::send_disconnect_and_close(uint32_t code, const std::string& re
|
||||
}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#ifndef VOICECAT_SERVER_CONN_SESSION_H
|
||||
#define VOICECAT_SERVER_CONN_SESSION_H
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
@@ -184,5 +182,4 @@ class ConnSession : public std::enable_shared_from_this<ConnSession> {
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
#endif // VOICECAT_SERVER_CONN_SESSION_H
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "db.h"
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <random>
|
||||
@@ -612,5 +610,3 @@ int64_t Database::now_unix() const {
|
||||
}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#ifndef VOICECAT_SERVER_DB_H
|
||||
#define VOICECAT_SERVER_DB_H
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -152,5 +150,4 @@ class Database {
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
#endif // VOICECAT_SERVER_DB_H
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "identity.h"
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <filesystem>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -35,5 +33,3 @@ bool ServerIdentityManager::init(const std::filesystem::path& data_dir,
|
||||
}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#ifndef VOICECAT_SERVER_IDENTITY_H
|
||||
#define VOICECAT_SERVER_IDENTITY_H
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
@@ -36,5 +34,4 @@ class ServerIdentityManager {
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
#endif // VOICECAT_SERVER_IDENTITY_H
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "media_relay.h"
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
@@ -179,5 +177,3 @@ void MediaRelay::on_udp_frame(const uint8_t* data, size_t len,
|
||||
}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#ifndef VOICECAT_SERVER_MEDIA_RELAY_H
|
||||
#define VOICECAT_SERVER_MEDIA_RELAY_H
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <memory>
|
||||
|
||||
#define ASIO_STANDALONE 1
|
||||
@@ -71,5 +69,4 @@ class MediaRelay {
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
#endif // VOICECAT_SERVER_MEDIA_RELAY_H
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include <cstdio>
|
||||
#include <csignal>
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#define ASIO_STANDALONE 1
|
||||
#include <asio.hpp>
|
||||
#include <asio/signal_set.hpp>
|
||||
@@ -224,21 +222,3 @@ void Server::stop() {
|
||||
}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#else // !VOICECAT_HAS_NET
|
||||
|
||||
namespace voicecat::server {
|
||||
|
||||
int Server::run() {
|
||||
std::fprintf(stderr, "[server] stub: VOICECAT_HAS_NET not defined (build with dev preset)\n");
|
||||
std::printf(" server_name : %s\n", cfg_.server_name.c_str());
|
||||
std::printf(" data_dir : %s\n", cfg_.data_dir.c_str());
|
||||
std::printf(" bind_port : %u\n", cfg_.bind_port);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Server::stop() {}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "session_registry.h"
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
@@ -554,5 +552,3 @@ std::optional<voicecat::v1::AudioConfig> SessionRegistry::channel_audio_config(
|
||||
}
|
||||
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_HAS_NET
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#ifndef VOICECAT_SERVER_SESSION_REGISTRY_H
|
||||
#define VOICECAT_SERVER_SESSION_REGISTRY_H
|
||||
|
||||
#ifdef VOICECAT_HAS_NET
|
||||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
@@ -223,4 +221,3 @@ class SessionRegistry {
|
||||
} // namespace voicecat::server
|
||||
|
||||
#endif // VOICECAT_SERVER_SESSION_REGISTRY_H
|
||||
#endif // VOICECAT_SERVER_SESSION_REGISTRY_H
|
||||
|
||||
Reference in New Issue
Block a user