Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ target_link_libraries(boost_unordered
Boost::throw_exception
)

if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio")

if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, CONFIGURE_DEPENDS "works" on pre-3.12, because it's interpreted as a path, and doesn't do anything.

file(GLOB_RECURSE boost_unordered_IDEFILES CONFIGURE_DEPENDS include/*.hpp)
else()
file(GLOB_RECURSE boost_unordered_IDEFILES include/*.hpp)
endif()
target_sources(boost_unordered PRIVATE ${boost_unordered_IDEFILES})
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. target_sources requires 3.19, not source_group and not 3.18.

source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_unordered_IDEFILES} PREFIX "Header Files")
list(APPEND boost_unordered_IDEFILES extra/boost_unordered.natvis)
target_sources(boost_unordered PRIVATE ${boost_unordered_IDEFILES})

endif()
if(MSVC)
target_sources(boost_unordered PUBLIC extra/boost_unordered.natvis)
endif()

target_compile_features(boost_unordered INTERFACE cxx_std_11)
Expand Down