Browse Source

cmake: added recursive source file scan, added doc of cmake build functions

Johannes Ruehle 11 năm trước cách đây
mục cha
commit
86f2f2fe44

+ 15 - 16
CMakeLists.txt

@@ -7,17 +7,14 @@ include(CheckIncludeFiles)
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
 
-include(cmake/OpenCVUtils.cmake REQUIRED) #for OCV_OPTION (gui)
-#include(cmake/OpenCVDetectCXXCompiler.cmake REQUIRED)
 include(cmake/NiceModules.cmake REQUIRED)
-#include(cmake/OpenCVCompilerOptions.cmake REQUIRED)
 
 # The version number.
 set(NICELibrary_VERSION_MAJOR 1)
 set(NICELibrary_VERSION_MINOR 2)
 set(NICE_VERSION ${NICELibrary_VERSION_MAJOR}.${NICELibrary_VERSION_MINOR})
 
-OCV_OPTION(NICE_BUILD_DEBUG "NICE Debug Build for debugging" OFF )
+NICE_OPTION(NICE_BUILD_DEBUG "NICE Debug Build for debugging" OFF )
 if(NICE_BUILD_DEBUG)
   message(STATUS "NICE debug build enabled")
   set (CMAKE_BUILD_TYPE Debug)
@@ -25,7 +22,7 @@ else()
   set (CMAKE_BUILD_TYPE Release)
 endif()
 
-OCV_OPTION(CMAKE_VERBOSE "Verbose mode" OFF )
+NICE_OPTION(CMAKE_VERBOSE "Verbose mode" OFF )
 if(CMAKE_VERBOSE)
   set(CMAKE_VERBOSE_MAKEFILE 1)
 endif()
@@ -34,7 +31,9 @@ set(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR})
 
 set(NICE_BUILD_LIBS_STATIC_SHARED STATIC)
 
-OCV_OPTION(WITH_BOOST "Build with Boost support" OFF)
+set(NICE_SOURCEFILES_FIND_GLOBALLYRECURSIVE ON CACHE STRING "Scan a sublibraries directory for source files instead of using an explicit src file list")
+
+NICE_OPTION(WITH_BOOST "Build with Boost support" OFF)
 if(WITH_BOOST)
   set(Boost_USE_STATIC_LIBS ON)
   FIND_PACKAGE(Boost COMPONENTS date_time filesystem)
@@ -58,14 +57,14 @@ else()
   message(STATUS "CppUnit not found")
 ENDIF()
 
-OCV_OPTION(WITH_DBV_LIBRARIES "Build with DBV extern librares" OFF)
+NICE_OPTION(WITH_DBV_LIBRARIES "Build with DBV extern librares" OFF)
 if(WITH_DBV_LIBRARIES)
 
   set(NICE_DBV_LIBRARIES_DIR "/home/dbv/3rdparty64-gcc43/")
   if(EXISTS "${NICE_DBV_LIBRARIES_DIR}")
     message(STATUS "using DBV extern librares in ${NICE_DBV_LIBRARIES_DIR}")
 
-    OCV_OPTION(WITH_IPP "Build with Intel IPP support" ON)
+    NICE_OPTION(WITH_IPP "Build with Intel IPP support" ON)
     if(WITH_IPP)
       set(ENV{IPPROOT} "${NICE_DBV_LIBRARIES_DIR}ipp53/")
 
@@ -86,7 +85,7 @@ if(WITH_DBV_LIBRARIES)
   endif()
 endif()
 
-OCV_OPTION(WITH_OPENMP "Build with OpenMP support" ON)
+NICE_OPTION(WITH_OPENMP "Build with OpenMP support" ON)
 if(WITH_OPENMP)
   find_package(OpenMP)
   if (OPENMP_FOUND)
@@ -102,7 +101,7 @@ if (PNG_FOUND)
   ADD_DEFINITIONS( "-DNICE_USELIB_PNG")
 endif()
 
-OCV_OPTION(WITH_MATIO "Build with Matio and HDF5 support" OFF)
+NICE_OPTION(WITH_MATIO "Build with Matio and HDF5 support" OFF)
 if(WITH_MATIO)
   find_package(HDF5)
   if(HDF5_FOUND)
@@ -116,7 +115,7 @@ if(WITH_MATIO)
   endif()
 endif()
 
-OCV_OPTION(WITH_IMAGEMAGICK "Build with ImageMagick++" OFF)
+NICE_OPTION(WITH_IMAGEMAGICK "Build with ImageMagick++" OFF)
 if(WITH_IMAGEMAGICK)
   find_package(ImageMagick COMPONENTS Magick++ MagickCore)
   if(ImageMagick_FOUND)
@@ -128,7 +127,7 @@ if(WITH_IMAGEMAGICK)
   endif()
 endif()
 
-OCV_OPTION(WITH_QT "Build with Qt" ON)
+NICE_OPTION(WITH_QT "Build with Qt" ON)
 if(WITH_QT)
   FIND_PACKAGE(Qt4)# COMPONENTS Qt3Support QtOpenGl)
   SET(QT_USE_QTOPENGL TRUE)
@@ -143,7 +142,7 @@ if(WITH_QT)
   endif()
 endif()
 
-OCV_OPTION(WITH_OPENGL "Build with OpenGL" ON)
+NICE_OPTION(WITH_OPENGL "Build with OpenGL" ON)
 if(WITH_OPENGL)
   find_package(OpenGL)
   if(OPENGL_FOUND)
@@ -192,7 +191,7 @@ if(MSVC)
   ADD_DEFINITIONS("-DNOMINMAX")
 endif()
 
-OCV_OPTION(BUILD_UNITTESTS "Build all unit tests" ON IF CPPUNIT_FOUND)
+NICE_OPTION(BUILD_UNITTESTS "Build all unit tests" ON IF CPPUNIT_FOUND)
 #if(CPPUNIT_FOUND)
 #	set(BUILD_UNITTESTS ON)
 #else()
@@ -203,7 +202,7 @@ if( BUILD_UNITTESTS)
 	include(CTest)
 endif()
 
-OCV_OPTION(BUILD_PROGRAMS "Build all programs" ON)
+NICE_OPTION(BUILD_PROGRAMS "Build all programs" ON)
 
 set(OPENCV_LIB_INSTALL_PATH lib)
 
@@ -220,7 +219,7 @@ foreach(_curSubdir ${__listSubDirs})
 	if(EXISTS "${__modpath}/CMakeLists.txt")
 		#ADD_SUBDIRECTORY(${__modpath})
 	    LIST(APPEND __listSubLibs ${_curSubdir})
-	  OCV_OPTION(BUILD_LIB_${_curSubdir} "Build library ${_curSubdir}" ON)
+	  NICE_OPTION(BUILD_LIB_${_curSubdir} "Build library ${_curSubdir}" ON)
 	endif()
 endforeach()
 

+ 170 - 14
cmake/NiceModules.cmake

@@ -1,3 +1,13 @@
+####################################################################################
+# Help function for building the NICE library and its sub-libraries.
+# Inspired by the OpenCV cmake build system.
+#
+# Author: Johannes Ruehle
+# Date: 2014-02-17
+#
+####################################################################################
+
+
 # get a list of all sub directories in curdir
 MACRO(SUBDIRLIST result curdir)
   FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
@@ -19,6 +29,96 @@ macro(nice_get_real_path VAR PATHSTR)
   endif()
 endmacro()
 
+# get the source files and store them in the variables:
+# ${nice_${the_library}_TESTFILES_SRC} (unit test cpps)
+# ${nice_${the_library}_PROGFILES_SRC} (progs cpps)
+# ${nice_${the_library}_SRC} (library cpp and tcc excluding progs and unit test cpps)
+# ${nice_${the_library}_HDR} (all library header files)
+#  
+# Two methods for obtaining the source files:
+# 1) recursively scan all subdirectories
+# cmake variable NICE_SOURCEFILES_FIND_GLOBALLYRECURSIVE has to be set and to be true (1).
+#   Notes:
+#   - To exclude certain source files from appending in the source var, use the file black listing 
+#   in a file "list_exclude_from_build.cmake" by adding it to the variable "list_exclude_from_build_SRC" 
+#   in that file.
+#   - All *moc_* files will be removed from the source file list variables
+# 2) use the given *.cmake files that define variables containing the source and header files to be used for build:
+#     corefiles.cmake (Source files for Library build)
+#     progfiles.cmake (source files for progam builds)
+#     testfiles.cmake (source files for unit test builds)
+#
+#
+#Note: Variable ${the_library} contains the current (sub-)library name that called this function, 
+# e.g. ${the_library} == 'core', ${the_library}=='vislearning'
+#
+# Author: Johannes Ruehle
+# Date: 2014-02-17
+#
+macro(nice_get_source_files)
+  if(NICE_SOURCEFILES_FIND_GLOBALLYRECURSIVE)
+    message(STATUS "Recursively scanning for source files")
+
+
+    #include local file containing a list of files to be excluded from compilation
+    #list is in variable list_exclude_from_build_SRC
+    if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/list_exclude_from_build.cmake")
+      #message(STATUS "exclude list found")
+      include(list_exclude_from_build.cmake)
+      message(STATUS "exclude list:${list_exclude_from_build_SRC}")
+    endif()
+
+
+    ### Get all unit test cpp files recursively
+    set(nice_${the_library}_TESTFILES_SRC "")
+    set(nice_${the_library}_PROGFILES_SRC "")
+    set(nice_${the_library}_SRC"")
+    
+
+    message(STATUS "CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
+    file(GLOB_RECURSE list_tmp1 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.cpp *.tcc *.c)
+    #message(STATUS "list_tmp1: ${list_tmp1}")
+    foreach( t_SrcFile ${list_tmp1})
+      if( NOT t_SrcFile MATCHES "moc_" )
+        if( t_SrcFile MATCHES "tests/" )
+          #message(STATUS "test: ${t_SrcFile}")
+          LIST(APPEND nice_${the_library}_TESTFILES_SRC ${t_SrcFile})
+        elseif( t_SrcFile MATCHES "progs/" )
+          #message(STATUS "prog: ${t_SrcFile}")
+          LIST(APPEND nice_${the_library}_PROGFILES_SRC ${t_SrcFile})
+        else()
+          LIST(APPEND nice_${the_library}_SRC ${t_SrcFile})
+        endif()
+      endif()
+    endforeach()
+
+
+    ### Get all cpp and tcc files recursively but exclude progs and unit test files
+    #file(GLOB_RECURSE nice_${the_library}_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.tcc)
+    #filter out source files listed on the blacklist to be excluded from build
+    if(list_exclude_from_build_SRC)
+      list( REMOVE_ITEM nice_${the_library}_SRC ${list_exclude_from_build_SRC} )  
+      list( REMOVE_ITEM nice_${the_library}_TESTFILES_SRC ${list_exclude_from_build_SRC} )  
+    endif()      
+
+    message(STATUS "globallyrecusive_tests: ${nice_${the_library}_TESTFILES_SRC}")
+    message(STATUS "globallyrecusive_progs: ${nice_${the_library}_PROGFILES_SRC}")
+
+    ### Get all header files recursively
+    file(GLOB_RECURSE nice_${the_library}_HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
+    
+  else()
+    message(STATUS "Using source files from file lists (*.cmake)")
+    #define variable nice_<libname>_HDR and nice_<libname>_SRC for library header and source files (don't include progs and test source files here)
+    include( corefiles.cmake)
+
+    #define variable nice_<libname>_PROGFILES_HDR and nice_<libname>_PROGFILES_SRC for program header and source files (don't include library and test source files here)
+    include( progfiles.cmake)
+
+    #define variable nice_<libname>_TESTFILES_HDR and nice_<libname>_TESTFILES_SRC for unit test header and source files (don't include library and progs source files here)
+    include( testfiles.cmake) 
+  endif()
+endmacro()
 
 macro(nice_build_library)
   ADD_LIBRARY("nice_${the_library}" ${NICE_BUILD_LIBS_STATIC_SHARED} ${nice_${the_library}_HDR} ${nice_${the_library}_SRC})
@@ -31,8 +131,19 @@ macro(nice_build_library)
 endmacro()
 
 
-#using variables "the_library"
-#and subvariables ${nice_${the_library}_PROGFILES_SRC}
+# Create builds for all programs that are in the subvariable ${nice_${the_library}_PROGFILES_SRC}
+# and build them into "bin/${the_library}"
+#
+# Variable BUILD_PROGRAMS has to be set and true to invoke progam build. The Variable is controllable 
+# via the main CMakeLists.txt file (or ccmake)
+#
+#Note: Variable ${the_library} contains the current (sub-)library name that called this function, 
+# e.g. ${the_library} == 'core', ${the_library}=='vislearning'
+# using subvariables ${nice_${the_library}_PROGFILES_SRC}
+#
+# Author: Johannes Ruehle
+# Date: 2014-02-17
+#
 macro(nice_add_progs)
 
   if(BUILD_PROGRAMS)
@@ -40,7 +151,7 @@ macro(nice_add_progs)
     
     foreach(__progcpp ${nice_${the_library}_PROGFILES_SRC})
       get_filename_component(__progname ${__progcpp} NAME_WE )
-      message(STATUS "progname: ${__progname} ${__progcpp}")
+      #message(STATUS "progname: ${__progname} ${__progcpp}")
     
       set(prog_target_name "${the_library}_${__progname}")
       ADD_EXECUTABLE( ${prog_target_name} ${__progcpp})
@@ -56,8 +167,18 @@ macro(nice_add_progs)
 
 endmacro()
 
-#using variables "the_library"
-#and subvariables ${nice_${the_library}_TESTFILES_SRC}
+# Create unit test (using library CppUnitTest) for all cpp files in the subvariable ${nice_${the_library}_TESTFILES_SRC}
+# and build them into "bin/${the_library}"
+#
+# Variable BUILD_UNITTESTS has to be set and true to invoke unit test building. 
+# The Variable is controllable via the main CMakeLists.txt file (or ccmake)
+#
+#Note: Variable ${the_library} contains the current (sub-)library name that called this function, 
+# e.g. ${the_library} == 'core', ${the_library}=='vislearning'
+#
+# Author: Johannes Ruehle
+# Date: 2014-02-17
+#
 macro(nice_add_unittests)
 
   if(BUILD_UNITTESTS)
@@ -77,18 +198,53 @@ macro(nice_add_unittests)
       SET_PROPERTY(TARGET ${__testname} PROPERTY FOLDER "unittests/${the_library}")
       ADD_TEST(NAME ${__testname} WORKING_DIRECTORY ${__testname_dir} COMMAND ${__testname})
     endforeach()
+  endif()
+
+endmacro()
 
-#     INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR})
-#     message(STATUS "building tests:")
-# 
-#       ADD_EXECUTABLE( "cppunits_${the_library}" ../templates/cppUnitTestRunner.cpp ${nice_${the_library}_TESTFILES_SRC})
-#       TARGET_LINK_LIBRARIES("cppunits_${the_library}" "nice_${the_library}" ${CPPUNIT_LIBRARIES} )
-# 
-#       INSTALL(TARGETS "cppunits_${the_library}" DESTINATION "tests/${the_library}")
-#       SET_PROPERTY(TARGET "cppunits_${the_library}" PROPERTY FOLDER "unittests/${the_library}")
-#       ADD_TEST("cppunits_${the_library}" "cppunits_${the_library}")
 
+# Provides an option that the user can optionally select.
+# Can accept condition to control when option is available for user.
+# Usage:
+#   option(<option_variable> "help string describing the option" <initial value or boolean expression> [IF <condition>])
+# 
+# CopyRight: OpenCV
+macro(NICE_OPTION variable description value)
+  set(__value ${value})
+  set(__condition "")
+  set(__varname "__value")
+  foreach(arg ${ARGN})
+    if(arg STREQUAL "IF" OR arg STREQUAL "if")
+      set(__varname "__condition")
+    else()
+      list(APPEND ${__varname} ${arg})
+    endif()
+  endforeach()
+  unset(__varname)
+  if("${__condition}" STREQUAL "")
+    set(__condition 2 GREATER 1)
   endif()
 
+  if(${__condition})
+    if("${__value}" MATCHES ";")
+      if(${__value})
+        option(${variable} "${description}" ON)
+      else()
+        option(${variable} "${description}" OFF)
+      endif()
+    elseif(DEFINED ${__value})
+      if(${__value})
+        option(${variable} "${description}" ON)
+      else()
+        option(${variable} "${description}" OFF)
+      endif()
+    else()
+      option(${variable} "${description}" ${__value})
+    endif()
+  else()
+    unset(${variable} CACHE)
+  endif()
+  unset(__condition)
+  unset(__value)
 endmacro()
 

+ 0 - 285
cmake/OpenCVCompilerOptions.cmake

@@ -1,285 +0,0 @@
-if(MINGW)
-  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
-      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
-    endforeach()
-  endif()
-
-  if(CMAKE_COMPILER_IS_GNUCC)
-    foreach(flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
-      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
-    endforeach()
-  endif()
-endif()
-
-if(MSVC)
-  string(REGEX REPLACE "^  *| * $" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-  string(REGEX REPLACE "^  *| * $" "" CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT}")
-  if(CMAKE_CXX_FLAGS STREQUAL CMAKE_CXX_FLAGS_INIT)
-    # override cmake default exception handling option
-    string(REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"  CACHE STRING "Flags used by the compiler during all build types." FORCE)
-  endif()
-endif()
-
-set(OPENCV_EXTRA_FLAGS "")
-set(OPENCV_EXTRA_C_FLAGS "")
-set(OPENCV_EXTRA_CXX_FLAGS "")
-set(OPENCV_EXTRA_FLAGS_RELEASE "")
-set(OPENCV_EXTRA_FLAGS_DEBUG "")
-set(OPENCV_EXTRA_EXE_LINKER_FLAGS "")
-set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
-set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "")
-
-macro(add_extra_compiler_option option)
-  if(CMAKE_BUILD_TYPE)
-    set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
-  endif()
-  ocv_check_flag_support(CXX "${option}" _varname "${OPENCV_EXTRA_CXX_FLAGS} ${ARGN}")
-  if(${_varname})
-    set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} ${option}")
-  endif()
-
-  ocv_check_flag_support(C "${option}" _varname "${OPENCV_EXTRA_C_FLAGS} ${ARGN}")
-  if(${_varname})
-    set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} ${option}")
-  endif()
-endmacro()
-
-if(MINGW)
-  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838
-  # here we are trying to workaround the problem
-  add_extra_compiler_option(-mstackrealign)
-  if(NOT HAVE_CXX_MSTACKREALIGN)
-    add_extra_compiler_option(-mpreferred-stack-boundary=2)
-  endif()
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCXX)
-  # High level of warnings.
-  add_extra_compiler_option(-W)
-  add_extra_compiler_option(-Wall)
-  add_extra_compiler_option(-Werror=return-type)
-  add_extra_compiler_option(-Werror=non-virtual-dtor)
-  add_extra_compiler_option(-Werror=address)
-  add_extra_compiler_option(-Werror=sequence-point)
-  add_extra_compiler_option(-Wformat)
-  add_extra_compiler_option(-Werror=format-security -Wformat)
-  add_extra_compiler_option(-Wmissing-declarations)
-  add_extra_compiler_option(-Wmissing-prototypes)
-  add_extra_compiler_option(-Wstrict-prototypes)
-  add_extra_compiler_option(-Wundef)
-  add_extra_compiler_option(-Winit-self)
-  add_extra_compiler_option(-Wpointer-arith)
-  add_extra_compiler_option(-Wshadow)
-  add_extra_compiler_option(-Wsign-promo)
-
-  if(ENABLE_NOISY_WARNINGS)
-    add_extra_compiler_option(-Wcast-align)
-    add_extra_compiler_option(-Wstrict-aliasing=2)
-  else()
-    add_extra_compiler_option(-Wno-narrowing)
-    add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
-    add_extra_compiler_option(-Wno-unnamed-type-template-args)
-  endif()
-  add_extra_compiler_option(-fdiagnostics-show-option)
-
-  # The -Wno-long-long is required in 64bit systems when including sytem headers.
-  if(X86_64)
-    add_extra_compiler_option(-Wno-long-long)
-  endif()
-
-  # We need pthread's
-  if(UNIX AND NOT ANDROID)
-    add_extra_compiler_option(-pthread)
-  endif()
-
-  if(OPENCV_WARNINGS_ARE_ERRORS)
-    add_extra_compiler_option(-Werror)
-  endif()
-
-  if(X86 AND NOT MINGW64 AND NOT X86_64 AND NOT APPLE)
-    add_extra_compiler_option(-march=i686)
-  endif()
-
-  # Other optimizations
-  if(ENABLE_OMIT_FRAME_POINTER)
-    add_extra_compiler_option(-fomit-frame-pointer)
-  else()
-    add_extra_compiler_option(-fno-omit-frame-pointer)
-  endif()
-  if(ENABLE_FAST_MATH)
-    add_extra_compiler_option(-ffast-math)
-  endif()
-  if(ENABLE_POWERPC)
-    add_extra_compiler_option("-mcpu=G3 -mtune=G5")
-  endif()
-  if(ENABLE_SSE)
-    add_extra_compiler_option(-msse)
-  endif()
-  if(ENABLE_SSE2)
-    add_extra_compiler_option(-msse2)
-  endif()
-
-  # SSE3 and further should be disabled under MingW because it generates compiler errors
-  if(NOT MINGW)
-    if(ENABLE_SSE3)
-      add_extra_compiler_option(-msse3)
-    endif()
-
-    if(${CMAKE_OPENCV_GCC_VERSION_NUM} GREATER 402)
-      set(HAVE_GCC43_OR_NEWER 1)
-    endif()
-    if(${CMAKE_OPENCV_GCC_VERSION_NUM} GREATER 401)
-      set(HAVE_GCC42_OR_NEWER 1)
-    endif()
-
-    if(HAVE_GCC42_OR_NEWER OR APPLE)
-      if(ENABLE_SSSE3)
-        add_extra_compiler_option(-mssse3)
-      endif()
-      if(HAVE_GCC43_OR_NEWER)
-        if(ENABLE_SSE41)
-           add_extra_compiler_option(-msse4.1)
-        endif()
-        if(ENABLE_SSE42)
-           add_extra_compiler_option(-msse4.2)
-        endif()
-      endif()
-    endif()
-  endif(NOT MINGW)
-
-  if(X86 OR X86_64)
-    if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-      if(ENABLE_SSE2)
-        add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers
-      else()
-        add_extra_compiler_option(-mfpmath=387)
-      endif()
-    endif()
-  endif()
-
-  # Profiling?
-  if(ENABLE_PROFILING)
-    add_extra_compiler_option("-pg -g")
-    # turn off incompatible options
-    foreach(flags CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG
-                  OPENCV_EXTRA_FLAGS_RELEASE OPENCV_EXTRA_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS OPENCV_EXTRA_CXX_FLAGS)
-      string(REPLACE "-fomit-frame-pointer" "" ${flags} "${${flags}}")
-      string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}")
-    endforeach()
-  elseif(NOT APPLE AND NOT ANDROID)
-    # Remove unreferenced functions: function level linking
-    add_extra_compiler_option(-ffunction-sections)
-  endif()
-
-  set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
-  set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
-  if(BUILD_WITH_DEBUG_INFO)
-    set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -ggdb3")
-  endif()
-endif()
-
-if(MSVC)
-  set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS")
-  # 64-bit portability warnings, in MSVC80
-  if(MSVC80)
-    set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Wp64")
-  endif()
-
-  if(BUILD_WITH_DEBUG_INFO)
-    set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE} /debug")
-  endif()
-
-  # Remove unreferenced functions: function level linking
-  set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Gy")
-  if(NOT MSVC_VERSION LESS 1400)
-    set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /bigobj")
-  endif()
-  if(BUILD_WITH_DEBUG_INFO)
-    set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi")
-  endif()
-
-  if(NOT MSVC64)
-    # 64-bit MSVC compiler uses SSE/SSE2 by default
-    if(ENABLE_SSE)
-      set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE")
-    endif()
-    if(ENABLE_SSE2)
-      set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE2")
-    endif()
-  endif()
-
-  if(ENABLE_SSE3)
-    set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE3")
-  endif()
-  if(ENABLE_SSE4_1)
-    set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE4.1")
-  endif()
-
-  if(ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1)
-    set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Oi")
-  endif()
-
-  if(X86 OR X86_64)
-    if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND ENABLE_SSE2)
-      set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /fp:fast")# !! important - be on the same wave with x64 compilers
-    endif()
-  endif()
-endif()
-
-# Extra link libs if the user selects building static libs:
-if(NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID)
-  # Android does not need these settings because they are already set by toolchain file
-  set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++)
-  set(OPENCV_EXTRA_FLAGS "-fPIC ${OPENCV_EXTRA_FLAGS}")
-endif()
-
-# Add user supplied extra options (optimization, etc...)
-# ==========================================================
-set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS}" CACHE INTERNAL "Extra compiler options")
-set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS}" CACHE INTERNAL "Extra compiler options for C sources")
-set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS}" CACHE INTERNAL "Extra compiler options for C++ sources")
-set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE}" CACHE INTERNAL "Extra compiler options for Release build")
-set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG}" CACHE INTERNAL "Extra compiler options for Debug build")
-set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS}" CACHE INTERNAL "Extra linker flags")
-set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE}" CACHE INTERNAL "Extra linker flags for Release build")
-set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "${OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG}" CACHE INTERNAL "Extra linker flags for Debug build")
-
-#combine all "extra" options
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_C_FLAGS}")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OPENCV_EXTRA_FLAGS_RELEASE}")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OPENCV_EXTRA_FLAGS_RELEASE}")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPENCV_EXTRA_FLAGS_DEBUG}")
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${OPENCV_EXTRA_FLAGS_DEBUG}")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENCV_EXTRA_EXE_LINKER_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE}")
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG}")
-
-if(MSVC)
-  # avoid warnings from MSVC about overriding the /W* option
-  # we replace /W3 with /W4 only for C++ files,
-  # since all the 3rd-party libraries OpenCV uses are in C,
-  # and we do not care about their warnings.
-  string(REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-  string(REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
-  string(REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
-
-  if(NOT ENABLE_NOISY_WARNINGS AND MSVC_VERSION EQUAL 1400)
-    ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4510 /wd4610 /wd4312 /wd4201 /wd4244 /wd4328 /wd4267)
-  endif()
-
-  # allow extern "C" functions throw exceptions
-  foreach(flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
-    string(REPLACE "/EHsc-" "/EHs" ${flags} "${${flags}}")
-    string(REPLACE "/EHsc" "/EHs" ${flags} "${${flags}}")
-
-    string(REPLACE "/Zm1000" "" ${flags} "${${flags}}")
-  endforeach()
-
-  if(NOT ENABLE_NOISY_WARNINGS)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY
-  endif()
-endif()

+ 0 - 96
cmake/OpenCVDetectCXXCompiler.cmake

@@ -1,96 +0,0 @@
-# ----------------------------------------------------------------------------
-# Detect Microsoft compiler:
-# ----------------------------------------------------------------------------
-if(CMAKE_CL_64)
-    set(MSVC64 1)
-endif()
-
-if(NOT APPLE)
-  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    set(CMAKE_COMPILER_IS_GNUCXX 1)
-    set(ENABLE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
-  endif()
-  if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
-    set(CMAKE_COMPILER_IS_GNUCC 1)
-    set(ENABLE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
-  endif()
-endif()
-
-# ----------------------------------------------------------------------------
-# Detect Intel ICC compiler -- for -fPIC in 3rdparty ( UNIX ONLY ):
-#  see  include/opencv/cxtypes.h file for related   ICC & CV_ICC defines.
-# NOTE: The system needs to determine if the '-fPIC' option needs to be added
-#  for the 3rdparty static libs being compiled.  The CMakeLists.txt files
-#  in 3rdparty use the CV_ICC definition being set here to determine if
-#  the -fPIC flag should be used.
-# ----------------------------------------------------------------------------
-if(UNIX)
-    if  (__ICL)
-        set(CV_ICC   __ICL)
-    elseif(__ICC)
-        set(CV_ICC   __ICC)
-    elseif(__ECL)
-        set(CV_ICC   __ECL)
-    elseif(__ECC)
-        set(CV_ICC   __ECC)
-    elseif(__INTEL_COMPILER)
-        set(CV_ICC   __INTEL_COMPILER)
-    elseif(CMAKE_C_COMPILER MATCHES "icc")
-        set(CV_ICC   icc_matches_c_compiler)
-    endif()
-endif()
-
-if(MSVC AND CMAKE_C_COMPILER MATCHES "icc")
-    set(CV_ICC   __INTEL_COMPILER_FOR_WINDOWS)
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR (UNIX AND CV_ICC))
-  set(CV_COMPILER_IS_GNU TRUE)
-else()
-  set(CV_COMPILER_IS_GNU FALSE)
-endif()
-
-# ----------------------------------------------------------------------------
-# Detect GNU version:
-# ----------------------------------------------------------------------------
-if(CMAKE_COMPILER_IS_GNUCXX)
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
-                  OUTPUT_VARIABLE CMAKE_OPENCV_GCC_VERSION_FULL
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v
-                  ERROR_VARIABLE CMAKE_OPENCV_GCC_INFO_FULL
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    # Typical output in CMAKE_OPENCV_GCC_VERSION_FULL: "c+//0 (whatever) 4.2.3 (...)"
-    # Look for the version number
-    string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
-    if(NOT CMAKE_GCC_REGEX_VERSION)
-      string(REGEX MATCH "[0-9]+.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
-    endif()
-
-    # Split the three parts:
-    string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_GCC_REGEX_VERSION}")
-
-    list(GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR)
-    list(GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR)
-
-    set(CMAKE_OPENCV_GCC_VERSION ${CMAKE_OPENCV_GCC_VERSION_MAJOR}${CMAKE_OPENCV_GCC_VERSION_MINOR})
-    math(EXPR CMAKE_OPENCV_GCC_VERSION_NUM "${CMAKE_OPENCV_GCC_VERSION_MAJOR}*100 + ${CMAKE_OPENCV_GCC_VERSION_MINOR}")
-    message(STATUS "Detected version of GNU GCC: ${CMAKE_OPENCV_GCC_VERSION} (${CMAKE_OPENCV_GCC_VERSION_NUM})")
-
-    if(WIN32)
-        execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
-                  OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-        if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
-            set(MINGW64 1)
-        endif()
-    endif()
-endif()
-
-if(CMAKE_SYSTEM_PROCESSOR MATCHES amd64.*|x86_64.*)
-    set(X86_64 1)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686.*|i386.*|x86.*)
-    set(X86 1)
-endif()

+ 0 - 501
cmake/OpenCVUtils.cmake

@@ -1,501 +0,0 @@
-# Search packages for host system instead of packages for target system
-# in case of cross compilation thess macro should be defined by toolchain file
-if(NOT COMMAND find_host_package)
-  macro(find_host_package)
-    find_package(${ARGN})
-  endmacro()
-endif()
-if(NOT COMMAND find_host_program)
-  macro(find_host_program)
-    find_program(${ARGN})
-  endmacro()
-endif()
-
-# adds include directories in such way that directories from the OpenCV source tree go first
-function(ocv_include_directories)
-  set(__add_before "")
-  foreach(dir ${ARGN})
-	#message(STATUS "Dir: ${dir}")
-    get_filename_component(__abs_dir "${dir}" ABSOLUTE)
-	#message(STATUS "filecomponent: ${__abs_dir}")
-    if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
-      list(APPEND __add_before "${dir}")
-    else()
-      include_directories(AFTER SYSTEM "${dir}")
-    endif()
-  endforeach()
-  include_directories(BEFORE ${__add_before})
-endfunction()
-
-# clears all passed variables
-macro(ocv_clear_vars)
-  foreach(_var ${ARGN})
-    unset(${_var} CACHE)
-  endforeach()
-endmacro()
-
-set(OCV_COMPILER_FAIL_REGEX
-    "command line option .* is valid for .* but not for C\\+\\+" # GNU
-    "command line option .* is valid for .* but not for C" # GNU
-    "unrecognized .*option"                     # GNU
-    "unknown .*option"                          # Clang
-    "ignoring unknown option"                   # MSVC
-    "warning D9002"                             # MSVC, any lang
-    "option .*not supported"                    # Intel
-    "[Uu]nknown option"                         # HP
-    "[Ww]arning: [Oo]ption"                     # SunPro
-    "command option .* is not recognized"       # XL
-    "not supported in this configuration; ignored"       # AIX
-    "File with unknown suffix passed to linker" # PGI
-    "WARNING: unknown flag:"                    # Open64
-  )
-
-MACRO(ocv_check_compiler_flag LANG FLAG RESULT)
-  if(NOT DEFINED ${RESULT})
-    if("_${LANG}_" MATCHES "_CXX_")
-      set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx")
-      if("${CMAKE_CXX_FLAGS} ${FLAG} " MATCHES "-Werror " OR "${CMAKE_CXX_FLAGS} ${FLAG} " MATCHES "-Werror=unknown-pragmas ")
-        FILE(WRITE "${_fname}" "int main() { return 0; }\n")
-      else()
-        FILE(WRITE "${_fname}" "#pragma\nint main() { return 0; }\n")
-      endif()
-    elseif("_${LANG}_" MATCHES "_C_")
-      set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c")
-      if("${CMAKE_C_FLAGS} ${FLAG} " MATCHES "-Werror " OR "${CMAKE_C_FLAGS} ${FLAG} " MATCHES "-Werror=unknown-pragmas ")
-        FILE(WRITE "${_fname}" "int main(void) { return 0; }\n")
-      else()
-        FILE(WRITE "${_fname}" "#pragma\nint main(void) { return 0; }\n")
-      endif()
-    else()
-      unset(_fname)
-    endif()
-    if(_fname)
-      MESSAGE(STATUS "Performing Test ${RESULT}")
-      TRY_COMPILE(${RESULT}
-        ${CMAKE_BINARY_DIR}
-        "${_fname}"
-        COMPILE_DEFINITIONS "${FLAG}"
-        OUTPUT_VARIABLE OUTPUT)
-
-      FOREACH(_regex ${OCV_COMPILER_FAIL_REGEX})
-        IF("${OUTPUT}" MATCHES "${_regex}")
-          SET(${RESULT} 0)
-          break()
-        ENDIF()
-      ENDFOREACH()
-
-      IF(${RESULT})
-        SET(${RESULT} 1 CACHE INTERNAL "Test ${RESULT}")
-        MESSAGE(STATUS "Performing Test ${RESULT} - Success")
-      ELSE(${RESULT})
-        MESSAGE(STATUS "Performing Test ${RESULT} - Failed")
-        SET(${RESULT} "" CACHE INTERNAL "Test ${RESULT}")
-      ENDIF(${RESULT})
-    else()
-      SET(${RESULT} 0)
-    endif()
-  endif()
-ENDMACRO()
-
-macro(ocv_check_flag_support lang flag varname)
-  if("_${lang}_" MATCHES "_CXX_")
-    set(_lang CXX)
-  elseif("_${lang}_" MATCHES "_C_")
-    set(_lang C)
-  else()
-    set(_lang ${lang})
-  endif()
-
-  string(TOUPPER "${flag}" ${varname})
-  string(REGEX REPLACE "^(/|-)" "HAVE_${_lang}_" ${varname} "${${varname}}")
-  string(REGEX REPLACE " -|-|=| |\\." "_" ${varname} "${${varname}}")
-
-  ocv_check_compiler_flag("${_lang}" "${ARGN} ${flag}" ${${varname}})
-endmacro()
-
-# turns off warnings
-macro(ocv_warnings_disable)
-  if(NOT ENABLE_NOISY_WARNINGS)
-    set(_flag_vars "")
-    set(_msvc_warnings "")
-    set(_gxx_warnings "")
-    foreach(arg ${ARGN})
-      if(arg MATCHES "^CMAKE_")
-        list(APPEND _flag_vars ${arg})
-      elseif(arg MATCHES "^/wd")
-        list(APPEND _msvc_warnings ${arg})
-      elseif(arg MATCHES "^-W")
-        list(APPEND _gxx_warnings ${arg})
-      endif()
-    endforeach()
-    if(MSVC AND _msvc_warnings AND _flag_vars)
-      foreach(var ${_flag_vars})
-        foreach(warning ${_msvc_warnings})
-          set(${var} "${${var}} ${warning}")
-        endforeach()
-      endforeach()
-    elseif(CV_COMPILER_IS_GNU AND _gxx_warnings AND _flag_vars)
-      foreach(var ${_flag_vars})
-        foreach(warning ${_gxx_warnings})
-          if(NOT warning MATCHES "^-Wno-")
-            string(REPLACE "${warning}" "" ${var} "${${var}}")
-            string(REPLACE "-W" "-Wno-" warning "${warning}")
-          endif()
-          ocv_check_flag_support(${var} "${warning}" _varname)
-          if(${_varname})
-            set(${var} "${${var}} ${warning}")
-          endif()
-        endforeach()
-      endforeach()
-    endif()
-    unset(_flag_vars)
-    unset(_msvc_warnings)
-    unset(_gxx_warnings)
-  endif(NOT ENABLE_NOISY_WARNINGS)
-endmacro()
-
-# Provides an option that the user can optionally select.
-# Can accept condition to control when option is available for user.
-# Usage:
-#   option(<option_variable> "help string describing the option" <initial value or boolean expression> [IF <condition>])
-macro(OCV_OPTION variable description value)
-  set(__value ${value})
-  set(__condition "")
-  set(__varname "__value")
-  foreach(arg ${ARGN})
-    if(arg STREQUAL "IF" OR arg STREQUAL "if")
-      set(__varname "__condition")
-    else()
-      list(APPEND ${__varname} ${arg})
-    endif()
-  endforeach()
-  unset(__varname)
-  if("${__condition}" STREQUAL "")
-    set(__condition 2 GREATER 1)
-  endif()
-
-  if(${__condition})
-    if("${__value}" MATCHES ";")
-      if(${__value})
-        option(${variable} "${description}" ON)
-      else()
-        option(${variable} "${description}" OFF)
-      endif()
-    elseif(DEFINED ${__value})
-      if(${__value})
-        option(${variable} "${description}" ON)
-      else()
-        option(${variable} "${description}" OFF)
-      endif()
-    else()
-      option(${variable} "${description}" ${__value})
-    endif()
-  else()
-    unset(${variable} CACHE)
-  endif()
-  unset(__condition)
-  unset(__value)
-endmacro()
-
-
-# Macros that checks if module have been installed.
-# After it adds module to build and define
-# constants passed as second arg
-macro(CHECK_MODULE module_name define)
-  set(${define} 0)
-  if(PKG_CONFIG_FOUND)
-    set(ALIAS               ALIASOF_${module_name})
-    set(ALIAS_FOUND                 ${ALIAS}_FOUND)
-    set(ALIAS_INCLUDE_DIRS   ${ALIAS}_INCLUDE_DIRS)
-    set(ALIAS_LIBRARY_DIRS   ${ALIAS}_LIBRARY_DIRS)
-    set(ALIAS_LIBRARIES         ${ALIAS}_LIBRARIES)
-
-    PKG_CHECK_MODULES(${ALIAS} ${module_name})
-
-    if(${ALIAS_FOUND})
-      set(${define} 1)
-      foreach(P "${ALIAS_INCLUDE_DIRS}")
-        if(${P})
-          list(APPEND HIGHGUI_INCLUDE_DIRS ${${P}})
-        endif()
-      endforeach()
-
-      foreach(P "${ALIAS_LIBRARY_DIRS}")
-        if(${P})
-          list(APPEND HIGHGUI_LIBRARY_DIRS ${${P}})
-        endif()
-      endforeach()
-
-      list(APPEND HIGHGUI_LIBRARIES ${${ALIAS_LIBRARIES}})
-    endif()
-  endif()
-endmacro()
-
-
-set(OPENCV_BUILD_INFO_FILE "${OpenCV_BINARY_DIR}/version_string.tmp")
-file(REMOVE "${OPENCV_BUILD_INFO_FILE}")
-function(ocv_output_status msg)
-  message(STATUS "${msg}")
-  string(REPLACE "\\" "\\\\" msg "${msg}")
-  string(REPLACE "\"" "\\\"" msg "${msg}")
-  file(APPEND "${OPENCV_BUILD_INFO_FILE}" "\"${msg}\\n\"\n")
-endfunction()
-
-macro(ocv_finalize_status)
-  if(NOT OPENCV_SKIP_STATUS_FINALIZATION)
-    if(TARGET opencv_core)
-      execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENCV_BUILD_INFO_FILE}" "${opencv_core_BINARY_DIR}/version_string.inc" OUTPUT_QUIET)
-    endif()
-  endif()
-endmacro()
-
-
-# Status report function.
-# Automatically align right column and selects text based on condition.
-# Usage:
-#   status(<text>)
-#   status(<heading> <value1> [<value2> ...])
-#   status(<heading> <condition> THEN <text for TRUE> ELSE <text for FALSE> )
-function(status text)
-  set(status_cond)
-  set(status_then)
-  set(status_else)
-
-  set(status_current_name "cond")
-  foreach(arg ${ARGN})
-    if(arg STREQUAL "THEN")
-      set(status_current_name "then")
-    elseif(arg STREQUAL "ELSE")
-      set(status_current_name "else")
-    else()
-      list(APPEND status_${status_current_name} ${arg})
-    endif()
-  endforeach()
-
-  if(DEFINED status_cond)
-    set(status_placeholder_length 32)
-    string(RANDOM LENGTH ${status_placeholder_length} ALPHABET " " status_placeholder)
-    string(LENGTH "${text}" status_text_length)
-    if(status_text_length LESS status_placeholder_length)
-      string(SUBSTRING "${text}${status_placeholder}" 0 ${status_placeholder_length} status_text)
-    elseif(DEFINED status_then OR DEFINED status_else)
-      ocv_output_status("${text}")
-      set(status_text "${status_placeholder}")
-    else()
-      set(status_text "${text}")
-    endif()
-
-    if(DEFINED status_then OR DEFINED status_else)
-      if(${status_cond})
-        string(REPLACE ";" " " status_then "${status_then}")
-        string(REGEX REPLACE "^[ \t]+" "" status_then "${status_then}")
-        ocv_output_status("${status_text} ${status_then}")
-      else()
-        string(REPLACE ";" " " status_else "${status_else}")
-        string(REGEX REPLACE "^[ \t]+" "" status_else "${status_else}")
-        ocv_output_status("${status_text} ${status_else}")
-      endif()
-    else()
-      string(REPLACE ";" " " status_cond "${status_cond}")
-      string(REGEX REPLACE "^[ \t]+" "" status_cond "${status_cond}")
-      ocv_output_status("${status_text} ${status_cond}")
-    endif()
-  else()
-    ocv_output_status("${text}")
-  endif()
-endfunction()
-
-
-# splits cmake libraries list of format "general;item1;debug;item2;release;item3" to two lists
-macro(ocv_split_libs_list lst lstdbg lstopt)
-  set(${lstdbg} "")
-  set(${lstopt} "")
-  set(perv_keyword "")
-  foreach(word ${${lst}})
-    if(word STREQUAL "debug" OR word STREQUAL "optimized")
-      set(perv_keyword ${word})
-    elseif(word STREQUAL "general")
-      set(perv_keyword "")
-    elseif(perv_keyword STREQUAL "debug")
-      list(APPEND ${lstdbg} "${word}")
-      set(perv_keyword "")
-    elseif(perv_keyword STREQUAL "optimized")
-      list(APPEND ${lstopt} "${word}")
-      set(perv_keyword "")
-    else()
-      list(APPEND ${lstdbg} "${word}")
-      list(APPEND ${lstopt} "${word}")
-      set(perv_keyword "")
-    endif()
-  endforeach()
-endmacro()
-
-
-# remove all matching elements from the list
-macro(ocv_list_filterout lst regex)
-  foreach(item ${${lst}})
-    if(item MATCHES "${regex}")
-      list(REMOVE_ITEM ${lst} "${item}")
-    endif()
-  endforeach()
-endmacro()
-
-
-# stable & safe duplicates removal macro
-macro(ocv_list_unique __lst)
-  if(${__lst})
-    list(REMOVE_DUPLICATES ${__lst})
-  endif()
-endmacro()
-
-
-# safe list reversal macro
-macro(ocv_list_reverse __lst)
-  if(${__lst})
-    list(REVERSE ${__lst})
-  endif()
-endmacro()
-
-
-# safe list sorting macro
-macro(ocv_list_sort __lst)
-  if(${__lst})
-    list(SORT ${__lst})
-  endif()
-endmacro()
-
-
-# add prefix to each item in the list
-macro(ocv_list_add_prefix LST PREFIX)
-  set(__tmp "")
-  foreach(item ${${LST}})
-    list(APPEND __tmp "${PREFIX}${item}")
-  endforeach()
-  set(${LST} ${__tmp})
-  unset(__tmp)
-endmacro()
-
-
-# add suffix to each item in the list
-macro(ocv_list_add_suffix LST SUFFIX)
-  set(__tmp "")
-  foreach(item ${${LST}})
-    list(APPEND __tmp "${item}${SUFFIX}")
-  endforeach()
-  set(${LST} ${__tmp})
-  unset(__tmp)
-endmacro()
-
-
-# gets and removes the first element from list
-macro(ocv_list_pop_front LST VAR)
-  if(${LST})
-    list(GET ${LST} 0 ${VAR})
-    list(REMOVE_AT ${LST} 0)
-  else()
-    set(${VAR} "")
-  endif()
-endmacro()
-
-
-# simple regex escaping routine (does not cover all cases!!!)
-macro(ocv_regex_escape var regex)
-  string(REGEX REPLACE "([+.*^$])" "\\\\1" ${var} "${regex}")
-endmacro()
-
-
-# get absolute path with symlinks resolved
-macro(ocv_get_real_path VAR PATHSTR)
-  if(CMAKE_VERSION VERSION_LESS 2.8)
-    get_filename_component(${VAR} "${PATHSTR}" ABSOLUTE)
-  else()
-    get_filename_component(${VAR} "${PATHSTR}" REALPATH)
-  endif()
-endmacro()
-
-
-# convert list of paths to full paths
-macro(ocv_convert_to_full_paths VAR)
-  if(${VAR})
-    set(__tmp "")
-    foreach(path ${${VAR}})
-      get_filename_component(${VAR} "${path}" ABSOLUTE)
-      list(APPEND __tmp "${${VAR}}")
-    endforeach()
-    set(${VAR} ${__tmp})
-    unset(__tmp)
-  endif()
-endmacro()
-
-
-# read set of version defines from the header file
-macro(ocv_parse_header FILENAME FILE_VAR)
-  set(vars_regex "")
-  set(__parnet_scope OFF)
-  set(__add_cache OFF)
-  foreach(name ${ARGN})
-    if("${name}" STREQUAL "PARENT_SCOPE")
-      set(__parnet_scope ON)
-    elseif("${name}" STREQUAL "CACHE")
-      set(__add_cache ON)
-    elseif(vars_regex)
-      set(vars_regex "${vars_regex}|${name}")
-    else()
-      set(vars_regex "${name}")
-    endif()
-  endforeach()
-  if(EXISTS "${FILENAME}")
-    file(STRINGS "${FILENAME}" ${FILE_VAR} REGEX "#define[ \t]+(${vars_regex})[ \t]+[0-9]+" )
-  else()
-    unset(${FILE_VAR})
-  endif()
-  foreach(name ${ARGN})
-    if(NOT "${name}" STREQUAL "PARENT_SCOPE" AND NOT "${name}" STREQUAL "CACHE")
-      if(${FILE_VAR})
-        if(${FILE_VAR} MATCHES ".+[ \t]${name}[ \t]+([0-9]+).*")
-          string(REGEX REPLACE ".+[ \t]${name}[ \t]+([0-9]+).*" "\\1" ${name} "${${FILE_VAR}}")
-        else()
-          set(${name} "")
-        endif()
-        if(__add_cache)
-          set(${name} ${${name}} CACHE INTERNAL "${name} parsed from ${FILENAME}" FORCE)
-        elseif(__parnet_scope)
-          set(${name} "${${name}}" PARENT_SCOPE)
-        endif()
-      else()
-        unset(${name} CACHE)
-      endif()
-    endif()
-  endforeach()
-endmacro()
-
-# read single version define from the header file
-macro(ocv_parse_header2 LIBNAME HDR_PATH VARNAME SCOPE)
-  set(${LIBNAME}_H "")
-  if(EXISTS "${HDR_PATH}")
-    file(STRINGS "${HDR_PATH}" ${LIBNAME}_H REGEX "^#define[ \t]+${VARNAME}[ \t]+\"[^\"]*\".*$" LIMIT_COUNT 1)
-  endif()
-  if(${LIBNAME}_H)
-    string(REGEX REPLACE "^.*[ \t]${VARNAME}[ \t]+\"([0-9]+).*$" "\\1" ${LIBNAME}_VERSION_MAJOR "${${LIBNAME}_H}")
-    string(REGEX REPLACE "^.*[ \t]${VARNAME}[ \t]+\"[0-9]+\\.([0-9]+).*$" "\\1" ${LIBNAME}_VERSION_MINOR  "${${LIBNAME}_H}")
-    string(REGEX REPLACE "^.*[ \t]${VARNAME}[ \t]+\"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ${LIBNAME}_VERSION_PATCH "${${LIBNAME}_H}")
-    set(${LIBNAME}_VERSION_MAJOR ${${LIBNAME}_VERSION_MAJOR} ${SCOPE})
-    set(${LIBNAME}_VERSION_MINOR ${${LIBNAME}_VERSION_MINOR} ${SCOPE})
-    set(${LIBNAME}_VERSION_PATCH ${${LIBNAME}_VERSION_PATCH} ${SCOPE})
-    set(${LIBNAME}_VERSION_STRING "${${LIBNAME}_VERSION_MAJOR}.${${LIBNAME}_VERSION_MINOR}.${${LIBNAME}_VERSION_PATCH}" ${SCOPE})
-
-    # append a TWEAK version if it exists:
-    set(${LIBNAME}_VERSION_TWEAK "")
-    if("${${LIBNAME}_H}" MATCHES "^.*[ \t]${VARNAME}[ \t]+\"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
-      set(${LIBNAME}_VERSION_TWEAK "${CMAKE_MATCH_1}" ${SCOPE})
-      set(${LIBNAME}_VERSION_STRING "${${LIBNAME}_VERSION_STRING}.${${LIBNAME}_VERSION_TWEAK}" ${SCOPE})
-    endif()
-  else()
-    ocv_clear_vars(${LIBNAME}_VERSION_MAJOR
-                   ${LIBNAME}_VERSION_MAJOR
-                   ${LIBNAME}_VERSION_MINOR
-                   ${LIBNAME}_VERSION_PATCH
-                   ${LIBNAME}_VERSION_TWEAK
-                   ${LIBNAME}_VERSION_STRING)
-  endif()
-endmacro()

+ 2 - 9
core/CMakeLists.txt

@@ -4,15 +4,6 @@
 #library name (name is appended to "nice_" to form the target library name)
 set(the_library "core")
 
-#define variable nice_<libname>_HDR and nice_<libname>_SRC for library header and source files (don't include progs and test source files here)
-include( corefiles.cmake)
-
-#define variable nice_<libname>_PROGFILES_HDR and nice_<libname>_PROGFILES_SRC for program header and source files (don't include library and test source files here)
-include( progfiles.cmake)
-
-#define variable nice_<libname>_TESTFILES_HDR and nice_<libname>_TESTFILES_SRC for unit test header and source files (don't include library and progs source files here)
-include( testfiles.cmake)	
-
 #add linkage dependencies to other libraries here
 set("nice_${the_library}_LINKING_DEPENDENCIES"  ${Boost_LIBRARIES} ${OPENGL_LIBRARY} ${GLUT_LIBRARY} ${QT_LIBRARIES} ${IPP_LIBRARIES} ${ImageMagick_LIBRARIES})
 if(MATIO_FOUND)
@@ -22,6 +13,8 @@ endif(MATIO_FOUND)
 #####################################################
 message(STATUS "adding library ${the_library}")
 
+nice_get_source_files()
+
 nice_build_library()
 
 nice_add_progs()

+ 0 - 281
core/corefiles.cmake

@@ -1,281 +0,0 @@
-# find . -name "*.cpp" -not -ipath "*tests*" -not -ipath "*progs*" > corefiles.cmake.t
-SET(nice_core_SRC
-./image/DeprecatedConverter.cpp
-./image/Histogram.cpp
-./image/Fourier.cpp
-./image/GaussPyramid.cpp
-./image/ColorImageAccess.cpp
-./image/Convert.cpp
-./image/ImageOutputStream.cpp
-./image/Morph.cpp
-./image/ImageFileListWriter.cpp
-./image/ImageAccess.cpp
-./image/GrayColorImageCommonImplementation.cpp
-./image/FilterT.cpp
-./image/GHough.cpp
-./image/Algorithms.cpp
-./image/ImageT.cpp
-./image/Region.cpp
-./image/ImageFile.cpp
-./image/ImageFileListReader.cpp
-./image/MultiChannelImageT.cpp
-./image/ImageTools.cpp
-./image/ColorImageT.cpp
-./image/ImageInputStream.cpp
-./image/Filter.cpp
-./matlabAccess/MatFileIO.cpp
-./imagedisplay/DefaultMainWindow.cpp
-./imagedisplay/PolygonDrawer.cpp
-./imagedisplay/ArrayPlot.cpp
-./imagedisplay/CaptureDialog.cpp
-./imagedisplay/ImageDisplaySDL.cpp
-./imagedisplay/QtFramework.cpp
-./imagedisplay/CaptureWidget.cpp
-./imagedisplay/EpipolarGeometryDisplay.cpp
-./imagedisplay/ImageDisplayManager.cpp
-./imagedisplay/ImageDisplayManagerWidget.cpp
-./imagedisplay/SimpleSelector.cpp
-./imagedisplay/ImageDisplay.cpp
-./basics/bzstream.cpp
-./basics/tools.cpp
-./basics/BinStreamable.cpp
-./basics/FastMath.cpp
-./basics/ResourceStatistics.cpp
-./basics/Observer.cpp
-./basics/FileMgt.cpp
-./basics/gzstream.cpp
-./basics/Streamable.cpp
-./basics/Timer.cpp
-./basics/numerictools.cpp
-./basics/Exception.cpp
-./basics/Log.cpp
-./basics/FrameRateCounter.cpp
-./basics/StringTools.cpp
-./basics/Observable.cpp
-./basics/Config.cpp
-./basics/FileName.cpp
-./basics/stringutils.cpp
-./optimization/gradientBased/FirstOrderRasmussen.cpp
-./optimization/gradientBased/OptimizationProblemSecond.cpp
-./optimization/gradientBased/OptimizationProblemFirst.cpp
-./optimization/gradientBased/SecondOrderTrustRegion.cpp
-./optimization/gradientBased/OptimizationAlgorithmSecond.cpp
-./optimization/gradientBased/TrustRegionBase.cpp
-./optimization/gradientBased/OptimizationAlgorithmFirst.cpp
-./optimization/gradientBased/FirstOrderTrustRegion.cpp
-./optimization/blackbox/SimpleOptProblem.cpp
-./optimization/blackbox/CostFunction.cpp
-./optimization/blackbox/DownhillSimplexOptimizer.cpp
-./optimization/blackbox/SimpleOptimizer.cpp
-./optimization/blackbox/Optimizer.cpp
-./optimization/blackbox/DimWrapperCostFunction.cpp
-./optimization/blackbox/OptLogBase.cpp
-./optimization/blackbox/Optimizable.cpp
-./algebra/LUDecomposition.cpp
-./algebra/ILSPlainGradient.cpp
-./algebra/GenericMatrix.cpp
-./algebra/GBCDSolver.cpp
-./algebra/GMStandard.cpp
-./algebra/EigValuesTRLAN.cpp
-./algebra/EigValues.cpp
-./algebra/ILSSymmLqLanczos.cpp
-./algebra/CholeskyRobustAuto.cpp
-./algebra/GMSparseVectorMatrix.cpp
-./algebra/CholeskyRobust.cpp
-./algebra/ILSConjugateGradientsLanczos.cpp
-./algebra/IterativeLinearSolver.cpp
-./algebra/ILSConjugateGradients.cpp
-./algebra/ILSMinResLanczos.cpp
-./algebra/DiagonalMatrixApprox.cpp
-./vector/Distance.cpp
-./vector/VVector.cpp
-./vector/Algorithms.cpp
-./vector/ippwrapper.cpp
-)
-
-set(nice_core_HDR
-./image/ColorImageT.h
-./image/ImageT.h
-./image/Region.h
-./image/GrayColorImageCommonImplementationT.h
-./image/MultiChannelImageAccess.h
-./image/ImageInputStream.h
-./image/CrossT.h
-./image/Morph.h
-./image/BlockImageAccessT.h
-./image/ColorImageChannelAccessT.h
-./image/RectT.h
-./image/ippwrapper.h
-./image/LineT.h
-./image/RectangleT.h
-./image/Drawable.h
-./image/GHough.h
-./image/DeprecatedConverter.h
-./image/ImageOperators.h
-./image/Pixel.h
-./image/ImageException.h
-./image/Fourier.h
-./image/PointT.h
-./image/CircleT.h
-./image/GaussPyramid.h
-./image/Histogram.h
-./image/ThreeChannelImageT.h
-./image/Filter.h
-./image/ImageTools.h
-./image/ImageFile.h
-./image/GrayColorImageCommonImplementation.h
-./image/ColorT.h
-./image/ImageFileListWriter.h
-./image/ImageFileListReader.h
-./image/pointerArithmetic.h
-./image/ImageOutputStream.h
-./image/ColorImageAccess.h
-./image/Algorithms.h
-./image/MultiChannelImageT.h
-./image/TekkotsuLink.h
-./image/ImageAccess.h
-./image/ImageAccessT.h
-./image/CoordT.h
-./image/Convert.h
-./image/Buffer.h
-./image/EllipseT.h
-./image/FilterT.h
-./matlabAccess/MatFileIO.h
-./imagedisplay/DefaultMainWindow.h
-./imagedisplay/ImageDisplay.h
-./imagedisplay/EpipolarGeometryDisplay.h
-./imagedisplay/OverlayColors.h
-./imagedisplay/CaptureWidget.h
-./imagedisplay/PolygonDrawer.h
-./imagedisplay/SimpleSelector.h
-./imagedisplay/CaptureDialog.h
-./imagedisplay/ImageDisplayManagerWidget.h
-./imagedisplay/QtFramework.h
-./imagedisplay/ImageDisplayManager.h
-./imagedisplay/ArrayPlot.h
-./imagedisplay/ImageDisplaySDL.h
-./basics/bzstream.h
-./basics/RoundToNearest.h
-./basics/FrameRateCounter.h
-./basics/all.h
-./basics/BFSColor.h
-./basics/binstream.h
-./basics/Observable.h
-./basics/CrossplatformDefines.h
-./basics/types.h
-./basics/Observer.h
-./basics/BinStreamable.h
-./basics/triplet.h
-./basics/deprecated.h
-./basics/gzbinstream.h
-./basics/Config.h
-./basics/stringutils.h
-./basics/StringTools.h
-./basics/cppunitex.h
-./basics/FileMgt.h
-./basics/ossettings.h
-./basics/gzstream.h
-./basics/StructuredMap.h
-./basics/ResourceStatistics.h
-./basics/quadruplet.h
-./basics/numerictools.h
-./basics/FileName.h
-./basics/FastMath.h
-./basics/Timer.h
-./basics/tools.h
-./basics/Log.h
-./basics/vectorio.h
-./basics/Persistent.h
-./basics/Exception.h
-./basics/NonCopyable.h
-./basics/Streamable.h
-./optimization/gradientBased/OptimizationAlgorithmFirst.h
-./optimization/gradientBased/SecondOrderTrustRegion.h
-./optimization/gradientBased/OptimizationProblemFirst.h
-./optimization/gradientBased/OptimizationAlgorithmSecond.h
-./optimization/gradientBased/OptimizationProblemSecond.h
-./optimization/gradientBased/FirstOrderRasmussen.h
-./optimization/gradientBased/TrustRegionBase.h
-./optimization/gradientBased/FirstOrderTrustRegion.h
-./optimization/blackbox/CostFunction.h
-./optimization/blackbox/SimpleOptimizer.h
-./optimization/blackbox/OptLogBase.h
-./optimization/blackbox/SimpleOptProblem.h
-./optimization/blackbox/Definitions_core_opt.h
-./optimization/blackbox/DimWrapperCostFunction.h
-./optimization/blackbox/Optimizable.h
-./optimization/blackbox/Optimizer.h
-./optimization/blackbox/DownhillSimplexOptimizer.h
-./iceconversion/image_convertice.h
-./iceconversion/convertice.h
-./algebra/DiagonalMatrixApprox.h
-./algebra/CholeskyRobust.h
-./algebra/ILSConjugateGradientsLanczos.h
-./algebra/GMStandard.h
-./algebra/GenericMatrix.h
-./algebra/GBCDSolver.h
-./algebra/ILSMinResLanczos.h
-./algebra/ILSPlainGradient.h
-./algebra/ILSSymmLqLanczos.h
-./algebra/CholeskyRobustAuto.h
-./algebra/EigValuesTRLAN.h
-./algebra/MatrixDecomposition.h
-./algebra/PartialGenericMatrix.h
-./algebra/LUDecomposition.h
-./algebra/GMSparseVectorMatrix.h
-./algebra/ILSConjugateGradients.h
-./algebra/EigValues.h
-./algebra/IterativeLinearSolver.h
-./vector/CheckedVectorT.h
-./vector/Operators.h
-./vector/Distance.h
-./vector/MatrixBase.h
-./vector/Eigen.h
-./vector/VectorBase.h
-./vector/ippwrapper.h
-./vector/SparseVectorT.h
-./vector/cppunitex.h
-./vector/VectorT.h
-./vector/SVD.h
-./vector/Algorithms.h
-./vector/CheckedMatrixT.h
-./vector/VVector.h
-./vector/config.h
-./vector/SparseVector.h
-./vector/CheckedRowMatrixT.h
-./vector/MatrixT.h
-./vector/RowMatrixT.h
-./image/CircleT.tcc
-./image/ImageAccessT.tcc
-./image/ippwrapper.tcc
-./image/LineT.tcc
-./image/Filter.tcc
-./image/RectT.tcc
-./image/ColorImageT.tcc
-./image/GrayColorImageCommonImplementationT.tcc
-./image/Buffer.tcc
-./image/MultiChannelImageT.tcc
-./image/DeprecatedConverter.tcc
-./image/FilterT.tcc
-./image/EllipseT.tcc
-./image/ImageT.tcc
-./image/ImageFile.tcc
-./image/Pixel.tcc
-./image/RectangleT.tcc
-./image/PointT.tcc
-./image/CrossT.tcc
-./image/BlockImageAccessT.tcc
-./image/Convert.tcc
-./image/Morph.tcc
-./image/ColorT.tcc
-./image/ImageTools.tcc
-./basics/vectorio.tcc
-./vector/ippwrapper.tcc
-./vector/RowMatrixT.tcc
-./vector/VectorT.tcc
-./vector/Distance.tcc
-./vector/Algorithms.tcc
-./vector/Eigen.tcc
-./vector/SparseVectorT.tcc
-./vector/MatrixT.tcc
-)

+ 0 - 22
core/progfiles.cmake

@@ -1,22 +0,0 @@
-# find . -name "*.cpp" -ipath "*progs*" > progfiles.cmake.t
-set(nice_core_PROGFILES_SRC 
-./image/progs/compareImages.cpp
-./image/progs/convertImageNice.cpp
-./image/progs/testApproxGaussFilter.cpp
-./image/progs/testGenericSobelFilter.cpp
-./matlabAccess/progs/testMatFileIO.cpp
-./progs/imageDemo.cpp
-./imagedisplay/progs/showImage.cpp
-./basics/progs/testConfig.cpp
-./basics/progs/testMemoryUsage.cpp
-./algebra/progs/testILSMinResLanczos.cpp
-./algebra/progs/testILSConjugateGradients.cpp
-./algebra/progs/testILSmethods.cpp
-./algebra/progs/testILSSymmLqLanczos.cpp
-./algebra/progs/testILSConjugateGradientsLanczos.cpp
-./vector/progs/testMatrixFunctions.cpp
-./vector/progs/testCholeskySpeed.cpp
-)
-
-set(nice_core_PROGFILES_HDR
-)

+ 0 - 80
core/testfiles.cmake

@@ -1,80 +0,0 @@
-#generated by find . -name "*.cpp" -ipath "*tests*" > testfiles.cmake.t 
-SET(nice_core_TESTFILES_SRC 
-./image/tests/ImageTest.cpp
-./image/tests/TestImageFile.cpp
-./image/tests/TestRect.cpp
-./image/tests/TestImageFileList.cpp
-./image/tests/TestConvert.cpp
-./image/tests/TestImageOperators.cpp
-./image/tests/TestImageTools.cpp
-./image/tests/TestFilter.cpp
-./image/tests/TestConverter.cpp
-./image/tests/TestHistogram.cpp
-./image/tests/TestMorph.cpp
-./image/tests/TestDrawable.cpp
-./image/tests/TestColor.cpp
-./image/tests/MultiChannelImageTTest.cpp
-./image/tests/TestFourier.cpp
-./basics/tests/cppunitexTest.cpp
-./basics/tests/FileNameTest.cpp
-./basics/tests/Testcasts.cpp
-./basics/tests/TestObserver.cpp
-./basics/tests/numerictoolsTest.cpp
-./basics/tests/TimerTest.cpp
-./basics/tests/stringutilsTest.cpp
-./basics/tests/Testgzbinstream.cpp
-./basics/tests/Testbinstream.cpp
-./optimization/gradientBased/tests/TestTrustRegion.cpp
-./optimization/blackbox/tests/TestDownhillSimplex.cpp
-./algebra/tests/TestLUDecomposition.cpp
-./algebra/tests/TestLinearSolve.cpp
-./algebra/tests/TestDiagApprox.cpp
-./algebra/tests/TestEigenValue.cpp
-./vector/tests/TestSparseVector.cpp
-./vector/tests/TestEVector.cpp
-./vector/tests/TestDistance.cpp
-./vector/tests/TestAlgorithms.cpp
-./vector/tests/TestStreamable.cpp
-./vector/tests/TestERowMatrix.cpp
-./vector/tests/TestEMatrix.cpp
-)
-
-SET(nice_core_TESTFILES_HDR
-./image/tests/TestRect.h
-./image/tests/ImageTest.h
-./image/tests/TestMorph.h
-./image/tests/TestImageTools.h
-./image/tests/TestConvert.h
-./image/tests/MultiChannelImageTTest.h
-./image/tests/TestFourier.h
-./image/tests/TestImageOperators.h
-./image/tests/TestColor.h
-./image/tests/TestHistogram.h
-./image/tests/TestDrawable.h
-./image/tests/TestConverter.h
-./image/tests/TestFilter.h
-./image/tests/TestImageFileList.h
-./image/tests/TestImageFile.h
-./basics/tests/TimerTest.h
-./basics/tests/Testcasts.h
-./basics/tests/numerictoolsTest.h
-./basics/tests/Testbinstream.h
-./basics/tests/cppunitexTest.h
-./basics/tests/Testgzbinstream.h
-./basics/tests/FileNameTest.h
-./basics/tests/stringutilsTest.h
-./basics/tests/TestObserver.h
-./optimization/gradientBased/tests/TestTrustRegion.h
-./optimization/blackbox/tests/TestDownhillSimplex.h
-./algebra/tests/TestDiagApprox.h
-./algebra/tests/TestLUDecomposition.h
-./algebra/tests/TestEigenValue.h
-./algebra/tests/TestLinearSolve.h
-./vector/tests/TestStreamable.h
-./vector/tests/TestERowMatrix.h
-./vector/tests/TestEMatrix.h
-./vector/tests/TestAlgorithms.h
-./vector/tests/TestEVector.h
-./vector/tests/TestDistance.h
-./vector/tests/TestSparseVector.h
-)