File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,11 +43,11 @@ OPTION(CROSS_COMPILE_ARM "cross compile for ARM targets" OFF)
4343# Note: to compile on ARM (or cross compile), you may need to add the following:
4444# -DTARGET_ARCH="armv8-a -mfpu=neon -mfloat-abi=softfp -target arm-linux-gnueabi"
4545set (TARGET_ARCH "native" CACHE STRING "Target architecture arguments" )
46- string (REGEX MATCH "emulated\\\\ <[0-9]+\\ \\ >" TARGET_EMULATED ${TARGET_ARCH} )
46+ string (REGEX MATCH "emulated\\ <[0-9]+\\ >" TARGET_EMULATED ${TARGET_ARCH} )
4747
4848if (TARGET_EMULATED)
4949 message (STATUS "Using emulated target: ${TARGET_EMULATED} " )
50- set (CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -DXSIMD_DEFAULT_ARCH=${TARGET_ARCH} -DXSIMD_WITH_EMULATED=1" )
50+ set (EMULATED_COMPILE_FLAGS -DXSIMD_DEFAULT_ARCH=${TARGET_ARCH} ; -DXSIMD_WITH_EMULATED=1)
5151 unset (TARGET_ARCH CACHE )
5252endif ()
5353
@@ -234,6 +234,11 @@ endif()
234234add_subdirectory (doc )
235235add_subdirectory (architectures )
236236
237+ if (EMULATED_COMPILE_FLAGS)
238+ message (STATUS ${EMULATED_COMPILE_FLAGS} )
239+ target_compile_options (test_xsimd PRIVATE ${EMULATED_COMPILE_FLAGS} )
240+ endif ()
241+
237242if (EMSCRIPTEN)
238243 set_target_properties (test_xsimd PROPERTIES LINK_FLAGS "-s MODULARIZE=1 -s EXPORT_NAME=test_xsimd_wasm -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -lembind" )
239244 target_compile_options (test_xsimd
Original file line number Diff line number Diff line change 1010 ****************************************************************************/
1111
1212#include " xsimd/xsimd.hpp"
13- #ifndef XSIMD_NO_SUPPORTED_ARCHITECTURE
13+ #if !defined( XSIMD_NO_SUPPORTED_ARCHITECTURE) && !defined(XSIMD_WITH_EMULATED)
1414
1515#include < numeric>
1616#include < type_traits>
You can’t perform that action at this time.
0 commit comments