| 1 |
#Copyright (c) Microsoft. All rights reserved. |
| 2 |
#Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| 3 |
|
| 4 |
cmake_minimum_required (VERSION 3.5) |
| 5 |
|
| 6 |
set(theseTestsName uniqueid_ut) |
| 7 |
|
| 8 |
if(WIN32) |
| 9 |
set(uniqueid_ut_test_file ${theseTestsName}_win32) |
| 10 |
generate_cppunittest_wrapper(${uniqueid_ut_test_file}) |
| 11 |
else() |
| 12 |
set(uniqueid_ut_test_file ${theseTestsName}_linux) |
| 13 |
generate_cppunittest_wrapper(${uniqueid_ut_test_file}) |
| 14 |
endif() |
| 15 |
|
| 16 |
|
| 17 |
set(${uniqueid_ut_test_file}_c_files |
| 18 |
${UNIQUEID_C_FILE} |
| 19 |
) |
| 20 |
|
| 21 |
set(${uniqueid_ut_test_file}_h_files |
| 22 |
) |
| 23 |
|
| 24 |
if(APPLE) |
| 25 |
find_package(PkgConfig REQUIRED) |
| 26 |
pkg_search_module(UUID REQUIRED uuid) |
| 27 |
endif() |
| 28 |
|
| 29 |
if(WIN32) |
| 30 |
build_c_test_artifacts(${uniqueid_ut_test_file} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS rpcrt4.lib) |
| 31 |
elseif(UNIX) |
| 32 |
if(APPLE) |
| 33 |
build_c_test_artifacts(${uniqueid_ut_test_file} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS -L${UUID_LIBRARY_DIRS} ${UUID_LIBRARIES}) |
| 34 |
else() |
| 35 |
build_c_test_artifacts(${uniqueid_ut_test_file} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS uuid) |
| 36 |
endif() |
| 37 |
endif() |
| 38 |
|
| 39 |
compile_c_test_artifacts_as(${uniqueid_ut_test_file} C99) |