Hi all, I am very new to cmake and boost. Sorry if my question is basic thanks for your help in advance.
I am having trouble linking a project to boost. I am using OSX 10.12.1 I am using clion 2017.1.1 I installed boost on my machine using /bootstrap.sh --prefix=/usr/local/boost --with-libraries=filesystem,system I also tried a brew install boost also . Boost can indeed be found here *usr/local/boost/ *on my machine. I haven't had much luck getting boost to link properly. I believe the project uses the filesystem and tuple modules. I am getting this error CMake Error at CMakeLists.txt:557 (ADD_EXECUTABLE): Cannot find source file: anyExecutable.cpp >From what I have read I think that if you are using OSX that you have to use the FIND_PACKAGE command to link things properly. I suspect that the code below doesn't work because I need to properly place the exact filesystem location of the executable file created in the add_executable command. On a positive note I did get this message -- Boost version: 1.63.0 -- Found the following Boost libraries: -- program_options -- Configuring done I have tried various versions of these 2 cmakelists scripts below (A) and (B) Can anyone point me in the direction of a solution here? *A) * FIND_PACKAGE( Boost 1.63.0 COMPONENTS program_options REQUIRED ) INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ) ADD_EXECUTABLE( anyExecutable anyExecutable.cpp ) TARGET_LINK_LIBRARIES( anyExecutable ${Boost_LIBRARIES} ) B) INCLUDE_DIRECTORIES(*usr/local/boost/include/*) ADD_EXECUTABLE( * anyExecutable myMain.cpp *) TARGET_LINK_LIBRARIES( *anyExecutable usr/local/boost/lib/ *) Thanks very much for your help . Yours Sincerely Sean Wayland www.seanwayland.com
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake