mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Fixing Mac Build
This commit is contained in:
parent
f31b466682
commit
6d86594f3e
3 changed files with 19 additions and 15 deletions
5
.github/workflows/MacOS_Build.yml
vendored
5
.github/workflows/MacOS_Build.yml
vendored
|
@ -23,10 +23,13 @@ jobs:
|
||||||
- name: Fetch submodules
|
- name: Fetch submodules
|
||||||
run: git submodule update --init --recursive
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
|
- name: Install LLVM # MacOS comes with "AppleClang" instead of regular Clang, and it can't build the project because no proper C++20
|
||||||
|
run: brew install llvm
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
# Build your program with the given configuration
|
# Build your program with the given configuration
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <optional>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
28
third_party/cryptopp/CMakeLists.txt
vendored
28
third_party/cryptopp/CMakeLists.txt
vendored
|
@ -353,31 +353,31 @@ endif ()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER MATCHES "xlC")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER MATCHES "xlC")
|
||||||
|
|
||||||
if (CRYPTOPP_AMD64 OR CRYPTOPP_I386 AND FALSE)
|
if (CRYPTOPP_AMD64 OR CRYPTOPP_I386)
|
||||||
CheckCompileLinkOption("-msse2" CRYPTOPP_IA32_SSE2
|
CheckCompileLinkOption("-msse2" CRYPTOPP_IA32_SSE2
|
||||||
"${TEST_PROG_DIR}/test_x86_sse2.cxx")
|
"${TEST_PROG_DIR}/test_x86_sse2.cpp")
|
||||||
CheckCompileLinkOption("-mssse3" CRYPTOPP_IA32_SSSE3
|
CheckCompileLinkOption("-mssse3" CRYPTOPP_IA32_SSSE3
|
||||||
"${TEST_PROG_DIR}/test_x86_ssse3.cxx")
|
"${TEST_PROG_DIR}/test_x86_ssse3.cpp")
|
||||||
CheckCompileLinkOption("-msse4.1" CRYPTOPP_IA32_SSE41
|
CheckCompileLinkOption("-msse4.1" CRYPTOPP_IA32_SSE41
|
||||||
"${TEST_PROG_DIR}/test_x86_sse41.cxx")
|
"${TEST_PROG_DIR}/test_x86_sse41.cpp")
|
||||||
CheckCompileLinkOption("-msse4.2" CRYPTOPP_IA32_SSE42
|
CheckCompileLinkOption("-msse4.2" CRYPTOPP_IA32_SSE42
|
||||||
"${TEST_PROG_DIR}/test_x86_sse42.cxx")
|
"${TEST_PROG_DIR}/test_x86_sse42.cpp")
|
||||||
CheckCompileLinkOption("-mssse3 -mpclmul" CRYPTOPP_IA32_CLMUL
|
CheckCompileLinkOption("-mssse3 -mpclmul" CRYPTOPP_IA32_CLMUL
|
||||||
"${TEST_PROG_DIR}/test_x86_clmul.cxx")
|
"${TEST_PROG_DIR}/test_x86_clmul.cpp")
|
||||||
CheckCompileLinkOption("-msse4.1 -maes" CRYPTOPP_IA32_AES
|
CheckCompileLinkOption("-msse4.1 -maes" CRYPTOPP_IA32_AES
|
||||||
"${TEST_PROG_DIR}/test_x86_aes.cxx")
|
"${TEST_PROG_DIR}/test_x86_aes.cpp")
|
||||||
CheckCompileLinkOption("-mavx" CRYPTOPP_IA32_AVX
|
CheckCompileLinkOption("-mavx" CRYPTOPP_IA32_AVX
|
||||||
"${TEST_PROG_DIR}/test_x86_avx.cxx")
|
"${TEST_PROG_DIR}/test_x86_avx.cpp")
|
||||||
CheckCompileLinkOption("-mavx2" CRYPTOPP_IA32_AVX2
|
CheckCompileLinkOption("-mavx2" CRYPTOPP_IA32_AVX2
|
||||||
"${TEST_PROG_DIR}/test_x86_avx2.cxx")
|
"${TEST_PROG_DIR}/test_x86_avx2.cpp")
|
||||||
CheckCompileLinkOption("-msse4.2 -msha" CRYPTOPP_IA32_SHA
|
CheckCompileLinkOption("-msse4.2 -msha" CRYPTOPP_IA32_SHA
|
||||||
"${TEST_PROG_DIR}/test_x86_sha.cxx")
|
"${TEST_PROG_DIR}/test_x86_sha.cpp")
|
||||||
if (EXISTS "${TEST_PROG_DIR}/test_asm_mixed.cxx")
|
if (EXISTS "${TEST_PROG_DIR}/test_asm_mixed.cpp")
|
||||||
CheckCompileLinkOption("" CRYPTOPP_MIXED_ASM
|
CheckCompileLinkOption("" CRYPTOPP_MIXED_ASM
|
||||||
"${TEST_PROG_DIR}/test_asm_mixed.cxx")
|
"${TEST_PROG_DIR}/test_asm_mixed.cpp")
|
||||||
else ()
|
else ()
|
||||||
CheckCompileLinkOption("" CRYPTOPP_MIXED_ASM
|
CheckCompileLinkOption("" CRYPTOPP_MIXED_ASM
|
||||||
"${TEST_PROG_DIR}/test_mixed_asm.cxx")
|
"${TEST_PROG_DIR}/test_mixed_asm.cpp")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT CRYPTOPP_MIXED_ASM)
|
if (NOT CRYPTOPP_MIXED_ASM)
|
||||||
|
@ -398,7 +398,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
||||||
if (NOT CRYPTOPP_IA32_SSE42 AND NOT CRYPTOPP_DISABLE_SSE4)
|
if (NOT CRYPTOPP_IA32_SSE42 AND NOT CRYPTOPP_DISABLE_SSE4)
|
||||||
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSE4")
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSE4")
|
||||||
elseif (CRYPTOPP_IA32_SSE42 AND NOT CRYPTOPP_DISABLE_SSE4)
|
elseif (CRYPTOPP_IA32_SSE42 AND NOT CRYPTOPP_DISABLE_SSE4)
|
||||||
set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2")
|
set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -mcrc32")
|
||||||
if (NOT CRYPTOPP_IA32_CLMUL AND NOT CRYPTOPP_DISABLE_CLMUL)
|
if (NOT CRYPTOPP_IA32_CLMUL AND NOT CRYPTOPP_DISABLE_CLMUL)
|
||||||
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_CLMUL")
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_CLMUL")
|
||||||
elseif (CRYPTOPP_IA32_CLMUL AND NOT CRYPTOPP_DISABLE_CLMUL)
|
elseif (CRYPTOPP_IA32_CLMUL AND NOT CRYPTOPP_DISABLE_CLMUL)
|
||||||
|
|
Loading…
Add table
Reference in a new issue