Skip to content

Commit

Permalink
RTC always treats the working directory as an include path.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robadob committed Feb 18, 2022
1 parent 949aba8 commit 21937f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flamegpu/util/detail/JitifyCache.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <filesystem>
using std::tr2::sys::temp_directory_path;
using std::tr2::sys::exists;
using std::tr2::sys::current_path;
using std::tr2::sys::path;
using std::tr2::sys::directory_iterator;
#else
Expand All @@ -22,6 +23,7 @@ using std::tr2::sys::directory_iterator;
#include <experimental/filesystem>
using std::experimental::filesystem::v1::temp_directory_path;
using std::experimental::filesystem::v1::exists;
using std::experimental::filesystem::v1::current_path;
using std::experimental::filesystem::v1::path;
using std::experimental::filesystem::v1::directory_iterator;
#endif
Expand Down Expand Up @@ -272,6 +274,9 @@ std::unique_ptr<KernelInstantiation> JitifyCache::compileKernel(const std::strin
// cuda include directory (via CUDA_PATH)
options.push_back(std::string("-I" + cuda_include_dir));

// Add working directory as include path
options.push_back(std::string("-I" + current_path().generic_string()));

#ifdef USE_GLM
// GLM headers increase build time ~5x, so only enable glm if user is using it
if (kernel_src.find("glm") != std::string::npos) {
Expand Down

0 comments on commit 21937f2

Please sign in to comment.