Skip to content

Commit

Permalink
[CI] Fix windows CI failing
Browse files Browse the repository at this point in the history
- #9

Signed-off-by: Shreyas Atre <[email protected]>
  • Loading branch information
SAtacker committed Feb 19, 2023
1 parent 52d6189 commit 8bc92a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if(QUICK_FTXUI_TESTS)
FetchContent_MakeAvailable(Catch2)

add_executable(tests tests/test1.cpp)
target_link_libraries(tests
target_link_libraries(tests
PRIVATE Catch2::Catch2WithMain
PRIVATE ftxui::screen
PRIVATE ftxui::dom
Expand All @@ -49,9 +49,9 @@ if(QUICK_FTXUI_TESTS)
endif()

add_executable(quick-ftxui src/quick-ftxui.cpp)
target_include_directories(quick-ftxui
PRIVATE include
PRIVATE ${Boost_INCLUDE_DIR}
target_include_directories(quick-ftxui
PRIVATE include
PRIVATE ${Boost_INCLUDE_DIR}
PRIVATE ${ftxui_SOURCE_DIR}
)

Expand All @@ -62,6 +62,11 @@ target_link_libraries(quick-ftxui
PRIVATE ftxui::component # Not needed for this example.
)

if(WIN32)
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n")
endif()

target_compile_options(quick-ftxui PRIVATE -fsanitize=address)
target_link_options(quick-ftxui PRIVATE -fsanitize=address)

Expand Down
4 changes: 4 additions & 0 deletions include/quick-ftxui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include <iostream>
#include <string>

#if _MSC_VER && !__INTEL_COMPILER
#define _DISABLE_VECTOR_ANNOTATION 1
#endif

namespace client {
namespace qi = boost::spirit::qi;
namespace ascii = boost::spirit::ascii;
Expand Down

0 comments on commit 8bc92a0

Please sign in to comment.