Skip to content

Commit

Permalink
Add cpp project
Browse files Browse the repository at this point in the history
  • Loading branch information
davideme committed Jan 26, 2024
1 parent 9f95eff commit 2dce9fc
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
40 changes: 40 additions & 0 deletions c++/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
11 changes: 11 additions & 0 deletions c++/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.27)
project(c__)

set(CMAKE_CXX_STANDARD 17)

add_library(c__ STATIC library.cpp
library.cpp
"Typing discipline/Currying/main.cpp"
"Typing discipline/High-order function/main.cpp"
"Typing discipline/SumTypes/main.cpp"
"Typing discipline/Tail Recursion/main.cpp")
7 changes: 7 additions & 0 deletions c++/library.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "library.h"

#include <iostream>

void hello() {
std::cout << "Hello, World!" << std::endl;
}
6 changes: 6 additions & 0 deletions c++/library.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef C___LIBRARY_H
#define C___LIBRARY_H

void hello();

#endif //C___LIBRARY_H

0 comments on commit 2dce9fc

Please sign in to comment.