diff options
Diffstat (limited to 'volk')
-rw-r--r-- | volk/gen/archs.xml | 1 | ||||
-rw-r--r-- | volk/gen/volk_register.py | 2 | ||||
-rw-r--r-- | volk/lib/CMakeLists.txt | 21 |
3 files changed, 23 insertions, 1 deletions
diff --git a/volk/gen/archs.xml b/volk/gen/archs.xml index f6822871f..960558b7c 100644 --- a/volk/gen/archs.xml +++ b/volk/gen/archs.xml @@ -29,6 +29,7 @@ <val>1</val> <overrule>MD_SUBCPU</overrule> <overrule_val>x86</overrule_val> + <mutex>32</mutex> </arch> <arch name="3dnow" type="x86"> diff --git a/volk/gen/volk_register.py b/volk/gen/volk_register.py index 75e5eeb87..f5854bbce 100644 --- a/volk/gen/volk_register.py +++ b/volk/gen/volk_register.py @@ -91,7 +91,7 @@ for arch in archs: if a_var: archs.remove(arch); - +#strip out mutex archs archflags_dict = {} for filearch in filearchs: diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt index d69b4941d..b332ea5a3 100644 --- a/volk/lib/CMakeLists.txt +++ b/volk/lib/CMakeLists.txt @@ -27,6 +27,14 @@ EXECUTE_PROCESS( OUTPUT_VARIABLE arch_lines OUTPUT_STRIP_TRAILING_WHITESPACE ) +#get any mutually exclusive archs so we can exclude them +#this is really for compilers which can do both 32- and 64-bit compilations. +EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c + "from xml.dom import minidom; print ';'.join(map(lambda a: '%s %s'%(a.parentNode.attributes['name'].value,a.firstChild.data),minidom.parse('../gen/archs.xml').getElementsByTagName('mutex')))" + OUTPUT_VARIABLE mutex_lines OUTPUT_STRIP_TRAILING_WHITESPACE +) + #This macro sets the ${arch}_flag variable, #and handles special cases for MSVC arch flags. MACRO(set_arch_flag name flag) @@ -59,12 +67,25 @@ MACRO(handle_arch name flag) ENDIF() ENDMACRO(handle_arch) +MACRO(remove_mutex name mutex) + IF(have_${name}) + UNSET(have_${mutex}) + ENDIF() + LIST(REMOVE_ITEM available_arches ${mutex}) +ENDMACRO(remove_mutex) + #create a list of available arches FOREACH(arch_line ${arch_lines}) SEPARATE_ARGUMENTS(args UNIX_COMMAND "${arch_line}") handle_arch(${args}) ENDFOREACH(arch_line) +#strip out mutex archs +FOREACH(mutex_line ${mutex_lines}) + SEPARATE_ARGUMENTS(args UNIX_COMMAND "${mutex_line}") + remove_mutex(${args}) +ENDFOREACH(mutex_line) + MESSAGE(STATUS "Available arches: ${available_arches}") ######################################################################## |