From 9ed077ca4a6d555ccc1c41192ecf88878e71560f Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Mon, 24 Aug 2026 20:49:39 +0200 Subject: [PATCH] Build static module library Sync CMakeLists.txt with other modules --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cc7e65..8f0e5ff8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,23 +4,23 @@ # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt -cmake_minimum_required(VERSION 3.5...4.20) +cmake_minimum_required(VERSION 3.5...4.4) + project(boost_conversion VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) -if (BOOST_USE_MODULES) - add_library(boost_conversion) +if(BOOST_USE_MODULES) + add_library(boost_conversion STATIC) target_sources(boost_conversion PUBLIC - FILE_SET modules_public - TYPE CXX_MODULES - BASE_DIRS modules - FILES ${CMAKE_CURRENT_LIST_DIR}/modules/boost_conversion.cppm + FILE_SET CXX_MODULES + BASE_DIRS modules + FILES modules/boost_conversion.cppm ) target_compile_definitions(boost_conversion PUBLIC BOOST_USE_MODULES) get_property(__standard TARGET boost_conversion PROPERTY CXX_STANDARD) - if (__standard IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD AND CMAKE_CXX_MODULE_STD) + if(__standard IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD AND CMAKE_CXX_MODULE_STD) target_compile_features(boost_conversion PUBLIC cxx_std_23) - target_compile_definitions(boost_conversion PRIVATE BOOST_CONVERSION_USE_STD_MODULE) + target_compile_definitions(boost_conversion PUBLIC BOOST_CONVERSION_USE_STD_MODULE) message(STATUS "Using `import std;`") else() target_compile_features(boost_conversion PUBLIC cxx_std_20)