File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ if(CMAKE_VERSION VERSION_LESS 3.18)
79
79
endif ()
80
80
81
81
if (FLIBCPP_USE_SWIG )
82
- find_package (SWIG COMPONENTS fortran REQUIRED )
82
+ if (NOT SWIG_fortran_FOUND )
83
+ find_package (SWIG COMPONENTS fortran REQUIRED )
84
+ endif ()
83
85
84
86
if (CMAKE_VERSION VERSION_LESS 3.12 )
85
87
message (FATAL_ERROR "CMake 3.12 or higher is required to regenerate the "
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ FlibcppVersion
14
14
15
15
16
16
``<projname>``
17
- Name of the project.
17
+ Name of the project.
18
18
19
19
This command sets the following variables in the parent package::
20
20
@@ -55,7 +55,7 @@ function(flibcpp_find_version PROJNAME GIT_VERSION_FILE)
55
55
RESULT_VARIABLE _GIT_RESULT
56
56
OUTPUT_STRIP_TRAILING_WHITESPACE
57
57
)
58
- if (NOT _GIT_RESULT EQUAL "0" )
58
+ if (_GIT_RESULT )
59
59
message (WARNING "Failed to get ${PROJNAME} version from git: "
60
60
"${_GIT_ERR} " )
61
61
elseif (NOT _VERSION_STRING )
You can’t perform that action at this time.
0 commit comments