mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
UseSWIG: Simplify test for Visual Studio generators
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), the test does not need to be
version-dependent.
This commit is contained in:
@@ -565,7 +565,7 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
|
||||
endif()
|
||||
|
||||
set (use_swig_dependencies ${SWIG_USE_SWIG_DEPENDENCIES})
|
||||
if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio (1[1-9]|[2-9][0-9])")
|
||||
if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio")
|
||||
get_property(use_swig_dependencies_set SOURCE "${infile}" PROPERTY USE_SWIG_DEPENDENCIES SET)
|
||||
if (use_swig_dependencies_set)
|
||||
get_property(use_swig_dependencies SOURCE "${infile}" PROPERTY USE_SWIG_DEPENDENCIES)
|
||||
@@ -890,7 +890,7 @@ function(SWIG_ADD_LIBRARY name)
|
||||
set(SWIG_SOURCE_FILE_EXTENSIONS ".i")
|
||||
endif()
|
||||
|
||||
if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio (1[1-9]|[2-9][0-9])")
|
||||
if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio")
|
||||
# For Makefiles, Ninja, Xcode and Visual Studio generators,
|
||||
# use SWIG generated dependencies if requested
|
||||
if (NOT DEFINED SWIG_USE_SWIG_DEPENDENCIES)
|
||||
|
||||
@@ -87,7 +87,7 @@ add_test(NAME UseSWIG.BasicPerl5 COMMAND
|
||||
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
|
||||
)
|
||||
if(SWIG_FOUND AND NOT SWIG_VERSION VERSION_LESS "4.0.2"
|
||||
AND CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio (1[1-9]|[2-9][0-9])")
|
||||
AND CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio")
|
||||
add_test(NAME UseSWIG.Depfile.BasicPython COMMAND
|
||||
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
|
||||
--build-and-test
|
||||
|
||||
Reference in New Issue
Block a user