From 08318e52ffbe1bf48932bb8e0ec075e9c2392fca Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Thu, 11 Apr 2013 02:41:56 +0000 Subject: [PATCH] fixed 32-bit linux crypto++ compile errors --- tools/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index cfa9c674..d0306fa8 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -50,9 +50,14 @@ else() add_definitions(-DCRYPTOPP_DISABLE_ASM) endif() -if (APPLE) - # osx goes bat-shit crazy if we dont use these magical arguments. - set(CMAKE_CXX_FLAGS "-O2 -DCRYPTOPP_DISABLE_ASM -pipe -Wno-tautological-compare") +if (UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -pipe") + + if (APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch i386 -Wno-tautological-compare") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() endif() add_library(cryptopp STATIC ${cpp_src})