Commit graph

80 commits

Author SHA1 Message Date
Liam
2f2f9326f3 cmake: make room server optional 2022-12-28 17:18:27 -05:00
liamwhite
c53a3d3f37 Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
2022-12-03 14:10:06 -05:00
ameerj
7af574ff01 CMake: Disable PCH on MSVC + Buildcache configs 2022-11-29 23:01:32 -05:00
ameerj
bbf3e7f313 CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
Liam
5a712bb51a general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
Morph
c7e799edb0 CMakeLists: Disable -Wbraced-scalar-init on Clang
Clang erroneously emits this warning when using designated initializers.
2022-10-22 15:02:04 -04:00
Morph
ef7ec7ffa1 CMakeLists: Enforce C5233 on MSVC
This is similar to Clang's -Wunused-lambda-capture
2022-10-22 15:02:04 -04:00
Morph
9a8db147b2 CMakeLists: Disable C4100 and C4324
Disabling C4100 is similar to -Wno-unused-parameter
2022-10-22 15:02:04 -04:00
Morph
dc61af8eb1 CMakeLists: Remove redundant warnings
These warnings are already included in /W3.
2022-10-22 15:02:04 -04:00
Morph
ea5b59b539 CMakeLists: Treat MSVC warnings as errors 2022-10-22 15:02:04 -04:00
Morph
9fba74d245 general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
Morph
4bad20dc5f CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
Morph
4531c0fb72 CMakeLists: Consolidate all unused warnings into -Wunused 2022-10-22 15:02:04 -04:00
Morph
4cc8c4beab CMakeLists: Treat -Wall and -Wextra as errors 2022-10-22 15:02:04 -04:00
Fernando Sahmkow
199642590c NVHOST_CTRl: Implement missing method and fix some stuffs. 2022-10-06 21:00:51 +02:00
FearlessTobi
3613aa8624 dedicated_room: Initial implementation 2022-08-15 20:25:41 +02:00
Andrea Pappacoda
6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
FearlessTobi
00526e94d1 network: Add initial files and enet dependency 2022-07-25 21:57:14 +02:00
liushuyu
dd009ddf84 CI: fix caching 2022-07-04 21:21:56 -06:00
Morph
e647661b76 CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-06-13 18:19:23 -04:00
Morph
b17993ecd3 CMakeLists: Enforce C4505 and C5245
These are similar to Wunused-function on gcc/clang
2022-04-07 23:00:04 -04:00
Andrea Pappacoda
4490ee8c0a 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
2022-04-05 20:52:11 +02:00
Alexandre Bouvier
4b791bcad7 cmake: make tests optional 2022-01-12 00:36:20 +01:00
Morph
ecc71b636b CMakeLists: Specify /Zm200 when compiling in MSVC
This increases the memory heap size for constructing precompiled headers to 2x the default.
2021-12-06 19:31:26 -05:00
Morph
a505c3c70a CMakeLists: Document the /GT compile option 2021-10-28 20:43:46 -04:00
Fernando Sahmkow
d240a8bb35 Build System: Build with JCC Erratum Mitigation 2021-09-15 21:32:44 +02:00
ReinUsesLisp
e6892e9da6 shader: Initial recompiler work 2021-07-22 21:51:21 -04:00
Morph
64f22684d4 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
bunnei
88cb6c26f3 Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
2021-07-05 17:09:23 -07:00
Morph
3be5ca932a CMakeLists: Enforce C4189
This supplements C4101 by detecting initialized but unreferenced local variables
2021-07-03 05:51:31 -04:00
Morph
4e2b26923a 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.
2021-06-28 14:24:28 -04:00
Morph
8f0cd4d87d CMakeLists: Enforce C4018, C4267, C4305, C4389 2021-06-28 14:20:25 -04:00
Morph
49378192aa CMakeLists: Enforce C4715 on MSVC
This is similar to -Werror=return-type
2021-05-17 03:48:58 -04:00
Morph
05ddff8336 CMakeLists: Add /utf-8 compile option for MSVC
Ensures that the source and execution character sets are in UTF-8
2021-03-05 01:46:56 -05:00
ReinUsesLisp
ae349957c3 cmake: Enforce -Warray-bounds and -Wmissing-field-initializers globally 2021-01-24 17:31:29 -03:00
LC
24e21f88d3 Merge pull request #5352 from ReinUsesLisp/remove-tester
cmake: Remove yuzu_tester
2021-01-15 01:48:02 -05:00
ReinUsesLisp
4b3ae78de7 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.
2021-01-15 03:14:44 -03:00
ReinUsesLisp
4bd143ca76 cmake: Enforce -Wunused-function code-base wide 2021-01-15 03:09:48 -03:00
Morph
854e3e0b00 cmake: Enforce -Werror=switch and -Werror=unused-variable 2021-01-13 01:57:18 -05:00
Morph
02f068cd8f cmake: Enforce C4101
This matches GCC's -Wunused-variable
2021-01-10 01:16:25 -05:00
ReinUsesLisp
4154a16ce4 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.
2021-01-09 02:19:17 -03:00
ReinUsesLisp
64f651bfa0 cmake: Enforce -Wuninitialized 2020-12-30 02:58:58 -03:00
comex
674da91842 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).
2020-11-27 17:42:02 -05:00
Lioncash
b712b3684a CMakeLists: Resolve MSVC build failures
Prevents the compiler tripping up about Windows headers.
2020-10-30 14:57:58 -04:00
Lioncash
5c7f20bc57 General: Catch more expressions with no effect on MSVC
MSVC lets us fine-tune catching expressions with no side-effects a
little more.
2020-10-30 00:13:26 -04:00
Lioncash
0525232875 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.
2020-10-30 00:13:21 -04:00
Lioncash
7967b2cb56 CMakeLists: Resolve #4478
This switch is enabled by default in all recent versions of GCC and
Clang.
2020-08-03 11:21:24 -04:00
David
ecaac59acd 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
2020-08-03 07:28:54 -04:00
Fernando Sahmkow
8ef375e772 Build System: Fix GCC & MINGW Build. 2020-06-27 11:36:28 -04:00
Lioncash
b5c04e2bca CMakeLists: Make missing declarations a compile-time error
Ensures that our code always has its linkage explicit.
2020-04-16 23:43:41 -04:00