diff options
author | Josh Blum | 2013-08-04 18:02:04 -0700 |
---|---|---|
committer | Josh Blum | 2013-08-04 18:02:04 -0700 |
commit | 21bb17612dec27213805321fb656788ec423453f (patch) | |
tree | 8745dd03efe85f5c5a3fa6751d8807eb17d57e17 /lib/module_loader.cpp | |
parent | 4e67133913229ed66abc9dd4aaa95b29b1ff9ede (diff) | |
download | sandhi-21bb17612dec27213805321fb656788ec423453f.tar.gz sandhi-21bb17612dec27213805321fb656788ec423453f.tar.bz2 sandhi-21bb17612dec27213805321fb656788ec423453f.zip |
gras: jit factory automatically adds GRAS_ROOT include path
Diffstat (limited to 'lib/module_loader.cpp')
-rw-r--r-- | lib/module_loader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/module_loader.cpp b/lib/module_loader.cpp index d64722d..de3aa87 100644 --- a/lib/module_loader.cpp +++ b/lib/module_loader.cpp @@ -61,6 +61,14 @@ static std::string my_get_env(const std::string &name, const std::string &defalt return (env_var != NULL)? env_var : defalt; } +//used by jit factory, but defined here for lazyness +std::string get_gras_runtime_include_path(void) +{ + const std::string root = my_get_env("GRAS_ROOT", "@GRAS_ROOT@"); + const fs::path inc_path = fs::path(root) / "include"; + return inc_path.string(); +} + GRAS_STATIC_BLOCK(gras_module_loader) { //!search the GRAS_ROOT directory for this install |