summaryrefslogtreecommitdiffstats
path: root/Tests/FindGTK2/gtkmm
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-25 13:19:33 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-25 13:19:33 (GMT)
commitc41b9dc7b5d9e38ec89c5865ee7a8d6409ad4dea (patch)
tree2aa5749aa8ee7ff273deef4bd3ba306a9cd52e6c /Tests/FindGTK2/gtkmm
parent484d7ca0e0660f3a5573e83c917f8a7dc6c4e183 (diff)
downloadCMake-c41b9dc7b5d9e38ec89c5865ee7a8d6409ad4dea.zip
CMake-c41b9dc7b5d9e38ec89c5865ee7a8d6409ad4dea.tar.gz
CMake-c41b9dc7b5d9e38ec89c5865ee7a8d6409ad4dea.tar.bz2
Tests: Fix GTK2Components.gtkmm test with sigc++ >= 2.5.1
FindGTK2 adds compile features to GTK2::sigc++ so that clients will compile as C++11 or above. However, our test case covers using just the library list variables instead of the imported targets. Fix this case by propagating the compile features manually.
Diffstat (limited to 'Tests/FindGTK2/gtkmm')
-rw-r--r--Tests/FindGTK2/gtkmm/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/FindGTK2/gtkmm/CMakeLists.txt b/Tests/FindGTK2/gtkmm/CMakeLists.txt
index 32aafe2..eb0b7aa 100644
--- a/Tests/FindGTK2/gtkmm/CMakeLists.txt
+++ b/Tests/FindGTK2/gtkmm/CMakeLists.txt
@@ -12,3 +12,8 @@ target_link_libraries(gtkmm-target GTK2::gtkmm)
add_executable(gtkmm-all-libs WIN32 main.cpp helloworld.cpp helloworld.h)
target_link_libraries(gtkmm-all-libs ${GTK2_LIBRARIES})
target_include_directories(gtkmm-all-libs PRIVATE ${GTK2_INCLUDE_DIRS})
+
+# Linking via the library variables does not cause compile feature
+# requirements to propagate. Do it manually for purposes of this test.
+get_property(features TARGET GTK2::sigc++ PROPERTY INTERFACE_COMPILE_FEATURES)
+set_property(TARGET gtkmm-all-libs PROPERTY COMPILE_FEATURES ${features})