Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eos
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
eos
Commits
ba232ae0
Commit
ba232ae0
authored
Dec 10, 2016
by
Patrik Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify generator expression to one line, add to more targets
parent
ff315fba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
examples/CMakeLists.txt
examples/CMakeLists.txt
+2
-14
No files found.
examples/CMakeLists.txt
View file @
ba232ae0
...
...
@@ -29,28 +29,16 @@ else(Boost_FOUND)
message
(
FATAL_ERROR
"Boost not found"
)
endif
()
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthreads") # IF GCC OR CLANG!
# Eigen::LevenbergMarquardt probably needs -pthreads. => So eos needs pthreads! How to add in modern CMake?
# Cleaner way would be to add it to fit-model's target_link_libraries, but that requires a CMake >2.8.10.
# clang and gcc.
# Or if we include Eigen in a modern way, it may include it as a transitive dependency and the problem may go away.
# Simple model fitting (orthographic camera & shape to landmarks) example:
add_executable
(
fit-model-simple fit-model-simple.cpp
)
target_link_libraries
(
fit-model-simple eos
${
OpenCV_LIBS
}
${
Boost_LIBRARIES
}
)
target_compile_options
(
fit-model-simple PUBLIC
"$<$<CXX_COMPILER_ID:GNU>:-pthread>"
)
target_compile_options
(
fit-model-simple PUBLIC
"$<$<CXX_COMPILER_ID:Clang>:-pthreads>"
)
target_link_libraries
(
fit-model-simple
"$<$<CXX_COMPILER_ID:GNU>:-pthread> $<$<CXX_COMPILER_ID:Clang>:-pthreads>"
)
# Model fitting example that fits orthographic camera, shape, blendshapes, and contours:
add_executable
(
fit-model fit-model.cpp
)
target_link_libraries
(
fit-model eos
${
OpenCV_LIBS
}
${
Boost_LIBRARIES
}
)
target_link_libraries
(
fit-model
"$<$<CXX_COMPILER_ID:GNU>:-pthread> $<$<CXX_COMPILER_ID:Clang>:-pthreads>"
)
#target_compile_options(fit-model PUBLIC "$<$<CXX_COMPILER_ID:GNU>:-pthread>")
#target_compile_options(fit-model PUBLIC "$<$<CXX_COMPILER_ID:Clang>:-pthreads>") # => clang says this is unused during compilation!
target_link_libraries
(
fit-model
"$<$<CXX_COMPILER_ID:GNU>:-pthread>"
)
target_link_libraries
(
fit-model
"$<$<CXX_COMPILER_ID:Clang>:-pthreads>"
)
if
(
EOS_BUILD_CERES_EXAMPLE
)
# Find Ceres, for the fit-model-ceres app:
...
...
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