File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,27 @@ FetchContent_Declare(
4646)
4747FetchContent_MakeAvailable(argparse)
4848
49+ # Try to find Boost in the system
50+ find_package (Boost 1.65 QUIET COMPONENTS system filesystem thread)
51+
52+ if (NOT Boost_FOUND)
53+ message (STATUS "Boost not found in system, trying alternative locations..." )
54+
55+ # Try common Boost installation paths
56+ set (Boost_USE_STATIC_LIBS OFF )
57+ set (Boost_USE_MULTITHREADED ON )
58+ set (Boost_USE_STATIC_RUNTIME OFF )
59+
60+ # Try to find Boost again with more options
61+ find_package (Boost 1.65 COMPONENTS system filesystem thread)
62+
63+ if (NOT Boost_FOUND)
64+ message (FATAL_ERROR "Boost not found. Please install Boost 1.65 or later with components: system, filesystem, thread" )
65+ endif ()
66+ else ()
67+ message (STATUS "Using system Boost installation" )
68+ endif ()
69+
4970set (BUILD_TESTS OFF )
5071set (BUILD_BENCHMARKS OFF )
5172set (CUOPT_BUILD_TESTUTIL OFF )
@@ -54,6 +75,9 @@ set(CUDA_STATIC_RUNTIME ON)
5475add_subdirectory (../../cpp cuopt-cpp)
5576
5677target_link_libraries (cuopt PRIVATE argparse)
78+ if (Boost_FOUND)
79+ target_link_libraries (cuopt PRIVATE Boost::system Boost::filesystem Boost::thread)
80+ endif ()
5781target_link_libraries (cuopt_cli PRIVATE argparse)
5882
5983set (rpaths
You can’t perform that action at this time.
0 commit comments