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

fix CMakeLists.txt bug #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kirhhoff
Copy link

@Kirhhoff Kirhhoff commented Jul 1, 2023

Lookup path of version map:
${CMAKE_SOURCE_DIR} -> ${CMAKE_CURRRENT_SOURCE_DIR}

This leads to version map lookup fail if syscall_intercept is embedded within another cmake-based project.

Lookup path of version map:
${CMAKE_SOURCE_DIR} -> ${CMAKE_CURRRENT_SOURCE_DIR}

This leads to version map lookup fail if syscall_intercept is
embedded within another cmake-based project.
@Kirhhoff
Copy link
Author

Kirhhoff commented Jul 1, 2023

I just put syscall_intercept under ${project}/lib/syscall_intercept, and add "lib/syscall_intercept" as a subdirectory of my project. Run cmake and it told me version map not found. It turns out ${CMAKE_SOURCE_DIR} is evaluated to ${project}, while ${CMAKE_CURRENT_SOURCE_DIR} can be properly evaluated to ${project}/lib/syscall_intercept.

@Kirhhoff Kirhhoff closed this Jul 1, 2023
@en4bz
Copy link
Collaborator

en4bz commented Jul 11, 2023

Why did you close this? It seems valid.

@Kirhhoff
Copy link
Author

Sorry, because after read the README again, I felt not sure whether this lib is intended to be embedded directly within another cmake project. Generally when I want to use a cmake lib I just clone it and write a "add_subdirectory" in my CMakeLists.txt. Under most circumstance this will just work, so for a cmake lib I actually rarely read its README...😂. After reading the README, its detailed instruction about how to set the lib up, I thought maybe I made a mistake?😖

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.

2 participants