summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Import
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-17 18:23:40 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:07 (GMT)
commit9eaf3755987821080908a289cefbf546773071f9 (patch)
treece0e87471b4a2b280c3360234ae31ab50be32149 /Tests/ExportImport/Import
parent8ed59fc207fd028d5b2b1f8cb8a323291ef04ffc (diff)
downloadCMake-9eaf3755987821080908a289cefbf546773071f9.zip
CMake-9eaf3755987821080908a289cefbf546773071f9.tar.gz
CMake-9eaf3755987821080908a289cefbf546773071f9.tar.bz2
Export: Populate INTERFACE_COMPILE_FEATURES property.
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r--Tests/ExportImport/Import/CMakeLists.txt1
-rw-r--r--Tests/ExportImport/Import/Interface/CMakeLists.txt17
2 files changed, 18 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt
index 5e809a2..189f7a2 100644
--- a/Tests/ExportImport/Import/CMakeLists.txt
+++ b/Tests/ExportImport/Import/CMakeLists.txt
@@ -1,4 +1,5 @@
cmake_minimum_required (VERSION 2.7.20090711)
+cmake_policy(SET CMP0025 NEW)
project(Import C CXX)
# Import everything in a subdirectory.
diff --git a/Tests/ExportImport/Import/Interface/CMakeLists.txt b/Tests/ExportImport/Import/Interface/CMakeLists.txt
index cf7e2bc..1f30c67 100644
--- a/Tests/ExportImport/Import/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Import/Interface/CMakeLists.txt
@@ -40,6 +40,23 @@ macro(do_try_compile prefix)
if(NOT ${prefix}IFACE_TRY_COMPILE)
message(SEND_ERROR "${prefix} try_compile with IMPORTED INTERFACE target failed!\n\n${OUTPUT}")
endif()
+
+ if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_auto_type;")
+ set(CMAKE_REQUIRED_LIBRARIES ${prefix}::use_auto_type)
+ check_cxx_source_compiles(
+ "
+ int main(int,char**)
+ {
+ auto value = 0;
+ return value;
+ }
+ " ${prefix}IMPORTED_IFACE_CONSTEXPR)
+
+ if(NOT ${prefix}IMPORTED_IFACE_CONSTEXPR)
+ message(SEND_ERROR "${prefix} try_compile with IMPORTED INTERFACE target failed!\n\n${OUTPUT}")
+ endif()
+ endif()
+
endmacro()
do_try_compile(bld)