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
Gabriele Buondonno
pinocchio
Commits
25f035f5
Commit
25f035f5
authored
Mar 30, 2016
by
Justin Carpentier
Browse files
[CMake] Add BUILD_UNIT_TESTS as option
parent
1247fe01
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
25f035f5
...
...
@@ -47,6 +47,7 @@ ENDIF(WIN32)
# --- OPTIONS ----------------------------------------
OPTION
(
BUILD_BENCHMARK
"Build the benchmarks"
OFF
)
OPTION
(
BUILD_UNIT_TESTS
"Build the unitary tests"
ON
)
OPTION
(
BUILD_UTILS
"Build the utils"
OFF
)
OPTION
(
INITIALIZE_WITH_NAN
"Initialize Eigen entries with NaN"
OFF
)
OPTION
(
BUILD_TESTS_WITH_HPP
"Build geom tests and benchmarks with hpp to do comparisons"
OFF
)
...
...
travis_custom/custom_build
View file @
25f035f5
...
...
@@ -6,7 +6,7 @@ set -x
set
-v
# Setup environment variables.
export
CMAKE_ADDITIONAL_OPTIONS
=
"
${
CMAKE_ADDITIONAL_OPTIONS
}
-DBUILD_BENCHMARK=
\"
ON
\"
-D
COMP
IL
E
_UNIT_TESTS=
1
"
export
CMAKE_ADDITIONAL_OPTIONS
=
"
${
CMAKE_ADDITIONAL_OPTIONS
}
-DBUILD_BENCHMARK=
\"
ON
\"
-D
BU
IL
D
_UNIT_TESTS=
\"
ON
\"
"
export
PKG_CONFIG_PATH
=
"
${
PKG_CONFIG_PATH
}
:/opt/openrobots/lib/pkgconfig"
export
LD_LIBRARY_PATH
=
"
${
LD_LIBRARY_PATH
}
:/opt/openrobots/lib"
# Setup environment variables.
...
...
unittest/CMakeLists.txt
View file @
25f035f5
...
...
@@ -19,11 +19,11 @@
# --- MACROS ------------------------------------------------------------------
# --- MACROS ------------------------------------------------------------------
MACRO
(
ADD_UNIT_TEST NAME PKGS
)
IF
(
COMP
IL
E
_UNIT_TESTS
)
IF
(
BU
IL
D
_UNIT_TESTS
)
ADD_EXECUTABLE
(
${
NAME
}
${
NAME
}
)
ELSE
(
COMP
IL
E
_UNIT_TESTS
)
ELSE
(
BU
IL
D
_UNIT_TESTS
)
ADD_EXECUTABLE
(
${
NAME
}
EXCLUDE_FROM_ALL
${
NAME
}
)
ENDIF
(
COMP
IL
E
_UNIT_TESTS
)
ENDIF
(
BU
IL
D
_UNIT_TESTS
)
FOREACH
(
PKG
${
PKGS
}
)
PKG_CONFIG_USE_DEPENDENCY
(
${
NAME
}
${
PKG
}
)
ENDFOREACH
(
PKG
)
...
...
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