summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake
diff options
context:
space:
mode:
authorJulien Jemine <julien.jemine@gmail.com>2020-04-28 14:55:03 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-29 11:35:57 (GMT)
commit197b4cbe186cd31a490fc3cfcaace55bd7123829 (patch)
tree92b65d5e04bfa70113bf6b39b952b8168dd2b044 /Tests/RunCMake/VS10Project/VsPlatformToolset.cmake
parent73f81c5070e7880efe5acfc1827f60524116cee1 (diff)
downloadCMake-197b4cbe186cd31a490fc3cfcaace55bd7123829.zip
CMake-197b4cbe186cd31a490fc3cfcaace55bd7123829.tar.gz
CMake-197b4cbe186cd31a490fc3cfcaace55bd7123829.tar.bz2
VS: Add option for per-target PlatformToolset
Add a `VS_PLATFORM_TOOLSET` target property to set `PlatformToolset` in the `.vcxproj` file for specific targets. Document that this is safe only when the named toolset uses the same underlying compiler as the primary toolset. Fixes: #17429
Diffstat (limited to 'Tests/RunCMake/VS10Project/VsPlatformToolset.cmake')
-rw-r--r--Tests/RunCMake/VS10Project/VsPlatformToolset.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake b/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake
new file mode 100644
index 0000000..dce9717
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake
@@ -0,0 +1,6 @@
+enable_language(CXX)
+
+add_library(NormalPlatformToolset foo.cpp)
+add_library(OverridenPlatformToolset foo.cpp)
+set_target_properties(OverridenPlatformToolset
+ PROPERTIES VS_PLATFORM_TOOLSET MyCustomToolset)