mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-25 20:27:31 +08:00
Fix CMAKE_UNITY_BUILD usage (#738)
Add missing include guard. This fix https://github.com/cpp-best-practices/cmake_template/issues/64 Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
parent
05c7bee6dd
commit
dd6a5d371f
@ -8,6 +8,9 @@ current (development)
|
|||||||
- Feature: Add support for `Input`'s insert mode. Add `InputOption::insert`
|
- Feature: Add support for `Input`'s insert mode. Add `InputOption::insert`
|
||||||
option. Added by @mingsheng13.
|
option. Added by @mingsheng13.
|
||||||
|
|
||||||
|
### Build
|
||||||
|
- Support for cmake's "unity/jumbo" builds. Fixed by @ClausKlein.
|
||||||
|
|
||||||
5.0.0
|
5.0.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -59,6 +59,11 @@ target_include_directories(ftxui-tests
|
|||||||
)
|
)
|
||||||
target_compile_features(ftxui-tests PRIVATE cxx_std_20)
|
target_compile_features(ftxui-tests PRIVATE cxx_std_20)
|
||||||
|
|
||||||
|
# Disable unity build for tests. There are several files defining the same
|
||||||
|
# function in different anonymous namespaces. This is not allowed in unity
|
||||||
|
# builds, as it would result in multiple definitions of the same function.
|
||||||
|
set_target_properties(ftxui-tests PROPERTIES UNITY_BUILD OFF)
|
||||||
|
|
||||||
if (FTXUI_MICROSOFT_TERMINAL_FALLBACK)
|
if (FTXUI_MICROSOFT_TERMINAL_FALLBACK)
|
||||||
target_compile_definitions(ftxui-tests
|
target_compile_definitions(ftxui-tests
|
||||||
PRIVATE "FTXUI_MICROSOFT_TERMINAL_FALLBACK")
|
PRIVATE "FTXUI_MICROSOFT_TERMINAL_FALLBACK")
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_SCREEN_UTIL_HPP
|
||||||
|
#define FTXUI_SCREEN_UTIL_HPP
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
namespace util {
|
namespace util {
|
||||||
|
|
||||||
@ -12,3 +15,5 @@ constexpr const T& clamp(const T& v, const T& lo, const T& hi) {
|
|||||||
|
|
||||||
} // namespace util
|
} // namespace util
|
||||||
} // namespace ftxui
|
} // namespace ftxui
|
||||||
|
|
||||||
|
#endif /* end of include guard: FTXUI_SCREEN_UTIL_HPP */
|
||||||
|
Loading…
Reference in New Issue
Block a user