diff --git a/CMakeLists.txt b/CMakeLists.txt index b913691..3acabb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,11 @@ -# Version number of the application -set(POMEROL2TRIQS_VERSION "0.7") - # Start configuration cmake_minimum_required(VERSION 3.8 FATAL_ERROR) cmake_policy(VERSION 3.8) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -project(pomerol2triqs CXX) + +project(pomerol2triqs VERSION 0.7 LANGUAGES CXX) # We use shared libraries option(BUILD_SHARED_LIBS "Build shared libraries" ON) @@ -46,9 +44,10 @@ message(STATUS "Found pomerol ${pomerol_VERSION}") # Find MPI find_package(MPI) -# Get git hash -triqs_get_git_hash_of_source_dir(POMEROL2TRIQS_GIT_HASH) -message(STATUS "Git hash: ${POMEROL2TRIQS_GIT_HASH}") +# Get the git hash & print status +triqs_get_git_hash_of_source_dir(PROJECT_GIT_HASH) +message(STATUS "${PROJECT_NAME} version : ${PROJECT_VERSION}") +message(STATUS "${PROJECT_NAME} Git hash: ${PROJECT_GIT_HASH}") option(Tests "Enable Tests" ON) diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 53d3891..b23d32e 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -2,8 +2,8 @@ add_library(pomerol2triqs_c pomerol_ed.cpp g.cpp g2.cpp chi.cpp) target_link_libraries(pomerol2triqs_c PUBLIC triqs pomerol::pomerol) target_compile_options(pomerol2triqs_c PRIVATE - -DPOMEROL2TRIQS_GIT_HASH=${POMEROL2TRIQS_GIT_HASH} - -DPOMEROL2TRIQS_GIT_HASH=${POMEROL2TRIQS_GIT_HASH} + -DPROJECT_GIT_HASH=${PROJECT_GIT_HASH} + -DTRIQS_GIT_HASH=${TRIQS_GIT_HASH} ) install(TARGETS pomerol2triqs_c DESTINATION lib EXPORT pomerol2triqs-targets) diff --git a/python/version.py.in b/python/version.py.in index 92db791..867b19d 100644 --- a/python/version.py.in +++ b/python/version.py.in @@ -19,12 +19,12 @@ # ################################################################################ -version = "@POMEROL2TRIQS_VERSION@" +version = "@PROJECT_VERSION@" triqs_hash = "@TRIQS_GIT_HASH@" -pomerol2triqs_hash = "@POMEROL2TRIQS_GIT_HASH@" +@PROJECT_NAME@_hash = "@PROJECT_GIT_HASH@" def show_version(): - print "\nYou are using the pomerol2triqs solver version %s\n" % version + print("\nYou are using @PROJECT_NAME@ version %s\n"%version) def show_git_hash(): - print "\nYou are using the pomerol2triqs solver git hash %s based on triqs git hash %s\n"%(pomerol2triqs_hash, triqs_hash) + print("\nYou are using @PROJECT_NAME@ git hash %s based on triqs git hash %s\n"%("@PROJECT_GIT_HASH@", triqs_hash))