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}") ...@@ -37,9 +37,13 @@ if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
endif() endif()
# set project version number # 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_MAJOR 0)
set(CHAMELEON_VERSION_MINOR 9) 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") set( MORSE_DISTRIB_DIR "" CACHE PATH "Directory of MORSE distribution")
......
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
#include <coreblas/include/cblas.h> #include <coreblas/include/cblas.h>
#include <coreblas/include/lapacke.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 */ /* Integer parameters for step0 */
enum iparam_step0 { enum iparam_step0 {
IPARAM_THRDNBR, /* Number of cores */ IPARAM_THRDNBR, /* Number of cores */
...@@ -112,15 +108,12 @@ static void print_header(char *prog_name, int * iparam) { ...@@ -112,15 +108,12 @@ static void print_header(char *prog_name, int * iparam) {
#endif #endif
printf( "#\n" printf( "#\n"
"# CHAMELEON %d.%d.%d, %s\n" "# CHAMELEON %s\n"
"# Nb threads: %d\n" "# Nb threads: %d\n"
"# N: %d\n" "# N: %d\n"
"# IB: %d\n" "# IB: %d\n"
"# eps: %e\n" "# eps: %e\n"
"#\n", "#\n",
CHAMELEON_VERSION_MAJOR,
CHAMELEON_VERSION_MINOR,
CHAMELEON_VERSION_MICRO,
prog_name, prog_name,
iparam[IPARAM_THRDNBR], iparam[IPARAM_THRDNBR],
iparam[IPARAM_N], iparam[IPARAM_N],
......
...@@ -40,6 +40,10 @@ set(ZHDR ...@@ -40,6 +40,10 @@ set(ZHDR
precisions_rules_py(CHAMELEON_HDRS_GENERATED "${ZHDR}" precisions_rules_py(CHAMELEON_HDRS_GENERATED "${ZHDR}"
PRECISIONS "z;c;d;s;zc;ds") PRECISIONS "z;c;d;s;zc;ds")
configure_file("morse.h.in"
"morse.h"
@ONLY)
# Define the list of headers # Define the list of headers
# -------------------------- # --------------------------
set(CHAMELEON_HDRS set(CHAMELEON_HDRS
...@@ -70,12 +74,12 @@ set(HDR_INSTALL ...@@ -70,12 +74,12 @@ set(HDR_INSTALL
morse_simulate.h morse_simulate.h
morse_struct.h morse_struct.h
morse_types.h morse_types.h
morse.h
runtime.h runtime.h
) )
foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} ) foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file}) list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach() endforeach()
list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/morse.h)
# installation # installation
# ------------ # ------------
......
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
#ifndef _MORSE_H_ #ifndef _MORSE_H_
#define _MORSE_H_ #define _MORSE_H_
#define MORSE_VERSION_MAJOR 1 #define MORSE_VERSION_MAJOR @MORSE_VERSION_MAJOR@
#define MORSE_VERSION_MINOR 0 #define MORSE_VERSION_MINOR @MORSE_VERSION_MINOR@
#define MORSE_VERSION_MICRO 0 #define MORSE_VERSION_MICRO @MORSE_VERSION_MICRO@
#define CHAMELEON_VERSION_MAJOR 0 #define CHAMELEON_VERSION_MAJOR @CHAMELEON_VERSION_MAJOR@
#define CHAMELEON_VERSION_MINOR 9 #define CHAMELEON_VERSION_MINOR @CHAMELEON_VERSION_MINOR@
#define CHAMELEON_VERSION_MICRO 0 #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