blob: 7677082888304505ead7d6b6fd5c30a1bc613467 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From 39cff3dd6b5d9ebcf86f01e2c7e0bef62abd9d6f Mon Sep 17 00:00:00 2001
From: Alexander Tsoy <alexander@tsoy.me>
Date: Thu, 25 Jun 2020 11:35:04 +0300
Subject: [PATCH 1/2] test: fix includetest to use CMAKE_MAKE_PROGRAM (#431)
includetest currently fais if, for example, ninja is used as a CMake
generator. Fix it by using CMAKE_MAKE_PROGRAM in the test.
---
CMakeLists.txt | 2 +-
test/includetest.sh | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b6228a2..290deb38 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -680,7 +680,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS)
add_test(NAME cargs COMMAND test_cargstest)
if(UNIX)
- add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
+ add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM})
endif(UNIX)
if(FOUND_LIBJPEG_TURBO)
add_test(NAME turbojpeg COMMAND test_tjunittest)
diff --git a/test/includetest.sh b/test/includetest.sh
index 23d602e6..6b064208 100755
--- a/test/includetest.sh
+++ b/test/includetest.sh
@@ -5,10 +5,11 @@
# expects install prefix like /usr as an argument
PREFIX=$1
+CMAKE_MAKE_PROGRAM=$2
TMPDIR=$(mktemp -d)
-make install DESTDIR=$TMPDIR
+DESTDIR="$TMPDIR" $CMAKE_MAKE_PROGRAM install
echo \
"
@@ -19,6 +20,6 @@ int main()
{
return 0;
}
-" > $TMPDIR/includetest.c
+" > "$TMPDIR"/includetest.c
-cc -I $TMPDIR/$PREFIX $TMPDIR/includetest.c
+cc -I "$TMPDIR/$PREFIX" "$TMPDIR"/includetest.c
--
2.26.2
|