Revision: 77841
http://sourceforge.net/p/brlcad/code/77841
Author: brlcad
Date: 2020-12-01 09:22:57 +0000 (Tue, 01 Dec 2020)
Log Message:
-----------
test for the flatten attribute for optimization strategies
Modified Paths:
--------------
brlcad/trunk/CMakeLists.txt
Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2020-12-01 09:22:21 UTC (rev 77840)
+++ brlcad/trunk/CMakeLists.txt 2020-12-01 09:22:57 UTC (rev 77841)
@@ -1847,6 +1847,12 @@
CONFIG_H_APPEND(BRLCAD "#define HAVE_WARN_UNUSED_RESULT_ATTRIBUTE 1\n")
endif(HAVE_WARN_UNUSED_RESULT_ATTRIBUTE)
+# Check whether the compiler supports __attribute__((flatten))
+check_c_source_compiles("__attribute__((flatten)) int *func(int *v){(*v)-=1;
return v;} __attribute((flatten)) int main(int argc, char *argv[]) {int v = 1;
int *vp = func(&v); return *vp;}" HAVE_FLATTEN_ATTRIBUTE)
+if(HAVE_FLATTEN_ATTRIBUTE)
+ CONFIG_H_APPEND(BRLCAD "#define HAVE_FLATTEN_ATTRIBUTE 1\n")
+endif(HAVE_FLATTEN_ATTRIBUTE)
+
# Silence check for unused arguments (used to silence clang warnings about
# unused options on the command line). By default clang generates a lot of
# warnings about such arguments, and we don't really care.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits