OmniSciDB  2e3a973ef4
anonymous_namespace{omnisci_path.cpp} Namespace Reference

Functions

std::string get_root_abs_path ()
 

Function Documentation

◆ get_root_abs_path()

std::string anonymous_namespace{omnisci_path.cpp}::get_root_abs_path ( )

Definition at line 26 of file omnisci_path.cpp.

References CHECK_GT, and CHECK_LT.

26  {
27  char abs_exe_path[MAX_PATH];
28  auto path_len = GetModuleFileNameA(NULL, abs_exe_path, MAX_PATH);
29  CHECK_GT(path_len, 0u);
30  CHECK_LT(static_cast<size_t>(path_len), sizeof(abs_exe_path));
31  boost::filesystem::path abs_exe_dir(std::string(abs_exe_path, path_len));
32  abs_exe_dir.remove_filename();
33  const auto mapd_root = abs_exe_dir.parent_path();
34 
35  return mapd_root.string();
36 }
#define CHECK_GT(x, y)
Definition: Logger.h:209
#define CHECK_LT(x, y)
Definition: Logger.h:207