nixos-option: use C++20

Nix uses `-std=c++2a` and the header files require C++20 features. LLVM
is more strict about this, so the build was failing there.
This commit is contained in:
Emily 2023-07-12 00:30:07 +01:00 committed by zowoq
parent efaf8e7b6e
commit 7959a16c19

View file

@ -6,6 +6,6 @@ set(NIX_DEV_INCLUDEPATH "" CACHE STRING "path to nix include directory")
add_executable(nixos-option nixos-option.cc libnix-copy-paste.cc)
target_include_directories(nixos-option PUBLIC "${NIX_DEV_INCLUDEPATH}")
target_link_libraries(nixos-option PRIVATE -lnixmain -lnixexpr -lnixstore -lnixutil -lnixcmd)
target_compile_features(nixos-option PRIVATE cxx_std_17)
target_compile_features(nixos-option PRIVATE cxx_std_20)
install (TARGETS nixos-option DESTINATION bin)