Skip to content

Commit af44e12

Browse files
committed
cmake: Add platform-specific compiler flags
1 parent 1651a68 commit af44e12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ target_link_libraries(core_base_interface INTERFACE
119119
)
120120
target_link_libraries(core_interface INTERFACE core_base_interface)
121121

122+
include(TryAppendCXXFlags)
123+
122124
if(WIN32)
123125
#[=[
124126
This build system supports two ways to build binaries for Windows.
@@ -172,6 +174,9 @@ if(WIN32)
172174
_WINDOWS
173175
_MT
174176
)
177+
# Avoid the use of aligned vector instructions when building for Windows.
178+
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
179+
try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_base_interface SKIP_LINK)
175180
endif()
176181
endif()
177182

0 commit comments

Comments
 (0)