Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
6944fd32
Commit
6944fd32
authored
Jun 21, 2016
by
Edward Thomson
Committed by
GitHub
Jun 21, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3833 from pks-t/pks/msys-conditional-fpic
cmake: do not use -fPIC for MSYS2
parents
bb0edf87
b6a2fd0e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
CMakeLists.txt
+8
-6
No files found.
CMakeLists.txt
View file @
6944fd32
...
...
@@ -473,19 +473,21 @@ ELSE ()
SET
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-D_DEBUG"
)
ENDIF
()
IF
(
MINGW
)
# MinGW always does PIC and complains if we tell it
to
IF
(
MINGW
OR MSYS
)
# MinGW and MSYS always do PIC and complain if we tell them
to
STRING
(
REGEX REPLACE
"-fPIC"
""
CMAKE_SHARED_LIBRARY_C_FLAGS
"
${
CMAKE_SHARED_LIBRARY_C_FLAGS
}
"
)
# MinGW >= 3.14 uses the C99-style stdio functions
# automatically, but forks like mingw-w64 still want
# us to define this in order to use them
ADD_DEFINITIONS
(
-D__USE_MINGW_ANSI_STDIO=1
)
ELSEIF
(
BUILD_SHARED_LIBS
)
ADD_C_FLAG_IF_SUPPORTED
(
-fvisibility=hidden
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
ENDIF
()
IF
(
MINGW
)
# MinGW >= 3.14 uses the C99-style stdio functions
# automatically, but forks like mingw-w64 still want
# us to define this in order to use them
ADD_DEFINITIONS
(
-D__USE_MINGW_ANSI_STDIO=1
)
ENDIF
()
ADD_C_FLAG_IF_SUPPORTED
(
-Wdocumentation
)
ADD_C_FLAG_IF_SUPPORTED
(
-Wno-missing-field-initializers
)
ADD_C_FLAG_IF_SUPPORTED
(
-Wstrict-aliasing=2
)
...
...
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