Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
44495fa7
Commit
44495fa7
authored
Mar 21, 2012
by
David Cole
Committed by
Kitware Robot
Mar 21, 2012
Browse files
Merge topic 'UseRealPathWhenFindingEclipse'
00af40b2
Eclipse: fix
#13036
, make version detection work with symlinks
parents
d6d221d4
00af40b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/CMakeFindEclipseCDT4.cmake
View file @
44495fa7
...
...
@@ -20,7 +20,9 @@ FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable"
FUNCTION
(
_FIND_ECLIPSE_VERSION
)
# This code is in a function so the variables used here have only local scope
IF
(
CMAKE_ECLIPSE_EXECUTABLE
)
GET_FILENAME_COMPONENT
(
_ECLIPSE_DIR
"
${
CMAKE_ECLIPSE_EXECUTABLE
}
"
PATH
)
# use REALPATH to resolve symlinks (http://public.kitware.com/Bug/view.php?id=13036)
GET_FILENAME_COMPONENT
(
_REALPATH_CMAKE_ECLIPSE_EXECUTABLE
"
${
CMAKE_ECLIPSE_EXECUTABLE
}
"
REALPATH
)
GET_FILENAME_COMPONENT
(
_ECLIPSE_DIR
"
${
_REALPATH_CMAKE_ECLIPSE_EXECUTABLE
}
"
PATH
)
FILE
(
GLOB _ECLIPSE_FEATURE_DIR
"
${
_ECLIPSE_DIR
}
/features/org.eclipse.platform*"
)
IF
(
"
${
_ECLIPSE_FEATURE_DIR
}
"
MATCHES
".+org.eclipse.platform_([0-9]+
\\
.[0-9]+).+"
)
SET
(
_ECLIPSE_VERSION
${
CMAKE_MATCH_1
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment