Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fossils
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
Boman Romain
fossils
Commits
a06019d3
Commit
a06019d3
authored
2 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
fix mingw build
parent
626f55d9
No related branches found
No related tags found
No related merge requests found
Pipeline
#7190
passed
2 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cxxfem/CMakeLists.txt
+1
-1
1 addition, 1 deletion
cxxfem/CMakeLists.txt
cxxfem/src/CMakeLists.txt
+4
-1
4 additions, 1 deletion
cxxfem/src/CMakeLists.txt
envs/win-mingw64.cmd
+7
-81
7 additions, 81 deletions
envs/win-mingw64.cmd
with
12 additions
and
83 deletions
cxxfem/CMakeLists.txt
+
1
−
1
View file @
a06019d3
...
...
@@ -59,7 +59,7 @@ IF(FEM_USE_MKL)
MESSAGE
(
STATUS
"MKL_INCLUDE_DIRS=
${
MKL_INCLUDE_DIRS
}
"
)
# library (mkl_rt.so) searched using LIBRARY_PATH (Linux/macOS) or LIB (windows)
FIND_LIBRARY
(
MKL_LIBRARIES mkl_rt PATHS ENV LIBRARY_PATH
)
IF
(
MSVC
)
IF
(
MSVC
OR MINGW
)
# with MSVC+MKL, we must link to intel OpenMP so that we have only 1 OpenMP lib
FIND_LIBRARY
(
INTEL_OPENMP libiomp5md
)
MESSAGE
(
STATUS
"INTEL_OPENMP=
${
INTEL_OPENMP
}
"
)
...
...
This diff is collapsed.
Click to expand it.
cxxfem/src/CMakeLists.txt
+
4
−
1
View file @
a06019d3
...
...
@@ -8,9 +8,12 @@ ENDIF()
IF
(
FEM_USE_MKL
)
TARGET_LINK_LIBRARIES
(
fem PUBLIC
${
MKL_LIBRARIES
}
)
TARGET_INCLUDE_DIRECTORIES
(
fem PUBLIC
${
MKL_INCLUDE_DIRS
}
)
# with MSVC+MKL, we must link to intel OpenMP so that we have only 1 OpenMP lib
# with MSVC+MKL
or MinGW+MKL
, we must link to intel OpenMP so that we have only 1 OpenMP lib
IF
(
MSVC
)
TARGET_LINK_OPTIONS
(
fem PUBLIC -NODEFAULTLIB:
"vcomp"
-NODEFAULTLIB:
"vcompd"
)
TARGET_LINK_LIBRARIES
(
fem PUBLIC
${
INTEL_OPENMP
}
)
ENDIF
()
IF
(
MINGW
)
TARGET_LINK_LIBRARIES
(
fem PUBLIC
${
INTEL_OPENMP
}
)
ENDIF
()
ENDIF
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
envs/win-mingw64.cmd
+
7
−
81
View file @
a06019d3
@echo
off
:: This file opens a terminal which allows you to compile the code with
:: a 64-bit mingw compiler
:: https://mingw-w64.org/
:: https://www.msys2.org/
::
:: HOW TO USE THIS FILE?
:: [check the PATHs below]
:: [run this file]
:: mkdir build
:: cd build
:: cmake ..
:: make
:: ctest
::
:: How to clean the "build" folder using cmd line?
:: cd build
:: rd /q /s .
:: MinGW on Windows
echo
setting
MinGW64
environment
...
:: set the location of gmsh SDK / mingw compiler
set
GMSHSDK
=
%~dp0
..\lib\gmsh
-sdk
set
EIGEN
=
%~dp0
..\lib\eigen
set
COMPILERPATHS
=
C
:\msys64\mingw64\bin
;
C
:\mingw
-w
64
\mingw64\bin
:: perform some tests...
IF
NOT
EXIST
%GMSHSDK%
(
ECHO
-
gmsh
-sdk
NOT
found
in
%GMSHSDK%!!
PAUSE
EXIT
/B
)
ELSE
(
ECHO
-
gmsh
-sdk
found
in
%GMSHSDK%
.
)
IF
NOT
EXIST
%EIGEN%
(
ECHO
-
eigen
NOT
found
in
%EIGEN%!!
PAUSE
EXIT
/B
)
ELSE
(
ECHO
-
eigen
found
in
%EIGEN%
.
)
FOR
%%a
IN
(
%COMPILERPATHS%
)
DO
(
IF
EXIST
%%a
(
ECHO
-
compiler
found
in
%%a
.
SET
COMPILERPATH
=
%%a
)
ELSE
(
IF
NOT
DEFINED
COMPILERPATH
(
ECHO
-
compiler
not
found
in
%%a
.
)
)
)
IF
NOT
DEFINED
COMPILERPATH
(
ECHO
=
^>
compiler
NOT
found
!
PAUSE
EXIT
/B
)
set
COMPILERPATH
=
"C:\mingw-w64"
:: Intel MKL
set
"INTELPATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows"
set
LIB
=
%INTELPATH%
\mkl\lib\intel64_win
;
%INTELPATH%
\compiler\lib\intel64_win
;
%LIB%
set
INCLUDE
=
%INTELPATH%
\mkl\include
;
%INCLUDE%
:: does not always work
@REM call %INTELPATH%\mkl\bin\mklvars.bat intel64 vs2019
:: where is gmsh.exe and gmsh-**.dll ?
set
PATH
=
%GMSHSDK%
\bin
;
%GMSHSDK%
\lib
;
%PATH%
:: where is gmsh.h ?
set
INCLUDE
=
%EIGEN%
;
%GMSHSDK%
\include
;
%INCLUDE%
:: where is gmsh.lib ?
set
LIB
=
%GMSHSDK%
\lib
;
%LIB%
:: where is gmsh.py ? (required only if you want to use the python API)
set
PYTHONPATH
=
%GMSHSDK%
\lib
;
%PYTHONPATH%
:: add path to the compiler to the PATH
set
PATH
=
%COMPILERPATH%
;
%PATH%
:: add current folder to PATH for cmake/make aliases
set
PATH
=
%~dp0
;
%PATH%
:: clear local vars
set
GMSHSDK
=
set
EIGEN
=
set
COMPILERPATHS
=
set
COMPILERPATH
=
@REM set LIB=%INTELPATH%\mkl\lib\intel64_win;%INTELPATH%\compiler\lib\intel64_win;%LIB%
@REM set INCLUDE=%INTELPATH%\mkl\include;%INCLUDE%
call
"
%INTELPATH%
\mkl\bin\mklvars.bat"
intel64
vs2019
::
open terminal
::
set the environment of the MinGW compiler
CD
/d
"
%~dp0
"
CD
..
%comspec%
/
K
%comspec%
/
k
"
%COMPILERPATH%
\mingw-w64.bat"
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