1

CMake: Add Boost dependency

This commit is contained in:
2023-03-20 17:49:51 +01:00
parent e40452a54d
commit 07ecb27382
2 changed files with 51 additions and 14 deletions

View File

@ -3,4 +3,11 @@ project(LogisimAssembler)
set(CMAKE_CXX_STANDARD 20)
add_executable(LogisimAssembler src/main.cpp)
find_package(Boost 1.81 COMPONENTS program_options REQUIRED)
add_executable(LogisimAssembler
src/main.cpp
src/lexer/Token.cpp
src/lexer/Lexer.cpp)
target_link_libraries(LogisimAssembler Boost::program_options)

View File

@ -50,11 +50,8 @@
bintools = bintools_multi;
};
in {
# devShell = pkgs.devshell.mkShell ...
devShell = pkgs.devshell.mkShell {
name = "Logisim Assembler Development Environment";
packages = with pkgs; [
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Compilers
bintools
gcc12
@ -63,6 +60,9 @@
# gcc12_multi
# clang14_multi
# Libraries
boost181
# Native buildinputs
gnumake
cmake
@ -74,14 +74,44 @@
cling # To try out my bullshit implementations
# doxygen # Generate docs + graphs
];
commands = [
{
name = "ide";
help = "Run clion for project";
command = "clion &>/dev/null ./ &";
}
];
};
# TODO: DevShell doesn't propagate buildinputs, so its difficult to find e.g. Boost...
# # devShell = pkgs.devshell.mkShell ...
# devShell = pkgs.devshell.mkShell {
# name = "Logisim Assembler Development Environment";
# packages = with pkgs; [
# # Compilers
# bintools
# gcc12
# clang15
# # bintools_multi
# # gcc12_multi
# # clang14_multi
# # Libraries
# boost181
# # Native buildinputs
# gnumake
# cmake
# # nasm
# # Development
# # bear # To generate compilation database
# gdb
# cling # To try out my bullshit implementations
# # doxygen # Generate docs + graphs
# ];
# commands = [
# {
# name = "ide";
# help = "Run clion for project";
# command = "clion &>/dev/null ./ &";
# }
# ];
# };
});
}