From 16f58234f3194339c0a8383229bfa99726733f97 Mon Sep 17 00:00:00 2001 From: mojo3141 Date: Sun, 17 Jul 2022 15:40:18 +0100 Subject: [PATCH] Fix build on ubuntu 18.04 as per example https://stackoverflow.com/questions/59856505/cannot-specify-compile-options-for-imported-target tried latest cmake too, but that did not seem to help. --- src/pipemode_op/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipemode_op/test/CMakeLists.txt b/src/pipemode_op/test/CMakeLists.txt index 61c5473..7931efe 100644 --- a/src/pipemode_op/test/CMakeLists.txt +++ b/src/pipemode_op/test/CMakeLists.txt @@ -42,7 +42,7 @@ set_target_properties(libgtest PROPERTIES "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}" ) -target_compile_options(libgtest INTERFACE -D_GLIBCXX_USE_CXX11_ABI=1) +set_property(TARGET libgtest PROPERTY INTERFACE_COMPILE_OPTIONS -D_GLIBCXX_USE_CXX11_ABI=1) # Create a libgmock target to be used as a dependency by test programs add_library(libgmock IMPORTED STATIC GLOBAL)