On Sat, Dec 3, 2011 at 10:54 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> Thanks for the tip. The only issues are with the tests.
> And it should work as well since Boost is installed.
>
> But somehow the prefix for Boost is not added properly
> (/opt/local/include).
>
> [ 95%] Building CXX object test/CMakeFiles/test_libftdi.dir/basic.cpp.o
> cd /Users/xiaofanc/work/libftdi/libftdi/build/test && /usr/bin/c++
> -DDEBUG -g -I/Users/xiaofanc/work/libftdi/libftdi/src
> -I/usr/local/include/libusb-1.0 -Wall -o
> CMakeFiles/test_libftdi.dir/basic.cpp.o -c
> /Users/xiaofanc/work/libftdi/libftdi/test/basic.cpp
> /Users/xiaofanc/work/libftdi/libftdi/test/basic.cpp:17:36: error:
> boost/test/unit_test.hpp: No such file or directory
> ..
Just need to change one line will solve the issue.
Xiaofans-Mac-mini:libftdi xiaofanc$ git diff
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 424cbca..8737f66 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -8,7 +8,7 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
enable_testing()
- INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src)
+ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS})
set(cpp_tests
basic.cpp
--
Xiaofan
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|