Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ndk-platform-external-effcee
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
ndk-platform-external-effcee
Commits
5ae6e4a8
Commit
5ae6e4a8
authored
6 years ago
by
David Neto
Browse files
Options
Downloads
Patches
Plain Diff
Fix effcee-example MinGW cross-compile
For MinGW: - Don't try to use pthreads - Statically link the C++ runtime
parent
8f0a61dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+4
-0
4 additions, 0 deletions
CMakeLists.txt
cmake/utils.cmake
+3
-4
3 additions, 4 deletions
cmake/utils.cmake
examples/CMakeLists.txt
+9
-3
9 additions, 3 deletions
examples/CMakeLists.txt
with
16 additions
and
7 deletions
CMakeLists.txt
+
4
−
0
View file @
5ae6e4a8
...
...
@@ -25,6 +25,10 @@ else()
message
(
STATUS
"Configuring Effcee to avoid building samples."
)
endif
()
# RE2 needs Pthreads on non-WIN32
set
(
CMAKE_THREAD_LIBS_INIT
""
)
find_package
(
Threads
)
include
(
cmake/setup_build.cmake
)
include
(
cmake/utils.cmake
)
...
...
This diff is collapsed.
Click to expand it.
cmake/utils.cmake
+
3
−
4
View file @
5ae6e4a8
...
...
@@ -17,9 +17,6 @@
function
(
effcee_default_c_compile_options TARGET
)
if
(
NOT
"
${
MSVC
}
"
)
target_compile_options
(
${
TARGET
}
PRIVATE -Wall -Werror
)
if
(
UNIX
)
target_compile_options
(
${
TARGET
}
PUBLIC -pthread
)
endif
(
UNIX
)
if
(
ENABLE_CODE_COVERAGE
)
# The --coverage option is a synonym for -fprofile-arcs -ftest-coverage
# when compiling.
...
...
@@ -37,7 +34,9 @@ function(effcee_default_c_compile_options TARGET)
LINK_FLAGS
"-static -static-libgcc"
)
endif
(
WIN32
)
endif
(
NOT EFFCEE_ENABLE_SHARED_CRT
)
target_link_libraries
(
${
TARGET
}
PUBLIC
${
CMAKE_THREAD_LIBS_INIT
}
)
if
(
UNIX AND NOT MINGW
)
target_link_libraries
(
${
TARGET
}
PUBLIC -pthread
)
endif
()
else
()
# disable warning C4800: 'int' : forcing value to bool 'true' or 'false'
# (performance warning)
...
...
This diff is collapsed.
Click to expand it.
examples/CMakeLists.txt
+
9
−
3
View file @
5ae6e4a8
add_executable
(
effcee-example main.cc
)
target_link_libraries
(
effcee-example effcee
)
if
(
UNIX
)
target_link_libraries
(
effcee-example -pthread
)
endif
(
UNIX
)
if
(
UNIX AND NOT MINGW
)
set_target_properties
(
effcee-example PROPERTIES LINK_FLAGS -pthread
)
endif
()
if
(
WIN32 AND NOT MSVC
)
# For MinGW cross-compile, statically link to the C++ runtime
set_target_properties
(
effcee-example PROPERTIES
LINK_FLAGS
"-static -static-libgcc -static-libstdc++"
)
endif
(
WIN32 AND NOT MSVC
)
if
(
EFFCEE_BUILD_TESTING
)
add_test
(
NAME effcee-example
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment