Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
7b458fa3
Commit
7b458fa3
authored
Dec 04, 2019
by
Joseph Mirabel
Browse files
[CMake] Fix usage of BUILD_TESTING + target_link_libraries
parent
55c97280
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7b458fa3
...
...
@@ -59,6 +59,7 @@ include(cmake/python.cmake)
include
(
cmake/hpp.cmake
)
include
(
cmake/apple.cmake
)
include
(
cmake/ide.cmake
)
include
(
cmake/test.cmake
)
# If needed, fix CMake policy for APPLE systems
APPLY_DEFAULT_APPLE_CONFIGURATION
()
...
...
@@ -156,9 +157,7 @@ add_subdirectory(src)
if
(
BUILD_PYTHON_INTERFACE
)
add_subdirectory
(
python
)
endif
()
if
(
BUILD_TESTING
)
add_subdirectory
(
test
)
endif
()
add_subdirectory
(
test
)
pkg_config_append_libs
(
"hpp-fcl"
)
PKG_CONFIG_APPEND_BOOST_LIBS
(
thread date_time filesystem system
)
...
...
test/CMakeLists.txt
View file @
7b458fa3
config_files
(
fcl_resources/config.h
)
macro
(
add_fcl_test test_name
)
add_executable
(
${
ARGV
}
)
macro
(
add_fcl_test test_name
source
)
ADD_UNIT_TEST
(
${
test_name
}
${
source
}
)
target_link_libraries
(
${
test_name
}
PUBLIC
${
PROJECT_NAME
}
hpp-fcl
${
Boost_LIBRARIES
}
Boost::unit_test_framework
utility
)
PKG_CONFIG_USE_DEPENDENCY
(
${
test_name
}
assimp
)
add_test
(
${
test_name
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
test_name
}
)
target_compile_options
(
${
test_name
}
PRIVATE
"-Wno-c99-extensions"
)
endmacro
(
add_fcl_test
)
...
...
@@ -54,7 +53,11 @@ if(HPP_FCL_HAVE_OCTOMAP)
endif
(
HPP_FCL_HAVE_OCTOMAP
)
## Benchmark
add_executable
(
test-benchmark benchmark.cpp
)
IF
(
BUILD_TESTING
)
add_executable
(
test-benchmark benchmark.cpp
)
ELSE
()
add_executable
(
test-benchmark EXCLUDE_FROM_ALL benchmark.cpp
)
ENDIF
()
target_link_libraries
(
test-benchmark
PUBLIC
utility
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment