From 0c0753602286bbf2ce89a2ed8c7acd7db2dfbc7c Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 周一, 11 8月 2014 06:39:59 +0800
Subject: [PATCH] add boost

---
 CMakeLists.txt |   31 ++++++++++++-------------------
 1 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4a22b1..e9e4051 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,6 @@
 endif(WIN32)
 
 
-
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
   SET(HAVE_64BIT_SIZE_T 1)
 else(CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -47,18 +46,14 @@
 endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
 set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
 
-#find_package(CryptoPP REQUIRED)
-#include_directories(${CRYPTOPP_INCLUDE_DIRS})
-#link_directories ( ${Boost_LIBRARY_DIRS} )
-
-
+#TODO: determine target arch.
+SET( TargetArchitecture "X86_64")
 SET(Boost_USE_STATIC_LIBS ON)
+include(add_boost)
 # static runtime requires /MT 
 #SET(Boost_USE_MULTITHREADED ON) #SET(Boost_USE_STATIC_RUNTIME OFF)
 #find_package(Boost COMPONENTS thread date_time program_options filesystem system regex unit_test_framework)
-find_package(Boost COMPONENTS date_time program_options filesystem system unit_test_framework)
-#include_directories(${Boost_INCLUDE_DIRS})
-#link_directories ( ${Boost_LIBRARY_DIRS} )
+#find_package(Boost COMPONENTS date_time program_options filesystem system unit_test_framework)
 
 
 if(NOT WIN32)	
@@ -110,16 +105,14 @@
 
 add_subdirectory(src)
 
-#test are done with boost_tests:disable them if boost not found.
-IF(Boost_FOUND)
-	ENABLE_TESTING()
-	INCLUDE(CTest)
-	IF(BUILD_TESTING)
-	  SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
-	  MARK_AS_ADVANCED(BUILDNAME)
-	ENDIF(BUILD_TESTING)
-	add_subdirectory(test)
-ENDIF(Boost_FOUND)
+ENABLE_TESTING()
+INCLUDE(CTest)
+IF(BUILD_TESTING)
+  SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
+  MARK_AS_ADVANCED(BUILDNAME)
+ENDIF(BUILD_TESTING)
+add_subdirectory(test)
+
 
 #include(build/modules/CmakeDebugVariables.txt)
 

--
Gitblit v1.9.1