+52
-44
lines changedFilter options
+52
-44
lines changed Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1
-
cmake_minimum_required(VERSION 3.8...3.26)
1
+
cmake_minimum_required(VERSION 3.8...3.28)
2
2
3
3
# Fallback for using newer policies on CMake <3.12.
4
4
if (${CMAKE_VERSION} VERSION_LESS 3.12)
@@ -62,48 +62,52 @@ function(add_module_library name)
62
62
target_compile_options(${name} PUBLIC -fmodules-ts)
63
63
endif ()
64
64
65
-
# `std` is affected by CMake options and may be higher than C++20.
66
-
get_target_property(std ${name} CXX_STANDARD)
67
-
68
-
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
69
-
set(pcms)
70
-
foreach (src ${sources})
71
-
get_filename_component(pcm ${src} NAME_WE)
72
-
set(pcm ${pcm}.pcm)
73
-
74
-
# Propagate -fmodule-file=*.pcm to targets that link with this library.
75
-
target_compile_options(
76
-
${name} PUBLIC -fmodule-file=${CMAKE_CURRENT_BINARY_DIR}/${pcm})
77
-
78
-
# Use an absolute path to prevent target_link_libraries prepending -l
79
-
# to it.
80
-
set(pcms ${pcms} ${CMAKE_CURRENT_BINARY_DIR}/${pcm})
81
-
add_custom_command(
82
-
OUTPUT ${pcm}
83
-
COMMAND ${CMAKE_CXX_COMPILER}
84
-
-std=c++${std} -x c++-module --precompile -c
85
-
-o ${pcm} ${CMAKE_CURRENT_SOURCE_DIR}/${src}
86
-
"-I$<JOIN:$<TARGET_PROPERTY:${name},INCLUDE_DIRECTORIES>,;-I>"
87
-
# Required by the -I generator expression above.
88
-
COMMAND_EXPAND_LISTS
89
-
DEPENDS ${src})
90
-
endforeach ()
91
-
92
-
# Add .pcm files as sources to make sure they are built before the library.
93
-
set(sources)
94
-
foreach (pcm ${pcms})
95
-
get_filename_component(pcm_we ${pcm} NAME_WE)
96
-
set(obj ${pcm_we}.o)
97
-
# Use an absolute path to prevent target_link_libraries prepending -l.
98
-
set(sources ${sources} ${pcm} ${CMAKE_CURRENT_BINARY_DIR}/${obj})
99
-
add_custom_command(
100
-
OUTPUT ${obj}
101
-
COMMAND ${CMAKE_CXX_COMPILER} $<TARGET_PROPERTY:${name},COMPILE_OPTIONS>
102
-
-c -o ${obj} ${pcm}
103
-
DEPENDS ${pcm})
104
-
endforeach ()
105
-
endif ()
106
-
target_sources(${name} PRIVATE ${sources})
65
+
if (CMAKE_VERSION VERSION_LESS 3.28)
66
+
# `std` is affected by CMake options and may be higher than C++20.
67
+
get_target_property(std ${name} CXX_STANDARD)
68
+
69
+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
70
+
set(pcms)
71
+
foreach (src ${sources})
72
+
get_filename_component(pcm ${src} NAME_WE)
73
+
set(pcm ${pcm}.pcm)
74
+
75
+
# Propagate -fmodule-file=*.pcm to targets that link with this library.
76
+
target_compile_options(
77
+
${name} PUBLIC -fmodule-file=${CMAKE_CURRENT_BINARY_DIR}/${pcm})
78
+
79
+
# Use an absolute path to prevent target_link_libraries prepending -l
80
+
# to it.
81
+
set(pcms ${pcms} ${CMAKE_CURRENT_BINARY_DIR}/${pcm})
82
+
add_custom_command(
83
+
OUTPUT ${pcm}
84
+
COMMAND ${CMAKE_CXX_COMPILER}
85
+
-std=c++${std} -x c++-module --precompile -c
86
+
-o ${pcm} ${CMAKE_CURRENT_SOURCE_DIR}/${src}
87
+
"-I$<JOIN:$<TARGET_PROPERTY:${name},INCLUDE_DIRECTORIES>,;-I>"
88
+
# Required by the -I generator expression above.
89
+
COMMAND_EXPAND_LISTS
90
+
DEPENDS ${src})
91
+
endforeach ()
92
+
93
+
# Add .pcm files as sources to make sure they are built before the library.
94
+
set(sources)
95
+
foreach (pcm ${pcms})
96
+
get_filename_component(pcm_we ${pcm} NAME_WE)
97
+
set(obj ${pcm_we}.o)
98
+
# Use an absolute path to prevent target_link_libraries prepending -l.
99
+
set(sources ${sources} ${pcm} ${CMAKE_CURRENT_BINARY_DIR}/${obj})
100
+
add_custom_command(
101
+
OUTPUT ${obj}
102
+
COMMAND ${CMAKE_CXX_COMPILER} $<TARGET_PROPERTY:${name},COMPILE_OPTIONS>
103
+
-c -o ${obj} ${pcm}
104
+
DEPENDS ${pcm})
105
+
endforeach ()
106
+
endif ()
107
+
target_sources(${name} PRIVATE ${sources})
108
+
else()
109
+
target_sources(${name} PUBLIC FILE_SET CXX_MODULES FILES ${sources})
110
+
endif()
107
111
endfunction()
108
112
109
113
include(CMakeParseArguments)
Original file line number Diff line number Diff line change
@@ -1069,6 +1069,8 @@ template <typename Locale> class format_facet : public Locale::facet {
1069
1069
}
1070
1070
};
1071
1071
1072
+
FMT_END_EXPORT
1073
+
1072
1074
namespace detail {
1073
1075
1074
1076
// Returns true if value is negative, false otherwise.
@@ -3865,6 +3867,7 @@ FMT_API void report_error(format_func func, int error_code,
3865
3867
const char* message) noexcept;
3866
3868
} // namespace detail
3867
3869
3870
+
FMT_BEGIN_EXPORT
3868
3871
FMT_API auto vsystem_error(int error_code, string_view format_str,
3869
3872
format_args args) -> std::system_error;
3870
3873
@@ -4285,6 +4288,8 @@ extern template FMT_API auto decimal_point_impl(locale_ref) -> char;
4285
4288
extern template FMT_API auto decimal_point_impl(locale_ref) -> wchar_t;
4286
4289
#endif // FMT_HEADER_ONLY
4287
4290
4291
+
FMT_END_EXPORT
4292
+
4288
4293
template <typename T, typename Char, type TYPE>
4289
4294
template <typename FormatContext>
4290
4295
FMT_CONSTEXPR FMT_INLINE auto native_formatter<T, Char, TYPE>::format(
@@ -4300,7 +4305,6 @@ FMT_CONSTEXPR FMT_INLINE auto native_formatter<T, Char, TYPE>::format(
4300
4305
return write<Char>(ctx.out(), val, specs, ctx.locale());
4301
4306
}
4302
4307
4303
-
FMT_END_EXPORT
4304
4308
} // namespace detail
4305
4309
4306
4310
FMT_BEGIN_EXPORT
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4