CMake: use compile_features to set min C++ standard (#647)

This commit is contained in:
SpaceIm
2023-05-25 19:34:34 +02:00
committed by ArthurSonzogni
parent f74c5322bd
commit 6ce88c25e5
4 changed files with 13 additions and 30 deletions

View File

@@ -8,9 +8,7 @@ function(example name)
target_link_libraries(ftxui_example_${name} PUBLIC ${DIRECTORY_LIB})
file(RELATIVE_PATH dir ${EXAMPLES_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
set_property(GLOBAL APPEND PROPERTY FTXUI::EXAMPLES ${dir}/${name})
set_target_properties(ftxui_example_${name} PROPERTIES
CXX_STANDARD 20
)
target_compile_features(ftxui_example_${name} PRIVATE cxx_std_17)
endfunction(example)
add_subdirectory(component)