Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
1fc5bfcd
Commit
1fc5bfcd
authored
8 years ago
by
testcdash Nicolas Bellot
Committed by
hhakim
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
modif find matlab windows
parent
a965b6a1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/findMatlab.cmake
+32
-5
32 additions, 5 deletions
CMake/findMatlab.cmake
CMake/find_matlab_path.bat
+12
-7
12 additions, 7 deletions
CMake/find_matlab_path.bat
CMakeLists.txt
+0
-2
0 additions, 2 deletions
CMakeLists.txt
with
44 additions
and
14 deletions
CMake/findMatlab.cmake
+
32
−
5
View file @
1fc5bfcd
...
...
@@ -41,13 +41,40 @@ if(UNIX)
#message(STATUS "MATLAB_DIR_TMP 4 = ${MATLAB_DIR_TMP}")
elseif
(
WIN32
)
if
(
$ENV{MATLAB_EXE_DIR_TMP}} MATCHES matlab
)
message
(
STATUS
"MATLAB_DIR_TMP = $ENV{MATLAB_EXE_DIR_TMP}"
)
set
(
MATLAB_DIR_TMP $ENV{MATLAB_EXE_DIR_TMP}
)
exec_program
(
"
${
CMAKE_SOURCE_DIR
}
/CMake/find_matlab_path.bat"
)
FILE
(
READ
"
${
PROJECT_BINARY_DIR
}
/logPath.txt"
contents
)
#message(STATUS "contents=${contents}")
#STRING(REGEX REPLACE "\n" "" contents "${contents}")
# On enregistre la premiére ligne du fichier logPath.txt comme chemin de matlab.
# Si plusieurs versions de matlab, WARNING
string
(
REGEX REPLACE
"(
\n
)[a-zA-Z0-9_/
\\
:.
\n
]+"
"
\\
1"
contents1
"
${
contents
}
"
)
string
(
REGEX REPLACE
"
\n
"
""
contents1
"
${
contents1
}
"
)
# On garde la 2éme ligne
string
(
REGEX REPLACE
"(
\n
)[a-zA-Z0-9_/
\\
:.]+(
\n
)"
"
\\
1"
contents2tmp
"
${
contents
}
"
)
string
(
REGEX REPLACE
"(
\n
)[a-zA-Z0-9_/
\\
:.
\n
]+"
"
\\
1"
contents2
"
${
contents2tmp
}
"
)
string
(
REGEX REPLACE
"
\n
"
""
contents2
"
${
contents2
}
"
)
#message(STATUS "contents1=${contents1}")
#message(STATUS "contents2tmp=${contents2tmp}")
#message(STATUS "contents2=${contents2}")
set
(
MATLAB_EXE_DIR_TMP
"
${
contents1
}
"
)
set
(
MATLAB_EXE_DIR_TMP2
"
${
contents2
}
"
)
message
(
STATUS
"MATLAB_EXE_DIR_TMP=
${
MATLAB_EXE_DIR_TMP
}
"
)
message
(
STATUS
"MATLAB_EXE_DIR_TMP2=
${
MATLAB_EXE_DIR_TMP2
}
"
)
message
(
STATUS
"If you want to choose an other version of Matlab, please add environment variable MATLAB_EXE_DIR "
)
if
(
$ENV{MATLAB_EXE_DIR}} MATCHES matlab
)
#message(STATUS "MATLAB_DIR_TMP = $ENV{MATLAB_EXE_DIR_TMP}")
set
(
MATLAB_DIR_TMP $ENV{MATLAB_EXE_DIR}
)
elseif
(
${
MATLAB_EXE_DIR_TMP
}
MATCHES matlab
)
#message(STATUS "MATLAB_DIR_TMP = ${MATLAB_EXE_DIR_TMP}")
set
(
MATLAB_DIR_TMP
${
MATLAB_EXE_DIR_TMP
}
)
else
()
message
(
STATUS
"MATLAB_DIR_TMP = $ENV{MATLAB_EXE_DIR
_TMP
}"
)
message
(
STATUS
"MATLAB_DIR_TMP = $ENV{MATLAB_EXE_DIR}"
)
message
(
STATUS
"MATLAB_DIR_TMP is not available. It corresponds to the path of matlab.exe }"
)
message
(
FATAL_ERROR
"Unknown path of matlab.exe. Please
launch ./CMake/find_matlab_path.bat before cmake command.
"
)
message
(
FATAL_ERROR
"Unknown path of matlab.exe. Please
add environment variable MATLAB_EXE_DIR
"
)
endif
()
#message(STATUS "where /R \"C:\\Program Files\\MATLAB\" matlab.exe")
...
...
This diff is collapsed.
Click to expand it.
CMake/find_matlab_path.bat
+
12
−
7
View file @
1fc5bfcd
@echo
off
set
"find_exe=matlab.exe"
(
where
matlab
.exe
)
>
logPath
.txt
(
where
matlab
.exe
)
>
>
logPath
.txt
(
where
/R
"C:\\Program Files\\MATLAB"
matlab
.exe
)
>>
logPath
.txt
(
where
/R
"C:\\Program Files (x86)\\MATLAB"
matlab
.exe
)
>>
logPath
.txt
REM set MATLAB_EXE_DIR_TMP=
REM set /p MATLAB_EXE_DIR_TMP=<logPath.txt
set
MATLAB_EXE_DIR_TMP
=
set
/p
MATLAB_EXE_DIR_TMP
=<
logPath
.txt
REM for /f "delims=" %%i in ('type logPath.txt') do (set MATLAB_DIR_TMP=%%i && echo %%i)
echo
environment
variable
is
defined
for
matlab
Path
:
%MATLAB_EXE_DIR_TMP%
REM set /a cpt=1
REM for /f "tokens=*" %%a In (logPath.txt) do (
REM echo --
REM echo %%a
REM set MATLAB_EXE_DIR_TMP%cpt%=%%a
REM set /a cpt=%cpt%+1
REM echo --
REM )
REM echo environment variable is defined for matlab Path : %MATLAB_EXE_DIR_TMP%
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
0
−
2
View file @
1fc5bfcd
...
...
@@ -30,8 +30,6 @@ if(UNIX)
endif
(
APPLE
)
else
(
UNIX
)
message
(
STATUS
"WINDOWS OPERATING SYSTEM"
)
exec_program
(
"
${
CMAKE_SOURCE_DIR
}
/CMake/find_matlab_path.bat"
)
#exec_program("which matlab | xargs echo" OUTPUT_VARIABLE MATLAB_DIR_TMP)
endif
(
UNIX
)
###### tmp directory where temporary objects will be located ######
...
...
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