summaryrefslogtreecommitdiff
path: root/src/components/rpc_base/test
diff options
context:
space:
mode:
authorIvo Stoilov (GitHub) <istoilov@luxoft.com>2017-01-04 12:07:16 +0200
committerGitHub <noreply@github.com>2017-01-04 12:07:16 +0200
commit15fc6572395056b43cd6fbf23737048772daa350 (patch)
treea3ad387b922123ff1d63d5ded3eac0c8535a8ccc /src/components/rpc_base/test
parent4ff12fe67f0ed15700fd030690276712ef23659d (diff)
parent22b926d4af4e4aab9ae0746d2bfd8625ceadcc9d (diff)
downloadsdl_core-15fc6572395056b43cd6fbf23737048772daa350.tar.gz
Merge pull request #1144 from istoilovgithub/fix/cmake_files_refactoring
Refactor CMake files
Diffstat (limited to 'src/components/rpc_base/test')
-rw-r--r--src/components/rpc_base/test/CMakeLists.txt31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/components/rpc_base/test/CMakeLists.txt b/src/components/rpc_base/test/CMakeLists.txt
index 76cf738f46..566f0ddcde 100644
--- a/src/components/rpc_base/test/CMakeLists.txt
+++ b/src/components/rpc_base/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2015, Ford Motor Company
+# Copyright (c) 2016, Ford Motor Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,8 +28,9 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
-if (BUILD_TESTS)
- include_directories (
+include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
+
+include_directories(
${COMPONENTS_DIR}/dbus/include
${COMPONENTS_DIR}/dbus/src
${COMPONENTS_DIR}/rpc_base/include
@@ -43,20 +44,16 @@ set(LIBRARIES
jsoncpp
)
-set(SOURCES
- rpc_base_json_test.cc
- rpc_base_test.cc
- validation_report_test.cc
-)
-
-if (${HMI_DBUS_API})
- # Build dbus tests
+if(${HMI_DBUS_API})
include_directories(${DBUS_INCLUDE_DIRS})
- set (LIBRARIES ${LIBRARIES} DBus)
- set (SOURCES ${SOURCES} rpc_base_dbus_test.cc)
-endif ()
-
-create_test("rpc_base_test" "${SOURCES}" "${LIBRARIES}")
-
+ list(APPEND LIBRARIES
+ DBus
+ )
+else()
+ set(EXCLUDE_PATHS
+ rpc_base_dbus_test.cc
+ )
endif()
+collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}" "${EXCLUDE_PATHS}")
+create_test(rpc_base_test "${SOURCES}" "${LIBRARIES}")