Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
4376ebac
Commit
4376ebac
authored
Dec 10, 2015
by
Jiri Hoogland
Committed by
Jesse Beder
Jan 10, 2016
Browse files
Add PIC compile flag for GNU/CLang.
- ensures shared library code is position-independent.
parent
b57efe94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
CMakeLists.txt
CMakeLists.txt
+4
-0
No files found.
CMakeLists.txt
View file @
4376ebac
...
...
@@ -171,6 +171,10 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
#
set
(
GCC_EXTRA_OPTIONS
""
)
#
if
(
BUILD_SHARED_LIBS
)
set
(
GCC_EXTRA_OPTIONS
"
${
GCC_EXTRA_OPTIONS
}
-fPIC"
)
endif
()
#
set
(
FLAG_TESTED
"-Wextra"
)
check_cxx_compiler_flag
(
${
FLAG_TESTED
}
FLAG_WEXTRA
)
if
(
FLAG_WEXTRA
)
...
...
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