File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed
Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,28 @@ jobs:
2828 sudo apt-get install -y gcc-11 g++-11
2929 echo "CC=gcc-11" >> $GITHUB_ENV
3030 echo "CXX=g++-11" >> $GITHUB_ENV
31- - name : Build-Release
31+ - name: Build-macosx
32+ if:
33+ run: |
34+ mkdir build
35+ cd build
36+ cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
37+ cmake --build . --config Release
38+ ctest -V -C Release
39+ cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
40+
41+
42+ - name : Build-Release
43+
3244 run: |
3345 mkdir build
3446 cd build
3547 cmake .. -DCMAKE_USER_MAKE_RULES_OVERRIDE="${{ github.workspace }}/cmake/flags_override.cmake"
3648 cmake --build . --config Release
3749 ctest -V -C Release
3850 cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
39- - name : Upload
51+
52+ - name : Upload
4053 uses: actions/upload-artifact@v2
4154 with:
4255 name: ${{ matrix.platform }}
Original file line number Diff line number Diff line change @@ -9,11 +9,19 @@ option(BuildCodeFormat "Build CodeFormat" ON)
99option (BuildCodeFormatServer "Build CodeFormatServer" ON )
1010option (EnableTest "Test project" ON )
1111
12+
1213if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
1314 add_definitions (-DMSVC)
14- else ()
15- set (CMAKE_C_FLAGS_RELEASE "-O2" )
16- set (CMAKE_CXX_FLAGS_RELEASE "-O2" )
15+ elseif (APPLE )
16+ include (CheckCCompilerFlag)
17+
18+ set (CMAKE_REQUIRED_LINK_OPTIONS "-arch;x86_64" )
19+ check_c_compiler_flag("-arch x86_64" x86_64Supported)
20+ message ("x86_64Supported=${x86_64Supported} " )
21+
22+ set (CMAKE_REQUIRED_LINK_OPTIONS "-arch;arm64" )
23+ check_c_compiler_flag("-arch arm64" arm64Supported)
24+ message ("arm64Supported=${arm64Supported} " )
1725endif ()
1826
1927add_subdirectory (LuaParser)
You can’t perform that action at this time.
0 commit comments