Skip to content

Commit 3cbaa2e

Browse files
committed
cmake: unify the wording of Platform detected names
1 parent c4b76ab commit 3cbaa2e

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

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)
@@ -974,8 +974,8 @@ if (DEPS_DIR AND HAS_NACL AND (BUILD_CLIENT OR BUILD_TTY_CLIENT OR BUILD_SERVER
974974

975975
add_custom_command(TARGET runtime_deps PRE_BUILD
976976
COMMAND ${CMAKE_COMMAND} -E copy_if_different
977-
${DEPS_DIR}/irt_core-${DAEMON_NACL_ARCH}.nexe
978-
${FULL_OUTPUT_DIR}/irt_core-${DAEMON_NACL_ARCH}.nexe
977+
${DEPS_DIR}/irt_core-${DAEMON_NACL_ARCH_NAME}.nexe
978+
${FULL_OUTPUT_DIR}/irt_core-${DAEMON_NACL_ARCH_NAME}.nexe
979979
)
980980

981981
# 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
@@ -508,7 +508,7 @@ else()
508508
elseif(DAEMON_ARCH_amd64)
509509
set_linker_flag("-Wl,-e,mainCRTStartup")
510510
else()
511-
message(FATAL_ERROR "Unsupported architecture ${DAEMON_ARCH}")
511+
message(FATAL_ERROR "Unsupported architecture ${DAEMON_ARCH_NAME}")
512512
endif()
513513
endif()
514514
endif()
@@ -633,7 +633,7 @@ elseif (NOT DAEMON_SYSTEM_NaCl)
633633
# There is no generic tuning option for armv6.
634634
unset(GCC_GENERIC_TUNE)
635635
else()
636-
message(WARNING "Unknown architecture ${DAEMON_ARCH}")
636+
message(WARNING "Unknown architecture ${DAEMON_ARCH_NAME}")
637637
endif()
638638

639639
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/DaemonNacl.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ else()
7272
elseif (DAEMON_NACL_ARCH_armhf)
7373
add_definitions( -DNACL_BUILD_ARCH=arm )
7474
else()
75-
message(WARNING "Unknown architecture ${DAEMON_NACL_ARCH}")
75+
message(WARNING "Unknown NaCl architecture ${DAEMON_NACL_ARCH_NAME}")
7676
endif()
7777
endif()
7878

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

@@ -59,7 +59,7 @@ function(daemon_detect_arch)
5959
endif()
6060

6161
# The DAEMON_NACL_ARCH variable contributes to the nexe file name.
62-
set(DAEMON_NACL_ARCH "${nacl_arch}" PARENT_SCOPE)
62+
set(DAEMON_NACL_ARCH_NAME "${nacl_arch}" PARENT_SCOPE)
6363
endfunction()
6464

6565
function(daemon_set_arch_intrinsics name)
@@ -76,16 +76,16 @@ function(daemon_set_intrinsics)
7676
# Makes possible to do that in C++ code:
7777
# > if defined(DAEMON_USER_ARCH_INTRINSICS_amd64)
7878
# > if defined(DAEMON_USER_ARCH_INTRINSICS_i686)
79-
daemon_set_arch_intrinsics("${DAEMON_ARCH}")
79+
daemon_set_arch_intrinsics("${DAEMON_ARCH_NAME}")
8080

8181
set(amd64_PARENT "i686")
8282
set(arm64_PARENT "armhf")
8383

84-
if ("${DAEMON_ARCH}_PARENT")
85-
daemon_set_arch_intrinsics("${${DAEMON_ARCH}_PARENT}")
84+
if ("${DAEMON_ARCH_NAME}_PARENT")
85+
daemon_set_arch_intrinsics("${${DAEMON_ARCH_NAME}_PARENT}")
8686
endif()
8787
else()
88-
message(STATUS "Disabling ${DAEMON_ARCH} architecture intrinsics")
88+
message(STATUS "Disabling ${DAEMON_ARCH_NAME} architecture intrinsics")
8989
endif()
9090
endfunction()
9191

@@ -95,11 +95,11 @@ daemon_set_intrinsics()
9595
# Makes possible to do that in CMake code:
9696
# > if (DAEMON_ARCH_arm64)
9797
# > if (DAEMON_NACL_ARCH_armhf)
98-
set("DAEMON_ARCH_${DAEMON_ARCH}" ON)
99-
set("DAEMON_NACL_ARCH_${DAEMON_NACL_ARCH}" ON)
98+
set("DAEMON_ARCH_${DAEMON_ARCH_NAME}" ON)
99+
set("DAEMON_NACL_ARCH_${DAEMON_NACL_ARCH_NAME}" ON)
100100

101101
if (DAEMON_SOURCE_GENERATOR)
102102
# Add printable strings to the executable.
103-
daemon_add_buildinfo("char*" "DAEMON_ARCH_STRING" "\"${DAEMON_ARCH}\"")
104-
daemon_add_buildinfo("char*" "DAEMON_NACL_ARCH_STRING" "\"${DAEMON_NACL_ARCH}\"")
103+
daemon_add_buildinfo("char*" "DAEMON_ARCH_STRING" "\"${DAEMON_ARCH_NAME}\"")
104+
daemon_add_buildinfo("char*" "DAEMON_NACL_ARCH_STRING" "\"${DAEMON_NACL_ARCH_NAME}\"")
105105
endif()

0 commit comments

Comments
 (0)