Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 65d3e9af authored by Adrien Leman's avatar Adrien Leman Committed by hhakim
Browse files

debug release vs debug

parent 7b9606b2
No related branches found
No related tags found
No related merge requests found
......@@ -325,7 +325,6 @@ if (BUILD_MATLAB_MEX_FILES)
set(FAUST_DEMO_FIG_INSTALL_DIR ${FAUST_DEMO_INSTALL_DIR}/Figures CACHE INTERNAL "")
endif(BUILD_MATLAB_MEX_FILES)
message (STATUS "ALAAAAAAAAAAAAAAAAAAAAAA--FAUST_DEMO_INSTALL_DIR=${FAUST_DEMO_INSTALL_DIR}")
## examples directories including some examples of the use of the library FAuST
set(FAUST_BIN_TEST_DIR ${PROJECT_BINARY_DIR}/run_test CACHE INTERNAL "")
......@@ -391,20 +390,76 @@ endif(BUILD_USE_GPU)
###### FLAG for DEBUG or RELEASE TARGETS ######
if(WIN32)
set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR})
# if(CMAKE_BUILD_TYPE MATCHES "Debug")
# set(FAUST_DEBUG_RELEASE "debug")
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/Debug)
# set(FAUST_MATLAB_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/Debug)
# else()
# set(FAUST_DEBUG_RELEASE "release")
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/Release)
# set(FAUST_MATLAB_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/Release)
# endif()
else()
set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR})
endif(WIN32)
#if(WIN32)
# if(CMAKE_BUILD_TYPE MATCHES "Debug")
# # set(FAUST_DEBUG_RELEASE "debug")
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/Debug)
# # set(FAUST_MATLAB_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/Debug)
# elseif(CMAKE_BUILD_TYPE MATCHES "Release")
# # set(FAUST_DEBUG_RELEASE "release")
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/Release)
# # set(FAUST_MATLAB_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/Release)
# else()
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR})
# endif()
#message(STATUS "FAUST_BIN_DIR : ${FAUST_BIN_DIR}")
#else()
# if(CMAKE_BUILD_TYPE MATCHES "Debug")
# # set(FAUST_DEBUG_RELEASE "debug")
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/Debug)
# # set(FAUST_MATLAB_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/Debug)
# elseif(CMAKE_BUILD_TYPE MATCHES "Release")
# # set(FAUST_DEBUG_RELEASE "release")
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/Release)
# # set(FAUST_MATLAB_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/Release)
# else()
# set(FAUST_BIN_DIR ${PROJECT_BINARY_DIR})
# endif()
#message(STATUS "FAUST_BIN_DIR : ${FAUST_BIN_DIR}")
#endif(WIN32)
######################################"
######################################"
# Case of Visual Studio
IF(WIN32)
IF (BUILD_DEBUG)
# Case of debug mode
#SET(FAUST_DEBUG_RELEASE "debug")
SET(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/lib/debug)
ELSE (BUILD_DEBUG)
# Case of release mode
#SET(FAUST_DEBUG_RELEASE "release")
SET(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/lib/release)
ENDIF (BUILD_DEBUG)
ELSE(WIN32)
# Case of Xcode
IF( CMAKE_GENERATOR STREQUAL "Xcode")
# We would like to select a single build mode, would we ?
# or to select it dynamically there is the CMAKE_CFG_INTDIR stuff
IF (BUILD_DEBUG)
SET(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/lib/Debug)
ELSE (BUILD_DEBUG)
SET(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/lib/Release)
ENDIF (BUILD_DEBUG)
ELSE( CMAKE_GENERATOR STREQUAL "Xcode")
# Generic case
SET(FAUST_BIN_DIR ${PROJECT_BINARY_DIR}/lib)
ENDIF(CMAKE_GENERATOR STREQUAL "Xcode")
#SET(MPTK_LIB_DIR_INSTALL ${CMAKE_INSTALL_PREFIX}/mptk/plugins)
ENDIF(WIN32)
message(STATUS "FAUST_BIN_DIR : ${FAUST_BIN_DIR}")
message(STATUS "CMAKE_ARCHIVE_OUTPUT_DIRECTORY : ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${FAUST_BIN_DIR} CACHE STRING "" FORCE)
message(STATUS "CMAKE_ARCHIVE_OUTPUT_DIRECTORY : ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
######################################"
######################################"
######################################"
# adding compiler flags
......@@ -500,6 +555,9 @@ else (BUILD_USE_GPU)
endif(BUILD_MATLAB_MEX_FILES)
endif (BUILD_USE_GPU)
if (BUILD_MATLAB_MEX_FILES)
if (UNIX)
if(APPLE)
......
......@@ -25,12 +25,12 @@ You must too have matlab in your environment PATH. If not please add.
\subsection{Required packages}\label{sec:RequiredPackages}
\paragraph{}Here is a list of packages used in the FA$\mu$ST project. Normally, the installation of this packages are automatically done (see the directory "./externals").
\paragraph{}Here is a list of packages used in the FA$\mu$ST project. The installation of this packages are automatically done. There are nothing to do. (see the directory "./externals").
\begin{itemize}
\item eigen
\item openBlas
\item xml2
\item matio
\item Library eigen \url{http://eigen.tuxfamily.org}
\item Library openBlas \url{http://www.openblas.net}
\item Library xml2 \url{http://xmlsoft.org}
\item Library matio \url{https://sourceforge.net/projects/matio}
\end{itemize}
\subsection{Basic build and installation}\label{sec:UnixBuildInstall}
......@@ -39,7 +39,7 @@ You must too have matlab in your environment PATH. If not please add.
\begin{itemize}
\item Download the FA$\mu$ST package on the website : \url{http://faust.gforge.inria.fr/}
\item Open a command terminal
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, especially the character $\mu$)
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, for example the character $\mu$)
\item Type the following commands :
\begin{lstlisting}
......@@ -47,7 +47,7 @@ mkdir build
cd build
cmake ..
make
make install
sudo make install % run with administrator privilege
\end{lstlisting}
\end{itemize}
......@@ -55,35 +55,36 @@ make install
\texttt{... \\
-- Configuring done \\
-- Generating done \\
-- Build files have been written to: ./build}
-- Build files have been written to: <./build>}
\paragraph{}The command \texttt{make} will compile the build files.
\paragraph{}The command \texttt{make install} will install in default directory.
\paragraph{}The command \texttt{sudo make install} will install the library and others components in default directory. For that, you must have administrator privilege because the library file \texttt{libfaust.a} is copied in your root path directory. If you don't have administrator privilege, you can make a local install using the following option (see \ref{sec:UnixCustomInstall}): \\
\texttt{cmake .. -DCMAKE\_INSTALL\_PREFIX="<Home/Local/Project/Output>"}
\section{Custom - Advanced Installation}\label{sec:UnixCustomInstall}
\paragraph{}The project FA$\mu$ST can be configured with optional parameters, for example if you want to install FA$\mu$ST in a different folder or to enable the parallel computing using multithread capacities provided by the OS. This build system can be parametrized using the Cmake Graphical User Interface, or the Cmake command line tools.
\paragraph{}The Cmake Graphical User Interface ccmake allows you to selected option input. When using the \texttt{ccmake} command in your build directory, the Cmake GUI appears in the console (see figure \ref{fig:ccmake}).
\paragraph{}The Cmake Graphical User Interface ccmake allows you to selected option input. When using the \texttt{ccmake} command in your build directory, the Cmake GUI appears in the console (see fig. \ref{fig:ccmake}).
\begin{figure}[!h] %%[!htbp]
\label{fig:ccmake}
\centering
\includegraphics[scale=0.5]{images/ccmake.jpg}
\caption{ccmake GUI}
\label{fig:ccmake}
\end{figure}
\paragraph{}When scrolling on a value and pressing [enter], this value can be edited, the black underlaid row displays some information about the option and required path to create the build system. In the case of an option press [enter] to toggle the ON/OFF values.
\paragraph{}When scrolling on a value and pressing [enter], this value can be edited, the black underlaid row displays some information about the option and required path to create the build system. In the case of an option press [enter] to toggle the ON/OFF values. You can edit option by press [enter]. For example, press [enter] to edit option \texttt{CMAKE\_INSTALL\_PREFIX} to modify the install directory.
\paragraph{}After choosing options for the build and setting the required fields, press [c] to configure. The configuration of the build system is checked again by Cmake, at the end of this check if the build settings are correct, you can press [g] in order to generate the build system.
\paragraph{} Instead the ccmake GUI, an other possibility to configure and generate the project is to use the command line cmake which can take the option input. Here is the list of available options:
\texttt{$cmake\ ..\ -D<BUILD\_NAME>=<ON/OFF>$}
\begin{itemize}
\item CMAKE\_INSTALL\_PREFIX : Install directory
\item BUILD\_TESTING : Enable the ctest option (default value is ON)
\item BUILD\_DOCUMENTATION : Generating the doxygen documentation (default value is OFF)
\item BUILD\_MULTITHREAD : Enable multithread with OpenMP Multithreading (default value is OFF)
......@@ -103,23 +104,28 @@ progress...
\section{Build FAuST using Xcode on MAC OS}\label{sec:MacInstallXcode}
The Faust tools can be generated using XCode on MAC OS. In this case, the "AppleClang" compiler from Xcode.
To do this, please follow this instructions :
The Faust tools can be generated using XCode on MAC OS. To do this, please follow this instructions :
\begin{itemize}
\item Download the FA$\mu$ST package on the website : \url{http://faust.gforge.inria.fr/}
\item Open a command terminal
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, especially the character $\mu$)
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, for example the character $\mu$)
\item Type the following commands :
\begin{lstlisting}
mkdir build
cd build
cmake .. -G "Xcode"
xcodebuild -list -project FAUST.xcodeproj %% list all target of the project
xcodebuild -target "ALL_BUILD" build
xcodebuild -target "INSTALL" build
%% you can manually generated the target using visual studio FAUST.sln
%% list all target of the project
xcodebuild -list -project FAUST.xcodeproj
%% Build the targets
xcodebuild -configuration "Release" -target "ALL_BUILD" build
%% performs the "make install"
xcodebuild -configuration "Release" -target "install" build
\end{lstlisting}
\paragraph{NOTE: }You can manually generated the target using visual studio from file \texttt{FAUST.sln}.
\end{itemize}
......@@ -63,7 +63,7 @@ Depending to your C++ compiler (MinGW or Visual studio), refer to the right part
\begin{itemize}
\item Open a command terminal
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, especially the character $\mu$)
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, for example the character $\mu$)
\item Type the following commands :
\begin{lstlisting}
......@@ -71,8 +71,11 @@ mkdir build
cd build
cmake -G "MinGW Makefiles" ..
make
make install
make install % run with administrator privilege
\end{lstlisting}
\paragraph{NOTE:} You can generated the CodeBlocks project with the following command : \\
\texttt cmake -G "CodeBlocks - MinGW Makefiles" ..
\end{itemize}
......@@ -88,9 +91,9 @@ make install
\end{figure}
\item Set the "Where is the source code:" text box with the path of the directory where the source files are located (F:/WORK/FAUST/faust) and the "Where to build the binaries:" with the path of the directory where you want to build the library and executable files (F:/WORK/FAUST/faust/build). (see \ref{fig:cmakeGUI-1}).
\item Set the "Where is the source code:" text box with the path of the directory where the source files are located (F:/WORK/FAUST/faust) and the "Where to build the binaries:" with the path of the directory where you want to build the library and executable files (F:/WORK/FAUST/faust/build). (see fig. \ref{fig:cmakeGUI-1}).
When clicking for the first time on the [Configure] button, CMake will ask for the build tool you want to use. The build system type depends on the builder you want to use, in our case this is the Visual Studio X (X depending the version of Visual installed on the computer) chain tools. (see \ref{fig:cmakeGUI-2}).
When clicking for the first time on the [Configure] button, CMake will ask for the build tool you want to use. The build system type depends on the builder you want to use, in our case this is the Visual Studio X (X depending the version of Visual installed on the computer) chain tools. (see fig. \ref{fig:cmakeGUI-2}).
\begin{figure}[!h]
......@@ -123,7 +126,7 @@ When clicking for the first time on the [Configure] button, CMake will ask for t
\begin{itemize}
\item Open a command terminal
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, especially the character $\mu$)
\item Place you in your local FA$\mu$ST directory (NOTE: don't use any special character in your FAUST directory path, for example the character $\mu$)
\item Type the following commands :
\begin{lstlisting}
......
......@@ -13,4 +13,4 @@ For more information on the FAuST Project, please visit the website of the proje
The FAuST Toolbox is distributed under the terms of the GNU Affero General Public License. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see \url{http://www.gnu.org/licenses/}.
\paragraph{Organization: }First chapter\ref{sec:InstallUnix} explains how to install the library FA$\mu$ST for UNIX platform and second chapter \ref{sec:WinInstall} corresponds to the Windows installation. The chapter \ref{sec:firstUse} shows quickly how to used this library and finally an example is proposed in chapter \ref{sec:example}.
\ No newline at end of file
\paragraph{Organization: }First chapter \ref{sec:InstallUnix} explains how to install the library FA$\mu$ST for UNIX platform and second chapter \ref{sec:WinInstall} corresponds to the Windows installation. The chapter \ref{sec:firstUse} shows quickly how to used this library and finally an example is proposed in chapter \ref{sec:example}.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment