Skip to content

Commit 34b215f

Browse files
committed
Removed shorten-64-to-32 warning on x86 Mac
1 parent a13420b commit 34b215f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,11 @@ else() # macOS and Linux
462462
endif()
463463

464464
if (APPLE)
465-
target_compile_options(SerialProgramsLib PRIVATE -Wall -Wextra -Wpedantic -Werror -Wshorten-64-to-32)
465+
target_compile_options(SerialProgramsLib PRIVATE -Wall -Wextra -Wpedantic -Werror)
466+
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
467+
target_compile_options(SerialProgramsLib PRIVATE -Wshorten-64-to-32)
468+
endif()
469+
466470
# on macOS, need this framework to query OS API to control display sleep and system sleep behavior
467471
target_link_libraries(SerialProgramsLib PRIVATE "-framework IOKit -framework CoreFoundation")
468472
else() # Linux

0 commit comments

Comments
 (0)