summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
diff options
context:
space:
mode:
authorJustin Goshi <jgoshi@microsoft.com>2020-06-18 22:43:08 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-26 12:52:29 (GMT)
commit7d6861f367673b57bf45e14863f1104e8e28eafa (patch)
treed2964ea1261d13ca3a308a941623ccaa182eab8b /Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
parentba835874a43599bcc5ee2f8321662eb34fb341aa (diff)
downloadCMake-7d6861f367673b57bf45e14863f1104e8e28eafa.zip
CMake-7d6861f367673b57bf45e14863f1104e8e28eafa.tar.gz
CMake-7d6861f367673b57bf45e14863f1104e8e28eafa.tar.bz2
fileapi: Extend codemodel targets with language standard
Diffstat (limited to 'Tests/RunCMake/FileAPI/cxx/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/FileAPI/cxx/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
index fa51195..5758cc4 100644
--- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
@@ -19,3 +19,13 @@ target_link_options(cxx_exe PUBLIC TargetLinkOptions)
target_link_directories(cxx_exe PUBLIC "${CMAKE_BINARY_DIR}/TargetLinkDir")
target_precompile_headers(cxx_exe PUBLIC ../empty.h)
+
+add_executable(cxx_standard_exe ../empty.cxx)
+set_property(TARGET cxx_standard_exe PROPERTY CXX_STANDARD 17)
+
+add_executable(cxx_standard_compile_feature_exe ../empty.cxx)
+set_property(TARGET cxx_standard_compile_feature_exe PROPERTY CXX_STANDARD 98)
+if(CMAKE_CXX_STANDARD_DEFAULT AND DEFINED CMAKE_CXX11_STANDARD_COMPILE_OPTION)
+ target_compile_features(cxx_standard_compile_feature_exe PRIVATE cxx_std_11)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx_std_11.txt" "")
+endif()