Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative source path in exceptions #588

Merged
merged 1 commit into from
Dec 2, 2018
Merged

Use relative source path in exceptions #588

merged 1 commit into from
Dec 2, 2018

Conversation

lukepalmer
Copy link
Contributor

Have sourced exceptions contain text that looks like aeron-client/.../filename instead of /home/luke/aeron/aeron-client....

Note that #555 was a previous attempt at this.

@@ -55,6 +55,9 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build" FORCE)
endif(NOT CMAKE_BUILD_TYPE)

# relative file paths for use in exceptions
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__CMAKE_SOURCE_DIR__='\"${CMAKE_SOURCE_DIR}\"'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I suggested passing CMAKE_SOURCE_DIR but on second thought, it would be better to pass PROJECT_SOURCE_DIR.

If Aeron project is included by another project with add_subdirectory, CMAKE_SOURCE_DIR will point to the containing project's source directory while PROJECT_SOURCE_DIR will still point to Aeron's project root.

This will not affect standalone builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me. Please speak up if anyone else has opinions, I can change if not.

@mjpt777 mjpt777 merged commit 790b46b into aeron-io:master Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants