From f7dc5271859749a6567fe240a027f7e867ba0538 Mon Sep 17 00:00:00 2001 From: "Zone.N" Date: Mon, 22 Apr 2024 15:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=85=BC=E5=AE=B9=20osx=20?= =?UTF-8?q?=E7=9A=84=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zone.N --- .github/workflows/workflow.yml | 20 +------------------- CMakePresets.json | 11 +++++++++++ cmake/3rd.cmake | 7 ------- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 19082b8..abedbab 100755 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -39,7 +39,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ${{github.workspace}}/doc/html - build_ubuntu: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -61,21 +61,3 @@ jobs: with: files: build/coverage/coverage.info verbose: true - - build_macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - brew install doxygen graphviz llvm cppcheck lcov - ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format" - ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy" - brew install gcc g++ sdl2 sdl2_ttf libomp - - - name: Build - run: | - cmake --preset=build - cmake --build build --target all - cmake --build build --target coverage diff --git a/CMakePresets.json b/CMakePresets.json index 3317367..676831a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -6,6 +6,16 @@ "patch": 0 }, "configurePresets": [ + { + "name": "host", + "description": "Linux Only", + "hidden": true, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + } + }, { "name": "std", "description": "This preset makes sure the project actually builds with at least the specified standard", @@ -23,6 +33,7 @@ "name": "configurePresets_base", "hidden": true, "inherits": [ + "host", "std" ], "displayName": "configurePresets_base", diff --git a/cmake/3rd.cmake b/cmake/3rd.cmake index 7399137..496cbb8 100644 --- a/cmake/3rd.cmake +++ b/cmake/3rd.cmake @@ -241,13 +241,6 @@ if (NOT SDL2_FOUND) "Following https://github.com/libsdl-org/SDL to install.") endif () -if (APPLE) - set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include/ -I/opt/homebrew/Cellar/libomp/18.1.4/include") - set(OpenMP_C_LIB_NAMES "omp") - set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include/ -I/opt/homebrew/Cellar/libomp/18.1.4/include") - set(OpenMP_CXX_LIB_NAMES "omp") - set(OpenMP_omp_LIBRARY /opt/homebrew/Cellar/libomp/18.1.4/lib/libomp.dylib) -endif () find_package(OpenMP REQUIRED) if (NOT OpenMP_FOUND) message(FATAL_ERROR "OpenMP not found.\n"