Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce 64-bit requirement. #311

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion cmake/QVCheckTypes.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022 Triad National Security, LLC
# Copyright (c) 2022-2025 Triad National Security, LLC
# All rights reserved.
#
# This file is part of the quo-vadis project. See the LICENSE file at the
Expand All @@ -9,6 +9,17 @@
# Checks size of data types.
include(CheckTypeSize)

# We only support 64-bit architectures and builds. This is primarily because
# hwloc relies on a large virtual address space for its shared-memory
# sub-system.
message(CHECK_START "Verifying that this is a 64-bit+ build")
if(CMAKE_SIZEOF_VOID_P LESS_EQUAL 4)
math(EXPR QV_BUILD_BITS "${CMAKE_SIZEOF_VOID_P} * 8" OUTPUT_FORMAT DECIMAL)
message(FATAL_ERROR "${QV_BUILD_BITS}-bit builds are not supported")
else()
message(CHECK_PASS "verified")
endif()

check_type_size(int QVI_SIZEOF_INT)
check_type_size(pid_t QVI_SIZEOF_PID_T)

Expand Down