Giter Club home page Giter Club logo

tecniche_algoritmi_apa_lab_clion_template's Introduction

Tecniche, Algoritmi, APA: THE CLION TEMPLATE

What is this

This repository contains a CMake template, intended to quickly setup your lab projects, for the Politecnico di Torino courses APA (deprecated), Tecniche di Programmazione, Algoritmi e Strutture Dati.

It is intended to be used with CLion, but if you feel brave you can use it without a GUI, or with VSCode.

It's compatible with Linux, Windows and Mac

Features - What does this template do

  • Quick setup
  • Build/Run all the lab's exercises configurations inside your IDE

  • Import files via relative path

  • Automatic export of the files for the lab delivery

How to Setup your project

  • Download this project on your machine (git clone or download zip)
  • Rename the main folder as your Lab name (e.g. L01 for lab1)

  • (optional) open it in CLion

    - If you opened it in CLion, set up your standard CMake configuration

  • Create a copy of the EZZ directory for every exercise. Rename it as the exercise name (e.g. E01 for ex.1)

  • Edit CMakeLists.txt:
    • line 6: set LAB_NAME variable as the lab name (e.g. L03 for lab 3)
    • line 9: add the exercise directory names (e.g. set(DIRECTORIES E01 E02 E03))

  • Inside each exercise folder:
    • Edit CMakeLists.txt:
      • line 4 set project() as the exercise name (e.g. E03 for exercise 3)
      • line 8 add executable files if needed (.c and .h files)
      • line 16 add/remove file names if needed

How to export your project

This is automatic! Every time you build your exercise executable, CMake magic copies your .c, .h and text files in the folder [projectName]_export/[ExerciseName]/, ready to be copy-pasted and delivered!

note The changes occur only when you build the project!

note about file handling

This template tries to offer a quick solution for a very common problem: when opening a file, usually a lot of people tries to open it using its relative path (e.g. ./file.txt). This causes problems since the executable, when built, usually looks for its relative path and doesn't find it, sinche the file itself doesn't get copied.

The "standard" solution is to include the full path (e.g. C:\user\develop\file.txt).

With this template CMake copies the files inside the build folder: this enables you to open your files using relative path. To do so, you need to add the relative path (starting from the main.c location!) of the file to the exercises CMakeLists.txt.

It is recommended to add your files (also *.c and *h) into the same folder as your main.c !

Problems? Bugs found?

Submit a new issue

Wanna contribute?

Submit a pull request

tecniche_algoritmi_apa_lab_clion_template's People

Contributors

barsay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.