mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
More aggressive build warnings. The cmake configuration is quite fragile. Pay particular attention to quotes around variables
This commit is contained in:
parent
538dbfe585
commit
6fd296c0b0
@ -3,14 +3,15 @@ macro(listify OUT_LIST IN_STRING)
|
||||
endmacro()
|
||||
|
||||
listify(MEX_INCLUDE_DIRS_LIST ${MEX_INCLUDE_DIRS})
|
||||
set(MEX_CXXFLAGS "CXXFLAGS=\$CXXFLAGS -pedantic -Wall -Wextra -Weffc++ -Wno-unused -Wold-style-cast -Wshadow -Wmissing-declarations -Wmissing-include-dirs -Wnon-virtual-dtor")
|
||||
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_BINARY_DIR}/src/*.cpp")
|
||||
foreach(SOURCE_FILE ${SOURCE_FILES})
|
||||
# strip out the filename
|
||||
get_filename_component(FILENAME ${SOURCE_FILE} NAME_WE)
|
||||
# compile the source file using mex
|
||||
# compie the source file using mex
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/+cv/${FILENAME}.${MATLAB_MEXEXT})
|
||||
execute_process(
|
||||
COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} ${MEX_INCLUDE_DIRS_LIST}
|
||||
COMMAND ${MATLAB_MEX_SCRIPT} "${MEX_CXXFLAGS}" ${MEX_INCLUDE_DIRS_LIST}
|
||||
${MEX_LIB_DIR} ${MEX_LIBS} ${SOURCE_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv
|
||||
ERROR_VARIABLE FAILED
|
||||
|
@ -282,7 +282,7 @@ public:
|
||||
|
||||
template <typename Scalar>
|
||||
explicit MxArray(size_t m, size_t n, size_t k=1) : owns_(true) {
|
||||
mwSize dims[] = {m, n, k};
|
||||
mwSize dims[] = { static_cast<mwSize>(m), static_cast<mwSize>(n), static_cast<mwSize>(k) };
|
||||
ptr_ = mxCreateNumericArray(3, dims, Matlab::Traits<Scalar>::ScalarType, Matlab::Traits<>::Real);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user