churchyard / rpms / psi4

Forked from rpms/psi4 5 years ago
Clone
Blob Blame History Raw
diff -up psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/CMakeLists.txt.gitversion psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/CMakeLists.txt
--- psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/CMakeLists.txt.gitversion	2015-09-06 12:39:37.481839259 -0700
+++ psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/CMakeLists.txt	2015-09-06 12:53:57.223151247 -0700
@@ -1,12 +1,4 @@
-# Run the git version script, and update gitversion.h, if it's changed
-add_custom_target(update_version
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.py ${PROJECT_SOURCE_DIR}
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/gitversion.h.tmp ${CMAKE_CURRENT_BINARY_DIR}/gitversion.h
-    COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/gitversion.h.tmp
-    COMMENT "Generating Git info")
-
 add_library(versioned_code OBJECT version.cc python.cc psi_start.cc)
-add_dependencies(versioned_code update_version)
 add_dependencies(versioned_code mints)
 
 set(headers_list "")
@@ -57,7 +49,6 @@ list(APPEND
 
 # Executable psi4
 add_executable(psi4 ${sources_list})
-add_dependencies(psi4 update_version)
 if(CUSTOM_BOOST_BUILD)
    add_dependencies(psi4 custom_boost)
 endif()
diff -up psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/python.cc.gitversion psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/python.cc
--- psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/python.cc.gitversion	2015-08-05 10:37:14.000000000 -0700
+++ psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/src/bin/psi4/python.cc	2015-09-06 12:57:40.213173096 -0700
@@ -742,12 +742,20 @@ double py_psi_thermo()
 
 char const *py_psi_version()
 {
+#ifdef PSI_VERSION  
     return PSI_VERSION;
+#else
+    return "";
+#endif
 }
 
 char const *py_psi_git_version()
 {
+#ifdef GIT_VERSION  
     return GIT_VERSION;
+#else
+    return "";
+#endif
 }
 
 void py_psi_clean()