diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 91508ce..003c567 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,6 +33,11 @@ jobs: build: name: Build runs-on: macos-latest + # Set environment variables + env: + # We globally set CC and CXX to improve compatibility with .travis.yml + CC: x86_64-elf-gcc + CXX: x86_64-elf-g++ steps: - name: Clone repository uses: actions/checkout@v3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 633cfc3..9d5657f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,18 +28,6 @@ message(STATUS "Crosscompiling : ${CMAKE_CROSSCOMPILING}") message(STATUS "System name : ${CMAKE_HOST_SYSTEM_NAME}") message(STATUS "Kernel version : ${CMAKE_SYSTEM_VERSION}") if((${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin") OR APPLE) - # Set the Apple MacOSx compilers. - if(CMAKE_VERSION VERSION_LESS "3.6.0") - include(CMakeForceCompiler) - cmake_force_c_compiler(x86_64-elf-gcc Clang) - cmake_force_cxx_compiler(x86_64-elf-g++ Clang) - else() - set(CMAKE_C_COMPILER x86_64-elf-gcc) - set(CMAKE_CXX_COMPILER x86_64-elf-g++) - set(CMAKE_AR x86_64-elf-ar) - endif() - # Speicfy the linker. - set(CMAKE_LINKER x86_64-elf-ld) # Specify the linker flags. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib") elseif((${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") OR WIN32)