Finalise template

This commit is contained in:
Curt Spark 2025-11-20 02:25:22 +00:00
parent 53b9bb2d72
commit e365dc6354
2 changed files with 11 additions and 10 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.23)
project(discern)
project(template)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@ -8,9 +8,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#string(REPLACE ":" ";" INCLUDE_LIST $ENV{CMAKE_STDLIB})
#include_directories($ENV{CMAKE_STDLIB})
add_executable(discern)
add_executable(template)
target_sources(discern
target_sources(template
PRIVATE
main.cpp
)

View File

@ -1,13 +1,14 @@
with (import <nixpkgs> {});
clangStdenv.mkDerivation {
name = "discern";
nativeBuildInputs = with pkgs; [
cmake
name = "template";
nativeBuildInputs = with pkgs; [
cmake
clang-tools
clang
];
clang-tools
clang
];
CXXFLAGS = "-isystem${pkgs.gcc.cc}/include/c++/14.3.0 -isystem${pkgs.gcc.cc}/include/c++/14.3.0/x86_64-unknown-linux-gnu -isystem${pkgs.glibc.dev}/include";
# Workaround as Clangd cannot see std header files, so include set of files manually just for Clangd
CXXFLAGS = "-isystem${pkgs.gcc.cc}/include/c++/14.3.0 -isystem${pkgs.gcc.cc}/include/c++/14.3.0/x86_64-unknown-linux-gnu -isystem${pkgs.glibc.dev}/include";
}