nixpkgs-suyu/pkgs/tools/nix/nixos-option/CMakeLists.txt
Emily 7959a16c19 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.
2023-07-13 08:25:28 +10:00

11 lines
473 B
CMake

cmake_minimum_required (VERSION 2.6)
project (nixos-option)
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_20)
install (TARGETS nixos-option DESTINATION bin)