Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: minor refactoring and fixes #112

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

Tachi107
Copy link
Contributor

@Tachi107 Tachi107 commented Aug 29, 2022

Some bits originated from #75

  • Fix target_precompile_headers() usage; the CemuCommon target exposes the src/Common/precompiled.h precompiled header as part of its public interface with target_precompile_headers(CemuCommon PUBLIC precompiled.h), so all the other targets wanting to use the precompiled header have to link to the CemuCommon target with target_precompile_headers(TargetName PRIVATE CemuCommon).
  • Set the project version to 2.0
  • Set RUNTIME_OUTPUT_DIRECTORY instead of only their _DEBUG and _RELEASE variants, fixing the compilation when neither build types are defined (see Current State Of Linux Builds #1 (comment))
  • Use a consistent indentation style (tabs, like in the .cpp files)
  • Use "modern" variants of some functions, e.g. add_definitions -> add_compile_definitions
  • Use std::enable_if & co instead of boost::

@Tachi107 Tachi107 marked this pull request as ready for review August 29, 2022 13:54
@abouvier
Copy link
Contributor

Could you also add the missing target_link_libraries(CemuAudio PRIVATE fmt::fmt) in src/audio/CMakeLists.txt? :p

@Tachi107
Copy link
Contributor Author

Tachi107 commented Aug 29, 2022

Is it needed? grep --recursive '#include.*fmt' src/audio gave no results

Edit: oh, the library is used without even including the proper headers... Fixing it now

@abouvier
Copy link
Contributor

fmt/format.h is included in src/Common/precompiled.h, which is included almost everywhere with target_precompile_headers.

@Tachi107
Copy link
Contributor Author

I replied to this two hours ago, but GitHub apparently lost my email... I said:

fmt/format.h is included in src/Common/precompiled.h, which is included almost everywhere with target_precompile_headers.

Yeah, but CemuCommon links PUBLICly to fmt::fmt, so all the targets that link to CemuCommon automatically link to fmt::fmt too.

@Tachi107 Tachi107 force-pushed the build-minor-fixes branch 3 times, most recently from f0b6aae to 3c61593 Compare August 31, 2022 11:02
@Tachi107
Copy link
Contributor Author

This is now ready to be merged; I reverted the fmt::fmt change in src/audio/ as it is not needed

@abouvier
Copy link
Contributor

I assure you it's needed. CemuAudio is precisely not linked with CemuCommon.
Uninstall the system fmt package, replace find_package(fmt 7.0.0 REQUIRED) by add_subdirectory(path/to/fmt/src) and you will see.

@Tachi107
Copy link
Contributor Author

I assure you it's needed. CemuAudio is precisely not linked with CemuCommon.
Uninstall the system fmt package, replace find_package(fmt 7.0.0 REQUIRED) by add_subdirectory(path/to/fmt/src) and you will see.

Oh ok, thanks for the info. As I don't have access to my computer right now, could you include here the build failure?

Also, the fact that the CemuAudio doesn't link to CemuCommon but uses it's precompiled headers is a bit odd, I should also look into it.

I'll do it in a separate PR though, this one can be merged as is.

@abouvier
Copy link
Contributor

abouvier commented Aug 31, 2022

Oh ok, thanks for the info. As I don't have access to my computer right now, could you include here the build failure?

[356/464] Building CXX object src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.gch
samu: job failed: /usr/lib/ccache/bin/c++ -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DPUBLIC_RELEASE -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DWXUSINGDLL -D_UNICODE -D__WXGTK3__ -D__WXGTK__ -I/build/cemu-git/src/build/src/audio -I/build/cemu-git/src/cemu/src/audio -I/build/cemu-git/src/cemu/dependencies/Vulkan-Headers/include -I/build/cemu-git/src/cemu/src/audio/.. -I/build/cemu-git/src/cemu/src/Cafe/.. -I/build/cemu-git/src/cemu/src/config/.. -I/build/cemu-git/src/cemu/src/gui/.. -I/build/cemu-git/src/cemu/src/util/.. -isystem /usr/lib/wx/include/gtk3-unicode-3.2 -isystem /usr/include/wx-3.2 -march=znver2 -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto   -fms-extensions -fpermissive -maes -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -std=gnu++20 -Winvalid-pch -x c++-header -include /build/cemu-git/src/build/src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx -MD -MT src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.gch -MF src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.gch.d -o src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.gch -c /build/cemu-git/src/build/src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.cxx
In file included from /build/cemu-git/src/build/src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx:5,
                 from <command-line>:
/build/cemu-git/src/cemu/src/audio/../Common/precompiled.h:10:10: fatal error: fmt/core.h: No such file or directory
   10 | #include <fmt/core.h>
      |          ^~~~~~~~~~~~
compilation terminated.

This precompiled header seems very fishy. fmt is compiled here as a header-only library, but it should probably be removed and used as a regular static/shared library with standard include of fmt/format.h in specific cpp files.

@Tachi107
Copy link
Contributor Author

Yeah, I guess that this happens because, as far as I can tell, the current use of target_precompile_headers() is wrong.

Currently, CemuCommon exposes a precompiled header as part of its public API, and while this is discouraged in CMake's documentation I think that in this particular case this is fine, as CemuCommon is an internal target.

At the same time, every other CemuXxx target uses target_precompile_headers(PRIVATE) to explicitly consume the src/Common/precompiled.h as a precompiled header, instead of reusing the same precompiled header everywhere. This results in multiple compilations of the same precompiled header, and leads to errors like the one you showed here.

There are two possible solutions:

  1. Remove all calls to target_precompile_headers(PRIVATE) and instead link to CemuCommon everywhere, so that the same precompiled header is made part of the dependencies of all the targets (as it is part of the PUBLIC interface of CemuCommon)
  2. Modify CemuCommon to not expose the precompiled header as part of its PUBLIC interface and reuse the precompiled header everywhere it's needed with target_precompile_headers(REUSE_FROM), so that header is precompiled only once.

I would personally prefer the second option, as it is more explicit and leads to less intertwined targets.

See the CMake docs for details: https://cmake.org/cmake/help/latest/command/target_precompile_headers.html

@Tachi107
Copy link
Contributor Author

@abouvier could you please check if the latest commit fixes your issue?

@Tachi107 Tachi107 marked this pull request as draft August 31, 2022 19:28
@Tachi107 Tachi107 marked this pull request as ready for review August 31, 2022 20:02
@Tachi107 Tachi107 mentioned this pull request Aug 31, 2022
@abouvier
Copy link
Contributor

abouvier commented Sep 1, 2022

@abouvier could you please check if the latest commit fixes your issue?

Nope, it's worse:

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found CURL: /usr/lib/libcurl.so (found version "7.85.0")  
-- Found imgui: /usr/share/imgui/imgui-config.cmake  
-- RapidJSON found. Headers: /usr/include
-- Found Boost: /usr/lib64/cmake/Boost-1.79.0/BoostConfig.cmake (found version "1.79.0") found components: program_options filesystem nowide 
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.12") 
-- Found zstd: /usr/lib64/cmake/zstd/zstdConfig.cmake (found version "1.5.2") 
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1q") found components: Crypto SSL 
-- Version: 7.1.3
-- Build type: None
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for strtod_l
-- Looking for strtod_l - not found
-- Found PNG: /usr/lib/libpng.so (found version "1.6.37") 
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found wxWidgets: /usr/lib64/cmake/wxWidgets/wxWidgetsConfig.cmake (found suitable version "3.2.0", minimum required is "3.2") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for one of the modules 'zarchive'
-- Found ZArchive: /usr/lib/libzarchive.so (found version "0.1.1") 
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- Configuring done
-- Generating done
-- Build files have been written to: /build/cemu-git/src/build
[1/455] Building ASM_NASM object src/asm/CMakeFiles/CemuAsm.dir/x64util_nasm.asm.o
[2/455] Building CXX object src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch
[3/455] Building CXX object src/CMakeFiles/CemuBin.dir/cmake_pch.hxx.gch
[4/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/x86/ih264d_function_selector_ssse3.c.o
[5/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/x86/ih264d_function_selector_sse42.c.o
[6/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/x86/ih264d_function_selector.c.o
[7/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_vui.c.o
[8/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_utils.c.o
[9/455] Linking C static library src/asm/libCemuAsm.a
[10/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_thread_parse_decode.c.o
[11/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_thread_compute_bs.c.o
[12/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_tables.c.o
[13/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_sei.c.o
[14/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_quant_scaling.c.o
[15/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_process_pslice.c.o
[16/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_process_intra_mb.c.o
[17/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_process_bslice.c.o
[18/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_slice.c.o
[19/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_pslice.c.o
[20/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_mb_header.c.o
[21/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_islice.c.o
[22/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_headers.c.o
[23/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_cavlc.c.o
[24/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_cabac.c.o
[25/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_parse_bslice.c.o
[26/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_nal.c.o
[27/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_mvpred.c.o
[28/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_mb_utils.c.o
[29/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_inter_pred.c.o
[30/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_function_selector_generic.c.o
[31/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_format_conv.c.o
[32/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_dpb_mgr.c.o
[33/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_deblocking.c.o
[34/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_compute_bs.c.o
[35/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_cabac_init_tables.c.o
[36/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_cabac.c.o
[37/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_bitstrm.c.o
[38/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/decoder/ih264d_api.c.o
[39/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_weighted_pred_sse42.c.o
[40/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_resi_trans_quant_sse42.c.o
[41/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_padding_ssse3.c.o
[42/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_mem_fns_ssse3.c.o
[43/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_luma_intra_pred_filters_ssse3.c.o
[44/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_iquant_itrans_recon_ssse3.c.o
[45/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_iquant_itrans_recon_sse42.c.o
[46/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_iquant_itrans_recon_dc_ssse3.c.o
[47/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_inter_pred_filters_ssse3.c.o
[48/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_ihadamard_scaling_ssse3.c.o
[49/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_ihadamard_scaling_sse42.c.o
[50/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_deblk_luma_ssse3.c.o
[51/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_deblk_chroma_ssse3.c.o
[52/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/x86/ih264_chroma_intra_pred_filters_ssse3.c.o
[53/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ithread.c.o
[54/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_weighted_pred.c.o
[55/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_trans_data.c.o
[56/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_resi_trans_quant.c.o
[57/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_padding.c.o
[58/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_mem_fns.c.o
[59/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_luma_intra_pred_filters.c.o
[60/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_list.c.o
[61/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_iquant_itrans_recon.c.o
[62/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_inter_pred_filters.c.o
[63/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_ihadamard_scaling.c.o
[64/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_dpb_mgr.c.o
[65/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_disp_mgr.c.o
[66/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_deblk_tables.c.o
[67/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_deblk_edge_filters.c.o
[68/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_common_tables.c.o
[69/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_chroma_intra_pred_filters.c.o
[70/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_cavlc_tables.c.o
[71/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_cabac_tables.c.o
[72/455] Building C object dependencies/ih264d/CMakeFiles/ih264d.dir/common/ih264_buf_mgr.c.o
[73/455] Building CXX object dependencies/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[74/455] Building CXX object dependencies/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[75/455] Linking C static library dependencies/ih264d/libih264d.a
[76/455] Linking CXX static library dependencies/fmt/libfmt.a
[77/455] Building CXX object src/resource/CMakeFiles/CemuResource.dir/CafeDefaultFont.cpp.o
[78/455] Building CXX object src/resource/CMakeFiles/CemuResource.dir/embedded/resources.cpp.o
[79/455] Building CXX object src/imgui/CMakeFiles/imguiImpl.dir/imgui_extension.cpp.o
[80/455] Building CXX object src/imgui/CMakeFiles/imguiImpl.dir/imgui_impl_vulkan.cpp.o
[81/455] Building CXX object src/imgui/CMakeFiles/imguiImpl.dir/imgui_impl_opengl3.cpp.o
[82/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/tinyxml2/tinyxml2.cpp.o
[83/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/libusbWrapper/libusbWrapper.cpp.o
[84/455] Building CXX object src/CMakeFiles/CemuBin.dir/mainLLE.cpp.o
[85/455] Building CXX object src/CMakeFiles/CemuBin.dir/main.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `__WXGTK3__' not defined [-Winvalid-pch]
[86/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/highresolutiontimer/HighResolutionTimer.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[87/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/helpers/helpers.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[88/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/helpers/Serializer.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[89/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/crypto/md5.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `__WXGTK3__' not defined [-Winvalid-pch]
[90/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/crypto/crc32.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[91/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/crypto/aes128.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[92/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/Passes/ZpIRRegisterAllocator.cpp.o
In file included from /build/cemu-git/src/cemu/src/main.cpp:14:
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:54:42: warning: multi-character character constant [-Wmultichar]
   54 |                 return magic0 == (uint32)OS_CONTEXT_MAGIC_0 && magic1 == (uint32)OS_CONTEXT_MAGIC_1;
      |                                          ^~~~~~~~~~~~~~~~~~
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:54:82: warning: multi-character character constant [-Wmultichar]
   54 |                 return magic0 == (uint32)OS_CONTEXT_MAGIC_0 && magic1 == (uint32)OS_CONTEXT_MAGIC_1;
      |                                                                                  ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/dirent.h:247,
                 from /usr/include/wx-3.2/wx/filefn.h:24,
                 from /usr/include/wx-3.2/wx/utils.h:20,
                 from /usr/include/wx-3.2/wx/cursor.h:75,
                 from /usr/include/wx-3.2/wx/event.h:22,
                 from /usr/include/wx-3.2/wx/wx.h:24,
                 from /build/cemu-git/src/cemu/src/gui/wxgui.h:5,
                 from /build/cemu-git/src/cemu/src/main.cpp:2:
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:186:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  186 |         static_assert(offsetof(OSThreadQueue, head) == 0x0);
      |                                ^
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:187:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  187 |         static_assert(offsetof(OSThreadQueue, tail) == 0x4);
      |                                ^
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:188:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  188 |         static_assert(offsetof(OSThreadQueue, userData) == 0x8);
      |                                ^
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:189:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  189 |         static_assert(offsetof(OSThreadQueue, ukn0C) == 0xC);
      |                                ^
/build/cemu-git/src/cemu/src/main.cpp:389:49: warning: ‘dllexport’ attribute directive ignored [-Wattributes]
  389 | extern "C" DLLEXPORT uint64 gameMeta_getTitleId()
      |                                                 ^
[93/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/Passes/RegisterAllocatorForGLSL.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[94/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/EmitterGLSL/ZpIREmitGLSL.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[95/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/Core/IR.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[96/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/VirtualHeap/VirtualHeap.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[97/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/ThreadPool/ThreadPool.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[98/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/MemMapper/MemMapperWin.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[99/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/MemMapper/MemMapperUnix.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[100/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/IniParser/IniParser.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[101/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Fiber/FiberWin.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[102/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Fiber/FiberUnix.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
[103/455] Building CXX object src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o
samu: job failed: /usr/lib/ccache/bin/c++ -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DPUBLIC_RELEASE -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DWXUSINGDLL -D_UNICODE -D__WXGTK3__ -D__WXGTK__ -I/build/cemu-git/src/build/src/audio -I/build/cemu-git/src/cemu/src/audio -I/build/cemu-git/src/cemu/dependencies/Vulkan-Headers/include -I/build/cemu-git/src/cemu/src/audio/.. -I/build/cemu-git/src/cemu/src/Cafe/.. -I/build/cemu-git/src/cemu/src/config/.. -I/build/cemu-git/src/cemu/src/gui/.. -I/build/cemu-git/src/cemu/src/util/.. -isystem /usr/lib/wx/include/gtk3-unicode-3.2 -isystem /usr/include/wx-3.2 -march=znver2 -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -mssse3 -mavx2 -fms-extensions -fpermissive -maes -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -std=gnu++20 -Winvalid-pch -include /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx -MD -MT src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o -MF src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o.d -o src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o -c /build/cemu-git/src/cemu/src/audio/CubebAPI.cpp
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
In file included from /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx:5,
                 from <command-line>:
/build/cemu-git/src/cemu/src/Common/precompiled.h:10:10: fatal error: fmt/core.h: No such file or directory
   10 | #include <fmt/core.h>
      |          ^~~~~~~~~~~~
compilation terminated.
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_NO_LIB' not defined [-Winvalid-pch]
samu: subcommand failed

If I define BOOST_ATOMIC_NO_LIB, there is even more warnings:

[85/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/libusbWrapper/libusbWrapper.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `__WXGTK3__' not defined [-Winvalid-pch]
[86/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/highresolutiontimer/HighResolutionTimer.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[87/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/helpers/helpers.cpp.o
In file included from /build/cemu-git/src/cemu/src/main.cpp:14:
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:54:42: warning: multi-character character constant [-Wmultichar]
   54 |                 return magic0 == (uint32)OS_CONTEXT_MAGIC_0 && magic1 == (uint32)OS_CONTEXT_MAGIC_1;
      |                                          ^~~~~~~~~~~~~~~~~~
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:54:82: warning: multi-character character constant [-Wmultichar]
   54 |                 return magic0 == (uint32)OS_CONTEXT_MAGIC_0 && magic1 == (uint32)OS_CONTEXT_MAGIC_1;
      |                                                                                  ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/dirent.h:247,
                 from /usr/include/wx-3.2/wx/filefn.h:24,
                 from /usr/include/wx-3.2/wx/utils.h:20,
                 from /usr/include/wx-3.2/wx/cursor.h:75,
                 from /usr/include/wx-3.2/wx/event.h:22,
                 from /usr/include/wx-3.2/wx/wx.h:24,
                 from /build/cemu-git/src/cemu/src/gui/wxgui.h:5,
                 from /build/cemu-git/src/cemu/src/main.cpp:2:
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:186:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  186 |         static_assert(offsetof(OSThreadQueue, head) == 0x0);
      |                                ^
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:187:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  187 |         static_assert(offsetof(OSThreadQueue, tail) == 0x4);
      |                                ^
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:188:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  188 |         static_assert(offsetof(OSThreadQueue, userData) == 0x8);
      |                                ^
/build/cemu-git/src/cemu/src/Cafe/OS/libs/coreinit/coreinit_Thread.h:189:32: warning: ‘offsetof’ within non-standard-layout type ‘coreinit::OSThreadQueue’ is conditionally-supported [-Winvalid-offsetof]
  189 |         static_assert(offsetof(OSThreadQueue, ukn0C) == 0xC);
      |                                ^
/build/cemu-git/src/cemu/src/main.cpp:389:49: warning: ‘dllexport’ attribute directive ignored [-Wattributes]
  389 | extern "C" DLLEXPORT uint64 gameMeta_getTitleId()
      |                                                 ^
[88/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/helpers/Serializer.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[89/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/crypto/md5.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[90/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/crypto/crc32.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `__WXGTK3__' not defined [-Winvalid-pch]
[91/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/crypto/aes128.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[92/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/Passes/ZpIRRegisterAllocator.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[93/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/Passes/RegisterAllocatorForGLSL.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[94/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/EmitterGLSL/ZpIREmitGLSL.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[95/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Zir/Core/IR.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[96/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/VirtualHeap/VirtualHeap.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[97/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/ThreadPool/ThreadPool.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[98/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/MemMapper/MemMapperWin.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[99/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/MemMapper/MemMapperUnix.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[100/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/IniParser/IniParser.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[101/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Fiber/FiberWin.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[102/455] Building CXX object src/util/CMakeFiles/CemuUtil.dir/Fiber/FiberUnix.cpp.o
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
[103/455] Building CXX object src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o
samu: job failed: /usr/lib/ccache/bin/c++ -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DPUBLIC_RELEASE -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DWXUSINGDLL -D_UNICODE -D__WXGTK3__ -D__WXGTK__ -I/build/cemu-git/src/build/src/audio -I/build/cemu-git/src/cemu/src/audio -I/build/cemu-git/src/cemu/dependencies/Vulkan-Headers/include -I/build/cemu-git/src/cemu/src/audio/.. -I/build/cemu-git/src/cemu/src/Cafe/.. -I/build/cemu-git/src/cemu/src/config/.. -I/build/cemu-git/src/cemu/src/gui/.. -I/build/cemu-git/src/cemu/src/util/.. -isystem /usr/lib/wx/include/gtk3-unicode-3.2 -isystem /usr/include/wx-3.2 -march=znver2 -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -DBOOST_ATOMIC_NO_LIB -mssse3 -mavx2 -fms-extensions -fpermissive -maes -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -std=gnu++20 -Winvalid-pch -include /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx -MD -MT src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o -MF src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o.d -o src/audio/CMakeFiles/CemuAudio.dir/CubebAPI.cpp.o -c /build/cemu-git/src/cemu/src/audio/CubebAPI.cpp
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
In file included from /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx:5,
                 from <command-line>:
/build/cemu-git/src/cemu/src/Common/precompiled.h:10:10: fatal error: fmt/core.h: No such file or directory
   10 | #include <fmt/core.h>
      |          ^~~~~~~~~~~~
compilation terminated.
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
cc1plus: warning: /build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch: not used because `BOOST_ATOMIC_DYN_LINK' not defined [-Winvalid-pch]
samu: subcommand failed

And... again, I must define BOOST_ATOMIC_DYN_LINK, __WXGTK3__, BOOST_FILESYSTEM_DYN_LINK, BOOST_NOWIDE_DYN_LINK, _UNICODE, etc.

@Tachi107
Copy link
Contributor Author

Tachi107 commented Sep 1, 2022 via email

@Tachi107 Tachi107 marked this pull request as draft September 1, 2022 08:31
@abouvier
Copy link
Contributor

abouvier commented Sep 1, 2022

It's working now with all the target_precompile_headers removed ;)

@Tachi107
Copy link
Contributor Author

Tachi107 commented Sep 1, 2022

This should be now ready, for real this time.

I've never used precompiled headers myself, but by looking at CMake's documentation, CI status and @abouvier's feedback it seems that this is the right way™ to do it.

Please do not squash the branch on merge, otherwise all the information in the commit message will get lost.

@Tachi107 Tachi107 marked this pull request as ready for review September 1, 2022 10:52
@abouvier
Copy link
Contributor

abouvier commented Sep 1, 2022

Sadly I'm not sure the header is compiled only once:

$ find build/ | grep pch
build/cemu-git/src/build/src/CMakeFiles/CemuBin.dir/cmake_pch.hxx
build/cemu-git/src/build/src/CMakeFiles/CemuBin.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/CMakeFiles/CemuBin.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx
build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/Common/CMakeFiles/CemuCommon.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/gui/CMakeFiles/CemuGui.dir/cmake_pch.hxx
build/cemu-git/src/build/src/gui/CMakeFiles/CemuGui.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/gui/CMakeFiles/CemuGui.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx
build/cemu-git/src/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/Cemu/CMakeFiles/CemuComponents.dir/cmake_pch.hxx
build/cemu-git/src/build/src/Cemu/CMakeFiles/CemuComponents.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/Cemu/CMakeFiles/CemuComponents.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/config/CMakeFiles/CemuConfig.dir/cmake_pch.hxx
build/cemu-git/src/build/src/config/CMakeFiles/CemuConfig.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/config/CMakeFiles/CemuConfig.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/input/CMakeFiles/CemuInput.dir/cmake_pch.hxx
build/cemu-git/src/build/src/input/CMakeFiles/CemuInput.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/input/CMakeFiles/CemuInput.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx
build/cemu-git/src/build/src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/audio/CMakeFiles/CemuAudio.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/util/CMakeFiles/CemuUtil.dir/cmake_pch.hxx
build/cemu-git/src/build/src/util/CMakeFiles/CemuUtil.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/util/CMakeFiles/CemuUtil.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/imgui/CMakeFiles/imguiImpl.dir/cmake_pch.hxx
build/cemu-git/src/build/src/imgui/CMakeFiles/imguiImpl.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/imgui/CMakeFiles/imguiImpl.dir/cmake_pch.hxx.gch
build/cemu-git/src/build/src/resource/CMakeFiles/CemuResource.dir/cmake_pch.hxx
build/cemu-git/src/build/src/resource/CMakeFiles/CemuResource.dir/cmake_pch.hxx.cxx
build/cemu-git/src/build/src/resource/CMakeFiles/CemuResource.dir/cmake_pch.hxx.gch

And each *.hxx.gch file has a size of 350 MB.
Or maybe the header is indeed compiled once, and then copied in each directory? But the checksum of each file is different so I don't know.

@Tachi107
Copy link
Contributor Author

Tachi107 commented Sep 1, 2022

Sadly I'm not sure the header is compiled only once

Yes, I was wrong. CMake's docs aren't super clear. Anyway the precompiled headers were already part of CemuCommon's PUBLIC interface, so this change does at least fix some issues (like yours) and make the code more concise (by removing the need of calling target_precompile_headers() everywhere)

And each *.hxx.gch file has a size of 350 MB. Or maybe the header is indeed compiled once, and then copied in each directory? But the checksum of each file is different so I don't know.

Woah, they're big. Were they this big even before this patch?

Edit: I've force-pushed yet another time to fix the commit message and to reduce the diff by a few lines (as mentioned in #117 (comment))

@abouvier
Copy link
Contributor

abouvier commented Sep 1, 2022

Woah, they're big. Were they this big even before this patch?

Yeah, same size since the first commit. And the precompiled header breaks ccache, so every rebuild is like a first build :$

- Fix target_precompile_headers() usage; the CemuCommon target exposes
  the src/Common/precompiled.h precompiled header as part of its public
  interface with
  target_precompile_headers(CemuCommon PUBLIC precompiled.h), so all the
  other targets wanting to use the precompiled header have to link to
  the CemuCommon target with
  target_precompile_headers(TargetName PRIVATE CemuCommon).
- Set the project version to 2.0
- Set RUNTIME_OUTPUT_DIRECTORY instead of only their _DEBUG and _RELEASE
  variants, fixing the compilation when neither build types are defined
- Use a consistent indentation style (tabs, like in the .cpp files)
- Use "modern" variants of some functions, e.g. add_definitions ->
  add_compile_definitions
@Tachi107
Copy link
Contributor Author

Tachi107 commented Sep 2, 2022

Rebased again on the main branch

@Exzap Exzap merged commit 4ed38a2 into cemu-project:main Sep 2, 2022
@Tachi107 Tachi107 deleted the build-minor-fixes branch September 2, 2022 17:24
@Tachi107
Copy link
Contributor Author

Tachi107 commented Oct 11, 2022 via email

@Tachi107

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants