diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt index a0dc14de284..33b3137c64c 100644 --- a/src/shogun/CMakeLists.txt +++ b/src/shogun/CMakeLists.txt @@ -23,9 +23,14 @@ OPTION(LIBSHOGUN_BUILD_STATIC "Build libshogun static library") OPTION(DISABLE_SSE "Disable SSE and SSE2 features.") OPTION(BUILD_BENCHMARKS "Build benchmarks" OFF) +IF (LIB_INSTALL_DIR) + SET(SHOGUN_LIB_INSTALL ${LIB_INSTALL_DIR}) +ELSE() + SET(SHOGUN_LIB_INSTALL lib) +ENDIF() set(INCLUDE_INSTALL_DIR include) set(THIRD_PARTY_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third_party) -set(SHOGUN_CLING_LIBRARY_DIR "\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\"") +set(SHOGUN_CLING_LIBRARY_DIR "\"${CMAKE_INSTALL_PREFIX}/${SHOGUN_LIB_INSTALL}\"") if (MSVC OR BUILD_BENCHMARKS) SET(LIBSHOGUN_BUILD_STATIC ON @@ -627,12 +632,6 @@ INSTALL( PATTERN "*Release*" EXCLUDE PATTERN ".settings" EXCLUDE) -IF (LIB_INSTALL_DIR) - SET(SHOGUN_LIB_INSTALL ${LIB_INSTALL_DIR}) -ELSE() - SET(SHOGUN_LIB_INSTALL lib) -ENDIF() - # set the desidered targets to be installed set(INSTALL_TARGETS shogun) if (LIBSHOGUN_BUILD_STATIC) diff --git a/src/shogun/base/class_list.cpp.py b/src/shogun/base/class_list.cpp.py index 8ca0a4d9018..fba0da383af 100644 --- a/src/shogun/base/class_list.cpp.py +++ b/src/shogun/base/class_list.cpp.py @@ -121,7 +121,7 @@ def get_includes(classes, headers_absolute_fnames): while tail != shogun_dir and len(head)>0: tails += [tail] head, tail = os.path.split(head) - + # construct include path from collected tails tails.reverse() include = os.path.join(*([shogun_dir] + tails)) @@ -302,10 +302,13 @@ def write_templated_file(fname, substitutes): def read_config(): config = dict() for line in open('lib/config.h').readlines(): - if line == '\n': + if line == '\n' or \ + line.lstrip().startswith("/*") or \ + line.lstrip().startswith("//"): continue l = [l.strip() for l in line.split()] - config[l[1]] = 1 + if len(l) > 1: + config[l[1]] = 1 return config