Skip to content

Commit c7ee281

Browse files
committed
Remove version info from CMake
Doesn't work with Pkg3, and seems to be unused anyway
1 parent bef6884 commit c7ee281

File tree

4 files changed

+4
-58
lines changed

4 files changed

+4
-58
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ libjuliampi.so
77
libjuliampi.dylib
88
*.cov
99
*.mem
10+
Manifest.toml
11+
deps/build.log

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
authors = []
21
name = "MPI"
32
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
4-
version = "0.1.0"
3+
authors = []
4+
version = "0.7.0"
55

66
[deps]
77
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"

deps/CMakeLists.txt

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -115,65 +115,14 @@ include_directories(${MPI_Fortran_INCLUDE_PATH})
115115
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAG}")
116116
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAG}")
117117

118-
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
119-
"\#define VERSION \"@VERSION@\"\n"
120-
"\#define INSTALL \"@CMAKE_INSTALL_PREFIX@\"\n"
121-
)
122-
123118
if(GIT_FOUND)
124119
set(USE_GIT 1)
125120
else(GIT_FOUND)
126121
set(USE_GIT 0)
127122
endif(GIT_FOUND)
128-
file(WRITE ${CMAKE_BINARY_DIR}/Version.cmake
129-
"if(${USE_GIT} EQUAL 1)
130-
execute_process(
131-
COMMAND ${GIT_EXECUTABLE} describe --tags --dirty
132-
WORKING_DIRECTORY \${WORKING_DIRECTORY}
133-
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
134-
RESULT_VARIABLE GIT_DESCRIBE_RESULT
135-
ERROR_VARIABLE GIT_DESCRIBE_ERROR
136-
OUTPUT_STRIP_TRAILING_WHITESPACE
137-
)
138-
else(${USE_GIT} EQUAL 1)
139-
set(GIT_DESCRIBE_RESULT -1)
140-
endif(${USE_GIT} EQUAL 1)
141-
142-
if(GIT_DESCRIBE_RESULT EQUAL 0)
143-
file(WRITE ${CMAKE_SOURCE_DIR}/VERSION \"\${GIT_DESCRIBE_VERSION}\")
144-
else(GIT_DESCRIBE_RESULT EQUAL 0)
145-
FILE(READ ${CMAKE_SOURCE_DIR}/VERSION_NO_GIT GIT_DESCRIBE_VERSION)
146-
endif(GIT_DESCRIBE_RESULT EQUAL 0)
147123

148-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
149-
\"\\\\1.\\\\2.\\\\3\" VERSION \"\${GIT_DESCRIBE_VERSION}\" )
150-
151-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
152-
\"\\\\1\" VERSION_MAJOR \"\${GIT_DESCRIBE_VERSION}\")
153-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
154-
\"\\\\2\" VERSION_MINOR \"\${GIT_DESCRIBE_VERSION}\")
155-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
156-
\"\\\\3\" VERSION_PATCH \"\${GIT_DESCRIBE_VERSION}\")
157-
")
158-
159-
file(WRITE ${CMAKE_BINARY_DIR}/FillVersion.cmake
160-
"include(Version.cmake)
161-
configure_file(\${SRC} \${DST} @ONLY)
162-
")
163124
include_directories(${CMAKE_BINARY_DIR})
164-
add_custom_target(
165-
version
166-
${CMAKE_COMMAND} -D SRC=${CMAKE_BINARY_DIR}/version.h.in
167-
-D DST=${CMAKE_BINARY_DIR}/version.h
168-
-D WORKING_DIRECTORY=${CMAKE_SOURCE_DIR}
169-
-P ${CMAKE_BINARY_DIR}/FillVersion.cmake
170-
)
171125
set(WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
172-
include(${CMAKE_BINARY_DIR}/Version.cmake)
173-
set(CPACK_PACKAGE_VERSION "${VERSION}")
174-
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
175-
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
176-
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
177126
set(CPACK_SOURCE_IGNORE_FILES
178127
"~$"
179128
".sw[a-z]$"
@@ -200,8 +149,6 @@ EXECUTE_PROCESS(COMMAND cpack -G TGZ --config CPackSourceConfig.cmake
200149
)
201150
endif(UNIX)
202151

203-
add_dependencies(dist version)
204-
205152
add_library(juliampi SHARED juliampi.c test_mpi.f90)
206153

207154
if(MPI_Fortran_LINK_FLAGS)
@@ -221,7 +168,6 @@ else()
221168
endif()
222169

223170
add_executable(gen_functions gen_functions.c)
224-
add_dependencies(gen_functions version)
225171

226172
add_executable(gen_constants gen_constants.f90)
227173

deps/gen_functions.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <stddef.h>
33
#include "jlmpi_f2c.h"
44
#include "mpi.h"
5-
#include "version.h"
65

76
// check that the size of MPI_Aint is consistent
87
typedef int check_sizeof_MPI_Aint[sizeof(MPI_Aint) == sizeof(ptrdiff_t) ? 1 : -1];
@@ -14,7 +13,6 @@ int main(int argc, char *argv[]) {
1413
printf("using Compat\n");
1514
printf("import Compat.String\n");
1615
printf("\n");
17-
printf("const WRAPPER_VERSION = \"%s\"\n", VERSION);
1816
printf("\n");
1917
printf("const _mpi_functions = Dict{Symbol, String}(\n");
2018
printf(" :MPI_ABORT => \"%s\",\n", STRING(MPI_ABORT));

0 commit comments

Comments
 (0)