From 5970659e51873e4c43951d872ddf801b17633ccf Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 15 Oct 2024 15:21:58 +0200 Subject: [PATCH] CML: Add project to IDEs (#1209) Make IDEs show the headers as a separate target. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c4fc1ddc8..7965bd1ea9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,10 @@ add_library(boost_math INTERFACE) add_library(Boost::math ALIAS boost_math) target_include_directories(boost_math INTERFACE include) +if(NOT CMAKE_VERSION VERSION_LESS "3.19") + file(GLOB_RECURSE headers include/*.hpp) + target_sources(boost_math PRIVATE ${headers}) +endif() include(CMakeDependentOption)