Skip to content

Commit

Permalink
移除兼容 osx 的相关代码
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed Apr 22, 2024
1 parent dce74cb commit f7dc527
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
11 changes: 11 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -23,6 +33,7 @@
"name": "configurePresets_base",
"hidden": true,
"inherits": [
"host",
"std"
],
"displayName": "configurePresets_base",
Expand Down
7 changes: 0 additions & 7 deletions cmake/3rd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f7dc527

Please sign in to comment.