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

CMAKE LISTS PATH is list of paths #222

Open
charlescva opened this issue Nov 14, 2018 · 2 comments
Open

CMAKE LISTS PATH is list of paths #222

charlescva opened this issue Nov 14, 2018 · 2 comments

Comments

@charlescva
Copy link

In commit ff18e07 the use of CMAKE_MODULE_PATH will cause the build to fail if there is more than one directory specified. See: https://cmake.org/cmake/help/v3.10/variable/CMAKE_MODULE_PATH.html

@charlescva
Copy link
Author

As a work around (because my CMAKE_MODULE_PATH references several modules when I am compiling the theia libraries), I've opted to use the CMAKE_CURRENT_LIST_DIR in CMakeLists.txt under libraries/vlfeat/

e.g.
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/OptimizeTheiaCompilerFlags.cmake")
optimizetheiacompilerflags()

It isn't 'pretty', (../../ is gross) but it works provided the CMakeLists.txt path is in libraries/vlfeat and libraries is in the same directory as the theia cmake modules directory.

Again, this is not an issue directly when compiling theia by itself, but if incorporated in to another project with CMake, it can be an issue.

@Neumann-A
Copy link

since the path is added to CMAKE_MODULE_PATH and the module name is unique to this library include(OptimizeTheiaCompilerFlags) would be enough ...

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

No branches or pull requests

2 participants