gnucash maint: CMake: Test for & set WORDS_BIGENDIAN, set _GNU_SOURCE.
John Ralls
jralls at code.gnucash.org
Mon Sep 17 20:43:25 EDT 2018
Updated via https://github.com/Gnucash/gnucash/commit/766dc9b2 (commit)
from https://github.com/Gnucash/gnucash/commit/586cd704 (commit)
commit 766dc9b2d5cee4810a2d3a3b85091e1934f3d19f
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Sep 8 13:53:25 2018 -0700
CMake: Test for & set WORDS_BIGENDIAN, set _GNU_SOURCE.
Got lost in transition from autotools.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2ecf7d..05d426c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,7 @@ include (GncAddGSchemaTargets)
include (GncAddTest)
include (MakeDistFiles)
include (GNUInstallDirs)
+include (TestBigEndian)
# ############################################################
# These options are settable from the CMake command line. For example, to disable
@@ -545,6 +546,7 @@ check_c_compiler_flag(-Wstringop-truncation have_stringop_truncation)
if (have_stringop_truncation)
set(HAVE_STRINGOP_TRUNCATION TRUE)
endif()
+add_definitions(-D_GNU_SOURCE)
if (APPLE)
include (CheckCXXCompilerFlag)
@@ -688,6 +690,11 @@ check_include_files (unistd.h HAVE_UNISTD_H)
check_include_files (utmp.h HAVE_UTMP_H)
check_include_files (wctype.h HAVE_WCTYPE_H)
+test_big_endian(IS_BIGENDIAN)
+if (IS_BIGENDIAN)
+ set(WORDS_BIGENDIAN)
+endif (IS_BIGENDIAN)
+
if (NOT DISABLE_NLS)
set(ENABLE_NLS 1)
endif(NOT DISABLE_NLS)
Summary of changes:
CMakeLists.txt | 7 +++++++
1 file changed, 7 insertions(+)
More information about the gnucash-changes
mailing list