Fixed issue with symlinks for dependencies on linux

--- cmake/Macros.cmake
+++ cmake/Macros.cmake
@@ -167,6 +167,7 @@
 # Macro for downloading a dependency
 macro(fast_download_dependency NAME VERSION SHA)
     set(FILENAME ${NAME}_${VERSION}_${FAST_DEPENDENCY_TOOLSET}.tar.xz)
+    if(WIN32)
     if(${NAME} STREQUAL qt5)
         ExternalProject_Add(${NAME}
                 PREFIX ${FAST_EXTERNAL_BUILD_DIR}/${NAME}
@@ -192,10 +193,43 @@
                 BUILD_COMMAND ""
                 # On install: Copy contents of each subfolder to the build folder
                 INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${FAST_EXTERNAL_INSTALL_DIR}/include COMMAND
-                ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/bin ${FAST_EXTERNAL_INSTALL_DIR}/bin COMMAND
-                ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/lib ${FAST_EXTERNAL_INSTALL_DIR}/lib COMMAND
-                ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/licences ${FAST_EXTERNAL_INSTALL_DIR}/licences
-            )
+                    ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/bin ${FAST_EXTERNAL_INSTALL_DIR}/bin COMMAND
+                    ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/lib ${FAST_EXTERNAL_INSTALL_DIR}/lib COMMAND
+                    ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/licences ${FAST_EXTERNAL_INSTALL_DIR}/licences
+                )
+    endif()
+    else(WIN32)
+        # copy_directory doesn't support symlinks, use cp on linux:
+        if(${NAME} STREQUAL qt5)
+        ExternalProject_Add(${NAME}
+                PREFIX ${FAST_EXTERNAL_BUILD_DIR}/${NAME}
+                URL ${FAST_PREBUILT_DEPENDENCY_DOWNLOAD_URL_NEW}/${FILENAME}
+                URL_HASH SHA256=${SHA}
+                UPDATE_COMMAND ""
+                CONFIGURE_COMMAND ""
+                BUILD_COMMAND ""
+                # On install: Copy contents of each subfolder to the build folder
+                INSTALL_COMMAND cp -r <SOURCE_DIR>/include/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                cp -r <SOURCE_DIR>/bin/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                cp -r <SOURCE_DIR>/lib/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                cp -r <SOURCE_DIR>/plugins/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                cp -r <SOURCE_DIR>/licences/ ${FAST_EXTERNAL_INSTALL_DIR}/
+                )
+            else()
+                ExternalProject_Add(${NAME}
+                    PREFIX ${FAST_EXTERNAL_BUILD_DIR}/${NAME}
+                    URL ${FAST_PREBUILT_DEPENDENCY_DOWNLOAD_URL_NEW}/${FILENAME}
+                    URL_HASH SHA256=${SHA}
+                    UPDATE_COMMAND ""
+                    CONFIGURE_COMMAND ""
+                    BUILD_COMMAND ""
+                    # On install: Copy contents of each subfolder to the build folder
+                    INSTALL_COMMAND cp -r <SOURCE_DIR>/include/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                        cp -r <SOURCE_DIR>/bin/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                        cp -r <SOURCE_DIR>/lib/ ${FAST_EXTERNAL_INSTALL_DIR}/ COMMAND
+                        cp -r <SOURCE_DIR>/licences/ ${FAST_EXTERNAL_INSTALL_DIR}/
+                )
+        endif()
     endif()
     foreach(LIB ${ARGN})
         list(APPEND LIBRARIES ${ARGN})


Change ARMV8 target to ARMV7 for BINARY=32

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -38,6 +38,9 @@
   endif ()
   if (${TARGET} STREQUAL "BULLDOZER" OR ${TARGET} STREQUAL "PILEDRIVER" OR ${TARGET} STREQUAL "ZEN")
     set(TARGET "BARCELONA")
+  endif ()
+  if (${TARGET} STREQUAL "ARMV8" OR ${TARGET} STREQUAL "CORTEXA57" OR ${TARGET} STREQUAL "CORTEXA53")
+    set(TARGET "ARMV7")
   endif ()
 endif ()


bump version to 0.3.1

bump version to 0.3.1

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -4,7 +4,7 @@

 set(CPACK_PACKAGE_VERSION_MAJOR "0")
 set(CPACK_PACKAGE_VERSION_MINOR "3")
-set(CPACK_PACKAGE_VERSION_PATCH "0")
+set(CPACK_PACKAGE_VERSION_PATCH "1")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libmm")


Use the latest stable release of Google Test instead of master

This fixes deprecation warnings and avoids new unstable changes.

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -80,7 +80,7 @@
   download_project(
     PROJ           googletest
     GIT_REPOSITORY https://github.com/google/googletest.git
-    GIT_TAG        master
+    GIT_TAG        release-1.8.1
     INSTALL_DIR    ${GTEST_ROOT}
     CMAKE_ARGS     -DBUILD_GTEST=ON -DINSTALL_GTEST=ON -Dgtest_force_shared_crt=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     LOG_DOWNLOAD   TRUE


Feature/tpl open ssl (#22)

Feature/tpl open ssl (#22)

* Set theme jekyll-theme-hacker

* release/v0.1-beta (#16)

* [added] TPLs/NLJson

* [merged]

* [fixed] lost fast finish in merge

* Update README.rst

* [fixed] osx keeps going away

* [added] TPLs/OpenSSL

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -1,2 +1,2 @@
 # Uses cached TPL names to setup standard package directories.
-BOTG_DefineTPLSubPackages()+BOTG_DefineTPLSubPackages()


omit specific module request

omit specific module request

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -23,7 +23,7 @@
         message(STATUS "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH}")

         find_package(PkgConfig)
-        pkg_check_modules(OpenCV opencv ${OpenCV_REQUIRED_MODULES})
+        pkg_check_modules(OpenCV opencv)

 #   <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '-l')
 #   <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '-L')
@@ -53,7 +53,6 @@

     else(OpenCV_DIR_EXT STREQUAL ".pc")

-        message(STATUS "OpenCV_DIR not .pc")
         find_package(OpenCV REQUIRED ${OpenCV_REQUIRED_MODULES} PATHS ${OpenCV_DIR})
     endif(OpenCV_DIR_EXT STREQUAL ".pc")


fix gtest

fix gtest

--- cmake/EnableGtests.cmake
+++ cmake/EnableGtests.cmake
@@ -25,11 +25,11 @@
             set (gtest_root ${gtest_root1})
         else()
             message(STATUS "Trying to fetch gtest via subversion")
-            find_package(Subversion)
-            execute_process(COMMAND "${Subversion_SVN_EXECUTABLE}" "checkout" "http://googletest.googlecode.com/svn/trunk/" "gtest" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+            find_package(Git)
+            execute_process(COMMAND "${GIT_EXECUTABLE}" "clone" "--branch" "release-1.7.0" "https://github.com/google/googletest.git" "gtest" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
             set (gtest_root "${CMAKE_BINARY_DIR}/gtest")
         endif()
-        set (gtest_root1)
+        unset (gtest_root1)
     endif()

     message(STATUS "gtest is in ${gtest_root}")
@@ -72,8 +72,8 @@

 # enable testing with gtest - fetch it if needed
-if (NOT tests_are_already_enabled)
-    find_package(GTest QUIET)
+if (NOT tests_are_already_enabled AND Testing )
+    find_package(GTest)

     if (NOT GTEST_FOUND)
         #include(UseGtest) # fetch gtest
@@ -84,5 +84,5 @@
     set (LINK_TEST  ${GTEST_MAIN_LIBRARIES})
     include_directories(${GTEST_INCLUDE_DIRS})
     set(tests_are_already_enabled TRUE)
-endif(NOT tests_are_already_enabled)
+endif()


cmake: add module/src include dir in case of enabled precompiled headers

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -698,6 +698,9 @@
 # setup include path for OpenCV headers for specified module
 # ocv_module_include_directories(<extra include directories/extra include modules>)
 macro(ocv_module_include_directories)
+  if(ENABLE_PRECOMPILED_HEADERS OR OPENCV_INCLUDE_DIR_APPEND_MODULE_SRC)
+    ocv_target_include_directories(${the_module} "${OPENCV_MODULE_${the_module}_LOCATION}/src")
+  endif()
   ocv_target_include_directories(${the_module}
       "${OPENCV_MODULE_${the_module}_LOCATION}/include"
       "${CMAKE_CURRENT_BINARY_DIR}" # for precompiled headers


Adjust SteamVRPaths.cmake to work better under Windows.

--- cmake/SteamVRPaths.cmake
+++ cmake/SteamVRPaths.cmake
@@ -107,11 +107,19 @@
 	)

 	if(_vrpathreg_result EQUAL 0)
+	    # Append a dummy path in case of null output
+		set(_vrpathreg_output "${_vrpathreg_output}\nDummy path = C:")
+
+		# Replace backslashes with slashes because a line ending in a backslash
+		# causes it to be concatenated with the following line in the list.
+		string(REGEX REPLACE "\\\\" "/" _vrpathreg_output "${_vrpathreg_output}")
+
 		# Turn output into CMake list (one line per item)
 		string(REGEX REPLACE "\n" ";" _vrpathreg_output_list "${_vrpathreg_output}")
+		list(LENGTH _vrpathreg_output_list _size)

 		# Parse list and set variables
-		foreach(_line ${_vrpathreg_output_list})
+		foreach(_line IN LISTS _vrpathreg_output_list)
 			string(REPLACE "path = " "" _line "${_line}")
 			string(FIND "${_line}" " " _pos)
 			if (_pos EQUAL -1)
@@ -122,6 +130,7 @@
 			math(EXPR _pos "${_pos} + 1")
 			string(SUBSTRING "${_line}" ${_pos} -1 _path)
 			set(STEAMVR_${_name}_DIR "${_path}")
+			file(TO_CMAKE_PATH "${STEAMVR_${_name}_DIR}" STEAMVR_${_name}_DIR)
 		endforeach()
 	else()
 		_read_openvrpaths_file()


Fixes the \n in Ubuntu package names

Fixes the \n in Ubuntu package names

--- cmake/medinriaPack.cmake
+++ cmake/medinriaPack.cmake
@@ -27,6 +27,7 @@
   execute_process(COMMAND lsb_release -irs
     COMMAND sed "s/ //"
     COMMAND sed "s/Fedora/fc/"
+    COMMAND tr -d '\n' # In Ubuntu the string is Ubuntu\n10.04\n
     OUTPUT_VARIABLE DISTRIB
     OUTPUT_STRIP_TRAILING_WHITESPACE)
   execute_process(COMMAND arch


build: fix zlib message for dynamically built gRPC

Co-authored-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/gRPC.cmake
+++ cmake/modules/gRPC.cmake
@@ -11,20 +11,14 @@
 # specific language governing permissions and limitations under the License.
 #

-option(USE_BUNDLED_DEPS
-       "Build a static version of gRPC (useful for building in Operating Systems that don't have the gRPC package)" OFF)
-
 if(NOT USE_BUNDLED_DEPS)
-
   # zlib
   include(FindZLIB)
   set(ZLIB_INCLUDE "${ZLIB_INCLUDE_DIRS}")
   set(ZLIB_LIB "${ZLIB_LIBRARIES}")

   if(ZLIB_INCLUDE AND ZLIB_LIB)
-    message(STATUS "Found zlib: ${PROTOC}, include: ${PROTOBUF_INCLUDE}, lib: ${PROTOBUF_LIB}")
-  else()
-    message(FATAL_ERROR "Couldn't find system protobuf")
+    message(STATUS "Found zlib: include: ${ZLIB_INCLUDE}, lib: ${ZLIB_LIB}")
   endif()

   # protobuf
@@ -93,11 +87,7 @@

   get_filename_component(PROTOC_DIR ${PROTOC} PATH)

-  include(ProcessorCount)
-  ProcessorCount(N)
-  if(NOT N EQUAL 0)
-    set(GRPC_BUILD_FLAGS -j${N})
-  endif()
+  set(GRPC_BUILD_FLAGS ${PROCESSOUR_COUNT_MAKE_FLAG})

   # "cd ${ZLIB_INCLUDE} && ./configure && make"
   ExternalProject_Add(
@@ -115,7 +105,8 @@
       HAS_SYSTEM_PROTOBUF=false
       LDFLAGS=-static
       PATH=${PROTOC_DIR}:$ENV{PATH}
-      make ${GRPC_BUILD_FLAGS}
+      make
+      ${GRPC_BUILD_FLAGS}
       grpc_cpp_plugin
       static_cxx
       static_c)


resolves bug 1890

resolves bug 1890

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@7832 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/new_lcmtypes.cmake
+++ cmake/new_lcmtypes.cmake
@@ -143,26 +143,30 @@
   if (NOT LCMTYPES_C_LIBNAME)
     set(LCMTYPES_C_LIBNAME "${__sanitized_project_name}_lcmtypes")
   endif()
+  set(LCMTYPES_C_HEADERFILES)

   if (LCMTYPES_C_SOURCEFILES)
     list(REMOVE_DUPLICATES LCMTYPES_C_SOURCEFILES)
-    add_library(${LCMTYPES_C_LIBNAME} ${LCMTYPES_C_SOURCEFILES})
-    pods_use_pkg_config_packages(${LCMTYPES_C_LIBNAME} lcm)
-    pods_install_libraries(${LCMTYPES_C_LIBNAME})

     # create a header file aggregating all of the autogenerated .h files
     set(__agg_h_fname "${LCMTYPES_DIR}/${__sanitized_project_name}.h")
-    file(WRITE ${__agg_h_fname}
+    file(WRITE "${__agg_h_fname}"
     	       "#ifndef __lcmtypes_${__sanitized_project_name}_h__\n"
 	       "#define __lcmtypes_${__sanitized_project_name}_h__\n\n")
     foreach(c_file ${LCMTYPES_C_SOURCEFILES})
       string(REGEX REPLACE ".c$" ".h" h_file ${c_file})
       file(RELATIVE_PATH __tmp_path ${LCMTYPES_DIR} ${h_file})
-      file(APPEND ${__agg_h_fname} "#include \"${__tmp_path}\"\n")
+      file(APPEND "${__agg_h_fname}" "#include \"${__tmp_path}\"\n")
       get_filename_component(__tmp_dir ${__tmp_path} PATH)
       install(FILES ${h_file} DESTINATION "include/lcmtypes/${__tmp_dir}")
+      list(APPEND LCMTYPES_C_HEADERFILES ${h_file})
     endforeach()
-    file(APPEND ${__agg_h_fname} "\n#endif\n")
+    file(APPEND "${__agg_h_fname}" "\n#endif\n")
+
+    add_library(${LCMTYPES_C_LIBNAME} ${LCMTYPES_C_SOURCEFILES} ${LCMTYPES_C_HEADERFILES})
+    pods_use_pkg_config_packages(${LCMTYPES_C_LIBNAME} lcm)
+    pods_install_libraries(${LCMTYPES_C_LIBNAME})
+
     install(FILES ${__agg_h_fname} DESTINATION lcmtypes)

     unset(__agg_h_fname)


Revert "cmake: check that headers and libs are consistent"

Does not seem to work, and the real solution:
add cmake files inside toolchain packages, works better

This reverts commit cc77be467fa84eea2823244c3a35208695cd407d.

--- cmake/qibuild/find.cmake
+++ cmake/qibuild/find.cmake
@@ -361,11 +361,6 @@
     find_package_handle_standard_args(${prefix} DEFAULT_MSG ${_to_check})
   endif()

-  # Check that headers and libs are consistent
-  _check_consistent(${prefix}
-                    INC ${prefix}_INCLUDE_DIRS
-                    LIB ${prefix}_LIBRARIES)
-
   # Right after find_package_handle_standard_args, ${prefix}_FOUND is
   # set correctly.
   # For instance, if foo/bar.h is not foud, FOO_FOUND is FALSE.
@@ -375,59 +370,3 @@
   qi_persistent_set(${prefix}_PACKAGE_FOUND ${${prefix}_FOUND})
   qi_persistent_set(${prefix}_SEARCHED TRUE)
 endfunction()
-
-
-function(_check_consistent package)
-  cmake_parse_arguments(ARG "" "" "INC;LIB" ${ARGN})
-  if (NOT ARG_INC)
-    return()
-  endif()
-
-  if(NOT ARG_LIB)
-    return()
-  endif()
-
-  foreach(_inc ${ARG_INC})
-    foreach(_lib ${ARG_LIB})
-      # this should filter out args such as SYSTEM,
-      # general, debug, release
-      if(EXISTS ${_inc} AND EXISTS ${_lib})
-        _check_consistent_helper(${package} ${_inc} ${_lib})
-      endif()
-    endforeach()
-  endforeach()
-
-endfunction()
-
-function(_check_consistent_helper package include_path lib_path)
-  set(_inc_in_system)
-  set(_lib_in_system)
-  string(FIND ${include_path} "toolchains" _found)
-  if(${_found} EQUAL "-1")
-    set(_inc_in_system FALSE)
-  else()
-    set(_inc_in_system TRUE)
-  endif()
-
-  string(FIND ${lib_path} "toolchains" _found)
-  if(${_found} EQUAL "-1")
-    set(_lib_in_system FALSE)
-  else()
-    set(_lib_in_system TRUE)
-  endif()
-
-  if(${_lib_in_system} AND ${_inc_in_system})
-    # both in system: ok
-    return()
-  endif()
-
-  if(NOT ${_lib_in_system} AND NOT ${_inc_in_system})
-    # both in toolchain: ok
-    return()
-  endif()
-  qi_error("Inconsistent lib/header settings found for package ${package}:
-${include_path}
-${lib_path}
-")
-
-endfunction()


Check build system support for AVX512 instructions

--- cmake/system_check.cmake
+++ cmake/system_check.cmake
@@ -66,3 +66,12 @@
   set(BINARY32 1)
 endif()

+if (X86_64 OR X86)
+  file(WRITE ${PROJECT_BINARY_DIR}/avx512.tmp "void main(void){ __asm__ volatile(\"vaddps %zmm1, %zmm0, %zmm0\"); }")
+execute_process(COMMAND ${CMAKE_C_COMPILER} -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp RESULT_VARIABLE NO_AVX512)
+if (NO_AVX512 EQUAL 1)
+set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
+endif()
+  file(REMOVE "avx512.tmp" "avx512.o")
+endif()
+


Changing the location of the data repository

--- common/GetTestData.cmake
+++ common/GetTestData.cmake
@@ -4,7 +4,7 @@
 set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/data)

 ExternalProject_Add(arrayfire_data
-    GIT_REPOSITORY git@mule:area51/arrayfire_data
+    GIT_REPOSITORY git@git.arrayfire.org:arrayfire/arrayfire-data.git
     DOWNLOAD_DIR ${CMAKE_BINARY_DIRECTORY}
     CONFIGURE_COMMAND ""
     INSTALL_COMMAND ""


[iOS] Search OGRE_DEPENDENCIES_DIR variable for libraries on iOS too.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -18,6 +18,8 @@
 getenv_path(OGRE_DEPENDENCIES_DIR)
 if(OGRE_BUILD_PLATFORM_APPLE_IOS)
   set(OGRE_DEP_SEARCH_PATH
+    ${OGRE_DEPENDENCIES_DIR}
+    ${ENV_OGRE_DEPENDENCIES_DIR}
     "${OGRE_BINARY_DIR}/iOSDependencies"
     "${OGRE_SOURCE_DIR}/iOSDependencies"
     "${OGRE_BINARY_DIR}/../iOSDependencies"


Fixed CMake error when boost is not found

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40841

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -103,7 +103,7 @@
 # Find Boost
 # Prefer static linking in all cases
 set(Boost_USE_STATIC_LIBS TRUE)
-set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38")
+set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39")
 # Components that need linking (NB does not include heaader-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
@@ -177,7 +177,6 @@
   ${CEGUI_INCLUDE_DIRS}
   ${OIS_INCLUDE_DIRS}
   ${Cg_INCLUDE_DIRS}
-  ${Boost_INCLUDE_DIRS}
   ${X11_INCLUDE_DIR}
   ${DirectX_INCLUDE_DIRS}
   ${CppUnit_INCLUDE_DIRS}
@@ -187,9 +186,13 @@
 link_directories(
   ${OPENGL_LIBRARY_DIRS}
   ${Cg_LIBRARY_DIRS}
-  ${Boost_LIBRARY_DIRS}
   ${X11_LIBRARY_DIRS}
   ${DirectX_LIBRARY_DIRS}
   ${CppUnit_LIBRARY_DIRS}
 )

+if (Boost_FOUND)
+  include_directories(${Boost_INCLUDE_DIRS})
+  link_directories(${Boost_LIBRARY_DIRS})
+endif ()
+


Flex/bison wincompat patch (#891)

Flex/bison wincompat patch (#891)

--- src/cmake/flexbison.cmake
+++ src/cmake/flexbison.cmake
@@ -76,8 +76,13 @@
           MAIN_DEPENDENCY ${bisonsrc}
           DEPENDS ${${compiler_headers}}
           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
+        if ( WINDOWS )
+            SET ( WINCOMPAT --wincompat )
+        else ()
+            SET ( WINCOMPAT )
+        endif ()
         ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
-          COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
+          COMMAND ${FLEX_EXECUTABLE} ${WINCOMPAT} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
           MAIN_DEPENDENCY ${flexsrc}
           DEPENDS ${${compiler_headers}}
           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )


[cmake] Change deprecated $<CONFIG> to $<CONFIGURATION>. NFC

See rL357338 for a similar change. The informational expression
$<CONFIGURATION> has been deprecated since CMake 3.0

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@357348 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -615,7 +615,7 @@
     set(run_clean "$(MAKE)" "-C" "${BINARY_DIR}" "clean")
   else()
     set(run_clean ${CMAKE_COMMAND} --build ${BINARY_DIR} --target clean
-                                   --config "$<CONFIGURATION>")
+                                   --config "$<CONFIG>")
   endif()

   ExternalProject_Add_Step(${name} clean


Fixed FindInnoSetup module.

Fixed FindInnoSetup module.

--- cmake/modules/FindInnoSetup.cmake
+++ cmake/modules/FindInnoSetup.cmake
@@ -26,3 +26,11 @@
     PATHS
         "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Inno Setup 5_is1;InstallLocation]"
 )
+
+# Process the arguments passed to find_package
+find_package_handle_standard_args(
+    InnoSetup
+    REQUIRED_VARS INNOSETUP_EXECUTABLE
+)
+
+mark_as_advanced(INNOSETUP_EXECUTABLE)


Exclude root build directory path from dictionaries

the constructor of TCling already takes care of injecting the
right directory.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -244,7 +244,7 @@
     set(includedirs -I${CMAKE_SOURCE_DIR}
                     -I${CMAKE_SOURCE_DIR}/interpreter/cling/include # This is for the RuntimeUniverse
                     -I${CMAKE_BINARY_DIR}/include)
-    set(excludepaths ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/include)
+    set(excludepaths ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
   elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc)
     set(includedirs -I${CMAKE_CURRENT_SOURCE_DIR}/inc)
   endif()


revision 42930 does not work for CMake version
2.8.3 and lower. So, I have protected the code by checking the CMake version
and reverted to the original behavior for old versions.
Attached is the addional patch to be committed.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@42939 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -49,23 +49,19 @@
 if(CMAKE_PROJECT_NAME STREQUAL ROOT)
   set(rootcint_cmd rootcint_tmp)
   set(rlibmap_cmd rlibmap)
+  if(CMAKE_VERSION VERSION_GREATER 2.8.3)
+    set(ROOTCINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h ROOTCINTTARGET)
+    set(CINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h CINTTARGET)
+  else()
+    set(ROOTCINTDEP rootcint_tmp)
+    set(CINTDEP cint_tmp)
+  endif()
 else()
-  if(TARGET rootcint)
-    get_target_property(_location rootcint LOCATION)
-    get_filename_component(_location ${_location} PATH)
-    get_filename_component(ROOTSYS ${_location} PATH)
-  endif()
-  if(WIN32)
-    set(rootcint_cmd rootcint)
-  else()
-    set(rootcint_cmd rootcint)
-#    set(rootcint_cmd ${ROOTSYS}/bin/setenvwrap.csh ${ld_library_path}=${ROOTSYS}/lib ${ROOTSYS}/bin/rootcint)
-  endif()
+  set(rootcint_cmd rootcint)
   set(rlibmap_cmd rlibmap)
+  set(ROOTCINTDEP)
+  set(CINTDEP)
 endif()
-#---Dictionary dependencies to ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h and rootcint executable
-set(ROOTCINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h ROOTCINTTARGET)
-set(CINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h CINTTARGET)

 set(CMAKE_VERBOSE_MAKEFILES OFF)
 set(CMAKE_INCLUDE_CURRENT_DIR OFF)


Fix build on VS2015 (missing WIN32 definition)

--- cmake/CompilerDefs.cmake
+++ cmake/CompilerDefs.cmake
@@ -23,6 +23,8 @@
 	IF( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
 		SET( CMAKE_INSTALL_PREFIX "C:/Ascemu" CACHE PATH "Install path prefix" FORCE )
 	ENDIF( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
+
+    add_definitions( -DWIN32 )
 ENDIF( WIN32 )

 SET( GLOBAL_DEFINES "-DHAVE_CONFIG_H")


add VSX identifier

add VSX identifier

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -424,6 +424,8 @@
   ei_is_64bit_env(IS_64BIT_ENV)
   if(EIGEN_TEST_NEON)
     set(${VAR} NEON)
+  elseif(EIGEN_TEST_VSX)
+    set(${VAR} VSX)
   elseif(EIGEN_TEST_ALTIVEC)
     set(${VAR} ALVEC)
   elseif(EIGEN_TEST_FMA)


memcheck: generate suppressions

memcheck: generate suppressions

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -370,7 +370,7 @@
      CACHE STRING
 	   "Optional suffix to use on lib folders (e.g. 64 for lib64)")

-set (MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --error-exitcode=1")
+set (MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --gen-suppressions=all --error-exitcode=1")
 set (MEMORYCHECK_SUPPRESSIONS_FILE
      "${CMAKE_SOURCE_DIR}/tests/valgrind.suppression"
      CACHE FILEPATH


pkg-config version for a5 is just 5

pkg-config version for a5 is just 5

git-svn-id: 39e099a8ed5324aded674b764a67f7a08796d9a7@7908 662fdd30-d327-0410-a531-f549c87e1e9e

--- cmake/FindALLEGRO5.cmake
+++ cmake/FindALLEGRO5.cmake
@@ -17,15 +17,15 @@
   $ENV{MINGDIR}/include/allegro5
 )

-set(VERSION_NUMBER "5.1")
+set(VERSION_NUMBER "5")

 if(UNIX AND NOT CYGWIN)
 	exec_program(pkg-config ARGS "allegro-${VERSION_NUMBER} allegro_ttf-${VERSION_NUMBER} allegro_memfile-${VERSION_NUMBER} allegro_image-${VERSION_NUMBER} allegro_primitives-${VERSION_NUMBER} allegro_audio-${VERSION_NUMBER} allegro_acodec-${VERSION_NUMBER} --libs" OUTPUT_VARIABLE ALLEGRO_LIBRARY)
-	IF (NOT ${ALLEGRO_LIBRARY})
+    #IF (NOT ${ALLEGRO_LIBRARY})
 	    # FALL BACK TO 5.0
-	    set(VERSION_NUMBER "5.0")
-	    exec_program(pkg-config ARGS "allegro-${VERSION_NUMBER} allegro_ttf-${VERSION_NUMBER} allegro_memfile-${VERSION_NUMBER} allegro_image-${VERSION_NUMBER} allegro_primitives-${VERSION_NUMBER} allegro_audio-${VERSION_NUMBER} allegro_acodec-${VERSION_NUMBER} --libs" OUTPUT_VARIABLE ALLEGRO_LIBRARY)
-	ENDIF (NOT ${ALLEGRO_LIBRARY})
+        #    set(VERSION_NUMBER "5.0")
+        #    exec_program(pkg-config ARGS "allegro-${VERSION_NUMBER} allegro_ttf-${VERSION_NUMBER} allegro_memfile-${VERSION_NUMBER} allegro_image-${VERSION_NUMBER} allegro_primitives-${VERSION_NUMBER} allegro_audio-${VERSION_NUMBER} allegro_acodec-${VERSION_NUMBER} --libs" OUTPUT_VARIABLE ALLEGRO_LIBRARY)
+        # ENDIF (NOT ${ALLEGRO_LIBRARY})
 	# Check if any of these checks have found if so then cause failure)
 	STRING(REGEX MATCH "not found" LIB_CHECK ${ALLEGRO_LIBRARY})
 	IF (${LIB_CHECK})


Made libclang cmake script more generic

Made libclang cmake script more generic

--- cmake/FindLibClang.cmake
+++ cmake/FindLibClang.cmake
@@ -2,41 +2,21 @@
   set(CLANG_ROOT $ENV{CLANG_ROOT})
 endif()

+file(GLOB CLANG_INCLUDE_HINTS /usr/lib/llvm-*/include /opt/local/libexec/llvm-*/include)
+
 find_path(CLANG_INCLUDE clang-c/Index.h
           HINTS
           ${CLANG_ROOT}/include
-          /usr/lib/llvm-3.5/include
-          /usr/lib/llvm-3.4/include
-          /usr/lib/llvm-3.3/include
-          /usr/lib/llvm-3.2/include
-          /usr/lib/llvm-3.1/include
-          /opt/local/libexec/llvm-3.5/include
-          /opt/local/libexec/llvm-3.4/include
-          /opt/local/libexec/llvm-3.3/include
-          /opt/local/libexec/llvm-3.2/include
-          /opt/local/libexec/llvm-3.1/include
+          ${CLANG_INCLUDE_HINTS}
           NO_DEFAULT_PATH)
-if (NOT EXISTS ${CLANG_INCLUDE})
-  find_path(CLANG_INCLUDE clang-c/Index.h)
-endif ()
+find_path(CLANG_INCLUDE clang-c/Index.h)

 find_path(CLANG_COMPILATION_INCLUDE clang-c/CXCompilationDatabase.h
-      HINTS
-      ${CLANG_ROOT}/include
-      /opt/local/libexec/llvm-3.5/include
-      /opt/local/libexec/llvm-3.4/include
-      /opt/local/libexec/llvm-3.3/include
-      /opt/local/libexec/llvm-3.2/include
-      /opt/local/libexec/llvm-3.1/include
-      /usr/lib/llvm-3.5/include
-      /usr/lib/llvm-3.4/include
-      /usr/lib/llvm-3.3/include
-      /usr/lib/llvm-3.2/include
-      /usr/lib/llvm-3.1/include
-      NO_DEFAULT_PATH)
-if (NOT EXISTS ${CLANG_COMPILATION_INCLUDE})
-  find_path(CLANG_COMPILATION_INCLUDE clang-c/CXCompilationDatabase.h)
-endif ()
+          HINTS
+          ${CLANG_ROOT}/include
+          ${CLANG_INCLUDE_HINTS}
+          NO_DEFAULT_PATH)
+find_path(CLANG_COMPILATION_INCLUDE clang-c/CXCompilationDatabase.h)

 if (EXISTS ${CLANG_INCLUDE})
   if ("${CLANG_ROOT}" STREQUAL "")
@@ -51,56 +31,57 @@
   find_library(CLANG_LIBS NAMES clang HINTS ${CLANG_ROOT}/lib/ ${CLANG_ROOT}/lib64/llvm/)
 endif()

-if (EXISTS "${CLANG_INCLUDE}/clang/Basic/Version.inc")
-  file(READ "${CLANG_INCLUDE}/clang/Basic/Version.inc" CLANG_VERSION_DATA)
-  string(REGEX REPLACE ";" "\\\\;" CLANG_VERSION_DATA ${CLANG_VERSION_DATA})
-  string(REGEX REPLACE "\n" ";" CLANG_VERSION_DATA ${CLANG_VERSION_DATA})
-  foreach (line ${CLANG_VERSION_DATA})
-    string(REGEX REPLACE "^#define CLANG_VERSION ([0-9]+\\.[0-9]+(\\.[0-9]+)?)$" "\\1" CLANG_VERSION_STRING ${line})
-    if (DEFINED CLANG_VERSION_STRING)
-      string(REGEX REPLACE "^([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR ${CLANG_VERSION_STRING})
-      string(REGEX REPLACE "^[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" CLANG_VERSION_MINOR ${CLANG_VERSION_STRING})
-      if (${CLANG_VERSION_STRING} MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+")
-        string(REGEX REPLACE "^[0-9]+\\.[0-9]+(\\.([0-9]+))?" "\\2" CLANG_VERSION_PATCH ${CLANG_VERSION_STRING})
+if (EXISTS ${CLANG_INCLUDE})
+  if (EXISTS "${CLANG_INCLUDE}/clang/Basic/Version.inc")
+    file(READ "${CLANG_INCLUDE}/clang/Basic/Version.inc" CLANG_VERSION_DATA)
+    string(REGEX REPLACE ";" "\\\\;" CLANG_VERSION_DATA ${CLANG_VERSION_DATA})
+    string(REGEX REPLACE "\n" ";" CLANG_VERSION_DATA ${CLANG_VERSION_DATA})
+    foreach (line ${CLANG_VERSION_DATA})
+      string(REGEX REPLACE "^#define CLANG_VERSION ([0-9]+\\.[0-9]+(\\.[0-9]+)?)$" "\\1" CLANG_VERSION_STRING ${line})
+      if (DEFINED CLANG_VERSION_STRING)
+        string(REGEX REPLACE "^([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR ${CLANG_VERSION_STRING})
+        string(REGEX REPLACE "^[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" CLANG_VERSION_MINOR ${CLANG_VERSION_STRING})
+        if (${CLANG_VERSION_STRING} MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+")
+          string(REGEX REPLACE "^[0-9]+\\.[0-9]+(\\.([0-9]+))?" "\\2" CLANG_VERSION_PATCH ${CLANG_VERSION_STRING})
+        else ()
+          set(CLANG_VERSION_PATCH "")
+        endif ()
+        if (NOT ${CLANG_VERSION_MAJOR} STREQUAL "" AND NOT ${CLANG_VERSION_MINOR} STREQUAL "")
+          if (NOT ${CLANG_VERSION_PATCH} STREQUAL "")
+            set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCH}")
+          else ()
+            set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}")
+          endif ()
+          break()
+        endif ()
+      endif ()
+    endforeach ()
+  endif ()
+  if ("${CLANG_VERSION}" STREQUAL "")
+    message(FATAL_ERROR "Unable to parse ClangVersion from ${CLANG_INCLUDE}/clang/Basic/Version.inc")
+  endif ()
+
+  message(STATUS "Using libclang version ${CLANG_VERSION} from ${CLANG_INCLUDE}/clang-c/")
+
+  if (EXISTS "${CLANG_INCLUDE}/clang/${CLANG_VERSION}/include/limits.h")
+    set(CLANG_SYSTEM_INCLUDE "${CLANG_INCLUDE}/clang/${CLANG_VERSION}/include/")
+  else ()
+    set(CLANG_SYSTEM_INCLUDE ${CLANG_LIBS})
+    string(REGEX REPLACE "\\/libclang\\.[dylibso]+$" "" CLANG_SYSTEM_INCLUDE ${CLANG_SYSTEM_INCLUDE})
+    if (EXISTS "${CLANG_SYSTEM_INCLUDE}/clang/${CLANG_VERSION}/include/limits.h")
+      set(CLANG_SYSTEM_INCLUDE "${CLANG_SYSTEM_INCLUDE}/clang/${CLANG_VERSION}/include/")
+    else ()
+      set(CLANG_SYSTEM_INCLUDE "")
+      if (EXISTS "${CLANG_ROOT}/lib/clang/${CLANG_VERSION}/include/limits.h")
+      set(CLANG_SYSTEM_INCLUDE "${CLANG_ROOT}/lib/clang/${CLANG_VERSION}/include/")
       else ()
-        set(CLANG_VERSION_PATCH "")
-      endif ()
-      if (NOT ${CLANG_VERSION_MAJOR} STREQUAL "" AND NOT ${CLANG_VERSION_MINOR} STREQUAL "")
-        if (NOT ${CLANG_VERSION_PATCH} STREQUAL "")
-          set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCH}")
-        else ()
-          set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}")
-        endif ()
-        break()
+      message(FATAL_ERROR "Couldn't find limits.h in either ${CLANG_INCLUDE}/clang/${CLANG_VERSION}/include/ or ${CLANG_SYSTEM_INCLUDE}/clang/${CLANG_VERSION}/include/")
       endif ()
     endif ()
-  endforeach ()
-endif ()
-if ("${CLANG_VERSION}" STREQUAL "")
-  message(FATAL_ERROR "Unable to parse ClangVersion from ${CLANG_INCLUDE}/clang/Basic/Version.inc")
-endif ()
-
-message("Using Clang version ${CLANG_VERSION} from ${CLANG_INCLUDE}/clang-c/")
-
-if (EXISTS "${CLANG_INCLUDE}/clang/${CLANG_VERSION}/include/limits.h")
-  set(CLANG_SYSTEM_INCLUDE "${CLANG_INCLUDE}/clang/${CLANG_VERSION}/include/")
-else ()
-  set(CLANG_SYSTEM_INCLUDE ${CLANG_LIBS})
-  string(REGEX REPLACE "\\/libclang\\.[dylibso]+$" "" CLANG_SYSTEM_INCLUDE ${CLANG_SYSTEM_INCLUDE})
-  if (EXISTS "${CLANG_SYSTEM_INCLUDE}/clang/${CLANG_VERSION}/include/limits.h")
-    set(CLANG_SYSTEM_INCLUDE "${CLANG_SYSTEM_INCLUDE}/clang/${CLANG_VERSION}/include/")
-  else ()
-    set(CLANG_SYSTEM_INCLUDE "")
-    if (EXISTS "${CLANG_ROOT}/lib/clang/${CLANG_VERSION}/include/limits.h")
-    set(CLANG_SYSTEM_INCLUDE "${CLANG_ROOT}/lib/clang/${CLANG_VERSION}/include/")
-    else ()
-    message(FATAL_ERROR "Couldn't find limits.h in either ${CLANG_INCLUDE}/clang/${CLANG_VERSION}/include/ or ${CLANG_SYSTEM_INCLUDE}/clang/${CLANG_VERSION}/include/")
-    endif ()
   endif ()
-endif ()
+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(CLANG DEFAULT_MSG CLANG_LIBS CLANG_INCLUDE)

 mark_as_advanced(CLANG_INCLUDE CLANG_LIBS)
-


Only require googletest if it is needed. (#2035)

When compiling with -DBUILD_TESTING=OFF the tests are disabled. This is
useful for package maintainers who build the same version over and over
and do not want to rebuild the tests every time, nor do they want the
dependency on a library (googletest) that is not needed at run-time.

--- cmake/IncludeGMock.cmake
+++ cmake/IncludeGMock.cmake
@@ -47,8 +47,12 @@
     add_library(GTest::gtest_main ALIAS GTest_gtest_main)
 endfunction ()

+include(CTest)
 if (TARGET GTest::gmock)
     # GTest::gmock is already defined, do not define it again.
+elseif(NOT BUILD_TESTING)
+    # Tests are turned off via -DBUILD_TESTING, do not load the googletest or
+    # googlemock dependency.
 elseif("${GOOGLE_CLOUD_CPP_GMOCK_PROVIDER}" STREQUAL "external")
     include(external/googletest)
 elseif("${GOOGLE_CLOUD_CPP_GMOCK_PROVIDER}" STREQUAL "package")


Fix MinGW architecture detection

Fix MinGW architecture detection

Fix typo that would always lead to detection of x86 for MinGW
builds in the OpenCVConfig.cmake file.

--- cmake/OpenCVConfig.cmake
+++ cmake/OpenCVConfig.cmake
@@ -87,7 +87,7 @@
   set(OpenCV_RUNTIME mingw)

   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
-                  OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
+                  OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
   if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
     set(MINGW64 1)


[cmake] bring back code for non-APPLE systems

The previous code was working fine for all non-apple platform. Without
this, the lib are missing many symbols on linux

--- cmake/SiconosSetup.cmake
+++ cmake/SiconosSetup.cmake
@@ -181,7 +181,26 @@
   if("${isSystemDir}" STREQUAL "-1")
      set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
   endif("${isSystemDir}" STREQUAL "-1")
-endif()
+else(APPLE)
+  # =========== RPATH stuff ===========
+  # do not skip the full RPATH for the build tree
+  if(FORCE_SKIP_RPATH)
+    set(CMAKE_SKIP_BUILD_RPATH TRUE)
+  else(FORCE_SKIP_RPATH)
+    set(CMAKE_SKIP_BUILD_RPATH FALSE)
+  endif(FORCE_SKIP_RPATH)
+
+  # when building, don't use the install RPATH already
+  # (but later on when installing)
+  set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+
+  # the RPATH to be used when installing
+  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+
+  # don't add the automatically determined parts of the RPATH
+  # which point to directories outside the build tree to the install RPATH
+  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif(APPLE)

 # init all common options for enabled components
 set(common_options DOCUMENTATION TESTING UNSTABLE PYTHON_WRAPPER


building ospray_embree_mic library.

building ospray_embree_mic library.

--- cmake/build_embree.cmake
+++ cmake/build_embree.cmake
@@ -66,12 +66,6 @@
   )

 IF (THIS_IS_MIC)
-  SET(EMBREE_SOURCES
-    ${EMBREE_COMMON_SYS_SOURCES}
-    ${EMBREE_COMMON_SIMD_SOURCES}
-    ${EMBREE_KERNELS_COMMON_SOURCES}
-    ${EMBREE_KERNELS_XEONPHI_SOURCES}
-    )
   # =======================================================
   # embree kernel components ONLY for xeon phi
   # =======================================================
@@ -107,6 +101,13 @@
     ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeonphi/bvh4hair/bvh4hair.cpp
     )

+    OSPRAY_ADD_LIBRARY(ospray_embree${OSPRAY_LIB_SUFFIX} SHARED
+      ${EMBREE_COMMON_SYS_SOURCES}
+      ${EMBREE_COMMON_SIMD_SOURCES}
+      ${EMBREE_KERNELS_COMMON_SOURCES}
+      ${EMBREE_KERNELS_XEONPHI_SOURCES}
+      )
+    TARGET_LINK_LIBRARIES(ospray_embree${OSPRAY_LIB_SUFFIX} pthread dl)

 ELSE()
   # =======================================================
@@ -156,13 +157,6 @@
     ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/bvh4hair/bvh4hair_intersector4.cpp
     )

-  # SET(EMBREE_SOURCES
-  #    ${EMBREE_COMMON_SYS_SOURCES}
-  #    ${EMBREE_COMMON_SIMD_SOURCES}
-  #    ${EMBREE_KERNELS_COMMON_SOURCES}
-  #    ${EMBREE_KERNELS_XEON_SOURCES}
-  #    )
-
   # ------------------------------------------------------------------
   # create the *BASE* embree library that's available on all ISAs
   # ------------------------------------------------------------------
@@ -173,7 +167,6 @@
     ${EMBREE_KERNELS_XEON_SOURCES}
     )
   TARGET_LINK_LIBRARIES(ospray_embree pthread dl)
-

   # ------------------------------------------------------------------
   # now, build and link in SSE41 support (for anything more than SSE)
@@ -262,7 +255,6 @@
     SET_TARGET_PROPERTIES(ospray_embree_avx PROPERTIES COMPILE_FLAGS "${OSPRAY_ARCH_AVX}")
     TARGET_LINK_LIBRARIES(ospray_embree ospray_embree_avx)
   ENDIF()
-

   # ------------------------------------------------------------------
   # now, build and link in AVX2 support (for AVX2 only)
@@ -298,7 +290,3 @@
     TARGET_LINK_LIBRARIES(ospray_embree ospray_embree_avx2)
   ENDIF()
 ENDIF()
-
-
-
-


fix in ctest script

fix in ctest script

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -206,9 +206,8 @@
   set(ENV{UBSAN_OPTIONS} "print_stacktrace=1")
 endif()

-# Update type (svn or git or "")
-#set(UPDATE_TYPE svn)
-set(UPDATE_TYPE "")
+# Update type (git, svn, wget or url)
+set(UPDATE_TYPE wget)

 # For continuous builds, number of seconds to stay alive
 set(test_runtime 43200) #12h by default
@@ -234,10 +233,17 @@
     set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} clone --depth 1 --branch stable https://github.com/gismo/gismo.git gismo_src")
   elseif("x${UPDATE_TYPE}" STREQUAL "xsvn")
     set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} checkout https://github.com/gismo/gismo.git/trunk gismo_src")
-  elseif("x${UPDATE_TYPE}" STREQUAL "x")
+  elseif("x${UPDATE_TYPE}" STREQUAL "xwget")
     execute_process(COMMAND /bin/bash "-c" "wget --no-check-certificate -qO - https://github.com/gismo/gismo/archive/stable.tar.gz | tar -zxf -")
-        execute_process(COMMAND mv gismo-stable gismo_src)
-    set(CTEST_CHECKOUT_COMMAND "")
+    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink gismo-stable gismo_src)
+    set(CTEST_CHECKOUT_COMMAND "${CMAKE_COMMAND} --version")
+  elseif("x${UPDATE_TYPE}" STREQUAL "xurl")
+    file(DOWNLOAD https://github.com/gismo/gismo/archive/stable.tar.gz ${CTEST_SCRIPT_DIRECTORY}/stable.tar.gz)
+    execute_process(
+      COMMAND ${CMAKE_COMMAND} -E tar xzf stable.tar.gz
+      COMMAND ${CMAKE_COMMAND} -E create_symlink gismo-stable gismo_src
+      WORKING_DIRECTORY ${CTEST_SCRIPT_DIRECTORY} )
+    set(CTEST_CHECKOUT_COMMAND "${CMAKE_COMMAND} --version")
   endif()
 endif()

@@ -328,7 +334,10 @@

 if(NOT "${CTEST_TEST_MODEL}" STREQUAL "Continuous")

-ctest_update()
+if(NOT "${CTEST_UPDATE_COMMAND}" STREQUAL "CTEST_UPDATE_COMMAND-NOTFOUND")
+  ctest_update()
+endif()
+
 run_ctests()

 else() #continuous model


CMake: Reverted code pushed by accident (inviwo/inviwo-dev#982)


Cache PLplot jar file and PLplot java plugin install locations to allow
interested users a chance to modify the default values.

svn path=/trunk/; revision=10562

--- cmake/modules/java.cmake
+++ cmake/modules/java.cmake
@@ -81,10 +81,13 @@
 if(ENABLE_java)
   # Set up installation locations for java specific files.
   # Java .jar files.
-  set(JAR_DIR ${CMAKE_INSTALL_DATADIR}/java)
+  set(JAR_DIR ${CMAKE_INSTALL_DATADIR}/java
+    CACHE PATH "PLplot jar file install location")
   get_filename_component(JAVADATA_HARDDIR ${JAR_DIR} ABSOLUTE)
   # JNI .so files.
-  set(JAVAWRAPPER_DIR ${LIB_DIR}/jni)
+  set(JAVAWRAPPER_DIR ${LIB_DIR}/jni
+    CACHE PATH "PLplot java plugin install location"
+    )
   get_filename_component(JAVAWRAPPER_HARDDIR ${JAVAWRAPPER_DIR} ABSOLUTE)
   # Library name suffix is system dependent.  Tests have shown
   # that ${CMAKE_SHARED_LIBRARY_SUFFIX} gives the correct suffix on both


cmake: Auto-add autoconf plugin in the presence of a config.json

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -73,6 +73,7 @@
    add_library(config_json STATIC config_json.o)
    set_target_properties(config_json PROPERTIES LINKER_LANGUAGE CXX)
    target_link_libraries(service --whole-archive config_json --no-whole-archive)
+   set(PLUGINS ${PLUGINS} autoconf)
 endif()

 #


Fix setting compile options with CMake 3.7 Update error message to match error message of CMake.

--- cmake/thirdParties.cmake
+++ cmake/thirdParties.cmake
@@ -13,8 +13,9 @@

     find_package(HDF5)
     if(HDF5_FOUND)
-        if(HDF5_VERSION VERSION_LESS 1.8)
-            message(FATAL_ERROR "HDF5 version ${HDF5_VERSION} is unsupported, minimum of 1.8 is required")
+        set(HDF_MIN_VER 1.8)
+        if(HDF5_VERSION VERSION_LESS ${HDF_MIN_VER})
+            message(FATAL_ERROR "Could NOT find HDF5: Found unsuitable version ${HDF5_VERSION}, but required is at least ${HDF_MIN_VER} (found ${HDF5_LIBRARIES})")
         endif()
         set(HAVE_HDF5 1)
     endif()
@@ -73,7 +74,9 @@
         # target from hdf5 1.8 config
         target_link_libraries(HDF5::HDF5 INTERFACE hdf5)
         if(NOT HDF5_USE_STATIC_LIBRARIES)
-            target_compile_definitions(HDF5::HDF5 INTERFACE "H5_BUILT_AS_DYNAMIC_LIB")
+            set_target_properties(HDF5::HDF5 PROPERTIES
+                INTERFACE_COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
+            )
         endif()
     else()
         # results from CMake FindHDF5
@@ -81,7 +84,6 @@
             INTERFACE_INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIRS}"
             INTERFACE_LINK_LIBRARIES "${HDF5_LIBRARIES}"
         )
-        target_compile_definitions(HDF5::HDF5 INTERFACE "${HDF5_DEFINITIONS}")
     endif()
 endif()


Fixed inclusion of OpenSSL libraries.

Fixed inclusion of OpenSSL libraries.

Note the OpenSSL_LIBRARIES != OPENSSL_LIBRARIES

--- mongodb_store/cmake/FindMongoClient.cmake
+++ mongodb_store/cmake/FindMongoClient.cmake
@@ -58,8 +58,8 @@
 # if we got the mongo stuff, add in the other things we want
 if(MongoClient_LIBRARIES)
   find_package(Boost REQUIRED COMPONENTS system thread program_options filesystem)
-  find_package(OpenSSL)
-  set(MongoClient_LIBRARIES ${MongoClient_LIBRARIES} ${Boost_LIBRARIES} ${OpenSSL_LIBRARIES})
+  find_package(OpenSSL REQUIRED)
+  set(MongoClient_LIBRARIES ${MongoClient_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES})
   message("MONGOGNGNGNG: " ${MongoClient_LIBRARIES})
 endif(MongoClient_LIBRARIES)


DMC-800 Fix FindgSOAP, prevent cmake from hanging on MacOS

--- modules/FindgSOAP.cmake
+++ modules/FindgSOAP.cmake
@@ -92,8 +92,17 @@
 # ----------------------------------------------------
 message(STATUS " - wsdlh : ${GSOAP_WSDL2H}")
 message(STATUS " - SOAPCPP2 : ${GSOAP_SOAPCPP2}")
-execute_process(COMMAND ${GSOAP_SOAPCPP2}  "-v"   OUTPUT_VARIABLE GSOAP_STRING_VERSION ERROR_VARIABLE GSOAP_STRING_VERSION )
+
+# some versions of soapcpp2 interpret "-v" as verbose, and hang while waiting for input
+# try "-help" first, and if it fails, do "-v"
+execute_process(COMMAND ${GSOAP_SOAPCPP2}  "-help"   OUTPUT_VARIABLE GSOAP_STRING_VERSION ERROR_VARIABLE GSOAP_STRING_VERSION )
 string(REGEX MATCH "[0-9]*\\.[0-9]*\\.[0-9]*" GSOAP_VERSION ${GSOAP_STRING_VERSION})
+
+if( "${GSOAP_VERSION}" STREQUAL "..")
+  execute_process(COMMAND ${GSOAP_SOAPCPP2}  "-v"   OUTPUT_VARIABLE GSOAP_STRING_VERSION ERROR_VARIABLE GSOAP_STRING_VERSION )
+  string(REGEX MATCH "[0-9]*\\.[0-9]*\\.[0-9]*" GSOAP_VERSION ${GSOAP_STRING_VERSION})
+endif()
+
 message(STATUS " - GSOAP VERSION : ${GSOAP_VERSION}")
 if( "${GSOAP_VERSION}"  VERSION_LESS "2.7.6")
 	set(GSOAP_276_COMPAT_FLAGS "")


GST plugin depends on Jpeg

GST plugin depends on Jpeg

[skip ci]

--- cmake/projects/gst_plugins_good/hunter.cmake
+++ cmake/projects/gst_plugins_good/hunter.cmake
@@ -24,7 +24,7 @@
 hunter_cmake_args(
     gst_plugins_good
     CMAKE_ARGS
-    DEPENDS_ON_PACKAGES=gst_plugins_base;xext
+    DEPENDS_ON_PACKAGES=gst_plugins_base;xext;Jpeg
     DEPENDS_ON_PKGCONFIGS=gstreamer-plugins-base-1.0 # ???
 )


Restore normal SITL startup script

Restore normal SITL startup script

--- cmake/configs/posix_sitl_default.cmake
+++ cmake/configs/posix_sitl_default.cmake
@@ -32,18 +32,23 @@
 	modules/sensors
 	modules/simulator
 	modules/mavlink
-	modules/dataman
 	modules/attitude_estimator_ekf
-	#modules/attitude_estimator_q
+	modules/attitude_estimator_q
 	modules/ekf_att_pos_estimator
 	modules/position_estimator_inav
+	modules/navigator
+	modules/vtol_att_control
 	modules/mc_pos_control
 	modules/mc_att_control
-	modules/navigator
+	modules/mc_pos_control_multiplatform
+	modules/mc_att_control_multiplatform
+	modules/land_detector
+	modules/fw_att_control
+	modules/fw_pos_control_l1
+	modules/dataman
+	modules/sdlog2
 	modules/commander
-	modules/vtol_att_control
 	modules/controllib
-	modules/ekf2
 	lib/mathlib
 	lib/mathlib/math/filter
 	lib/conversion


SITL: Default to same estimator as onboard

--- cmake/configs/posix_sitl_default.cmake
+++ cmake/configs/posix_sitl_default.cmake
@@ -104,7 +104,7 @@
 # for the config posix_sitl_efk2 and set again, explicitly, for posix_sitl_lpe,
 # which are based on posix_sitl_default.
 set(config_sitl_rcS_dir
-	posix-configs/SITL/init/lpe
+	posix-configs/SITL/init/ekf2
 	CACHE INTERNAL "init script dir for sitl"
 	)


[Config][CMake] Migrated to new FindPython3 (from deprecated FindPythonLibs)

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -479,48 +479,36 @@
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
-    message (STATUS "Requires PythonLibs-${_required_version}")
+    message (STATUS "Requires Python with version ${_required_version}; however just Python3 is considered here")
   else (${ARGC} GREATER 0)
-    message (STATUS "Requires PythonLibs without specifying any version")
+    message (STATUS "Requires Python3; any version will do")
   endif (${ARGC} GREATER 0)

   # The first check searches for the libraries and include paths.
   # However, on some older versions (e.g., on RedHat/CentOS 5.x),
   # only the static library is searched.
-  find_package (PythonLibs ${_required_version} REQUIRED)
+  find_package (Python3 COMPONENTS Interpreter Development REQUIRED)

   # The second check is to get the dynamic library for sure.
-  find_package (PythonLibsWrapper ${_required_version} REQUIRED)
-
-  if (PYTHONLIBS_FOUND)
-	# Derive the version of Python (for whatever reason, FindPythonLibs
-	# does not seem to provide that version variable.
-	get_filename_component (PYTHONLIBS_LIB_FILENAME ${PYTHON_LIBRARIES} NAME)
-	string (REGEX REPLACE "^libpython([0-9]+.[0-9]+).*$" "\\1"
-	  PYTHONLIBS_VERSION "${PYTHONLIBS_LIB_FILENAME}")
-
-	if (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-	  set (PY_MAJOR_VERSION "${CMAKE_MATCH_1}")
-	  set (PY_MINOR_VERSION "${CMAKE_MATCH_2}")
-	  set (PY_PATCH_VERSION "${CMAKE_MATCH_3}")
-	endif (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-
-	message (STATUS "Found PythonLibs ${PYTHONLIBS_VERSION} (${PYTHONLIBS_VERSION_STRING} / ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION})")
-
-	# Set the Python installation directory
-	set (INSTALL_PY_LIB_DIR
-	  ${INSTALL_LIB_DIR}/python${PYTHONLIBS_VERSION}/site-packages/py${PROJECT_NAME}
-	  CACHE PATH "Installation directory for Python libraries")
-
-	# Update the list of include directories for the project
-    include_directories (${PYTHON_INCLUDE_DIRS})
+  #find_package (PythonLibsWrapper ${_required_version} REQUIRED)
+
+  if (Python3_FOUND)
+    message (STATUS "Found Python3 ${Python3_VERSION} (${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH})")
+
+    # Set the Python installation directory
+    set (INSTALL_PY_LIB_DIR
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      CACHE PATH "Installation directory for Python libraries")
+
+    # Update the list of include directories for the project
+    include_directories (${Python3_INCLUDE_DIRS})

     # Update the list of dependencies for the project
-    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${PYTHON_LIBRARIES})
-
-  else (PYTHONLIBS_FOUND)
+    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${Python3_LIBRARIES})
+
+  else (Python3_FOUND)
 	message (FATAL_ERROR "Python libraries are missing. Please install them (e.g., 'python-devel' for the Fedora/RedHat package)")
-  endif (PYTHONLIBS_FOUND)
+  endif (Python3_FOUND)

 endmacro (get_python)

@@ -618,8 +606,8 @@
   #         On some platform/Boost version combinations, the Python version
   #         may be just the major version (2 or 3 as of 2019) or the major
   #         and minor versions (e.g., 27, 28, 34, 36, 37 as of 2019)
-  set (python_cpt_name1 "python${PY_MAJOR_VERSION}")
-  set (python_cpt_name2 "python${PY_MAJOR_VERSION}${PY_MINOR_VERSION}")
+  set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
+  set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
@@ -1473,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)
@@ -2555,27 +2543,26 @@

 # Python
 macro (display_python)
-  if (PYTHONLIBS_FOUND)
+  if (Python3_FOUND)
     message (STATUS)
-	message (STATUS "* Python:")
-	message (STATUS "  - PYTHONLIBS_VERSION ............ : ${PYTHONLIBS_VERSION}")
-	message (STATUS "  - PY_{MAJOR,MINOR,PATCH}_VERSION  : ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION}")
-	message (STATUS "  - PYTHON_LIBRARIES .............. : ${PYTHON_LIBRARIES}")
-	message (STATUS "  - PYTHON_INCLUDE_PATH ........... : ${PYTHON_INCLUDE_PATH}")
-	message (STATUS "  - PYTHON_INCLUDE_DIRS ........... : ${PYTHON_INCLUDE_DIRS}")
-	message (STATUS "  - PYTHON_DEBUG_LIBRARIES ........ : ${PYTHON_DEBUG_LIBRARIES}")
-	message (STATUS "  - Python_ADDITIONAL_VERSIONS .... : ${Python_ADDITIONAL_VERSIONS}")
-  endif (PYTHONLIBS_FOUND)
+    message (STATUS "* Python:")
+    message (STATUS "  - Python3_VERSION ............... : ${Python3_VERSION}")
+    message (STATUS "  - Python3_VERSION_{MJR,MNR,PTCH}  : ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH}")
+    message (STATUS "  - Python3_INCLUDE_DIRS .......... : ${Python3_INCLUDE_DIRS}")
+    message (STATUS "  - Python3_LIBRARIES ............. : ${Python3_LIBRARIES}")
+    message (STATUS "  - Python3_LIBRARY_DIRS .......... : ${Python3_LIBRARY_DIRS}")
+    message (STATUS "  - Python3_RUNTIME_LIBRARY_DIRS .. : ${Python3_RUNTIME_LIBRARY_DIRS}")
+  endif (Python3_FOUND)
 endmacro (display_python)

 # ICU
 macro (display_icu)
   if (ICU_FOUND)
     message (STATUS)
-	message (STATUS "* ICU:")
-	message (STATUS "  - ICU_VERSION ................... : ${ICU_VERSION}")
-	message (STATUS "  - ICU_LIBRARIES ................. : ${ICU_LIBRARIES}")
-	message (STATUS "  - ICU_INCLUDE_DIRS .............. : ${ICU_INCLUDE_DIR}")
+    message (STATUS "* ICU:")
+    message (STATUS "  - ICU_VERSION ................... : ${ICU_VERSION}")
+    message (STATUS "  - ICU_LIBRARIES ................. : ${ICU_LIBRARIES}")
+    message (STATUS "  - ICU_INCLUDE_DIRS .............. : ${ICU_INCLUDE_DIR}")
   endif (ICU_FOUND)
 endmacro (display_icu)


layer for OpenBlas in RHEL6

layer for OpenBlas in RHEL6

RHEL6 does not include OpenBlas cmake layer, with the changes in here
we are able to find OpneBlas.

--- modules/FindCBLAS.cmake
+++ modules/FindCBLAS.cmake
@@ -38,7 +38,7 @@
       set(BLAS_LIBRARIES ${CBLAS_LIBRARIES})
       set(BLAS_INCLUDE_DIR ${CBLAS_INCLUDE_DIRS})
     endif()
-
+
     # include -pthread so MKL can be included on Ubuntu + enthought
     if(use_pthread_flag)
       set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
@@ -69,6 +69,39 @@
     # Try open-blas
     if(NOT BLAS_LIBRARIES OR NOT BLAS_INCLUDE_DIR)
         find_package(OpenBLAS QUIET)
+        if(NOT OpenBLAS_FOUND)
+          # RH 6 does not include the cmake layer to find openblas
+          # The following paths are extracted from: github.com/BVLC/caffe
+          SET(Open_BLAS_INCLUDE_SEARCH_PATHS
+            /usr/include
+            /usr/include/openblas
+            /usr/include/openblas-base
+            /usr/local/include
+            /usr/local/include/openblas
+            /usr/local/include/openblas-base
+            /opt/OpenBLAS/include
+            $ENV{OpenBLAS_HOME}
+            $ENV{OpenBLAS_HOME}/include
+            )
+          SET(Open_BLAS_LIB_SEARCH_PATHS
+            /lib/
+            /lib/openblas-base
+            /lib64/
+            /usr/lib
+            /usr/lib/openblas-base
+            /usr/lib64
+            /usr/local/lib
+            /usr/local/lib64
+            /opt/OpenBLAS/lib
+            $ENV{OpenBLAS}
+            $ENV{OpenBLAS}/lib
+            $ENV{OpenBLAS_HOME}
+            $ENV{OpenBLAS_HOME}/lib
+            )
+          FIND_PATH(OpenBLAS_INCLUDE_DIRS NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS})
+          FIND_LIBRARY(OpenBLAS_LIBRARIES NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
+          set(OpenBLAS_FOUND TRUE)J
+        endif()
         if(OpenBLAS_FOUND)
             if(NOT EXISTS "${OpenBLAS_LIBRARIES}")
               string(REPLACE "'" "" OpenBLAS_LIBRARIES ${OpenBLAS_LIBRARIES})


CBLAS can be fully determined by explicit input

--- modules/FindCBLAS.cmake
+++ modules/FindCBLAS.cmake
@@ -1,5 +1,30 @@
 # First attempts using pkg-config. It is not unlikely to work and should be
 # quite reliable on linuxes.
+macro(found_or_not_found_blas)
+    if(NOT CBLAS_FIND_QUIETLY)
+        if(BLAS_LIBRARIES)
+            list(GET BLAS_LIBRARIES 0 first_blas)
+            message(STATUS "Found blas libraries ${first_blas}")
+        endif()
+        if(BLAS_INCLUDE_DIR)
+            message(STATUS "Found blas include ${BLAS_INCLUDE_DIR}")
+        endif()
+    endif()
+    if(CBLAS_FIND_REQUIRED)
+      if(NOT BLAS_LIBRARIES AND NOT BLAS_INCLUDE_DIR)
+          message(FATAL_ERROR "Could not find a blas library")
+      elseif(NOT BLAS_INCLUDE_DIR)
+          message(FATAL_ERROR "Could not figure out blas include dir")
+      elseif(NOT BLAS_LIBRARIES)
+          message(FATAL_ERROR "Could not figure out blas library")
+      endif()
+    endif()
+endmacro()
+
+if(BLAS_LIBRARIES AND BLAS_INCLUDE_DIR)
+    found_or_not_found_blas()
+    return()
+endif()
 include(FindPkgConfig)
 pkg_search_module(CBLAS cblas)
 if(NOT CBLAS_FOUND AND PKG_CONFIG_FOUND)
@@ -54,21 +79,4 @@
     find_path(BLAS_INCLUDE_DIR NAMES cblas.h mkl.h HINTS ${directories})
 endif()

-if(NOT CBLAS_FIND_QUIETLY)
-    if(BLAS_LIBRARIES)
-        list(GET BLAS_LIBRARIES 0 first_blas)
-        message(STATUS "Found blas libraries ${first_blas}")
-    endif()
-    if(BLAS_INCLUDE_DIR)
-        message(STATUS "Found blas include ${BLAS_INCLUDE_DIR}")
-    endif()
-endif()
-if(CBLAS_FIND_REQUIRED)
-  if(NOT BLAS_LIBRARIES AND NOT BLAS_INCLUDE_DIR)
-      message(FATAL_ERROR "Could not find a blas library")
-  elseif(NOT BLAS_INCLUDE_DIR)
-      message(FATAL_ERROR "Could not figure out blas include dir")
-  elseif(NOT BLAS_LIBRARIES)
-      message(FATAL_ERROR "Could not figure out blas library")
-  endif()
-endif()
+found_or_not_found_blas()


Split off 8.2.54

Split off 8.2.54

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 53 )
+set ( HPCC_POINT 55 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Nagios Monitoring 6.0.6-rc1 Release Candidate 1

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 6 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 3 )
-set ( HPCC_MATURITY "closedown" )
+set ( HPCC_POINT 6 )
+set ( HPCC_MATURITY "rc" )
 set ( HPCC_SEQUENCE 1 )
 ###


[axl] release 6.0.0 (re-release)

[axl] release 6.0.0 (re-release)

prev release was never publicly available


BUG: Fails to load ITK IO runtime modules.

--- Applications/TubeTKModules.cmake
+++ Applications/TubeTKModules.cmake
@@ -55,7 +55,7 @@
   MergeTubeGraphs
   ResampleImage
   RegisterImages
-  RegisterImageToTubesUsingRigidTransform
+  # RegisterImageToTubesUsingRigidTransform
   RegisterUsingImageCenters
   SampleCLIApplication
   SegmentBinaryImageSkeleton


Checked LL components against latest Cube firmwares

--- cmake/FindSTM32LL.cmake
+++ cmake/FindSTM32LL.cmake
@@ -2,30 +2,30 @@

 IF(STM32_FAMILY STREQUAL "F0")
     SET(LL_COMPONENTS	adc bus comp cortex crc crs dac dma exti gpio i2c
-						i2s iwdg pwr rcc rtc spi system tim usart utils wwdg)
+						iwdg pwr rcc rtc spi system tim usart utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)

     SET(LL_PREFIX stm32f0xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F1")
-    SET(LL_COMPONENTS	adc bus cortex crc dac dma exti gpio i2c i2s
-						iwdg pwr rcc rtc spi system tim usart usb utils wwdg)
+    SET(LL_COMPONENTS	adc bus cortex crc dac dma exti fsmc gpio i2c
+						iwdg pwr rcc rtc sdmmc spi system tim usart usb utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)

     SET(LL_PREFIX stm32f1xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F2")
-    SET(LL_COMPONENTS	adc bus cortex crc dac dma exti gpio i2c i2s iwdg pwr
-						rcc rng rtc spi system tim usart usb utils wwdg)
+    SET(LL_COMPONENTS	adc bus cortex crc dac dma exti fsmc gpio i2c iwdg pwr
+						rcc rng rtc sdmmc spi system tim usart usb utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)

     SET(LL_PREFIX stm32f2xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F3")
-    SET(LL_COMPONENTS	adc bus comp cortex crc dac dma exti gpio hrtim i2c i2s
+    SET(LL_COMPONENTS	adc bus comp cortex crc dac dma exti fmc gpio hrtim i2c
 						iwdg opamp pwr rcc rtc spi system tim usart utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)
@@ -33,32 +33,29 @@
     SET(LL_PREFIX stm32f3xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F4")
-    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti fmc gpio i2c i2s iwdg
-						lptim pwr rcc rng rtc spi system tim usart usb utils wwdg)
+    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti fmc fsmc gpio i2c iwdg
+						lptim pwr rcc rng rtc sdmmc spi system tim usart usb utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)

     SET(LL_PREFIX stm32f4xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F7")
-    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti gpio i2c i2s iwdg
-						lptim pwr rcc rng rtc spi system tim usart usb utils wwdg)
+    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti fmc gpio i2c iwdg
+						lptim pwr rcc rng rtc sdmmc spi system tim usart usb utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)

     SET(LL_PREFIX stm32f7xx_)

 ELSEIF(STM32_FAMILY STREQUAL "H7")
-    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti gpio i2c i2s iwdg
-						lptim pwr rcc rng rtc spi system tim usart usb utils wwdg)
-
-    SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)
+    SET(LL_COMPONENTS   delayblock fmc sdmmc usb)

     SET(LL_PREFIX stm32h7xx_)

 ELSEIF(STM32_FAMILY STREQUAL "L0")
-    SET(LL_COMPONENTS	adc bus comp cortex crc crs dac dma exti gpio i2c i2s
-						iwdg lptim lpuart pwr rcc rng rtc spi system tim usart
+    SET(LL_COMPONENTS	adc bus comp cortex crc crs dac dma exti gpio i2c
+						iwdg lptim lpuart pwr rcc rng rtc spi system tim usart usb
 						utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)
@@ -66,15 +63,15 @@
     SET(LL_PREFIX stm32l0xx_)

 ELSEIF(STM32_FAMILY STREQUAL "L1")
-    SET(LL_COMPONENTS	adc comp crc dac dma exti fsmc gpio i2c opamp pwr rcc
-						rtc sdmmc spi tim usart utils)
+    SET(LL_COMPONENTS	adc bus comp cortex crc dac dma exti fsmc gpio i2c iwdg opamp
+                        pwr rcc rtc sdmmc spi tim usart utils)
     SET(LL_REQUIRED_COMPONENTS pwr rcc utils)

     SET(LL_PREFIX stm32l1xx_)

 ELSEIF(STM32_FAMILY STREQUAL "L4")
     SET(LL_COMPONENTS	adc bus comp cortex crc crs dac dma2d dmamux dma exti
-						gpio i2c iwdg lptim lpuart opamp pwr rcc rng rtc spi
+						fmc gpio i2c iwdg lptim lpuart opamp pwr rcc rng rtc sdmmc spi
 						system tim usart usb utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)


Fix incorrect error when testing is disabled.

When building with MPI and testing is disabled (which happens when
building on supercomputers), VTK fails to build because of missing
MPIEXEC. That's wrong. MPIEXEC is only needed if testing is enabled.
Fixed the error message accordingly.

--- CMake/vtkTestingMPISupport.cmake
+++ CMake/vtkTestingMPISupport.cmake
@@ -28,7 +28,10 @@
   set(VTK_MPI_MAX_NUMPROCS ${MPIEXEC_MAX_NUMPROCS} CACHE STRING
     "Maximum number of processors available to run parallel applications. (see ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt for more info.)" FORCE)
 else()
-  message(FATAL_ERROR "MPIEXEC was empty.")
+  if(BUILD_TESTING)
+    # This is not a fatal error unless testing is enabled.
+    message(FATAL_ERROR "MPIEXEC was empty.")
+  endif()
 endif()

 mark_as_advanced(


example: Add CHECK_INSTALL_DIR override for FindCheck.cmake

If pkg-config is not installed on the system, then the
FindCheck.cmake script may fail. This is especially likely
on Windows. In this case, we expect that the variable
CHECK_INSTALL_DIR points to the install location of Check.

If this variable is not defined, then the find_path() and
find_library() functions will try to locate Check the
best that it can.

git-svn-id: caee63afe878fe2ec7dbba394a86c9654d9110ca@1095 64e312b2-a51f-0410-8e61-82d0ca0eb02a

--- doc/example/cmake/FindCheck.cmake
+++ doc/example/cmake/FindCheck.cmake
@@ -24,10 +24,17 @@

 # Look for CHECK include dir and libraries
 IF( NOT CHECK_FOUND )
-
-	FIND_PATH( CHECK_INCLUDE_DIR check.h )
-
-	FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
+	IF ( CHECK_INSTALL_DIR )
+		MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
+		SET ( CHECK_INCLUDE_DIR  "${CHECK_INSTALL_DIR}/include" )
+		SET ( CHECK_INCLUDE_DIRS "${CHECK_INCLUDE_DIR}" )
+		FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
+		FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
+		SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
+	ELSE ( CHECK_INSTALL_DIR )
+		FIND_PATH( CHECK_INCLUDE_DIR check.h )
+		FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
+	ENDIF ( CHECK_INSTALL_DIR )

 	IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
 		SET( CHECK_FOUND 1 )


[CMake] pass -Wno-pedantic to cc_kext builtins build

We don't pass -pedantic to the builtin builds in the makefiles, so we shouldn't do it here. This is a temporary fix for the broken bot:

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_build/7526/warnings8Result/new/

A more correct solution is in the works.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@248515 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -195,7 +195,7 @@
                               OS ${os}
                               ARCH ${arch}
                               SOURCES ${${arch}_SOURCES}
-                              CFLAGS "-std=c99" -arch ${arch} -mkernel
+                              CFLAGS "-std=c99" -arch ${arch} -mkernel -Wno-pedantic
                               DEFS KERNEL_USE
                               PARENT_TARGET builtins)


Fix qi_add_optional_package(PYTHON)

Fix qi_add_optional_package(PYTHON)

Change-Id: I38f449efa739dd27d145371d1472a994186578d1
Reviewed-on: http://gerrit.aldebaran.lan:8080/3447
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/python-config.cmake
+++ cmake/qibuild/modules/python-config.cmake
@@ -18,9 +18,13 @@
   clean(PYTHON)
   unset(PYTHON_INCLUDE_DIRS)
   unset(PYTHON_INCLUDE_DIRS CACHE)
-  find_package(PythonLibs REQUIRED)
-  qi_set_global(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
-  qi_set_global(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
+  find_package(PythonLibs)
+  if(PYTHONLIBS_FOUND)
+    qi_set_global(PYTHON_PACKAGE_FOUND FALSE)
+  else()
+    qi_set_global(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
+    qi_set_global(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
+  endif()
 endif()
 export_lib(PYTHON)


Update Superbuild.cmake

Update Superbuild.cmake

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -94,6 +94,15 @@
 ###########################################
 # Configure headless build
 OPTION(BUILD_HEADLESS "Build SCIRun without GUI." OFF)
+
+###########################################
+# Configure Qt version
+OPTION(QT5_BUILD "Qt 5 compatible build" ON)
+# Until ViewScene works...
+IF(APPLE)
+  SET(QT5_BUILD OFF)
+ENDIF()
+MARK_AS_ADVANCED(QT5_BUILD)

 ###########################################
 # Travis CI build needs to be as slim as possible
@@ -108,6 +117,7 @@
     SET(BUILD_WITH_SCIRUN_DATA OFF)
   ELSE()
     SET(WITH_OSPRAY OFF)
+    SET(QT5_BUILD OFF) # need to check this one
 	  SET(BUILD_TESTING OFF)
 	  SET(DOWNLOAD_TOOLKITS OFF)
 	  SET(BUILD_WITH_SCIRUN_DATA OFF)
@@ -122,11 +132,6 @@

   ADD_DEFINITIONS(-DTRAVIS_BUILD)
 ENDIF()
-
-###########################################
-# Travis CI build needs to be as slim as possible
-OPTION(QT5_BUILD "Qt 5 compatible build" OFF)
-MARK_AS_ADVANCED(QT5_BUILD)

 ###########################################
 # Configure Qt
@@ -147,17 +152,17 @@
       MESSAGE(FATAL_ERROR "QT ${QT_MIN_VERSION} or later is required for building the SCIRun GUI")
     ENDIF()
   ELSE()
-    SET(QT_MIN_VERSION "5.9")
+    SET(QT_MIN_VERSION "5.12")

     SET(Qt5_PATH "" CACHE PATH "Path to directory where Qt 5 is installed. Directory should contain lib and bin subdirectories.")

     IF(IS_DIRECTORY ${Qt5_PATH})
-      FIND_PACKAGE(Qt5Core REQUIRED HINTS ${Qt5_PATH})
-      FIND_PACKAGE(Qt5Gui REQUIRED HINTS ${Qt5_PATH})
-  	  FIND_PACKAGE(Qt5Widgets REQUIRED HINTS ${Qt5_PATH})
-  	  FIND_PACKAGE(Qt5Network REQUIRED HINTS ${Qt5_PATH})
-      FIND_PACKAGE(Qt5OpenGL REQUIRED HINTS ${Qt5_PATH})
-  	  FIND_PACKAGE(Qt5Concurrent REQUIRED HINTS ${Qt5_PATH})
+      FIND_PACKAGE(Qt5Core ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
+      FIND_PACKAGE(Qt5Gui ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
+  	  FIND_PACKAGE(Qt5Widgets ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
+  	  FIND_PACKAGE(Qt5Network ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
+      FIND_PACKAGE(Qt5OpenGL ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
+  	  FIND_PACKAGE(Qt5Concurrent ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
     ELSE()
       MESSAGE(SEND_ERROR "Set Qt5_PATH to directory where Qt 5 is installed (containing lib and bin subdirectories) or set BUILD_HEADLESS to ON.")
     ENDIF()


Disable the two new tests for vc2012 (fails with 32-bit...).

--- tools/tests.cmake
+++ tools/tests.cmake
@@ -314,14 +314,16 @@
 set_tests_properties (GeodSolve55 GeodSolve56 GeodSolve57 GeodSolve58
   PROPERTIES PASS_REGULAR_EXPRESSION "nan nan nan")

-# Check for points close with longitudes close to 180 deg apart.
-add_test (NAME GeodSolve59 COMMAND GeodSolve
-  -i -p 9 --input-string "5 0.00000000000001 10 180")
-add_test (NAME GeodSolve60 COMMAND GeodSolve
-  -i -p 9 --input-string "5 0.00000000000001 10 180" -E)
-set_tests_properties (GeodSolve59 GeodSolve60
-  PROPERTIES PASS_REGULAR_EXPRESSION
-  "0\\.0000000000000[34] 179\\.9999999999999[5-7] 18345191\\.17433271[2-4]")
+if (NOT (MSVC AND MSVC_VERSION MATCHES "18.."))
+  # Check for points close with longitudes close to 180 deg apart.
+  add_test (NAME GeodSolve59 COMMAND GeodSolve
+    -i -p 9 --input-string "5 0.00000000000001 10 180")
+  add_test (NAME GeodSolve60 COMMAND GeodSolve
+    -i -p 9 --input-string "5 0.00000000000001 10 180" -E)
+  set_tests_properties (GeodSolve59 GeodSolve60
+    PROPERTIES PASS_REGULAR_EXPRESSION
+    "0\\.0000000000000[34] 179\\.9999999999999[5-7] 18345191\\.17433271[2-4]")
+endif ()

 # Check fix for pole-encircling bug found 2011-03-16
 add_test (NAME Planimeter0 COMMAND Planimeter


add non-local system locations for libreadstat

--- Tools/CMake/Libraries.cmake
+++ Tools/CMake/Libraries.cmake
@@ -177,8 +177,8 @@
     set(LIBREADSTAT_INCLUDE_DIRS /app/include)
     set(LIBREADSTAT_LIBRARY_DIRS /app/lib)
   else()
-    set(LIBREADSTAT_INCLUDE_DIRS /usr/local/include)
-    set(LIBREADSTAT_LIBRARY_DIRS /usr/local/lib)
+    set(LIBREADSTAT_INCLUDE_DIRS /usr/local/include /usr/include)
+    set(LIBREADSTAT_LIBRARY_DIRS /usr/local/lib /usr/lib)
   endif()

   message(CHECK_START "Looking for libreadstat.so")


BUG: fix MacOS Glew detection

BUG: fix MacOS Glew detection

--- Modules/ThirdParty/Glew/otb-module-init.cmake
+++ Modules/ThirdParty/Glew/otb-module-init.cmake
@@ -22,7 +22,11 @@

 # FIX: glew-config.cmake import GLEW::GLEW target but does not necessarily set GLEW_LIBRARY
 if(NOT GLEW_LIBRARY)
-  get_target_property(GLEW_LIBRARY GLEW::GLEW IMPORTED_IMPLIB_RELEASE)
+  if(WIN32)
+    get_target_property(GLEW_LIBRARY GLEW::GLEW IMPORTED_IMPLIB_RELEASE)
+  else()
+    get_target_property(GLEW_LIBRARY GLEW::GLEW IMPORTED_LOCATION_RELEASE)
+  endif()
 endif()

 mark_as_advanced(GLEW_INCLUDE_DIR)


[AddSwiftStdlib.cmake] Add the info.plist file as link dependency

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -1220,6 +1220,7 @@
         "${PLIST_INFO_PLIST_OUT}"
         @ONLY
         NEWLINE_STYLE UNIX)
+    set_property(TARGET ${target} APPEND PROPERTY LINK_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${PLIST_INFO_PLIST_OUT}")

     # If Application Extensions are enabled, pass the linker flag marking
     # the dylib as safe.


Removed erroneous USE_HAL_DRIVER

Removed erroneous USE_HAL_DRIVER


Force LF: types.info

Force LF: types.info

--- cmake/modules/hunter_create_cache_meta_directory.cmake
+++ cmake/modules/hunter_create_cache_meta_directory.cmake
@@ -49,12 +49,27 @@
   hunter_make_directory("${cache_meta_dir}" "${args_sha1}" cache_meta_dir)
   file(COPY "${HUNTER_ARGS_FILE}" DESTINATION "${cache_meta_dir}")

-  # Save package configuration types
+  # Save package configuration types {
+
   set(types_info "${HUNTER_PACKAGE_HOME_DIR}/types.info")
-  file(WRITE "${types_info}" "${HUNTER_PACKAGE_CONFIGURATION_TYPES}")
+  set(types_info_nolf "${types_info}.NOLF")
+
+  file(WRITE "${types_info_nolf}" "${HUNTER_PACKAGE_CONFIGURATION_TYPES}")
+
+  # About '@ONLY': no substitutions expected but COPYONLY can't be
+  # used with NEWLINE_STYLE
+  configure_file(
+      "${types_info_nolf}"
+      "${types_info}"
+      @ONLY
+      NEWLINE_STYLE LF
+  )
+
   file(SHA1 "${types_info}" types_sha1)
   hunter_make_directory("${cache_meta_dir}" "${types_sha1}" cache_meta_dir)
   file(COPY "${types_info}" DESTINATION "${cache_meta_dir}")
+
+  # }

   # Save internal-dependencies information
   set(internal_deps_id "${HUNTER_PACKAGE_HOME_DIR}/internal_deps.id")


Fix Cython warning

Fix Cython warning

--- cmake/FindCython.cmake
+++ cmake/FindCython.cmake
@@ -6,7 +6,7 @@
 # paths:

 find_program(CYTHON_BIN NAMES cython cython3 cython2)
-SET(CYTHON_FLAGS --cplus --fast-fail)
+SET(CYTHON_FLAGS --cplus --fast-fail -3)

 SET(Cython_FOUND FALSE)
 IF (CYTHON_BIN)


cmake: extensions: Remove macro zephyr_library_ifdef.

This cmake macro was changing the control flow of the cmake files.
It is not advisable to modify the callee control flow from inside
a cmake macro.
Hence removing all instances of this macro from the build system.

Fixes: GH-7565

Signed-off-by: Adithya Baglody <06b44f6fa9a97a2b955c2d2cd070279967447860@intel.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -922,18 +922,6 @@
     list(APPEND ${list} ${ARGN})
   endif()
 endmacro()
-
-# Checks if a feature is enabled and then does the same operation as
-# zephyr_library. If it finds that the feature is not set it will not
-# create a new library and will stop processing the rest of
-# the CMakeFile.txt
-macro(zephyr_library_ifdef feature_toggle)
-    if(${${feature_toggle}})
-      zephyr_library()
-      else()
-      return()
-    endif()
-  endmacro()

 # 3.2. *_ifndef
 # See 3.1 *_ifdef


Allow RTK compilation without Cuda, even if Cuda is present

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -87,7 +87,8 @@
         endif()
       endif()
     else()
-      message(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda.\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
+      message(WARNING "nvcc-check: Please install adequate gcc for cuda.\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
+      set(CUDA_FOUND OFF)
     endif()
   endif()
 endif()


set EL_HAVE_LAPACK_SUFFIX to TRUE is SUFFIX is defined

--- cmake/tests/Math.cmake
+++ cmake/tests/Math.cmake
@@ -87,6 +87,7 @@
   if(NOT EL_HAVE_DPOTRF_SUFFIX)
     message(FATAL_ERROR "dpotrf${EL_LAPACK_SUFFIX} was not detected")
   endif()
+  set(EL_HAVE_LAPACK_SUFFIX TRUE)
 else()
   check_function_exists(dpotrf  EL_HAVE_DPOTRF)
   check_function_exists(dpotrf_ EL_HAVE_DPOTRF_POST)


Amend HADOOP-8659. Native libraries must build with soft-float ABI for Oracle JVM on ARM. Contributed by Colin Patrick McCabe

git-svn-id: 87fadc70c6d1ec4cad1ab866a1bdcf2d7235de87@1372584 13f79535-47bb-0310-9956-ffa450edef68

--- hadoop-common-project/hadoop-common/src/JNIFlags.cmake
+++ hadoop-common-project/hadoop-common/src/JNIFlags.cmake
@@ -18,17 +18,18 @@

 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

-find_package(JNI REQUIRED)
-
 # If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit.
 # This variable is set by maven.
 if (JVM_ARCH_DATA_MODEL EQUAL 32)
     # Force 32-bit code generation on amd64/x86_64, ppc64, sparc64
     if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
         set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32")
     endif ()
     if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
+        # Set CMAKE_SYSTEM_PROCESSOR to ensure that find_package(JNI) will use
+        # the 32-bit version of libjvm.so.
         set(CMAKE_SYSTEM_PROCESSOR "i686")
     endif ()
 endif (JVM_ARCH_DATA_MODEL EQUAL 32)
@@ -63,3 +64,5 @@
         endif ()
     endif (READELF MATCHES "NOTFOUND")
 endif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+
+find_package(JNI REQUIRED)


Print an error message if PySideTools are not found.

--- cMake/FindPySideTools.cmake
+++ cMake/FindPySideTools.cmake
@@ -74,8 +74,16 @@
    set(PYSIDE_TOOLS_FOUND TRUE)
 ENDIF(EXISTS ${PYSIDEUIC4BINARY} AND EXISTS ${PYSIDERCC4BINARY})

-if(PYSIDE_TOOLS_FOUND)
-  if(NOT PYSIDE_TOOLS_FOUND_QUIETLY)
-    message(STATUS "Found PySide Tools: ${PYSIDEUIC4BINARY}, ${PYSIDERCC4BINARY}")
-  endif(NOT PYSIDE_TOOLS_FOUND_QUIETLY)
-endif(PYSIDE_TOOLS_FOUND)
+if(PYSIDERCC4BINARY AND PYSIDEUIC4BINARY)
+    if (NOT PySideTools_FIND_QUIETLY)
+        message(STATUS "Found PySide Tools: ${PYSIDEUIC4BINARY}, ${PYSIDERCC4BINARY}")
+    endif (NOT PySideTools_FIND_QUIETLY)
+else(PYSIDERCC4BINARY AND PYSIDEUIC4BINARY)
+    if(PySideTools_FIND_REQUIRED)
+        message(FATAL_ERROR "PySideTools could not be not found, but are required.")
+    else(PySideTools_FIND_REQUIRED)
+        if (NOT PySideTools_FIND_QUIETLY)
+                message(STATUS "PySideTools: not found.")
+        endif (NOT PySideTools_FIND_QUIETLY)
+    endif(PySideTools_FIND_REQUIRED)
+endif(PYSIDERCC4BINARY AND PYSIDEUIC4BINARY)


fix appending -Wall in CMAKE_CXX_FLAGS

fix appending -Wall in CMAKE_CXX_FLAGS

It was using the variable as a list, but it seems that it should be a
string. It fixes issues when the user adds its own flags.

--- lib/orogen/templates/config/Base.cmake
+++ lib/orogen/templates/config/Base.cmake
@@ -9,7 +9,7 @@
 include(CheckCXXCompilerFlag)
 CHECK_CXX_COMPILER_FLAG("-Wall", CXX_SUPPORTS_WALL)
 if (CXX_SUPPORTS_WALL)
-    set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall)
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 endif (CXX_SUPPORTS_WALL)

 # Define the necessary RPath information for all binaries. That can be stripped


功能检测脚本变更

功能检测脚本变更

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -3,13 +3,13 @@

 # generate check header
 write_compiler_detection_header(
-    FILE compiler_features.h
+    FILE "${PROJECT_ALL_INCLUDE_DIR}/config/compiler_features.h"
     PREFIX UTIL_CONFIG
     COMPILERS GNU Clang AppleClang MSVC
     FEATURES cxx_deleted_functions cxx_final cxx_noexcept cxx_nullptr cxx_static_assert cxx_thread_local cxx_variadic_templates
 )
-file(MAKE_DIRECTORY "${PROJECT_ALL_INCLUDE_DIR}/config")
-file(RENAME "${CMAKE_BINARY_DIR}/compiler_features.h" "${PROJECT_ALL_INCLUDE_DIR}/config/compiler_features.h")
+#file(MAKE_DIRECTORY "${PROJECT_ALL_INCLUDE_DIR}/config")
+#file(RENAME "${CMAKE_BINARY_DIR}/compiler_features.h" "${PROJECT_ALL_INCLUDE_DIR}/config/compiler_features.h")

 # 默认配置选项
 #####################################################################


enhance ffmpeg use script

enhance ffmpeg use script

add_library() for ffmpeg libraries (STATIC IMPORTED)
bundle include directories, link libraries (including dependencies)
issue https://github.com/smanders/externpro/issues/273

--- projects/use/usexp-ffmpeg-config.cmake
+++ projects/use/usexp-ffmpeg-config.cmake
@@ -1,10 +1,7 @@
 # FFMPEG_FOUND - FFmpeg was found
 # FFMPEG_VER - FFmpeg version
-# FFMPEG_INCLUDE_DIR - the FFmpeg include directories
 # FFMPEG_LIBRARIES - the FFmpeg libraries
 # FFMPEG_DLLS - the FFmpeg shared objects (dll, so)
-xpFindPkg(PKGS openh264) # dependencies
-xpGetPkgVar(openh264 LIBRARIES) # sets OPENH264_LIBRARIES
 set(prj ffmpeg)
 # this file (-config) installed to share/cmake
 get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
@@ -13,21 +10,70 @@
 set(${PRJ}_VER "@VER@ [@PROJECT_NAME@]")
 set(ver _@VER@)
 set(verDir /${prj}${ver})
-unset(${PRJ}_INCLUDE_DIR CACHE)
-find_path(${PRJ}_INCLUDE_DIR ffmpeg/libavcodec/avcodec.h PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
-list(APPEND ${PRJ}_INCLUDE_DIR ${XP_ROOTDIR}/include${verDir}/ffmpeg) # for internal header includes
-set(reqVars ${PRJ}_VER ${PRJ}_INCLUDE_DIR)
-set(${PRJ}_LIBRARIES
-  avdevice${ver}
-  avformat${ver}
-  avfilter${ver}
-  avcodec${ver}
-  swresample${ver}
-  swscale${ver}
-  avutil${ver}
-  )
-list(APPEND reqVars ${PRJ}_LIBRARIES)
-link_directories(${XP_ROOTDIR}/lib)
+set(includeDirs ${XP_ROOTDIR}/include${verDir} ${XP_ROOTDIR}/include${verDir}/ffmpeg)
+# libraries, in linking order
+# https://github.com/FFmpeg/FFmpeg/blob/n2.6.2/configure#L2667-L2675
+set(ffmpeg_all_libs avdevice avfilter avformat avcodec swresample swscale avutil)
+if(NOT DEFINED ffmpeg_libs)
+  set(ffmpeg_libs ${ffmpeg_all_libs})
+endif()
+include(CheckLibraryExists)
+function(checkLibraryConcat lib symbol liblist)
+  string(TOUPPER ${lib} LIB)
+  check_library_exists("${lib}" "${symbol}" "" XP_FFMPEG_HAS_${LIB})
+  if(XP_FFMPEG_HAS_${LIB})
+    list(APPEND ${liblist} ${lib})
+    set(${liblist} ${${liblist}} PARENT_SCOPE)
+  endif()
+endfunction()
+# _ffmpeg_*_libs
+checkLibraryConcat(asound snd_strerror _ffmpeg_avdevice_libs)
+checkLibraryConcat(Xext XShmDetach _ffmpeg_avdevice_libs)
+xpFindPkg(PKGS openh264)
+xpGetPkgVar(openh264 LIBRARIES) # sets OPENH264_LIBRARIES
+set(_ffmpeg_avcodec_libs ${OPENH264_LIBRARIES})
+# _ffmpeg_*_deps
+set(_ffmpeg_avdevice_deps avformat)
+set(_ffmpeg_avfilter_deps swresample swscale) # libavfilter code calls swr_*, sws_* functions
+set(_ffmpeg_avformat_deps avcodec)
+set(_ffmpeg_avcodec_deps swresample) # libavcodec code calls swr_* functions
+set(_ffmpeg_swresample_deps avutil)
+set(_ffmpeg_swscale_deps avutil)
+set(_ffmpeg_avutil_deps)
+foreach(lib ${ffmpeg_all_libs})
+  if(NOT TARGET ffmpeg::${lib})
+    add_library(ffmpeg::${lib} STATIC IMPORTED)
+    set(${lib}_RELEASE ${XP_ROOTDIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${ver}${CMAKE_STATIC_LIBRARY_SUFFIX})
+    if(EXISTS "${${lib}_RELEASE}")
+      set_property(TARGET ffmpeg::${lib} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+      set_target_properties(ffmpeg::${lib} PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "ASM_NASM;C;CXX"
+        IMPORTED_LOCATION_RELEASE "${${lib}_RELEASE}"
+        )
+      set_target_properties(ffmpeg::${lib} PROPERTIES
+        INTERFACE_INCLUDE_DIRECTORIES "${includeDirs}"
+        )
+      if(_ffmpeg_${lib}_deps OR _ffmpeg_${lib}_libs)
+        unset(linkLibs)
+        foreach(dep ${_ffmpeg_${lib}_deps})
+          list(APPEND linkLibs \$<LINK_ONLY:ffmpeg::${dep}>)
+        endforeach()
+        foreach(dep ${_ffmpeg_${lib}_libs})
+          list(APPEND linkLibs \$<LINK_ONLY:${dep}>)
+        endforeach()
+        set_target_properties(ffmpeg::${lib} PROPERTIES
+          INTERFACE_LINK_LIBRARIES "${linkLibs}"
+          )
+      endif()
+    endif()
+  endif()
+endforeach()
+unset(ffmpegLibs)
+foreach(lib ${ffmpeg_libs})
+  list(APPEND ffmpegLibs "ffmpeg::${lib}") # prepend NAMESPACE
+endforeach()
+set(${PRJ}_LIBRARIES ${ffmpegLibs})
+set(reqVars ${PRJ}_VER ${PRJ}_LIBRARIES)
 if(WIN32)
   set(${PRJ}_DLLS
     ${XP_ROOTDIR}/bin${verDir}/avcodec-56.dll
@@ -39,19 +85,6 @@
     ${XP_ROOTDIR}/bin${verDir}/swscale-3.dll
     )
   list(APPEND reqVars ${PRJ}_DLLS)
-else()
-  include(CheckLibraryExists)
-  function(checkLibraryConcat lib symbol liblist)
-    string(TOUPPER ${lib} LIB)
-    check_library_exists("${lib}" "${symbol}" "" XP_FFMPEG_HAS_${LIB})
-    if(XP_FFMPEG_HAS_${LIB})
-      list(APPEND ${liblist} ${lib})
-      set(${liblist} ${${liblist}} PARENT_SCOPE)
-    endif()
-  endfunction()
-  checkLibraryConcat(asound snd_strerror syslibs)
-  checkLibraryConcat(Xext XShmDetach syslibs)
-  list(APPEND ${PRJ}_LIBRARIES ${OPENH264_LIBRARIES} ${syslibs})
 endif()
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


Added the class file to cmake file lists

--- CMake/FileLists.cmake
+++ CMake/FileLists.cmake
@@ -187,7 +187,8 @@
     src/GPU/CalculateEnergyCUDAKernel.cuh
     src/GPU/CalculateForceCUDAKernel.cuh
     src/GPU/CalculateEwaldCUDAKernel.cuh
-    src/GPU/VariablesCUDA.cuh)
+    src/GPU/VariablesCUDA.cuh
+    src/GPU/CUDAMemoryManager.cuh)

 set(cudaSources
     src/GPU/CalculateEnergyCUDAKernel.cu


Wasn't caught by my tests, as I don't build static on my box...

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -11,7 +11,7 @@
 include_directories(${PROJECT_SOURCE_DIR} ${${PREFIX}_INCLUDE})

 if(ENABLE_STATIC_LIBRARIES)
-  add_library(${PREFIX}_static
+  add_library(${${PREFIX}_NAME}_static
     STATIC
     ${${PREFIX}_SRC} ${${PREFIX}_HEADERS} ${NATVIS_FILE}
   )


ADD possiblite to define externaly CTEST_SITE using
ctest  -S openVibeTests.cmake,Model
-DCTEST_SITE="your site name"

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3539 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -13,8 +13,9 @@
 ## --------------------------
 find_program(HOSTNAME_CMD NAMES hostname)
 exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
-
-set(CTEST_SITE                          "${HOSTNAME}")
+IF(NOT DEFINED CTEST_SITE)
+	SET(CTEST_SITE                          "${HOSTNAME}")
+ENDIF(NOT DEFINED CTEST_SITE)

 ## -- Set site / build name
 ## --------------------------


COMP: Fixed wrong variable name.

COMP: Fixed wrong variable name.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -76,7 +76,7 @@
         message(FATAL_ERROR "Compiler '${CMAKE_CXX_COMPILER_ID}' not supported. Use GNU or Clang instead.")
       endif()
       string(REGEX MATCH "^[0-9]+\\.[0-9]+" _compiler_version "${CMAKE_CXX_COMPILER_VERSION}")
-      set(_boost_toolset "${_boost_toolset}-${_compiler_version}")
+      set(_boost_toolset "${_boost_with_toolset}-${_compiler_version}")
     endif()

     if(_boost_toolset)


Remove reference to old dcmtk branch

Remove reference to old dcmtk branch

the dropNetwork changes are now included in the patched branch
of Commontk/DCMTK so we don't need to use the old testing branch

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -26,8 +26,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
-      #GIT_TAG "origin/patched"
-      GIT_TAG "origin/dropNetwork"
+      GIT_TAG "origin/patched"
       CMAKE_GENERATOR ${gen}
       BUILD_COMMAND ""
       CMAKE_ARGS


Added ability to pass custom settings

Added ability to pass custom settings

--- conan.cmake
+++ conan.cmake
@@ -199,6 +199,10 @@
         message(FATAL_ERROR "Conan: compiler setup not recognized")
     endif()

+    foreach(ARG ${ARGUMENTS_SETTINGS})
+        set(_SETTINGS ${_SETTINGS} -s ${ARG})
+    endforeach()
+
     set(${result} ${_SETTINGS} PARENT_SCOPE)
 endfunction()

@@ -257,7 +261,7 @@
 macro(parse_arguments)
   set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS)
   set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE PROFILE ARCH BUILD_TYPE)
-  set(multiValueArgs REQUIRES OPTIONS IMPORTS BUILD CONAN_COMMAND)
+  set(multiValueArgs REQUIRES OPTIONS IMPORTS SETTINGS BUILD CONAN_COMMAND)
   cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 endmacro()


Fix the FindIconv module so it uses the right _FOUND name and thus sets the lib and header vars right.

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -20,7 +20,7 @@
     if (NOT ICONV_LIB_GLIBC)
         find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_LIB ICONV_H_PATH)
     else()
-        set(Iconv TRUE)
+        set(Iconv_FOUND TRUE)
         unset(ICONV_LIB)
     endif()

@@ -29,7 +29,7 @@
 mark_as_advanced(ICONV_H_PATH ICONV_LIB ICONV_LIB_GLIBC)

 # set up output vars
-if (ICONV_FOUND)
+if (Iconv_FOUND)
     set (ICONV_INCLUDE_DIR ${ICONV_H_PATH})
     set (ICONV_LIBRARIES ${ICONV_LIB})
 else()


improved nifti include dir finding

improved nifti include dir finding

--- cmake/FindNIFTI.cmake
+++ cmake/FindNIFTI.cmake
@@ -20,7 +20,7 @@
 FIND_PATH(NIFTI_INCLUDE_DIR
 NAMES nifti1.h
 PATHS ${NIFTI_DIR}
-PATH_SUFFIXES include nifti
+PATH_SUFFIXES include nifti include/nifti
 DOC "The include directory containing nifti1.h"
 )


rm'd stale messages

rm'd stale messages

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -58,9 +58,6 @@
       ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${AGENT_PATH})
   ENDIF(NOT "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" MATCHES
          ".*${AGENT_PATH}$")
-
-  MESSAGE("   !!  AGENT PATH ${AGENT_PATH}")
-  MESSAGE("   !!  CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")

   # get preprocessor script
   IF(NOT DEFINED CYCPP)


Attempt to fix build breakage caused by r253646.

Apparently check_c_compiler_flag isn't a thing everywhere. Not being
incredibly well-versed in cmake, I'm hoping that check_cxx_compiler_flag
serves a similar purpose. :)

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@253648 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -28,7 +28,7 @@
 check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
 check_cxx_compiler_flag(-fno-lto             COMPILER_RT_HAS_FNO_LTO_FLAG)
 check_cxx_compiler_flag(-msse3               COMPILER_RT_HAS_MSSE3_FLAG)
-check_c_compiler_flag(-std=c99 COMPILER_RT_HAS_STD_C99_FLAG)
+check_cxx_compiler_flag(-std=c99             COMPILER_RT_HAS_STD_C99_FLAG)

 check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG)
 check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG)


Add tests for render

Add tests for render

--- test/testing.cmake
+++ test/testing.cmake
@@ -100,6 +100,15 @@
     3
     0
     1)
+
+  mpi_test(renderCube 4
+    ./render
+    "${GRAPHS}/cube/4/"
+    )
+  mpi_test(renderTorus 4
+    ./render
+    "${GRAPHS}/torus/4/"
+    )
 ENDIF()

 mpi_test(VertexBalancer_2 2


generate R scripts too even if R is not installed

--- cmake/BenchmarkMacros.cmake
+++ cmake/BenchmarkMacros.cmake
@@ -20,12 +20,13 @@
    endif(R_COMMAND)
 endif(ENABLE_BENCHMARKS)

-macro(vc_generate_datafile target outfile)
+macro(vc_generate_datafile target outfilepath outfile)
    get_target_property(exec ${target} OUTPUT_NAME)
-   set(${outfile} "${CMAKE_CURRENT_BINARY_DIR}/${exec}.dat")
-   add_custom_command(OUTPUT "${${outfile}}"
+   set(${outfile} "${exec}.dat")
+   set(${outfilepath} "${CMAKE_CURRENT_BINARY_DIR}/${exec}.dat")
+   add_custom_command(OUTPUT "${${outfilepath}}"
       COMMAND ${target}
-      ARGS -o "${${outfile}}"
+      ARGS -o "${${outfilepath}}"
       DEPENDS ${target}
       COMMENT "Running Benchmark ${exec} to generate ${${outfile}}"
       VERBATIM
@@ -38,30 +39,31 @@
       set(sseTarget "${name}_sse_benchmark")
       set(lrbTarget "${name}_lrb_benchmark")

-      vc_generate_datafile(${simpleTarget} simple_datafile)
-      vc_generate_datafile(${sseTarget} sse_datafile)
+      vc_generate_datafile(${simpleTarget} simple_datafilepath simple_datafile)
+      vc_generate_datafile(${sseTarget} sse_datafilepath sse_datafile)
       if(LARRABEE_FOUND)
-         vc_generate_datafile(${lrbTarget} lrb_datafile)
+         vc_generate_datafile(${lrbTarget} lrb_datafilepath lrb_datafile)
       else(LARRABEE_FOUND)
          set(lrb_datafile "")
+         set(lrb_datafilepath "")
       endif(LARRABEE_FOUND)

+      set(scriptfile "${CMAKE_CURRENT_BINARY_DIR}/plot_${name}.r")
+      add_custom_command(OUTPUT "${scriptfile}"
+         COMMAND "${CMAKE_COMMAND}"
+         ARGS
+         "-Dscriptfile=${scriptfile}"
+         "-Dcommon=${CMAKE_CURRENT_SOURCE_DIR}/common.r"
+         "-Dappend=${CMAKE_CURRENT_SOURCE_DIR}/${name}.r"
+         "-Dsimple_datafile=${simple_datafile}"
+         "-Dsse_datafile=${sse_datafile}"
+         "-Dlrb_datafile=${lrb_datafile}"
+         -P "${CMAKE_SOURCE_DIR}/cmake/generate_plot_script.cmake"
+         DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/common.r" "${CMAKE_CURRENT_SOURCE_DIR}/${name}.r"
+         VERBATIM
+         )
+
       if(R_COMMAND)
-         set(scriptfile "${CMAKE_CURRENT_BINARY_DIR}/plot_${name}.r")
-         add_custom_command(OUTPUT "${scriptfile}"
-            COMMAND "${CMAKE_COMMAND}"
-            ARGS
-            "-Dscriptfile=${scriptfile}"
-            "-Dcommon=${CMAKE_CURRENT_SOURCE_DIR}/common.r"
-            "-Dappend=${CMAKE_CURRENT_SOURCE_DIR}/${name}.r"
-            "-Dsimple_datafile=${simple_datafile}"
-            "-Dsse_datafile=${sse_datafile}"
-            "-Dlrb_datafile=${lrb_datafile}"
-            -P "${CMAKE_SOURCE_DIR}/cmake/generate_plot_script.cmake"
-            DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/common.r" "${CMAKE_CURRENT_SOURCE_DIR}/${name}.r"
-            VERBATIM
-            )
-
          set(tmpfile "${CMAKE_CURRENT_BINARY_DIR}/${name}_tmp.pdf")
          set(pdffile "${CMAKE_CURRENT_BINARY_DIR}/${name}.pdf")
          if(NOT PDFTK_COMMAND)
@@ -71,7 +73,7 @@
             COMMAND "${R_COMMAND}" ARGS --quiet --slave --vanilla -f "${scriptfile}"
             COMMAND "${CMAKE_COMMAND}" ARGS -E copy "Rplots.pdf" "${tmpfile}"
             COMMAND "${CMAKE_COMMAND}" ARGS -E remove "Rplots.pdf"
-            DEPENDS "${simple_datafile}" "${sse_datafile}" "${lrb_datafile}" "${CMAKE_CURRENT_SOURCE_DIR}/common.r" "${CMAKE_CURRENT_SOURCE_DIR}/${name}.r" "${scriptfile}"
+            DEPENDS "${simple_datafilepath}" "${sse_datafilepath}" "${lrb_datafilepath}" "${CMAKE_CURRENT_SOURCE_DIR}/common.r" "${CMAKE_CURRENT_SOURCE_DIR}/${name}.r" "${scriptfile}"
             WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
             COMMENT "Generating PDF plots for the ${name} benchmark"
             VERBATIM
@@ -94,7 +96,7 @@
          add_dependencies(benchmark_plots "${generate_target}")
       else(R_COMMAND)
          set(generate_target "generate_${name}_data")
-         add_custom_target(${generate_target} DEPENDS "${simple_datafile}" "${sse_datafile}" "${lrb_datafile}")
+         add_custom_target(${generate_target} DEPENDS "${simple_datafilepath}" "${sse_datafilepath}" "${lrb_datafilepath}" "${scriptfile}")
          add_dependencies(benchmark_data "${generate_target}")
       endif(R_COMMAND)
    endif(ENABLE_BENCHMARKS)


Debug/Release folders fix for QTCreator build

--- cmake/OpenCVGenConfig.cmake
+++ cmake/OpenCVGenConfig.cmake
@@ -23,7 +23,7 @@
   set(OpenCV_ANDROID_NATIVE_API_LEVEL_CONFIGCMAKE "${ANDROID_NATIVE_API_LEVEL}")
 endif()

-if(MSVC OR CMAKE_GENERATOR MATCHES Xcode)
+if(CMAKE_GENERATOR MATCHES "Visual" OR CMAKE_GENERATOR MATCHES "Xcode")
   set(OpenCV_ADD_DEBUG_RELEASE_CONFIGCMAKE TRUE)
 else()
   set(OpenCV_ADD_DEBUG_RELEASE_CONFIGCMAKE FALSE)


Fix Python detection on Python 3.

Fix Python detection on Python 3.

Python 3 uses somewhat different naming of the library, making the custom
logic break. This just replaces all the custom Python-finding logic with
the built-in CMake Python-finding logic, which works and can be relied upon
to be updated as necessary.

--- cmake/Packages/Python.cmake
+++ cmake/Packages/Python.cmake
@@ -1,60 +1,9 @@
-FIND_PROGRAM(PYTHON_EXECUTABLE python
-      PATHS ENV PATH         # look in the PATH environment variable
-      NO_DEFAULT_PATH        # do not look anywhere else...
-      )
+find_package(PythonInterp)
+find_package(PythonLibs)

-IF(PYTHON_EXECUTABLE)
-  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -V
-    OUTPUT_VARIABLE STDOUT_VERSION
-    ERROR_VARIABLE PYTHON_VERSION
-    ERROR_STRIP_TRAILING_WHITESPACE)
-
-  IF(STDOUT_VERSION MATCHES "Python")
-    set(PYTHON_VERSION "${STDOUT_VERSION}")
-  ENDIF()
-
-  STRING(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.?([0-9]*)"
-    PYTHON_STRIPPED_VERSION
-    ${PYTHON_VERSION})
-  STRING(REGEX MATCH "([0-9]+)\\.([0-9]+)"
-    PYTHON_STRIPPED_MAJOR_MINOR_VERSION
-    ${PYTHON_VERSION})
-
-  STRING(REPLACE "." "" PYTHON_VERSION_NO_DOTS ${PYTHON_STRIPPED_MAJOR_MINOR_VERSION})
-
-  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.prefix)"
-                  OUTPUT_VARIABLE PYTHON_ROOT)
-
-  FIND_LIBRARY(PYTHON_LIBRARY
-    NAMES python${PYTHON_VERSION_NO_DOTS} python${PYTHON_STRIPPED_MAJOR_MINOR_VERSION}
-    PATHS ${PYTHON_ROOT} ${PYTHON_ROOT}/lib
-    PATH_SUFFIXES lib
-    NO_SYSTEM_ENVIRONMENT_PATH
-    NO_DEFAULT_PATH
-  )
-  FIND_PATH(PYTHON_INCLUDE_DIR
-    NAMES Python.h
-    PATHS
-      ${PYTHON_ROOT}/include
-    PATH_SUFFIXES
-      python${PYTHON_STRIPPED_MAJOR_MINOR_VERSION}
-    NO_DEFAULT_PATH
-  )
-
-  IF(EXISTS "${PYTHON_INCLUDE_DIR}/Python.h" )
-    SET(PYTHON_FOUND TRUE CACHE BOOL "Python found successfully" FORCE)
-    MESSAGE(STATUS "Python found")
-    MESSAGE (STATUS "  * binary:   ${PYTHON_EXECUTABLE}")
-    MESSAGE (STATUS "  * version:  ${PYTHON_VERSION}")
-    MESSAGE (STATUS "  * includes: ${PYTHON_INCLUDE_DIR}")
-    MESSAGE (STATUS "  * libs:     ${PYTHON_LIBRARY}")
-  ELSE()
-    SET(PYTHON_FOUND FALSE CACHE BOOL "Python found successfully" FORCE)
-  ENDIF()
-
-  IF(PYTHON_FOUND)
+IF(PYTHON_FOUND)
     # Search for numpy
-    EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.__version__"
+    EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.__version__)"
       RESULT_VARIABLE NUMPY_FOUND OUTPUT_VARIABLE NUMPY_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 #    IF(NUMPY_FOUND EQUAL 0 AND NOT NUMPY_VERSION VERSION_LESS 1.7)
 #      SET(NUMPY_FOUND TRUE)
@@ -70,7 +19,7 @@
     IF(NUMPY_FOUND)
       SET(NUMPY_FOUND TRUE CACHE BOOL "Numpy found successfully" FORCE)
       EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
-        "import numpy; print numpy.get_include()"
+        "import numpy; print(numpy.get_include())"
         OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
         OUTPUT_STRIP_TRAILING_WHITESPACE)
       SET(NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR} CACHE STRING "Numpy directory")
@@ -78,5 +27,4 @@
     ELSE()
       SET(NUMPY_FOUND FALSE CACHE BOOL "Numpy found successfully" FORCE)
     ENDIF()
-  ENDIF(PYTHON_FOUND)
-ENDIF(PYTHON_EXECUTABLE)+ENDIF(PYTHON_FOUND)


Restore Python detection after 37c3cdd723c618655164b2cfd444d0515e094e68

--- cmake/Packages/Python.cmake
+++ cmake/Packages/Python.cmake
@@ -1,5 +1,6 @@
 find_package(PythonInterp)
 find_package(PythonLibs)
+set(PYTHON_FOUND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)

 IF(PYTHON_FOUND)
     # Search for numpy


update: windows sdk 8.1

update: windows sdk 8.1

--- cmake/SetupWindowsSDK.cmake
+++ cmake/SetupWindowsSDK.cmake
@@ -60,7 +60,7 @@
   ENDIF()

   EXECUTE_PROCESS(
-    COMMAND ${REG} query "HKLM\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots" /v KitsRoot
+    COMMAND ${REG} query "HKLM\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots" /v KitsRoot81
     RESULT_VARIABLE REG_QUERY_RESULT
     OUTPUT_VARIABLE REG_QUERY_OUTPUT
     ERROR_VARIABLE  REG_QUERY_ERROR)


updated svn ignore properties

updated svn ignore properties

--- cmake/compilerOptions.cmake
+++ cmake/compilerOptions.cmake
@@ -78,9 +78,9 @@
         list(APPEND CUDA_NVCC_FLAGS -O2;)
         list(APPEND CUDA_NVCC_FLAGS --ptxas-options=-v;)
         #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_11,code=sm_11)
-        #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_13,code=sm_13)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_21)
+        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_13,code=sm_13)
+        #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
+        #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_21)
         #list(APPEND CUDA_NVCC_FLAGS --ptxas-options=-dlcm=cg)
     else ()
         if (NOT MSVC)
@@ -91,9 +91,9 @@
         list(APPEND CUDA_NVCC_FLAGS -O0;)
         #list(APPEND CUDA_NVCC_FLAGS --ptxas-options=-v')
         #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_11,code=sm_11)
-        #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_13,code=sm_13)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_21)
+        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_13,code=sm_13)
+        #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
+        #list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_21)
     endif ()
 endif (CUDA_FOUND)