Skip to content

Commit 9de6216

Browse files
Enforce 64-bit requirement. (#311)
Signed-off-by: Samuel K. Gutierrez <[email protected]>
1 parent 7fb2297 commit 9de6216

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cmake/QVCheckTypes.cmake

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2022 Triad National Security, LLC
2+
# Copyright (c) 2022-2025 Triad National Security, LLC
33
# All rights reserved.
44
#
55
# This file is part of the quo-vadis project. See the LICENSE file at the
@@ -9,6 +9,17 @@
99
# Checks size of data types.
1010
include(CheckTypeSize)
1111

12+
# We only support 64-bit architectures and builds. This is primarily because
13+
# hwloc relies on a large virtual address space for its shared-memory
14+
# sub-system.
15+
message(CHECK_START "Verifying that this is a 64-bit+ build")
16+
if(CMAKE_SIZEOF_VOID_P LESS_EQUAL 4)
17+
math(EXPR QV_BUILD_BITS "${CMAKE_SIZEOF_VOID_P} * 8" OUTPUT_FORMAT DECIMAL)
18+
message(FATAL_ERROR "${QV_BUILD_BITS}-bit builds are not supported")
19+
else()
20+
message(CHECK_PASS "verified")
21+
endif()
22+
1223
check_type_size(int QVI_SIZEOF_INT)
1324
check_type_size(pid_t QVI_SIZEOF_PID_T)
1425

0 commit comments

Comments
 (0)