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)
7979endif ()
8080
8181if (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 ()
8385
8486 if (CMAKE_VERSION VERSION_LESS 3.12)
8587 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
1414
1515
1616 ``<projname>``
17- Name of the project.
17+ Name of the project.
1818
1919 This command sets the following variables in the parent package::
2020
@@ -55,7 +55,7 @@ function(flibcpp_find_version PROJNAME GIT_VERSION_FILE)
5555 RESULT_VARIABLE _GIT_RESULT
5656 OUTPUT_STRIP_TRAILING_WHITESPACE
5757 )
58- if (NOT _GIT_RESULT EQUAL "0" )
58+ if (_GIT_RESULT)
5959 message (WARNING "Failed to get ${PROJNAME} version from git: "
6060 "${_GIT_ERR} " )
6161 elseif (NOT _VERSION_STRING)
You can’t perform that action at this time.
0 commit comments