-
Notifications
You must be signed in to change notification settings - Fork 9
#2474: cmake: fix cmake warning with version > 3.12 #2475
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b622f5c
#2474: cmake: fix cmake warning with version > 3.12
lifflander 29f5160
#2474: cmake: try a different solution due to cmake version not suppo…
lifflander 5ee2ab3
#2474: cmake: change the cmake variable not the environment one
lifflander ebc7d13
#2474: cmake: in findlibunwind, change root variable to lowercase
lifflander 6c997c0
#2474: cmake: fix variable name in comment
lifflander 7393396
#2474: libunwind: make everything lowercase in find script
lifflander 16a17d7
#2474: libunwind: fix link command for VT
lifflander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,42 @@ | ||
|
|
||
| # Users can pass LIBUNWIND_ROOT, LIBUNWIND_INCLUDE_DIR, and LIBUNWIND_LIBRARY as CMake variables. | ||
| # If LIBUNWIND_ROOT is provided, the INCLUDE_DIR and LIBRARY variables may be omitted. | ||
| # Users can pass libunwind_ROOT, libunwind_INCLUDE_DIR, and libunwind_LIBRARY as CMake variables. | ||
| # If libunwind_ROOT is provided, the INCLUDE_DIR and LIBRARY variables may be omitted. | ||
| # | ||
| # LIBUNWIND_FOUND, LIBUNWIND_INCLUDE_DIRS, and LIBUNWIND_LIBRARIES are outputs | ||
| # libunwind_FOUND, libunwind_INCLUDE_DIRS, and libunwind_LIBRARIES are outputs | ||
|
|
||
| if(LIBUNWIND_ROOT) | ||
| set(LIBUNWIND_INCLUDE_DIR ${LIBUNWIND_INCLUDE_DIR};${LIBUNWIND_ROOT}/include) | ||
| set(LIBUNWIND_LIBRARY ${LIBUNWIND_LIBRARY};${LIBUNWIND_ROOT}/lib64;${LIBUNWIND_ROOT}/lib) | ||
| if(libunwind_ROOT) | ||
| set(libunwind_INCLUDE_DIR ${libunwind_INCLUDE_DIR};${libunwind_ROOT}/include) | ||
| set(libunwind_LIBRARY ${libunwind_LIBRARY};${libunwind_ROOT}/lib64;${libunwind_ROOT}/lib) | ||
| endif() | ||
|
|
||
| # First, check only in the hinted paths | ||
| find_path(LIBUNWIND_INCLUDE_DIRS NAMES libunwind.h | ||
| find_path(libunwind_INCLUDE_DIRS NAMES libunwind.h | ||
| DOC "The libunwind include directory" | ||
| HINTS ${LIBUNWIND_INCLUDE_DIR} | ||
| HINTS ${libunwind_INCLUDE_DIR} | ||
| NO_DEFAULT_PATH | ||
| ) | ||
| find_library(LIBUNWIND_LIBRARIES NAMES unwind | ||
| find_library(libunwind_LIBRARIES NAMES unwind | ||
| DOC "The libunwind library" | ||
| HINTS ${LIBUNWIND_LIBRARY} | ||
| HINTS ${libunwind_LIBRARY} | ||
| NO_DEFAULT_PATH | ||
| ) | ||
|
|
||
| # If that fails, check in CMake's default paths | ||
| find_path(LIBUNWIND_INCLUDE_DIRS NAMES libunwind.h | ||
| find_path(libunwind_INCLUDE_DIRS NAMES libunwind.h | ||
| DOC "The libunwind include directory" | ||
| ) | ||
| find_library(LIBUNWIND_LIBRARIES NAMES unwind | ||
| find_library(libunwind_LIBRARIES NAMES unwind | ||
| DOC "The libunwind library" | ||
| ) | ||
|
|
||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUNWIND | ||
| REQUIRED_VARS LIBUNWIND_LIBRARIES LIBUNWIND_INCLUDE_DIRS) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(libunwind | ||
| REQUIRED_VARS libunwind_LIBRARIES libunwind_INCLUDE_DIRS) | ||
|
|
||
| if(LIBUNWIND_FOUND) | ||
| if(libunwind_FOUND) | ||
| if(NOT TARGET libunwind) | ||
| add_library(libunwind UNKNOWN IMPORTED) | ||
| set_target_properties(libunwind PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBUNWIND_INCLUDE_DIRS}") | ||
| set_property(TARGET libunwind APPEND PROPERTY IMPORTED_LOCATION "${LIBUNWIND_LIBRARY}") | ||
| set_target_properties(libunwind PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${libunwind_INCLUDE_DIRS}") | ||
| set_property(TARGET libunwind APPEND PROPERTY IMPORTED_LOCATION "${libunwind_LIBRARY}") | ||
| endif() | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| set(vt_feature_cmake_libunwind "0") | ||
|
|
||
| if(NOT DEFINED LIBUNWIND_ROOT) | ||
| set(LIBUNWIND_ROOT "/usr") | ||
| if(NOT DEFINED libunwind_ROOT) | ||
| set(libunwind_ROOT "/usr") | ||
| endif() | ||
|
|
||
| find_package(libunwind) | ||
|
|
||
| if(LIBUNWIND_FOUND) | ||
| if(libunwind_FOUND) | ||
| set(vt_feature_cmake_libunwind "1") | ||
| endif() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.