Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
953bd682
Commit
953bd682
authored
Aug 09, 2010
by
Jonathan Perkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't try to remove from an empty list.
parent
d41683cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
scripts/CMakeLists.txt
scripts/CMakeLists.txt
+19
-17
No files found.
scripts/CMakeLists.txt
View file @
953bd682
...
...
@@ -253,24 +253,26 @@ ENDIF()
# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable
# returned string in ${var} is can be passed to linker's command line
MACRO
(
EXTRACT_LINK_LIBRARIES target var
)
LIST
(
REMOVE_ITEM
${
target
}
_LIB_DEPENDS
""
)
LIST
(
REMOVE_DUPLICATES
${
target
}
_LIB_DEPENDS
)
FOREACH
(
lib
${${
target
}
_LIB_DEPENDS
}
)
# Filter out "general", it is not a library, just CMake hint
# Also, remove duplicates
IF
(
NOT lib STREQUAL
"general"
AND NOT
${
var
}
MATCHES
"-l
${
lib
}
"
)
IF
(
lib MATCHES
"^
\\
-l"
)
SET
(
${
var
}
"
${${
var
}}
${
lib
}
"
)
ELSEIF
(
lib MATCHES
"^/"
)
# Full path, convert to just filename, strip "lib" prefix and extension
GET_FILENAME_COMPONENT
(
lib
"
${
lib
}
"
NAME_WE
)
STRING
(
REGEX REPLACE
"^lib"
""
lib
"
${
lib
}
"
)
SET
(
${
var
}
"
${${
var
}}
-l
${
lib
}
"
)
ELSE
()
SET
(
${
var
}
"
${${
var
}}
-l
${
lib
}
"
)
IF
(
${
target
}
_LIB_DEPENDS
)
LIST
(
REMOVE_ITEM
${
target
}
_LIB_DEPENDS
""
)
LIST
(
REMOVE_DUPLICATES
${
target
}
_LIB_DEPENDS
)
FOREACH
(
lib
${${
target
}
_LIB_DEPENDS
}
)
# Filter out "general", it is not a library, just CMake hint
# Also, remove duplicates
IF
(
NOT lib STREQUAL
"general"
AND NOT
${
var
}
MATCHES
"-l
${
lib
}
"
)
IF
(
lib MATCHES
"^
\\
-l"
)
SET
(
${
var
}
"
${${
var
}}
${
lib
}
"
)
ELSEIF
(
lib MATCHES
"^/"
)
# Full path, convert to just filename, strip "lib" prefix and extension
GET_FILENAME_COMPONENT
(
lib
"
${
lib
}
"
NAME_WE
)
STRING
(
REGEX REPLACE
"^lib"
""
lib
"
${
lib
}
"
)
SET
(
${
var
}
"
${${
var
}}
-l
${
lib
}
"
)
ELSE
()
SET
(
${
var
}
"
${${
var
}}
-l
${
lib
}
"
)
ENDIF
()
ENDIF
()
END
IF
()
END
FOREACH
()
END
FOREACH
()
END
IF
()
IF
(
MSVC
)
STRING
(
REPLACE
"-l"
""
${
var
}
"
${${
var
}}
"
)
ENDIF
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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