Skip to content

Commit 9618776

Browse files
Copilotchrxh
andcommitted
Optimize CMake by replacing slow find_package(Boost) with manual target
Co-authored-by: chrxh <[email protected]>
1 parent f05cf1f commit 9618776

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ add_executable(NetworkTests)
5151
add_executable(PersisterTests)
5252

5353
find_package(CUDAToolkit)
54-
find_package(Boost REQUIRED)
54+
55+
# Create Boost::boost target manually - vcpkg already provides headers in the include path
56+
# This avoids the slow find_package(Boost) which searches extensively
57+
if(NOT TARGET Boost::boost)
58+
add_library(Boost::boost INTERFACE IMPORTED)
59+
# vcpkg toolchain already adds vcpkg_installed/x64-linux/include to include dirs
60+
endif()
61+
5562
find_package(OpenGL REQUIRED)
5663
find_package(GLEW REQUIRED)
5764
find_package(cereal CONFIG REQUIRED)

0 commit comments

Comments
 (0)