Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMAKE_UNITY_BUILD usage #738

Merged
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ current (development)
- Feature: Add support for `Input`'s insert mode. Add `InputOption::insert`
option. Added by @mingsheng13.

### Build
- Support for cmake's "unity/jumbo" builds. Fixed by @ClausKlein.

5.0.0
-----

Expand Down
5 changes: 5 additions & 0 deletions cmake/ftxui_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ target_include_directories(ftxui-tests
)
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)
target_compile_definitions(ftxui-tests
PRIVATE "FTXUI_MICROSOFT_TERMINAL_FALLBACK")
Expand Down
5 changes: 5 additions & 0 deletions src/ftxui/screen/util.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2022 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#ifndef FTXUI_SCREEN_UTIL_HPP
#define FTXUI_SCREEN_UTIL_HPP

namespace ftxui {
namespace util {

Expand All @@ -12,3 +15,5 @@ constexpr const T& clamp(const T& v, const T& lo, const T& hi) {

} // namespace util
} // namespace ftxui

#endif /* end of include guard: FTXUI_SCREEN_UTIL_HPP */
Loading