summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-08-02 18:06:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-08-02 18:07:13 (GMT)
commit99d3e209996caf2d07684822ed90372a7b89a166 (patch)
treeb94adb8e1678ba4e28cb98bcfd1503ccc8a38fc0 /Tests
parent9faefbc67c5b564e5c400411731aa4340ce47164 (diff)
parent53aabe9817dfad76869c41c2eeb46fb874bf188b (diff)
downloadCMake-99d3e209996caf2d07684822ed90372a7b89a166.zip
CMake-99d3e209996caf2d07684822ed90372a7b89a166.tar.gz
CMake-99d3e209996caf2d07684822ed90372a7b89a166.tar.bz2
Merge topic 'vs-iface-include-dirs'
53aabe9817 VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6411
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake7
-rw-r--r--Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake1
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake b/Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake
new file mode 100644
index 0000000..b94eac0
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0076 NEW)
+include_directories(Inc1 Inc2)
+add_library(iface INTERFACE)
+target_sources(iface PRIVATE iface.c)
+# Ensure the INCLUDE_DIRECTORIES property is populated.
+# Since interface libraries do not actually compile anything, this should be ignored.
+set_property(TARGET iface APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Inc3 ${CMAKE_CURRENT_SOURCE_DIR}/Inc4)
diff --git a/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
index 834b3c8..10a2d51 100644
--- a/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
@@ -34,3 +34,4 @@ run_WithSources(ConfigSources "build1:iface")
run_WithSources(EmptySources "build1:iface" "build2:iface2,merge")
run_WithSources(ExcludeFromAll "build1" "build2:iface" "build3:iface2,merge")
run_WithSources(PublicSources "build1" "build2:iface" "build3:iface2,merge")
+run_WithSources(IncludeDirectories "build1:iface")