Skip to content

Commit a9cb80e

Browse files
committed
cmake: unify the wording of Platform detected names
1 parent 937cd5d commit a9cb80e

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if (USE_EXTERNAL_DEPS AND NOT DAEMON_SYSTEM_NaCl)
204204

205205
set(DEPS_EXT ".tar.xz")
206206

207-
set(DEPS_ARCH "${DAEMON_ARCH}")
207+
set(DEPS_ARCH "${DAEMON_ARCH_NAME}")
208208

209209
if (DAEMON_CXX_COMPILER_MSVC)
210210
set(DEPS_COMPILER msvc)
@@ -681,10 +681,10 @@ if (BUILD_CLIENT OR DAEMON_SYSTEM_Windows)
681681
set(sdlvar_amd64 SDL_CPU_X64)
682682
set(sdlvar_armhf SDL_CPU_ARM32)
683683
set(sdlvar_arm64 SDL_CPU_ARM64)
684-
if (sdlvar_${DAEMON_ARCH})
685-
set(${sdlvar_${DAEMON_ARCH}} 1)
684+
if (sdlvar_${DAEMON_ARCH_NAME})
685+
set(${sdlvar_${DAEMON_ARCH_NAME}} 1)
686686
else()
687-
message("Developer TODO: translate architecture ${DAEMON_ARCH} for SDL")
687+
message("Developer TODO: translate architecture ${DAEMON_ARCH_NAME} for SDL")
688688
endif()
689689

690690
find_package(SDL3 REQUIRED CONFIG)
@@ -977,8 +977,8 @@ if (DEPS_DIR AND HAS_NACL AND (BUILD_CLIENT OR BUILD_TTY_CLIENT OR BUILD_SERVER
977977

978978
add_custom_command(TARGET runtime_deps PRE_BUILD
979979
COMMAND ${CMAKE_COMMAND} -E copy_if_different
980-
${DEPS_DIR}/irt_core-${DAEMON_NACL_ARCH}.nexe
981-
${FULL_OUTPUT_DIR}/irt_core-${DAEMON_NACL_ARCH}.nexe
980+
${DEPS_DIR}/irt_core-${DAEMON_NACL_ARCH_NAME}.nexe
981+
${FULL_OUTPUT_DIR}/irt_core-${DAEMON_NACL_ARCH_NAME}.nexe
982982
)
983983

984984
# Linux uses a bootstrap program to reserve address space

cmake/DaemonFlags.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ else()
535535
elseif(DAEMON_ARCH_amd64)
536536
set_linker_flag("-Wl,-e,mainCRTStartup")
537537
else()
538-
message(FATAL_ERROR "Unsupported architecture ${DAEMON_ARCH}")
538+
message(FATAL_ERROR "Unsupported architecture ${DAEMON_ARCH_NAME}")
539539
endif()
540540
endif()
541541
endif()
@@ -672,7 +672,7 @@ elseif (NOT DAEMON_SYSTEM_NaCl)
672672
unset(GCC_GENERIC_TUNE)
673673
set(GCC_GENERIC_CPU "power5")
674674
else()
675-
message(WARNING "Unknown architecture ${DAEMON_ARCH}")
675+
message(WARNING "Unknown architecture ${DAEMON_ARCH_NAME}")
676676
endif()
677677

678678
if ("${DAEMON_CXX_COMPILER_NAME}" STREQUAL "Zig")

cmake/DaemonGame.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if (NOT FORK EQUAL 2)
8181
if (BUILD_GAME_NACL_TARGETS STREQUAL "all")
8282
set(NACL_TARGETS "${NACL_ALL_TARGETS}")
8383
elseif (BUILD_GAME_NACL_TARGETS STREQUAL "native")
84-
set(NACL_TARGETS "${DAEMON_ARCH}")
84+
set(NACL_TARGETS "${DAEMON_ARCH_NAME}")
8585
elseif (BUILD_GAME_NACL_TARGETS STREQUAL "none")
8686
set(NACL_TARGETS "")
8787
else()

cmake/DaemonPlatform/Architecture.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ mark_as_advanced(USE_ARCH_INTRINSICS)
3636
function(daemon_detect_arch)
3737
daemon_run_detection("" "ARCH" "Architecture.c" "")
3838

39-
set(DAEMON_ARCH "${arch_name}" PARENT_SCOPE)
39+
set(DAEMON_ARCH_NAME "${arch_name}" PARENT_SCOPE)
4040

4141
message(STATUS "Detected target architecture: ${arch_name}")
4242

@@ -70,7 +70,7 @@ function(daemon_detect_arch)
7070
endif()
7171

7272
# The DAEMON_NACL_ARCH variable contributes to the nexe file name.
73-
set(DAEMON_NACL_ARCH "${nacl_arch}" PARENT_SCOPE)
73+
set(DAEMON_NACL_ARCH_NAME "${nacl_arch}" PARENT_SCOPE)
7474
endfunction()
7575

7676
function(daemon_set_arch_intrinsics name)
@@ -96,17 +96,17 @@ function(daemon_set_intrinsics)
9696
# Makes possible to do that in C++ code:
9797
# > if defined(DAEMON_USE_ARCH_INTRINSICS_amd64)
9898
# > if defined(DAEMON_USE_ARCH_INTRINSICS_i686)
99-
daemon_set_arch_intrinsics("${DAEMON_ARCH}")
99+
daemon_set_arch_intrinsics("${DAEMON_ARCH_NAME}")
100100

101101
set(amd64_PARENT "i686")
102102
set(arm64_PARENT "armhf")
103103
set(ppc64el_PARENT "ppc64")
104104

105-
if ("${DAEMON_ARCH}_PARENT")
106-
daemon_set_arch_intrinsics("${${DAEMON_ARCH}_PARENT}")
105+
if ("${DAEMON_ARCH_NAME}_PARENT")
106+
daemon_set_arch_intrinsics("${${DAEMON_ARCH_NAME}_PARENT}")
107107
endif()
108108
else()
109-
message(STATUS "Disabling ${DAEMON_ARCH} architecture intrinsics")
109+
message(STATUS "Disabling ${DAEMON_ARCH_NAME} architecture intrinsics")
110110
endif()
111111
endfunction()
112112

@@ -116,11 +116,11 @@ daemon_set_intrinsics()
116116
# Makes possible to do that in CMake code:
117117
# > if (DAEMON_ARCH_arm64)
118118
# > if (DAEMON_NACL_ARCH_armhf)
119-
set("DAEMON_ARCH_${DAEMON_ARCH}" ON)
120-
set("DAEMON_NACL_ARCH_${DAEMON_NACL_ARCH}" ON)
119+
set("DAEMON_ARCH_${DAEMON_ARCH_NAME}" ON)
120+
set("DAEMON_NACL_ARCH_${DAEMON_NACL_ARCH_NAME}" ON)
121121

122122
if (DAEMON_SOURCE_GENERATOR)
123123
# Add printable strings to the executable.
124-
daemon_add_buildinfo("char*" "DAEMON_ARCH_STRING" "\"${DAEMON_ARCH}\"")
125-
daemon_add_buildinfo("char*" "DAEMON_NACL_ARCH_STRING" "\"${DAEMON_NACL_ARCH}\"")
124+
daemon_add_buildinfo("char*" "DAEMON_ARCH_STRING" "\"${DAEMON_ARCH_NAME}\"")
125+
daemon_add_buildinfo("char*" "DAEMON_NACL_ARCH_STRING" "\"${DAEMON_NACL_ARCH_NAME}\"")
126126
endif()

0 commit comments

Comments
 (0)