Skip to content

Commit

Permalink
try to fix macos problems
Browse files Browse the repository at this point in the history
  • Loading branch information
nodtem66 committed Feb 3, 2021
1 parent 882a71c commit 042129a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
compiler: g++
- os: macos-latest
compiler: clang++
- os: windows-latest
compiler: cl
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -29,8 +35,10 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_STANDARD=11

env:
CXX: ${{ matrix.compiler }}
run: cmake $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_STANDARD=11

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ if(MSVC)
add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES -DWIN32_LEAN_AND_MEAN)
endif()

if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_definitions(-D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600)
endif()

add_executable(${PROJECT_NAME} ${MAIN_SOURCES} ${PROJECT_SOURCE_DIR}/src/Main.cpp )
target_include_directories(${PROJECT_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/include" ${TBB_INCLUDE_DIR} ${VCG_INCLUDE_DIR} ${EIGEN_INCLUDE_DIR} ${SOL2_INCLUDE_DIR} ${LUA_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PRIVATE igl::core tbb Threads::Threads ${LUA_LIBRARIES})
Expand Down
10 changes: 1 addition & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,12 @@ variables:

strategy:
matrix:
Linux14:
Linux11:
vmImage: 'ubuntu-latest'
macOS17:
vmImage: 'macOS-latest'
build_std: 17
macOS11:
vmImage: 'macOS-latest'
build_std: 11
Windows17:
vmImage: 'windows-latest'
build_std: 17
Windows11:
vmImage: 'windows-latest'
build_std: 11
pool:
vmImage: $(vmImage)
steps:
Expand Down

0 comments on commit 042129a

Please sign in to comment.