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 vlfeat CMAKE module path #266

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

Conversation

sisco0
Copy link

@sisco0 sisco0 commented Jun 26, 2022

The proposed fix solves the issue when multiple module paths are found for CMAKE. In this sense, ${CMAKE_SOURCE_DIR} is preferred, as it always points to a unique path.

@@ -1,6 +1,6 @@
project(vlfeat)

include("${CMAKE_MODULE_PATH}/OptimizeTheiaCompilerFlags.cmake")
include("${CMAKE_SOURCE_DIR}/cmake/OptimizeTheiaCompilerFlags.cmake")
Copy link

@Neumann-A Neumann-A Jan 24, 2023

Choose a reason for hiding this comment

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

Suggested change
include("${CMAKE_SOURCE_DIR}/cmake/OptimizeTheiaCompilerFlags.cmake")
include(OptimizeTheiaCompilerFlags)

CMAKE_MODULE_PATH was modified to find that module. CMAKE_SOURCE_DIR is wrong if theia is included via add_subdirectory by a parent project. You either go relativ from CMAKE_CURRENT_SOURCE_DIR or you trust CMAKE_MODULE_PATH being set.

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.

3 participants