Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't include the git hash in simgrid/config.h
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 11 Jan 2019 16:34:41 +0000 (17:34 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 11 Jan 2019 16:36:24 +0000 (17:36 +0100)
This should speed up incremental rebuilds after cmake runs.

CMakeLists.txt
include/simgrid/config.h.in
src/simgrid/version.h.in [new file with mode: 0644]
src/surf/surf_interface.cpp
tools/cmake/DefinePackages.cmake

index fb60a44..98817df 100644 (file)
@@ -513,8 +513,10 @@ endif()
 
 # Avoid triggering a (full) rebuild by touching the files if they did not really change
 configure_file("${CMAKE_HOME_DIRECTORY}/src/internal_config.h.in"    "${CMAKE_BINARY_DIR}/src/internal_config.h.generated"    @ONLY IMMEDIATE)
 
 # Avoid triggering a (full) rebuild by touching the files if they did not really change
 configure_file("${CMAKE_HOME_DIRECTORY}/src/internal_config.h.in"    "${CMAKE_BINARY_DIR}/src/internal_config.h.generated"    @ONLY IMMEDIATE)
+configure_file("${CMAKE_HOME_DIRECTORY}/src/simgrid/version.h.in"    "${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated" @ONLY IMMEDIATE)
 configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/config.h.in" "${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated" @ONLY IMMEDIATE)
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/internal_config.h.generated ${CMAKE_BINARY_DIR}/src/internal_config.h)
 configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/config.h.in" "${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated" @ONLY IMMEDIATE)
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/internal_config.h.generated ${CMAKE_BINARY_DIR}/src/internal_config.h)
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated ${CMAKE_BINARY_DIR}/src/simgrid/version.h)
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h)
 file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated)
 file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated)
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h)
 file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated)
 file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated)
index 6c5d1cd..bbb7aa0 100644 (file)
@@ -14,7 +14,6 @@
 #define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
 #define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
 #define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
 #define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
 #define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
 #define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
-#define SIMGRID_GIT_VERSION   "@GIT_VERSION@"
 #define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
 
 SG_BEGIN_DECL()
 #define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
 
 SG_BEGIN_DECL()
diff --git a/src/simgrid/version.h.in b/src/simgrid/version.h.in
new file mode 100644 (file)
index 0000000..fa8433b
--- /dev/null
@@ -0,0 +1,13 @@
+/* src/simgrid/version.h - internal versionning info                        */
+
+/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SIMGRID_VERSION_H
+#define SIMGRID_VERSION_H
+
+#define SIMGRID_GIT_VERSION   "@GIT_VERSION@"
+
+#endif /* SIMGRID_PUBLIC_CONFIG_H */
index b351d93..abb8f96 100644 (file)
@@ -8,6 +8,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/sg_config.hpp"
 #include "src/internal_config.h"
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/sg_config.hpp"
 #include "src/internal_config.h"
+#include "src/simgrid/version.h"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/xml/platf.hpp"
 #include "surf/surf.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/xml/platf.hpp"
 #include "surf/surf.hpp"
index 502a62f..e821e20 100644 (file)
@@ -786,6 +786,7 @@ set(headers_to_install
 set(source_of_generated_headers
   include/simgrid/config.h.in
   src/internal_config.h.in
 set(source_of_generated_headers
   include/simgrid/config.h.in
   src/internal_config.h.in
+  src/simgrid/version.h.in
   include/smpi/mpif.h.in)
 
 ### depend of some variables setted upper
   include/smpi/mpif.h.in)
 
 ### depend of some variables setted upper