Commit c84374ab authored by PRUVOST Florent's avatar PRUVOST Florent

sources inherits version numbers from the main CMakeLists.txt file

parent 4cd180bc
......@@ -37,9 +37,13 @@ if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
endif()
# set project version number
set(MORSE_VERSION_MAJOR 1)
set(MORSE_VERSION_MINOR 0)
set(MORSE_VERSION_MICRO 0)
# set subproject version number
set(CHAMELEON_VERSION_MAJOR 0)
set(CHAMELEON_VERSION_MINOR 9)
set(CHAMELEON_VERSION_PATCH 1)
set(CHAMELEON_VERSION_MICRO 1)
set( MORSE_DISTRIB_DIR "" CACHE PATH "Directory of MORSE distribution")
......
......@@ -35,10 +35,6 @@
#include <coreblas/include/cblas.h>
#include <coreblas/include/lapacke.h>
#define CHAMELEON_VERSION_MAJOR 0
#define CHAMELEON_VERSION_MINOR 9
#define CHAMELEON_VERSION_MICRO 0
/* Integer parameters for step0 */
enum iparam_step0 {
IPARAM_THRDNBR, /* Number of cores */
......@@ -112,15 +108,12 @@ static void print_header(char *prog_name, int * iparam) {
#endif
printf( "#\n"
"# CHAMELEON %d.%d.%d, %s\n"
"# CHAMELEON %s\n"
"# Nb threads: %d\n"
"# N: %d\n"
"# IB: %d\n"
"# eps: %e\n"
"#\n",
CHAMELEON_VERSION_MAJOR,
CHAMELEON_VERSION_MINOR,
CHAMELEON_VERSION_MICRO,
prog_name,
iparam[IPARAM_THRDNBR],
iparam[IPARAM_N],
......
......@@ -40,6 +40,10 @@ set(ZHDR
precisions_rules_py(CHAMELEON_HDRS_GENERATED "${ZHDR}"
PRECISIONS "z;c;d;s;zc;ds")
configure_file("morse.h.in"
"morse.h"
@ONLY)
# Define the list of headers
# --------------------------
set(CHAMELEON_HDRS
......@@ -70,12 +74,12 @@ set(HDR_INSTALL
morse_simulate.h
morse_struct.h
morse_types.h
morse.h
runtime.h
)
foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()
list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/morse.h)
# installation
# ------------
......
......@@ -27,13 +27,13 @@
#ifndef _MORSE_H_
#define _MORSE_H_
#define MORSE_VERSION_MAJOR 1
#define MORSE_VERSION_MINOR 0
#define MORSE_VERSION_MICRO 0
#define MORSE_VERSION_MAJOR @MORSE_VERSION_MAJOR@
#define MORSE_VERSION_MINOR @MORSE_VERSION_MINOR@
#define MORSE_VERSION_MICRO @MORSE_VERSION_MICRO@
#define CHAMELEON_VERSION_MAJOR 0
#define CHAMELEON_VERSION_MINOR 9
#define CHAMELEON_VERSION_MICRO 0
#define CHAMELEON_VERSION_MAJOR @CHAMELEON_VERSION_MAJOR@
#define CHAMELEON_VERSION_MINOR @CHAMELEON_VERSION_MINOR@
#define CHAMELEON_VERSION_MICRO @CHAMELEON_VERSION_MICRO@
/* ****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment