From aae31c3c1bb6193bc05c3a39a977ebca43ae8ddf Mon Sep 17 00:00:00 2001 From: Maciej Dziuban Date: Sun, 16 Jun 2019 12:45:28 +0200 Subject: [PATCH] Add windows specific CMakeLists.txt for helpers Change-Id: I2fe16e3f95f78bc678838d6c00f89de09a1a9c5f Signed-off-by: Maciej Dziuban --- unit_tests/helpers/CMakeLists.txt | 27 ++++++++--------------- unit_tests/helpers/windows/CMakeLists.txt | 17 ++++++++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 unit_tests/helpers/windows/CMakeLists.txt diff --git a/unit_tests/helpers/CMakeLists.txt b/unit_tests/helpers/CMakeLists.txt index 3bd428cb33..988a87db08 100644 --- a/unit_tests/helpers/CMakeLists.txt +++ b/unit_tests/helpers/CMakeLists.txt @@ -56,24 +56,15 @@ set(IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/variable_backup.h ) -set(IGDRCL_SRCS_tests_helpers_windows - ${CMAKE_CURRENT_SOURCE_DIR}/windows/kmd_notify_windows_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/windows/gl_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_function.h - ${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_function.cpp -) - -set(IGDRCL_SRCS_tests_helpers_linux - ${CMAKE_CURRENT_SOURCE_DIR}/linux/kmd_notify_linux_tests.cpp -) - -if(WIN32) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers_windows}) - else() - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers_linux}) - endif() - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers}) -set_property(GLOBAL PROPERTY IGDRCL_SRCS_tests_helpers_linux ${IGDRCL_SRCS_tests_helpers_linux}) + +if(UNIX) + set(IGDRCL_SRCS_tests_helpers_linux + ${CMAKE_CURRENT_SOURCE_DIR}/linux/kmd_notify_linux_tests.cpp + ) + + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers_linux}) + set_property(GLOBAL PROPERTY IGDRCL_SRCS_tests_helpers_linux ${IGDRCL_SRCS_tests_helpers_linux}) +endif() add_subdirectories() diff --git a/unit_tests/helpers/windows/CMakeLists.txt b/unit_tests/helpers/windows/CMakeLists.txt new file mode 100644 index 0000000000..1c9cbe77d9 --- /dev/null +++ b/unit_tests/helpers/windows/CMakeLists.txt @@ -0,0 +1,17 @@ +# +# Copyright (C) 2019 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(WIN32) + set(IGDRCL_SRCS_tests_helpers_windows + ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_windows_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gl_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mock_function.h + ${CMAKE_CURRENT_SOURCE_DIR}/mock_function.cpp + ) + + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers_windows}) + add_subdirectories() +endif()