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

add cmake checks for non-bundled random123 #1907

Merged
merged 2 commits into from Jun 16, 2022

Conversation

bcumming
Copy link
Member

Now that Random123 is a proper sub-module, and not simply bundled in tree, ensure that the system version is used when we don't USE_BUNDLED_LIBS.

Copy link
Contributor

@brenthuisman brenthuisman left a comment

Choose a reason for hiding this comment

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

Currently tests building with bundled random123 are failing with

CMake Error in ext/CMakeLists.txt:
    Target "ext-random123" INTERFACE_INCLUDE_DIRECTORIES property contains
    path:
      "/home/runner/work/arbor/arbor/ext/RANDOM123_INCLUDE_DIR-NOTFOUND"
    which is prefixed in the source directory.

I don't understand how that incorrect path is generated, but I don't speak CMake very well. Could it be the double install?

target_include_directories(ext-random123 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/random123/include)
if(ARB_USE_BUNDLED_RANDOM123)
target_include_directories(ext-random123 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/random123/include)
install(TARGETS ext-random123 EXPORT arbor-targets)
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is present twice, again after endif().

Copy link
Member Author

Choose a reason for hiding this comment

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

I tested and fixed the issue when using the system random123, but broke using the bundled Random123. My latest commit should fix the issue.
The double install was a separate bug, well spotted.
Don't worry about not understanding CMake, I don't think anybody really does.

@brenthuisman brenthuisman merged commit 75f7a07 into arbor-sim:master Jun 16, 2022
@bcumming bcumming deleted the fix/random123-without-bundles branch June 27, 2022 19:15
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.

None yet

2 participants