diff options
Diffstat (limited to 'volk/lib/CMakeLists.txt')
-rw-r--r-- | volk/lib/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt index 092c3ba0d..00d8660ab 100644 --- a/volk/lib/CMakeLists.txt +++ b/volk/lib/CMakeLists.txt @@ -85,7 +85,17 @@ execute_process( #set the various overrule values (see archs.xml) #a lot of this is translating between automake and cmake if(NOT "${CROSSCOMPILE_MULTILIB}" STREQUAL "true") - set(MD_SUBCPU ${CMAKE_HOST_SYSTEM_PROCESSOR}) + set(MD_SUBCPU ${CMAKE_SYSTEM_PROCESSOR}) + #detect 32 or 64 bit compiler + if(MD_SUBCPU MATCHES "^(i.86|x86|x86_64|amd64)$") + include(CheckTypeSize) + check_type_size("void*" SIZEOF_VOID_P BUILTIN_TYPES_ONLY) + if (${SIZEOF_VOID_P} EQUAL 8) + set(MD_SUBCPU x86_64) + else() + set(MD_SUBCPU x86) + endif() + endif() endif() if(NOT "${ORC_FOUND}" STREQUAL "TRUE") set(LV_HAVE_ORC "no") @@ -267,7 +277,7 @@ if(ORC_FOUND) #create a rule to generate the source and add to the list of sources add_custom_command( - COMMAND ${ORCC_EXECUTABLE} --implementation -o ${orcc_gen} ${orc_file} + COMMAND ${ORCC_EXECUTABLE} --include math.h --implementation -o ${orcc_gen} ${orc_file} DEPENDS ${orc_file} OUTPUT ${orcc_gen} ) list(APPEND volk_sources ${orcc_gen}) |