Skip to content

Commit

Permalink
CMake: went back to using CMAKE_SIZEOF_VOID_P.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny authored Feb 23, 2024
2 parents eb05792 + eddee5c commit 2511941
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 62 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
restore-keys: ${{ matrix.os }}-ExternalDependencies
- name: Package OpenCOR
run: ./package
- name: Upload OpenCOR artifacts (if needed)
- name: Upload OpenCOR artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ./build/OpenCOR-*
- name: Release OpenCOR (if needed)
- name: Release OpenCOR
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
with:
Expand Down
11 changes: 1 addition & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,8 @@ else()
endif()

# Make sure that we are building OpenCOR on a supported architecture
# Note: normally, we would check the value of CMAKE_SIZEOF_VOID_P, but in some
# cases it may not be set (e.g. when generating an Xcode project file), so
# we determine and retrieve that value ourselves...

try_run(ARCHITECTURE_RUN ARCHITECTURE_COMPILE
${PROJECT_BUILD_DIR} ${CMAKE_SOURCE_DIR}/cmake/architecture.c
RUN_OUTPUT_VARIABLE ARCHITECTURE)

if(NOT ARCHITECTURE_COMPILE)
message(FATAL_ERROR "We could not determine your architecture. Please clean your ${CMAKE_PROJECT_NAME} environment and try again...")
elseif(NOT ${ARCHITECTURE} EQUAL 64)
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built in 64-bit mode...")
endif()

Expand Down
50 changes: 0 additions & 50 deletions cmake/architecture.c

This file was deleted.

0 comments on commit 2511941

Please sign in to comment.