summarylogtreecommitdiffstats
path: root/0006-cmake-explicitly-link-test-with-gtest.patch
blob: c8c5bf6ba744122b2ad2c833ebd06ba7588f4136 (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
From 9ebb73009ab9438d670fde2f441dcbff1047af1c Mon Sep 17 00:00:00 2001
From: Xiretza <xiretza@xiretza.xyz>
Date: Sat, 4 Jun 2022 20:48:31 +0200
Subject: [PATCH 6/9] cmake: explicitly link test with gtest

With external (distro) gtest, this avoids an error along the lines of
"DSO missing from command line".

Signed-off-by: Xiretza <xiretza@xiretza.xyz>
---
 src/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 92d7938..f407785 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -108,6 +108,7 @@ add_executable(parse_fasm_tests
   ${ANTLR_FasmParser_CXX_OUTPUTS})
 target_link_libraries(parse_fasm_tests ${ANTLR4_RUNTIME})
 target_link_libraries(parse_fasm_tests gtest_main)
+target_link_libraries(parse_fasm_tests gtest)
 #target_compile_options(parse_fasm_tests PRIVATE -Wno-attributes) # Disable warning from antlr4-runtime
 
 # Standalone executable
-- 
2.36.1