summaryrefslogtreecommitdiff
path: root/Tests/ForceInclude/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ForceInclude/CMakeLists.txt')
-rw-r--r--Tests/ForceInclude/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/ForceInclude/CMakeLists.txt b/Tests/ForceInclude/CMakeLists.txt
new file mode 100644
index 000000000..5c02ebbd0
--- /dev/null
+++ b/Tests/ForceInclude/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 2.8.3.20110103)
+project(ForceInclude C)
+
+# Make sure the proper compiler is in use.
+if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+ message(FATAL_ERROR "The ForceInclude test works only with MSVC or Intel")
+endif()
+
+add_executable(foo foo.c)
+set_property(SOURCE foo.c PROPERTY COMPILE_FLAGS "/FIfoo1.h /FIfoo2.h")