diff options
Diffstat (limited to 'volk')
-rw-r--r-- | volk/gen/volk_register.py | 14 | ||||
-rw-r--r-- | volk/lib/CMakeLists.txt | 3 |
2 files changed, 7 insertions, 10 deletions
diff --git a/volk/gen/volk_register.py b/volk/gen/volk_register.py index f5854bbce..cd874e470 100644 --- a/volk/gen/volk_register.py +++ b/volk/gen/volk_register.py @@ -3,6 +3,7 @@ import sys import os import re +import glob import string from xml.dom import minidom from volk_regexp import * @@ -48,18 +49,13 @@ outfile_environment_h = open(os.path.join(gendir, "lib/volk_environment_init.h") outfile_makefile_am = open(os.path.join(gendir, "lib/Makefile.am"), "w") outfile_machines_h = open(os.path.join(gendir, "lib/volk_machines.h"), "w") outfile_machines_c = open(os.path.join(gendir, "lib/volk_machines.c"), "w") -infile = open(os.path.join(srcdir, "include/volk/Makefile.am"), "r") - - -mfile = infile.readlines(); +hdr_files = glob.glob(os.path.join(srcdir, "include/volk/*.h")) datatypes = []; functions = []; - - -for line in mfile: - subline = re.search(".*_(a|u)\.h.*", line); +for line in hdr_files: + subline = re.search(".*_(a|u)\.h.*", os.path.basename(line)) if subline: subsubline = re.search("(?<=volk_).*", subline.group(0)); if subsubline: @@ -71,7 +67,7 @@ for line in mfile: datatypes = set(datatypes); -for line in mfile: +for line in hdr_files: for dt in datatypes: if dt in line: subline = re.search("(volk_" + dt +"_.*(a|u).*\.h)", line); diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt index d24c22c2c..645a0dc17 100644 --- a/volk/lib/CMakeLists.txt +++ b/volk/lib/CMakeLists.txt @@ -225,7 +225,8 @@ ENDIF() ######################################################################## # Setup the volk sources list and library ######################################################################## -IF(NOT WIN32) +IF(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) + #http://gcc.gnu.org/wiki/Visibility ADD_DEFINITIONS(-fvisibility=hidden) ENDIF() |