Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
a6c71d85
Commit
a6c71d85
authored
Jul 7, 2016
by
Sam Yates
Browse files
Options
Downloads
Patches
Plain Diff
Use one gtest lib for test subdirectories
parent
b313a6b4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/CMakeLists.txt
+5
-3
5 additions, 3 deletions
tests/CMakeLists.txt
tests/unit/CMakeLists.txt
+0
-3
0 additions, 3 deletions
tests/unit/CMakeLists.txt
tests/validation/CMakeLists.txt
+1
-4
1 addition, 4 deletions
tests/validation/CMakeLists.txt
with
6 additions
and
10 deletions
tests/CMakeLists.txt
+
5
−
3
View file @
a6c71d85
...
@@ -16,8 +16,10 @@
...
@@ -16,8 +16,10 @@
#add_subdirectory(regression)
#add_subdirectory(regression)
# google test framework
# google test framework
# This fails with lots of undefined reference to `testing::UnitTest::Run()'
add_library
(
gtest gtest-all.cpp
)
#add_library(GTEST gtest-all.cpp gtest.h)
# tests look for gtest.h here
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
# Unit tests
# Unit tests
add_subdirectory
(
unit
)
add_subdirectory
(
unit
)
...
...
This diff is collapsed.
Click to expand it.
tests/unit/CMakeLists.txt
+
0
−
3
View file @
a6c71d85
...
@@ -8,9 +8,6 @@ set(HEADERS
...
@@ -8,9 +8,6 @@ set(HEADERS
${
PROJECT_SOURCE_DIR
}
/src/tree.hpp
${
PROJECT_SOURCE_DIR
}
/src/tree.hpp
)
)
# google test framework
add_library
(
gtest gtest-all.cpp gtest.h
)
set
(
TEST_SOURCES
set
(
TEST_SOURCES
# unit tests
# unit tests
test_algorithms.cpp
test_algorithms.cpp
...
...
This diff is collapsed.
Click to expand it.
tests/validation/CMakeLists.txt
+
1
−
4
View file @
a6c71d85
...
@@ -23,9 +23,6 @@ set(VALIDATION_SOURCES
...
@@ -23,9 +23,6 @@ set(VALIDATION_SOURCES
validate.cpp
validate.cpp
)
)
# google test framework
add_library
(
gtest_validate gtest-all.cpp gtest.h
)
add_definitions
(
"-DDATADIR=
\"
${
CMAKE_SOURCE_DIR
}
/data
\"
"
)
add_definitions
(
"-DDATADIR=
\"
${
CMAKE_SOURCE_DIR
}
/data
\"
"
)
add_executable
(
validate.exe
${
VALIDATION_SOURCES
}
${
HEADERS
}
)
add_executable
(
validate.exe
${
VALIDATION_SOURCES
}
${
HEADERS
}
)
...
@@ -33,7 +30,7 @@ add_executable(validate.exe ${VALIDATION_SOURCES} ${HEADERS})
...
@@ -33,7 +30,7 @@ add_executable(validate.exe ${VALIDATION_SOURCES} ${HEADERS})
set
(
TARGETS validate.exe
)
set
(
TARGETS validate.exe
)
foreach
(
target
${
TARGETS
}
)
foreach
(
target
${
TARGETS
}
)
target_link_libraries
(
${
target
}
LINK_PUBLIC cellalgo gtest
_validate
)
target_link_libraries
(
${
target
}
LINK_PUBLIC cellalgo gtest
)
if
(
WITH_TBB
)
if
(
WITH_TBB
)
target_link_libraries
(
${
target
}
LINK_PUBLIC
${
TBB_LIBRARIES
}
)
target_link_libraries
(
${
target
}
LINK_PUBLIC
${
TBB_LIBRARIES
}
)
...
...
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
sign in
to comment