[mlpack-git] master: Add some paranoia: what if sizeof(void*) isn't 4? (80943dd)
gitdub at mlpack.org
gitdub at mlpack.org
Tue Mar 15 23:29:54 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/ae6689c144297a420fed1cc298ae1dcc85476829...80943dd398d652aa5ccb8461726a710d04fae925
>---------------------------------------------------------------
commit 80943dd398d652aa5ccb8461726a710d04fae925
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Mar 15 20:29:54 2016 -0700
Add some paranoia: what if sizeof(void*) isn't 4?
>---------------------------------------------------------------
80943dd398d652aa5ccb8461726a710d04fae925
CMakeLists.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 329ec01..4e4525d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,8 +150,12 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
"scale to matrices with more than 4 billion elements.")
endif(ARMA_HAS_64BIT_WORD EQUAL 0)
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
- # Adding the ARMA_32BIT_WORD preprocessor for 32 bit machines for clean build
- add_definitions(-DARMA_32BIT_WORD)
+ # If we are on a 32-bit system, we must manually specify the size of the word
+ # to be 32 bits, since otherwise Armadillo will produce a warning that it is
+ # disabling 64-bit support.
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ add_definitions(-DARMA_32BIT_WORD)
+ endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
# On Windows, Armadillo should be using LAPACK and BLAS but we still need to
More information about the mlpack-git
mailing list