From: posial
Date: Tue, 20 Oct 2015 10:31:16 +0000 (+0200)
Subject: Cannot link boost libraries when building unit tests
X-Git-Tag: accepted/tizen/tv/20151021.013323~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F49801%2F2;p=profile%2Ftv%2Fapps%2Fweb%2Fbrowser.git
Cannot link boost libraries when building unit tests
[issue] https://bugs.tizen.org/jira/browse/TT-166
[problem] Cannot link boost libraries when building unit tests
[solution] Remove cmake variables names shadowing
[verification] build browser
Change-Id: I79e4619860ad1234d36e96240279c311086eb55d
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94aed0c..312cc7e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,16 +46,11 @@ else()
message(FATAL_ERROR "The Compiler ${CMAKE_CXX_COMPILER} doesn't support C++11")
endif()
-
-find_package(Boost 1.49.0 REQUIRED COMPONENTS
- regex
- filesystem
- system
- date_time
- )
+set(BOOST_LIBS regex filesystem system date_time)
if(BUILD_UT)
-find_package(Boost 1.49.0 REQUIRED COMPONENTS unit_test_framework)
+ set(BOOST_LIBS ${BOOST_LIBS} unit_test_framework)
ENDIF(BUILD_UT)
+find_package(Boost 1.49.9 REQUIRED COMPONENTS ${BOOST_LIBS})
#RPATH settings
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)