tests: allow specifying multiple input file extensions

Signed-off-by: Josef 'Jeff' Sipek <a620f141433c70aa9e43778305a6c68cbfadfb25@josefsipek.net>

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -59,26 +59,28 @@
 endmacro()

 # name  = name of test
-# iext  = the test input file extension
+# iexts = the test input file extensions
 # oexts = the expected test output file extensions
 # dirs  = directories to look for iext/oext files
-macro(build_test_bin_and_run_files name iext oexts dirs)
+macro(build_test_bin_and_run_files name iexts oexts dirs)
 	build_test_bin_files(${name})
 	foreach(DIR ${dirs})
 		foreach(OEXT ${oexts})
-			file(GLOB TESTS
-			     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
-			     "${DIR}/*.${iext}")
-			foreach(TEST ${TESTS})
-				add_test(NAME "${name}:${OEXT}:${TEST}"
-					 COMMAND "${CMAKE_BINARY_DIR}/tests/test_${name}"
-						 -i "${iext}"
-						 -o "${OEXT}"
-						 "${CMAKE_CURRENT_SOURCE_DIR}/${TEST}"
-				)
-			set_tests_properties("${name}:${OEXT}:${TEST}" PROPERTIES
-					ENVIRONMENT "UMEM_DEBUG=default,verbose"
-				)
+			foreach(IEXT ${iexts})
+				file(GLOB TESTS
+				     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+				     "${DIR}/*.${IEXT}")
+				foreach(TEST ${TESTS})
+					add_test(NAME "${name}:${OEXT}:${TEST}"
+						 COMMAND "${CMAKE_BINARY_DIR}/tests/test_${name}"
+							 -i "${IEXT}"
+							 -o "${OEXT}"
+							 "${CMAKE_CURRENT_SOURCE_DIR}/${TEST}"
+					)
+				set_tests_properties("${name}:${OEXT}:${TEST}" PROPERTIES
+						ENVIRONMENT "UMEM_DEBUG=default,verbose"
+					)
+				endforeach()
 			endforeach()
 		endforeach()
 	endforeach()


DOC: cleaned up some comments and documentation

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -47,7 +47,7 @@
 # directory, so that all libs/include etc ends up
 # in one common tree
 set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Where all the prerequisite libraries go" FORCE)
-set(${CMAKE_PROJECT_NAME}_BUILD_TESTING ON CACHE BOOL "Turn on Testing for BRAINS")
+set(${CMAKE_PROJECT_NAME}_BUILD_TESTING ON CACHE BOOL "Turn on Testing for SimpleITK")

 # Compute -G arg for configuring external projects with the same CMake generator:
 if(CMAKE_EXTRA_GENERATOR)
@@ -57,7 +57,7 @@
 endif()

 #-----------------------------------------------------------------------------
-# Always build Shared library
+# Default to build shared libraries off
 #------------------------------------------------------------------------------
 set(BUILD_SHARED_LIBS OFF)


CMake: Enable -pedantic at the very beginning

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29059 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_compiler_flags_gnu.cmake
+++ deal.II/cmake/setup_compiler_flags_gnu.cmake
@@ -35,6 +35,14 @@
 ########################

 #
+# Set -pedantic if the compiler supports it.
+#
+IF(NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
+        CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.4"))
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-pedantic")
+ENDIF()
+
+#
 # Enable all supported CPU instruction sets:
 #
 IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
@@ -51,14 +59,6 @@
 # the deal.II library with it.
 #
 ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
-
-#
-# Set -pedantic if the compiler supports it.
-#
-IF(NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
-        CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.4"))
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-pedantic")
-ENDIF()

 #


COMP: Fix default wrapping with all modules

My previous patch (http://review.source.kitware.com/#/c/15885/) broke the wrappings
when starting from an empty build dir, as the ITKGroup_ variables are only set when
ITK_BUILD_DEFAULT_MODULES was set once to OFF.

This will fix the errors on the dashboard.

Change-Id: I3b0d514caba3444ffeaa6837a915481877a9ca1d

--- Wrapping/WrapITKTypes.cmake
+++ Wrapping/WrapITKTypes.cmake
@@ -242,7 +242,7 @@
 END_WRAP_TYPE()
 set(itk_Wrap_Point ${WRAPPER_TEMPLATES})

-if(ITKGroup_Filtering)
+if(ITK_BUILD_DEFAULT_MODULES OR ITKGroup_Filtering)
   # Needed by Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap
   WRAP_TYPE("itk::LevelSetNode" "LSN")
     # Only make level set nodes for the selected image pixel types
@@ -253,9 +253,9 @@
     endforeach()
   END_WRAP_TYPE()
   set(itk_Wrap_LevelSetNode ${WRAPPER_TEMPLATES})
-endif(ITKGroup_Filtering)
-
-if(ITKGroup_Filtering)
+endif()
+
+if(ITK_BUILD_DEFAULT_MODULES OR ITKGroup_Filtering)
   # Needed by Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap
   WRAP_TYPE("itk::FlatStructuringElement" "SE")
     foreach(d ${ITK_WRAP_DIMS})
@@ -263,7 +263,7 @@
     endforeach()
   END_WRAP_TYPE()
   set(itk_Wrap_StructuringElement ${WRAPPER_TEMPLATES})
-endif(ITKGroup_Filtering)
+endif()

 WRAP_TYPE("itk::SpatialObject" "SO")
   foreach(d ${ITK_WRAP_DIMS})
@@ -278,7 +278,7 @@
 END_WRAP_TYPE()
 set(itk_Wrap_Histogram ${WRAPPER_TEMPLATES})

-if(ITKGroup_Filtering)
+if(ITK_BUILD_DEFAULT_MODULES OR ITKGroup_Filtering)
   # Needed by Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap
   WRAP_TYPE("itk::LabelMap" "LM")
     foreach(d ${ITK_WRAP_DIMS})
@@ -286,6 +286,6 @@
   endforeach()
   END_WRAP_TYPE()
   set(itk_Wrap_LabelMap ${WRAPPER_TEMPLATES})
-endif(ITKGroup_Filtering)
+endif()

 #------------------------------------------------------------------------------


fix: Empty HINTS in FindSuiteSparse when looking for include paths [CMake]

--- CMake/Modules/FindSuiteSparse.cmake
+++ CMake/Modules/FindSuiteSparse.cmake
@@ -202,7 +202,7 @@
 if (SuiteSparse_ROOT)
   find_path(SuiteSparse_config_INCLUDE_DIR
     NAMES SuiteSparse_config.h UFconfig.h
-    PATHS ${SuiteSparse_ROOT}
+    PATHS "${SuiteSparse_ROOT}"
     PATH_SUFFIXES ${_suitesparse_include_suffixes}
     NO_DEFAULT_PATH
   )
@@ -225,7 +225,7 @@
 _suitesparse_get_library_suffixes(_suitesparse_library_suffixes SuiteSparse_config)
 find_library(SuiteSparse_config_LIBRARY
   NAMES suitesparseconfig
-  PATHS ${SuiteSparse_ROOT}
+  PATHS "${SuiteSparse_ROOT}"
   PATH_SUFFIXES ${_suitesparse_library_suffixes}
   NO_DEFAULT_PATH
 )
@@ -235,16 +235,19 @@
   set(SuiteSparse_config_FOUND 1)
   set(SuiteSparse_config_INCLUDE_DIRS ${SuiteSparse_config_INCLUDE_DIR})
   set(SuiteSparse_config_LIBRARIES    ${SuiteSparse_config_LIBRARY})
+  set(SuiteSparse_INCLUDE_DIR         ${SuiteSparse_config_INCLUDE_DIR})
   get_filename_component(SuiteSparse_LIBRARY_DIR "${SuiteSparse_config_LIBRARY}" PATH)
 else ()
   set(SuiteSparse_config_FOUND 0)
   set(SuiteSparse_config_INCLUDE_DIRS)
   set(SuiteSparse_config_LIBRARIES)
+  set(SuiteSparse_INCLUDE_DIR)
   set(SuiteSparse_LIBRARY_DIR)
 endif ()

 _suitesparse_debug_message("Config (FOUND=${SuiteSparse_config_FOUND}):")
 _suitesparse_debug_message("- SuiteSparse_ROOT               = ${SuiteSparse_ROOT}")
+_suitesparse_debug_message("- SuiteSparse_INCLUDE_DIR        = ${SuiteSparse_INCLUDE_DIR}")
 _suitesparse_debug_message("- SuiteSparse_LIBRARY_DIR        = ${SuiteSparse_LIBRARY_DIR}")
 _suitesparse_debug_message("- SuiteSparse_config_INCLUDE_DIR = ${SuiteSparse_config_INCLUDE_DIR}")
 _suitesparse_debug_message("- SuiteSparse_config_LIBRARY     = ${SuiteSparse_config_LIBRARY}")
@@ -312,8 +315,8 @@

     find_path(SuiteSparse_${_suitesparse_component}_INCLUDE_DIR
       NAMES ${_suitesparse_component_header}
-      HINTS ${SuiteSparse_INCLUDE_DIR}
-      PATHS ${SuiteSparse_ROOT}
+      HINTS "${SuiteSparse_INCLUDE_DIR}"
+      PATHS "${SuiteSparse_ROOT}"
       PATH_SUFFIXES ${_suitesparse_include_suffixes}
       NO_DEFAULT_PATH
     )
@@ -324,8 +327,8 @@
     _suitesparse_get_library_suffixes(_suitesparse_library_suffixes ${_suitesparse_component})
     find_library(SuiteSparse_${_suitesparse_component}_LIBRARY
       NAMES ${_suitesparse_component_lower}
-      HINTS ${SuiteSparse_LIBRARY_DIR}
-      PATHS ${SuiteSparse_ROOT}
+      HINTS "${SuiteSparse_LIBRARY_DIR}"
+      PATHS "${SuiteSparse_ROOT}"
       PATH_SUFFIXES ${_suitesparse_library_suffixes}
       NO_DEFAULT_PATH
     )
@@ -453,7 +456,6 @@
 # ------------------------------------------------------------------------------
 # Aggregate found libraries
 if (SuiteSparse_config_FOUND)
-  set(SuiteSparse_INCLUDE_DIR  ${SuiteSparse_config_INCLUDE_DIR})
   set(SuiteSparse_INCLUDE_DIRS ${SuiteSparse_config_INCLUDE_DIRS})
   set(SuiteSparse_LIBRARIES    ${SuiteSparse_config_LIBRARIES})
   foreach (_suitesparse_component IN LISTS SuiteSparse_COMPONENTS)
@@ -465,7 +467,6 @@
   _suitesparse_remove_duplicate_paths(SuiteSparse_INCLUDE_DIRS)
   _suitesparse_remove_duplicate_libraries(SuiteSparse_LIBRARIES)
 else ()
-  set(SuiteSparse_INCLUDE_DIR)
   set(SuiteSparse_INCLUDE_DIRS)
   set(SuiteSparse_LIBRARIES)
 endif ()


ENH: Update Hippo dashboard

ENH: Update Hippo dashboard

--- Hippo_Kitware_TubeTK_Nightly.cmake
+++ Hippo_Kitware_TubeTK_Nightly.cmake
@@ -39,12 +39,12 @@
 set( TUBETK_BINARY_DIR
   "${TUBETK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}-${SITE_BUILD_TYPE}" )

-set( TUBETK_USE_VTK ON )
-set( TUBETK_USE_QT OFF )
-set( TUBETK_USE_CTK OFF ) # requires QT
-set( TUBETK_USE_BOOST OFF )
-set( TUBETK_USE_LIBSVM OFF )
-set( TUBETK_USE_SIMPLEITK OFF )
+set( TubeTK_USE_VTK ON )
+set( TubeTK_USE_QT OFF )
+set( TubeTK_USE_CTK OFF ) # requires QT
+set( TubeTK_USE_BOOST ON )
+set( TubeTK_USE_LIBSVM ON )
+set( TubeTK_USE_SIMPLEITK OFF )

 set( ENV{DISPLAY} ":0" )

@@ -53,12 +53,12 @@
 set( SITE_MAKE_COMMAND "/usr/bin/make" )
 set( SITE_QMAKE_COMMAND "/usr/local/bin/qmake" )

-set( SITE_COVERAGE_COMMAND "" )
-set( SITE_KWSTYLE_DIR "" )
+set( SITE_COVERAGE_COMMAND "/usr/local/bin/llvm-cov" )
+set( SITE_KWSTYLE_DIR "/usr/local/bin" )
 set( SITE_MEMORYCHECK_COMMAND "" )

-set( SITE_GIT_COMMAND "/usr/bin/git" )
-set( SITE_SVN_COMMAND "/usr/bin/svn" )
+set( SITE_GIT_COMMAND "/usr/local/bin/git" )
+set( SITE_SVN_COMMAND "/usr/local/bin/svn" )

 set( SITE_EXPERIMENTAL_BUILD ON )
 set( SITE_EXPERIMENTAL_TEST ON )
@@ -183,4 +183,4 @@
   include( "${TUBETK_DASHBOARDS_DIR}/run_continuous.cmake" )
 elseif( "${SITE_CTEST_MODE}" STREQUAL "Nightly" )
   include( "${TUBETK_DASHBOARDS_DIR}/run_nightly.cmake" )
-endif()
+endif( "${SITE_CTEST_MODE}" STREQUAL "Experimental" )


openblas.cmake: Fixed typo in option NO_AVX=1

--- openblas.cmake
+++ openblas.cmake
@@ -26,7 +26,7 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ""
-    BUILD_COMMAND       make -j8 NO_AUX=1
+    BUILD_COMMAND       make -j8 NO_AVX=1
     BUILD_IN_SOURCE     1
     INSTALL_COMMAND     make PREFIX=${BUILDEM_DIR} install
 )


First full implementation of cpr-config for upstream projects Closes #28

--- cpr-config.cmake
+++ cpr-config.cmake
@@ -10,8 +10,17 @@
 #                     to cpr.h, which must be included in every
 #                     file that uses this interface

-macro(msg str)
-    if(NOT CPR_FIND_QUIETLY)
-        message(STATUS ${str})
-    endif()
-endmacro()
+find_path(CPR_INCLUDE_DIR
+          NAMES cpr.h)
+
+find_library(CPR_LIBRARY
+             NAMES cpr
+             HINTS ${CPR_LIBRARY_ROOT})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CPR REQUIRED_VARS CPR_LIBRARY CPR_INCLUDE_DIR)
+
+if(CPR_FOUND)
+    set(CPR_LIBRARIES ${CPR_LIBRARY})
+    set(CPR_INCLUDE_DIRS ${CPR_INCLUDE_DIR})
+endif()


add i18n library name on windows

add i18n library name on windows

--- FindICU.cmake
+++ FindICU.cmake
@@ -40,11 +40,11 @@
 endmacro(declare_icu_component)

 declare_icu_component(data icudata)
-declare_icu_component(uc   icuuc)   # Common and Data libraries
-declare_icu_component(i18n icui18n) # Internationalization library
-declare_icu_component(io   icuio)   # Stream and I/O Library
-declare_icu_component(le   icule)   # Layout library
-declare_icu_component(lx   iculx)   # Paragraph Layout library
+declare_icu_component(uc   icuuc)         # Common and Data libraries
+declare_icu_component(i18n icui18n icuin) # Internationalization library
+declare_icu_component(io   icuio)         # Stream and I/O Library
+declare_icu_component(le   icule)         # Layout library
+declare_icu_component(lx   iculx)         # Paragraph Layout library

 ########## Public ##########
 set(ICU_FOUND TRUE)


fpta-make: fix message space (cosmetic).

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -3,7 +3,7 @@
 #
 if(NOT (CMAKE_C_COMPILER_ID STREQUAL CMAKE_CXX_COMPILER_ID))
   message(WARNING "CMAKE_C_COMPILER_ID (${CMAKE_C_COMPILER_ID}) is different "
-    "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID})."
+    "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID}). "
     "The final binary may be unusable.")
 endif()


Add -Wextra to compiler flags

Add -Wextra to compiler flags

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -55,7 +55,7 @@
 			endif()
 		endif()

-		target_compile_options(${_project_name} PRIVATE -Wall)				# Enable all warnings
+		target_compile_options(${_project_name} PRIVATE -Wall -Wextra)				# Enable all warnings
 		target_compile_options(${_project_name} PRIVATE -Werror)			# Treat warnings as errors
 	endif()
 endmacro()


Update emscripten configuration for emscripten 2

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -52,22 +52,9 @@
 endif()

 if(${EMSCRIPTEN})
-    if("${EMSCRIPTEN_VERSION}" VERSION_LESS "1.39.2")
-        # chemfiles requires a version of emscripten with a fix for
-        # https://github.com/emscripten-core/emscripten/issues/9605
-        message(FATAL_ERROR "emscripten ${EMSCRIPTEN_VERSION} is not supported, chemfiles requires at least 1.39.2")
-    endif()
-
-    # setting EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=ON here does not
-    # work, since it will only be taken into account on the next cmake
-    # configuration. So we explicitly run the code guarded by
-    # EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=ON in Emscripten.cmake
-    # platform file.
-    SET(CMAKE_STATIC_LIBRARY_SUFFIX ".bc")
-
-	SET(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_C_COMPILER> -o <TARGET> <LINK_FLAGS> <OBJECTS>")
-	SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_CXX_COMPILER> -o <TARGET> <LINK_FLAGS> <OBJECTS>")
-    # --- end EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES
+    if("${EMSCRIPTEN_VERSION}" VERSION_LESS "2")
+        message(FATAL_ERROR "emscripten ${EMSCRIPTEN_VERSION} is not supported, chemfiles requires version 2 or later")
+    endif()

     set(EMCC_FLAGS "")
     set(EMCC_FLAGS "${EMCC_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")


enable msvc for ssc, dataman and table

enable msvc for ssc, dataman and table

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -166,35 +166,29 @@
 endif()

 # DataMan
-if(NOT MSVC)
-    if(ZeroMQ_FOUND)
-        if(ADIOS2_USE_DataMan STREQUAL AUTO)
-            set(ADIOS2_HAVE_DataMan TRUE)
-        elseif(ADIOS2_USE_DataMan)
-            set(ADIOS2_HAVE_DataMan TRUE)
-        endif()
+if(ZeroMQ_FOUND)
+    if(ADIOS2_USE_DataMan STREQUAL AUTO)
+        set(ADIOS2_HAVE_DataMan TRUE)
+    elseif(ADIOS2_USE_DataMan)
+        set(ADIOS2_HAVE_DataMan TRUE)
     endif()
 endif()

 # SSC
-if(NOT MSVC)
-    if(ADIOS2_HAVE_MPI)
-        if(ADIOS2_USE_SSC STREQUAL AUTO)
-            set(ADIOS2_HAVE_SSC TRUE)
-        elseif(ADIOS2_USE_SSC)
-            set(ADIOS2_HAVE_SSC TRUE)
-        endif()
+if(ADIOS2_HAVE_MPI)
+    if(ADIOS2_USE_SSC STREQUAL AUTO)
+        set(ADIOS2_HAVE_SSC TRUE)
+    elseif(ADIOS2_USE_SSC)
+        set(ADIOS2_HAVE_SSC TRUE)
     endif()
 endif()

 # Table
-if(NOT MSVC)
-    if(ZeroMQ_FOUND)
-        if(ADIOS2_USE_Table STREQUAL AUTO)
-            set(ADIOS2_HAVE_Table TRUE)
-        elseif(ADIOS2_USE_Table)
-            set(ADIOS2_HAVE_Table TRUE)
-        endif()
+if(ZeroMQ_FOUND)
+    if(ADIOS2_USE_Table STREQUAL AUTO)
+        set(ADIOS2_HAVE_Table TRUE)
+    elseif(ADIOS2_USE_Table)
+        set(ADIOS2_HAVE_Table TRUE)
     endif()
 endif()


Fix spelling of JAVADOC_AUTOBRIEF option. (#317)

I typed it wrong before.

--- cmake/DoxygenCommon.cmake
+++ cmake/DoxygenCommon.cmake
@@ -22,7 +22,7 @@
 set(DOXYGEN_QUIET YES)
 set(DOXYGEN_WARN_AS_ERROR YES)
 set(DOXYGEN_INLINE_INHERITED_MEMB YES)
-set(DOXYGEN_JAVADOC_BRIEF YES)
+set(DOXYGEN_JAVADOC_AUTOBRIEF YES)
 set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
 set(DOXYGEN_IDL_PROPERTY_SUPPORT NO)
 set(DOXYGEN_EXTRACT_ALL YES)


Hunter config: clean-up

Hunter config: clean-up

No need to set version explicitly, they will be interited from default config

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -22,27 +22,3 @@
 endif()

 hunter_config(OpenCV VERSION 3.0.0-beta-p2 CMAKE_ARGS "${OPENCV_CMAKE_ARGS}")
-
-### GPUImage
-hunter_config(GPUImage VERSION 0.1.6-p4)
-
-### cvmatio
-hunter_config(cvmatio VERSION 1.0.18)
-
-### ZLIB
-hunter_config(ZLIB VERSION 1.2.8-p2)
-
-### TIFF
-hunter_config(TIFF VERSION 4.0.2-hunter-2)
-
-### Boost
-hunter_config(Boost VERSION 1.57.0)
-
-### DLIB
-hunter_config(dlib VERSION 18.14)
-
-### EIGEN
-hunter_config(Eigen VERSION 3.2.4)
-
-### CSV-PARSER-CPLUSPLUS
-hunter_config(CsvParserCPlusPlus VERSION 1.0.1)


Added version status support into the build system.

--- cmake/OpenCVVersion.cmake
+++ cmake/OpenCVVersion.cmake
@@ -1,15 +1,18 @@
 SET(OPENCV_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/modules/core/include/opencv2/core/version.hpp")
-FILE(STRINGS "${OPENCV_VERSION_FILE}" OPENCV_VERSION_PARTS REGEX "#define CV_VERSION_[A-Z]+[ ]+[0-9]+" )
+file(STRINGS "${OPENCV_VERSION_FILE}" OPENCV_VERSION_PARTS REGEX "#define CV_VERSION_[A-Z]+[ ]+" )

 string(REGEX REPLACE ".+CV_VERSION_EPOCH[ ]+([0-9]+).*" "\\1" OPENCV_VERSION_MAJOR "${OPENCV_VERSION_PARTS}")
 string(REGEX REPLACE ".+CV_VERSION_MAJOR[ ]+([0-9]+).*" "\\1" OPENCV_VERSION_MINOR "${OPENCV_VERSION_PARTS}")
 string(REGEX REPLACE ".+CV_VERSION_MINOR[ ]+([0-9]+).*" "\\1" OPENCV_VERSION_PATCH "${OPENCV_VERSION_PARTS}")
 string(REGEX REPLACE ".+CV_VERSION_REVISION[ ]+([0-9]+).*" "\\1" OPENCV_VERSION_TWEAK "${OPENCV_VERSION_PARTS}")
+string(REGEX REPLACE ".+CV_VERSION_STATUS[ ]+\"([^\"]*)\".*" "\\1" OPENCV_VERSION_STATUS "${OPENCV_VERSION_PARTS}")

-set(OPENCV_VERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")
+set(OPENCV_VERSION_PLAIN "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")
 if(OPENCV_VERSION_TWEAK GREATER 0)
-  set(OPENCV_VERSION "${OPENCV_VERSION}.${OPENCV_VERSION_TWEAK}")
+  set(OPENCV_VERSION_PLAIN "${OPENCV_VERSION_PLAIN}.${OPENCV_VERSION_TWEAK}")
 endif()
+
+set(OPENCV_VERSION "${OPENCV_VERSION_PLAIN}${OPENCV_VERSION_STATUS}")

 set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}")
 set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")


fix cmake warning?

fix cmake warning?

--- cmake/packages/nsis.cmake
+++ cmake/packages/nsis.cmake
@@ -114,6 +114,7 @@
 set(SYMSRVDIR $ENV{SYMSRV})
 if (NOT ${SYMSRVDIR} STREQUAL "")
   message("Storing symbols:")
+  include(../../arangod/CMakeList.txt)
   add_custom_command(TARGET ${BIN_ARANGOD} POST_BUILD
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
     COMMAND "find -name \\*pdb |grep -v Release |grep -v Debug |grep -v 3rdParty |grep -v vc120.pdb  > pdbfiles_list.txt"


Update BdeTargetUtils.cmake

Update BdeTargetUtils.cmake

--- BdeBuildSystem/BdeTargetUtils.cmake
+++ BdeBuildSystem/BdeTargetUtils.cmake
@@ -307,7 +307,7 @@
 function(bbs_setup_target_uor target)
     cmake_parse_arguments(PARSE_ARGV 1
                           ""
-                          "SKIP_TESTS NO_GEN_BDE_METADATA NO_EMIT_PKG_CONFIG_FILE"
+                          "SKIP_TESTS;NO_GEN_BDE_METADATA;NO_EMIT_PKG_CONFIG_FILE"
                           "SOURCE_DIR"
                           "CUSTOM_PACKAGES")
     bbs_assert_no_unparsed_args("")


fix issue where generated xcodeproject added all headers as public except the last one in the list.

this bug would cause the resulting xcodeproject to fail to install last header file to the .framework bundles, making them unusable

this issue resulted in broken frameworks, all which missed at least one header file when installed.
this issue was caused by a misuse of set_target_properties , which was receiving an argument that
incorrectly separated source files.

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -259,7 +259,7 @@
          PROPERTIES BUILD_WITH_INSTALL_RPATH 1
          INSTALL_NAME_DIR "@executable_path/../Frameworks"
       )
-      set_target_properties(${LIBNAME} PROPERTIES PUBLIC_HEADER "${HEADER_FILES} ${PLATFORM_HEADERS}")
+      set_target_properties(${LIBNAME} PROPERTIES PUBLIC_HEADER "${HEADER_FILES};${PLATFORM_HEADERS};" )
       set_target_properties(${LIBNAME} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
       set_target_properties(${LIBNAME} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${OGRE_SOURCE_DIR}/OgreMain/include/OgreStableHeaders.h")
       set_target_properties(${LIBNAME} PROPERTIES RESOURCE "${RESOURCE_FILES}")


Generate binary files only when any of binary files is newer than output file

--- CMakeModules/EmbedBinaryFiles.cmake
+++ CMakeModules/EmbedBinaryFiles.cmake
@@ -1,10 +1,21 @@
 # Creates C resources file from files in given directory
 # Based on http://stackoverflow.com/a/27206982
 function(embed_binary_files file_glob output)
+    # Collect input files
+    file(GLOB bins ${file_glob})
+    # Stop when output file is newer than all binary files
+    set(output_new_than_bins 1)
+    foreach(bin ${bins})
+        if(bin IS_NEWER_THAN output)
+            set(output_new_than_bins 0)
+            break()
+        endif()
+    endforeach()
+    if(output_new_than_bins)
+        return()
+    endif()
     # Create empty output file
     file(WRITE ${output} "")
-    # Collect input files
-    file(GLOB bins ${file_glob})
     # Iterate through input files
     foreach(bin ${bins})
         # Get short filename


Fix version number parsing when latest branch is not vxx.yy.zz (#3300)

--- cmake/Modules/git_tags.cmake
+++ cmake/Modules/git_tags.cmake
@@ -53,7 +53,7 @@
 function(NGRAPH_GET_MOST_RECENT_TAG)
     find_package(Git REQUIRED)
     execute_process(
-        COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
+        COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 --match v*.*.*
         RESULT_VARIABLE RESULT
         OUTPUT_VARIABLE TAG
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}


cmake: repair GCC PCH

cmake: repair GCC PCH

--- cmake/OpenCVPCHSupport.cmake
+++ cmake/OpenCVPCHSupport.cmake
@@ -291,6 +291,14 @@

     ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input}  ${_output} ${_dowarn})

+
+    GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
+    if (oldProps MATCHES NOTFOUND)
+        SET(oldProps "")
+    endif()
+    SET(newProperties "${oldProps} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_name}\"")
+    SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
+
 ENDMACRO(ADD_PRECOMPILED_HEADER)


removed installation of package.xml for metapackages (since it was anyway only effective in a custom built workspace)

--- cmake/catkin_workspace.cmake
+++ cmake/catkin_workspace.cmake
@@ -61,11 +61,7 @@
         message(STATUS "+++ add_subdirectory(${path})")
         add_subdirectory(${path})
       else()
-        message(STATUS "+++ metapackage '${path}'")
-        install(FILES
-          ${path}/package.xml
-          DESTINATION share/${name}
-        )
+        message(STATUS "+++ skipping metapackage '${path}'")
       endif()
     endforeach()
   endif()


build: dereference a variable when checking (NFC)

Some versions of CMake dereference the variable here and others do not.
Explicitly dereference to ensure that the library name is properly set.
Failure to do so will fail to load the library as the output path
becomes the name.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1905,7 +1905,7 @@
     if(SWIFTLIB_SHARED)
       if(sdk IN_LIST SWIFT_APPLE_PLATFORMS)
         list(APPEND swiftlib_link_flags_all "-dynamiclib -Wl,-headerpad_max_install_names")
-      elseif(sdk STREQUAL ANDROID)
+      elseif(${sdk} STREQUAL ANDROID)
         list(APPEND swiftlib_link_flags_all "-shared")
         # TODO: Instead of `lib${name}.so` find variable or target property which already have this value.
         list(APPEND swiftlib_link_flags_all "-Wl,-soname,lib${name}.so")


Typos (from copy & paste)

Typos (from copy & paste)

--- cmake/modules/Findhdfs.cmake
+++ cmake/modules/Findhdfs.cmake
@@ -6,8 +6,8 @@
 #  HDFS_INCLUDE_DIRS (not cached)
 #  HDFS_LIBRARIES

-find_path(HDFS_INCLUDE_DIR NAMES hdfs.h  HINTS ${CCTOOLS_DIR}/include $ENV{CCTOOLS_DIR}/inlcude)
-find_library(HDFS_LIBRARY NAMES hdfs HINTS ${CCTOOLS_DIR}/lib/native $ENV{HDFS_DIR}/lib/native)
+find_path(HDFS_INCLUDE_DIR NAMES hdfs.h  HINTS ${HDFS_DIR}/include $ENV{HDFS_DIR}/inlcude)
+find_library(HDFS_LIBRARY NAMES hdfs HINTS ${HDFS_DIR}/lib/native $ENV{HDFS_DIR}/lib/native)

 set(HDFS_INCLUDE_DIRS ${HDFS_INCLUDE_DIR})
 set(HDFS_LIBRARIES ${HDFS_LIBRARY})


cmake: Stringify develop.cmake

cmake: Stringify develop.cmake

Cleanup develop.cmake to remove ARMC5 and uArm compiler flags and
stringify cmake variables.

Signed-off-by: Devaraj Ranganna <53e2fcb007e5c6e2caf46b91114119a655266f64@arm.com>

--- cmake/profiles/develop.cmake
+++ cmake/profiles/develop.cmake
@@ -34,69 +34,24 @@

 elseif(MBED_TOOLCHAIN STREQUAL "ARM")

-set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS}
-    -std=gnu11
-)
-set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}
-    -fno-rtti
-    -fno-c++-static-destructors
-    -std=gnu++14
-)
-set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}
-    --show_full_path
-    --legacyalign
-    --inline
-    --any_contingency
-    --keep=os_cb_sections
-)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
+    -std=gnu11 \
+")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+    -fno-rtti \
+    -fno-c++-static-destructors \
+    -std=gnu++14 \
+")
+set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} \
+    --show_full_path \
+    --legacyalign \
+    --inline \
+    --any_contingency \
+    --keep=os_cb_sections \
+")

 set(DEVELOP_DEFINITIONS ${DEVELOP_DEFINITIONS}
     -D__ASSERT_MSG
-)
-
-elseif(MBED_TOOLCHAIN STREQUAL "ARM")
-
-set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS}
-    --md
-    --no_depend_system_headers
-    --c99
-)
-set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}
-    --cpp11
-    --no_rtti
-    --no_vla
-)
-set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}
-    --show_full_path
-    --any_contingency
-    --inline
-    --keep=os_cb_sections
-)
-
-set(DEVELOP_DEFINITIONS ${DEVELOP_DEFINITIONS}
-    -D__ASSERT_MSG
-)
-
-elseif(MBED_TOOLCHAIN STREQUAL "uARM")
-
-set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS}
-    --md
-    --no_depend_system_headers
-    --c99
-)
-set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}
-    --cpp11
-    --no_rtti
-    --no_vla
-)
-set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}
-    --inline
-    --library_type=microlib
-)
-
-set(DEVELOP_DEFINITIONS ${DEVELOP_DEFINITIONS}
-    -D__ASSERT_MSG
-    -DMBED_RTOS_SINGLE_THREAD
 )

 elseif(MBED_TOOLCHAIN STREQUAL "IAR")


Remove unneeded Findmodule for GLUT (windows)

git-svn-id: a0a066a1d7ce87c7a04dae20f169ad0cd8bda35d@1428 04231f92-3938-0410-9931-e931ac552b4f

--- cmake/windows/FindGLUT.cmake
+++ cmake/windows/FindGLUT.cmake
@@ -1,123 +0,0 @@
-# - try to find glut library and include files
-#  GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
-#  GLUT_LIBRARIES, the libraries to link against
-#  GLUT_FOUND, If false, do not try to use GLUT.
-# Also defined, but not for general use are:
-#  GLUT_glut_LIBRARY = the full path to the glut library.
-#  GLUT_Xmu_LIBRARY  = the full path to the Xmu library.
-#  GLUT_Xi_LIBRARY   = the full path to the Xi Library.
-
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-IF (WIN32)
-  FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
-    PATHS
-    $ENV{EXTERNLIBS}/glut/include
-    ${GLUT_ROOT_PATH}/include )
-  FIND_LIBRARY( GLUT_LIBRARY_DEBUG NAMES glut32D glutD freeglutD
-    PATHS
-    $ENV{EXTERNLIBS}/glut/lib
-    ${OPENGL_LIBRARY_DIR}
-    ${GLUT_ROOT_PATH}/Debug
-    )
-    FIND_LIBRARY( GLUT_LIBRARY_RELEASE NAMES glut32 glut freeglut
-    PATHS
-    ${OPENGL_LIBRARY_DIR}
-    $ENV{EXTERNLIBS}/glut/lib
-    ${GLUT_ROOT_PATH}/Release
-    )
-    IF(MSVC_IDE)
-      IF (GLUT_LIBRARY_DEBUG AND GLUT_LIBRARY_RELEASE)
-         SET(GLUT_LIBRARY optimized ${GLUT_LIBRARY_RELEASE} debug ${GLUT_LIBRARY_DEBUG})
-      ELSE (GLUT_LIBRARY_DEBUG AND GLUT_LIBRARY_RELEASE)
-         SET(GLUT_LIBRARY NOTFOUND)
-         MESSAGE(STATUS "Could not find the debug AND release version of zlib")
-      ENDIF (GLUT_LIBRARY_DEBUG AND GLUT_LIBRARY_RELEASE)
-    ELSE(MSVC_IDE)
-      STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
-      IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-         SET(GLUT_LIBRARY ${GLUT_LIBRARY_DEBUG})
-      ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-         SET(GLUT_LIBRARY ${GLUT_LIBRARY_RELEASE})
-      ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-    ENDIF(MSVC_IDE)
-    MARK_AS_ADVANCED(GLUT_LIBRARY_DEBUG GLUT_LIBRARY_RELEASE)
-ELSE (WIN32)
-
-  IF (APPLE)
-    # These values for Apple could probably do with improvement.
-    FIND_PATH( GLUT_INCLUDE_DIR glut.h
-      /System/Library/Frameworks/GLUT.framework/Versions/A/Headers
-      ${OPENGL_LIBRARY_DIR}
-      )
-    SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX")
-    SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
-  ELSE (APPLE)
-
-    FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
-      /usr/include/GL
-      /usr/openwin/share/include
-      /usr/openwin/include
-      /opt/graphics/OpenGL/include
-      /opt/graphics/OpenGL/contrib/libglut
-      )
-
-    FIND_LIBRARY( GLUT_glut_LIBRARY glut
-      /usr/openwin/lib
-      )
-
-    FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
-      /usr/openwin/lib
-      )
-
-    FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
-      /usr/openwin/lib
-      )
-
-    FIND_LIBRARY( GLUT_Xxf86vm_LIBRARY Xxf86vm
-      /usr/openwin/lib
-      )
-
-  SET(GLUT_LIBRARY ${GLUT_glut_LIBRARY})
-
-  ENDIF (APPLE)
-  IF(GLUT_glut_LIBRARY)
-    # Is -lXi and -lXmu required on all platforms that have it?
-    # If not, we need some way to figure out what platform we are on.
-    SET( GLUT_LIBRARIES
-      ${GLUT_glut_LIBRARY}
-      ${GLUT_Xmu_LIBRARY}
-      ${GLUT_Xi_LIBRARY}
-      ${GLUT_Xxf86vm_LIBRARY}
-      ${GLUT_cocoa_LIBRARY}
-      )
-  ENDIF(GLUT_glut_LIBRARY)
-
-ENDIF (WIN32)
-
-IF(MSVC)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT DEFAULT_MSG GLUT_LIBRARY_RELEASE GLUT_LIBRARY_DEBUG GLUT_INCLUDE_DIR)
-  MARK_AS_ADVANCED(GLUT_LIBRARY_RELEASE GLUT_LIBRARY_DEBUG)
-    SET( GLUT_LIBRARIES ${GLUT_LIBRARY})
-ELSE(MSVC)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT DEFAULT_MSG GLUT_LIBRARY GLUT_INCLUDE_DIR)
-  MARK_AS_ADVANCED(GLUT_LIBRARY)
-ENDIF(MSVC)
-
-MARK_AS_ADVANCED(
-  GLUT_INCLUDE_DIR
-#  GLUT_glut_LIBRARY
-#  GLUT_Xmu_LIBRARY
-#  GLUT_Xi_LIBRARY
-  )


cmake: do not treat "main" gasnet library specially

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -126,11 +126,10 @@
   endforeach()
 endmacro()

-function(_GASNet_create_component_target _GASNet_MAKEFILE COMPONENT_NAME
-  COMPONENT_LIB)
+function(_GASNet_create_component_target _GASNet_MAKEFILE COMPONENT_NAME)
   string(REGEX MATCH "^([^\\-]*)-([^\\-]*)$" COMPONENT_NAME "${COMPONENT_NAME}")
   _GASNet_parse_conduit_makefile(${_GASNet_MAKEFILE} ${CMAKE_MATCH_2})
-  get_filename_component(LDIRS "${COMPONENT_LIB}" DIRECTORY)
+
   foreach(V _GASNet_CFLAGS _GASNet_CXXFLAGS _GASNet_LDFLAGS _GASNet_LIBS)
     _GASNet_parse_flags(${V} "-I" IDIRS)
     _GASNet_parse_flags(${V} "-D" DEFS)
@@ -141,7 +140,6 @@
     message(WARNING "Unable to find link libraries for gasnet-${COMPONENT_NAME}")
     return()
   endif()
-  list(REMOVE_ITEM LIBS gasnet-${COMPONENT_NAME})

   foreach(L IN LISTS LIBS)
     find_library(GASNet_${L}_LIBRARY ${L} PATHS ${LDIRS})
@@ -161,7 +159,7 @@
   endif()
   add_library(GASNet::${COMPONENT_NAME} UNKNOWN IMPORTED)
   set_target_properties(GASNet::${COMPONENT_NAME} PROPERTIES
-    IMPORTED_LOCATION "${COMPONENT_LIB}"
+    IMPORTED_LOCATION "${GASNet_gasnet-${COMPONENT_NAME}_LIBRARY}"
   )
   if(DEFS)
     set_target_properties(GASNet::${COMPONENT_NAME} PROPERTIES
@@ -257,16 +255,9 @@
         GASNet_CONDUITS GASNet_THREADING_OPTS
       )

-      # Look for the conduit specific library
-      find_library(GASNet_${_COMPONENT}_LIBRARY gasnet-${_COMPONENT}
-        ${_GASNet_FIND_LIBRARY_OPTS}
-      )
-      mark_as_advanced(GASNet_${_COMPONENT}_LIBRARY)
-
       # Create the component imported target
-      _GASNet_create_component_target("${CMF}" ${_COMPONENT}
-        "${GASNet_${_COMPONENT}_LIBRARY}"
-      )
+      _GASNet_create_component_target("${CMF}" ${_COMPONENT})
+
       if(NOT TARGET GASNet::${_COMPONENT})
         message(WARNING "Unable to create GASNet::${_COMPONENT} target")
       endif()


[CC] Release the C backend (#1707)

[CC] Release the C backend (#1707)

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -3,7 +3,7 @@
 option(USE_STDCPP "Use -stdlib=libc++" OFF)
 option(TI_WITH_CUDA "Build with the CUDA backend" ON)
 option(TI_WITH_OPENGL "Build with the OpenGL backend" ON)
-option(TI_WITH_CC "Build with the C backend" OFF)
+option(TI_WITH_CC "Build with the C backend" ON)

 if (APPLE)
     if (TI_WITH_CUDA)


[doxygen] prefer finding "Doxyfile.cmake.in" over "Doxyfile.in"

--- cmake/UseDoxygen.cmake
+++ cmake/UseDoxygen.cmake
@@ -69,7 +69,7 @@
 find_package(Doxygen)

 if(DOXYGEN_FOUND)
-	find_file(DOXYFILE_IN "Doxyfile.in"
+	find_file(DOXYFILE_IN NAMES "Doxyfile.cmake.in" "Doxyfile.in"
 			PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/")

 	include(FindPackageHandleStandardArgs)


Added abseil include cmake guard (#29609)

--- cmake/abseil-cpp.cmake
+++ cmake/abseil-cpp.cmake
@@ -12,7 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-if(gRPC_ABSL_PROVIDER STREQUAL "module")
+if(TARGET absl::strings)
+  # If absl is included already, skip including it.
+  # (https://github.com/grpc/grpc/issues/29608)
+elseif(gRPC_ABSL_PROVIDER STREQUAL "module")
   if(NOT ABSL_ROOT_DIR)
     set(ABSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/abseil-cpp)
   endif()


Check for specific headers on windows, so that the minimal dependencies force windows to build a server-only build without the graphical libraries


CMake: Fix minor spelling mistake

CMake: Fix minor spelling mistake

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -150,7 +150,7 @@
 #
 # Parameters:
 #
-# 1. util        [in] : the utility fo search for. Must be added using
+# 1. util        [in] : the utility to search for. Must be added using
 #                       add_executable first.
 # 2. EXE_SYM_LOC [out]: a name for a variable where the program to be executed
 #                       is written to.


CMake shader patching is a bit less obnoxious, too.

--- cmake/Modules/ShadertoyAPI.cmake
+++ cmake/Modules/ShadertoyAPI.cmake
@@ -77,6 +77,10 @@

 	# set(func_decl_regex "[A-Za-z0-9_]+[ \t]+[A-Za-z0-9_]+[ \t]*\\(.*\\);")

+    set(glsl_style_array "([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\][ \t]*([A-Za-z0-9_]+)")
+    set(c_style_array    "([A-Za-z0-9_]+)[ \t]+([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\]")
+    set(glsl_array_initializer "([A-Za-z0-9_]+)[ \t]*\\[[A-Za-z0-9_ \t]*\\][ \t]*(\\(|$)")
+
 	unset(pending_array_line)

 	foreach(line ${lines})
@@ -85,7 +89,8 @@

 		if (pending_array_line)
 			if (line MATCHES "^[ \t]*\\(")
-				string(REGEX REPLACE "([A-Za-z0-9_]+)[ \t]*\\[[A-Za-z0-9_ \t]*\\][ \t]*$" "CXXSWIZZLE_MAKE_ARRAY(\\1)" pending_array_line "${pending_array_line}")
+                message(VERBOSE "Array initializer found ${pending_array_line}")
+				string(REGEX REPLACE "${glsl_array_initializer}" "CXXSWIZZLE_MAKE_ARRAY(\\1)" pending_array_line "${pending_array_line}")
 				#string(REGEX REPLACE "^([ \t]*)\\(" "\\1," line "${line}")
 			endif()

@@ -116,42 +121,38 @@
 			set(line "CXXSWIZZLE_IGNORE(${line})")
 		endif()

-
-
-		# matches xxxxx [xxx] xxxxx
-		# matches xxxxx xxxxx [xxx]
 		if (NOT line MATCHES "^#define.*")
-			if (line MATCHES "([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\][ \t]*([A-Za-z0-9_]+)")
-				#message(STATUS "Array found ${line}")
-				if ("${CMAKE_MATCH_2}" STREQUAL "")
-                    if (line MATCHES ^"[ \t]")
-                        string(REGEX REPLACE "([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\][ \t]*([A-Za-z0-9_]+)" "CXXSWIZZLE_ARRAY(\\1) \\3" line "${line}")
+			if (line MATCHES "${glsl_style_array}")
+				message(VERBOSE "Array found ${line}")
+				if (NOT "${CMAKE_MATCH_2}" STREQUAL "")
+                    set(replacement "CXXSWIZZLE_ARRAY_N(\\1, \\2) \\3")
+                elseif (line MATCHES ^"[ \t]")
+                    set(replacement "CXXSWIZZLE_ARRAY(\\1) \\3")
+                else()
+                    set(replacement "CXXSWIZZLE_ARRAY_FIELD(\\1) \\3")
+                endif()
+                string(REGEX REPLACE "${glsl_style_array}" "${replacement}" line "${line}")
+			elseif (line MATCHES "${c_style_array}")
+				if (NOT "${CMAKE_MATCH_1}" STREQUAL "return")
+                    message(VERBOSE "Array found ${line}")
+                    if (NOT "${CMAKE_MATCH_3}" STREQUAL "")
+                        set(replacement "CXXSWIZZLE_ARRAY_N(\\1, \\3) \\2")
+                    elseif (line MATCHES ^"[ \t]")
+                        set(replacement "CXXSWIZZLE_ARRAY(\\1) \\2")
                     else()
-                        string(REGEX REPLACE "([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\][ \t]*([A-Za-z0-9_]+)" "CXXSWIZZLE_ARRAY_FIELD(\\1) \\3" line "${line}")
+                        set(replacement "CXXSWIZZLE_ARRAY_FIELD(\\1) \\2")
                     endif()
-				else()
-					string(REGEX REPLACE     "([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\][ \t]*([A-Za-z0-9_]+)" "CXXSWIZZLE_ARRAY_N(\\1, \\2) \\3" line "${line}")
-				endif()
-			elseif (line MATCHES "([A-Za-z0-9_]+)[ \t]+([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\]")
-				#message(STATUS "Array 2 found ${line}")
-				if (NOT "${CMAKE_MATCH_1}" STREQUAL "return")
-					if ("${CMAKE_MATCH_3}" STREQUAL "")
-                        if (line MATCHES ^"[ \t]")
-                            string(REGEX REPLACE "([A-Za-z0-9_]+)[ \t]+([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\]" "CXXSWIZZLE_ARRAY(\\1) \\2" line "${line}")
-                        else()
-                            string(REGEX REPLACE "([A-Za-z0-9_]+)[ \t]+([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\]" "CXXSWIZZLE_ARRAY_FIELD(\\1) \\2" line "${line}")
-                        endif()
-					else()
-						string(REGEX REPLACE     "([A-Za-z0-9_]+)[ \t]+([A-Za-z0-9_]+)[ \t]*\\[([A-Za-z0-9_ \t]*)\\]" "CXXSWIZZLE_ARRAY_N(\\1, \\3) \\2" line "${line}")
-					endif()
+                    string(REGEX REPLACE "${c_style_array}" "${replacement}" line "${line}")
 				endif()
 			endif()

-			if (line MATCHES "([A-Za-z0-9_]+)[ \t]*\\[[A-Za-z0-9_ \t]*\\][ \t]*\\(")
-				#message(STATUS "Array value function declaration: ${line}")
-				string(REGEX REPLACE "([A-Za-z0-9_]+)[ \t]*\\[[A-Za-z0-9_ \t]*\\][ \t]*\\(" "CXXSWIZZLE_MAKE_ARRAY(\\1)( " line "${line}")
-			elseif(line MATCHES "([A-Za-z0-9_]+)[ \t]*\\[[A-Za-z0-9_ \t]*\\][ \t]*$")
-				set(pending_array_line ${line})
+			if (line MATCHES "${glsl_array_initializer}")
+                if ("${CMAKE_MATCH_2}" STREQUAL "(")
+                    message(VERBOSE "Array initializer found ${line}")
+				    string(REGEX REPLACE "${glsl_array_initializer}" "CXXSWIZZLE_MAKE_ARRAY(\\1)( " line "${line}")
+			    else()
+				    set(pending_array_line ${line})
+                endif()
 			endif()
 		endif()


Determine SHAPELIB_LIBRARY_DIRS.

Determine SHAPELIB_LIBRARY_DIRS.

svn path=/trunk/; revision=12269

--- cmake/modules/FindShapelib.cmake
+++ cmake/modules/FindShapelib.cmake
@@ -4,8 +4,9 @@
 # This module defines the following uncached variables:
 #  SHAPELIB_FOUND, if false, do not try to use shapelib.
 #  SHAPELIB_INCLUDE_DIR, where to find shapefil.h.
-#  SHAPELIB_LIBRARIES, the libraries to link against to use shapelib
-#  is found.
+#  SHAPELIB_LIBRARIES, the libraries to link against to use the shapelib
+#  library.
+#  SHAPELIB_LIBRARY_DIRS, the directory where the shapelib library is found.

 find_path(SHAPELIB_INCLUDE_DIR shapefil.h /usr/local/include /usr/include)

@@ -18,6 +19,7 @@
     # Set uncached variables as per standard.
     set(SHAPELIB_FOUND ON)
     set(SHAPELIB_LIBRARIES ${SHAPELIB_LIBRARY})
+    get_filename_component(SHAPELIB_LIBRARY_DIRS ${SHAPELIB_LIBRARY} PATH)
   endif(SHAPELIB_LIBRARY)
 endif(SHAPELIB_INCLUDE_DIR)


[cmake] Add new Matlab versions

[cmake] Add new Matlab versions

Closes #169

--- cmake/FindMATLAB.cmake
+++ cmake/FindMATLAB.cmake
@@ -40,7 +40,7 @@
 SET(MATLAB_FOUND 0)
 IF(WIN32)
   # Search for a version of Matlab available, starting from the most modern one to older versions
-  FOREACH(MATVER "7.14" "7.12" "7.11" "7.10" "7.9" "7.8" "7.7" "7.6" "7.5" "7.4")
+  FOREACH(MATVER "9.3" "9.2" "9.1" "8.6" "8.5" "8.4" "8.3" "8.2" "8.1" "8" "7.14" "7.12" "7.11" "7.10" "7.9" "7.8" "7.7" "7.6" "7.5" "7.4")
     IF((NOT DEFINED MATLAB_ROOT)
         OR ("${MATLAB_ROOT}" STREQUAL "")
         OR ("${MATLAB_ROOT}" STREQUAL "/registry"))


tweak linker

tweak linker

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -13,7 +13,7 @@

 if (APPLE)
 # Ask OS X to minic Linux dynamic linking behavior
-target_link_libraries(${CORE_LIBRARY_NAME} PRIVATE "-undefined dynamic_lookup")
+target_link_libraries(${CORE_LIBRARY_NAME} "-undefined dynamic_lookup")
 endif()


[CMake] Support thin LTO in PGO CMake cache

This allows you to set PGO_INSTRUMENT_LTO=Thin and have it work correctly.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@284646 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/PGO.cmake
+++ cmake/caches/PGO.cmake
@@ -16,8 +16,8 @@
   stage2-test-suite CACHE STRING "")

 if(PGO_INSTRUMENT_LTO)
-  set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
-  set(BOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
+  set(BOOTSTRAP_LLVM_ENABLE_LTO ${PGO_INSTRUMENT_LTO} CACHE BOOL "")
+  set(BOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LTO ${PGO_INSTRUMENT_LTO} CACHE BOOL "")
 endif()

 if(PGO_BUILD_CONFIGURATION)


cmake: Added function for parsing gcc dependency metadata

Added a function that can parse the dependency information given when
invoking gcc with the argument '-M'. This could be used to manually
add dependencies detected when preprocessing a file.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -17,6 +17,7 @@
 # 3.1. *_ifdef
 # 3.2. *_ifndef
 # 3.3. *_option compiler compatibility checks
+# 3.3.1 Toolchain integration
 # 3.4. Debugging CMake
 # 3.5. File system management

@@ -1244,7 +1245,7 @@
   endif()
 endfunction()

-# 3.2. *_option Compiler-compatibility checks
+# 3.3. *_option Compiler-compatibility checks
 #
 # Utility functions for silently omitting compiler flags when the
 # compiler lacks support. *_cc_option was ported from KBuild, see
@@ -1334,6 +1335,45 @@
   endforeach()
 endfunction()

+# 3.3.1 Toolchain integration
+#
+# 'toolchain_parse_make_rule' is a function that parses the output of
+# 'gcc -M'.
+#
+# The argument 'input_file' is in input parameter with the path to the
+# file with the dependency information.
+#
+# The argument 'include_files' is an output parameter with the result
+# of parsing the include files.
+function(toolchain_parse_make_rule input_file include_files)
+  file(READ ${input_file} input)
+
+  # The file is formatted like this:
+  # empty_file.o: misc/empty_file.c \
+  # nrf52840_pca10056/nrf52840_pca10056.dts \
+  # nrf52840_qiaa.dtsi
+
+  # Get rid of the backslashes
+  string(REPLACE "\\" ";" input_as_list ${input})
+
+  # Pop the first line and treat it specially
+  list(GET input_as_list 0 first_input_line)
+  string(FIND ${first_input_line} ": " index)
+  math(EXPR j "${index} + 2")
+  string(SUBSTRING ${first_input_line} ${j} -1 first_include_file)
+  list(REMOVE_AT input_as_list 0)
+
+  list(APPEND result ${first_include_file})
+
+  # Add the other lines
+  list(APPEND result ${input_as_list})
+
+  # Strip away the newlines and whitespaces
+  list(TRANSFORM result STRIP)
+
+  set(${include_files} ${result} PARENT_SCOPE)
+endfunction()
+
 # 3.4. Debugging CMake

 # Usage:


ENH: Added integration tests for demos #233

--- Applications/CommandLineInterface/test/integration.cmake
+++ Applications/CommandLineInterface/test/integration.cmake
@@ -19,6 +19,48 @@

 # Integration tests are "short" tests that typically test a combination of components by using the SuperElastix commandline interface with a configuration file.

+#Application Demo 1A: should match <source>/Applications/CommandLineInterface/Demo/Scripts_[Linux|Windows]/
+add_test(NAME Integration_Demo_1A COMMAND SuperElastix
+  --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_1A.log
+  --loglevel trace
+  --conf ${SUPERELASTIX_CONFIGURATION_DATA_DIR}/elastix_Bspline_NC.json
+  --graphout ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_1A.dot
+  --in FixedImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneA2d64.mhd
+       MovingImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneB2d64.mhd
+  --out ResultImage=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_1A_image_elastix_NC.mhd)
+
+#Application Demo 1B: should match <source>/Applications/CommandLineInterface/Demo/Scripts_[Linux|Windows]/
+add_test(NAME Integration_Demo_1B COMMAND SuperElastix
+  --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_1B.log
+  --loglevel trace
+  --conf ${SUPERELASTIX_CONFIGURATION_DATA_DIR}/elastix_Bspline_MSD.json
+  --graphout ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_1B.dot
+  --in FixedImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneA2d64.mhd
+       MovingImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneB2d64.mhd
+  --out ResultImage=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_1B_image_elastix_MSD.mhd)
+
+#Application Demo 2A: should match <source>/Applications/CommandLineInterface/Demo/Scripts_[Linux|Windows]/
+add_test(NAME Integration_Demo_2A COMMAND SuperElastix
+  --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2A.log
+  --loglevel trace
+  --conf ${SUPERELASTIX_CONFIGURATION_DATA_DIR}/itkv4_SVF_ANTsCC.json
+  --graphout ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2A.dot
+  --in FixedImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneA2d64.mhd
+       MovingImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneB2d64.mhd
+  --out ResultImage=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2A_image_itkv4_NC.mhd
+        ResultDisplacementField=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2A_deformation_itkv4_NC.mhd)
+
+#Application Demo 2B: should match <source>/Applications/CommandLineInterface/Demo/Scripts_[Linux|Windows]/
+add_test(NAME Integration_Demo_2B COMMAND SuperElastix
+  --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2B.log
+  --loglevel trace
+  --conf ${SUPERELASTIX_CONFIGURATION_DATA_DIR}/itkv4_SVF_MSD.json
+  --graphout ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2B.dot
+  --in FixedImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneA2d64.mhd
+       MovingImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneB2d64.mhd
+  --out ResultImage=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2B_image_itkv4_MSD.mhd
+        ResultDisplacementField=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_Demo_2B_deformation_itkv4_MSD.mhd)
+
 add_test(NAME Integration_WarpByItkTransform COMMAND SuperElastix
   --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_WarpByItkTransform.log
   --loglevel trace
@@ -28,7 +70,7 @@
        TransformSource=${SUPERELASTIX_INPUT_DATA_DIR}/ItkAffine2Dtransform.tfm
   --out ResultImageSink=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_WarpByItkTransform.mhd)

-  add_test(NAME Integration_ComposeBlueprintElastix COMMAND SuperElastix
+add_test(NAME Integration_ComposeBlueprintElastix COMMAND SuperElastix
   --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_ComposeBlueprintElastix.log
   --loglevel trace
   --conf ${SUPERELASTIX_CONFIGURATION_DATA_DIR}/elastix_Base.json
@@ -38,7 +80,7 @@
        MovingImage=${SUPERELASTIX_INPUT_DATA_DIR}/coneB2d64.mhd
   --out ResultImage=${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_ComposeBlueprintElastix.mhd)

-  add_test(NAME Integration_ComposeBlueprintItk COMMAND SuperElastix
+add_test(NAME Integration_ComposeBlueprintItk COMMAND SuperElastix
   --logfile ${SUPERELASTIX_OUTPUT_DATA_DIR}/Integration_ComposeBlueprintElastix.log
   --loglevel trace
   --conf ${SUPERELASTIX_CONFIGURATION_DATA_DIR}/itkv4_Base.json


fixing embree-config.cmake for static compilation when multi-ISA enabled

--- common/cmake/embree-config.cmake
+++ common/cmake/embree-config.cmake
@@ -55,11 +55,22 @@
   INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/lexers-targets.cmake")
   INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake")

-  add_library(TBB::tbb SHARED IMPORTED)
-  set_target_properties(TBB::tbb PROPERTIES IMPORTED_LOCATION "${EMBREE_ROOT_DIR}/@EMBREE_INSTALLED_TBB@")
-
+  IF (EMBREE_ISA_SSE42)
+    INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_sse42-targets.cmake")
+  ENDIF()
+
+  IF (EMBREE_ISA_AVX)
+    INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx-targets.cmake")
+  ENDIF()
+
+  IF (EMBREE_ISA_AVX2)
+    INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx2-targets.cmake")
+  ENDIF()
+
+  IF (EMBREE_ISA_AVX512)
+    INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx512-targets.cmake")
+  ENDIF()
+
 ENDIF()

 INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake")
-
-


Add support for cross compiling from linux for windows (only header-only libraries supported)

--- blocks/boost/install/install.cmake
+++ blocks/boost/install/install.cmake
@@ -136,18 +136,20 @@
     set(BII_BOOST_DOWNLOAD_URL "http://sourceforge.net/projects/boost/files/boost/${BII_BOOST_VERSION}/${BII_BOOST_PACKAGE}" ${SCOPE})

     #Bootstrap
-    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
+    if((CMAKE_SYSTEM_NAME MATCHES "Windows") AND (NOT CMAKE_CROSSCOMPILING))
         set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.bat ${SCOPE})
         set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2.exe        ${SCOPE})
-        set(__DYNLIB_EXTENSION     .dll                           ${SCOPE})
-    elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+    else()
         set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh ${SCOPE})
         set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2           ${SCOPE})
-        set(__DYNLIB_EXTENSION     .dylib                        ${SCOPE})
+    endif()
+
+    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
+        set(__DYNLIB_EXTENSION     .dll   ${SCOPE})
+    elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+        set(__DYNLIB_EXTENSION     .dylib ${SCOPE})
     elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
-        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh ${SCOPE})
-        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2           ${SCOPE})
-        set(__DYNLIB_EXTENSION     .so                           ${SCOPE})
+        set(__DYNLIB_EXTENSION     .so    ${SCOPE})
     else()
         message(FATAL_ERROR "Unknown platform. Stopping Boost installation")
     endif()


only use intel libimf on linux

only use intel libimf on linux

--- config/user_options.cmake
+++ config/user_options.cmake
@@ -46,16 +46,9 @@
         CACHE PATH "OpenCL lib path")
 ENDIF (MSVC)

-IF (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
-    IF (APPLE)
-        SET (VSMC_LINK_LIBRARIES ${VSMC_LINK_LIBRARIES}
-            /opt/intel/lib/libimf.a)
-        SET (VSMC_LINK_LIBRARIES ${VSMC_LINK_LIBRARIES}
-            /opt/intel/lib/libintlc.dylib)
-    ELSEIF (UNIX)
-        SET (VSMC_LINK_LIBRARIES ${VSMC_LINK_LIBRARIES}
-            /opt/intel/lib/intel64/libimf.a)
-        SET (VSMC_LINK_LIBRARIES ${VSMC_LINK_LIBRARIES}
-            /opt/intel/lib/intel64/libintlc.so)
-    ENDIF (APPLE)
-ENDIF (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
+IF (UNIX AND NOT APPLE AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
+    SET (VSMC_LINK_LIBRARIES ${VSMC_LINK_LIBRARIES}
+        /opt/intel/lib/intel64/libimf.a)
+    SET (VSMC_LINK_LIBRARIES ${VSMC_LINK_LIBRARIES}
+        /opt/intel/lib/intel64/libintlc.so)
+ENDIF (UNIX AND NOT APPLE AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")


Set WORKING_DIRECTORY explicitly

Set WORKING_DIRECTORY explicitly

--- scripts/link-all.cmake
+++ scripts/link-all.cmake
@@ -61,6 +61,7 @@
   )
   execute_process(
       COMMAND ${cmd}
+      WORKING_DIRECTORY "${CELLAR_RAW_DIRECTORY}"
       RESULT_VARIABLE result
       OUTPUT_VARIABLE output
       ERROR_VARIABLE error
@@ -80,6 +81,7 @@
   set(cmd "${shell}" "${SHELL_LINK_SCRIPT}" "${HUNTER_INSTALL_PREFIX}")
   execute_process(
       COMMAND ${cmd}
+      WORKING_DIRECTORY "${CELLAR_RAW_DIRECTORY}"
       RESULT_VARIABLE result
       OUTPUT_VARIABLE output
       ERROR_VARIABLE error


modules: proper linking order for Font plugins.

Fixes static build on NaCl.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -246,7 +246,7 @@
     if(component MATCHES ".+AudioImporter")
         set(_MAGNUM_${_COMPONENT}_DEPENDENCIES Audio)
     elseif(component MATCHES ".+(Font|FontConverter)")
-        set(_MAGNUM_${_COMPONENT}_DEPENDENCIES TextureTools Text)
+        set(_MAGNUM_${_COMPONENT}_DEPENDENCIES Text TextureTools)
     endif()

     list(APPEND _MAGNUM_ADDITIONAL_COMPONENTS ${_MAGNUM_${_COMPONENT}_DEPENDENCIES})


Fix test failures when running from Visual Studio

--- cmake/Modules/SampPluginTest.cmake
+++ cmake/Modules/SampPluginTest.cmake
@@ -32,26 +32,29 @@
 		set(ARG_EXEC "${CMAKE_CURRENT_SOURCE_DIR}/${name}.cfg")
 	endif()
 	if(ARG_TIMEOUT)
-		list(APPEND arguments "--timeout" "${ARG_TIMEOUT}")
+		list(APPEND arguments --timeout ${ARG_TIMEOUT})
 	endif()
 	if(EXISTS "${ARG_EXEC}")
-		list(APPEND arguments "--exec" "${ARG_EXEC}")
+		list(APPEND arguments --exec "${ARG_EXEC}")
 	endif()

 	get_target_property(PLUGIN_PATH ${ARG_TARGET} LOCATION)
+	if(MSVC_IDE AND DEFINED CMAKE_BUILD_TYPE)
+		string(REPLACE "$(Configuration)" ${CMAKE_BUILD_TYPE} PLUGIN_PATH ${PLUGIN_PATH})
+	endif()

 	list(APPEND arguments
-		"--output"
-		"--plugin"   "${PLUGIN_PATH}"
-		"--gamemode" "${ARG_SCRIPT}"
+		--output
+		--plugin   "${PLUGIN_PATH}"
+		--gamemode "${ARG_SCRIPT}"
 	)

 	file(READ "${ARG_OUT_FILE}" out)

 	if(WIN32)
-		add_test(${name} "samp-server-cli.bat" ${arguments})
+		add_test(${name} samp-server-cli.bat ${arguments})
 	else()
-		add_test(${name} "samp-server-cli" ${arguments})
+		add_test(${name} samp-server-cli ${arguments})
 	endif()

 	set_tests_properties(${name} PROPERTIES


synchronize with master sources in link-grammar

--- lib/FindLinkGrammar.cmake
+++ lib/FindLinkGrammar.cmake
@@ -5,17 +5,39 @@
 #  LINK_GRAMMAR_LIBRARIES - The libraries needed to use link-grammar
 #  LINK_GRAMMAR_DATA_DIR - the dir where you will find the dictionaries

-# Copyright (c) 2008, 2014 OpenCog.org (http://opencog.org)
+# Copyright (c) 2008 OpenCog.org (http://opencog.org)
+# Copyright (c) 2014 Linas Vepstas
 #
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 # Look for the header file
 FIND_PATH(LINK_GRAMMAR_INCLUDE_DIR link-grammar/link-includes.h)
 FIND_PATH(LINK_GRAMMAR_DATA_DIR 4.0.dict
 	PATHS
 		/usr/share/link-grammar/en/
-		/usr/local/share/link-grammar/en/)
+		/usr/local/share/link-grammar/en/
+		/opt/local/share/link-grammar/en/)

 # Look for the library
 FIND_LIBRARY(LINK_GRAMMAR_LIBRARY


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -156,7 +156,7 @@
 			# 5. compilo y genera el paquete en local
 			message("Generating artifact ${PACKAGE} ...")
 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY}
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY} -o
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)


Added find_package(OpenMP) to the CFlags setup cmake to allow openmp use in plugins.

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@2704 fa922fa7-2fde-0310-acd8-f43f465a7996

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -74,6 +74,7 @@
 endif (CMAKE_COMPILER_IS_GNUCXX)

 # add openmp compile option to the flags
+find_package(OpenMP)
 if (ENABLE_OPENMP AND OPENMP_FOUND)
     # these changes unfortunately don't make it into the cache, but the user doesn't really need to see it, they can control it with the ENABLE_OPENMP option
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")


Add Android ARMEABI_V7A_HARD for Hardfp support

Add Android HardFP support. Expose the "armeabi-v7a-hard with NEON"
ANDROID_ABI.

TEST= Add -DANDROID_NATIVE_API_LEVEL=21
-DANDROID_ABI="armeabi-v7a-hard with NEON"

to compile with hardfp. Checked the output of make verbose to
confirm -lm_hard is being linked. There are known test
failures but that can be fixed once this is in.

--- platforms/android/android.toolchain.cmake
+++ platforms/android/android.toolchain.cmake
@@ -65,6 +65,7 @@
 #        "armeabi" - ARMv5TE based CPU with software floating point operations
 #        "armeabi-v7a" - ARMv7 based devices with hardware FPU instructions
 #            this ABI target is used by default
+#        "armeabi-v7a-hard with NEON" - ARMv7 based devices with hardware FPU instructions and hardfp
 #        "armeabi-v7a with NEON" - same as armeabi-v7a, but
 #            sets NEON as floating-point unit
 #        "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
@@ -178,7 +179,7 @@
 #    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
 #    variables to make necessary Android-specific configuration changes.
 #
-#    Also ARMEABI or ARMEABI_V7A or X86 or MIPS or ARM64_V8A or X86_64 or MIPS64
+#    Also ARMEABI or ARMEABI_V7A or ARMEABI_V7A_HARD or X86 or MIPS or ARM64_V8A or X86_64 or MIPS64
 #    will be set true, mutually exclusive. NEON option will be set true
 #    if VFP is set to NEON.
 #
@@ -231,7 +232,7 @@
 endif()

 # known ABIs
-set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
+set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a-hard with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
 set( ANDROID_SUPPORTED_ABIS_arm64 "arm64-v8a" )
 set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
 set( ANDROID_SUPPORTED_ABIS_x86_64 "x86_64" )
@@ -711,6 +712,14 @@
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
  set( VFPV3 true )
  set( NEON true )
+elseif( ANDROID_ABI STREQUAL "armeabi-v7a-hard with NEON" )
+ set( ARMEABI_V7A_HARD true )
+ set( ANDROID_NDK_ABI_NAME "armeabi-v7a-hard" )
+ set( ANDROID_ARCH_NAME "arm" )
+ set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
+ set( VFPV3 true )
+ set( NEON true )
 else()
  message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." )
 endif()
@@ -904,7 +913,7 @@
    # old location ( pre r8c )
    set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
   endif()
-  if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" )
+  if( (ARMEABI_V7A OR ARMEABI_V7A_HARD) AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" )
    list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" )
   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" )
    list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb" )
@@ -912,9 +921,9 @@
    list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" )
   endif()
   # always search static GNU STL to get the location of libsupc++.a
-  if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" )
+  if( (ARMEABI_V7A OR ARMEABI_V7A_HARD) AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" )
    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb" )
-  elseif( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" )
+  elseif( (ARMEABI_V7A OR ARMEABI_V7A_HARD) AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" )
    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}" )
   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libstdc++.a" )
    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb" )
@@ -935,7 +944,7 @@
    " )
   endif()
   if( ANDROID_STL STREQUAL "gnustl_shared" )
-   if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
+   if( (ARMEABI_V7A OR ARMEABI_V7A_HARD) AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
     set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
    elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
     set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
@@ -1198,7 +1207,7 @@
  if( NOT ANDROID_COMPILER_IS_CLANG )
   set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" )
  endif()
-elseif( ARMEABI OR ARMEABI_V7A)
+elseif( ARMEABI OR ARMEABI_V7A OR ARMEABI_V7A_HARD)
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
  if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 )
   set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" )
@@ -1245,7 +1254,16 @@
 endif()

 # ABI-specific flags
-if( ARMEABI_V7A )
+if( ARMEABI_V7A_HARD )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=hard -mhard-float -D_NDK_MATH_NO_SOFTFP=1" )
+ if( NEON )
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" )
+ elseif( VFPV3 )
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3" )
+ else()
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" )
+ endif()
+elseif( ARMEABI_V7A )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp" )
  if( NEON )
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" )
@@ -1254,6 +1272,7 @@
  else()
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" )
  endif()
+
 elseif( ARMEABI_V6 )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2
 elseif( ARMEABI )
@@ -1330,6 +1349,10 @@
  set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--fix-cortex-a8" )
 endif()

+if( ARMEABI_V7A_HARD )
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-warn-mismatch -lm_hard" )
+endif()
+
 if( ANDROID_NO_UNDEFINED )
  if( MIPS )
   # there is some sysroot-related problem in mips linker...
@@ -1351,7 +1374,7 @@
 endif()

 if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" )
- if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE_NUM GREATER 8002) AND (ARMEABI OR ARMEABI_V7A OR X86) )
+ if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE_NUM GREATER 8002) AND (ARMEABI OR ARMEABI_V7A OR ARMEABI_V7A_HARD OR X86) )
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" )
  elseif( ANDROID_NDK_RELEASE_NUM GREATER 8002 ) # after r8b
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" )
@@ -1626,7 +1649,7 @@

 # Variables controlling behavior or set by cmake toolchain:
-#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips", "arm64-v8a", "x86_64", "mips64"
+#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a-hard with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips", "arm64-v8a", "x86_64", "mips64"
 #   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14,15,16,17,18,19,21 (depends on NDK version)
 #   ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
 #   ANDROID_FORBID_SYGWIN : ON/OFF
@@ -1653,6 +1676,7 @@
 #   ARMEABI : TRUE for arm v6 and older devices
 #   ARMEABI_V6 : TRUE for arm v6
 #   ARMEABI_V7A : TRUE for arm v7a
+#   ARMEABI_V7A_HARD : TRUE for arm v7a with hardfp
 #   ARM64_V8A : TRUE for arm64-v8a
 #   NEON : TRUE if NEON unit is enabled
 #   VFPV3 : TRUE if VFP version 3 is enabled
@@ -1663,7 +1687,7 @@
 #   BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
-#   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
+#   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "armeabi-v7a-hard", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
 #   ANDROID_NDK_RELEASE : from r5 to r10d; set only for NDK
 #   ANDROID_NDK_RELEASE_NUM : numeric ANDROID_NDK_RELEASE version (1000*major+minor)
 #   ANDROID_ARCH_NAME : "arm", "x86", "mips", "arm64", "x86_64", "mips64" depending on ANDROID_ABI


Remove old FindOpenCascade.cmake

Remove old FindOpenCascade.cmake

Former-commit-id: 67eabdf86cfcafd597d89bb21b09b0c7444d7e54

--- cmake/Modules/FindOpenCascade.cmake
+++ cmake/Modules/FindOpenCascade.cmake
@@ -1,35 +0,0 @@
-# - Find OpenCascade
-# Find the OpenCascade headers and libraries.
-#
-#  OPENCASCADE_INCLUDE_DIR -  where to find BRep_Toolbox.hxx, etc.
-#  OPENCASCADE_LIBRARIES_DIR - where to find all the libraries
-#  OPENCASCADE_FOUND        - True if OpenCascade found.
-
-if(WIN32)
-    find_path(OPENCASCADE_INCLUDE_DIR BRep_Tool.hxx
-        PATHS ${SOFA_EXTLIBS_DIR}/OpenCASCADE*/ros/inc )
-    find_path(OPENCASCADE_LIBRARIES_DIR TKBRep.lib
-        PATHS ${SOFA_EXTLIBS_DIR}/OpenCASCADE*/ros/win32/vc9/lib )
-else()
-    # Search standard locations
-    find_path(OPENCASCADE_INCLUDE_DIR BRep_Tool.hxx PATH_SUFFIXES oce opencascade)
-    find_library(OPENCASCADE_LIBRARIES TKBRep)
-    mark_as_advanced(OPENCASCADE_LIBRARIES)
-    get_filename_component(OPENCASCADE_LIBRARIES_DIR ${OPENCASCADE_LIBRARIES} PATH)
-endif()
-mark_as_advanced(OPENCASCADE_INCLUDE_DIR)
-mark_as_advanced(OPENCASCADE_LIBRARIES_DIR)
-
-if(OPENCASCADE_INCLUDE_DIR AND OPENCASCADE_LIBRARIES_DIR)
-    set(OPENCASCADE_FOUND 1)
-endif()
-
-# Report the results.
-if(NOT OPENCASCADE_FOUND)
-    set(msg "Unable to find OpenCascade.")
-    if(OpenCascade_FIND_REQUIRED)
-        message(FATAL_ERROR "${msg}")
-    else()
-        message("${msg}")
-    endif()
-endif()


Add 'clean up done' message

Add 'clean up done' message

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -437,5 +437,7 @@
     file(REMOVE_RECURSE "${HUNTER_PACKAGE_INSTALL_PREFIX}")
   endif()

+  hunter_status_debug("Clean up done")
+
   file(WRITE "${HUNTER_PACKAGE_DONE_STAMP}" "")
 endfunction()


[cmake] add ONLY field to most compile_with

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -6,8 +6,8 @@

 # --- Blas Lapack ---
 # include(BlasLapackSetup)
-compile_with(BLAS REQUIRED)
-compile_with(LAPACK REQUIRED)
+compile_with(BLAS REQUIRED ONLY numerics externals)
+compile_with(LAPACK REQUIRED ONLY numerics externals)
 if(NOT BLAS_INCLUDE_DIRS)
   message(FATAL_ERROR "cannot find blas include directories")
 endif()
@@ -16,12 +16,12 @@
 endif()

 # --- Numerics optional dependencies ---
-compile_with(MlcpSimplex)
+compile_with(MlcpSimplex ONLY numerics)
 compile_with(Pthread)
 IF(GAMS_DIR)
   SET(GAMS_C_API_FIND_REQUIRED TRUE)
 ENDIF(GAMS_DIR)
-COMPILE_WITH(GamsCApi)
+COMPILE_WITH(GamsCApi ONLY numerics)
 IF(GAMSCAPI_FOUND)
   # needed for siconosconfig.h
   IF(NOT GAMS_DIR)
@@ -48,9 +48,9 @@
   set(USE_SYSTEM_SUITESPARSE ${_sys_CXSparse} CACHE INTERNAL "flag to check to systemwide SuiteSparse install")
 endif()

-compile_with(PathFerris)
-compile_with(PathVI)
-compile_with(LpSolve)
+compile_with(PathFerris ONLY numerics)
+compile_with(PathVI ONLY numerics)
+compile_with(LpSolve ONLY numerics)
 if(LpSolve_FOUND)
   set(HAS_ONE_LP_SOLVER TRUE)
   set(HAS_EXTREME_POINT_ALGO TRUE)
@@ -60,7 +60,7 @@
 # --- Mumps ---
 if(WITH_MUMPS)
   if(NOT IDONTWANTMPI)
-    compile_with(MPI REQUIRED)
+    compile_with(MPI REQUIRED ONLY numerics)
   endif(NOT IDONTWANTMPI)
   if(MPI_FOUND)
     set(HAVE_MPI TRUE)
@@ -70,12 +70,12 @@
       get_filename_component(MUMPS_LIBRARY_DIRECTORY "${MPI_LIBRARY}" PATH)
     endif()
   endif()
-  compile_with(MUMPS REQUIRED)
+  compile_with(MUMPS REQUIRED ONLY numerics)
 endif()

 # --- UMFPACK ---
 if(WITH_UMFPACK)
-  compile_with(Umfpack REQUIRED)
+  compile_with(Umfpack REQUIRED ONLY numerics)
 endif()

 # --- SUPERLU ---
@@ -84,30 +84,30 @@
 ENDIF()

 if(WITH_SUPERLU)
-  compile_with(SuperLU REQUIRED)
+  compile_with(SuperLU REQUIRED ONLY numerics)
 endif()

 if(WITH_SUPERLU_MT)
-  compile_with(SuperLU_MT REQUIRED)
+  compile_with(SuperLU_MT REQUIRED ONLY numerics)
 endif()

 # not ready yet
 #if(WITH_SUPERLU_dist)
-#  compile_with(SuperLU_dist REQUIRED)
+#  compile_with(SuperLU_dist REQUIRED ONLY numerics)
 #endif()

 # --- Fclib ---
 IF(WITH_FCLIB)
-  COMPILE_WITH(FCLIB REQUIRED)
+  COMPILE_WITH(FCLIB REQUIRED ONLY numerics)
   IF(FCLib_FCLIB_HEADER_ONLY)
-    COMPILE_WITH(HDF5 REQUIRED COMPONENTS C HL)
+    COMPILE_WITH(HDF5 REQUIRED ONLY numerics COMPONENTS C HL)
   ELSE()
     APPEND_C_FLAGS("-DFCLIB_NOT_HEADER_ONLY")
 ENDIF()
   IF(FCLIB_NOTFOUND)
     # try the package stuff
     # need FCLib_DIR !!
-    COMPILE_WITH(FCLib 1.0 REQUIRED)
+    COMPILE_WITH(FCLib 1.0 REQUIRED ONLY numerics)
   ENDIF()
 ENDIF()

@@ -178,7 +178,8 @@
     # try to find OpenCascade files.
     message(STATUS "OCE not found.  Try to find OpenCascade files.")
     FIND_PACKAGE(OpenCASCADE REQUIRED COMPONENTS ${OCE_TOOLKITS})
-    COMPILE_WITH(OpenCASCADE)
+    COMPILE_WITH(OpenCASCADE ONLY mechanics)
+
     IF(OpenCASCADE_FOUND)
       message(STATUS "OpenCASCADE_INCLUDE_DIR = " ${OpenCASCADE_INCLUDE_DIR})
       message(STATUS "OpenCASCADE_LIBRARIES = " ${OpenCASCADE_LIBRARIES})
@@ -210,7 +211,7 @@

 # -- VTK --
 IF(WITH_VTK)
-  COMPILE_WITH(VTK)
+  COMPILE_WITH(VTK ONLY mechanics)
   IF(VTK_FOUND)
     MESSAGE(STATUS "Found vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
     SET(SICONOS_HAVE_VTK TRUE)
@@ -223,14 +224,14 @@
 # -- FreeCAD --
 # For python bindings
 if(WITH_FREECAD)
-  compile_with(FreeCAD COMPONENTS Part REQUIRED)
+  compile_with(FreeCAD COMPONENTS Part REQUIRED ONLY mechanics)
 endif()

 # -- HDF5 --
 # For logging in Numerics
 IF(WITH_HDF5)
-  COMPILE_WITH(HDF5 REQUIRED COMPONENTS C HL)
+  COMPILE_WITH(HDF5 REQUIRED ONLY numerics COMPONENTS C HL)
 ENDIF(WITH_HDF5)

 #
@@ -238,7 +239,7 @@
 #
 include(serialization_vector_test)
 if(WITH_SERIALIZATION)
-  COMPILE_WITH(Boost 1.47 COMPONENTS serialization filesystem REQUIRED)
+  COMPILE_WITH(Boost 1.47 ONLY io COMPONENTS serialization filesystem REQUIRED)
   if (Boost_VERSION GREATER 106100)
     # If boost is recent enough, prefer system boost serialization to
     # the one included in "externals/boost_serialization".


[cmake] make boost serialization a global link dependency

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -256,8 +256,7 @@
 include(serialization_vector_test)
 if(WITH_SERIALIZATION)
   COMPILE_WITH(Boost 1.47
-    COMPONENTS serialization filesystem REQUIRED
-    SICONOS_COMPONENTS io)
+    COMPONENTS serialization filesystem REQUIRED)
   if (Boost_VERSION GREATER 106100)
     # If boost is recent enough, prefer system boost serialization to
     # the one included in "externals/boost_serialization".


cmake: Preparation for SDK 0.12 and SPARC

Zephyr SDK version 0.12 is distributed with SPARC cmake target support,
while version 0.11.3 and 0.11.4 need target.cmake from the Zephyr repo.

This commit has been tested with:
- zephyr-sdk-0.11.3 (currently used in CI)
- zephyr-sdk-0.11.4
- zephyr-sdk-0.12.0-beta-2

This commit is expected to be compatible with
- zephyr-sdk-0.12.0 (not yet released)

Signed-off-by: Martin Åberg <37424e7fbe3f8590d57db5ed6ae5b8866742b6be@gaisler.com>

--- cmake/toolchain/zephyr/target.cmake
+++ cmake/toolchain/zephyr/target.cmake
@@ -4,8 +4,8 @@
   # For backward compatibility with 0.11.1 and 0.11.2
   # we need to source files from Zephyr repo
   include(${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR}/target.cmake)
-elseif("${ARCH}" STREQUAL "sparc")
-  # SDK 0.11.3, 0.11.4 and 0.12.0-beta-1 does not have SPARC target support.
+elseif(("${ARCH}" STREQUAL "sparc") AND (${SDK_VERSION} VERSION_LESS 0.12))
+  # SDK 0.11.3, 0.11.4 does not have SPARC target support.
   include(${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR}/target.cmake)
 else()
   include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake)


Moved reading flags.cmake after declaring target to be able to add link libraries

--- cmake_modules/CMakeRunTargets.cmake
+++ cmake_modules/CMakeRunTargets.cmake
@@ -26,11 +26,11 @@

 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/bin)

+add_executable("${APP_NAME}" EXCLUDE_FROM_ALL ${ALLOPROJECT_APP_SRC})
+
 if(EXISTS "${SOURCE_DIR}/flags.cmake")
     include("${SOURCE_DIR}/flags.cmake")
 endif()
-
-add_executable("${APP_NAME}" EXCLUDE_FROM_ALL ${ALLOPROJECT_APP_SRC})

 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   set_target_properties(${APP_NAME} PROPERTIES


Fix build error when path of repo contains .h/.inc (#9703)

--- build_tools/cmake/external_cc_library.cmake
+++ build_tools/cmake/external_cc_library.cmake
@@ -94,7 +94,7 @@
   # use list(FILTER...)
   set(_CC_SRCS "${_RULE_SRCS}")
   foreach(_SRC_FILE IN LISTS _CC_SRCS)
-    if(${_SRC_FILE} MATCHES ".*\\.(h|inc)")
+    if(${_SRC_FILE} MATCHES ".*\\.(h|inc)$")
       list(REMOVE_ITEM _CC_SRCS "${_SRC_FILE}")
     endif()
   endforeach()


ARROW-1129: [C++] Fix gflags issue in Linux/macOS toolchain builds

Minor regression introduced in #759

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #763 from wesm/ARROW-1129 and squashes the following commits:

afc4bb6 [Wes McKinney] Fix gflags library name being searched for in toolchain builds on Linux/macOS

--- cpp/cmake_modules/FindGFlags.cmake
+++ cpp/cmake_modules/FindGFlags.cmake
@@ -33,6 +33,12 @@
   set(GFLAGS_MSVC_STATIC_LIB_SUFFIX "_static")
 endif()

+set(GFLAGS_STATIC_LIB_SUFFIX
+  "${GFLAGS_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+
+set(GFLAGS_STATIC_LIB_NAME
+  ${CMAKE_STATIC_LIBRARY_PREFIX}gflags${GFLAGS_STATIC_LIB_SUFFIX})
+
 if ( _gflags_roots )
   find_path(GFLAGS_INCLUDE_DIR NAMES gflags/gflags.h
     PATHS ${_gflags_roots}
@@ -42,7 +48,7 @@
     PATHS ${_gflags_roots}
     NO_DEFAULT_PATH
     PATH_SUFFIXES "lib" )
-  find_library(GFLAGS_STATIC_LIB NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}gflags${GFLAGS_MSVC_STATIC_LIB_SUFFIX}
+  find_library(GFLAGS_STATIC_LIB NAMES ${GFLAGS_STATIC_LIB_NAME}
     PATHS ${_gflags_roots}
     NO_DEFAULT_PATH
     PATH_SUFFIXES "lib" )
@@ -54,7 +60,7 @@
   find_library(GFLAGS_SHARED_LIB gflags
     NO_CMAKE_SYSTEM_PATH
     NO_SYSTEM_ENVIRONMENT_PATH)
-  find_library(GFLAGS_STATIC_LIB ${CMAKE_STATIC_LIBRARY_PREFIX}gflags${GFLAGS_MSVC_STATIC_LIB_SUFFIX}
+  find_library(GFLAGS_STATIC_LIB ${GFLAGS_STATIC_LIB_NAME}
     NO_CMAKE_SYSTEM_PATH
     NO_SYSTEM_ENVIRONMENT_PATH)
 endif()


Add back the check for versioning directly on a tag (removed by mistake).

--- cmake/CSEVersion.cmake
+++ cmake/CSEVersion.cmake
@@ -81,7 +81,11 @@
   set(GIT_STATUS ".dirty")
 endif()

-set(CSEVRSN_META "+${GIT_BRANCH}.${GIT_SHA}.${GIT_BUILD}${GIT_STATUS}")
+if(NOT ${GIT_BUILD} MATCHES "^0$")
+  set(CSEVRSN_META "+${GIT_BRANCH}.${GIT_SHA}.${GIT_BUILD}${GIT_STATUS}")
+else()
+  set(CSEVRSN_META "")
+endif()

 message("Building CSE ${CSEVRSN_MAJOR}.${CSEVRSN_MINOR}.${CSEVRSN_PATCH}${CSEVRSN_PRERELEASE}${CSEVRSN_META}")


Make sure to find LuaJIT and not LUA

Make sure to find LuaJIT and not LUA

--- cmake/FindLuaJIT.cmake
+++ cmake/FindLuaJIT.cmake
@@ -28,7 +28,7 @@
 # 2010 - modified for cronkite to find luajit instead of lua, as it was before.
 #

-FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
+FIND_PATH(LUAJIT_INCLUDE_DIR luajit.h lua.hpp
   HINTS
   $ENV{LUAJIT_DIR}
   ${LUAJIT_DIR}


cmake: Fix 'run' command of native_posix

The 'run' target was missing it's dependency on the executable and
thereby behaving incorrectly.

This fixes #10639 .

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/emu/native.cmake
+++ cmake/emu/native.cmake
@@ -1,6 +1,7 @@
 add_custom_target(run
   COMMAND
   ${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_EXE_NAME}
+  DEPENDS ${logical_target_for_zephyr_elf}
   WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
   USES_TERMINAL
   )


Fix one issue recently reported by Phil Rosenberg; -DENABLE_qt=OFF now
skips everything to do with Qt detection.

svn path=/trunk/; revision=12854

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -69,54 +69,6 @@
   endif(NOT CMAKE_CXX_COMPILER_WORKS)
 endif(ANY_QT_DEVICE)

-if(ANY_QT_DEVICE)
-  # Use a minimum version corresponding to the version installed by
-  # Debian Wheezy.  I assume all other non-enterprise Linux distros
-  # have this version of Qt4 or later.
-  find_package(Qt4 4.8.2 REQUIRED QtCore QtGui QtSvg)
-
-  # QT4_FOUND is defined to be true or false by find_package(Qt4 ...)
-  if(QT4_FOUND)
-    # Do not include(${QT_USE_FILE}) here because it contaminates ALL
-    # compile properties with Qt flags from (this) top-level directory
-    # on down.  Use this alternative instead which includes a function
-    # set_qt_target_properties which should be called with the
-    # appropriate target argument whenever a Qt4-related target is built.
-    include(ndp_UseQt4)
-
-    # QT_COMPILE_DEFINITIONS (used only for pc_qt_COMPILE_FLAGS below),
-    # QT_INCLUDE_DIRECTORIES (used only for pc_qt_COMPILE_FLAGS below),
-    # NP_COMPILE_DEFINITIONS (used only in set_qt_properties function),
-    # NP_QT_INCLUDE_DIRECTORIES (used only in set_qt_properties function), and
-    # QT_LIBRARIES (used wherever link with qt libraries is needed)
-    # are now defined.
-
-    # Only used for pkg-config case.
-    set(pc_qt_COMPILE_FLAGS ${QT_COMPILE_DEFINES} ${QT_INCLUDE_DIRECTORIES})
-    string(REGEX REPLACE ";" " " pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}")
-    # Work around pkg-config issues (see bug report
-    # <https://bugs.freedesktop.org/show_bug.cgi?id=72584>) with
-    # multiple -isystem tags by replacing them with "-I"
-    string(REGEX REPLACE "-isystem " "-I" pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}")
-    message(STATUS "pc_qt_COMPILE_FLAGS = ${pc_qt_COMPILE_FLAGS}")
-
-    # These two must be explicitly empty since other alternative means
-    # are used.
-    set(qt_COMPILE_FLAGS)
-    set(qt_LINK_FLAGS)
-
-    # ${QT_LIBRARY_DIR} defined by above find_package(Qt4 ...) call.
-    set(qt_RPATH ${QT_LIBRARY_DIR})
-    filter_rpath(qt_RPATH)
-    #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}")
-  else(QT4_FOUND)
-    message(STATUS "WARNING: Qt4 development environment not found so "
-      "disabling all qt devices."
-      )
-    set(ANY_QT_DEVICE OFF)
-  endif(QT4_FOUND)
-endif(ANY_QT_DEVICE)
-
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_qt "Enable Qt bindings" OFF)
   option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF)
@@ -160,6 +112,54 @@
     set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE)
     set(PLD_memqt OFF CACHE BOOL "Enable Qt mem device" FORCE)
 endif(NOT ANY_QT_DEVICE)
+
+if(ANY_QT_DEVICE)
+  # Use a minimum version corresponding to the version installed by
+  # Debian Wheezy.  I assume all other non-enterprise Linux distros
+  # have this version of Qt4 or later.
+  find_package(Qt4 4.8.2 REQUIRED QtCore QtGui QtSvg)
+
+  # QT4_FOUND is defined to be true or false by find_package(Qt4 ...)
+  if(QT4_FOUND)
+    # Do not include(${QT_USE_FILE}) here because it contaminates ALL
+    # compile properties with Qt flags from (this) top-level directory
+    # on down.  Use this alternative instead which includes a function
+    # set_qt_target_properties which should be called with the
+    # appropriate target argument whenever a Qt4-related target is built.
+    include(ndp_UseQt4)
+
+    # QT_COMPILE_DEFINITIONS (used only for pc_qt_COMPILE_FLAGS below),
+    # QT_INCLUDE_DIRECTORIES (used only for pc_qt_COMPILE_FLAGS below),
+    # NP_COMPILE_DEFINITIONS (used only in set_qt_properties function),
+    # NP_QT_INCLUDE_DIRECTORIES (used only in set_qt_properties function), and
+    # QT_LIBRARIES (used wherever link with qt libraries is needed)
+    # are now defined.
+
+    # Only used for pkg-config case.
+    set(pc_qt_COMPILE_FLAGS ${QT_COMPILE_DEFINES} ${QT_INCLUDE_DIRECTORIES})
+    string(REGEX REPLACE ";" " " pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}")
+    # Work around pkg-config issues (see bug report
+    # <https://bugs.freedesktop.org/show_bug.cgi?id=72584>) with
+    # multiple -isystem tags by replacing them with "-I"
+    string(REGEX REPLACE "-isystem " "-I" pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}")
+    message(STATUS "pc_qt_COMPILE_FLAGS = ${pc_qt_COMPILE_FLAGS}")
+
+    # These two must be explicitly empty since other alternative means
+    # are used.
+    set(qt_COMPILE_FLAGS)
+    set(qt_LINK_FLAGS)
+
+    # ${QT_LIBRARY_DIR} defined by above find_package(Qt4 ...) call.
+    set(qt_RPATH ${QT_LIBRARY_DIR})
+    filter_rpath(qt_RPATH)
+    #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}")
+  else(QT4_FOUND)
+    message(STATUS "WARNING: Qt4 development environment not found so "
+      "disabling all qt devices."
+      )
+    set(ANY_QT_DEVICE OFF)
+  endif(QT4_FOUND)
+endif(ANY_QT_DEVICE)

 if(ENABLE_pyqt4 AND NOT ENABLE_python)
   message(STATUS


optional GMP

optional GMP

--- cmake/unit-tests.cmake
+++ cmake/unit-tests.cmake
@@ -1,16 +1,11 @@
 find_package(Boost COMPONENTS system filesystem unit_test_framework random REQUIRED)
+find_package(GMP)

 file(GLOB TEST_SOURCES
     "test/*.cpp"
 )

-find_library(GMP_LIBRARY gmp)

-IF(GMP_LIBRARY)
-    MESSAGE(STATUS "gmp library - found")
-ELSE(GMP_LIBRARY)
-    MESSAGE(FATAL_ERROR "gmp library - not found")
-ENDIF(GMP_LIBRARY)

 include_directories(${Boost_INCLUDE_DIRS} ${CRYPTOPP_INCLUDE_DIR} ${JSONCPP_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include)
@@ -18,4 +13,8 @@
 add_executable(ethkey-tests ${TEST_SOURCES})
 add_dependencies(ethkey-tests ethkey)

-target_link_libraries(ethkey-tests ethkey ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_RANDOM_LIBRARY} ${CRYPTOPP_LIBRARY} ${GMP_LIBRARY} ${JSONCPP_LIBRARY})
+target_link_libraries(ethkey-tests ethkey ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_RANDOM_LIBRARY} ${CRYPTOPP_LIBRARY}  ${JSONCPP_LIBRARY})
+
+if(GMP_LIBRARIES)
+    target_link_libraries(ethkey-tests ${GMP_LIBRARIES})
+endif()


Update FW: fix OV9782 bayer order

Update FW: fix OV9782 bayer order

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "c2bf875327990b95a84aaa0e5d5fe05fa68e0592")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "faf65d29a955cf5b375826437468db0dc33d0fb5")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW/mdk - Optimizing the confidence map alignment(CleanUp - remove global variables)

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "e21bfb96a88d244757aa113ebaf039fa28f3eec5")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "3aef66802d697e1f5b3c77830455379e46d9d426")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Allow using AR0234/OV5645 (but at degraded image quality) with other sensors enabled at the same time

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "b037f059199f80493e3e081aab4220a5222e218a")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "e3baa61d440ca6964dc74768140971aac5dc7fca")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Fix win32 builds.

Fix win32 builds.

git-svn-id: b1dee0d48e635e16c3b356ce77271b225d4db9f7@286 7dcaeef0-15fb-0310-b436-a5af3365683c

--- cmake/Modules/DefineInstallationPaths.cmake
+++ cmake/Modules/DefineInstallationPaths.cmake
@@ -94,13 +94,14 @@

 if (WIN32)
   # Same same
-  SET(BIN_INSTALL_DIR .)
-  SET(SBIN_INSTALL_DIR .)
-  SET(LIB_INSTALL_DIR .)
-  SET(PLUGIN_INSTALL_DIR plugins)
-  SET(HTML_INSTALL_DIR doc/HTML)
-  SET(ICON_INSTALL_DIR .)
-  SET(SOUND_INSTALL_DIR .)
-  SET(LOCALE_INSTALL_DIR lang)
+  set(BIN_INSTALL_DIR "." CACHE PATH "-")
+  set(SBIN_INSTALL_DIR "." CACHE PATH "-")
+  set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
+  set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
+  set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
+  set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
+  set(ICON_INSTALL_DIR "." CACHE PATH "-")
+  set(SOUND_INSTALL_DIR "." CACHE PATH "-")
+  set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
 endif (WIN32)


Remove ctags. It was a dead end. We will go for fwd decls instead.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -733,7 +733,6 @@
   set(CLING_LIBRARIES ${BINARY_DIR}/lib/libclingInterpreter.a
                       ${BINARY_DIR}/lib/libclingMetaProcessor.a
                       ${BINARY_DIR}/lib/libclingUtils.a
-                      ${BINARY_DIR}/lib/libclingCtagsExtension.a
                       ${LLVM_LIBRARIES})
   #--Additional flags obtained from llvm-config --cxxflags
   set(CLING_CXXFLAGS "-fvisibility-inlines-hidden -fno-strict-aliasing -Wno-unused-parameter -Wwrite-strings -Wno-long-long -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS")


Update builtin version of Vc to 1.4.1

Update builtin version of Vc to 1.4.1

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1303,7 +1303,7 @@
 endif()

 if(vc AND NOT Vc_FOUND)
-  set(Vc_VERSION "1.4.0")
+  set(Vc_VERSION "1.4.1")
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
   set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/externals")
@@ -1313,7 +1313,7 @@

   ExternalProject_Add(VC
     URL     ${Vc_SRC_URI}
-    URL_HASH SHA256=e6cfc056eb3a72a57751e768ba63236ebf2711d267fbd1dc0acfee0ac16fdf68
+    URL_HASH SHA256=68e609a735326dc3625e98bd85258e1329fb2a26ce17f32c432723b750a4119f
     BUILD_IN_SOURCE 0
     BUILD_BYPRODUCTS ${Vc_LIBRARY}
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1


LLVM_BUILD_TYPE=Debug now enables assertions.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -626,6 +626,12 @@
   if(NOT DEFINED LLVM_BUILD_TYPE)
     set(LLVM_BUILD_TYPE Release)
   endif()
+  if(LLVM_BUILD_TYPE STREQUAL "Debug")
+    set(LLVM_ENABLE_ASSERTIONS "YES")
+  else()
+    set(LLVM_ENABLE_ASSERTIONS "NO")
+  endif()
+
   if(builtin_llvm)
     set(LLVM_SOURCE_DIR ${CMAKE_SOURCE_DIR}/interpreter/llvm/src)
     set(LLVM_INSTALL_DIR ${CMAKE_BINARY_DIR}/LLVM-install)
@@ -640,6 +646,7 @@
                  -DLLVM_TARGETS_TO_BUILD=X86
                  -DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON
                  -DCMAKE_BUILD_TYPE=${LLVM_BUILD_TYPE}
+                 -DLLVM_ENABLE_ASSERTIONS=${LLVM_ENABLE_ASSERTIONS}
                  -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                  -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                  -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
@@ -723,6 +730,7 @@
                -DCLING_PATH_TO_LLVM_BUILD=${CMAKE_BINARY_DIR}/LLVM-install
                -DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON
                -DCMAKE_BUILD_TYPE=${LLVM_BUILD_TYPE}
+               -DLLVM_ENABLE_ASSERTIONS=${LLVM_ENABLE_ASSERTIONS}
                -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}


ARROW-6708: [C++] Fix hardcoded boost library names

In the case where `find_package(Boost ...)` succeeded, just use whatever it gave us.

Closes #5510 from pitrou/ARROW-6708-boost-library-static and squashes the following commits:

da8d28a30 <Antoine Pitrou> ARROW-6708:  Fix hardcoded boost library names

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -641,6 +641,10 @@
   set(BOOST_SYSTEM_LIBRARY Boost::system)
   set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem)
   set(BOOST_REGEX_LIBRARY Boost::regex)
+elseif(BoostAlt_FOUND)
+  set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY})
+  set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY})
+  set(BOOST_REGEX_LIBRARY ${Boost_REGEX_LIBRARY})
 else()
   set(BOOST_SYSTEM_LIBRARY boost_system_static)
   set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_static)
@@ -648,8 +652,8 @@
 endif()
 set(ARROW_BOOST_LIBS ${BOOST_SYSTEM_LIBRARY} ${BOOST_FILESYSTEM_LIBRARY})

-message(STATUS "Boost include dir: " ${Boost_INCLUDE_DIR})
-message(STATUS "Boost libraries: " ${Boost_LIBRARIES})
+message(STATUS "Boost include dir: ${Boost_INCLUDE_DIR}")
+message(STATUS "Boost libraries: ${ARROW_BOOST_LIBS}")

 include_directories(SYSTEM ${Boost_INCLUDE_DIR})


ARROW-16936: [C++] Update gRPC absl static dependencies (#13486)

Authored-by: Will Jones <657f960c862bff0a29dc3b2fdf81dc9f19866f2e@gmail.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -3737,30 +3737,60 @@
                                    INTERFACE_INCLUDE_DIRECTORIES "${GRPC_INCLUDE_DIR}")

   set(GRPC_GPR_ABSL_LIBRARIES
+      # We need a flattened list of Abseil libraries for the static linking case,
+      # because our method for creating arrow_bundled_dependencies.a doesn't walk
+      # the dependency tree of targets.
+      #
+      # This list should be updated when we change Abseil / gRPC versions. It can
+      # be generated with:
+      # pkg-config --libs --static grpc \
+      #   | tr " " "\n" \
+      #   | grep ^-labsl_ \
+      #   | sed 's/^-labsl_/absl::/'
+      absl::raw_hash_set
+      absl::hashtablez_sampler
+      absl::hash
+      absl::city
+      absl::low_level_hash
+      absl::random_distributions
+      absl::random_seed_sequences
+      absl::random_internal_pool_urbg
+      absl::random_internal_randen
+      absl::random_internal_randen_hwaes
+      absl::random_internal_randen_hwaes_impl
+      absl::random_internal_randen_slow
+      absl::random_internal_platform
+      absl::random_internal_seed_material
+      absl::random_seed_gen_exception
+      absl::statusor
+      absl::status
+      absl::cord
+      absl::cordz_info
+      absl::cord_internal
+      absl::cordz_functions
+      absl::exponential_biased
+      absl::cordz_handle
       absl::bad_optional_access
-      absl::base
-      absl::cord
+      absl::str_format_internal
+      absl::synchronization
+      absl::graphcycles_internal
+      absl::stacktrace
+      absl::symbolize
       absl::debugging_internal
       absl::demangle_internal
-      absl::graphcycles_internal
-      absl::hash
-      absl::int128
       absl::malloc_internal
-      absl::random_internal_pool_urbg
-      absl::random_internal_randen
-      absl::raw_logging_internal
-      absl::spinlock_wait
-      absl::stacktrace
-      absl::status
-      absl::statusor
+      absl::time
+      absl::civil_time
       absl::strings
       absl::strings_internal
-      absl::str_format_internal
-      absl::symbolize
-      absl::synchronization
+      absl::base
+      absl::spinlock_wait
+      absl::int128
       absl::throw_delegate
-      absl::time
-      absl::time_zone)
+      absl::time_zone
+      absl::bad_variant_access
+      absl::raw_logging_internal
+      absl::log_severity)

   add_library(gRPC::gpr STATIC IMPORTED)
   set_target_properties(gRPC::gpr


ARROW-3492: [C++] Build jemalloc in parallel

Author: Antoine Pitrou <antoine@python.org>

Closes #2745 from pitrou/ARROW-3492-jemalloc-parallel-build and squashes the following commits:

2c000040 <Antoine Pitrou> ARROW-3492:  Build jemalloc in parallel

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -737,7 +737,7 @@
     CONFIGURE_COMMAND ./autogen.sh "--prefix=${JEMALLOC_PREFIX}" "--with-jemalloc-prefix=je_arrow_" "--with-private-namespace=je_arrow_private_" "--disable-tls"
     ${EP_LOG_OPTIONS}
     BUILD_IN_SOURCE 1
-    BUILD_COMMAND ${MAKE}
+    BUILD_COMMAND ${MAKE} -j
     BUILD_BYPRODUCTS "${JEMALLOC_STATIC_LIB}" "${JEMALLOC_SHARED_LIB}"
     INSTALL_COMMAND ${MAKE} -j1 install)


BUG: Bump TubeTK to isolate wrapping on vtk-dependent classes

Disable wrapping of classes that depend on VTK, if TubeTK_USE_VTK is
not set to True.

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -49,5 +49,5 @@
 "
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG "c5df267f34bd8f8bb4e933c4f3a3c92b53e7a3f5"
+  GIT_TAG "35126d4d091c2b17d772461f4bae0bdd1c04f9ac"
   )


`CMAKE_C_FLAGS` & `CMAKE_SHARED_LIBRARY_LINK_C_FLAGS`: removed flags.

Removed unnecessary compile flags from `CMAKE_C_FLAGS` and
`CMAKE_SHARED_LIBRARY_LINK_C_FLAGS`.

	modified:   w64.cmake

--- w64.cmake
+++ w64.cmake
@@ -22,6 +22,6 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

 set(CMAKE_CXX_FLAGS "-std=c++11 -DSFML_STATIC -DSFML_STATIC_LIBRARIES -DSFML_USE_STATIC_STD_LIBS -static -static-libgcc -static-libstdc++ -lpthread -O3 -s")
-set(CMAKE_C_FLAGS "-DSFML_STATIC -DSFML_STATIC_LIBRARIES -DSFML_USE_STATIC_STD_LIBS -static -static-libgcc -static-libstdc++ -lpthread -O3 -s")
-set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-DSFML_STATIC -DSFML_STATIC_LIBRARIES -DSFML_USE_STATIC_STD_LIBS -static -static-libgcc -static-libstdc++ -lpthread -O3 -s")
+set(CMAKE_C_FLAGS "-static-libgcc -static-libstdc++ -O3 -s")
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-static -static-libgcc -static-libstdc++ -O3 -s")
 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-DSFML_STATIC -DSFML_STATIC_LIBRARIES -DSFML_USE_STATIC_STD_LIBS -static -std=c++11 -static-libgcc -static-libstdc++ -lpthread -O3 -s")


Use plain text COPYRIGHT file in the installers.

--- cmake/BALLPackageConfig.cmake
+++ cmake/BALLPackageConfig.cmake
@@ -7,7 +7,7 @@
 SET(CPACK_PACKAGE_VERSION_PATCH "${BALL_PACKAGE_VERSION_PATCH}")
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "BALL-${CPACK_PACKAGE_VERSION}")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/cmake/installer/Welcome.rtf")
-SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/cmake/installer/License.rtf")
+SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/source/COPYRIGHT")
 SET(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/cmake/installer/Welcome.rtf")

 IF (WIN32 AND NOT UNIX)


Fix Bullet library order for Linux.

Fix Bullet library order for Linux.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -49,8 +49,8 @@
         set(BULLET_INCLUDE_DIRS ${BULLET_HOME}/include/bullet)
     endif()
     set(BULLET_LIBRARY_DIRS ${BULLET_HOME}/lib)
-    set(BULLET_LIBRARIES BulletCollision BulletDynamics LinearMath)
+    set(BULLET_LIBRARIES BulletDynamics BulletCollision LinearMath)
     if (WIN32)
-        set(BULLET_DEBUG_LIBRARIES BulletCollision_d BulletDynamics_d LinearMath_d)
+        set(BULLET_DEBUG_LIBRARIES BulletDynamics_d BulletCollision_d LinearMath_d)
     endif()
-endmacro (configure_bullet)+endmacro (configure_bullet)