Initial CMake project structure

This commit is contained in:
2023-10-29 20:50:54 -03:00
parent 895c10c927
commit 932cffa95c
7 changed files with 128 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
build/

12
CMakeLists.txt Normal file
View File

@@ -0,0 +1,12 @@
# Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
cmake_minimum_required(VERSION 3.10)
project(molecular_dynamics)
set(CMAKE_CXX_STANDARD 20)
add_subdirectory(src/md)
add_executable(my_project src/main.cpp)
target_link_libraries(my_project PRIVATE md)

61
flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1690031011,
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "12303c652b881435065a98729eb7278313041e49",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

21
flake.nix Normal file
View File

@@ -0,0 +1,21 @@
# Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
{
description = "MolecularDynamics2";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [ gcc cmake clang gnuplot llvmPackages.openmp bc ];
};
});
}

17
src/main.cpp Normal file
View File

@@ -0,0 +1,17 @@
/**
* @file main.cpp
* @author jun <jun@firmwarejun.net>
* @brief Main entry of the program
* @version 0.1
* @date 2023-07-23
*
* Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
*
*/
#include <iostream>
int main() {
std::cout << "kk eae men" << std::endl;
return 0;
}

6
src/md/CMakeLists.txt Normal file
View File

@@ -0,0 +1,6 @@
# Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
project(md)
add_library(md
MolecularDynamics.cpp)

View File

@@ -0,0 +1,10 @@
/**
* @file MolecularDynamics.cpp
* @author jun <jun@firmwarejun.net>
* @brief
* @version 0.1
* @date 2023-07-23
*
* Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
*
*/