Skip to content

Commit 42ac500

Browse files
authored
Use CMake code from Boost.Assert to group the source files nicely in Visual Studio (#33)
1 parent 6e51886 commit 42ac500

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
2929
add_subdirectory(test)
3030

3131
endif()
32+
33+
if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio")
34+
35+
file(GLOB_RECURSE boost_bloom_IDEFILES CONFIGURE_DEPENDS "include/**/*.hpp")
36+
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_bloom_IDEFILES} PREFIX "Header Files")
37+
list(APPEND boost_bloom_IDEFILES extra/boost_bloom.natvis)
38+
target_sources(boost_bloom PRIVATE ${boost_bloom_IDEFILES})
39+
40+
endif()

0 commit comments

Comments
 (0)