Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ef8ab01c authored by Jozef Legény's avatar Jozef Legény
Browse files

[Kernel] Add the possibility to hide error locations for releases

- By default enable this option when creating packages

[CORE-841](https://jira.mensiatech.com/browse/CORE-841)
parent 2fa4ceae
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ SET(OV_SDK_VERSION_STRING "0.1.0")
# ----------------------
OPTION(Flag_VerboseOutput "Verbose CMake output" OFF)
SET(OEM_DISTRIBUTION "openvibe" CACHE STRING "The OEM distribution for this build, can be openvibe or mensia")
OPTION(OV_DISPLAY_ERROR_LOCATION ON)
SET(OV_CUSTOM_DEPENDENCIES_PATH "${CMAKE_SOURCE_DIR}/dependencies")
SET(OV_SOURCE_DEPENDENCIES_PATH "${CMAKE_SOURCE_DIR}/dependencies-source")
......@@ -63,6 +64,10 @@ ELSE()
MESSAGE(FATAL_ERROR "OEM_DISTRIBUTION unrecognized (${OEM_DISTRIBUTION}) ! CMake cannot deduce the brand and product names. ")
ENDIF()
IF(OV_DISPLAY_ERROR_LOCATION)
ADD_DEFINITIONS(-DOV_DISPLAY_ERROR_LOCATION)
ENDIF()
IF(NOT DEFINED OV_PACKAGE)
SET(OV_PACKAGE FALSE)
ENDIF(NOT DEFINED OV_PACKAGE)
......
......@@ -17,6 +17,8 @@ set PathSDK=
set PathDep=%root_dir%\dependencies
set OEMDistribution=openvibe
set VerboseOuptut=OFF
set DisplayErrorLocation=ON
goto parameter_parse
......@@ -28,6 +30,7 @@ goto parameter_parse
echo [-d^|--debug] build in debug mode
echo [-r^|--release] build in release mode
echo [--make-package] build zip packages instead of installing files
echo [--hide-error-location] do not display complete error locations
echo [-f^|--force] force option will force the cmake re-run
echo [-v^|--verbose]
echo [--sdk <path to openvibe SDK>]
......@@ -53,7 +56,10 @@ for %%A in (%*) DO (
) else if /i "%%A"=="--release" (
set BuildType=Release
) else if /i "%%A"=="--make-package" (
set PackageOption=TRUE
set PackageOption=TRUE
set DisplayErrorLocation=OFF
) else if /i "%1" == "--hide-error-location" (
set DisplayErrorLocation=OFF
) else if /i "%%A"=="-f" (
set RefreshCMake=T
) else if /i "%%A"=="--force" (
......@@ -101,16 +107,17 @@ echo Build type is set to: %BuildType%. SDK is located at %sdk_dir%
set CallCmake=false
if not exist "%build_dir%\CMakeCache.txt" set CallCmake="true"
if %RefreshCMake%=="true" set CallCmake="true"
if %RefreshCMake%==T set CallCmake="true"
if %CallCmake%=="true" (
cmake %root_dir%\ -G"Ninja" ^
-DCMAKE_BUILD_TYPE=%BuildType% ^
-DCMAKE_INSTALL_PREFIX=%install_dir% ^
-DOPENVIBE_SDK_PATH=!sdk_dir! ^
-DCV_DEPENDENCIES_PATH=!dep_dir!^
-DOEM_DISTRIBUTION=%OEMDistribution% ^
-DOPENVIBE_SDK_PATH=!sdk_dir! ^
-DOV_DISPLAY_ERROR_LOCATION=%DisplayErrorLocation% ^
-DCV_DEPENDENCIES_PATH=!dep_dir!^
-DOEM_DISTRIBUTION=%OEMDistribution% ^
-DOV_PACKAGE=%PackageOption% ^
-DFlag_VerboseOutput=%VerboseOutput%
-DFlag_VerboseOutput=%VerboseOutput%
)
if not "!ERRORLEVEL!" == "0" goto terminate_error
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment