Skip to content

Commit

Permalink
Merge pull request #601 from LordNacho/master
Browse files Browse the repository at this point in the history
Macro guard against missing _PROJECT_SOURCE_DIR_
  • Loading branch information
tmontgomery authored Dec 18, 2018
2 parents c5390fc + ff8bb41 commit 7614787
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aeron-client/src/main/cpp/util/Exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ static constexpr const char* past_prefix(const char * const prefix, const char *
*filename == '/' ? filename + 1 : filename;
}

#define __SHORT_FILE__ aeron::util::past_prefix(__PROJECT_SOURCE_DIR__,__FILE__)
#ifdef __PROJECT_SOURCE_DIR__
#define __SHORT_FILE__ aeron::util::past_prefix(__PROJECT_SOURCE_DIR__,__FILE__)
#else
#define __SHORT_FILE__ __FILE__
#endif

#ifdef _MSC_VER
#define SOURCEINFO __FUNCTION__, __SHORT_FILE__, __LINE__
Expand Down

0 comments on commit 7614787

Please sign in to comment.