diff --git a/.appveyor.yml b/.appveyor.yml index b0a1ef6..5d4861e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -21,18 +21,20 @@ install: test_script: # test/hello - "%PYTHON%/python setup.py develop" - - "clang-build -d\"test/hello\" -V" - - 'build\default\bin\main.exe' + - "%PYTHON%/python -m unittest" + #- "%PYTHON%/python setup.py develop" + #- "clang-build -d\"test/hello\" -V" + #- 'build\main.exe' # test/mini-project - - "clang-build -d\"test/mini-project\" -V" - - 'build\default\bin\main.exe' + #- "clang-build -d\"test/mini-project\" -V" + #- 'build\main.exe' # test/mwe-toml - - "clang-build -d\"test/mwe-toml\" -V" - - 'build\myexe\default\bin\runHello.exe' + #- "clang-build -d\"test/mwe-toml\" -V" + #- 'build\runHello.exe' # test/external-project - - "clang-build -d\"test/external-project\" -V" - - 'build\myexe\default\bin\runHello.exe' + #- "clang-build -d\"test/external-project\" -V" + #- 'build\myexe\runHello.exe' # test/lib-and-exe - - "clang-build -d\"test/lib-and-exe\" -V" + #- "clang-build -d\"test/lib-and-exe\" -V" # TODO: need to copy build/mylib/mylib.dll into exe's directory # - 'build\myexe\default\bin\runLib.exe' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0f99846..79e97ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +AUTHORS +ChangeLog + ### Subdirectories ### */build/* diff --git a/.travis.yml b/.travis.yml index 3d45d61..3998503 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,22 +21,6 @@ matrix: - sourceline: 'ppa:jonathonf/gcc-7.1' - sourceline: 'ppa:deadsnakes/ppa' dist: trusty - - language: python - os: linux - env: DEPLOY=false - python: 2.7 - addons: - apt: - packages: - - ca-certificates - - libc++-dev - - g++-7 - - clang - sources: - - sourceline: 'ppa:ubuntu-toolchain-r/test' - - sourceline: 'ppa:jonathonf/gcc-7.1' - - sourceline: 'ppa:deadsnakes/ppa' - dist: trusty - language: cpp os: osx env: DEPLOY=true @@ -46,33 +30,25 @@ matrix: install: - pip install setuptools + - pip install coveralls - python setup.py develop script: - clang --version - python --version - pip --version - # test/hello - - clang-build -d"test/hello" -V - - ./build/default/bin/main - # test/mini-project - - clang-build -d"test/mini-project" -V - - ./build/default/bin/main - # test/mwe-toml - - clang-build -d"test/mwe-toml" -V - - ./build/myexe/default/bin/runHello - # test/external-project - - clang-build -d"test/external-project" -V - - ./build/myexe/default/bin/runHello - # test/lib-and-exe - - clang-build -d"test/lib-and-exe" -V - # TODO: need to copy build/mylib/mylib.so into exe's directory on linux - # - ./build/myexe/default/bin/runLib + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then python setup.py test; fi + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then coverage run --source clang_build setup.py test; fi + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then coverage report -m; fi + +after_success: + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then coveralls; fi deploy: provider: pypi user: "$PYPIUSER" password: "$PYPIPASSWORD" + skip_cleanup: true on: all_branches: true condition: $DEPLOY = true \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 270610b..0000000 --- a/README.md +++ /dev/null @@ -1,304 +0,0 @@ -Clang-build -============================================== - -Linux and OSX test: [![Test status](https://travis-ci.org/Trick-17/clang-build.svg?branch=master)](https://travis-ci.org/Trick-17/clang-build) -Windows test: [![Test status](https://ci.appveyor.com/api/projects/status/57qv53r4totihxrj/branch/master?svg=true)](https://ci.appveyor.com/project/GPMueller/clang-build) - - - -**Motivation:** - -- Meta build systems are inherently the wrong way to go, either the build system or the compiler should be platform-agnostic. -- Trying to cover all use-cases is the wrong way to go - there is no need to let people do it the wrong way -- CMake is cumbersome, unnecessarily generic and verbose and people should not need a second programming language to be able to build C++ -- With Clang, finally a properly cross-platform compiler exists -- With Python we have a language we can use consistently across platforms - -**Goals:** - -- One compiler (Clang), one build system (written in Python) -- Simple projects should be simple to build -- Build process for reasonable project structures should still be easy -- Adding third-party dependencies should be manageable - -**Related resources:** - -- [CppCon 2017: Isabella Muerte "There Will Be Build Systems: I Configure Your Milkshake"](https://www.youtube.com/watch?v=7THzO-D0ta4) -- https://medium.com/@corentin.jabot/accio-dependency-manager-b1846e1caf76 - - - -Usage ----------------------------------------------- - -In order to run `clang-build` one should only need to have Python and Clang installed. -If you have admin rights, `pip install`, otherwise just drop-in the `clang-build.py` script, -e.g. `curl -O https://raw.githubusercontent.com/GPMueller/clang-build-test/master/clang-build.py` - -- `clang-build` to build the current directory -- `clang-build -d"path/to/dir"` to build a different directory (alternatively `--directory`) -- `clang-build -V` to print the called clang commands (alternatively `--verbose`) - -The given directory will be searched for a `clang-build.toml` file, which you can use to configure -your build targets, if necessary. If the build file cannot be found, `clang-build` will try to -create an executable from your project, searching the root and some default folders for sources -and headers. - -*Note: until this is a package on pypi, you need to call `python clang-build.py` instead of just `clang-build`...* - - - -General Ideas -============================================== - - - -What should be trivial ----------------------------------------------- - -This would be things that require only the invocation of `clang-build` and no build file. - -- build a hello world program (i.e anything with single main and without non-std dependencies) -- build a reasonable MWE with local dependencies (potentially folder structure with e.g. `src`, `include/MWE` and `include/thirdparty`) -- include stdlib -- include anything that can be found by sane default search -- using command line arguments: - - specify root/source folder - - set build type from (last used should be cached/remembered) - - set build verbosity - -Sane defaults and default behaviour: - -- platform-independence -- build into a "build/" directory, not into toplevel -- for multiple targets build into "build/target" -- default search paths for different platforms, including also e.g. "./include", "./lib", "./build/lib", "/usr/local/...", ... - - - -What should be easy ----------------------------------------------- - -This would be things that only require a minimal TOML project file - -- add dependency / external project from source folder or remote (e.g. github) - - header-only should be trivial - - for a regular (not too complicated) library it should be easy to write a build config -- create a library from one subfolder, an executable from another and link them -- setting target-specific (note: defaults should be sane!) - - source file extensions - - source directories - - compile and link flags - - optional version - - dependencies (which may include non-targets, e.g. configuration steps) - - properties (required c++ version, definitions/`#define`s, ...) -- access to flag "lists" such as flags for - - coverage - - cuda - - openmp -- set target-specific flags, include folders, etc. which should not be propagated to dependency parents as "private" -- scripting custom behaviour per target (e.g. generating a version header file before compiling) - - - -What should be possible ----------------------------------------------- - -Steps that would involve more effort from the user, including possibly some python code - -- through the configuration step, inclusion of e.g. CMake-project should be possible -- packaging: any target may be packaged, meaning it's dependencies are handled and if built, binaries may be bundled -- external package dependencies - - binaries on a server - - source on a server (fallback from binaries) - - binaries on disk, try to determine version from path and file names - - source on disk, try to determine version from path and file names - - - -Project File By Example -============================================== - - - -A single target ----------------------------------------------- - -```TOML -# Top-level brackets indicate a target -[hello] -# Note: the following sources settings could be left out. -# .hpp and .cpp files will be searched for in include and src by default -[hello.sources] -file_extensions = [".hpp", ".cpp"] -include_directories = ["include"] -source_directories = ["src"] -# Some properties -[hello.properties] -cpp_version = 17 -output_name = "runHello" # name should not contain pre- or suffixes such as lib, .exe, .so -``` - - - -Two targets with linking ----------------------------------------------- - -```TOML -# Build a library -[mylib] -target_type = "sharedlibrary" -[mylib.sources] -include_directories = ["mylib/include"] -source_directories = ["mylib/src"] - -# Build an executable and link the library -[myexe] -output_name = "runExe" -target_type = "executable" -[myexe.sources] -include_directories = ["myexe/include"] -source_directories = ["myexe/src"] - -[myexe.link] -dependencies = ["mylib"] - -[myexe.flags] -link = ["-DMYLIB_SOME_DEFINE"] -``` - - - -A package used by a target ----------------------------------------------- - -`mypackage/clang-build.toml` -```TOML -# Build a library -[mylib] -target_type = "library" -[mylib.sources] -include_directories = ["mylib/include"] -source_directories = ["mylib/src"] -``` - -`myexe/clang-build.toml` -```TOML -# Include an external package/target (i.e. not from this toml file) -[somelib] -external = true -path = "/path/to/sources" - -# Build an executable and link the library -[myexe] -[myexe.sources] -include_directories = ["include"] -source_directories = ["src"] - -[myexe.link] -dependencies = ["somelib"] -``` - - - -Packages from server ----------------------------------------------- - -```TOML -# Build a library -[mylib] -external = true -url = "/~https://github.com/trick-17/mylib" -version = 1.1 # will try to git checkout [v]1.1[.*] - -# Build an executable and link the library -[myexe] -[myexe.link] -dependencies = ["mylib"] -``` - - - -Calling custom scripts ----------------------------------------------- - -```TOML -# Build an executable -[myexe] -[myexe.scripts] -before_compile = "generateVersionHeader.py" -before_link = "something.py" -after_build = "else.py" -``` - - - -Defaults -============================================== - - - -General ----------------------------------------------- - -- all relative paths in a toml are interpreted as relative to that toml file -- if only one target is built from source, it is built into `build/` -- if more than one target is built from source, they are built into `build//` - - - -Target properties ----------------------------------------------- - -- target and its properties are **public** by default. The property `private = true` - can be used to set a target to be only visible in the local .toml. - - - -Include Paths ----------------------------------------------- - -Note: only those paths should be added to the build flags, which the build system finds contain needed files. - -### Linux -- . -- ./include -- /usr/local -- /opt -- $PATH -- /include - -### OSX -- . -- ./include -- /usr/local -- /opt -- $PATH -- /include - -### Windows -- . -- ./include -- %PATH% - - - -External targets ----------------------------------------------- - -### Search paths - -The build system should search these paths for folders with names corresponding -to the external targets. -For paths which were manually specified, the build system should search more -deeply to try and find a `clang-build.toml` and in turn search that for the -corresponding target names. - -Local: - -- `./` -- `./` - -git server: -- `` -- `/` \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..2fecec6 --- /dev/null +++ b/README.rst @@ -0,0 +1,194 @@ +Clang-build +=========== + +Linux and OSX test: |Test status| Windows test: |Test status| Code quality: |codacy| + +**Motivation:** + +- Meta build systems are inherently the wrong way to go, either the build system or the compiler should be platform-agnostic (ideally both). +- Trying to cover all use-cases is the wrong way to go - there is no need to let people do it the wrong way +- CMake is cumbersome, unnecessarily generic and verbose and people should not need a programming/scripting language whose only purpose is to build C++ +- With Clang, finally a properly cross-platform compiler exists + +**Goals:** + +- One compiler (Clang), one build system (written in Python) +- Simple projects should be simple to build +- Build process for reasonable project structures should still be easy +- Adding third-party dependencies should be manageable + +**Related resources:** + +- `CppCon 2017: Isabella Muerte "There Will Be Build Systems: I + Configure Your + Milkshake" `__ +- https://medium.com/@corentin.jabot/accio-dependency-manager-b1846e1caf76 + + +Usage +===== + +In order to run ``clang-build``, you only need Clang and Python3. +Install via ``pip install clang-build`` (add the ``--user`` flag if you don't have admin rights). + +Running ``clang-build`` will try to build the current directory. +The command-line options include + +- ``-d path/to/dir`` to build a different directory +- ``-p`` to show a progress bar +- ``-V`` to print some additional info +- ``--debug`` to print the called clang commands + +The given directory will be searched for a ``clang-build.toml`` file, which you can use to configure +your build targets, if necessary. However, if you only want to build an executable, you will +likely not even need a build file. + +clang-build tries to use sane defaults, designed to make most projects very easy to configure +and even complex projects far easier than with common build or meta-build systems. + + +General Ideas +============= +*Note: not all of these are implemented, yet.* + +What should be trivial +---------------------- + +This would be things that require only the invocation of ``clang-build`` +and no build file. + +- build a hello world program (i.e anything with single main and + without non-std dependencies) +- build a reasonable MWE with local dependencies (potentially folder + structure with e.g. ``src``, ``include/MWE`` and + ``include/thirdparty``) +- include stdlib +- include anything that can be found by sane default search +- using command line arguments: +- specify root/source folder +- set build type from (last used should be cached/remembered) +- set build verbosity + +Sane defaults and default behaviour: + +- platform-independence +- build into a "build/" directory, not into toplevel +- for multiple targets build into "build/target" +- default search paths for different platforms, including also e.g. + "./include", "./lib", "./build/lib", "/usr/local/...", ... + +What should be easy +------------------- + +This would be things that only require a minimal TOML project file + +- add dependency / external project from source folder or remote (e.g. + github) +- header-only should be trivial +- for a regular (not too complicated) library it should be easy to + write a build config +- create a library from one subfolder, an executable from another and + link them +- setting target-specific (note: defaults should be sane!) +- source file extensions +- source directories +- compile and link flags +- optional version +- dependencies (which may include non-targets, e.g. configuration + steps) +- properties (required c++ version, definitions/\ ``#define``\ s, ...) +- access to flag "lists" such as flags for +- coverage +- cuda +- openmp +- set target-specific flags, include folders, etc. which should not be + propagated to dependency parents as "private" + +What should be possible +----------------------- + +Steps that would involve more effort from the user, including possibly +some python code + +- a Target configuration step before building (e.g. for more involved + version numbering) +- through the configuration step, inclusion of e.g. CMake-project + should be possible +- packaging: any target may be packaged, meaning it's dependencies are + handled and if built, binaries may be bundled +- external package dependencies +- binaries on a server +- source on a server (fallback from binaries) +- binaries on disk, try to determine version from path and file names +- source on disk, try to determine version from path and file names + + +Project File By Example +======================= + +A single target +--------------- + +Note: + +- by default, the root and folders, as well as "include" and "src" subdirectories will be searched for ".hpp", ".hxx", ".h" and ".cpp", ".cxx" and ".c" files +- a target without ``target_type``, but with source files will be an executable +- ``output_name`` should not contain pre- or suffixes such as lib, .exe, .so, as they are added automatically +- if we don't care about the output name, in this case we could skip the project file entirely + +.. code:: toml + + # Top-level brackets indicate a target + [hello] + output_name = "runHello" + +Two targets with linking +------------------------ + +.. code:: toml + + # Build a library + [mylib] + target_type = "shared library" + + # Build an executable and link the library + [myexe] + output_name = "runExe" + target_type = "executable" + dependencies = ["mylib"] + [myexe.flags] + link = ["-DMYEXE_SOME_DEFINE"] + +Adding external dependencies +---------------------------- + +Note: + +- external projects will be copied/downloaded into "build/targetname/external_sources" +- you can specify a subdirectory, if the thirdparty code has an unusual structure +- further granularity is given by ``include_directories`` and ``source_directories`` + +.. code:: toml + + [mylib] + external = true + url = "/~https://github.com/trick-17/mylib" + version = 1.1 # will try to git checkout [v]1.1[.*] + directory = "sources" # will point to "build/mylib/external_sources/sources" + include_directories = ["mylib/include"] # will point to "build/mylib/external_sources/sources/mylib" + source_directories = ["mylib/src"] # will point to "build/mylib/external_sources/sources/mylib" + # Maybe we need to deactivate annoying warnings coming from the library + [mylib.flags] + compile = ["-Wno-deprecated-declarations", "-Wno-self-assign"] + + # Build an executable and link the library + [myexe] + dependencies = ["mylib"] + + +.. |Test status| image:: https://travis-ci.org/Trick-17/clang-build.svg?branch=master + :target: https://travis-ci.org/Trick-17/clang-build +.. |Test status| image:: https://ci.appveyor.com/api/projects/status/57qv53r4totihxrj/branch/master?svg=true + :target: https://ci.appveyor.com/project/GPMueller/clang-build +.. |codacy| image:: https://api.codacy.com/project/badge/Grade/2bcc761ed19844c48f92f7779e2cf67f + :target: https://www.codacy.com/app/Trick-17/clang-build?utm_source=github.com&utm_medium=referral&utm_content=Trick-17/clang-build&utm_campaign=Badge_Grade \ No newline at end of file diff --git a/clang_build/__init__.py b/clang_build/__init__.py index 40219bd..2cffea9 100644 --- a/clang_build/__init__.py +++ b/clang_build/__init__.py @@ -1,5 +1 @@ -from pbr.version import VersionInfo - -_v = VersionInfo('clang-build').semantic_version() -__version__ = _v.release_string() -version_info = _v.version_tuple \ No newline at end of file +from .clang_build import _v, __version__, version_info diff --git a/clang_build/build_type.py b/clang_build/build_type.py new file mode 100644 index 0000000..8bd93db --- /dev/null +++ b/clang_build/build_type.py @@ -0,0 +1,20 @@ +from enum import Enum as _Enum + +class BuildType(_Enum): + Default = 'default' + Release = 'release' + #MinSizeRel = 2 + #RelWithDebInfo = 3 + Debug = 'debug' + #Coverage = 5 + + def __str__(self): + return self.value + + # Let's be case insensitive + @classmethod + def _missing_(cls, value): + for item in cls: + if item.value.lower() == value.lower(): + return item + return super()._missing_(value) diff --git a/clang_build/clang_build.py b/clang_build/clang_build.py index c5197fe..a1d5c5a 100644 --- a/clang_build/clang_build.py +++ b/clang_build/clang_build.py @@ -1,808 +1,365 @@ -""" +''' clang-build: TODO: module docstring... -""" +''' - - -import os +import logging as _logging +from pathlib import Path as _Path +import textwrap as _textwrap import sys -from sys import platform as _platform -import subprocess -from multiprocessing import Pool -import getopt +from multiprocessing import Pool as _Pool +from multiprocessing import freeze_support as _freeze_support import argparse -from distutils.dir_util import mkpath -from enum import Enum -from glob import glob -import tempfile +from shutil import which as _which import toml +from pbr.version import VersionInfo as _VersionInfo + +from .dialect_check import get_max_supported_compiler_dialect as _get_max_supported_compiler_dialect +from .build_type import BuildType as _BuildType +from .target import Executable as _Executable,\ + SharedLibrary as _SharedLibrary,\ + StaticLibrary as _StaticLibrary,\ + HeaderOnly as _HeaderOnly +from .dependency_tools import find_circular_dependencies as _find_circular_dependencies,\ + find_non_existent_dependencies as _find_non_existent_dependencies,\ + get_dependency_walk as _get_dependency_walk +from .io_tools import get_sources_and_headers as _get_sources_and_headers +from .progress_bar import CategoryProgress as _CategoryProgress,\ + IteratorProgress as _IteratorProgress +from .logging_stream_handler import TqdmHandler as _TqdmHandler + +_v = _VersionInfo('clang-build').semantic_version() +__version__ = _v.release_string() +version_info = _v.version_tuple + + + +def _setup_logger(log_level=None): + logger = _logging.getLogger(__name__) + logger.setLevel(_logging.DEBUG) + + # create formatter _and add it to the handlers + formatter = _logging.Formatter('%(message)s') + + # add log file handler + fh = _logging.FileHandler('clang-build.log', mode='w') + fh.setLevel(_logging.DEBUG) + fh.setFormatter(formatter) + logger.addHandler(fh) + + if log_level is not None: + ch = _TqdmHandler() + ch.setLevel(log_level) + ch.setFormatter(formatter) + logger.addHandler(ch) + + + + +_command_line_description = ( +'`clang-build` is a build system to build your C++ projects. It uses the clang ' +'compiler/toolchain in the background and python as the build-system\'s scripting ' +'language.\n' +'For more information please visit: /~https://github.com/trick-17/clang-build') + +def parse_args(args): + parser = argparse.ArgumentParser(description=_command_line_description, formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('-V', '--verbose', + help='activate more detailed output', + action='store_true') + parser.add_argument('-p', '--progress', help='activates a progress bar output. is overruled by -V and --debug', action='store_true') + parser.add_argument('-d', '--directory', type=_Path, + help='set the root source directory') + parser.add_argument('-b', '--build-type', choices=list(_BuildType), type=_BuildType, default=_BuildType.Default, + help='set the build type for this project') + parser.add_argument('-j', '--jobs', type=int, default=1, + help='set the number of concurrent build jobs') + parser.add_argument('--debug', help='activates additional debug output, overrides verbosity option.', action='store_true') + return parser.parse_args(args=args) + + +def _find_clang(logger): + clangpp = _which('clang++') + clang_ar = _which('llvm-ar') + if clangpp: + llvm_root = _Path(clangpp).parents[0] + else: + logger.error('Couldn\'t find clang++ executable') + sys.exit(1) + if not clang_ar: + logger.error('Couldn\'t find llvm-ar executable') + sys.exit(1) + logger.info(f'llvm root directory: {llvm_root}') + logger.info(f'clang++ executable: {clangpp}') + logger.info(f'llvm-ar executable: {clang_ar}') + logger.info(f'Newest supported C++ dialect: {_get_max_supported_compiler_dialect(clangpp)}') + return clangpp, clang_ar -# Global pool for multiprocess build -processpool = None - - - -class TargetType(Enum): - Sharedlibrary = 0 - Staticlibrary = 1 - Executable = 2 -class BuildType(Enum): - Default = 0 - Release = 1 - MinSizeRel = 2 - RelWithDebInfo = 3 - Debug = 4 - Coverage = 5 - - - -executable_suffix = '' -shared_library_prefix = '' -shared_library_suffix = '' -static_library_prefix = '' -static_library_suffix = '' -if _platform == "linux" or _platform == "linux2": - # Linux - shared_library_prefix = 'lib' - shared_library_suffix = '.so' - static_library_prefix = 'lib' - static_library_suffix = '.a' - platform_extra_flags_executable = [''] - platform_extra_flags_shared = ['-fpic'] - platform_extra_flags_static = [''] -elif _platform == "darwin": - # OS X - shared_library_prefix = 'lib' - shared_library_suffix = '.dylib' - static_library_prefix = 'lib' - static_library_suffix = '.a' - platform_extra_flags_executable = [''] - platform_extra_flags_shared = [''] - platform_extra_flags_static = [''] -elif _platform == "win32": - # Windows - executable_suffix = '.exe' - shared_library_prefix = '' - shared_library_suffix = '.dll' - static_library_prefix = '' - static_library_suffix = '.lib' - platform_extra_flags_executable = ['-Xclang', '-flto-visibility-public-std'] - platform_extra_flags_shared = ['-Xclang', '-flto-visibility-public-std'] - platform_extra_flags_static = ['-Xclang', '-flto-visibility-public-std'] - - - -# Get the dialects of C++ available in clang -supported_dialects = ['98'] -# Create a temporary file with a main function -with tempfile.NamedTemporaryFile() as fp: - fp.write(b"int main(int argc, char ** argv){return 0;}") - fp.seek(0) - # Try to compile the file using `-std=c++XX` flag - for dialect in range(30): - str_dialect = str(dialect).zfill(2) - command = ["clang", "-xc++", "-std=c++"+str_dialect, fp.name, "-o"+tempfile.gettempdir()+"/test"] - try: - subprocess.check_output(command, stderr=subprocess.STDOUT) - # If it compiled, the dialect is supported - if str_dialect not in supported_dialects: supported_dialects.append(str_dialect) - except: - pass # We expect this to usually fail - -# The most recent C++ version available -supported_dialect_newest = supported_dialects[-1] - - - -def listToString(theList, separator=" "): - theString = theList[0] - for string in theList[1:]: - theString += separator + string - return theString - - - -""" -Buildable describes a source file and all information needed to build it. -""" -class Buildable: - def __init__(self, sourceFile, targetType, buildType=BuildType.Default, verbose=False, targetDirectory="", depfileDirectory="", objectDirectory="", buildDirectory="", root="", includeDirectories=[], compileFlags=[], linkFlags=[]): - self.sourceFile = sourceFile - self.targetType = targetType - self.buildType = buildType - self.verbose = verbose - self.targetDirectory = targetDirectory - self.buildDirectory = buildDirectory - self.objectDirectory = objectDirectory - self.depfileDirectory = depfileDirectory - self.root = root - self.includeDirectories = includeDirectories - self.compileFlags = compileFlags - self.linkFlags = linkFlags - - # Get the relative file path - path, file = os.path.split(sourceFile) - relpath = os.path.relpath(path, self.targetDirectory+"/"+self.root) - if os.path.exists(self.targetDirectory+"/"+self.root+'/src'): - relpath = os.path.relpath(relpath, 'src') - # Get file name and extension - name, extension = os.path.splitext(file) - - # Set name, extension and potentially produced output files - self.name = name - self.fileExtension = extension - self.objectFile = self.objectDirectory + "/" + relpath + "/" + self.name + ".o" - self.depfile = self.depfileDirectory + "/" + relpath + "/" + self.name + ".d" - - # Find and parse the dependency file, return list of headers this file depends on - def getDepfileHeaders(self): - depfileHeaders = [] - with open(self.depfile, "r") as the_file: - depStr = the_file.read() - colonPos = depStr.find(":") - for line in depStr[colonPos + 1:].splitlines(): - depline = line.replace(' \\', '').strip().split() - for header in depline: - depfileHeaders.append(header) - return depfileHeaders - - - -""" -Scan the dependencies of a Buildable and write them into a depfile -This is not a class method, so that it can be called from multiprocessing -""" -def generateDepfile(buildable): - sourceFile = buildable.sourceFile - objectFile = buildable.objectFile - - path, _ = os.path.split(buildable.depfile) - mkpath(path) - - flags = [] - - for flag in buildable.compileFlags: - flags.append(flag) - - for dir in buildable.includeDirectories: - flags.append("-I" + dir) - - command = ["clang++", "-E", "-MMD", sourceFile, "-MF", buildable.depfile] - command += flags - - if buildable.verbose: - print("-- " + listToString(command)) - devnull = open(os.devnull, 'w') - subprocess.call(command, stdout=devnull, stderr=devnull) - - - -""" -Compile a Buildable... -""" -def compile(buildable): - - path, _ = os.path.split(buildable.objectFile) - mkpath(path) - - flags = [] - - for flag in buildable.compileFlags: - flags.append(flag) - - for dir in buildable.includeDirectories: - flags.append("-I" + dir) - - if buildable.targetType == TargetType.Executable: - flags += platform_extra_flags_executable - elif buildable.targetType == TargetType.Sharedlibrary: - flags += platform_extra_flags_shared - elif buildable.targetType == TargetType.Staticlibrary: - flags += platform_extra_flags_static - - command = ["clang++", "-c", buildable.sourceFile, "-o", buildable.objectFile] - command += flags - - if buildable.verbose: - print("-- " + listToString(command)) - subprocess.call(command) - - - -""" -Target describes a single build or dependency target with all needed paths and -a list of buildables that comprise it's compile and link steps. -""" -class Target: - def __init__(self, environment, name=""): - # Clang - self.clangpp = environment.clangpp - self.clang_ar = environment.clang_ar - self.llvm_root = environment.llvm_root - - # Basics - self.targetDirectory = environment.workingDirectory - self.buildType = environment.buildType - self.verbose = environment.verbose - self.root = "" - self.dialect = supported_dialect_newest - - # Properties - self.buildDirectory = "build" - self.name = name - self.outname = "main" - self.targetType = TargetType.Executable - self.external = False - self.header_only = False - - # Custom flags (set from project file) - self.includeDirectories = [] - self.compileFlags = [] - self.compileFlagsDebug = [] - self.compileFlagsRelease = [] - self.linkFlags = [] - # Include flags - self.defaultIncludeDirectories = ["include", "thirdparty"] +def main(): + args = parse_args(sys.argv[1:]) + + progress_disabled = True + # Verbosity + if not args.debug: + if args.verbose: + _setup_logger(_logging.INFO) + else: + # Only file log + _setup_logger(None) + else: + _setup_logger(_logging.DEBUG) - # Default flags - self.defaultCompileFlags = ["-std=c++"+supported_dialect_newest, "-Wall", "-Werror"] + if args.progress: + progress_disabled = False - # Default release flags - self.defaultReleaseCompileFlags = ["-O3", "-DNDEBUG"] - # Default debug flags - self.defaultDebugCompileFlags = ["-O0", "-g3", "-DDEBUG"] - # Default coverage flags - self.defaultCoverageCompileFlags = self.defaultDebugCompileFlags + ["--coverage", "-fno-inline", "-fno-inline-small-functions", "-fno-default-inline"] + # + # TODO: create try except around build and deal with it. + # + build(args, progress_disabled) - # Output directories - if environment.config: - targetBuildDir = self.buildDirectory + "/" + self.name + "/" + self.buildType.name.lower() - else: - targetBuildDir = self.buildDirectory + "/" + self.buildType.name.lower() - self.binaryDirectory = targetBuildDir + "/bin" - self.libraryDirectory = targetBuildDir + "/lib" - self.objectDirectory = targetBuildDir + "/obj" - self.depfileDirectory = targetBuildDir + "/deps" - self.testBinaryDirectory = targetBuildDir + "/test" - - # Sources - self.headerFiles = [] - self.sourceFiles = [] - - # Buildables which this Target contains - self.buildables = [] - - # Dependencies - self.dependencies = [] # string - self.dependencyTargets = [] # Target - # Parents in the dependency graph - self.dependencyParents = [] - - # Flag whether generation of all flags has been completed - self.flagsGenerated = False - # Flags whether compilation/linkage has been completed - self.compiled = False - self.linked = False - - # Extra scripts - self.beforeCompileScript = "" - self.beforeLinkScript = "" - self.afterBuildScript = "" - - def generateBuildables(self): - for sourceFile in self.sourceFiles: - buildable = Buildable(sourceFile, self.targetType, buildType=self.buildType, verbose=self.verbose, depfileDirectory=self.depfileDirectory, objectDirectory=self.objectDirectory, targetDirectory=self.targetDirectory, buildDirectory=self.buildDirectory, root=self.root, includeDirectories=self.includeDirectories, compileFlags=self.compileFlags, linkFlags=self.linkFlags) - self.buildables.append(buildable) - - def generateFlags(self): - # All dependencies need to have generated their flags before this target can proceed - for target in self.dependencyTargets: - if not target.flagsGenerated: - return - - flags = [] - # Default flags - for flag in self.defaultCompileFlags: - flags.append(flag) - # Own flags - for flag in self.compileFlags: - flags.append(flag) - if self.buildType == BuildType.Release: - for flag in self.defaultReleaseCompileFlags: - flags.append(flag) - for flag in self.compileFlagsRelease: - flags.append(flag) - if self.buildType == BuildType.Debug: - for flag in self.defaultDebugCompileFlags: - flags.append(flag) - for flag in self.compileFlagsDebug: - flags.append(flag) - - # Dependency flags - for target in self.dependencyTargets: - flags += target.compileFlags - - # Append - self.compileFlags = [] - for flag in flags: - if flag not in self.compileFlags: - self.compileFlags.append(flag) - - includeDirs = [] - # Own include directories - for dir in self.defaultIncludeDirectories: - includeDirs.append(self.targetDirectory + "/" +dir) - # Dependency include directories - for target in self.dependencyTargets: - for dir in target.includeDirectories: - includeDirs.append(dir) - - # Append - for dir in includeDirs: - if not dir in self.includeDirectories: - self.includeDirectories.append(dir) - - # Done - self.flagsGenerated = True - - # Spawn compilation of dependency parents - for parent in self.dependencyParents: - parent.generateFlags() - - # From the list of source files, compile those which changed or whose dependencies (included headers, ...) changed - def compile(self): - # All dependencies need to be compiled before the target can be compiled - for target in self.dependencyTargets: - if not target.compiled: - return - - # If the target is header-only it does not need to be compiled - if len(self.sourceFiles) < 1: - if self.verbose: - print("-- Target " + self.outname + " seems to be header-only") - self.header_only = True - - # Object file only needs to be (re-)compiled if the source file or headers it depends on changed - neededBuildables = [] - for buildable in self.buildables: - sourceFile = buildable.sourceFile - objectFile = buildable.objectFile - # Check if object file has been compiled - if os.path.isfile(objectFile): - # If object file is found, check if it is up to date - if os.path.getmtime(sourceFile) > os.path.getmtime(objectFile): - neededBuildables.append(buildable) - # If object file is up to date, we check the headers it depends on - else: - depHeaderFiles = buildable.getDepfileHeaders() - for depHeaderFile in depHeaderFiles: - if os.path.getmtime(depHeaderFile) > os.path.getmtime(objectFile): - neededBuildables.append(buildable) - else: - neededBuildables.append(buildable) - - # If the target was not modified, it may not need to compile - if not neededBuildables and not self.header_only: - if self.verbose: - print("-- Target " + self.outname + " is already compiled") - self.compiled = True - - if self.verbose and neededBuildables: - print("-- Target " + self.outname + ": need to rebuild sources ", [b.name for b in neededBuildables]) - - # Before-compile step - if self.beforeCompileScript and not self.compiled: - if self.verbose: - print("-- Pre-compile step of target " + self.outname) - originalDir = os.getcwd() - newDir, _ = os.path.split(self.beforeCompileScript) - os.chdir(newDir) - execfile(self.beforeCompileScript) - os.chdir(originalDir) - if self.verbose: - print("-- Finished pre-compile step of target " + self.outname) - - # Compile - if not (self.compiled or self.header_only): - # Create base directory for build - mkpath(self.buildDirectory) - - # Create header dependency graph - print("-- Scanning dependencies of target " + self.outname) - processpool.map(generateDepfile, neededBuildables) - - # Execute compile command - print("-- Compile target " + self.outname) - processpool.map(compile, neededBuildables) - - # Done - self.compiled = True - - # Spawn compilation of dependency parents - for parent in self.dependencyParents: - parent.compile() - - # Link the compiled object files - def link(self): - # All dependencies need to be finished before the target can be linked - for target in self.dependencyTargets: - if not target.linked: - return - - if self.targetType == TargetType.Executable: - self.prefix = "" - self.suffix = executable_suffix - elif self.targetType == TargetType.Sharedlibrary: - self.prefix = shared_library_prefix - self.suffix = shared_library_suffix - elif self.targetType == TargetType.Staticlibrary: - self.prefix = static_library_prefix - self.suffix = static_library_suffix - - # Before-link step - if self.beforeLinkScript: - if self.verbose: - print("-- Pre-link step of target " + self.outname) - originalDir = os.getcwd() - newDir, _ = os.path.split(self.beforeCompileScript) - os.chdir(newDir) - execfile(self.beforeLinkScript) - os.chdir(originalDir) - if self.verbose: - print("-- Finished pre-link step of target " + self.outname) - - # Link - if not self.header_only: - self.outfile = self.prefix + self.outname + self.suffix - - if self.targetType == TargetType.Executable: - linkCommand = [self.clangpp, "-o", self.binaryDirectory+"/"+self.outfile] - mkpath(self.binaryDirectory) - - elif self.targetType == TargetType.Sharedlibrary: - linkCommand = [self.clangpp, "-shared", "-o", self.libraryDirectory+"/"+self.outfile] - mkpath(self.libraryDirectory) - - elif self.targetType == TargetType.Staticlibrary: - linkCommand = [self.clang_ar, "rc", self.libraryDirectory+"/"+self.outfile] - mkpath(self.libraryDirectory) - - ### Library dependency search paths - for target in self.dependencyTargets: - if not target.header_only: - linkCommand += ["-L"+os.path.abspath(target.libraryDirectory)] - - ### Include directories - if self.targetType == TargetType.Executable or self.targetType == TargetType.Sharedlibrary: - for dir in self.includeDirectories: - linkCommand.append("-I"+dir) - - ### Link self - for buildable in self.buildables: - objectFile = buildable.objectFile - linkCommand.append(objectFile) - - ### Link dependencies - for target in self.dependencyTargets: - if not target.header_only: - linkCommand += ["-l"+target.outname] - - # Execute link command - print("-- Link target " + self.outname) - if self.verbose: - print("-- " + listToString(linkCommand)) - subprocess.call(linkCommand) - - # Done - self.linked = True - - # After-build step - if self.afterBuildScript: - if self.verbose: - print("-- After-build step of target " + self.outname) - originalDir = os.getcwd() - newDir, _ = os.path.split(self.beforeCompileScript) - os.chdir(newDir) - execfile(self.afterBuildScript) - os.chdir(originalDir) - if self.verbose: - print("-- Finished after-build step of target " + self.outname) - - # Spawn compilation of dependency parents - for parent in self.dependencyParents: - parent.link() - - - -class Environment: - def __init__(self): - global processpool - self.nJobs = 1 - processpool = Pool(processes=self.nJobs) +def build(args, progress_disabled=True): + logger = _logging.getLogger(__name__) + logger.info(f'clang-build {__version__}') + messages = ['Configure', 'Compile', 'Link'] + + with _CategoryProgress(messages, progress_disabled) as progress_bar: # Check for clang++ executable - from distutils.spawn import find_executable - self.clangpp = find_executable("clang++") - self.clang_ar = find_executable("llvm-ar") - self.llvm_root = os.path.dirname(os.path.abspath(os.path.join(self.clangpp, ".."))) - - if not self.clangpp: - print("---- WARNING: could not find clang++! Please check your installation...") - if not self.clang_ar: - print("---- WARNING: could not find llvm-ar! Please check your installation...") - - # Parse command line arguments - parser = argparse.ArgumentParser() - parser.add_argument("-V", "--verbose", - help="activate verbose build", - action="store_true") - parser.add_argument("-d", "--directory", - help="set the root source directory") - parser.add_argument("-b", "--build-type", - help="set the build type (default, release, debug, ...)") - parser.add_argument("-j", "--jobs", type=int, - help="set the number of concurrent build jobs (default: 1)") - args = parser.parse_args() - - # Verbosity - self.verbose = args.verbose - if self.verbose: - print("-- Verbosity turned on") - if self.clangpp: print("-- llvm root directory: " + self.llvm_root) - if self.clangpp: print("-- clang++ executable: " + self.clangpp) - if self.clang_ar: print("-- llvm-ar executable: " + self.clang_ar) - if self.clangpp: print("-- Found supported C++ dialects: " + ', '.join(supported_dialects)) + clangpp, clang_ar = _find_clang(logger) # Directory this was called from - self.callingdir = os.getcwd() + callingdir = _Path().resolve() - # Working directory is where the project root should be - this is searched for "clang-build.toml" + # Working directory is where the project root should be - this is searched for 'clang-build.toml' if args.directory: - self.workingDirectory = os.path.abspath(args.directory) + workingdir = args.directory.resolve() else: - self.workingDirectory = self.callingdir + workingdir = callingdir - if not os.path.exists(self.workingDirectory): - print("-- ERROR: specified non-existent directory \'" + self.workingDirectory + "\'") - print("---- clang-build finished") - sys.exit(1) + if not workingdir.exists(): + error_message = f'ERROR: specified non-existent directory [{workingdir}]' + logger.error(f'ERROR: specified non-existent directory [{workingdir}]') + raise RuntimeError(f'ERROR: specified non-existent directory [{workingdir}]') - print("-- Working directory: " + self.workingDirectory) - # Check for presence of build config file - self.config = "" - if os.path.isfile(self.workingDirectory + "/clang-build.toml"): - self.config = self.workingDirectory + "/clang-build.toml" - if self.verbose: - print("-- Found config file!") - elif self.verbose: - print("-- Did not find config file!") + logger.info(f'Working directory: {workingdir}') # Build type (Default, Release, Debug) - self.buildType = BuildType.Default - if args.build_type: - self.buildType = BuildType[args.build_type.lower().title()] - print("-- Build type: " + self.buildType.name) - + buildType = args.build_type + logger.info(f'Build type: {buildType.name}') # Multiprocessing pool - if args.jobs: - self.nJobs = args.jobs - processpool = Pool(processes = self.nJobs) - if self.verbose: - print("-- Running " + str(self.nJobs) + " concurrent build jobs" ) - - -def parseBuildConfig(environment): - config = toml.load(environment.config) - - # Use sub-build directories if multiple targets - subbuilddirs = False - if len(config.items()) > 1: - subbuilddirs = True - - # Parse targets from toml file - targets = [] - for nodename, node in config.items(): - # Create target - target = Target(environment, nodename) - - # Parse Targets type (Executable, Library, Test) - target.targetType = TargetType.Executable - if "target_type" in node: - target.targetType = TargetType[node["target_type"].lower().title()] - - # Parse output name for the compiled target - if "output_name" in node: - target.outname = node["output_name"] - else: - target.outname = target.name - - # If we have multiple targets, each gets its own sub-builddirectory - if subbuilddirs: - target.buildDirectory += "/"+target.name - - # Handle the case that the target is an external project - if "external" in node: - target.external = node["external"] - if target.external: - downloaddir = target.buildDirectory + "/external_sources" - # Check if directory is already present and non-empty - if os.path.exists(downloaddir) and os.listdir(downloaddir): - print("-- External target " + target.name + ": sources found in "+downloaddir) - # Otherwise we download the sources - else: - print("-- External target " + target.name + ": downloading to "+downloaddir) - mkpath(downloaddir) - subprocess.call(["git", "clone", node["url"], downloaddir]) - print("-- External target " + target.name + ": downloaded") - target.includeDirectories.append(downloaddir) - - # Parse the Targets sources - sources = [] - headers = [] - if "sources" in node: - sourcenode = node["sources"] - - # Target root directory - sourceroot = "" - if "root" in sourcenode: - target.root = sourcenode["root"] - target.includeDirectories.append(target.targetDirectory+"/"+target.root) - - # Add include directories - if "include_directories" in sourcenode: - for dir in sourcenode["include_directories"]: - if dir not in target.includeDirectories: - target.includeDirectories.append(target.targetDirectory+"/"+target.root+"/"+dir) - - # Search for header files - for ext in ('*.hpp', '*.hxx', '*.h'): - for dir in sourcenode["include_directories"]: - headers += glob(os.path.join(target.targetDirectory+"/"+target.root+"/"+dir, ext)) - - # Search for source files - if "source_directories" in sourcenode: - for ext in ('*.cpp', '*.cxx', '*.c'): - for dir in sourcenode["source_directories"]: - sources += glob(os.path.join(target.targetDirectory+"/"+target.root+"/"+dir, ext)) - - # If sources were not specified we try to glob them - else: - # Search for header files - for ext in ('*.hpp', '*.hxx'): - headers += glob(os.path.join(target.targetDirectory, ext)) - # Search for source files - for ext in ('*.cpp', '*.cxx'): - sources += glob(os.path.join(target.targetDirectory, ext)) - - # Set target sources - target.headerFiles = headers - target.sourceFiles = sources - - # Flags - if "flags" in node: - flagsnode = node["flags"] - if "compile" in flagsnode: - for flag in flagsnode["compile"]: - target.compileFlags.append(flag) - if "compileRelease" in flagsnode: - for flag in flagsnode["compileRelease"]: - target.compileFlagsRelease.append(flag) - if "compileDebug" in flagsnode: - for flag in flagsnode["compileDebug"]: - target.compileFlagsDebug.append(flag) - if "link" in flagsnode: - for flag in flagsnode["link"]: - target.linkFlags.append(flag) - - # Dependencies - if "link" in node: - if "dependencies" in node["link"]: - deps = node["link"]["dependencies"] - for dep in deps: - if dep not in target.dependencies: - target.dependencies.append(str(dep)) - if environment.verbose: print("-- Dependency added: "+target.name+" -> "+dep) - - if "scripts" in node: - if "before_compile" in node["scripts"]: - target.beforeCompileScript = target.targetDirectory + "/" + node["scripts"]["before_compile"] - - # List of targets - targets.append(target) - - # Check if all dependencies are resolved in terms of defined targets, check for circular dependencies... - # Add all valid dependencies to the targets as Target instead of just string - for target in targets: - for dep in target.dependencies: - valid = False - for depTarget in targets: - if dep == depTarget.name: - valid = True - if depTarget not in target.dependencyTargets: - target.dependencyTargets.append(depTarget) - depTarget.dependencyParents.append(target) - print("-- Dependency resolved: "+target.name+" -> "+dep) - else: - print("-- WARNING: you may have a double dependency: "+target.name+" -> "+dep) - if not valid: - print("-- WARNING: could not resolve dependency "+target.name+" -> "+dep) - - # Determine leafs on dependency graph - leafs = [] - for target in targets: - if not target.dependencyTargets: - leafs.append(target) - if not leafs: - print("-- WARNING: did not find any leafs in dependency graph!") - - # Done - return targets, leafs - - + processpool = _Pool(processes = args.jobs) + logger.info(f'Running up to {args.jobs} concurrent build jobs') + + build_directory = _Path('build') + target_list = [] + + # Check for build configuration toml file + toml_file = _Path(workingdir, 'clang-build.toml') + if toml_file.exists(): + logger.info('Found config file') + config = toml.load(str(toml_file)) + + # Use sub-build directories if multiple targets + subbuilddirs = False + if len(config.items()) > 1: + subbuilddirs = True + + # Parse targets from toml file + non_existent_dependencies = _find_non_existent_dependencies(config) + if non_existent_dependencies: + error_messages = [f'In {target}: the dependency {dependency} does not point to a valid target' for\ + target, dependency in non_existent_dependencies] + + error_message = _textwrap.indent('\n'.join(error_messages), prefix=' '*3) + logger.error(error_message) + sys.exit(1) + + circular_dependencies = _find_circular_dependencies(config) + if circular_dependencies: + error_messages = [f'In {target}: circular dependency -> {dependency}' for\ + target, dependency in non_existent_dependencies] + + error_message = _textwrap.indent('\n'.join(error_messages), prefix=' '*3) + logger.error(error_message) + sys.exit(1) + + target_names = _get_dependency_walk(config) + + for target_name in _IteratorProgress(target_names, progress_disabled, len(target_names)): + project_node = config[target_name] + # Directories + target_build_dir = build_directory if not subbuilddirs else build_directory.joinpath(target_name) + # Sources + files = _get_sources_and_headers(project_node, workingdir, target_build_dir) + # Dependencies + dependencies = [target_list[target_names.index(name)] for name in project_node.get('dependencies', [])] + executable_dependencies = [target for target in dependencies if target.__class__ is _Executable] + + if executable_dependencies: + logger.error(f'Error: The following targets are linking dependencies but were identified as executables: {executable_dependencies}') + + + if 'target_type' in project_node: + # + # Add an executable + # + if project_node['target_type'].lower() == 'executable': + target_list.append( + _Executable( + target_name, + workingdir, + target_build_dir, + files['headers'], + files['include_directories'], + files['sourcefiles'], + buildType, + clangpp, + project_node, + dependencies)) + + # + # Add a shared library + # + if project_node['target_type'].lower() == 'shared library': + target_list.append( + _SharedLibrary( + target_name, + workingdir, + target_build_dir, + files['headers'], + files['include_directories'], + files['sourcefiles'], + buildType, + clangpp, + project_node, + dependencies)) + + # + # Add a static library + # + elif project_node['target_type'].lower() == 'static library': + target_list.append( + _StaticLibrary( + target_name, + workingdir, + target_build_dir, + files['headers'], + files['include_directories'], + files['sourcefiles'], + buildType, + clangpp, + clang_ar, + project_node, + dependencies)) + + # + # Add a header-only + # + elif project_node['target_type'].lower() == 'header only': + if files['sourcefiles']: + logger.info(f'Source files found for header-only target {target_name}. You may want to check your build configuration.') + target_list.append( + _HeaderOnly( + target_name, + workingdir, + target_build_dir, + files['headers'], + files['include_directories'], + buildType, + clangpp, + project_node, + dependencies)) -def getDefaultTarget(environment): - # Create target - target = Target(environment) - - # Search for header files - headers = [] - for ext in ('*.hpp', '*.hxx', '*.h'): - headers += glob(os.path.join(environment.workingDirectory, ext)) - - # Search for source files - sources = [] - for ext in ('*.cpp', '*.cxx', '*.c'): - sources += glob(os.path.join(environment.workingDirectory, ext)) - - # Set target - target.headerFiles = headers - target.sourceFiles = sources - - # Done - return target - - - -def main(): - print("---- clang-build v0.0.0") - - # Parse command line arguments, check for presence of build config file, etc. - environment = Environment() - - # If build configuration toml file exists, parse lists of targets and leaf nodes of the dependency graph - if environment.config: - targets, leafs = parseBuildConfig(environment) - # Otherwise we try to build it as a simple hello world or mwe project - else: - defaultTarget = getDefaultTarget(environment) - targets = [defaultTarget] - leafs = [defaultTarget] - - # Generate flags of all targets, propagating up the dependency graph - for target in leafs: - target.generateFlags() - - # Generate the buildables of all targets - for target in targets: - target.generateBuildables() - - # Build the targets, moving successively up the dependency graph - print("---- Compile step") - for target in leafs: - target.compile() + else: + logger.error(f'ERROR: Unsupported target type: {project_node["target_type"]}') - print("---- Link step") - for target in leafs: - target.link() + # No target specified so must be executable or header only + else: + if not files['sourcefiles']: + logger.info(f'No source files found for target {target_name}. Creating header-only target.') + target_list.append( + _HeaderOnly( + target_name, + workingdir, + target_build_dir, + files['headers'], + files['include_directories'], + buildType, + clangpp, + project_node, + dependencies)) + else: + logger.info(f'{len(files["sourcefiles"])} source files found for target {target_name}. Creating executable target.') + target_list.append( + _Executable( + target_name, + workingdir, + target_build_dir, + files['headers'], + files['include_directories'], + files['sourcefiles'], + buildType, + clangpp, + project_node, + dependencies)) + + + # Otherwise we try to build it as a simple hello world or mwe project + else: + files = _get_sources_and_headers({}, workingdir, build_directory) + + if not files['sourcefiles']: + error_message = f'Error, no sources and no [clang-build.toml] found in folder: {workingdir}' + logger.error(error_message) + raise RuntimeError(error_message) + # Create target + target_list.append( + _Executable( + 'main', + workingdir, + build_directory, + files['headers'], + files['include_directories'], + files['sourcefiles'], + buildType, + clangpp)) + + # Build the targets + progress_bar.update() + + logger.info('Compile') + + for target in _IteratorProgress(target_list, progress_disabled, len(target_list), lambda x: x.name): + target.compile(processpool, progress_disabled) + + # No parallel linking atm, could be added via + # https://stackoverflow.com/a/5288547/2305545 + # + + processpool.close() + processpool.join() + + progress_bar.update() + logger.info('Link') + for target in target_list: + if not target.unsuccesful_builds: + target.link() + else: + logger.error(f'Target {target} did not compile. Errors:\n%s', + [f'{file}: {output}' for file, output in zip( + [t.name for t in target.unsuccesful_builds], + [t.output_messages for t in target.unsuccesful_builds])]) + break - print("---- clang-build finished") + progress_bar.update() + logger.info('clang-build finished.') -if __name__ == "__main__": - sys.exit(main()) \ No newline at end of file +if __name__ == '__main__': + _freeze_support() + main() \ No newline at end of file diff --git a/clang_build/dependency_tools.py b/clang_build/dependency_tools.py new file mode 100644 index 0000000..550f0a3 --- /dev/null +++ b/clang_build/dependency_tools.py @@ -0,0 +1,32 @@ +import networkx as _nx + +def find_non_existent_dependencies(project): + illegal_dependencies = [] + keys = [str(key) for key in project.keys()] + for nodename, node in project.items(): + for dependency in node.get('dependencies', []): + if str(dependency) not in keys: + illegal_dependencies.append((nodename, dependency)) + + return illegal_dependencies + +def find_circular_dependencies(project): + graph = _nx.DiGraph() + for nodename, node in project.items(): + for dependency in node.get('dependencies', []): + graph.add_edge(str(nodename), str(dependency)) + + return list(_nx.simple_cycles(graph)) + +def get_dependency_walk(project): + graph = _nx.DiGraph() + for nodename, node in project.items(): + dependencies = node.get('dependencies', []) + if not dependencies: + graph.add_node(str(nodename)) + continue + + for dependency in dependencies: + graph.add_edge(str(nodename), str(dependency)) + + return list(reversed(list(_nx.topological_sort(graph)))) \ No newline at end of file diff --git a/clang_build/dialect_check.py b/clang_build/dialect_check.py new file mode 100644 index 0000000..cb59210 --- /dev/null +++ b/clang_build/dialect_check.py @@ -0,0 +1,33 @@ +import subprocess as _subprocess +from functools import lru_cache as _lru_cache + +_UNSUPPORTED_DIALECT_MESSAGE = "error: invalid value 'c++{0:02d}'" + +def get_dialect_string(year): + return '-std=c++{:02d}'.format(year) + + +def _check_dialect(year, clangpp): + std_opt = get_dialect_string(year) + try: + _subprocess.run([clangpp, std_opt, '-x', 'c++', '-E', '-'],\ + check=True,input=b'',stdout=_subprocess.PIPE,stderr=_subprocess.PIPE) + except _subprocess.CalledProcessError as e: + error_message = _UNSUPPORTED_DIALECT_MESSAGE.format(year) + strerr = e.stderr.decode('utf8','strict') + if error_message in strerr: + return False + raise + return True + +@_lru_cache(maxsize=1) +def get_max_supported_compiler_dialect(clangpp): + supported_dialects = [] + for dialect in range(30): + if _check_dialect(dialect, clangpp): + supported_dialects.append(dialect) + + if supported_dialects: + return get_dialect_string(max(supported_dialects)) + else: + return get_dialect_string(98) diff --git a/clang_build/io_tools.py b/clang_build/io_tools.py new file mode 100644 index 0000000..8ecdf7c --- /dev/null +++ b/clang_build/io_tools.py @@ -0,0 +1,67 @@ +from glob import iglob as _iglob +from pathlib import Path as _Path + +def _get_header_files(folder): + headers = [] + for ext in ('*.hpp', '*.hxx', '*.h'): + headers += [_Path(f) for f in _iglob(str(folder) + '/**/'+ext, recursive=True)] + + return headers + +def _get_source_files(folder): + sources = [] + for ext in ('*.cpp', '*.cxx', '*.c'): + sources += [_Path(f) for f in _iglob(str(folder) + '/**/'+ext, recursive=True)] + + return sources + +def get_sources_and_headers(target_options, working_directory, target_build_directory): + output = {'headers': [], 'include_directories': [], 'sourcefiles': []} + relative_includes = [] + relative_source_directories = [] + + # TODO: maybe the output should also include the root dir, build dir and potentially download dir? + # TODO: should warn when a specified directory does not exist! + + # Root directory of target source tree + target_root = _Path(working_directory) + + if target_options.get('external', False): + target_root = target_root.joinpath(target_build_directory, 'external_sources') + + if 'directory' in target_options: + target_root = target_root.joinpath(target_options['directory']) + + if 'sources' in target_options: + sourcenode = target_options['sources'] + + if 'include_directories' in sourcenode: + relative_includes = [_Path(file) for file in sourcenode['include_directories']] + + if 'source_directories' in sourcenode: + relative_source_directories = [_Path(file) for file in sourcenode['source_directories']] + + + # Some defaults if nothing was specified + if not relative_includes: + relative_includes = [_Path(''), _Path('include'), _Path('thirdparty')] + + if not relative_source_directories: + relative_source_directories = [_Path(''), _Path('src')] + + # Find headers + output['include_directories'] = list(set(working_directory.joinpath(target_root, file) for file in relative_includes)) + + for directory in output['include_directories']: + output['headers'] += _get_header_files(directory) + + output['headers'] = list(set(output['headers'])) + # Find source files + source_directories = list(set(working_directory.joinpath(target_root, file) for file in relative_source_directories)) + + for directory in set(source_directories): + output['sourcefiles'] += _get_source_files(directory) + + output['sourcefiles'] = list(set(output['sourcefiles'])) + + return output \ No newline at end of file diff --git a/clang_build/logging_stream_handler.py b/clang_build/logging_stream_handler.py new file mode 100644 index 0000000..a9d4ed2 --- /dev/null +++ b/clang_build/logging_stream_handler.py @@ -0,0 +1,10 @@ +import logging as _logging +import tqdm as _tqdm + +class TqdmHandler(_logging.StreamHandler): + def __init__(self): + _logging.StreamHandler.__init__(self) + + def emit(self, record): + msg = self.format(record) + _tqdm.tqdm.write(msg) \ No newline at end of file diff --git a/clang_build/platform.py b/clang_build/platform.py new file mode 100644 index 0000000..698eb42 --- /dev/null +++ b/clang_build/platform.py @@ -0,0 +1,46 @@ +from sys import platform as _platform + +if _platform == 'linux' or _platform == 'linux2': + # Linux + EXECUTABLE_PREFIX = '' + EXECUTABLE_SUFFIX = '' + EXECUTABLE_OUTPUT = 'bin' + SHARED_LIBRARY_PREFIX = 'lib' + SHARED_LIBRARY_SUFFIX = '.so' + SHARED_LIBRARY_OUTPUT = 'lib' + STATIC_LIBRARY_PREFIX = 'lib' + STATIC_LIBRARY_SUFFIX = '.a' + STATIC_LIBRARY_OUTPUT = 'lib' + PLATFORM_EXTRA_FLAGS_EXECUTABLE = [''] + PLATFORM_EXTRA_FLAGS_SHARED = ['-fpic'] + PLATFORM_EXTRA_FLAGS_STATIC = [''] +elif _platform == 'darwin': + # OS X + EXECUTABLE_PREFIX = '' + EXECUTABLE_SUFFIX = '' + EXECUTABLE_OUTPUT = 'bin' + SHARED_LIBRARY_PREFIX = 'lib' + SHARED_LIBRARY_SUFFIX = '.dylib' + SHARED_LIBRARY_OUTPUT = 'lib' + STATIC_LIBRARY_PREFIX = 'lib' + STATIC_LIBRARY_SUFFIX = '.a' + STATIC_LIBRARY_OUTPUT = 'lib' + PLATFORM_EXTRA_FLAGS_EXECUTABLE = [''] + PLATFORM_EXTRA_FLAGS_SHARED = [''] + PLATFORM_EXTRA_FLAGS_STATIC = [''] +elif _platform == 'win32': + # Windows + EXECUTABLE_PREFIX = '' + EXECUTABLE_SUFFIX = '.exe' + EXECUTABLE_OUTPUT = 'bin' + SHARED_LIBRARY_PREFIX = '' + SHARED_LIBRARY_SUFFIX = '.dll' + SHARED_LIBRARY_OUTPUT = 'bin' + STATIC_LIBRARY_PREFIX = '' + STATIC_LIBRARY_SUFFIX = '.lib' + STATIC_LIBRARY_OUTPUT = 'lib' + PLATFORM_EXTRA_FLAGS_EXECUTABLE = ['-Xclang', '-flto-visibility-public-std'] + PLATFORM_EXTRA_FLAGS_SHARED = ['-Xclang', '-flto-visibility-public-std'] + PLATFORM_EXTRA_FLAGS_STATIC = ['-Xclang', '-flto-visibility-public-std'] +else: + raise RuntimeError('Platform ' + _platform + 'is currently not supported.') \ No newline at end of file diff --git a/clang_build/progress_bar.py b/clang_build/progress_bar.py new file mode 100644 index 0000000..3c7d740 --- /dev/null +++ b/clang_build/progress_bar.py @@ -0,0 +1,61 @@ +from tqdm import tqdm as _tqdm +from colorama import Fore as _Fore + +_MAX_DESCRIPTION_WIDTH = 16 +_ELLIPSIS_WIDTH = 2 +_BAR_FORMAT = "{desc: <%s}: {percentage:3.0f}%% |%s{bar}%s| {n_fmt: >5}/{total_fmt: >5} [{elapsed: >8}]" % (_MAX_DESCRIPTION_WIDTH, _Fore.BLUE, _Fore.RESET) + + +def _format_lenghty_string(text): + if len(text) > _MAX_DESCRIPTION_WIDTH: + return ((text[:-(_MAX_DESCRIPTION_WIDTH-_ELLIPSIS_WIDTH)] and '.' * _ELLIPSIS_WIDTH) + + text[-(_MAX_DESCRIPTION_WIDTH-_ELLIPSIS_WIDTH):]) + else: + return text + + +def _get_clang_build_progress_bar(iterable, disable, total): + return _tqdm(iterable, bar_format=_BAR_FORMAT, leave=False, disable=disable, total=total) + + +class CategoryProgress: + def __init__(self, categories, disable, total=None): + self.pbar = _get_clang_build_progress_bar(categories, disable, total) + self.current_catgeory = 0 + self.pbar.set_description_str(categories[self.current_catgeory]) + self.categories = categories + self.index_limit = len(self.categories) + + def __enter__(self): + self.entered_pbar = self.pbar.__enter__() + return self + + def __exit__(self, type, value, traceback): + self.entered_pbar.__exit__(type, value, traceback) + + def update(self): + self.entered_pbar.update() + self.current_catgeory += 1 + if self.current_catgeory >= self.index_limit: + self.entered_pbar.set_description_str('Finished') + else: + self.entered_pbar.set_description_str(_format_lenghty_string(self.categories[self.current_catgeory])) + +class IteratorProgress: + def __init__(self, iterable, disable, total, access=lambda x: x): + self.pbar = _get_clang_build_progress_bar(iterable, disable, total) + self.access = access + + def __iter__(self): + self.pbar_iter = self.pbar.__iter__() + return self + + def __next__(self): + val = self.pbar_iter.__next__() + self.pbar.set_description_str(_format_lenghty_string(self.access(val))) + return val + +def get_build_progress_bar(iterable, disable, total, name): + pbar = _get_clang_build_progress_bar(iterable, disable, total) + pbar.set_description_str(_format_lenghty_string(name)) + return pbar diff --git a/clang_build/single_source.py b/clang_build/single_source.py new file mode 100644 index 0000000..45b35d7 --- /dev/null +++ b/clang_build/single_source.py @@ -0,0 +1,112 @@ +import os as _os +import re as _re +from pathlib import Path as _Path +import subprocess as _subprocess +from multiprocessing import freeze_support as _freeze_support +import logging as _logging + +_LOGGER = _logging.getLogger('clang_build.clang_build') + +# Find and parse the dependency file, return list of headers this file depends on +# TODO: Can this be simplified? +def _get_depfile_headers(depfile): + depfileHeaders = [] + with open(depfile, 'r') as the_file: + depStr = the_file.read() + colonPos = depStr.find(':') + for line in depStr[colonPos + 1:].splitlines(): + if line.endswith('\\'): + line = line[:-1] + depline = line.strip().split() + for header in depline: + depfileHeaders.append(_Path(header)) + return depfileHeaders + +def _needs_rebuild(object_file, source_file, depfile): + if object_file.exists(): + # If object file is found, check if it is up to date + if source_file.stat().st_mtime > object_file.stat().st_mtime: + return True + # If object file is up to date, we check the headers it depends on + else: + for depHeaderFile in _get_depfile_headers(depfile): + if depHeaderFile.stat().st_mtime > object_file.stat().st_mtime: + return True + + return False + else: + return True + +class SingleSource: + def __init__( + self, + sourceFile, + platformFlags, + current_target_root_path, + depfileDirectory, + objectDirectory, + include_strings, + compileFlags, + clangpp): + + # Get the relative file path + self.name = sourceFile.name + self.sourceFile = sourceFile + + relpath = _os.path.relpath(sourceFile.parents[0], current_target_root_path) + + # TODO: I'm not sure I understand the necessity/function of this part + if current_target_root_path.joinpath('src').exists(): + relpath = _os.path.relpath(relpath, 'src') + + # Set name, extension and potentially produced output files + + self.objectFile = _Path(objectDirectory, relpath, sourceFile.stem + '.o') + depfile = _Path(depfileDirectory, relpath, sourceFile.stem + '.d') + + self.needs_rebuild = _needs_rebuild(self.objectFile, sourceFile, depfile) + + # Create dependency file + depfile.parents[0].mkdir(parents=True, exist_ok=True) + + flags = compileFlags + include_strings + dependency_command = [clangpp, '-E', '-MMD', str(sourceFile), '-MF', str(depfile)] + flags + _LOGGER.debug(' ' + ' '.join(dependency_command)) + try: + _subprocess.check_output(dependency_command) + except _subprocess.CalledProcessError as error: + raise RuntimeError(f'Creating dependency file for source {sourceFile} ' + f'raised an error: \'{error}\' with output \'{error.output}\'') + + self.compilation_failed = False + + # prepare everything for compilation + self.objectFile.parents[0].mkdir(parents=True, exist_ok=True) + self.compile_command = ['clang++', '-c', str(sourceFile), '-o', str(self.objectFile)] + flags + platformFlags + + self.output_messages = [] + + def compile(self): + # TODO: logging in multiprocess + # _LOGGER.debug(' ' + ' '.join(self.compile_command)) + try: + self.compile_report = _subprocess.check_output(self.compile_command, stderr=_subprocess.STDOUT).decode('utf-8').strip() + except _subprocess.CalledProcessError as error: + self.compilation_failed = True + self.compile_report = error.output.decode('utf-8').strip() + + self.parse_output() + + def parse_output(self): + # Remove last line + output_text = _re.split(r'(.*)\n.*generated\.$', self.compile_report)[0] + + # Find all the indivdual messages + message_list = _re.split(_re.escape(str(self.sourceFile)), output_text)[1:] + + # Get type, row, column and content of each message + message_parser = _re.compile(r':(?P\d+):(?P\d+):\s*(?Perror|warning):\s*(?P[\s\S.]*)') + self.output_messages = [message_parser.search(message).groupdict() for message in message_list] + +if __name__ == '__name__': + _freeze_support() \ No newline at end of file diff --git a/clang_build/target.py b/clang_build/target.py new file mode 100644 index 0000000..a40e04d --- /dev/null +++ b/clang_build/target.py @@ -0,0 +1,424 @@ +''' +Target describes a single build or dependency target with all needed paths and +a list of buildables that comprise it's compile and link steps. +''' + +import os as _os +from pathlib import Path as _Path +import subprocess as _subprocess +from multiprocessing import freeze_support as _freeze_support +import logging as _logging + +from . import platform as _platform +from .dialect_check import get_dialect_string as _get_dialect_string +from .dialect_check import get_max_supported_compiler_dialect as _get_max_supported_compiler_dialect +from .build_type import BuildType as _BuildType +from .single_source import SingleSource as _SingleSource +from .progress_bar import get_build_progress_bar as _get_build_progress_bar + +_LOGGER = _logging.getLogger('clang_build.clang_build') + +class Target: + DEFAULT_COMPILE_FLAGS = ['-Wall', '-Werror'] + DEFAULT_RELEASE_COMPILE_FLAGS = ['-O3', '-DNDEBUG'] + DEFAULT_DEBUG_COMPILE_FLAGS = ['-O0', '-g3', '-DDEBUG'] + DEFAULT_COVERAGE_COMPILE_FLAGS = ( + DEFAULT_DEBUG_COMPILE_FLAGS + + ['--coverage', + '-fno-inline', + '-fno-inline-small-functions', + '-fno-default-inline']) + + + def __init__(self, + name, + working_directory, + buildDirectory, + headers, + include_directories, + buildType, + clangpp, + options=None, + dependencies=None): + + if options is None: + options = {} + if dependencies is None: + dependencies = [] + + self.dependencyTargets = dependencies + + # Basics + self.name = name + self.root_directory = _Path(working_directory) + self.buildType = buildType + + self.buildDirectory = buildDirectory.joinpath(buildType.name.lower()) + + self.headers = headers + + if 'directory' in options: + self.root_directory = self.root_directory.joinpath(options['directory']) + + self.includeDirectories = [] + if self.root_directory.joinpath('include').exists(): + self.includeDirectories.append(self.root_directory.joinpath('include')) + self.includeDirectories += include_directories + + if 'properties' in options and 'cpp_version' in options['properties']: + self.dialect = _get_dialect_string(options['properties']['cpp_version']) + else: + self.dialect = _get_max_supported_compiler_dialect(clangpp) + + # TODO: parse user-specified target version + + # If target is marked as external, try to fetch the sources + ### TODO: external sources should be fetched before any sources are read in, i.e. even before targets are created + self.external = options.get('external', False) + if self.external: + downloaddir = buildDirectory.joinpath('external_sources') + # Check if directory is already present and non-empty + if downloaddir.exists() and _os.listdir(str(downloaddir)): + _LOGGER.info(f'External target [{self.name}]: sources found in {str(downloaddir)}') + # Otherwise we download the sources + else: + _LOGGER.info(f'External target [{self.name}]: downloading to {str(downloaddir)}') + downloaddir.mkdir(parents=True, exist_ok=True) + try: + _subprocess.run(["git", "clone", options["url"], str(downloaddir)], stdout=_subprocess.PIPE, stderr=_subprocess.PIPE, encoding='utf-8') + except _subprocess.CalledProcessError as e: + error_message = f"Error trying to download external target [{self.name}]. Message " + e.output + _LOGGER.exception(error_message) + raise RuntimeError(error_message) + _LOGGER.info(f'External target [{self.name}]: downloaded') + self.includeDirectories.append(downloaddir) + self.root_directory = downloaddir + + compileFlags = [] + compileFlagsDebug = Target.DEFAULT_DEBUG_COMPILE_FLAGS + compileFlagsRelease = Target.DEFAULT_RELEASE_COMPILE_FLAGS + self.linkFlags = [] + + if 'flags' in options: + compileFlags += options['flags'].get('compile', []) + compileFlagsRelease += options['flags'].get('compileRelease', []) + compileFlagsDebug += options['flags'].get('compileDebug', []) + self.linkFlags += options['flags'].get('link', []) + + self.compileFlags = compileFlags + if self.buildType == _BuildType.Release: + self.compileFlags += compileFlagsRelease + if self.buildType == _BuildType.Debug: + self.compileFlags += compileFlagsDebug + + for target in self.dependencyTargets: + self.compileFlags += target.compileFlags + self.includeDirectories += target.includeDirectories + self.headers += target.headers + + self.compileFlags = list(set(self.compileFlags)) + self.includeDirectories = list(set(self.includeDirectories)) + self.headers = list(set(self.headers)) + + self.unsuccesful_builds = [] + + def get_include_directory_command(self): + return [f'-I{dir}' for dir in self.includeDirectories] + + def link(self): + # Subclasses must implement + raise NotImplementedError() + + def compile(self, process_pool, progress_disabled): + # Subclasses must implement + raise NotImplementedError() + +class HeaderOnly(Target): + def link(self): + _LOGGER.info(f'Header-only target [{self.name}] does not require linking.') + + def compile(self, process_pool, progress_disabled): + _LOGGER.info(f'Header-only target [{self.name}] does not require compiling.') + +def generateDepfile(buildable): + buildable.generate_dependency_file() + +def compile_single_source(buildable): + buildable.compile() + +class Compilable(Target): + + def __init__(self, + name, + working_directory, + buildDirectory, + headers, + include_directories, + source_files, + buildType, + clangpp, + link_command, + output_folder, + platform_flags, + prefix, + suffix, + options=None, + dependencies=None): + + if not source_files: + error_message = f'ERROR: Targt [{name}] was defined as a {self.__class__} but no source files were found' + _LOGGER.error(error_message) + raise RuntimeError(error_message) + + super().__init__( + name=name, + working_directory=working_directory, + buildDirectory=buildDirectory, + headers=headers, + include_directories=include_directories, + buildType=buildType, + clangpp=clangpp, + options=options, + dependencies=dependencies) + + if options is None: + options = {} + if dependencies is None: + dependencies = [] + + self.objectDirectory = self.buildDirectory.joinpath('obj').resolve() + self.depfileDirectory = self.buildDirectory.joinpath('dep').resolve() + self.outputFolder = self.buildDirectory.joinpath(output_folder).resolve() + + self.objectDirectory.mkdir(parents=True, exist_ok=True) + self.depfileDirectory.mkdir(parents=True, exist_ok=True) + self.outputFolder.mkdir(parents=True, exist_ok=True) + + if 'output_name' in options: + self.outname = options['output_name'] + else: + self.outname = self.name + + self.outfile = _Path(self.outputFolder, prefix + self.outname + suffix).resolve() + + + # Clang + self.clangpp = clangpp + + # Sources + self.sourceFiles = source_files + + # Buildables which this Target contains + self.buildables = [_SingleSource( + sourceFile=sourceFile, + platformFlags=platform_flags, + current_target_root_path=self.root_directory, + depfileDirectory=self.depfileDirectory, + objectDirectory=self.objectDirectory, + include_strings=self.get_include_directory_command(), + compileFlags=[self.dialect] + Target.DEFAULT_COMPILE_FLAGS + self.compileFlags, + clangpp=self.clangpp) for sourceFile in self.sourceFiles] + + # If compilation of buildables fail, they will be stored here later + self.unsuccesful_builds = [] + + # Linking setup + self.linkCommand = link_command + [str(self.outfile)] + + ### Library dependency search paths + for target in self.dependencyTargets: + if not target.__class__ is HeaderOnly: + self.linkCommand += ['-L'+str(target.outputFolder.resolve())] + + ### Include directories + #linkCommand += self.get_include_directory_command() + + ### Link self + self.linkCommand += [str(buildable.objectFile) for buildable in self.buildables] + + ### Link dependencies + for target in self.dependencyTargets: + if not target.__class__ is HeaderOnly: + self.linkCommand += ['-l'+target.outname] + + ### Additional scripts + #self.beforeCompileScript = "" + #self.beforeLinkScript = "" + #self.afterBuildScript = "" + #if 'scripts' in options: ### TODO: maybe the scripts should be named differently + # if 'before_compile' in config['scripts']: + # self.beforeCompileScript = _Path(self.root_directory, config['scripts']['before_compile']) + # self.beforeLinkScript = _Path(self.root_directory, config['scripts']['before_link']) + # self.afterBuildScript = _Path(self.root_directory, config['scripts']['after_build']) + + + # From the list of source files, compile those which changed or whose dependencies (included headers, ...) changed + def compile(self, process_pool, progress_disabled): + + + # Object file only needs to be (re-)compiled if the source file or headers it depends on changed + self.neededBuildables = [buildable for buildable in self.buildables if buildable.needs_rebuild] + + # If the target was not modified, it may not need to compile + if not self.neededBuildables: + _LOGGER.info(f'Target [{self.name}] is already compiled') + return + + _LOGGER.info(f'Target [{self.name}] needs to build sources %s', [b.name for b in self.neededBuildables]) + + # Before-compile step + #if self.beforeCompileScript and not self.compiled: + # _LOGGER.info(f'Pre-compile step of target [{self.name}]') + # originalDir = os.getcwd() + # newDir, _ = os.path.split(self.beforeCompileScript) + # os.chdir(newDir) + # execfile(self.beforeCompileScript) + # os.chdir(originalDir) + # _LOGGER.info(f'Finished pre-compile step of target [{self.name}]') + + # Compile + + # Execute compile command + _LOGGER.info(f'Compile target [{self.outname}]') + for b in self.neededBuildables: + _LOGGER.debug(' '.join(b.compile_command)) + list(_get_build_progress_bar( + process_pool.imap( + compile_single_source, + self.neededBuildables), + progress_disabled, + total=len(self.neededBuildables), + name=self.name)) + + + self.unsuccesful_builds = [buildable for buildable in self.neededBuildables if buildable.compilation_failed] + + + def link(self): + # Before-link step + #if self.beforeLinkScript: + # _LOGGER.info(f'Pre-link step of target [{self.name}]') + # originalDir = os.getcwd() + # newDir, _ = os.path.split(self.beforeCompileScript) + # os.chdir(newDir) + # execfile(self.beforeLinkScript) + # os.chdir(originalDir) + # _LOGGER.info(f'Finished pre-link step of target [{self.name}]') + # Execute link command + _LOGGER.info(f'Link target [{self.name}]') + # TODO: Capture output + _LOGGER.debug(' ' + ' '.join(self.linkCommand)) + + self.linker_error = None + try: + _subprocess.check_output(self.linkCommand) + except _subprocess.CalledProcessError as e: + error_message = f'Error linking target [{self.name}] with message: {e}' + _LOGGER.error(error_message) + raise RuntimeError(error_message) + ## After-build step + #if self.afterBuildScript: + # _LOGGER.info(f'After-build step of target [{self.name}]') + # originalDir = os.getcwd() + # newDir, _ = os.path.split(self.beforeCompileScript) + # os.chdir(newDir) + # execfile(self.afterBuildScript) + # os.chdir(originalDir) + # _LOGGER.info(f'Finished after-build step of target [{self.name}]') + + +class Executable(Compilable): + def __init__(self, + name, + working_directory, + buildDirectory, + headers, + include_directories, + source_files, + buildType, + clangpp, + options=None, + dependencies=None): + + super().__init__( + name=name, + working_directory=working_directory, + buildDirectory=buildDirectory, + headers=headers, + include_directories=include_directories, + source_files=source_files, + buildType=buildType, + clangpp=clangpp, + link_command=[clangpp, '-o'], + output_folder = _platform.EXECUTABLE_OUTPUT, + platform_flags=_platform.PLATFORM_EXTRA_FLAGS_EXECUTABLE, + prefix=_platform.EXECUTABLE_PREFIX, + suffix=_platform.EXECUTABLE_SUFFIX, + options=options, + dependencies=dependencies) + + +class SharedLibrary(Compilable): + def __init__(self, + name, + working_directory, + buildDirectory, + headers, + include_directories, + source_files, + buildType, + clangpp, + options=None, + dependencies=None): + + super().__init__( + name=name, + working_directory=working_directory, + buildDirectory=buildDirectory, + headers=headers, + include_directories=include_directories, + source_files=source_files, + buildType=buildType, + clangpp=clangpp, + link_command=[clangpp, '-shared', '-o'], + output_folder = _platform.SHARED_LIBRARY_OUTPUT, + platform_flags=_platform.PLATFORM_EXTRA_FLAGS_SHARED, + prefix=_platform.SHARED_LIBRARY_PREFIX, + suffix=_platform.SHARED_LIBRARY_SUFFIX, + options=options, + dependencies=dependencies) + + +class StaticLibrary(Compilable): + def __init__(self, + name, + working_directory, + buildDirectory, + headers, + include_directories, + source_files, + buildType, + clangpp, + clang_ar, + options=None, + dependencies=None): + + super().__init__( + name=name, + working_directory=working_directory, + buildDirectory=buildDirectory, + headers=headers, + include_directories=include_directories, + source_files=source_files, + buildType=buildType, + clangpp=clangpp, + link_command=[clang_ar, 'rc'], + output_folder = _platform.STATIC_LIBRARY_OUTPUT, + platform_flags=_platform.PLATFORM_EXTRA_FLAGS_STATIC, + prefix=_platform.STATIC_LIBRARY_PREFIX, + suffix=_platform.STATIC_LIBRARY_SUFFIX, + options=options, + dependencies=dependencies) + +if __name__ == '__main__': + _freeze_support() diff --git a/docs/Defaults.md b/docs/Defaults.md new file mode 100644 index 0000000..143946f --- /dev/null +++ b/docs/Defaults.md @@ -0,0 +1,67 @@ +Defaults +============================================== + + +General +---------------------------------------------- + +By default: +- all relative paths in a toml are interpreted as relative to that toml file +- if only one target is built from source, it is built into `build/` +- if more than one target is built from source, they are built into `build//` +- an external target's sources will be copied/downloaded into `build//external_sources` +- targets for which sources are found will be built as `executable` +- targets for which no sources are found will be `header-only` + + +Search Paths +---------------------------------------------- + +### Include directories +Default system directories for `#include`-searches are given by Clang. + +`clang-build`'s include directories will be added to the search paths and will be searched +for header files for a target. +In your project file, you can add an `include_directories` array to specify a target's header directories, +where by default `clang-build` will try the target's root directory and an "include" subdirectory. + +### Source directories +`clang-build`'s source directories will be searched for source files for a target. +In your project file, you can add a `source_directories` array to specify a target's source directories, +where by default `clang-build` will try the target's root directory and a "src" subdirectory. + + +Build Type and Flags +---------------------------------------------- + +The most recent C++ standard will be used by adding e.g. `-std=c++17`. +By default, the two flags `-Wall -Werror` will be added everywhere, meaning that all warnings are +activated and all warnings are errors, so that unwanted warnings need to be explicitly disabled. + +The `default` build type does not add any flags, however +- `release`: adds `-O3 -DNDEBUG` +- `debug`: adds `-O0 -g3 -DDEBUG` +- `coverage`: adds debug flags and `--coverage -fno-inline -fno-inline-small-functions -fno-default-inline` + + +Build Directories +---------------------------------------------- + +- build + - targetname + - external_sources + - release + - obj + - dep + - bin + - lib + - include + - debug + - ... + - default + - ... + - ... + - othertargetname + - ... + +*Note: "release", "debug", etc. directories will be placed directly into "build", if only one target is in the build configuration.* \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 64395da..927002f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ toml -pbr -enum34; python_version < '3' \ No newline at end of file +pbr<4 +networkx +tqdm +colorama \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 8bd4df1..5e4b891 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ author = Trick-17 summary = Easy build tool for C++ projects focussing on simplicity license = MIT home-page = /~https://github.com/Trick-17/clang-build -description-file = README.md +description-file = README.rst keywords = clang, build [files] diff --git a/setup.py b/setup.py index fa42740..76ccdc4 100644 --- a/setup.py +++ b/setup.py @@ -3,5 +3,6 @@ import setuptools setuptools.setup( - setup_requires=['pbr>=3.1.1'], + python_requires='>=3.6', + setup_requires=['pbr<4'], pbr=True) diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/external-project/clang-build.toml b/test/external-project/clang-build.toml deleted file mode 100644 index ffd0fd3..0000000 --- a/test/external-project/clang-build.toml +++ /dev/null @@ -1,15 +0,0 @@ -[myexe] -output_name = "runHello" -[myexe.sources] -include_directories = ["include"] -source_directories = ["src"] -[myexe.link] -dependencies = ["Eigen"] - -[Eigen] -external = true -url = "/~https://github.com/eigenteam/eigen-git-mirror" -# version = 1.1 # will try to git checkout [v]1.1[.*] -[Eigen.flags] -compile = ["-Wno-deprecated-declarations"] -compileRelease = ["-DEIGEN_NO_DEBUG"] \ No newline at end of file diff --git a/test/external-project/include/main.hpp b/test/external-project/include/main.hpp deleted file mode 100644 index 9da1d93..0000000 --- a/test/external-project/include/main.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -std::string main_print() -{ - float norm = Eigen::Vector3f{0,1,2}.norm(); - return "Hello! Eigen::Vector3f{0,1,2}.norm()=" + std::to_string(norm); -} \ No newline at end of file diff --git a/test/lib-and-exe/clang-build.toml b/test/lib-and-exe/clang-build.toml deleted file mode 100644 index 790caee..0000000 --- a/test/lib-and-exe/clang-build.toml +++ /dev/null @@ -1,23 +0,0 @@ -[myexe] -output_name = "runLib" -target_type = "executable" -[myexe.sources] -source_directories = ["myexe"] -[myexe.link] -dependencies = ["mylib"] - -[mylib] -version = "0.0.0" -target_type = "sharedlibrary" -[mylib.sources] -include_directories = ["mylib/include"] -source_directories = ["mylib/src"] -[mylib.link] -dependencies = ["Eigen"] - -[Eigen] -external = true -url = "/~https://github.com/eigenteam/eigen-git-mirror" -[Eigen.flags] -compile = ["-Wno-deprecated-declarations"] -compileRelease = ["-DEIGEN_NO_DEBUG"] \ No newline at end of file diff --git a/test/multi_target_external/clang-build.toml b/test/multi_target_external/clang-build.toml new file mode 100644 index 0000000..be03a0c --- /dev/null +++ b/test/multi_target_external/clang-build.toml @@ -0,0 +1,18 @@ +[myexe] +output_name = "runLib" +dependencies = ["mylib"] +directory = "myexe" + +[mylib] +version = "0.0.0" +target_type = "shared library" +directory = "mylib" +dependencies = ["Eigen"] + +[Eigen] +target_type = "header only" +external = true +url = "/~https://github.com/eigenteam/eigen-git-mirror" +[Eigen.flags] +compile = ["-Wno-deprecated-declarations"] +compileRelease = ["-DEIGEN_NO_DEBUG"] \ No newline at end of file diff --git a/test/lib-and-exe/myexe/main.cpp b/test/multi_target_external/myexe/main.cpp similarity index 100% rename from test/lib-and-exe/myexe/main.cpp rename to test/multi_target_external/myexe/main.cpp diff --git a/test/lib-and-exe/mylib/include/DLL_Define_Export.h b/test/multi_target_external/mylib/include/DLL_Define_Export.h similarity index 100% rename from test/lib-and-exe/mylib/include/DLL_Define_Export.h rename to test/multi_target_external/mylib/include/DLL_Define_Export.h diff --git a/test/lib-and-exe/mylib/include/DLL_Undefine_Export.h b/test/multi_target_external/mylib/include/DLL_Undefine_Export.h similarity index 100% rename from test/lib-and-exe/mylib/include/DLL_Undefine_Export.h rename to test/multi_target_external/mylib/include/DLL_Undefine_Export.h diff --git a/test/lib-and-exe/mylib/include/mylib.hpp b/test/multi_target_external/mylib/include/mylib.hpp similarity index 100% rename from test/lib-and-exe/mylib/include/mylib.hpp rename to test/multi_target_external/mylib/include/mylib.hpp diff --git a/test/lib-and-exe/mylib/src/mylib.cpp b/test/multi_target_external/mylib/src/mylib.cpp similarity index 100% rename from test/lib-and-exe/mylib/src/mylib.cpp rename to test/multi_target_external/mylib/src/mylib.cpp diff --git a/test/mwe-toml/clang-build.toml b/test/mwe-toml/clang-build.toml deleted file mode 100644 index 95b578d..0000000 --- a/test/mwe-toml/clang-build.toml +++ /dev/null @@ -1,5 +0,0 @@ -[myexe] -output_name = "runHello" -[myexe.sources] -include_directories = ["include"] -source_directories = ["src"] \ No newline at end of file diff --git a/test/hello/hello.cpp b/test/mwe/hello.cpp similarity index 100% rename from test/hello/hello.cpp rename to test/mwe/hello.cpp diff --git a/test/mini-project/include/smallfunctions.hpp b/test/mwe_with_default_folders/include/smallfunctions.hpp similarity index 100% rename from test/mini-project/include/smallfunctions.hpp rename to test/mwe_with_default_folders/include/smallfunctions.hpp diff --git a/test/mini-project/main.cpp b/test/mwe_with_default_folders/main.cpp similarity index 100% rename from test/mini-project/main.cpp rename to test/mwe_with_default_folders/main.cpp diff --git a/test/mini-project/thirdparty/Eigen/COPYING.README b/test/mwe_with_default_folders/thirdparty/Eigen/COPYING.README similarity index 100% rename from test/mini-project/thirdparty/Eigen/COPYING.README rename to test/mwe_with_default_folders/thirdparty/Eigen/COPYING.README diff --git a/test/mini-project/thirdparty/Eigen/Cholesky b/test/mwe_with_default_folders/thirdparty/Eigen/Cholesky similarity index 100% rename from test/mini-project/thirdparty/Eigen/Cholesky rename to test/mwe_with_default_folders/thirdparty/Eigen/Cholesky diff --git a/test/mini-project/thirdparty/Eigen/CholmodSupport b/test/mwe_with_default_folders/thirdparty/Eigen/CholmodSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/CholmodSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/CholmodSupport diff --git a/test/mini-project/thirdparty/Eigen/Core b/test/mwe_with_default_folders/thirdparty/Eigen/Core similarity index 100% rename from test/mini-project/thirdparty/Eigen/Core rename to test/mwe_with_default_folders/thirdparty/Eigen/Core diff --git a/test/mini-project/thirdparty/Eigen/Dense b/test/mwe_with_default_folders/thirdparty/Eigen/Dense similarity index 100% rename from test/mini-project/thirdparty/Eigen/Dense rename to test/mwe_with_default_folders/thirdparty/Eigen/Dense diff --git a/test/mini-project/thirdparty/Eigen/Eigen b/test/mwe_with_default_folders/thirdparty/Eigen/Eigen similarity index 100% rename from test/mini-project/thirdparty/Eigen/Eigen rename to test/mwe_with_default_folders/thirdparty/Eigen/Eigen diff --git a/test/mini-project/thirdparty/Eigen/Eigenvalues b/test/mwe_with_default_folders/thirdparty/Eigen/Eigenvalues similarity index 100% rename from test/mini-project/thirdparty/Eigen/Eigenvalues rename to test/mwe_with_default_folders/thirdparty/Eigen/Eigenvalues diff --git a/test/mini-project/thirdparty/Eigen/Geometry b/test/mwe_with_default_folders/thirdparty/Eigen/Geometry similarity index 100% rename from test/mini-project/thirdparty/Eigen/Geometry rename to test/mwe_with_default_folders/thirdparty/Eigen/Geometry diff --git a/test/mini-project/thirdparty/Eigen/Householder b/test/mwe_with_default_folders/thirdparty/Eigen/Householder similarity index 100% rename from test/mini-project/thirdparty/Eigen/Householder rename to test/mwe_with_default_folders/thirdparty/Eigen/Householder diff --git a/test/mini-project/thirdparty/Eigen/IterativeLinearSolvers b/test/mwe_with_default_folders/thirdparty/Eigen/IterativeLinearSolvers similarity index 100% rename from test/mini-project/thirdparty/Eigen/IterativeLinearSolvers rename to test/mwe_with_default_folders/thirdparty/Eigen/IterativeLinearSolvers diff --git a/test/mini-project/thirdparty/Eigen/Jacobi b/test/mwe_with_default_folders/thirdparty/Eigen/Jacobi similarity index 100% rename from test/mini-project/thirdparty/Eigen/Jacobi rename to test/mwe_with_default_folders/thirdparty/Eigen/Jacobi diff --git a/test/mini-project/thirdparty/Eigen/LU b/test/mwe_with_default_folders/thirdparty/Eigen/LU similarity index 100% rename from test/mini-project/thirdparty/Eigen/LU rename to test/mwe_with_default_folders/thirdparty/Eigen/LU diff --git a/test/mini-project/thirdparty/Eigen/MetisSupport b/test/mwe_with_default_folders/thirdparty/Eigen/MetisSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/MetisSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/MetisSupport diff --git a/test/mini-project/thirdparty/Eigen/OrderingMethods b/test/mwe_with_default_folders/thirdparty/Eigen/OrderingMethods similarity index 100% rename from test/mini-project/thirdparty/Eigen/OrderingMethods rename to test/mwe_with_default_folders/thirdparty/Eigen/OrderingMethods diff --git a/test/mini-project/thirdparty/Eigen/PaStiXSupport b/test/mwe_with_default_folders/thirdparty/Eigen/PaStiXSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/PaStiXSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/PaStiXSupport diff --git a/test/mini-project/thirdparty/Eigen/PardisoSupport b/test/mwe_with_default_folders/thirdparty/Eigen/PardisoSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/PardisoSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/PardisoSupport diff --git a/test/mini-project/thirdparty/Eigen/QR b/test/mwe_with_default_folders/thirdparty/Eigen/QR similarity index 100% rename from test/mini-project/thirdparty/Eigen/QR rename to test/mwe_with_default_folders/thirdparty/Eigen/QR diff --git a/test/mini-project/thirdparty/Eigen/QtAlignedMalloc b/test/mwe_with_default_folders/thirdparty/Eigen/QtAlignedMalloc similarity index 100% rename from test/mini-project/thirdparty/Eigen/QtAlignedMalloc rename to test/mwe_with_default_folders/thirdparty/Eigen/QtAlignedMalloc diff --git a/test/mini-project/thirdparty/Eigen/README.md b/test/mwe_with_default_folders/thirdparty/Eigen/README.md similarity index 100% rename from test/mini-project/thirdparty/Eigen/README.md rename to test/mwe_with_default_folders/thirdparty/Eigen/README.md diff --git a/test/mini-project/thirdparty/Eigen/SPQRSupport b/test/mwe_with_default_folders/thirdparty/Eigen/SPQRSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/SPQRSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/SPQRSupport diff --git a/test/mini-project/thirdparty/Eigen/SVD b/test/mwe_with_default_folders/thirdparty/Eigen/SVD similarity index 100% rename from test/mini-project/thirdparty/Eigen/SVD rename to test/mwe_with_default_folders/thirdparty/Eigen/SVD diff --git a/test/mini-project/thirdparty/Eigen/Sparse b/test/mwe_with_default_folders/thirdparty/Eigen/Sparse similarity index 100% rename from test/mini-project/thirdparty/Eigen/Sparse rename to test/mwe_with_default_folders/thirdparty/Eigen/Sparse diff --git a/test/mini-project/thirdparty/Eigen/SparseCholesky b/test/mwe_with_default_folders/thirdparty/Eigen/SparseCholesky similarity index 100% rename from test/mini-project/thirdparty/Eigen/SparseCholesky rename to test/mwe_with_default_folders/thirdparty/Eigen/SparseCholesky diff --git a/test/mini-project/thirdparty/Eigen/SparseCore b/test/mwe_with_default_folders/thirdparty/Eigen/SparseCore similarity index 100% rename from test/mini-project/thirdparty/Eigen/SparseCore rename to test/mwe_with_default_folders/thirdparty/Eigen/SparseCore diff --git a/test/mini-project/thirdparty/Eigen/SparseLU b/test/mwe_with_default_folders/thirdparty/Eigen/SparseLU similarity index 100% rename from test/mini-project/thirdparty/Eigen/SparseLU rename to test/mwe_with_default_folders/thirdparty/Eigen/SparseLU diff --git a/test/mini-project/thirdparty/Eigen/SparseQR b/test/mwe_with_default_folders/thirdparty/Eigen/SparseQR similarity index 100% rename from test/mini-project/thirdparty/Eigen/SparseQR rename to test/mwe_with_default_folders/thirdparty/Eigen/SparseQR diff --git a/test/mini-project/thirdparty/Eigen/StdDeque b/test/mwe_with_default_folders/thirdparty/Eigen/StdDeque similarity index 100% rename from test/mini-project/thirdparty/Eigen/StdDeque rename to test/mwe_with_default_folders/thirdparty/Eigen/StdDeque diff --git a/test/mini-project/thirdparty/Eigen/StdList b/test/mwe_with_default_folders/thirdparty/Eigen/StdList similarity index 100% rename from test/mini-project/thirdparty/Eigen/StdList rename to test/mwe_with_default_folders/thirdparty/Eigen/StdList diff --git a/test/mini-project/thirdparty/Eigen/StdVector b/test/mwe_with_default_folders/thirdparty/Eigen/StdVector similarity index 100% rename from test/mini-project/thirdparty/Eigen/StdVector rename to test/mwe_with_default_folders/thirdparty/Eigen/StdVector diff --git a/test/mini-project/thirdparty/Eigen/SuperLUSupport b/test/mwe_with_default_folders/thirdparty/Eigen/SuperLUSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/SuperLUSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/SuperLUSupport diff --git a/test/mini-project/thirdparty/Eigen/UmfPackSupport b/test/mwe_with_default_folders/thirdparty/Eigen/UmfPackSupport similarity index 100% rename from test/mini-project/thirdparty/Eigen/UmfPackSupport rename to test/mwe_with_default_folders/thirdparty/Eigen/UmfPackSupport diff --git a/test/mini-project/thirdparty/Eigen/src/Cholesky/LDLT.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Cholesky/LDLT.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Cholesky/LDLT.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Cholesky/LDLT.h diff --git a/test/mini-project/thirdparty/Eigen/src/Cholesky/LLT.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Cholesky/LLT.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Cholesky/LLT.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Cholesky/LLT.h diff --git a/test/mini-project/thirdparty/Eigen/src/Cholesky/LLT_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Cholesky/LLT_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Cholesky/LLT_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Cholesky/LLT_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/CholmodSupport/CholmodSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/CholmodSupport/CholmodSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/CholmodSupport/CholmodSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/CholmodSupport/CholmodSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Array.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Array.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Array.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Array.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/ArrayBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ArrayBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/ArrayBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ArrayBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/ArrayWrapper.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ArrayWrapper.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/ArrayWrapper.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ArrayWrapper.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Assign.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Assign.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Assign.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Assign.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/AssignEvaluator.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/AssignEvaluator.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/AssignEvaluator.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/AssignEvaluator.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Assign_MKL.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Assign_MKL.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Assign_MKL.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Assign_MKL.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/BandMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/BandMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/BandMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/BandMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Block.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Block.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Block.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Block.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/BooleanRedux.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/BooleanRedux.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/BooleanRedux.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/BooleanRedux.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CommaInitializer.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CommaInitializer.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CommaInitializer.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CommaInitializer.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/ConditionEstimator.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ConditionEstimator.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/ConditionEstimator.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ConditionEstimator.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CoreEvaluators.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CoreEvaluators.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CoreEvaluators.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CoreEvaluators.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CoreIterators.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CoreIterators.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CoreIterators.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CoreIterators.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CwiseBinaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseBinaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CwiseBinaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseBinaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CwiseNullaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseNullaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CwiseNullaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseNullaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CwiseTernaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseTernaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CwiseTernaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseTernaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CwiseUnaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseUnaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CwiseUnaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseUnaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/CwiseUnaryView.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseUnaryView.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/CwiseUnaryView.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/CwiseUnaryView.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/DenseBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DenseBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/DenseBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DenseBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/DenseCoeffsBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DenseCoeffsBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/DenseCoeffsBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DenseCoeffsBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/DenseStorage.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DenseStorage.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/DenseStorage.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DenseStorage.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Diagonal.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Diagonal.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Diagonal.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Diagonal.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/DiagonalMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DiagonalMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/DiagonalMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DiagonalMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/DiagonalProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DiagonalProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/DiagonalProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/DiagonalProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Dot.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Dot.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Dot.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Dot.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/EigenBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/EigenBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/EigenBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/EigenBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/ForceAlignedAccess.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ForceAlignedAccess.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/ForceAlignedAccess.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ForceAlignedAccess.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Fuzzy.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Fuzzy.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Fuzzy.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Fuzzy.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/GeneralProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/GeneralProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/GeneralProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/GeneralProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/GenericPacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/GenericPacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/GenericPacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/GenericPacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/GlobalFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/GlobalFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/GlobalFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/GlobalFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/IO.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/IO.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/IO.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/IO.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Inverse.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Inverse.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Inverse.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Inverse.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Map.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Map.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Map.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Map.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/MapBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MapBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/MapBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MapBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/MathFunctionsImpl.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MathFunctionsImpl.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/MathFunctionsImpl.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MathFunctionsImpl.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Matrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Matrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Matrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Matrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/MatrixBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MatrixBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/MatrixBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/MatrixBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/NestByValue.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/NestByValue.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/NestByValue.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/NestByValue.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/NoAlias.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/NoAlias.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/NoAlias.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/NoAlias.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/NumTraits.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/NumTraits.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/NumTraits.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/NumTraits.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/PermutationMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/PermutationMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/PermutationMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/PermutationMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/PlainObjectBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/PlainObjectBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/PlainObjectBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/PlainObjectBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Product.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Product.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Product.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Product.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/ProductEvaluators.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ProductEvaluators.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/ProductEvaluators.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ProductEvaluators.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Random.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Random.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Random.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Random.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Redux.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Redux.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Redux.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Redux.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Ref.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Ref.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Ref.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Ref.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Replicate.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Replicate.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Replicate.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Replicate.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/ReturnByValue.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ReturnByValue.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/ReturnByValue.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/ReturnByValue.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Reverse.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Reverse.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Reverse.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Reverse.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Select.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Select.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Select.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Select.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/SelfAdjointView.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SelfAdjointView.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/SelfAdjointView.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SelfAdjointView.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/SelfCwiseBinaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SelfCwiseBinaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/SelfCwiseBinaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SelfCwiseBinaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Solve.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Solve.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Solve.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Solve.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/SolveTriangular.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SolveTriangular.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/SolveTriangular.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SolveTriangular.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/SolverBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SolverBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/SolverBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/SolverBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/StableNorm.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/StableNorm.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/StableNorm.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/StableNorm.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Stride.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Stride.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Stride.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Stride.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Swap.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Swap.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Swap.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Swap.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Transpose.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Transpose.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Transpose.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Transpose.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Transpositions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Transpositions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Transpositions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Transpositions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/TriangularMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/TriangularMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/TriangularMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/TriangularMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/VectorBlock.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/VectorBlock.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/VectorBlock.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/VectorBlock.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/VectorwiseOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/VectorwiseOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/VectorwiseOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/VectorwiseOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/Visitor.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Visitor.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/Visitor.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/Visitor.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/Complex.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/Complex.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/Complex.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/Complex.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/TypeCasting.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/TypeCasting.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AVX/TypeCasting.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX/TypeCasting.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AVX512/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX512/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AVX512/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX512/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AVX512/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX512/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AVX512/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AVX512/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AltiVec/Complex.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AltiVec/Complex.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AltiVec/Complex.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AltiVec/Complex.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AltiVec/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AltiVec/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AltiVec/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AltiVec/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/AltiVec/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AltiVec/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/AltiVec/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/AltiVec/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/Complex.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/Complex.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/Complex.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/Complex.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/Half.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/Half.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/Half.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/Half.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/PacketMathHalf.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/PacketMathHalf.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/PacketMathHalf.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/TypeCasting.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/TypeCasting.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/CUDA/TypeCasting.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/CUDA/TypeCasting.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/Default/Settings.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/Default/Settings.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/Default/Settings.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/Default/Settings.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/NEON/Complex.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/NEON/Complex.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/NEON/Complex.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/NEON/Complex.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/NEON/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/NEON/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/NEON/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/NEON/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/NEON/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/NEON/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/NEON/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/NEON/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/Complex.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/Complex.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/Complex.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/Complex.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/TypeCasting.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/TypeCasting.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/SSE/TypeCasting.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/SSE/TypeCasting.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/ZVector/Complex.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/ZVector/Complex.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/ZVector/Complex.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/ZVector/Complex.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/ZVector/MathFunctions.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/ZVector/MathFunctions.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/ZVector/MathFunctions.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/ZVector/MathFunctions.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/arch/ZVector/PacketMath.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/ZVector/PacketMath.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/arch/ZVector/PacketMath.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/arch/ZVector/PacketMath.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/functors/AssignmentFunctors.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/AssignmentFunctors.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/functors/AssignmentFunctors.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/AssignmentFunctors.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/functors/BinaryFunctors.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/BinaryFunctors.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/functors/BinaryFunctors.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/BinaryFunctors.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/functors/NullaryFunctors.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/NullaryFunctors.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/functors/NullaryFunctors.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/NullaryFunctors.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/functors/StlFunctors.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/StlFunctors.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/functors/StlFunctors.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/StlFunctors.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/functors/TernaryFunctors.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/TernaryFunctors.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/functors/TernaryFunctors.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/TernaryFunctors.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/functors/UnaryFunctors.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/UnaryFunctors.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/functors/UnaryFunctors.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/functors/UnaryFunctors.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralBlockPanelKernel.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralBlockPanelKernel.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralBlockPanelKernel.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/Parallelizer.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/Parallelizer.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/Parallelizer.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/Parallelizer.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointRank2Update.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointRank2Update.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/SelfadjointRank2Update.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/SelfadjointRank2Update.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/products/TriangularSolverVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularSolverVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/products/TriangularSolverVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/products/TriangularSolverVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/BlasUtil.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/BlasUtil.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/BlasUtil.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/BlasUtil.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/Constants.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Constants.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/Constants.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Constants.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/DisableStupidWarnings.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/DisableStupidWarnings.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/DisableStupidWarnings.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/DisableStupidWarnings.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/ForwardDeclarations.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/ForwardDeclarations.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/ForwardDeclarations.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/ForwardDeclarations.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/MKL_support.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/MKL_support.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/MKL_support.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/MKL_support.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/Macros.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Macros.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/Macros.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Macros.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/Memory.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Memory.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/Memory.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Memory.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/Meta.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Meta.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/Meta.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/Meta.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/NonMPL2.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/NonMPL2.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/NonMPL2.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/NonMPL2.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/ReenableStupidWarnings.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/ReenableStupidWarnings.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/ReenableStupidWarnings.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/ReenableStupidWarnings.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/StaticAssert.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/StaticAssert.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/StaticAssert.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/StaticAssert.h diff --git a/test/mini-project/thirdparty/Eigen/src/Core/util/XprHelper.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/XprHelper.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Core/util/XprHelper.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Core/util/XprHelper.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/ComplexEigenSolver.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/ComplexEigenSolver.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/ComplexEigenSolver.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/ComplexEigenSolver.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/ComplexSchur.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/ComplexSchur.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/ComplexSchur.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/ComplexSchur.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/EigenSolver.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/EigenSolver.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/EigenSolver.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/EigenSolver.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/HessenbergDecomposition.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/HessenbergDecomposition.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/HessenbergDecomposition.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/HessenbergDecomposition.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/RealQZ.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/RealQZ.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/RealQZ.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/RealQZ.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/RealSchur.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/RealSchur.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/RealSchur.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/RealSchur.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/Eigenvalues/Tridiagonalization.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/Tridiagonalization.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Eigenvalues/Tridiagonalization.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Eigenvalues/Tridiagonalization.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/AlignedBox.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/AlignedBox.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/AlignedBox.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/AlignedBox.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/AngleAxis.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/AngleAxis.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/AngleAxis.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/AngleAxis.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/EulerAngles.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/EulerAngles.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/EulerAngles.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/EulerAngles.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Homogeneous.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Homogeneous.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Homogeneous.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Homogeneous.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Hyperplane.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Hyperplane.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Hyperplane.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Hyperplane.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/OrthoMethods.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/OrthoMethods.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/OrthoMethods.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/OrthoMethods.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/ParametrizedLine.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/ParametrizedLine.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/ParametrizedLine.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/ParametrizedLine.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Quaternion.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Quaternion.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Quaternion.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Quaternion.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Rotation2D.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Rotation2D.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Rotation2D.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Rotation2D.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/RotationBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/RotationBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/RotationBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/RotationBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Scaling.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Scaling.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Scaling.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Scaling.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Transform.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Transform.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Transform.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Transform.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Translation.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Translation.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Translation.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Translation.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/Umeyama.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Umeyama.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/Umeyama.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/Umeyama.h diff --git a/test/mini-project/thirdparty/Eigen/src/Geometry/arch/Geometry_SSE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/arch/Geometry_SSE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Geometry/arch/Geometry_SSE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Geometry/arch/Geometry_SSE.h diff --git a/test/mini-project/thirdparty/Eigen/src/Householder/BlockHouseholder.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Householder/BlockHouseholder.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Householder/BlockHouseholder.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Householder/BlockHouseholder.h diff --git a/test/mini-project/thirdparty/Eigen/src/Householder/Householder.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Householder/Householder.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Householder/Householder.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Householder/Householder.h diff --git a/test/mini-project/thirdparty/Eigen/src/Householder/HouseholderSequence.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Householder/HouseholderSequence.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Householder/HouseholderSequence.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Householder/HouseholderSequence.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h diff --git a/test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h diff --git a/test/mini-project/thirdparty/Eigen/src/Jacobi/Jacobi.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/Jacobi/Jacobi.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/Jacobi/Jacobi.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/Jacobi/Jacobi.h diff --git a/test/mini-project/thirdparty/Eigen/src/LU/Determinant.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/LU/Determinant.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/LU/Determinant.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/LU/Determinant.h diff --git a/test/mini-project/thirdparty/Eigen/src/LU/FullPivLU.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/LU/FullPivLU.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/LU/FullPivLU.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/LU/FullPivLU.h diff --git a/test/mini-project/thirdparty/Eigen/src/LU/InverseImpl.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/LU/InverseImpl.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/LU/InverseImpl.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/LU/InverseImpl.h diff --git a/test/mini-project/thirdparty/Eigen/src/LU/PartialPivLU.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/LU/PartialPivLU.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/LU/PartialPivLU.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/LU/PartialPivLU.h diff --git a/test/mini-project/thirdparty/Eigen/src/LU/PartialPivLU_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/LU/PartialPivLU_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/LU/PartialPivLU_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/LU/PartialPivLU_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/LU/arch/Inverse_SSE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/LU/arch/Inverse_SSE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/LU/arch/Inverse_SSE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/LU/arch/Inverse_SSE.h diff --git a/test/mini-project/thirdparty/Eigen/src/MetisSupport/MetisSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/MetisSupport/MetisSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/MetisSupport/MetisSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/MetisSupport/MetisSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/OrderingMethods/Amd.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/OrderingMethods/Amd.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/OrderingMethods/Amd.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/OrderingMethods/Amd.h diff --git a/test/mini-project/thirdparty/Eigen/src/OrderingMethods/Eigen_Colamd.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/OrderingMethods/Eigen_Colamd.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/OrderingMethods/Eigen_Colamd.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/OrderingMethods/Eigen_Colamd.h diff --git a/test/mini-project/thirdparty/Eigen/src/OrderingMethods/Ordering.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/OrderingMethods/Ordering.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/OrderingMethods/Ordering.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/OrderingMethods/Ordering.h diff --git a/test/mini-project/thirdparty/Eigen/src/PaStiXSupport/PaStiXSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/PaStiXSupport/PaStiXSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/PaStiXSupport/PaStiXSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/PaStiXSupport/PaStiXSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/PardisoSupport/PardisoSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/PardisoSupport/PardisoSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/PardisoSupport/PardisoSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/PardisoSupport/PardisoSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/QR/ColPivHouseholderQR.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/QR/ColPivHouseholderQR.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/QR/ColPivHouseholderQR.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/QR/ColPivHouseholderQR.h diff --git a/test/mini-project/thirdparty/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/QR/CompleteOrthogonalDecomposition.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/QR/CompleteOrthogonalDecomposition.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/QR/CompleteOrthogonalDecomposition.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/QR/CompleteOrthogonalDecomposition.h diff --git a/test/mini-project/thirdparty/Eigen/src/QR/FullPivHouseholderQR.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/QR/FullPivHouseholderQR.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/QR/FullPivHouseholderQR.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/QR/FullPivHouseholderQR.h diff --git a/test/mini-project/thirdparty/Eigen/src/QR/HouseholderQR.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/QR/HouseholderQR.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/QR/HouseholderQR.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/QR/HouseholderQR.h diff --git a/test/mini-project/thirdparty/Eigen/src/QR/HouseholderQR_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/QR/HouseholderQR_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/QR/HouseholderQR_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/QR/HouseholderQR_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/SVD/BDCSVD.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/BDCSVD.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SVD/BDCSVD.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/BDCSVD.h diff --git a/test/mini-project/thirdparty/Eigen/src/SVD/JacobiSVD.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/JacobiSVD.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SVD/JacobiSVD.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/JacobiSVD.h diff --git a/test/mini-project/thirdparty/Eigen/src/SVD/JacobiSVD_LAPACKE.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/JacobiSVD_LAPACKE.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SVD/JacobiSVD_LAPACKE.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/JacobiSVD_LAPACKE.h diff --git a/test/mini-project/thirdparty/Eigen/src/SVD/SVDBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/SVDBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SVD/SVDBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/SVDBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/SVD/UpperBidiagonalization.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/UpperBidiagonalization.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SVD/UpperBidiagonalization.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SVD/UpperBidiagonalization.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/AmbiVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/AmbiVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/AmbiVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/AmbiVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/CompressedStorage.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/CompressedStorage.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/CompressedStorage.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/CompressedStorage.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/MappedSparseMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/MappedSparseMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/MappedSparseMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/MappedSparseMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseAssign.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseAssign.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseAssign.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseAssign.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseBlock.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseBlock.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseBlock.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseBlock.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseColEtree.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseColEtree.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseColEtree.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseColEtree.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseCompressedBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseCompressedBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseCompressedBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseCompressedBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseCwiseBinaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseCwiseBinaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseCwiseBinaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseCwiseBinaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseCwiseUnaryOp.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseCwiseUnaryOp.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseCwiseUnaryOp.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseCwiseUnaryOp.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseDenseProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseDenseProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseDenseProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseDenseProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseDiagonalProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseDiagonalProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseDiagonalProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseDiagonalProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseDot.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseDot.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseDot.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseDot.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseFuzzy.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseFuzzy.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseFuzzy.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseFuzzy.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseMap.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseMap.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseMap.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseMap.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseMatrixBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseMatrixBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseMatrixBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseMatrixBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparsePermutation.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparsePermutation.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparsePermutation.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparsePermutation.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseProduct.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseProduct.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseProduct.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseProduct.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseRedux.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseRedux.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseRedux.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseRedux.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseRef.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseRef.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseRef.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseRef.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseSelfAdjointView.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseSelfAdjointView.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseSelfAdjointView.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseSelfAdjointView.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseSolverBase.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseSolverBase.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseSolverBase.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseSolverBase.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseSparseProductWithPruning.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseSparseProductWithPruning.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseSparseProductWithPruning.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseSparseProductWithPruning.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseTranspose.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseTranspose.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseTranspose.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseTranspose.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseTriangularView.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseTriangularView.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseTriangularView.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseTriangularView.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseUtil.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseUtil.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseUtil.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseUtil.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/SparseView.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseView.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/SparseView.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/SparseView.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseCore/TriangularSolver.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/TriangularSolver.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseCore/TriangularSolver.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseCore/TriangularSolver.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLUImpl.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLUImpl.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLUImpl.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLUImpl.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_Memory.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_Memory.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_Memory.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_Memory.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_Structs.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_Structs.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_Structs.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_Structs.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_Utils.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_Utils.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_Utils.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_Utils.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_column_bmod.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_column_bmod.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_column_bmod.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_column_bmod.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_column_dfs.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_column_dfs.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_column_dfs.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_column_dfs.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_gemm_kernel.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_gemm_kernel.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_gemm_kernel.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_gemm_kernel.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_kernel_bmod.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_kernel_bmod.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_kernel_bmod.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_kernel_bmod.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_panel_bmod.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_panel_bmod.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_panel_bmod.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_panel_bmod.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_panel_dfs.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_panel_dfs.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_panel_dfs.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_panel_dfs.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_pivotL.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_pivotL.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_pivotL.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_pivotL.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_pruneL.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_pruneL.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_pruneL.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_pruneL.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_relax_snode.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_relax_snode.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseLU/SparseLU_relax_snode.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseLU/SparseLU_relax_snode.h diff --git a/test/mini-project/thirdparty/Eigen/src/SparseQR/SparseQR.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SparseQR/SparseQR.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SparseQR/SparseQR.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SparseQR/SparseQR.h diff --git a/test/mini-project/thirdparty/Eigen/src/StlSupport/StdDeque.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/StdDeque.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/StlSupport/StdDeque.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/StdDeque.h diff --git a/test/mini-project/thirdparty/Eigen/src/StlSupport/StdList.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/StdList.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/StlSupport/StdList.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/StdList.h diff --git a/test/mini-project/thirdparty/Eigen/src/StlSupport/StdVector.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/StdVector.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/StlSupport/StdVector.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/StdVector.h diff --git a/test/mini-project/thirdparty/Eigen/src/StlSupport/details.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/details.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/StlSupport/details.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/StlSupport/details.h diff --git a/test/mini-project/thirdparty/Eigen/src/SuperLUSupport/SuperLUSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/SuperLUSupport/SuperLUSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/SuperLUSupport/SuperLUSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/SuperLUSupport/SuperLUSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/UmfPackSupport/UmfPackSupport.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/UmfPackSupport/UmfPackSupport.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/UmfPackSupport/UmfPackSupport.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/UmfPackSupport/UmfPackSupport.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/Image.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/Image.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/Image.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/Image.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/Kernel.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/Kernel.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/Kernel.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/Kernel.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/RealSvd2x2.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/RealSvd2x2.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/RealSvd2x2.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/RealSvd2x2.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/blas.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/blas.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/blas.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/blas.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/lapack.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/lapack.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/lapack.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/lapack.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/lapacke.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/lapacke.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/lapacke.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/lapacke.h diff --git a/test/mini-project/thirdparty/Eigen/src/misc/lapacke_mangling.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/misc/lapacke_mangling.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/misc/lapacke_mangling.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/misc/lapacke_mangling.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/ArrayCwiseBinaryOps.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/ArrayCwiseBinaryOps.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/ArrayCwiseBinaryOps.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/ArrayCwiseBinaryOps.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/ArrayCwiseUnaryOps.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/ArrayCwiseUnaryOps.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/ArrayCwiseUnaryOps.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/ArrayCwiseUnaryOps.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/BlockMethods.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/BlockMethods.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/BlockMethods.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/BlockMethods.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/CommonCwiseBinaryOps.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/CommonCwiseBinaryOps.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/CommonCwiseBinaryOps.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/CommonCwiseBinaryOps.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/CommonCwiseUnaryOps.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/CommonCwiseUnaryOps.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/CommonCwiseUnaryOps.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/CommonCwiseUnaryOps.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/MatrixCwiseBinaryOps.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/MatrixCwiseBinaryOps.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/MatrixCwiseBinaryOps.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/MatrixCwiseBinaryOps.h diff --git a/test/mini-project/thirdparty/Eigen/src/plugins/MatrixCwiseUnaryOps.h b/test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/MatrixCwiseUnaryOps.h similarity index 100% rename from test/mini-project/thirdparty/Eigen/src/plugins/MatrixCwiseUnaryOps.h rename to test/mwe_with_default_folders/thirdparty/Eigen/src/plugins/MatrixCwiseUnaryOps.h diff --git a/test/test.py b/test/test.py new file mode 100644 index 0000000..9df489d --- /dev/null +++ b/test/test.py @@ -0,0 +1,112 @@ +import os, sys +import unittest +import subprocess +import shutil +import logging +import io +import stat +from pathlib import Path as _Path +from multiprocessing import freeze_support + +from clang_build import clang_build + + +def on_rm_error( func, path, exc_info): + # path contains the path of the file that couldn't be removed + # let's just assume that it's read-only and unlink it. + os.chmod( path, stat.S_IWRITE ) + os.unlink( path ) + + +class TestClangBuild(unittest.TestCase): + def test_hello_world_mwe(self): + clang_build.build(clang_build.parse_args(['-d', 'test/mwe']), False) + + try: + output = subprocess.check_output(['./build/default/bin/main'], stderr=subprocess.STDOUT).decode('utf-8').strip() + except subprocess.CalledProcessError: + self.fail('Could not run compiled program') + + self.assertEqual(output, 'Hello!') + + def test_script_call(self): + try: + subprocess.check_output(['clang-build', '-d', 'test/mwe', '-V', '-p'], stderr=subprocess.STDOUT) + except subprocess.CalledProcessError: + self.fail('Compilation failed') + try: + output = subprocess.check_output(['./build/default/bin/main'], stderr=subprocess.STDOUT).decode('utf-8').strip() + except subprocess.CalledProcessError: + self.fail('Could not run compiled program') + + self.assertEqual(output, 'Hello!') + + def test_hello_world_rebuild(self): + clang_build.build(clang_build.parse_args(['-d', 'test/mwe']), False) + logger = logging.getLogger('clang_build') + logger.setLevel(logging.DEBUG) + stream_capture = io.StringIO() + ch = logging.StreamHandler(stream_capture) + ch.setLevel(logging.DEBUG) + logger.addHandler(ch) + clang_build.build(clang_build.parse_args(['-d', 'test/mwe', '-V']), False) + try: + output = subprocess.check_output(['./build/default/bin/main'], stderr=subprocess.STDOUT).decode('utf-8').strip() + except subprocess.CalledProcessError: + self.fail('Could not run compiled program') + + logger.removeHandler(ch) + + self.assertRegex(stream_capture.getvalue(), r'.*Target \[main\] is already compiled.*') + self.assertEqual(output, 'Hello!') + + def test_automatic_include_folders(self): + clang_build.build(clang_build.parse_args(['-d', 'test/mwe_with_default_folders', '-V']), False) + + try: + output = subprocess.check_output(['./build/default/bin/main'], stderr=subprocess.STDOUT).decode('utf-8').strip() + except subprocess.CalledProcessError: + self.fail('Could not run compiled program') + calculated_integer, calculated_vector = output.splitlines() + self.assertEqual(calculated_integer, 'Calculated Integer: 1253643') + self.assertEqual(calculated_vector, 'Calculated Vector: 0 0 1') + + def test_toml_mwe(self): + clang_build.build(clang_build.parse_args(['-d', 'test/toml_mwe']), False) + + try: + output = subprocess.check_output(['./build/default/bin/runHello'], stderr=subprocess.STDOUT).decode('utf-8').strip() + except subprocess.CalledProcessError: + self.fail('Could not run compiled program') + + self.assertEqual(output, 'Hello!') + + def test_toml_custom_folder(self): + clang_build.build(clang_build.parse_args(['-d', 'test/toml_with_custom_folder']), False) + + try: + output = subprocess.check_output(['./build/default/bin/runHello'], stderr=subprocess.STDOUT).decode('utf-8').strip() + except subprocess.CalledProcessError: + self.fail('Could not run compiled program') + + self.assertEqual(output, 'Hello!') + + # def test_mwe_two_targets(self): + # logging.getLogger().setLevel(logging.DEBUG) + # clang_build.build(clang_build.parse_args(['-d', 'test/multi_target_external']), False) + + # try: + # output = subprocess.check_output(['./build/myexe/default/bin/runLib'], stderr=subprocess.STDOUT).decode('utf-8').strip() + # except subprocess.CalledProcessError: + # self.fail('Could not run compiled program') + + # self.assertEqual(output, 'Hello!') + + def tearDown(self): + if _Path('build').exists(): + shutil.rmtree('build', onerror = on_rm_error) + + +if __name__ == '__main__': + freeze_support() + unittest.main() \ No newline at end of file diff --git a/test/toml_mwe/clang-build.toml b/test/toml_mwe/clang-build.toml new file mode 100644 index 0000000..d82495d --- /dev/null +++ b/test/toml_mwe/clang-build.toml @@ -0,0 +1,2 @@ +[myexe] +output_name = "runHello" \ No newline at end of file diff --git a/test/toml_mwe/include/main.hpp b/test/toml_mwe/include/main.hpp new file mode 100644 index 0000000..bb6946c --- /dev/null +++ b/test/toml_mwe/include/main.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include + +inline std::string main_print() +{ + return "Hello!"; +} \ No newline at end of file diff --git a/test/external-project/src/main.cpp b/test/toml_mwe/src/main.cpp similarity index 100% rename from test/external-project/src/main.cpp rename to test/toml_mwe/src/main.cpp diff --git a/test/toml_with_custom_folder/clang-build.toml b/test/toml_with_custom_folder/clang-build.toml new file mode 100644 index 0000000..b01fd33 --- /dev/null +++ b/test/toml_with_custom_folder/clang-build.toml @@ -0,0 +1,5 @@ +[myexe] +output_name = "runHello" +[myexe.sources] +include_directories = ["include_custom"] +source_directories = ["src_custom"] \ No newline at end of file diff --git a/test/mwe-toml/include/main.hpp b/test/toml_with_custom_folder/include_custom/main.hpp similarity index 100% rename from test/mwe-toml/include/main.hpp rename to test/toml_with_custom_folder/include_custom/main.hpp diff --git a/test/mwe-toml/src/main.cpp b/test/toml_with_custom_folder/src_custom/main.cpp similarity index 100% rename from test/mwe-toml/src/main.cpp rename to test/toml_with_custom_folder/src_custom/main.cpp