Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
7b87b39f
Commit
7b87b39f
authored
14 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
disable python bindings if swig is too old
parent
b8d485cf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+16
-9
16 additions, 9 deletions
CMakeLists.txt
with
16 additions
and
9 deletions
CMakeLists.txt
+
16
−
9
View file @
7b87b39f
...
@@ -901,6 +901,22 @@ elseif(MSVC)
...
@@ -901,6 +901,22 @@ elseif(MSVC)
set_target_properties
(
gmsh PROPERTIES LINK_FLAGS
"/STACK:16777216"
)
set_target_properties
(
gmsh PROPERTIES LINK_FLAGS
"/STACK:16777216"
)
endif
(
WIN32 AND NOT MSVC
)
endif
(
WIN32 AND NOT MSVC
)
if
(
ENABLE_SWIG
)
find_package
(
SWIG REQUIRED
)
message
(
STATUS
"Found SWIG version "
${
SWIG_VERSION
}
)
string
(
SUBSTRING
${
SWIG_VERSION
}
0 1 SWIG_MAJOR_VERSION
)
if
(
SWIG_MAJOR_VERSION EQUAL 1
)
message
(
"WARNING: Python bindings require SWIG >= 2: disabling Python"
)
else
(
SWIG_MAJOR_VERSION EQUAL 1
)
include
(
${
SWIG_USE_FILE
}
)
find_package
(
PythonLibs
)
include_directories
(
${
PYTHON_INCLUDE_DIR
}
)
set_source_files_properties
(
Common/gmshpy.i PROPERTIES CPLUSPLUS ON
)
swig_add_module
(
gmshpy python Common/gmshpy.i
)
swig_link_libraries
(
gmshpy
${
PYTHON_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
LINK_LIBRARIES
}
shared
)
endif
(
SWIG_MAJOR_VERSION EQUAL 1
)
endif
(
ENABLE_SWIG
)
find_program
(
BISON bison
)
find_program
(
BISON bison
)
find_program
(
FLEX flex
)
find_program
(
FLEX flex
)
if
(
BISON AND FLEX
)
if
(
BISON AND FLEX
)
...
@@ -1131,12 +1147,3 @@ mark_as_advanced(BISON FLEX GMP_LIB GMSH_EXTRA_VERSION HDF5_LIB MAKEINFO
...
@@ -1131,12 +1147,3 @@ mark_as_advanced(BISON FLEX GMP_LIB GMSH_EXTRA_VERSION HDF5_LIB MAKEINFO
MED_LIB OCC_INC SZ_LIB TAUCS_LIB LUA_LIB ACIS_LIB TEXI2PDF
MED_LIB OCC_INC SZ_LIB TAUCS_LIB LUA_LIB ACIS_LIB TEXI2PDF
READLINE_LIB
)
READLINE_LIB
)
if
(
ENABLE_SWIG
)
FIND_PACKAGE
(
SWIG REQUIRED
)
INCLUDE
(
${
SWIG_USE_FILE
}
)
FIND_PACKAGE
(
PythonLibs
)
INCLUDE_DIRECTORIES
(
${
PYTHON_INCLUDE_DIR
}
)
SET_SOURCE_FILES_PROPERTIES
(
Common/gmshpy.i PROPERTIES CPLUSPLUS ON
)
SWIG_ADD_MODULE
(
gmshpy python Common/gmshpy.i
)
SWIG_LINK_LIBRARIES
(
gmshpy
${
PYTHON_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
LINK_LIBRARIES
}
shared
)
endif
(
ENABLE_SWIG
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment