aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-10 09:03:04 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-10 09:03:04 -0800
commit6fc7d224e73d0e9fac1fdb70c3f45a4553edfba6 (patch)
treedfc61aff154bda74d37d0f2a1c5d5a757686369b /paludis
parent1384fabf24d96769c754bdadb5f11db1afb3c8aa (diff)
downloadpaludis-6fc7d224e73d0e9fac1fdb70c3f45a4553edfba6.tar.gz
paludis-6fc7d224e73d0e9fac1fdb70c3f45a4553edfba6.tar.xz
build: resolvertest uses google-test, SE source dependency
The test was previously built as part of the check target, which hid the fact that it was not conditionalised on gtest tests being enabled. Add the guard for that. Add a dependency on libpaludisutil_SE on the support library. It uses path-se.hh.
Diffstat (limited to 'paludis')
-rw-r--r--paludis/resolver/CMakeLists.txt64
1 files changed, 33 insertions, 31 deletions
diff --git a/paludis/resolver/CMakeLists.txt b/paludis/resolver/CMakeLists.txt
index c3ea17ecc..94ad7847f 100644
--- a/paludis/resolver/CMakeLists.txt
+++ b/paludis/resolver/CMakeLists.txt
@@ -90,37 +90,39 @@ target_link_libraries(libpaludisresolver
INTERFACE
${CMAKE_THREAD_LIBS_INIT})
-paludis_add_library(libpaludisresolvertest
- STATIC
- "${CMAKE_CURRENT_SOURCE_DIR}/resolver_test.cc")
-# TODO(compnerd) create an object library for the SE_SOURCES that we can depend
-# on instead
-add_dependencies(libpaludisresolvertest libpaludisresolver_SE)
+if(ENABLE_GTEST)
+ paludis_add_library(libpaludisresolvertest
+ STATIC
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolver_test.cc")
+ # TODO(compnerd) create an object library for the SE_SOURCES that we can depend
+ # on instead
+ add_dependencies(libpaludisresolvertest libpaludisresolver_SE libpaludisutil_SE)
-foreach(test
- any
- binaries
- continue_on_failure
- errors
- fetches
- purges
- blockers
- cycles
- serialisation
- simple
- subslots
- suggestions
- uninstalls)
- paludis_add_test(resolver_TEST_${test} GTEST
- LINK_LIBRARIES
- libpaludisresolvertest
- libpaludisresolver
- libpaludisutil)
-endforeach()
-if(ENABLE_PBINS)
- paludis_add_test(resolver_TEST_promote_binaries GTEST
- LINK_LIBRARIES
- libpaludisresolvertest
- libpaludisresolver)
+ foreach(test
+ any
+ binaries
+ continue_on_failure
+ errors
+ fetches
+ purges
+ blockers
+ cycles
+ serialisation
+ simple
+ subslots
+ suggestions
+ uninstalls)
+ paludis_add_test(resolver_TEST_${test} GTEST
+ LINK_LIBRARIES
+ libpaludisresolvertest
+ libpaludisresolver
+ libpaludisutil)
+ endforeach()
+ if(ENABLE_PBINS)
+ paludis_add_test(resolver_TEST_promote_binaries GTEST
+ LINK_LIBRARIES
+ libpaludisresolvertest
+ libpaludisresolver)
+ endif()
endif()