🎉 init(cmake): init modern cmake template
This commit is contained in:
4
apps/CMakeLists.txt
Normal file
4
apps/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_executable(app app.cpp)
|
||||
target_compile_features(app PRIVATE cxx_std_17)
|
||||
|
||||
target_link_libraries(app PRIVATE modern_library fmt::fmt)
|
17
apps/app.cpp
Normal file
17
apps/app.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <modern/lib.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
int main() {
|
||||
std::vector<double> input = {1.2, 2.3, 3.4, 4.5};
|
||||
|
||||
auto [mean, moment] = accumulate_vector(input);
|
||||
|
||||
fmt::print("Mean: {}, Moment: {}\n", mean, moment);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user