Skip to content

Commit

Permalink
Adding a version number 1.0 to the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
cepellotti committed Jul 28, 2021
1 parent 5705632 commit 3fbe34f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ tags
# Clion IDE
.idea

*zip
*zip

# built by cmake for version number
src/main.h
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ endif()
cmake_minimum_required(VERSION 3.16)
set(CMAKE_CXX_STANDARD 14)

project(Phoebe C CXX Fortran)
project(Phoebe LANGUAGES C CXX Fortran VERSION 1.0)

configure_file(src/main.h.in ../src/main.h)

## load custom cmake find_package
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
Expand Down
3 changes: 3 additions & 0 deletions src/io.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "io.h"
#include "mpiHelper.h"
#include "main.h"
#include <algorithm>
#include <exceptions.h>
#include <iomanip>
Expand Down Expand Up @@ -75,6 +76,8 @@ void IO::welcome() {
" 888 888 888 Y88..88P Y8b. 888 d88P Y8b. \n"
" 888 888 888 'Y88P' 'Y8888 88888P' 'Y8888' \n";
std::cout << welcomeMsg << std::endl;
std::cout << "Phoebe v" << Phoebe_VERSION_MAJOR
<< "." << Phoebe_VERSION_MINOR << "\n" << std::endl;
}

void IO::goodbye(Context &context) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "app.h"
#include "context.h"
#include "io.h"
#include "main.h"
#include "mpi/mpiHelper.h"
#include <Kokkos_Core.hpp>


int main(int argc, char **argv) {

// here launch parallel environment
Expand Down
8 changes: 8 additions & 0 deletions src/main.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef MAIN_H
#define MAIN_H

// these variables are configured by cmake
#define Phoebe_VERSION_MAJOR "@Phoebe_VERSION_MAJOR@"
#define Phoebe_VERSION_MINOR "@Phoebe_VERSION_MINOR@"

#endif

0 comments on commit 3fbe34f

Please sign in to comment.