]> sigrok.org Git - pulseview.git/commitdiff
tests: Fix #include order.
authorUwe Hermann <redacted>
Wed, 16 Oct 2013 15:37:09 +0000 (17:37 +0200)
committerUwe Hermann <redacted>
Wed, 16 Oct 2013 15:37:09 +0000 (17:37 +0200)
<libsigrokdecode/libsigrokdecode.h> should be included first (as the
comment says), otherwise a warning can be the result (error in this
case due to -Werror usage):

[ 90%] Building CXX object test/CMakeFiles/pulseview-test.dir/data/decoder.cpp.o
In file included from /usr/include/python3.2mu/Python.h:8:0,
                 from [....]/include/libsigrokdecode/libsigrokdecode.h:25,
                 from [....]/test/data/decoder.cpp:23:
/usr/include/python3.2mu/pyconfig.h:1182:0: error: "_POSIX_C_SOURCE" redefined [-Werror]
 #define _POSIX_C_SOURCE 200112L
 ^

test/data/decoder.cpp

index 8ea5d181b73eb4f3d97ff3eab5f10500136db68e..4a74c417e0d4ac467dfbc7de2b5ac13448b09aa7 100644 (file)
@@ -18,9 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include <libsigrokdecode/libsigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include <boost/test/unit_test.hpp>
 
 #include <libsigrok/libsigrok.h>