summaryrefslogtreecommitdiffstats
path: root/Tests/LinkFlags/LinkFlagsExe.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-03 13:37:17 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-03 13:47:23 (GMT)
commitc8b13ecc380e38eda475974bc7ab515a65fe90cc (patch)
treec77b10ee6ea6f01dced7050f917f2555b727ff96 /Tests/LinkFlags/LinkFlagsExe.c
parenta9b24af25c8206c5041e2d3e44a9dd3d52fbfe92 (diff)
downloadCMake-c8b13ecc380e38eda475974bc7ab515a65fe90cc.zip
CMake-c8b13ecc380e38eda475974bc7ab515a65fe90cc.tar.gz
CMake-c8b13ecc380e38eda475974bc7ab515a65fe90cc.tar.bz2
Intel-specific workaround for LinkFlags tests
The Intel C compiler for Linux does not seem to reject any bad flags or object files on its link lines. Work around the problem by using a preprocessor #error directive to ensure that BADFLAG appears in the build output. This does not really achieve the purpose of the tests but it allows them to pass.
Diffstat (limited to 'Tests/LinkFlags/LinkFlagsExe.c')
-rw-r--r--Tests/LinkFlags/LinkFlagsExe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/LinkFlags/LinkFlagsExe.c b/Tests/LinkFlags/LinkFlagsExe.c
new file mode 100644
index 0000000..123587a
--- /dev/null
+++ b/Tests/LinkFlags/LinkFlagsExe.c
@@ -0,0 +1,6 @@
+int main(void) { return 0; }
+
+/* Intel compiler does not reject bad flags or objects! */
+#if defined(__INTEL_COMPILER)
+# error BADFLAG
+#endif