summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindCompilerAttribute.cmake
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-21 16:05:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-21 16:05:55 +0200
commit5c2347eb55eb0b6d661a3efddc5e3aff93dd6c2e (patch)
tree6f61427dc5fc6879638575109d1e06ebadb60451 /cmake/Modules/FindCompilerAttribute.cmake
downloadedoors-5c2347eb55eb0b6d661a3efddc5e3aff93dd6c2e.zip
edoors-5c2347eb55eb0b6d661a3efddc5e3aff93dd6c2e.tar.gz
initial commit: project tree and cmake scripts
Diffstat (limited to 'cmake/Modules/FindCompilerAttribute.cmake')
-rw-r--r--cmake/Modules/FindCompilerAttribute.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/Modules/FindCompilerAttribute.cmake b/cmake/Modules/FindCompilerAttribute.cmake
new file mode 100644
index 0000000..6ecd6ff
--- /dev/null
+++ b/cmake/Modules/FindCompilerAttribute.cmake
@@ -0,0 +1,9 @@
+INCLUDE(CheckCSourceCompiles)
+SET(HAVE___ATTRIBUTE__)
+CHECK_C_SOURCE_COMPILES(
+ "void foo (int bar __attribute__((unused)) ) { }
+ static void baz (void) __attribute__((unused));
+ static void baz (void) { }
+ int main(){}
+ " HAVE___ATTRIBUTE__
+ )