Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
waves
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
waves
Commits
1e2ecd4c
Commit
1e2ecd4c
authored
4 years ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
vs2017 configuration post py3 MR and find python for cmake>=3.12
parent
1b9f93fe
No related branches found
No related tags found
1 merge request
!57
compatibility to updated (cmake 3.12.0) LibsVs2017Py3
Pipeline
#1504
passed
4 years ago
Changes
3
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/win64-libsVs2017.cmake
+4
-0
4 additions, 0 deletions
CMake/win64-libsVs2017.cmake
CMake/win64-libsVs2017Py3.cmake
+6
-1
6 additions, 1 deletion
CMake/win64-libsVs2017Py3.cmake
CMakeLists.txt
+26
-5
26 additions, 5 deletions
CMakeLists.txt
with
36 additions
and
6 deletions
CMake/win64-libsVs2017.cmake
+
4
−
0
View file @
1e2ecd4c
...
...
@@ -12,3 +12,7 @@ SET(PYTHON_INCLUDE_DIR "${MYLIBS}/Python/include" CACHE
SET
(
PYTHON_LIBRARY
"
${
MYLIBS
}
/Python/Libs/python27.lib"
CACHE FILEPATH
""
FORCE
)
SET
(
PYTHON_RELEASE_LIBRARY
"
${
MYLIBS
}
/Python/Libs/python27.lib"
CACHE FILEPATH
""
FORCE
)
SET
(
PYTHON_DEBUG_LIBRARY
"
${
MYLIBS
}
/Python/Libs/python27_d.lib"
CACHE FILEPATH
""
FORCE
)
# Disable Trilinos (we should test with Trilinos/clang)
LIST
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_LIST_DIR
}
)
INCLUDE
(
disable-trilinos
)
This diff is collapsed.
Click to expand it.
CMake/win64-libsVs2017Py3.cmake
+
6
−
1
View file @
1e2ecd4c
...
...
@@ -7,8 +7,13 @@ SET(CMAKE_INSTALL_PREFIX "../waves_INSTALL" CACHE PATH "" FORCE)
STRING
(
REGEX REPLACE
"
\\\\
"
"/"
MYLIBS $ENV{METAFORLIBS}
)
SET
(
CMAKE_GENERATOR
"Visual Studio 15 2017 Win64"
CACHE INTERNAL
""
FORCE
)
OPTION
(
USE_PY3
"Use python 3"
ON
)
#
OPTION(USE_PY3 "Use python 3" ON)
SET
(
PYTHON_INCLUDE_DIR
"
${
MYLIBS
}
/Python/include"
CACHE PATH
""
FORCE
)
SET
(
PYTHON_LIBRARY
"
${
MYLIBS
}
/Python/Libs/python37.lib"
CACHE FILEPATH
""
FORCE
)
SET
(
PYTHON_RELEASE_LIBRARY
"
${
MYLIBS
}
/Python/Libs/python37.lib"
CACHE FILEPATH
""
FORCE
)
SET
(
PYTHON_DEBUG_LIBRARY
"
${
MYLIBS
}
/Python/Libs/python37_d.lib"
CACHE FILEPATH
""
FORCE
)
# Disable Trilinos (we should test with Trilinos/clang)
LIST
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_LIST_DIR
}
)
INCLUDE
(
disable-trilinos
)
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
26
−
5
View file @
1e2ecd4c
...
...
@@ -99,13 +99,32 @@ IF(APPLE)
ENDIF
()
# -- Search for Python
IF
(
USE_PY3
)
SET
(
pyVersion 3.6
)
IF
(
CMAKE_VERSION VERSION_LESS 3.12.0
)
IF
(
USE_PY3
)
SET
(
pyVersion 3.6
)
ELSE
()
SET
(
pyVersion 2.7
)
ENDIF
()
FIND_PACKAGE
(
PythonInterp
${
pyVersion
}
REQUIRED
)
FIND_PACKAGE
(
PythonLibs
${
pyVersion
}
REQUIRED
)
ELSE
()
SET
(
pyVersion 2.7
)
# new way since 3.12
IF
(
USE_PY3
)
find_package
(
Python3 COMPONENTS Interpreter Development
)
# use Python3_ROOT_DIR if wrong python found (e.g. anaconda)
SET
(
PYTHON_EXECUTABLE
${
Python3_EXECUTABLE
}
)
SET
(
PYTHON_LIBRARIES
${
Python3_LIBRARIES
}
)
SET
(
PYTHON_INCLUDE_PATH
${
Python3_INCLUDE_DIRS
}
)
SET
(
PYTHONLIBS_VERSION_STRING
${
Python3_VERSION
}
)
ELSE
()
find_package
(
Python2 COMPONENTS Interpreter Development
)
# use Python2_ROOT_DIR if wrong python found (e.g. anaconda)
SET
(
PYTHON_EXECUTABLE
${
Python2_EXECUTABLE
}
)
SET
(
PYTHON_LIBRARIES
${
Python2_LIBRARIES
}
)
SET
(
PYTHON_INCLUDE_PATH
${
Python2_INCLUDE_DIRS
}
)
SET
(
PYTHONLIBS_VERSION_STRING
${
Python2_VERSION
}
)
ENDIF
()
ENDIF
()
FIND_PACKAGE
(
PythonInterp
${
pyVersion
}
REQUIRED
)
FIND_PACKAGE
(
PythonLibs
${
pyVersion
}
REQUIRED
)
MESSAGE
(
STATUS
"PYTHON_EXECUTABLE:FILEPATH=
${
PYTHON_EXECUTABLE
}
"
)
MESSAGE
(
STATUS
"PYTHON_LIBRARY:FILEPATH=
${
PYTHON_LIBRARY
}
"
)
...
...
@@ -114,6 +133,8 @@ MESSAGE(STATUS "PYTHON_FRAMEWORK_INCLUDES=${PYTHON_FRAMEWORK_INCLUDES}")
MESSAGE
(
STATUS
"PYTHONLIBS_VERSION_STRING=
${
PYTHONLIBS_VERSION_STRING
}
"
)
MESSAGE
(
STATUS
"Python_FRAMEWORKS=
${
Python_FRAMEWORKS
}
"
)
# -- Search for SWIG
FIND_PACKAGE
(
SWIG REQUIRED
)
IF
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
# not MSVC because of nmake & jom
...
...
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