Skip to content

Commit

Permalink
Enforce 64-bit requirement. (#311)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel K. Gutierrez <[email protected]>
  • Loading branch information
samuelkgutierrez authored Feb 27, 2025
1 parent 7fb2297 commit 9de6216
Showing 1 changed file with 12 additions and 1 deletion.
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

0 comments on commit 9de6216

Please sign in to comment.