Skip to content
Merged
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
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment thread
apolukhin marked this conversation as resolved.
message(STATUS "Using `import std;`")
else()
target_compile_features(boost_conversion PUBLIC cxx_std_20)
Expand Down
Loading