Commit Graph

59 Commits (159ae5e47ceff0a44c1021379cbca601b36f4fb0)

Author SHA1 Message Date
Andrea Pappacoda ce859cf526
build: remove -fconcepts
It was needed on GCC versions not supporting `-std=c++20`, but GCC 10 and newer (required to compile yuzu) don't need it anymore
3 years ago
Alexandre Bouvier c8b358dba2 cmake: make tests optional 3 years ago
Morph c61857286d CMakeLists: Specify /Zm200 when compiling in MSVC
This increases the memory heap size for constructing precompiled headers to 2x the default.
3 years ago
Morph 3f8d74dec1 CMakeLists: Document the /GT compile option 3 years ago
Fernando Sahmkow 13471ddf86 Build System: Build with JCC Erratum Mitigation 3 years ago
ReinUsesLisp 2d48a7b4d0 shader: Initial recompiler work 4 years ago
Morph ebb82b0b83 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
4 years ago
bunnei bf50345d4c
Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
4 years ago
Morph 3a3f4983b6 CMakeLists: Enforce C4189
This supplements C4101 by detecting initialized but unreferenced local variables
4 years ago
Morph 248a146ab7 CMakeLists: Disable all warnings for external headers
This lets us avoid needing to wrap external headers with #pragma warning directives for warnings we treat as errors and avoids generating warnings for external code.

Thanks to MerryMage for pointing this out.
4 years ago
Morph 0eae00e263 CMakeLists: Enforce C4018, C4267, C4305, C4389 4 years ago
Morph d001687ca6 CMakeLists: Enforce C4715 on MSVC
This is similar to -Werror=return-type
4 years ago
Morph e7038344aa CMakeLists: Add /utf-8 compile option for MSVC
Ensures that the source and execution character sets are in UTF-8
4 years ago
ReinUsesLisp 748551dafb cmake: Enforce -Warray-bounds and -Wmissing-field-initializers globally 4 years ago
LC 6676687694
Merge pull request #5352 from ReinUsesLisp/remove-tester
cmake: Remove yuzu_tester
4 years ago
ReinUsesLisp af540b0057 cmake: Remove yuzu_tester
We never ended up using yuzu_tester.
Removing it saves code duplication with yuzu_cmd, and distribution size on
prebuilt packages.

For unit testing, we can use catch2 from guest code and dump the results
to a file. Then execute yuzu from a script on ci if we want this to be
automated.
4 years ago
ReinUsesLisp 06e0506cb3 cmake: Enforce -Wunused-function code-base wide 4 years ago
Morph 2b98da2ed4 cmake: Enforce -Werror=switch and -Werror=unused-variable 4 years ago
Morph 25724898d0 cmake: Enforce C4101
This matches GCC's -Wunused-variable
4 years ago
ReinUsesLisp d7128845c9 cmake: Enforce C4062, C4265, C4388, and C5038
This should match some warnings we treat as errors on gcc and clang,
caching bugs early and reducing the number of instances where we have to
edit commits to make CI happy when developing from Windows.
4 years ago
ReinUsesLisp ac2e2ebe97 cmake: Enforce -Wuninitialized 4 years ago
comex 32f3b6b865 CMakeLists: disable -Winvalid-offsetof
This Clang warning complains when offsetof is used on a
non-standard-layout type (i.e. any class using various C++ features),
even though it works fine (and is not undefined behavior as of C++17).
4 years ago
Lioncash 14a97d082e CMakeLists: Resolve MSVC build failures
Prevents the compiler tripping up about Windows headers.
4 years ago
Lioncash 11d0a6e7b8 General: Catch more expressions with no effect on MSVC
MSVC lets us fine-tune catching expressions with no side-effects a
little more.
4 years ago
Lioncash 26547d3e3b General: Make ignoring a discarded return value an error
Allows our CI to catch more potential bugs. This also removes the
[[nodiscard]] attribute of IOFile's Open member function. There are
cases where a file may want to be opened, but have the status of it
checked at a later time.
4 years ago
Lioncash dd2ff23621 CMakeLists: Resolve #4478
This switch is enabled by default in all recent versions of GCC and
Clang.
5 years ago
David 9b75481755
ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer

With the support of C++20, we can use concepts to deduce if a type is an STL container or not.

* More agressive concept for stl containers

* Add -fconcepts

* Move to common namespace

* Add Common::IsBaseOf
5 years ago
Fernando Sahmkow 626cc44d7a Build System: Fix GCC & MINGW Build. 5 years ago
Lioncash dcbb39cdae CMakeLists: Make missing declarations a compile-time error
Ensures that our code always has its linkage explicit.
5 years ago
Lioncash fc5df84581 CMakeLists: Enable -Wmissing-declarations on Linux builds
Allows catching cases where internal linkage isn't specified for helper
functions when they should be marked as such.
5 years ago
Lioncash 1c340c6efa CMakeLists: Specify -Wextra on linux builds
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.

We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).

While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
5 years ago
Lioncash 213fff67bc CMakeLists: Make -Wreorder a compile-time error
This can result in silent logic bugs within code, and given the amount
of times these kind of warnings are caused, they should be flagged at
compile-time so no new code is submitted with them.
5 years ago
Léo Lam f98cd210ab CMake: Create thin archives on Linux
This significantly reduces unnecessary disk writes and space usage
when building Citra.

libcore.a is now only ~1MB rather than several hundred megabytes.
5 years ago
Zach Hilman c508a8d82a yuzu_tester: Add project subdirectory 6 years ago
Mat M 8b933e77cd
Merge pull request #2460 from lioncash/volatile
CMakeLists: Specify /volatile:iso for MSVC
6 years ago
Mat M 3e8e335a5c
Merge pull request #2450 from lioncash/warn-level
CMakeLists: Explicitly specify -Wall for the non-MSVC case
6 years ago
Lioncash c4d03f0154 CMakeLists: Specify /volatile:iso for MSVC
By default, MSVC doesn't use standards-compliant volatile semantics.
This makes it behave in a standards-compliant manner, making
expectations more uniform across compilers.
6 years ago
Lioncash 70c6506a7e src/CMakeLists: Add /Zc:externConstexpr to the MSVC build flags
The C++ standard allows constexpr variables declared with the extern
keyword to have external linkage. Previously MSVC wasn't abiding by
this. This just makes the compiler more standards compliant during
builds.

Given we currently don't make use of anything that would break by this,
this is safe to enable.
6 years ago
Lioncash 6ca7241bd9 src/CMakeLists: Vertically order compilation flags
Makes it much nicer to visually scan the options. This also starts the
flag descriptions from the same column for the same reason.
6 years ago
Lioncash 5d0dca73c6
CMakeLists: Explicitly specify -Wall for the non-MSVC case
Ensures that -Wall is always active as a compilation flag.
6 years ago
Lioncash 819c21d99e CMakeLists: Ensure we specify Unicode as the codepage on Windows
Previously we were building with MBCS, which is pretty undesirable. We
want the application to be Unicode-aware in general.

Currently, we make the command line variant of yuzu use ANSI variants of
the non-standard getopt functions that we link in for Windows, given we
only have an ANSI option-set.

We should really replace getopt with a library that we make all build
types of yuzu link in, but this will have to do for the time being.
6 years ago
Lioncash e6612d6d8d CMakeLists: Move off of modifying CMAKE_*-related flags
Modifying CMAKE_* related flags directly applies those changes to every
single CMake target. This includes even the targets we have in the
externals directory.

So, if we ever increased our warning levels, or enabled particular ones,
or enabled any other compilation setting, then this would apply to
externals as well, which is often not desirable.

This makes our compilation flag setup less error prone by only applying
our settings to our targets and leaving the externals alone entirely.

This also means we don't end up clobbering any provided flags on the
command line either, allowing users to specifically use the flags they
want.
6 years ago
Lioncash 13bc74e957 CMakeLists: Move compilation flags into the src directory
We generally shouldn't be hijacking CMAKE_CXX_FLAGS, etc as a means to
append flags to the targets, since this adds the compilation flags to
everything, including our externals, which can result in weird issues
and makes the build hierarchy fragile.

Instead, we want to just apply these compilation flags to our targets,
and let those managing external libraries to properly specify their
compilation flags.

This also results in us not getting as many warnings, as we don't raise
the warning level on every external target.
6 years ago
fearlessTobi 4d139943f2 Port web_service from Citra 6 years ago
bunnei ab756fd068 audio_core: Add initial code for keeping track of audout state. 7 years ago
James Rowe ebf9a784a9 Massive removal of unused modules 7 years ago
bunnei 33b012e86b web_service: Add CMake flag to enable. 8 years ago
bunnei 52fbe1e10c web_service: Add skeleton project. 8 years ago
B3n30 2e37ce01c9 Implement basic virtual Room support based on enet (#2803)
* Added support for network with ENet lib,

connecting is possible, but data can't be sent, yet.

* fixup! Added support for network with ENet lib,

* fixup! CLang

* fixup! Added support for network with ENet lib,

* fixup! Added support for network with ENet lib,

* fixup! Clang format

* More fixups!

* Moved ENetHost* and ENetPeer* into pimpl classes

* fixup! Moved ENetHost* and ENetPeer* into pimpl classes

* fixup! Clang again

* fixup! Moved ENetHost* and ENetPeer* into pimpl classes

* fixup! Moved ENetHost* and ENetPeer* into pimpl classes

* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
8 years ago
wwylele 38e800f70d InputCommon: add Keyboard 8 years ago