summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project
diff options
context:
space:
mode:
authorJonas Fierlings <fnoegip@gmail.com>2022-07-08 11:06:48 (GMT)
committerJonas Fierlings <fnoegip@gmail.com>2022-07-08 14:47:01 (GMT)
commitd99d33d7493daa721e96de85240371bf84b9c62b (patch)
treef5c34ec16582a1526544a61c6444e17c486b78f0 /Tests/RunCMake/VS10Project
parentc4cdd7a24d3016ccf91fae26646a548b52de4a78 (diff)
downloadCMake-d99d33d7493daa721e96de85240371bf84b9c62b.zip
CMake-d99d33d7493daa721e96de85240371bf84b9c62b.tar.gz
CMake-d99d33d7493daa721e96de85240371bf84b9c62b.tar.bz2
VS: Generate IntDir property for INTERFACE libraries
This prevents MSBuild from complaining with warning MSB8028. Fixes #23043
Diffstat (limited to 'Tests/RunCMake/VS10Project')
-rw-r--r--Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake b/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
index bcdc101..1701a36 100644
--- a/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
+++ b/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
@@ -5,6 +5,7 @@ if(NOT EXISTS "${vcProjectFile}")
endif()
set(found_iface_h 0)
+set(found_int_dir 0)
file(STRINGS "${vcProjectFile}" lines)
foreach(line IN LISTS lines)
if(line MATCHES "<([A-Za-z0-9_]+) +Include=.*iface\\.h")
@@ -19,7 +20,15 @@ foreach(line IN LISTS lines)
endif()
set(found_iface_h 1)
endif()
+ if(line MATCHES "^ *<IntDir [^<>]+>[^<>]+</IntDir>")
+ set(found_int_dir 1)
+ endif()
endforeach()
if(NOT found_iface_h)
set(RunCMake_TEST_FAILED "iface.h not referenced in\n ${vcProjectFile}")
+ return()
+endif()
+if(NOT found_int_dir)
+ set(RunCMake_TEST_FAILED "No references to IntDir in\n ${vcProjectFile}")
+ return()
endif()