Add hard-float architecture verification.

--- build/cmake/Package/deb-common.cmake
+++ build/cmake/Package/deb-common.cmake
@@ -11,6 +11,50 @@
 elseif((${BUILD_ARCH} MATCHES "x86_64"))
     set(BUILD_PACKAGE_ARCHITECTURE "amd64")
 endif()
+MESSAGE("Package architecture: ${BUILD_PACKAGE_ARCHITECTURE} [${BUILD_ARCH}]")
+
+# detect hard-float architecture
+function(check_target_architecture_hf output_var)
+    set(${output_var} FALSE PARENT_SCOPE)
+    set(C_FILE_NAME "${CMAKE_BINARY_DIR}/check_target_architecture_hf.c")
+    set(BIN_FILE_NAME "${CMAKE_BINARY_DIR}/check_target_architecture_hf")
+    set(ELF_ATTRS_FILE_NAME "${CMAKE_BINARY_DIR}/check_target_architecture_hf_Attributes")
+    file(WRITE ${C_FILE_NAME} "int main(void) {return 0;}")
+    try_compile(
+        result_unused
+        ${CMAKE_BINARY_DIR}
+        ${C_FILE_NAME}
+        COPY_FILE
+            ${BIN_FILE_NAME}
+    )
+    find_program(READELF_BIN
+        NAMES
+            readelf
+    )
+    execute_process(
+        COMMAND
+            ${READELF_BIN} -A ${BIN_FILE_NAME}
+        OUTPUT_FILE
+            ${ELF_ATTRS_FILE_NAME}
+    )
+    file(STRINGS
+        ${ELF_ATTRS_FILE_NAME}
+        ELF_ATTRS_ABI_VFP_ARGS
+        REGEX
+            "Tag_ABI_VFP_args")
+    if(ELF_ATTRS_ABI_VFP_ARGS)
+        set(${output_var} TRUE PARENT_SCOPE)
+    endif()
+endfunction()
+
+# verify hard-float architecture
+if (${BUILD_PACKAGE_ARCHITECTURE} MATCHES "armhf")
+    check_target_architecture_hf(BUILD_PACKAGE_ARCHITECTURE_HF)
+    if (NOT ${BUILD_PACKAGE_ARCHITECTURE_HF})
+        set(BUILD_PACKAGE_ARCHITECTURE "arm")
+        MESSAGE(WARNING "Architecture is not 'hard-float', changing package architecture to general: ${BUILD_PACKAGE_ARCHITECTURE} [${BUILD_ARCH}]")
+    endif()
+endif()

 # set parameters
 set(CPACK_GENERATOR "DEB")


MDEV-10292: Tokudb - PerconaFT - compile error in recent gcc

The following directives to ignore warnings where in the PerconaFT build in tokudb.
These generate errors when g++ ... -o xxx.so is used to compile are shared object.

As these don't actually hit any warnings they have been removed.

* -Wno-ignored-attributes
* -Wno-pointer-bool-conversion

Signed-off-by: Daniel Black <ce6aa2808e3fe4e77f6f1aff6fb988c295097d35@au.ibm.com>

--- storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
+++ storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
@@ -98,9 +98,7 @@
   -Wno-error=address-of-array-temporary
   -Wno-error=tautological-constant-out-of-range-compare
   -Wno-error=maybe-uninitialized
-  -Wno-ignored-attributes
   -Wno-error=extern-c-compat
-  -Wno-pointer-bool-conversion
   -fno-rtti
   -fno-exceptions
   -Wno-error=nonnull-compare


Added special path for jsoncpp include (should not be needed but install seems wrong)

--- cmake/CMakeModules/FindJsonCpp.cmake
+++ cmake/CMakeModules/FindJsonCpp.cmake
@@ -15,7 +15,8 @@
 set(JSONCPP_FOUND "NO")
 set(OSSIM_HAS_JSONCPP 0)

-find_path( JSONCPP_INCLUDE_DIR json/json.h)
+find_path( JSONCPP_INCLUDE_DIR json/json.h
+          PATHS /usr/include/jsoncpp )

 find_library( JSONCPP_LIBRARY NAMES "jsoncpp")


Fail to configure if compression algorithm is unknown

Right now, using the option -Dcompression_default=LZ4
configures ROOT with ZLIB and only emits a status message,
which is less visible than a CMake warning. Therefore,
make the option case-insensitive as well to accept ZLIB,
LZ4, and LZMA as recognized values.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -65,7 +65,6 @@
     endif()
   endforeach()
 endfunction()
-

 #--------------------------------------------------------------------------------------------------
 #---Full list of options with their descriptions and default values
@@ -107,7 +106,6 @@
 ROOT_BUILD_OPTION(clad ON "Enable clad, the cling automatic differentiation plugin.")
 ROOT_BUILD_OPTION(cling ON "Enable new CLING C++ interpreter")
 ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
-set(compression_default "zlib" CACHE STRING "ROOT compression algorithm used as a default, default option is zlib. Can be lz4, zlib, or lzma")
 ROOT_BUILD_OPTION(cuda OFF "Use CUDA if it is found in the system")
 ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
 ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
@@ -206,12 +204,13 @@
 endif()

 #--- Compression algorithms in ROOT-------------------------------------------------------------
-if(NOT compression_default MATCHES "zlib|lz4|lzma")
-  message(STATUS "Not supported compression algorithm, ROOT compression algorithms are zlib, lzma and lz4.
-    ROOT will fall back to default algorithm: zlib")
-  set(compression_default "zlib" CACHE STRING "" FORCE)
+set(compression_default "zlib" CACHE STRING "Default compression algorithm (zlib (default), lz4, or lzma)")
+string(TOLOWER "${compression_default}" compression_default)
+if("${compression_default}" MATCHES "zlib|lz4|lzma")
+  message(STATUS "ROOT default compression algorithm: ${compression_default}")
 else()
-  message(STATUS "ROOT default compression algorithm is " ${compression_default})
+  message(FATAL_ERROR "Unsupported compression algorithm: ${compression_default}\n"
+    "Known values are zlib, lzma, lz4 (case-insensitive).")
 endif()

 #--- Minor chnages in defaults due to platform--------------------------------------------------


disable output compression since this feature seems to be broken

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -146,7 +146,7 @@
 endif(NOT EIGEN_NO_UPDATE)

 # which ctest command to use for running the dashboard
-SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}")
+SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE} --no-compress-output")
 if($ENV{EIGEN_CTEST_ARGS})
 SET (CTEST_COMMAND "${CTEST_COMMAND} $ENV{EIGEN_CTEST_ARGS}")
 endif($ENV{EIGEN_CTEST_ARGS})


Fix PrecompiledHeader.cmake, which was causing CMake to emit warnings.

--- PrecompiledHeader.cmake
+++ PrecompiledHeader.cmake
@@ -107,7 +107,7 @@
     SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "-include ${CMAKE_CURRENT_SOURCE_DIR}/${_input} -Winvalid-pch")
    get_target_property(_targetFlags ${_targetName} COMPILE_FLAGS)
     message("target properties: ${_targetFlags}")
-  ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
+  ENDIF()
+

 ENDMACRO()


Add ENABLE_ASAN option to CMake

Add ENABLE_ASAN option to CMake

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -135,6 +135,16 @@
             # Use pthreads on Linux/macOS
             $<$<PLATFORM_ID:Linux,Darwin>:-pthread>)

+    if(${ENABLE_ASAN})
+        target_compile_options(${NAME}
+            PRIVATE
+                $<$<CXX_COMPILER_ID:${CLANG_LIKE}>:-fsanitize=address>)
+
+        target_link_options(${NAME}
+            PRIVATE
+                $<$<CXX_COMPILER_ID:${CLANG_LIKE}>:-fsanitize=address>)
+    endif()
+
     if(${CLI})
         # Enable LTO on release builds
         set_property(TARGET ${NAME}


build(deps): make range-v3 target globally visible

--- cmake/JEGPFindDependencies.cmake
+++ cmake/JEGPFindDependencies.cmake
@@ -22,7 +22,7 @@
 list(APPEND CMAKE_MODULE_PATH "${jegp_cmake_modules_SOURCE_DIR}")

 if(range-v3_ADDED)
-    add_library(range-v3::range-v3 INTERFACE IMPORTED)
+    add_library(range-v3::range-v3 INTERFACE IMPORTED GLOBAL)
     target_include_directories(range-v3::range-v3
                                INTERFACE ${range-v3_SOURCE_DIR}/include)
 endif()


Handle unusual (old?) FindPkgConfig package in CMake

--- cmake/Modules/FindLibCheck.cmake
+++ cmake/Modules/FindLibCheck.cmake
@@ -6,7 +6,7 @@
 #  LIBCHECK_DEFINITIONS - Compiler switches required for using LibCheck

 FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_CHECK QUIET libcheck)
+PKG_CHECK_MODULES(PC_CHECK libcheck)
 SET(LIBCHECK_DEFINITIONS ${PC_LIBCHECK_CFLAGS_OTHER})

 FIND_PATH(LIBCHECK_INCLUDE_DIR check.h


Force the ncurses include path when using brew

--- cmake/Modules/FindNcursesw.cmake
+++ cmake/Modules/FindNcursesw.cmake
@@ -120,10 +120,14 @@
   get_filename_component(_cursesLibDir "${CURSES_NCURSESW_LIBRARY}" PATH)
   get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)

-  find_path(CURSES_INCLUDE_PATH
-    NAMES ncursesw/ncurses.h ncursesw/curses.h ncurses.h curses.h
-    HINTS "${_cursesParentDir}/include"
+  if(${OSX_BREW_NCURSES})
+    set(CURSES_INCLUDE_PATH /usr/local/opt/ncurses/include)
+  else()
+    find_path(CURSES_INCLUDE_PATH
+      NAMES ncursesw/ncurses.h ncursesw/curses.h ncurses.h curses.h
+      HINTS "${_cursesParentDir}/include"
     )
+  endif()

   # Previous versions of FindCurses provided these values.
   if(NOT DEFINED CURSES_LIBRARY)


Look from MSYS2 install location.

Look from MSYS2 install location.

--- cmake/Modules/FindOpenBLAS.cmake
+++ cmake/Modules/FindOpenBLAS.cmake
@@ -7,7 +7,8 @@

 find_library(OPENBLAS_LIBRARY
     NAMES libopenblas.so libopenblas.lib libopenblas.a
-    PATHS ${OPENBLAS_ROOT}/lib
+    PATHS ${CMAKE_PREFIX_PATH}/lib
+	${OPENBLAS_ROOT}/lib
 	/usr/lib/openblas-base
 	/usr/local/lib
     )
@@ -15,7 +16,7 @@
 if(NOT OPENBLAS_IGNORE_HEADERS)
 	find_path(OPENBLAS_INCLUDE_DIR
 		NAMES openblas_config.h
-		PATHS ${OPENBLAS_ROOT}/include /usr/include /usr/local/include
+		PATHS ${CMAKE_PREFIX_PATH}/include/OpenBLAS ${OPENBLAS_ROOT}/include /usr/include /usr/local/include
 		)
 endif()


Cmake: Modules: fix build with no doc

Cmake: Modules: fix build with no doc

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -503,43 +503,45 @@

 function (generate_manpage NAME)
-	cmake_parse_arguments (ARG
-		"" # optional keywords
-		"SECTION;FILENAME" # one value keywords
-		"" # multi value keywords
-		${ARGN}
-	)
-
-	if (ARG_SECTION)
-		set(SECTION ${ARG_SECTION})
-	else ()
-		set(SECTION 1)
-	endif ()
-
-	if (ARG_FILENAME)
-		set(MDFILE ${ARG_FILENAME})
-	else ()
-		set(MDFILE ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.md)
-	endif ()
-
-	set(OUTFILE ${CMAKE_SOURCE_DIR}/doc/man/${NAME}.${SECTION})
-
-	if (RONN_LOC)
-		add_custom_command(
-			OUTPUT ${OUTFILE}
-			DEPENDS ${MDFILE}
-			COMMAND export RUBYOPT="-Eutf-8" && ${RONN_LOC} ARGS -r --pipe ${MDFILE} > ${OUTFILE}
+	if (BUILD_DOCUMENTATION)
+		cmake_parse_arguments (ARG
+			"" # optional keywords
+			"SECTION;FILENAME" # one value keywords
+			"" # multi value keywords
+			${ARGN}
 		)
-		add_custom_target(man-${NAME} ALL DEPENDS ${OUTFILE})
-		add_dependencies(man man-${NAME})
-	endif (RONN_LOC)
-
-	if (INSTALL_DOCUMENTATION)
-		install(
-			FILES ${OUTFILE}
-			DESTINATION share/man/man${SECTION}
+
+		if (ARG_SECTION)
+			set(SECTION ${ARG_SECTION})
+		else ()
+			set(SECTION 1)
+		endif ()
+
+		if (ARG_FILENAME)
+			set(MDFILE ${ARG_FILENAME})
+		else ()
+			set(MDFILE ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.md)
+		endif ()
+
+		set(OUTFILE ${CMAKE_SOURCE_DIR}/doc/man/${NAME}.${SECTION})
+
+		if (RONN_LOC)
+			add_custom_command(
+				OUTPUT ${OUTFILE}
+				DEPENDS ${MDFILE}
+				COMMAND export RUBYOPT="-Eutf-8" && ${RONN_LOC} ARGS -r --pipe ${MDFILE} > ${OUTFILE}
 			)
-	endif ()
+			add_custom_target(man-${NAME} ALL DEPENDS ${OUTFILE})
+			add_dependencies(man man-${NAME})
+		endif (RONN_LOC)
+
+		if (INSTALL_DOCUMENTATION)
+			install(
+				FILES ${OUTFILE}
+				DESTINATION share/man/man${SECTION}
+				)
+		endif ()
+	endif (BUILD_DOCUMENTATION)
 endfunction ()


Correct failure message

Correct failure message

svn path=/trunk/KDE/kdepim/; revision=704583

--- cmake/modules/FindOpensync.cmake
+++ cmake/modules/FindOpensync.cmake
@@ -32,7 +32,7 @@
    else (Opensync_FIND_REQUIRED)
       set (_req FALSE)
    endif (Opensync_FIND_REQUIRED)
-   macro_log_feature(OPENSYNC_FOUND "opensync" "OpenSync Development Libraries" "http://www.opensync.org" ${_req} "0.19 or greater" "Needed to provide synching applications from KDE PIM applications. Necessary to compile kitchensync and other PIM applications.")
+   macro_log_feature(OPENSYNC_FOUND "opensync" "OpenSync Development Libraries" "http://www.opensync.org" ${_req} "0.30 or greater" "Needed to provide syncing functionality in KDE PIM applications. Necessary to compile kitchensync.")
 else (NOT Opensync_FIND_QUIETLY)
    if (NOT OPENSYNC_FOUND)
       if (Opensync_FIND_REQUIRED)


Added libclang version 3.9.1

Added libclang version 3.9.1

--- cmake_modules/FindLibClang.cmake
+++ cmake_modules/FindLibClang.cmake
@@ -16,6 +16,7 @@
 # most recent versions come first
 set(LIBCLANG_KNOWN_LLVM_VERSIONS 4.0.0
   4.0
+  3.9.1
   3.9.0
   3.9
   3.8.1


Don't put C++11 feature detection into defines.h, needs to be runtime-detected

--- TestFinalOverride.cmake
+++ TestFinalOverride.cmake
@@ -23,5 +23,4 @@

 if(CXX_FINAL_OVERRIDE_SUPPORTED)
   add_definitions(-DCXX_FINAL_OVERRIDE_SUPPORTED)
-  list(APPEND FIND_PACKAGES_DEFINES CXX_FINAL_OVERRIDE_SUPPORTED)
 endif()


updates to check_globals.cmake, static variable inside function is ok

--- common/cmake/check_globals.cmake
+++ common/cmake/check_globals.cmake
@@ -23,7 +23,8 @@

 foreach (line ${output})
   if ("${line}" MATCHES "O .bss")
-    if (NOT "${line}" MATCHES "std::__ioinit")
+    if (NOT "${line}" MATCHES "std::__ioinit" AND    # this is caused by iostream initialization and is likely also ok
+        NOT "${line}" MATCHES "\\(\\)::")            # this matches a static inside a function which is fine
       message(WARNING "\nProblematic global variable in non-SSE code:\n" ${line})
     endif()
   endif()


Changed folder names for mutli-view IDE's

WNLibraries -> Libraries
WNTests -> Tests
WNTools -> Tools

Change-Id: I03c4188c8c0bc852aad94849dd940c17b7f72eca
Reviewed-on: https://wn-project.dnsalias.net/gerrit/187
Try: Devon Powell <bef84a74f4a3947934cc58306a6aae518eaf1936@gmail.com>
Tested-by: WNBot <efa0942020584fb66fb8bea377b59e48fa0f85ef@gmail.com>
Reviewed-by: Andrew Woloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>

--- Utilities/helpers.cmake
+++ Utilities/helpers.cmake
@@ -368,7 +368,7 @@
     endif()
   endif()
   set_property(TARGET ${PARSED_ARGS_TEST_NAME}_test PROPERTY FOLDER
-    WNTests/${PARSED_ARGS_TEST_PREFIX})
+    Tests/${PARSED_ARGS_TEST_PREFIX})
 endfunction()

 # Arguments
@@ -423,7 +423,7 @@
   endif()

   target_include_directories(${target} PUBLIC ${CMAKE_BINARY_DIR}/Libraries)
-  set_property(TARGET ${target} PROPERTY FOLDER WNLibraries)
+  set_property(TARGET ${target} PROPERTY FOLDER Libraries)

   if(PARSED_ARGS_PRE_LINK_FLAGS)
     set_property(TARGET ${target} PROPERTY WN_PRE_LINK_FLAGS
@@ -487,7 +487,7 @@
     source_group("inc" REGULAR_EXPRESSION ".*[.](h|hpp)$")
     source_group("inl" REGULAR_EXPRESSION ".*[.](inl)$")
     add_wn_library(${target} SOURCES ${ARGN})
-    set_property(TARGET ${target} PROPERTY FOLDER WNLibraries)
+    set_property(TARGET ${target} PROPERTY FOLDER Libraries)
     set_property(TARGET ${target} PROPERTY LINKER_LANGUAGE CXX)
   endif()
 endfunction(add_wn_header_library)
@@ -526,5 +526,5 @@
   source_group("inl" REGULAR_EXPRESSION ".*[.](inl)$")
   add_wn_executable(${target} LINK_LIBRARIES ${PARSED_ARGS_LINK_LIBRARIES}
     SOURCES ${PARSED_ARGS_SOURCES})
-  set_property(TARGET ${target} PROPERTY FOLDER WNTools)
+  set_property(TARGET ${target} PROPERTY FOLDER Tools)
 endfunction(add_wn_tool)


Fix parent scoping issues.

Fix parent scoping issues.

--- CPM.cmake
+++ CPM.cmake
@@ -942,7 +942,7 @@
     set(CPM_KV_SOURCE_ADDED_MAP_${__CPM_FULL_UNID} ${CPM_LAST_MODULE_NAME} PARENT_SCOPE)
     set(CPM_KV_LIST_SOURCE_ADDED_MAP ${CPM_KV_LIST_SOURCE_ADDED_MAP} "CPM_KV_SOURCE_ADDED_MAP_${__CPM_FULL_UNID}" PARENT_SCOPE)

-    set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}" PARENT_SCOPE)
+    set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}")

     # Add ${__CPM_MODULE_SOURCE_DIR} to our include directory map.
     set(${INCLUDE_MAP_NAME} ${${INCLUDE_MAP_NAME}} "${__CPM_MODULE_SOURCE_DIR}")
@@ -950,16 +950,12 @@
     # Check to see if the module exported any of its modules. If so, then export each
     # of the exported modules into our parents includes / definitions.
     if (DEFINED CPM_EXPORTED_MODULES)
-      message("Exported modules: ${CPM_EXPORTED_MODULES}")
       foreach(module IN LISTS CPM_EXPORTED_MODULES)
         set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
         set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})

         set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
         set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
-
-        message("Exported includes: ${${IMPORT_INCLUDE_MAP_NAME}}")
-        message("Exported definitions: ${${IMPORT_DEFINITION_MAP_NAME}}")
       endforeach()
     endif()

@@ -999,6 +995,9 @@

   # Append target to pre-existing libraries.
   set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
+
+  set(CPM_DEFINITIONS ${CPM_DEFINITIONS} PARENT_SCOPE)
+  set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS } PARENT_SCOPE)

   # Set the appropriate preprocessor definition for this module and populate
   # our namespace header file.


Fix USE_EXISTING_VER issue with ghost repos.

When using ghost repositories, USE_EXISTING_VER was not correctly
finding the updated version.

--- CPM.cmake
+++ CPM.cmake
@@ -753,6 +753,9 @@
     string(REGEX REPLACE "https://github.com/" "github_" ${variable} ${${variable}})
     string(REGEX REPLACE "http://github.com/" "github_" ${variable} ${${variable}})

+    # Strip off .git extension, if any.
+    string(REGEX REPLACE "\\.git$" "" ${variable} ${${variable}})
+
     string(REGEX REPLACE "/" "_" ${variable} ${${variable}})
     string(REGEX REPLACE "[:/\\.?-]" "" ${variable} ${${variable}})
   endif()
@@ -771,11 +774,15 @@
         set(${parentVar} ${CPM_KV_MOD_VERSION_MAP_${__CPM_TMP_VAR}})
       endif()
       set(__CPM_TMP_VAR)
-    #elseif(DEFINED _CPM_SOURCE_DIR)
-      # TODO: Make case for this when ghost repository is set.
-      # I'm not sure there is much more to this case...
-      # The system will generate a unique ID from our ghost data and realize
-      # that our component has already been included and use that instead.
+    elseif(DEFINED _CPM_SOURCE_DIR)
+      if (DEFINED _CPM_SOURCE_GHOST_GIT_REPO)
+        set(__CPM_TMP_VAR ${_CPM_SOURCE_GHOST_GIT_REPO})
+        _cpm_make_valid_unid_or_path(__CPM_TMP_VAR)
+        if (DEFINED CPM_KV_MOD_VERSION_MAP_${__CPM_TMP_VAR})
+          set(${parentVar} ${CPM_KV_MOD_VERSION_MAP_${__CPM_TMP_VAR}})
+        endif()
+        set(__CPM_TMP_VAR)
+      endif()
     endif()
   endif()

@@ -1136,7 +1143,9 @@
   set(__CPM_USING_GIT FALSE)
   if (DEFINED _CPM_GIT_REPOSITORY)
     # Remove the .git extension if it exists. This causes the url to not
-    # be a unique ID in a number of situations.
+    # be a unique ID in a number of situations. _CPM_GIT_REPOSITORY is reused
+    # in a number of situations; so even though _cpm_make_valid_unid_or_path
+    # also removes the post-fix, we want to do it here as well.
     string(REGEX REPLACE "\\.git$" "" _CPM_GIT_REPOSITORY ${_CPM_GIT_REPOSITORY})

     set(__CPM_USING_GIT TRUE)
@@ -1151,15 +1160,13 @@
     get_filename_component(tmp_src_dir ${_CPM_SOURCE_DIR} ABSOLUTE)

     if (DEFINED _CPM_SOURCE_GHOST_GIT_REPO)
-      set (source_ghost_tag)
-      if (DEFINED _CPM_SOURCE_GHOST_GIT_TAG)
-        set (source_ghost_tag ${_CPM_SOURCE_GHOST_GIT_TAG})
-      else()
-        set (source_ghost_tag "origin/master")
-      endif()
+      # See comment above regarding removing the .git postfix.
       string(REGEX REPLACE "\\.git$" "" _CPM_SOURCE_GHOST_GIT_REPO ${_CPM_SOURCE_GHOST_GIT_REPO})
       set(__CPM_PATH_UNID ${_CPM_SOURCE_GHOST_GIT_REPO})
-      set(__CPM_PATH_UNID_VERSION ${source_ghost_tag})
+
+      # Ghost tags have been taken into account in _cpm_obtain_version_from_params
+      # So using __CPM_NEW_GIT_TAG here will work as expected with ghost tags.
+      set(__CPM_PATH_UNID_VERSION "${__CPM_NEW_GIT_TAG}")

       # Ensure all lower case. This string is used when testing preprocessor
       # name collisions.


sitl_tests: exclude uorb test from Windows build

Because it was always failing from the beginning on and
we want to make sure no other tests break in the meantime
by running the currently passing tests also on Windows CI.

--- platforms/posix/cmake/sitl_tests.cmake
+++ platforms/posix/cmake/sitl_tests.cmake
@@ -42,6 +42,14 @@
 		uorb
 	)
 endif()
+
+if (CMAKE_SYSTEM_NAME STREQUAL "CYGWIN")
+	list(REMOVE_ITEM tests
+		uorb
+	)
+endif()
+
+message("${tests}")

 foreach(test_name ${tests})
 	configure_file(${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_template.in ${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_${test_name}_generated)


Rollback previous changes - now a list is empty if passed list of components is always empty.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -846,13 +846,7 @@
 MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)
   SET(_tmp_res)
   STRING(REPLACE ";" "," _tmp_res "${${element_list}}")
-
-  LIST(LENGTH result _list_len)
-  IF(NOT _list_len EQUAL 0)
-    SET(${result} "${${result}};${_tmp_res}")  # LIST(APPEND ...) doesn't handle well empty elements!?
-  ELSE()
-    SET(${result} "${_tmp_res}")               # to avoid first redundant ; at the beginning of the list
-  ENDIF()
+  SET(${result} "${${result}};${_tmp_res}")  # LIST(APPEND ...) doesn't handle well empty elements!?
 ENDMACRO(SALOME_APPEND_LIST_OF_LIST)

 #########################################################################


The variable PLUGIN_TARGET is not available, use PROJECT_NAME instead.

--- CMake/mitkMacroCreateCTKPlugin.cmake
+++ CMake/mitkMacroCreateCTKPlugin.cmake
@@ -33,9 +33,9 @@
     endif()
   else(NOT _MODULE_CHECK_RESULT)
     if(NOT MITK_BUILD_ALL_PLUGINS)
-      message(SEND_ERROR "${PLUGIN_TARGET} is missing requirements and won't be built. Missing: ${_MODULE_CHECK_RESULT}")
+      message(SEND_ERROR "${PROJECT_NAME} is missing requirements and won't be built. Missing: ${_MODULE_CHECK_RESULT}")
     else()
-      message(STATUS "${PLUGIN_TARGET} is missing requirements and won't be built. Missing: ${_MODULE_CHECK_RESULT}")
+      message(STATUS "${PROJECT_NAME} is missing requirements and won't be built. Missing: ${_MODULE_CHECK_RESULT}")
     endif()
   endif(NOT _MODULE_CHECK_RESULT)
 endmacro()


Added the proper kNet use #defines for Tundra on linux.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -442,6 +442,10 @@
     endif()
     include_directories(${KNET_DIR}/include)
     link_directories(${KNET_DIR}/lib)
+    if (UNIX)
+        add_definitions(-DLINUX)
+    endif()
+    add_definitions(-DKNET_USE_BOOST)
 endmacro()

 macro(link_package_knet)


Find Augeas: Change default lens dir for macOS

This commit closes #2342.

--- cmake/Modules/FindAugeas.cmake
+++ cmake/Modules/FindAugeas.cmake
@@ -29,7 +29,11 @@
 	endif (_LIBAUGEAS_PC_FOUND)

 	if (NOT _LIBAUGEAS_PREFIX)
-		set (_LIBAUGEAS_PREFIX "/usr")
+		if (APPLE)
+			set (_LIBAUGEAS_PREFIX "/usr/local/opt/augeas")
+		else (APPLE)
+			set (_LIBAUGEAS_PREFIX "/usr")
+		endif (APPLE)
 	endif ()
 	set (LIBAUGEAS_PREFIX
 	     "${_LIBAUGEAS_PREFIX}"


Fix Web build after changing format of PackageTool command line args

--- cmake/Modules/UrhoCommon.cmake
+++ cmake/Modules/UrhoCommon.cmake
@@ -1715,13 +1715,13 @@
             if (CMAKE_HOST_WIN32)
                 # On Windows host, always assumes there are changes so resource dirs would be repackaged in each build, however, still make sure the *.pak timestamp is not altered unnecessarily
                 if (URHO3D_PACKAGING)
-                    set (PACKAGING_COMMAND && echo Packaging ${DIR}... && ${PACKAGE_TOOL} ${DIR} ${RESOURCE_${DIR}_PATHNAME}.new -c -q && ${CMAKE_COMMAND} -E copy_if_different ${RESOURCE_${DIR}_PATHNAME}.new ${RESOURCE_${DIR}_PATHNAME} && ${CMAKE_COMMAND} -E remove ${RESOURCE_${DIR}_PATHNAME}.new)
+                    set (PACKAGING_COMMAND && echo Packaging ${DIR}... && ${PACKAGE_TOOL} -pcq ${DIR} ${RESOURCE_${DIR}_PATHNAME}.new && ${CMAKE_COMMAND} -E copy_if_different ${RESOURCE_${DIR}_PATHNAME}.new ${RESOURCE_${DIR}_PATHNAME} && ${CMAKE_COMMAND} -E remove ${RESOURCE_${DIR}_PATHNAME}.new)
                 endif ()
                 list (APPEND COMMANDS COMMAND ${CMAKE_COMMAND} -E touch ${DIR} ${PACKAGING_COMMAND})
             else ()
                 # On Unix-like hosts, detect the changes in the resource directory recursively so they are only repackaged and/or rebundled (Xcode only) as necessary
                 if (URHO3D_PACKAGING)
-                    set (PACKAGING_COMMAND && echo Packaging ${DIR}... && ${PACKAGE_TOOL} ${DIR} ${RESOURCE_${DIR}_PATHNAME} -c -q)
+                    set (PACKAGING_COMMAND && echo Packaging ${DIR}... && ${PACKAGE_TOOL} -pcq ${DIR} ${RESOURCE_${DIR}_PATHNAME})
                     set (OUTPUT_COMMAND test -e ${RESOURCE_${DIR}_PATHNAME} || \( true ${PACKAGING_COMMAND} \))
                 else ()
                     set (OUTPUT_COMMAND true)   # Nothing to output


Add regex to match AppleClang compiler

Add regex to match AppleClang compiler

Signed-off-by: Bogdan Vaneev <2ec1e3e1d1ed7c9eba00205bffeac2e324a87b86@gmail.com>

--- cmake/configure_compiler.cmake
+++ cmake/configure_compiler.cmake
@@ -21,7 +21,7 @@

 # Select the compiler specific cmake file
 set(MSVC_ID "MSVC")
-if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+if (${CMAKE_CXX_COMPILER_ID} MATCHES "(Apple)?Clang")
   include(${PROJECT_SOURCE_DIR}/cmake/compiler/clang.cmake)
 elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
   include(${PROJECT_SOURCE_DIR}/cmake/compiler/gcc.cmake)


Remove unnecessary log message

Remove unnecessary log message

Change-Id: Ic20d4bd0b3d6d2616347ba2640d5e2ccfb926ef8

--- cmake/internal/functions.cmake
+++ cmake/internal/functions.cmake
@@ -673,7 +673,6 @@

 FUNCTION(INTERNAL_BUILD_UNIT_TESTS)
-MESSAGE("VERBOSE INTERNAL_BUILD_UNIT_TESTS")
 	IF(${CONFIG_BUILD_GLOBAL_TEST_EXECUTABLE} AND NOT "${GLOBAL_TEST_SOURCE}" STREQUAL "")
 		LIST(REMOVE_DUPLICATES GLOBAL_TEST_LINKER_DIRECTORIES)
 		SET(GLOBAL_TEST_LINKER_DIRECTORIES  ${GLOBAL_TEST_LINKER_DIRECTORIES}  CACHE INTERNAL "collect test linker directories")


Tidy up some Python inspection commands.

--- cmake/modules/FindPYTHON.cmake
+++ cmake/modules/FindPYTHON.cmake
@@ -25,7 +25,7 @@
     ENDIF()
     IF(NOT PYTHON_INCLUDE_DIR)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import distutils; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())"
+                            "from distutils import sysconfig; print(sysconfig.get_python_inc())"
                             RESULT_VARIABLE PYTHON_INCLUDE_DIR_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -37,7 +37,7 @@
     ENDIF()
     IF(NOT PYTHON_LIBRARY_DIR)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import distutils; import distutils.sysconfig; print(distutils.sysconfig.get_config_var(\"LIBDIR\"))"
+                            "from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"))"
                             RESULT_VARIABLE PYTHON_LIBRARY_DIR_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_LIBRARY_DIR
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -49,7 +49,7 @@
     ENDIF()
     IF(NOT PYTHON_SITE_PACKAGES)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
+                            "from distutils import sysconfig; print(sysconfig.get_python_lib())"
                             RESULT_VARIABLE PYTHON_SITE_PACKAGES_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -61,7 +61,7 @@
     ENDIF()
     IF(NOT PYTHON_VERSION)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "from distutils.sysconfig import get_python_version; print(get_python_version())"
+                            "from distutils import sysconfig; print(sysconfig.get_python_version())"
                             RESULT_VARIABLE PYTHON_VERSION_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_VERSION
                             OUTPUT_STRIP_TRAILING_WHITESPACE)


Generate dictionary after library in ROOT_STANDARD_LIBRARY_PACKAGE()

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -1042,9 +1042,8 @@

   # Don't pass the MODULE arg to ROOT_GENERATE_DICTIONARY when
   # NO_MODULE is set.
-  set(MODULE_GEN_ARG MODULE ${libname})
-  if(ARG_NO_MODULE)
-    set(MODULE_GEN_ARG)
+  if(NOT ARG_NO_MODULE)
+    set(MODULE_GEN_ARG NOTARGET MODULE ${libname})
   endif()

   if(runtime_cxxmodules)
@@ -1058,6 +1057,21 @@
       include_directories(BEFORE "v7/inc")
     endif()
   endif()
+
+  if (ARG_OBJECT_LIBRARY)
+    ROOT_OBJECT_LIBRARY(${libname}Objs ${ARG_SOURCES})
+    ROOT_LINKER_LIBRARY(${libname} $<TARGET_OBJECTS:${libname}Objs>
+                        LIBRARIES ${ARG_LIBRARIES}
+                        DEPENDENCIES ${ARG_DEPENDENCIES}
+                        BUILTINS ${ARG_BUILTINS}
+                       )
+  else(ARG_OBJECT_LIBRARY)
+    ROOT_LINKER_LIBRARY(${libname} ${ARG_SOURCES}
+                        LIBRARIES ${ARG_LIBRARIES}
+                        DEPENDENCIES ${ARG_DEPENDENCIES}
+                        BUILTINS ${ARG_BUILTINS}
+                       )
+  endif(ARG_OBJECT_LIBRARY)

   ROOT_GENERATE_DICTIONARY(G__${libname} ${ARG_HEADERS}
                           ${MODULE_GEN_ARG}
@@ -1069,20 +1083,9 @@
                           BUILTINS ${ARG_BUILTINS}
                           )

-  if (ARG_OBJECT_LIBRARY)
-    ROOT_OBJECT_LIBRARY(${libname}Objs ${ARG_SOURCES} G__${libname}.cxx)
-    ROOT_LINKER_LIBRARY(${libname} $<TARGET_OBJECTS:${libname}Objs>
-                        LIBRARIES ${ARG_LIBRARIES}
-                        DEPENDENCIES ${ARG_DEPENDENCIES}
-                        BUILTINS ${ARG_BUILTINS}
-                       )
-  else(ARG_OBJECT_LIBRARY)
-    ROOT_LINKER_LIBRARY(${libname} ${ARG_SOURCES} G__${libname}.cxx
-                        LIBRARIES ${ARG_LIBRARIES}
-                        DEPENDENCIES ${ARG_DEPENDENCIES}
-                        BUILTINS ${ARG_BUILTINS}
-                       )
-  endif(ARG_OBJECT_LIBRARY)
+  if(ARG_NO_MODULE)
+    target_sources(${libname} PRIVATE G__${libname}.cxx)
+  endif()

   # Dictionary might include things from the current src dir, e.g. tests. Alas
   # there is no way to set the include directory for a source file (except for


add new check for vidcap.h

add new check for vidcap.h

--- modules/videoio/cmake/detect_obsensor.cmake
+++ modules/videoio/cmake/detect_obsensor.cmake
@@ -2,10 +2,20 @@
 if(NOT HAVE_OBSENSOR)
   if(WIN32)
     check_include_file(mfapi.h HAVE_MFAPI)
-    if(HAVE_MFAPI)
+    check_include_file(vidcap.h HAVE_VIDCAP)
+    if(HAVE_MFAPI AND HAVE_VIDCAP)
       set(HAVE_OBSENSOR TRUE)
       set(HAVE_OBSENSOR_MSMF TRUE)
       ocv_add_external_target(obsensor "" "" "HAVE_OBSENSOR;HAVE_OBSENSOR_MSMF")
+    else()
+      set(HAVE_OBSENSOR OFF)
+      set(HAVE_OBSENSOR_MSMF OFF)
+      if(NOT HAVE_MFAPI)
+        MESSAGE(STATUS "Could not find mfapi.h. Turning HAVE_OBSENSOR OFF")
+      endif()
+      if(NOT HAVE_VIDCAP)
+        MESSAGE(STATUS "Could not find vidcap.h. Turning HAVE_OBSENSOR OFF")
+      endif()
     endif()
   elseif(UNIX)
     check_include_file(linux/videodev2.h HAVE_CAMV4L2)


This does hopefully really raise the warning/error limit.

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -164,6 +164,10 @@
 # should ctest wipe the binary tree before running
 SET(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)

+# raise the warning/error limit
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "33331")
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "33331")
+
 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
 if(WIN32 AND NOT UNIX)


SuperBuild: bug: missed macro call to patch in curl

--- SuperBuild/CMake/External_curl.cmake
+++ SuperBuild/CMake/External_curl.cmake
@@ -53,4 +53,6 @@
     )
 endif()

+SUPERBUILD_PATCH_SOURCE(CURL)
+
 SUPERBUILD_UPDATE_CMAKE_VARIABLES(CURL TRUE)


Use CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION to find DirectX11 SDK

--- CMake/Packages/FindDirectX11.cmake
+++ CMake/Packages/FindDirectX11.cmake
@@ -20,8 +20,8 @@

 	# Windows 10 Universal SDK
 	if(MSVC14)
-		if(VS_TARGET_PLATFORM_VERSION)
-			set(W10SDK_VER VS_TARGET_PLATFORM_VERSION)
+		if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
+			set(W10SDK_VER ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
 		else()
 			set(W10SDK_VER 10.0.10240.0)
 		endif()


- EN COURS - task references #211: Mise à jour de Ogre vers v1-9.0 stable - Correction FindFreeImage 3

--- CMake/Packages/FindFreeImage.cmake
+++ CMake/Packages/FindFreeImage.cmake
@@ -40,8 +40,8 @@

 find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${XSILIUM_FREEIMAGE_INCLUDE} ${FreeImage_INC_SEARCH_PATH} ${FreeImage_PKGC_INCLUDE_DIRS})

-find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
-find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
+find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${XSILIUM_FREEIMAGE_TARGET} ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
+find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${XSILIUM_FREEIMAGE_TARGET} ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)

 make_library_set(FreeImage_LIBRARY)


Switch to version 0.6.1

Switch to version 0.6.1


new version of LibFindMacros, more explicit, easier to use

--- dist/Modules/LibFindMacros.cmake
+++ dist/Modules/LibFindMacros.cmake
@@ -13,7 +13,7 @@
   find_package(${LIBFIND_PACKAGE_ARGS})
 endmacro (libfind_package)

-# Damn CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
+# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
 # where they added pkg_check_modules. Consequently I need to support both in my scripts
 # to avoid those deprecated warnings. Here's a helper that does just that.
 # Works identically to pkg_check_modules, except that no checks are needed prior to use.
@@ -37,9 +37,18 @@
 # Also handles errors in case library detection was required, etc.
 macro (libfind_process PREFIX)
   # Skip processing if already processed during this run
-  if (NOT ${PREFIX}_FOUND)
+  if (NOT DEFINED ${PREFIX}_FOUND)
     # Start with the assumption that the library was found
     set (${PREFIX}_FOUND TRUE)
+
+	if ( CMAKE_MAJOR_VERSION EQUAL 2 )
+	if ( CMAKE_MINOR_VERSION GREATER 6 )
+		#clear the variables ( in case they already have some values ) if possible
+		#avoids duplication in cache variables.
+		unset(${PREFIX}_INCLUDE_DIRS CACHE)
+		unset(${PREFIX}_LIBRARIES CACHE)
+	endif ( CMAKE_MINOR_VERSION GREATER 6 )
+	endif ( CMAKE_MAJOR_VERSION EQUAL 2 )

     # Process all includes and set _FOUND to false if any are missing
     foreach (i ${${PREFIX}_PROCESS_INCLUDES})
@@ -63,9 +72,18 @@

     # Print message and/or exit on fatal error
     if (${PREFIX}_FOUND)
-      if (NOT ${PREFIX}_FIND_QUIETLY)
-        message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
-      endif (NOT ${PREFIX}_FIND_QUIETLY)
+		set(${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} CACHE PATH "Include directories for ${PREFIX}. This is auto generated. To change a value here edit the ${PREFIX}_INCLUDE_DIR advanced variable.")
+		set(${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} CACHE FILEPATH "Libraries for ${PREFIX}. This is auto generated. To change a value here edit the ${PREFIX}_LIBRARY advanced variable.")
+
+    	if (NOT ${PREFIX}_FIND_QUIETLY)
+    		message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
+			if(${PREFIX}_FIND_REQUIRED)
+			else(${PREFIX}_FIND_REQUIRED)
+				set(${PREFIX}_FOUND ${${PREFIX}_FOUND} CACHE BOOL "Whether CMake found ${PREFIX} or not. Set to OFF to not use it in your CMakeLists.txt. Delete to try to find ${PREFIX} again.")
+			endif(${PREFIX}_FIND_REQUIRED)
+			message(STATUS "Headers in : ${${PREFIX}_INCLUDE_DIRS}")
+			message(STATUS "Libraries : ${${PREFIX}_LIBRARIES}")
+    	endif (NOT ${PREFIX}_FIND_QUIETLY)
     else (${PREFIX}_FOUND)
       if (${PREFIX}_FIND_REQUIRED)
         foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
@@ -74,7 +92,7 @@
         message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
       endif (${PREFIX}_FIND_REQUIRED)
     endif (${PREFIX}_FOUND)
-  endif (NOT ${PREFIX}_FOUND)
+  endif (NOT DEFINED ${PREFIX}_FOUND)
 endmacro (libfind_process)

 macro(libfind_library PREFIX basename)


updated SIRF and petmr_rd_tools versions

--- version_config.cmake
+++ version_config.cmake
@@ -116,7 +116,7 @@
   set(DEFAULT_glog_TAG v035)

 else()
-  set(DEFAULT_SIRF_TAG v1.0.0-rc.1)
+  set(DEFAULT_SIRF_TAG v1.0.0-rc.2)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
@@ -139,7 +139,7 @@

   ## petmr-rd-tools
   set(DEFAULT_petmr_rd_tools_URL https://github.com/UCL/petmr-rd-tools )
-  set(DEFAULT_petmr_rd_tools_TAG b6f46e777b1a5ecec52d5cf0573a0f070f9b277b)
+  set(DEFAULT_petmr_rd_tools_TAG b88281f79e8c4a3781ebda7663f1ce7f5cab6e68)

   ## glog
   set(DEFAULT_glog_URL https://github.com/google/glog )


build the add_to_sirf_classes branch of SIRF

--- version_config.cmake
+++ version_config.cmake
@@ -145,8 +145,8 @@
   set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)

 else()
-  set(DEFAULT_SIRF_TAG v1.1.1)
-
+	#  set(DEFAULT_SIRF_TAG v1.1.1)
+	set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG fd3a7576a11930856d6af50d217f17d4848c2bff)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   21)
+SET(KWSYS_DATE_STAMP_DAY   22)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   06)
+SET(KWSYS_DATE_STAMP_DAY   07)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   27)
+SET(KWSYS_DATE_STAMP_DAY   28)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   20)
+SET(KWSYS_DATE_STAMP_DAY   21)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   19)
+SET(KWSYS_DATE_STAMP_DAY   20)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   28)
+SET(KWSYS_DATE_STAMP_DAY   29)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


Add flag Wheader-hygiene to warn about usage of namespace directive in global context in header

--- cmake/ilcsoft_default_cxx_flags.cmake
+++ cmake/ilcsoft_default_cxx_flags.cmake
@@ -4,7 +4,7 @@

 INCLUDE(CheckCXXCompilerFlag)

-SET(COMPILER_FLAGS -Wall -Wextra -Wshadow -Weffc++ -pedantic -Wno-long-long -Wuninitialized -Wno-non-virtual-dtor)
+SET(COMPILER_FLAGS -Wall -Wextra -Wshadow -Weffc++ -pedantic -Wno-long-long -Wuninitialized -Wno-non-virtual-dtor -Wheader-hygiene)

 IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
  LIST( APPEND COMPILER_FLAGS -Wl,-no-undefined )


Use double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGE

Mimics the changes in r372209 to handle the change of quotes in
r372226. Probably isn't sufficient for windows, but unbreaks the cmake
flag at least.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@372791 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -867,7 +867,7 @@

 option(LLVM_BUILD_INSTRUMENTED_COVERAGE "Build LLVM and tools with Code Coverage instrumentation" Off)
 mark_as_advanced(LLVM_BUILD_INSTRUMENTED_COVERAGE)
-append_if(LLVM_BUILD_INSTRUMENTED_COVERAGE "-fprofile-instr-generate='${LLVM_PROFILE_FILE_PATTERN}' -fcoverage-mapping"
+append_if(LLVM_BUILD_INSTRUMENTED_COVERAGE "-fprofile-instr-generate=\"${LLVM_PROFILE_FILE_PATTERN}\" -fcoverage-mapping"
   CMAKE_CXX_FLAGS
   CMAKE_C_FLAGS
   CMAKE_EXE_LINKER_FLAGS


Pass the output directory; Ninja needs it.

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -670,9 +670,9 @@
 #---compiledata.h--------------------------------------------------------------------------------------------
 if(WIN32)
   # We cannot use the compiledata.sh script for windows
-  configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.win32.in include/compiledata.h NEWLINE_STYLE UNIX)
-else()
-  execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build/unix/compiledata.sh include/compiledata.h "${CXX}"
+  configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.win32.in ${CMAKE_BINARY_DIR}/include/compiledata.h NEWLINE_STYLE UNIX)
+else()
+  execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build/unix/compiledata.sh ${CMAKE_BINARY_DIR}/include/compiledata.h "${CXX}"
         "${CMAKE_CXX_FLAGS_RELEASE}" "${CMAKE_CXX_FLAGS_DEBUG}" "${CMAKE_CXX_FLAGS}"
         "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_FLAGS}"
         "${LibSuffix}" "${SYSLIBS}"


set R__CUDA_HAS_STD_STRING_VIEW to undef in all other cases

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -528,6 +528,7 @@
   endif()
 endif()

+set(cudahasstdstringview undef)
 if(found_stdstringview)
   CHECK_CXX_SOURCE_COMPILES("#include <string_view>
      int main() { size_t pos; std::string_view str; std::stod(str,&pos); return 0;}" found_stod_stringview)


add CMake macro for setting ISPC-side preprocessor definitions

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -79,6 +79,15 @@
   SET(ISPC_INCLUDE_DIR ${ISPC_INCLUDE_DIR} ${ARGN})
 ENDMACRO ()

+# ##################################################################
+# add macro ADD_DEFINITIONS_ISPC() that allows to specify
+# ISPC pre-processor definitions
+# ##################################################################
+SET(ISPC_DEFINITIONS "")
+MACRO (ADD_DEFINITIONS_ISPC)
+  SET(ISPC_DEFINITIONS ${ISPC_DEFINITIONS} ${ARGN})
+ENDMACRO ()
+
 MACRO (OSPRAY_ISPC_COMPILE)
   SET(ISPC_ADDITIONAL_ARGS "")
   SET(ISPC_TARGETS ${OSPRAY_ISPC_TARGET_LIST})
@@ -158,6 +167,7 @@
       OUTPUT ${results} ${ISPC_TARGET_DIR}/${fname}_ispc.h
       COMMAND ${CMAKE_COMMAND} -E make_directory ${outdir}
       COMMAND ${ISPC_EXECUTABLE}
+      ${ISPC_DEFINITIONS}
       -I ${CMAKE_CURRENT_SOURCE_DIR}
       ${ISPC_INCLUDE_DIR_PARMS}
       --arch=${ISPC_ARCHITECTURE}


reduce log

reduce log

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -45,7 +45,6 @@
 	get_filename_component(compiler ${CMAKE_CXX_COMPILER} NAME)
 	SET(CMAKI_COMPILER "${compiler}")
 ENDIF()
-MESSAGE("-- compiler detected: ${CMAKI_COMPILER}")

 IF(WIN32)
 	if(CMAKE_CL_64)
@@ -60,7 +59,6 @@
 		OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 	set(CMAKI_PLATFORM "${RESULT_VERSION}")
 ENDIF()
-MESSAGE("-- platform detected: ${CMAKI_PLATFORM}")

 function(cmaki_find_package PACKAGE)

@@ -199,7 +197,7 @@
 			file(REMOVE "${package_generated_file}")
 			file(REMOVE "${package_cmake_generated_file}")

-		# me lo he descargdo y existe
+		# me lo he descargdo y solo es descomprimirlo
 		elseif(EXISTS "${package_uncompressed_file}")

 			# 10. lo descomprimo cacheado
@@ -240,7 +238,7 @@
 	foreach(INCLUDE_DIR ${${PACKAGE_UPPER}_INCLUDE_DIRS})
 		list(APPEND CMAKI_INCLUDE_DIRS "${INCLUDE_DIR}")
 	endforeach()
-
+
 	# 14. añadir los libdir
 	foreach(LIB_DIR ${${PACKAGE_UPPER}_LIBRARIES})
 		list(APPEND CMAKI_LIBRARIES "${LIB_DIR}")


Static flags on gcc only

Static flags on gcc only


Seems like Eigen gets lost somewhere

Seems like Eigen gets lost somewhere

--- CMake/FindEigen.cmake
+++ CMake/FindEigen.cmake
@@ -95,6 +95,9 @@
   eigen3 # Default root directory for Eigen.
   Eigen/include/eigen3 ) # Windows (for C:/Program Files prefix).

+MESSAGE(status ${EIGEN_ROOT})
+file(GLOB EIGEN_CANDIDATES2 C:/projects/eigen/*/Eigen/Core)
+MESSAGE(status ${EIGEN_CANDIDATES2})
 file(GLOB EIGEN_CANDIDATES2 ${EIGEN_ROOT}/Eigen/Core)
 MESSAGE(status ${EIGEN_CANDIDATES2})
 file(GLOB EIGEN_CANDIDATES2 ${EIGEN_ROOT}/*/Eigen/Core)


BUG: avoid find_file and directly use SHARK_INCLUDE_DIR

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -102,14 +102,7 @@

 set(SHARK_USE_OPENMP_matched)
 #define SHARK_USE_OPENMP
-find_file( SHARK_H_FILE
-  NAMES shark/Core/Shark.h
-  PATHS ${SHARK_INSTALLDIR}
-  PATH_SUFFIXES include include/shark shark
-  )
-
-#define SHARK_USE_OPENMP
-file(STRINGS "${SHARK_H_FILE}" SHARK_H_CONTENTS)
+file(STRINGS "${SHARK_INCLUDE_DIR}/shark/Core/Shark.h" SHARK_H_CONTENTS)
 string(REGEX MATCH
   "#define.SHARK_USE_OPENMP"
   SHARK_USE_OPENMP_matched "${SHARK_H_CONTENTS}")


TODO: shark vs otb's openmp

TODO: shark vs otb's openmp

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -104,11 +104,11 @@
   "#define.SHARK_USE_OPENMP"
   SHARK_USE_OPENMP_matched "${SHARK_H_CONTENTS}")

-#this variable is added in cache but not used now
-# you can use it to see if shark installation has openMP
-# later if needed in other places..
+
 set(SHARK_USE_OPENMP FALSE CACHE BOOL "shark is built with OpenMP")
 if(SHARK_USE_OPENMP_matched)
+  #TODO: remove the previous set(SHARK_USE_OPENMP..
+  # and force OTB_USE_OPENMP
   set(SHARK_USE_OPENMP TRUE CACHE BOOL "shark is built with OpenMP" FORCE)
   message(STATUS "Shark is built with OpenMP: SHARK_USE_OPENMP = TRUE")
 else()


- export select_qt as an option to appear int he cmake cache to make it readily discoverable

--- ChooseQtVersion.cmake
+++ ChooseQtVersion.cmake
@@ -5,6 +5,7 @@

 cmake_minimum_required(VERSION 2.8.9)

+set(SELECT_QT "Any" CACHE STRING "The prefered Qt version one of: Qt5, Qt4 or Any" )
 if (DEFINED SELECT_QT)
   if (NOT (${SELECT_QT} MATCHES "Qt5" OR
            ${SELECT_QT} MATCHES "Qt4" OR


use inp that writes to a different output dir

don't overwrite the previous tests output

--- test/testing.cmake
+++ test/testing.cmake
@@ -299,7 +299,7 @@
     COMMAND diff -r -x .svn out_mesh/ good_mesh/
     WORKING_DIRECTORY ${MESHES}/phasta/4-1-Chef-Tet-Part/4-4-Chef-Part-ts20)
   mpi_test(chefReadUrPrep 4 ${CMAKE_CURRENT_BINARY_DIR}/chefReadUrPrep
-    ../../../model.dmg bz2:../good_mesh/ adapt.inp
+    ../../../model.dmg bz2:../good_mesh/ adapt.ur.inp
     WORKING_DIRECTORY ${MESHES}/phasta/4-1-Chef-Tet-Part/4-4-Chef-Part-ts20/run)
   if(ENABLE_ZOLTAN)
     mpi_test(chefReadRibUrPrep 4 ${CMAKE_CURRENT_BINARY_DIR}/chefReadUrPrep


update SIRF branch

update SIRF branch

--- version_config.cmake
+++ version_config.cmake
@@ -183,7 +183,7 @@

 else()
   # set(DEFAULT_SIRF_TAG v2.0.0)
-  set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes_merge_master)
+  set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240)


Try fix cmake libpq (#851)

Try fix cmake libpq (#851)

--- cmake/FindPQ.cmake
+++ cmake/FindPQ.cmake
@@ -5,11 +5,11 @@
 #   PQ_LIBRARY     : library path of postgres' pq

 FIND_PATH(PQ_INCLUDE_DIR NAME libpq-fe.h HINTS
-    $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include /usr/local/include/postgresql /usr/include/postgresql
+    $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include /usr/local/include/postgresql /usr/include/postgresql /usr/local/opt/libpq/include
 )

 FIND_LIBRARY(PQ_LIBRARY NAME pq HINTS
-    "$ENV{LIB_DIR}/lib" "$ENV{LIB}/lib" "$ENV{HOME}/local/lib64" "$ENV{HOME}/local/lib" /usr/local/lib64 /usr/local/lib /opt/local/lib64 /opt/local/lib /usr/lib64 /usr/lib
+    "$ENV{LIB_DIR}/lib" "$ENV{LIB}/lib" "$ENV{HOME}/local/lib64" "$ENV{HOME}/local/lib" /usr/local/lib64 /usr/local/lib /opt/local/lib64 /opt/local/lib /usr/lib64 /usr/lib /usr/local/opt/libpq/lib
 )

 IF(PQ_INCLUDE_DIR AND PQ_LIBRARY)


cmake(dotnet): don't run protoc on cp/assignment.proto


cmake(python): Add samples

cmake(python): Add samples

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -184,3 +184,61 @@
   add_test(NAME pytest_venv
     COMMAND ${VENV_Python_EXECUTABLE} ${VENV_DIR}/test.py)
 endif()
+
+# add_python_sample()
+# CMake function to generate and build python sample.
+# Parameters:
+#  the python filename
+# e.g.:
+# add_python_sample(foo.py)
+function(add_python_sample FILE_NAME)
+  get_filename_component(SAMPLE_NAME ${FILE_NAME} NAME_WE)
+  get_filename_component(SAMPLE_DIR ${FILE_NAME} DIRECTORY)
+  get_filename_component(COMPONENT_DIR ${SAMPLE_DIR} DIRECTORY)
+  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
+
+  if(BUILD_TESTING)
+    add_test(
+      NAME python_${COMPONENT_NAME}_${SAMPLE_NAME}
+      COMMAND ${VENV_Python_EXECUTABLE} ${FILE_NAME}
+      WORKING_DIRECTORY ${VENV_DIR})
+  endif()
+endfunction()
+
+# add_python_example()
+# CMake function to generate and build python sample.
+# Parameters:
+#  the python filename
+# e.g.:
+# add_python_example(foo.py)
+function(add_python_example FILE_NAME)
+  get_filename_component(EXAMPLE_NAME ${FILE_NAME} NAME_WE)
+  get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
+  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
+
+  if(BUILD_TESTING)
+    add_test(
+      NAME python_${COMPONENT_NAME}_${EXAMPLE_NAME}
+      COMMAND ${VENV_Python_EXECUTABLE} ${FILE_NAME}
+      WORKING_DIRECTORY ${VENV_DIR})
+  endif()
+endfunction()
+
+# add_python_test()
+# CMake function to generate and build python sample.
+# Parameters:
+#  the python filename
+# e.g.:
+# add_python_test(foo.py)
+function(add_python_test FILE_NAME)
+  get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
+  get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
+  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
+
+  if(BUILD_TESTING)
+    add_test(
+      NAME python_tests_${TEST_NAME}
+      COMMAND ${VENV_Python_EXECUTABLE} ${FILE_NAME}
+      WORKING_DIRECTORY ${VENV_DIR})
+  endif()
+endfunction()


Testsuite: Allow to use stdout as comparison for test outputs

This commit introduces an alternative to the current test setup:

If a test does not create a file "output" for further test comparison its
output to stdout is used to populate and output file instead. For
compatibility, if a test creates the "output" file the stdout stream is
discarded.

--- cmake/macros/macro_deal_ii_add_test.cmake
+++ cmake/macros/macro_deal_ii_add_test.cmake
@@ -204,16 +204,20 @@
         COMMAND
           rm -f ${_test_directory}/failing_output
         COMMAND
-          touch ${_test_directory}/output
-        COMMAND
-          ${_run_command}
-          || (mv ${_test_directory}/output
-                 ${_test_directory}/failing_output
+          rm -f ${_test_directory}/output
+        COMMAND
+          ${_run_command} > ${_test_directory}/stdout
+          || ((test -f ${_test_directory}/output ||
+               cp ${_test_directory}/stdout ${_test_directory}/output)
+              && mv ${_test_directory}/output ${_test_directory}/failing_output
               && echo "${_test_full}: BUILD successful."
               && echo "${_test_full}: RUN failed. ------ Result: ${_test_directory}/failing_output"
               && echo "${_test_full}: RUN failed. ------ Partial output:"
               && cat ${_test_directory}/failing_output
               && exit 1)
+        COMMAND
+          test -f ${_test_directory}/output ||
+          cp ${_test_directory}/stdout ${_test_directory}/output
         COMMAND ${PERL_EXECUTABLE}
           -pi ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/normalize.pl
           ${_test_directory}/output


BUG: ANTS_PSE_MSQ_IMG tests failures fixed

The PSE_MSQ_IMG tests were failing due to improper ordering of the
command line arguements.  This generated an error that caused the
entire command line to fail with an error message.

--- Examples/TestSuite/ANTS_PSE_MSQ_IMG_test.cmake
+++ Examples/TestSuite/ANTS_PSE_MSQ_IMG_test.cmake
@@ -12,7 +12,7 @@
  -r Gauss[6,0.25]
  -t SyN[1,2,0.1] -i 191x170x90x90x10
  -m PSE[${DEVIL_IMAGE},${ANGEL_IMAGE},${DEVIL_IMAGE},${ANGEL_IMAGE},0.25,0.1,100,0,10]
- -m MSQ[${DEVIL_IMAGE},${ANGEL_IMAGE},1,0.1]
+ -m MSQ[${DEVIL_IMAGE},${ANGEL_IMAGE},0.75,1]
  -o ${OUTPUT_PREFIX}.nii.gz
  --continue-affine 0 --number-of-affine-iterations 0 --geodesic 2)


cmake: hide not so important vars

cmake: hide not so important vars

so that all vars fit on my screen

--- scripts/cmake/ElektraCache.cmake
+++ scripts/cmake/ElektraCache.cmake
@@ -403,6 +403,7 @@
 	XercesC_DIR
 	OPENSSL_INCLUDE_DIR
 	LUA_EXECUTABLE # The following settings are internal (not to be changed by users):
+	FEDORA
 	CARGO_EXECUTABLE
 	DIFF_COMMAND
 	GLib_CONFIG_INCLUDE_DIR
@@ -441,6 +442,7 @@
 	ADDED_DIRECTORIES
 	ADDED_PLUGINS
 	REMOVED_PLUGINS
+	REMOVED_TOOLS
 	ADDED_BINDINGS
 	LIBGCRYPTCONFIG_EXECUTABLE
 	jna


Escape configured values of project-info.xml.

Needed when last commit message contains ".

	* build-aux/cmake/modules/Gostai.cmake: here.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -259,7 +259,18 @@
     # Configure project information.
     configure_file(
       ${CMAKE_MODULE_PATH}/project-info.docbook.in
-      ${CMAKE_CURRENT_BINARY_DIR}/project-info.xml)
+      ${CMAKE_CURRENT_BINARY_DIR}/project-info.xml
+      ESCAPE_QUOTES)
+    # \" => "
+    file(READ
+      ${CMAKE_CURRENT_BINARY_DIR}/project-info.xml
+      XML_FILE)
+    string(REPLACE "\\\"" """
+      XML_FILE
+      ${XML_FILE})
+    file(WRITE
+      ${CMAKE_CURRENT_BINARY_DIR}/project-info.xml
+      "${XML_FILE}")
     # Configure Gostai information.
     configure_file(
       ${CMAKE_MODULE_PATH}/gostai-info.docbook.in


CI: build GLRenderSystem on Windows

CI: build GLRenderSystem on Windows

--- ci-build.cmake
+++ ci-build.cmake
@@ -41,7 +41,7 @@
     set(GENERATOR -G "Visual Studio 15")
     set(RENDERSYSTEMS
         -DOGRE_BUILD_RENDERSYSTEM_D3D9=FALSE
-        -DOGRE_BUILD_RENDERSYSTEM_GL=FALSE
+        -DOGRE_BUILD_RENDERSYSTEM_GL=TRUE
         -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=TRUE)

     set(OTHER


CMake: added debug output for target dependencies

--- cmake/templates/mod_package_template.cmake
+++ cmake/templates/mod_package_template.cmake
@@ -9,6 +9,10 @@
 # @package_name@_LINK_FLAGS
 #

+get_filename_component(PARENT_DIR ${CMAKE_PARENT_LIST_FILE} DIRECTORY)
+get_filename_component(PARENT_NAME ${PARENT_DIR} NAME)
+ivw_debug_message(STATUS "${PARENT_NAME} added dependency on @_project_name@")
+
 set(BUILD_@package_name@ 1)
 set(@package_name@_PROJECT @_project_name@)
 set(@package_name@_FOUND 1)


Expose EP refactoring to build system.

Expose EP refactoring to build system.

--- cmake/ep.cmake
+++ cmake/ep.cmake
@@ -1,9 +1,9 @@
 message(STATUS "Prime elliptic curve arithmetic configuration (EP module):\n")

 message("   ** Options for the binary elliptic curve module (default = all on):")
-message("      EP_ORDIN=[off|on] Support for ordinary curves.")
+message("      EP_PLAIN=[off|on] Support for ordinary curves without endomorphisms.")
 message("      EP_SUPER=[off|on] Support for supersingular curves.")
-message("      EP_KBLTZ=[off|on] Special support for Koblitz curves.")
+message("      EP_ENDOM=[off|on] Support for ordinary curves with endomorphisms.")
 message("      EP_MIXED=[off|on] Use mixed coordinates.\n")
 message("      EP_PRECO=[off|on] Build precomputation table for generator.")
 message("      EP_DEPTH=w        Width w in [2,6] of precomputation table for fixed point methods.")
@@ -39,10 +39,10 @@
 set(EP_DEPTH "${EP_DEPTH}" CACHE STRING "Width of precomputation table for fixed point methods.")
 set(EP_WIDTH "${EP_WIDTH}" CACHE STRING "Width of window processing for unknown point methods.")

-option(EP_ORDIN "Support for ordinary curves" on)
+option(EP_PLAIN "Support for ordinary curves" on)
 option(EP_SUPER "Support for supersingular curves" on)
 option(EP_MIXED "Use mixed coordinates" on)
-option(EP_KBLTZ "Special support for Koblitz curves" on)
+option(EP_ENDOM "Special support for Koblitz curves" on)
 option(EP_PRECO "Build precomputation table for generator" on)

 # Choose the arithmetic methods.


[cmake] Deprecate Alien, as agreed with ALICE.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -77,7 +77,7 @@
 #   The default value can be changed as many times as we wish before calling ROOT_APPLY_OPTIONS()
 #--------------------------------------------------------------------------------------------------

-ROOT_BUILD_OPTION(alien OFF "Enable support for AliEn (requires libgapiUI from ALICE)")
+ROOT_BUILD_OPTION(alien OFF "Enable support for AliEn (requires libgapiUI from ALICE, deprecated)")
 ROOT_BUILD_OPTION(arrow OFF "Enable support for Apache Arrow")
 ROOT_BUILD_OPTION(asimage ON "Enable support for image processing via libAfterImage")
 ROOT_BUILD_OPTION(asserts OFF "Enable asserts (defaults to ON for CMAKE_BUILD_TYPE=Debug and/or dev=ON)")
@@ -409,11 +409,11 @@
 endforeach()

 #---Deprecated options------------------------------------------------------------------------
-# foreach(opt some-deprecated-op)
-#  if(${opt})
-#    message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in the next release of ROOT. Please contact root-dev@cern.ch should you still need it.")
-#  endif()
-#endforeach()
+foreach(opt alien)
+  if(${opt})
+    message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in the next release of ROOT. Please contact root-dev@cern.ch should you still need it.")
+  endif()
+endforeach()

 #---Replaced options--------------------------------------------------------------------------
 if(python)


Forcing overwrite default compression settings in case of wrong input value (default value is lz4)

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -190,8 +190,8 @@
 #--- Compression algorithms in ROOT-------------------------------------------------------------
 if(NOT compression_default MATCHES "zlib|lz4|lzma")
   message(STATUS "Not supported compression algorithm, ROOT compression algorithms are zlib, lzma and lz4.
-    ROOT will fall back to default algorithm setting: lz4")
-  set(compression_default "lz4" CACHE STRING)
+    ROOT will fall back to default algorithm: lz4")
+  set(compression_default "lz4" CACHE STRING "" FORCE)
 else()
   message(STATUS "ROOT default compression algorithm is " ${compression_default})
 endif()


add minuit2 on by default (#8689)

add minuit2 on by default (#8689)

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -142,7 +142,7 @@
 ROOT_BUILD_OPTION(mathmore ON "Build libMathMore extended math library (requires GSL)")
 ROOT_BUILD_OPTION(memory_termination OFF "Free internal ROOT memory before process termination (experimental, used for leak checking)")
 ROOT_BUILD_OPTION(mlp ON "Enable support for TMultilayerPerceptron classes' federation")
-ROOT_BUILD_OPTION(minuit2 OFF "Build Minuit2 minimization library")
+ROOT_BUILD_OPTION(minuit2 ON "Build Minuit2 minimization library")
 ROOT_BUILD_OPTION(monalisa OFF "Enable support for monitoring with Monalisa (requires libapmoncpp)")
 ROOT_BUILD_OPTION(mpi OFF "Enable support for Message Passing Interface (MPI)")
 ROOT_BUILD_OPTION(mysql ON "Enable support for MySQL databases")


Correct the RPATH for fix location installations (gnuinstall)

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -258,7 +258,7 @@
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # point to directories outside the build tree to the install RPATH

 # Check whether to add RPATH to the installation (the build tree always has the RPATH enabled)
-if(rpath)
+if(rpath OR gnuinstall)
   set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) # install LIBDIR
   set(CMAKE_SKIP_INSTALL_RPATH FALSE)          # don't skip the full RPATH for the install tree
 elseif(APPLE)


Minor whitespace changes

Minor whitespace changes

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -70,13 +70,13 @@
     _testrunner
     _outputname
 )
-    if(NOT lcov_path)
+    if (NOT lcov_path)
         message(FATAL_ERROR "lcov not found!")
-    endif()
+    endif ()

-    if(NOT genhtml_path)
+    if (NOT genhtml_path)
         message(FATAL_ERROR "genhtml not found!")
-    endif()
+    endif ()

     set(coverage_info "${CMAKE_BINARY_DIR}/${_outputname}.info")
     set(coverage_cleaned "${coverage_info}.cleaned")


CMake: remove unneeded dependency with OpenBLAS

Summary:
Do not try to link against `libcblas.so` when using the OpenBLAS
back-end. This fixes #763.

I briefly checked the OpenBLAS repository and as far as I can tell, the OpenBLAS build script by build never created a library called _cblas_.
Closes https://github.com/caffe2/caffe2/pull/1420

Differential Revision: D6283019

Pulled By: pietern

fbshipit-source-id: 53cd4455bdc63ee9f31d5bca9822844548350ae3

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -54,7 +54,6 @@
   find_package(OpenBLAS REQUIRED)
   caffe2_include_directories(${OpenBLAS_INCLUDE_DIR})
   list(APPEND Caffe2_DEPENDENCY_LIBS ${OpenBLAS_LIB})
-  list(APPEND Caffe2_DEPENDENCY_LIBS cblas)
 elseif(BLAS STREQUAL "MKL")
   find_package(MKL REQUIRED)
   caffe2_include_directories(${MKL_INCLUDE_DIR})


Add support for separating UTF arguments from runtime arguments

--- cmake/DevBaseMacro.cmake
+++ cmake/DevBaseMacro.cmake
@@ -168,13 +168,22 @@
 #
 # SCOPE: Some prefix. Often the lib name of the lib being tested
 # NAME : Name of test module, without extension
+# UTF_ARGUMENTS_SEPARATOR: String to put between the command and the
+#     UTF arguments.
+#     TODO: This is how it could work:
+#     <command> <runtime_arguments>
+#         <utf_arguments_separator> <utf_arguments>
+#         <command_arguments_separator> <command_arguments>
+#     HPX: utf_arguments_separator == '--'
+#     UTF: command_arguments_separator == '--'
+#         (so this separator doesn't have to be passed in!)
 # LINK_LIBRARIES: Libraries to link against
 # DEPENDENCIES: Targets this test target depends on
 # ENVIRONMENT: Environment variables that should be defined for running
 #     the test
 macro(add_unit_test)
     set(OPTIONS "")
-    set(ONE_VALUE_ARGUMENTS SCOPE NAME)
+    set(ONE_VALUE_ARGUMENTS SCOPE NAME UTF_ARGUMENTS_SEPARATOR)
     set(MULTI_VALUE_ARGUMENTS
         SUPPORT_NAMES
         INCLUDE_DIRS
@@ -220,7 +229,9 @@
         # catch_system_errors: Prevent UTF to detect system errors. This
         #     messes things up when doing system calls to Python unit tests.
         #     See also: http://lists.boost.org/boost-users/2009/12/55048.php
-        COMMAND ${TEST_EXE_NAME} --catch_system_errors=no)
+        COMMAND ${TEST_EXE_NAME} ${ADD_UNIT_TEST_UTF_ARGUMENTS_SEPARATOR}
+            --catch_system_errors=no
+    )

     if(ADD_UNIT_TEST_DEPENDENCIES)
         ADD_DEPENDENCIES(${TEST_EXE_NAME} ${ADD_UNIT_TEST_DEPENDENCIES})
@@ -248,7 +259,7 @@

 function(add_unit_tests)
     set(OPTIONS "")
-    set(ONE_VALUE_ARGUMENTS SCOPE)
+    set(ONE_VALUE_ARGUMENTS SCOPE UTF_ARGUMENTS_SEPARATOR)
     set(MULTI_VALUE_ARGUMENTS
         NAMES
         SUPPORT_NAMES
@@ -273,6 +284,7 @@
         add_unit_test(
             SCOPE ${ADD_UNIT_TESTS_SCOPE}
             NAME ${NAME}
+            UTF_ARGUMENTS_SEPARATOR ${ADD_UNIT_TESTS_UTF_ARGUMENTS_SEPARATOR}
             SUPPORT_NAMES ${ADD_UNIT_TESTS_SUPPORT_NAMES}
             INCLUDE_DIRS ${ADD_UNIT_TESTS_INCLUDE_DIRS}
             OBJECT_LIBRARIES ${ADD_UNIT_TESTS_OBJECT_LIBRARIES}


-apply same patch as in kdelibs/cmake/modules/, don't append /lib to CMAKE_INSTALL_PREFIX, since
this is already part of PATH_SUFFIXES

Alex

svn path=/trunk/kdesupport/phonon/; revision=829707

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -32,7 +32,7 @@
              PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4
              PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH}
                    ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
-                   ${CMAKE_INSTALL_PREFIX}/lib
+                   ${CMAKE_INSTALL_PREFIX}
              NO_DEFAULT_PATH )
 endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")


Add .. directory hint for FindSenseKit.cmake. Supports the common case of building examples under the SDk directory

--- cmake/FindSenseKit.cmake
+++ cmake/FindSenseKit.cmake
@@ -23,6 +23,7 @@
 set(FIND_SENSEKIT_PATHS
     ${SENSEKIT_ROOT}
     $ENV{SENSEKIT_ROOT}
+    ..
     ~/Library/Frameworks
     /Library/Frameworks
     /usr/local


replace MinGW toolchain file

replace MinGW toolchain file

--- cmake/i486-mingw32.cmake
+++ cmake/i486-mingw32.cmake
@@ -1,29 +1,18 @@
-#!/bin/sh
-#
-# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Thomas Cort <linuxgeek@gmail.com>
-#
-# This file is part of TinyPoker.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# Based on http://www.cmake.org/Wiki/CmakeMingw

-set (CMAKE_SYSTEM_NAME Windows)
-set (CMAKE_C_COMPILER i486-mingw32-gcc)
-set (CMAKE_CXX_COMPILER i486-mingw32-g++)
-set (CMAKE_FIND_ROOT_PATH /usr/i486-mingw32/)
-set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set (CMAKE_INSTALL_PREFIX /usr/i486-mingw32/)
-set (RUN_TESTS_WITH_WINE 1)
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)

+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i486-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER i486-mingw32-g++)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH  /usr/i486-mingw32)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


probably older cmakes don't like strequal that way

--- cmake/packages/rpm.cmake
+++ cmake/packages/rpm.cmake
@@ -10,9 +10,9 @@
 ################################################################################

 # deploy the Init script:
-if (${RPM_DISTRO} STREQUAL "SUSE13")
+if (RPM_DISTRO STREQUAL "SUSE13")
   set(RPM_INIT_SCRIPT "${PROJECT_SOURCE_DIR}/Installation/rpm/rc.arangod.OpenSuSE_13")
-elseif (${RPM_DISTRO} STREQUAL "SUSE")
+elseif (RPM_DISTRO STREQUAL "SUSE")
   set(RPM_INIT_SCRIPT "${PROJECT_SOURCE_DIR}/Installation/rpm/rc.arangod.OpenSuSE")
 else () # fall back to centos:
   set(RPM_INIT_SCRIPT "${PROJECT_SOURCE_DIR}/Installation/rpm/rc.arangod.Centos")


Cleanup pcl_find_sse.

Cleanup pcl_find_sse.

Only look for SSE flags when compiler does not support -march=native.
Don't blindly set -march=native for compilers other than APPLE and MSVC.

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@4725 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -1,133 +1,143 @@
 ###############################################################################
 # Check for the presence of SSE and figure out the flags to use for it.
 macro(PCL_CHECK_FOR_SSE)
-    include(CheckCXXSourceRuns)
     set(SSE_FLAGS)
-    set(CMAKE_REQUIRED_FLAGS)
-
-    check_cxx_source_runs("
-        #include <mm_malloc.h>
-        int main()
-        {
-          void* mem = _mm_malloc (100, 16);
-          return 0;
-        }"
-        HAVE_MM_MALLOC)
-
-    check_cxx_source_runs("
-        #include <stdlib.h>
-        int main()
-        {
-          void* mem;
-          return posix_memalign (&mem, 16, 100);
-        }"
-        HAVE_POSIX_MEMALIGN)

     if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse4.1")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+        execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion"
+                        OUTPUT_VARIABLE GCC_VERSION_STRING)
+        if(GCC_VERSION_STRING VERSION_GREATER 4.2 AND NOT APPLE)
+          SET(SSE_FLAGS "${SSE_FLAGS} -march=native")
+          message(STATUS "Using CPU native flags for SSE optimization: ${SSE_FLAGS}")
+        endif()
+    endif()

-    check_cxx_source_runs("
-        #include <smmintrin.h>
-        int main()
-        {
-          __m128 a, b;
-          float vals[4] = {1, 2, 3, 4};
-          const int mask = 123;
-          a = _mm_loadu_ps(vals);
-          b = a;
-          b = _mm_dp_ps (a, a, mask);
-          _mm_storeu_ps(vals,b);
-          return 0;
-        }"
-        HAVE_SSE4_1_EXTENSIONS)
+    if (NOT SSE_FLAGS)
+      include(CheckCXXSourceRuns)
+      set(CMAKE_REQUIRED_FLAGS)

-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse3")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+      check_cxx_source_runs("
+          #include <mm_malloc.h>
+          int main()
+          {
+            void* mem = _mm_malloc (100, 16);
+            return 0;
+          }"
+          HAVE_MM_MALLOC)

-    check_cxx_source_runs("
-        #include <pmmintrin.h>
-        int main()
-        {
-            __m128d a, b;
-            double vals[2] = {0};
-            a = _mm_loadu_pd(vals);
-            b = _mm_hadd_pd(a,a);
-            _mm_storeu_pd(vals, b);
-            return 0;
-        }"
-        HAVE_SSE3_EXTENSIONS)
+      check_cxx_source_runs("
+          #include <stdlib.h>
+          int main()
+          {
+            void* mem;
+            return posix_memalign (&mem, 16, 100);
+          }"
+          HAVE_POSIX_MEMALIGN)

-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse2")
-    elseif(MSVC AND NOT CMAKE_CL_64)
-        set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-
-    check_cxx_source_runs("
-        #include <emmintrin.h>
-        int main()
-        {
-            __m128d a, b;
-            double vals[2] = {0};
-            a = _mm_loadu_pd(vals);
-            b = _mm_add_pd(a,a);
-            _mm_storeu_pd(vals,b);
-            return 0;
-        }"
-        HAVE_SSE2_EXTENSIONS)
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse4.1")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)

-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse")
-    elseif(MSVC AND NOT CMAKE_CL_64)
-        set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-
-    check_cxx_source_runs("
-        #include <xmmintrin.h>
-        int main()
-        {
+      check_cxx_source_runs("
+          #include <smmintrin.h>
+          int main()
+          {
             __m128 a, b;
-            float vals[4] = {0};
+            float vals[4] = {1, 2, 3, 4};
+            const int mask = 123;
             a = _mm_loadu_ps(vals);
             b = a;
-            b = _mm_add_ps(a,b);
+            b = _mm_dp_ps (a, a, mask);
             _mm_storeu_ps(vals,b);
             return 0;
-        }"
-        HAVE_SSE_EXTENSIONS)
+          }"
+          HAVE_SSE4_1_EXTENSIONS)

-    set(CMAKE_REQUIRED_FLAGS)
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse3")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)

-    if (NOT APPLE AND NOT MSVC)
-        SET(SSE_FLAGS "${SSE_FLAGS} -march=native")
-    elseif (APPLE)
-        if (HAVE_SSE4_1_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1 -mfpmath=sse")
-            message(STATUS "Found SSE4.1 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE3_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse3 -mfpmath=sse")
-            message(STATUS "Found SSE3 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE2_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse2 -mfpmath=sse")
-            message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse -mfpmath=sse")
-            message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
-        else (HAVE_SSE4_1_EXTENSIONS)
-            message(STATUS "No SSE extensions found")
-        endif(HAVE_SSE4_1_EXTENSIONS)
-    elseif (MSVC AND NOT CMAKE_CL_64)
-        if(HAVE_SSE2_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
-            message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE")
-            message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
-        endif(HAVE_SSE2_EXTENSIONS)
-    endif (NOT APPLE AND NOT MSVC)
-
+      check_cxx_source_runs("
+          #include <pmmintrin.h>
+          int main()
+          {
+              __m128d a, b;
+              double vals[2] = {0};
+              a = _mm_loadu_pd(vals);
+              b = _mm_hadd_pd(a,a);
+              _mm_storeu_pd(vals, b);
+              return 0;
+          }"
+          HAVE_SSE3_EXTENSIONS)
+
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse2")
+      elseif(MSVC AND NOT CMAKE_CL_64)
+          set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+      check_cxx_source_runs("
+          #include <emmintrin.h>
+          int main()
+          {
+              __m128d a, b;
+              double vals[2] = {0};
+              a = _mm_loadu_pd(vals);
+              b = _mm_add_pd(a,a);
+              _mm_storeu_pd(vals,b);
+              return 0;
+          }"
+          HAVE_SSE2_EXTENSIONS)
+
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse")
+      elseif(MSVC AND NOT CMAKE_CL_64)
+          set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+      check_cxx_source_runs("
+          #include <xmmintrin.h>
+          int main()
+          {
+              __m128 a, b;
+              float vals[4] = {0};
+              a = _mm_loadu_ps(vals);
+              b = a;
+              b = _mm_add_ps(a,b);
+              _mm_storeu_ps(vals,b);
+              return 0;
+          }"
+          HAVE_SSE_EXTENSIONS)
+
+      set(CMAKE_REQUIRED_FLAGS)
+
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          if (HAVE_SSE4_1_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1 -mfpmath=sse")
+              message(STATUS "Found SSE4.1 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE3_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse3 -mfpmath=sse")
+              message(STATUS "Found SSE3 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE2_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse2 -mfpmath=sse")
+              message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse -mfpmath=sse")
+              message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
+          else (HAVE_SSE4_1_EXTENSIONS)
+              message(STATUS "No SSE extensions found")
+          endif(HAVE_SSE4_1_EXTENSIONS)
+      elseif (MSVC)
+          if(HAVE_SSE2_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
+              message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE")
+              message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
+          endif(HAVE_SSE2_EXTENSIONS)
+      endif ()
+
+    endif()
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${SSE_FLAGS}")


MAINT: remove legacy CMake endif()

MAINT: remove legacy CMake endif()

* clean up a case where CMake endif()
contained the conditional used in the
if(), which is no longer needed /
discouraged since our minimum required
CMake version supports the modern syntax

--- cmake/system_check.cmake
+++ cmake/system_check.cmake
@@ -15,7 +15,7 @@
     EXECUTE_PROCESS( COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM)
       if(${OPERATING_SYSTEM} MATCHES "Android")
         set(HOST_OS ANDROID)
-      endif(${OPERATING_SYSTEM} MATCHES "Android")
+      endif()
 endif()


exclude matlab from the "all" modules set

Change-Id: I74b79d89a7728e4ab318e1311e6dcc8a1380f0a9

--- Filters/Matlab/module.cmake
+++ Filters/Matlab/module.cmake
@@ -9,4 +9,5 @@
     vtksys
   EXCLUDE_FROM_WRAPPING
   EXCLUDE_FROM_WRAP_HIERARCHY
+  EXCLUDE_FROM_ALL
   )


Add missing include dirs for RPi

Add missing include dirs for RPi

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -26,6 +26,7 @@
   PUBLIC
   ${PROJECT_SOURCE_DIR}/platforms/common
   ${PROJECT_SOURCE_DIR}/platforms/linux/src
+  ${PROJECT_SOURCE_DIR}/platforms/rpi/src
   /opt/vc/include/
   /opt/vc/include/interface/vcos/pthreads
   /opt/vc/include/interface/vmcs_host/linux


Install of export file bis

Install of export file bis

--- cmake/MyPackageExport.cmake
+++ cmake/MyPackageExport.cmake
@@ -11,6 +11,6 @@
     STATIC_DEFINE ${PROJECT_NAME}_STATIC)
   ADD_CUSTOM_TARGET(${PROJECT_NAME}Export SOURCES "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
   INSTALL(FILES ${_file} DESTINATION ${_dir})
-  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION ${PROJECT_NAME})
+  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION include/${PROJECT_NAME}/)

 ENDMACRO()


Added defines for _HAVE_ISNAN, _HAVE_FINITE and _HAVE_ISINF.

svn path=/trunk/; revision=9613

--- config.h.cmake
+++ config.h.cmake
@@ -40,6 +40,9 @@
 /* Define if finite is available */
 #cmakedefine HAVE_FINITE

+/* Define if _finite is available */
+#cmakedefine _HAVE_FINITE
+
 /* Define if [freetype] is available */
 #cmakedefine HAVE_FREETYPE

@@ -61,8 +64,14 @@
 /* Define if isinf is available */
 #cmakedefine HAVE_ISINF

+/* Define if _isinf is available */
+#cmakedefine _HAVE_ISINF
+
 /* Define if isnan is available */
 #cmakedefine HAVE_ISNAN
+
+/* Define if _isnan is available */
+#cmakedefine _HAVE_ISNAN

 /* Define if snprintf is available */
 #ifndef PL_HAVE_SNPRINTF


remove obsolete comment regarding python tests on linux

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -236,8 +236,6 @@
 # creates a Python test with the given name whose main module is in
 # test/name.py.  It does nothing if Python is not installed.
 function(py_test name)
-  # We are not supporting Python tests on Linux yet as they consider
-  # all Linux environments to be google3 and try to use google3 features.
   if (PYTHONINTERP_FOUND)
     # ${CMAKE_BINARY_DIR} is known at configuration time, so we can
     # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known


Added requirement openCV 3.1 needed for grabcut

--- src/cmake/findDependencies.cmake
+++ src/cmake/findDependencies.cmake
@@ -2,7 +2,8 @@
 #
 # you may need to set OpenCV_DIR variable to the absolute path to the directory
 # containing OpenCVConfig.cmake file via the command line or GUI
-find_package(OpenCV REQUIRED)
+#find_package(OpenCV REQUIRED)
+find_package(OpenCV 3.1.0 EXACT REQUIRED)

 # If the package has been found, several variables will
 # be set, you can find the full list with descriptions


Support specifying test as component in FindCAF

This patch makes it possible to look for the include directories of the
unit test suite. The CMake command

        find_package(CAF core io test)

now adds CAF_INCLUDE_DIR_TEST to the list of includes directories and
also appends it to CAF_INCLUDE_DIRS.

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -24,6 +24,8 @@
   string(TOUPPER "${comp}" UPPERCOMP)
   if ("${comp}" STREQUAL "core")
     set(HDRNAME "caf/all.hpp")
+  elseif ("${comp}" STREQUAL "test")
+    set(HDRNAME "caf/test/unit_test.hpp")
   else ()
     set(HDRNAME "caf/${comp}/all.hpp")
   endif ()
@@ -59,7 +61,7 @@
     endif()
     # look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs
     # skip probe_event as it is header only
-    if (NOT ${comp} STREQUAL "probe_event")
+    if (NOT ${comp} STREQUAL "probe_event" AND NOT ${comp} STREQUAL "test")
       if (CAF_ROOT_DIR)
         set(library_hints "${CAF_ROOT_DIR}/lib")
       endif ()


Reformat comments and function invocation

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -12,9 +12,10 @@
 #
 # Variables defined by this module:
 #
-# CAF_FOUND              System has CAF headers and library CAF_LIBRARIES List
-# of library files  for all components CAF_INCLUDE_DIRS       List of include
-# paths for all components CAF_LIBRARY_$C         Library file for component $C
+# CAF_FOUND              System has CAF headers and library
+# CAF_LIBRARIES          List of library files for all components
+# CAF_INCLUDE_DIRS       List of include paths for all components
+# CAF_LIBRARY_$C         Library file for component $C
 # CAF_INCLUDE_DIR_$C     Include path for component $C

 if (CAF_FIND_COMPONENTS STREQUAL "")
@@ -98,11 +99,8 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(
   CAF
-  FOUND_VAR
-  CAF_FOUND
-  REQUIRED_VARS
-  CAF_LIBRARIES
-  CAF_INCLUDE_DIRS
+  FOUND_VAR CAF_FOUND
+  REQUIRED_VARS CAF_LIBRARIES CAF_INCLUDE_DIRS
   HANDLE_COMPONENTS)

 # final step to tell CMake we're done


FinICU fixes [ci skip]

FinICU fixes [ci skip]

--- cmake/FindICU.cmake
+++ cmake/FindICU.cmake
@@ -133,7 +133,8 @@
     PATHS ${ICU_ROOT_DIR}
     PATH_SUFFIXES ${_ICU_POSSIBLE_INCLUDE_SUFFIXES}
     DOC "ICU include directory"
-    NO_DEFAULT_PATH)
+    # NO_DEFAULT_PATH
+    )
 ELSE (ICU_ROOT_DIR)
   # Use default path search
   FIND_PATH (ICU_INCLUDE_DIR
@@ -155,7 +156,8 @@
     NAMES icuinfo
     PATHS ${ICU_ROOT_DIR}
     PATH_SUFFIXES ${_ICU_POSSIBLE_BIN_SUFFIXES}
-    NO_DEFAULT_PATH)
+    # NO_DEFAULT_PATH
+    )
 ELSE (ICU_ROOT_DIR)
   FIND_PROGRAM (ICU_BINARY_DIR
     NAMES icuinfo
@@ -189,36 +191,46 @@

 IF (NOT DEFINED ICU_CONFIG_EXECUTABLE)
   FIND_PROGRAM (ICU_CONFIG_EXECUTABLE icu-config PATH ${ICU_ROOT_DIR})
-
-  IF (ICU_CONFIG_EXECUTABLE)
-
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE
-      _ICU_C_FLAGS)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE
-      _ICU_CXX_FLAGS)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cppflags OUTPUT_VARIABLE
-      _ICU_CPP_FLAGS)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE
-      _ICU_LINK_FLAGS)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --ldflags-layout OUTPUT_VARIABLE
-      _ICU_LINK_LAYOUT_FLAGS)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --ldflags-icuio OUTPUT_VARIABLE
-      _ICU_LINK_IO_FLAGS)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cflags-dynamic
-      OUTPUT_VARIABLE _ICU_C_FLAGS_SHARED)
-    EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cxxflags-dynamic
-      OUTPUT_VARIABLE _ICU_CXX_FLAGS_SHARED)
-
-    IF (APPLE)
-      # Both are set to -dynamic which results in compilation errors: set to
-      # empty
-      SET (_ICU_C_FLAGS_SHARED "")
-      SET (_ICU_CXX_FLAGS_SHARED "")
-    ENDIF (APPLE)
-  ENDIF (ICU_CONFIG_EXECUTABLE)
-ENDIF (NOT DEFINED ICU_CONFIG_EXECUTABLE)
+ENDIF ()
+
+IF (ICU_CONFIG_EXECUTABLE)
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE _ICU_C_FLAGS)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_C_FLAGS "${_ICU_C_FLAGS}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE _ICU_CXX_FLAGS)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_CXX_FLAGS "${_ICU_CXX_FLAGS}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cppflags OUTPUT_VARIABLE _ICU_CPP_FLAGS)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_CPP_FLAGS "${_ICU_CPP_FLAGS}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE _ICU_LINK_FLAGS)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_LINK_FLAGS "${_ICU_LINK_FLAGS}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --ldflags-layout OUTPUT_VARIABLE _ICU_LINK_LAYOUT_FLAGS)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_LINK_LAYOUT_FLAGS "${_ICU_LINK_LAYOUT_FLAGS}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --ldflags-icuio OUTPUT_VARIABLE _ICU_LINK_IO_FLAGS)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_LINK_IO_FLAGS "${_ICU_LINK_IO_FLAGS}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cflags-dynamic OUTPUT_VARIABLE _ICU_C_FLAGS_SHARED)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_C_FLAGS_SHARED "${_ICU_C_FLAGS_SHARED}")
+
+  EXEC_PROGRAM (${ICU_CONFIG_EXECUTABLE} ARGS --cxxflags-dynamic OUTPUT_VARIABLE _ICU_CXX_FLAGS_SHARED)
+  STRING(REGEX REPLACE "[\r\n]$" "" _ICU_CXX_FLAGS_SHARED "${_ICU_CXX_FLAGS_SHARED}")
+
+  IF (APPLE)
+    # Both are set to -dynamic which results in compilation errors: set to
+    # empty
+    SET (_ICU_C_FLAGS_SHARED "")
+    SET (_ICU_CXX_FLAGS_SHARED "")
+  ENDIF (APPLE)
+ENDIF (ICU_CONFIG_EXECUTABLE)

 IF (ICU_INCLUDE_DIR)
+
+  MESSAGE(STATUS "... ICU_INCLUDE_DIR is ${ICU_INCLUDE_DIR}")
+
   # ICU 4 version numbers header
   SET (_ICU_VERSION_HEADER ${ICU_INCLUDE_DIR}/unicode/uvernum.h)

@@ -314,8 +326,10 @@
     IF (ICU_ROOT_DIR)
       FIND_LIBRARY (${_ICU_LIBRARY_BASE}_DEBUG
 	NAMES ${_ICU_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATHS ${ICU_ROOT_DIR} PATH_SUFFIXES ${_ICU_POSSIBLE_LIB_SUFFIXES}
-	NO_DEFAULT_PATH)
+	PATHS ${ICU_ROOT_DIR}
+	PATH_SUFFIXES ${_ICU_POSSIBLE_LIB_SUFFIXES}
+	# NO_DEFAULT_PATH
+	)
     ELSE (ICU_ROOT_DIR)
       FIND_LIBRARY (${_ICU_LIBRARY_BASE}_DEBUG
 	NAMES ${_ICU_COMPONENT_POSSIBLE_DEBUG_NAMES}
@@ -327,7 +341,8 @@
       FIND_LIBRARY (${_ICU_LIBRARY_BASE}_RELEASE
 	NAMES ${_ICU_COMPONENT_POSSIBLE_RELEASE_NAMES}
 	PATHS ${ICU_ROOT_DIR} PATH_SUFFIXES ${_ICU_POSSIBLE_LIB_SUFFIXES}
-	NO_DEFAULT_PATH)
+	# NO_DEFAULT_PATH
+	)
     ELSE (ICU_ROOT_DIR)
       FIND_LIBRARY (${_ICU_LIBRARY_BASE}_RELEASE
 	NAMES ${_ICU_COMPONENT_POSSIBLE_RELEASE_NAMES}


CMake build type: set default Develop profile

Adding also comments for multiconfig/property set.

--- cmake/profile.cmake
+++ cmake/profile.cmake
@@ -1,5 +1,11 @@
 # Copyright (c) 2020 ARM Limited. All rights reserved.
 # SPDX-License-Identifier: Apache-2.0
+
+# Set Develop as our default type if no other selected
+if(NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Develop" CACHE
+        STRING "The type of build" FORCE)
+endif()

 # Mapping CMAKE_BUILD_TYPE into MBED_BUILD_TYPES, as we understand only 3 profiles
 set(MBED_BUILD_TYPES Debug Release Develop)
@@ -11,8 +17,10 @@

 get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
 if(multi_config)
+  # multi configuration generators do not support build type, providing a list only
   set(CMAKE_CONFIGURATION_TYPES "${MBED_BUILD_TYPES}" CACHE STRING "List of supported build types" FORCE)
 else()
+  # Set the possible values of build type for cmake-gui
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${MBED_BUILD_TYPES}")
   if(NOT LOWERCASE_CMAKE_BUILD_TYPE IN_LIST LOWERCASE_MBED_BUILD_TYPES)
     message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${MBED_BUILD_TYPES}")


Add support for android build

Add support for android build

Using NPM, this module can be cross-compiled for Android using NDK.
But, when compiling for Android, we need to add glob.c to source files
(as in Android.mk).
Also, re-arranged the layout in binding.gyp for better readability.

Signed-off-by: Robert Chiras <c1d87f9b0dc38a48e5f3651833ec9965d9508d88@intel.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- src/javascript/binding.gyp.cmake
+++ src/javascript/binding.gyp.cmake
@@ -3,36 +3,39 @@
     {
       'target_name': 'mraa',
       'sources': [
-@mraa_LIB_SRCS_GYP@
-'src/version.c',
-'src/mraajsJAVASCRIPT_wrap.cxx' ],
+        @mraa_LIB_SRCS_GYP@
+        'src/version.c',
+        'src/mraajsJAVASCRIPT_wrap.cxx'
+      ],
       'include_dirs': [
-@mraa_LIB_INCLUDE_DIRS_GYP@
-                      ],
+        @mraa_LIB_INCLUDE_DIRS_GYP@
+      ],
       'variables': {
-          "v8_version%": "<!(node -e 'console.log(process.versions.v8)' | sed 's/\.//g' | cut -c 1-5)",
-          "arch%": "<!(node -e 'console.log(process.arch)')"
+        "v8_version%": "<!(node -e 'console.log(process.versions.v8)' | sed 's/\.//g' | cut -c 1-5)",
+        "arch%": "<!(node -e 'console.log(process.arch)')"
       },
       'cflags_cc!': [ '-fno-rtti', '-fno-exceptions' ],
       'cflags!': [ '-fno-exceptions' ],
       'conditions' : [
-          [ 'arch=="x64"',
-            { 'defines' : [ 'X86PLAT=ON' ], },
-          ],
-          [ 'arch=="ia32"',
-            { 'defines' : [ 'X86PLAT=ON'], },
-          ],
-          [ 'arch=="arm"',
-            { 'defines' : [ 'ARMPLAT=ON'], },
-          ],
+        ['OS=="android"', {
+          'sources' : [ 'src/glob/glob.c' ],
+          'include_dirs' : [ 'src/glob' ],
+        }],
+        [ 'arch=="x64" or arch=="ia32"', {
+          'defines' : [ 'X86PLAT=ON' ],
+        }],
+        [ 'arch=="arm"', {
+          'defines' : [ 'ARMPLAT=ON'],
+        }],
       ],
-      'defines' : [ 'SWIG',
-                    'SWIGJAVASCRIPT',
-                    'FIRMATA=ON',
-                    'ONEWIRE=ON',
-                    'BUILDING_NODE_EXTENSION=1',
-                    'SWIG_V8_VERSION=0x0<(v8_version)',
-                    'V8_VERSION=0x0<(v8_version)'
+      'defines' : [
+        'SWIG',
+        'SWIGJAVASCRIPT',
+        'FIRMATA=ON',
+        'ONEWIRE=ON',
+        'BUILDING_NODE_EXTENSION=1',
+        'SWIG_V8_VERSION=0x0<(v8_version)',
+        'V8_VERSION=0x0<(v8_version)'
       ]
     }
   ]


fix typo

fix typo

--- example_plugin/FindHOOMD.cmake
+++ example_plugin/FindHOOMD.cmake
@@ -107,7 +107,7 @@
 set(HOOMD_HPMC_LIB ${HOOMD_ROOT}/hpmc/_hpmc.so)
 set(HOOMD_CGCMM_LIB ${HOOMD_ROOT}/cgcmm/_cgcmm.so)
 set(HOOMD_METAL_LIB ${HOOMD_ROOT}/metal/_metal.so)
-set(HOOMD_DEPRECATED_LIB ${HOOMD_ROOT}/depreacated/_deprecated.so)
+set(HOOMD_DEPRECATED_LIB ${HOOMD_ROOT}/deprecated/_deprecated.so)

 set(HOOMD_LIBRARIES ${HOOMD_LIB} ${HOOMD_COMMON_LIBS})
 set(HOOMD_LIBRARIES ${HOOMD_LIB} ${HOOMD_COMMON_LIBS})


Trigger build of 1.2.1 tagged Tomviz

Trigger build of 1.2.1 tagged Tomviz

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set(hardcoded_tomviz_version "1.2.0")
+set(hardcoded_tomviz_version "1.2.1")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


Fix inability to run tests from Visual Studio IDE

--- cmake/Modules/SampPluginTest.cmake
+++ cmake/Modules/SampPluginTest.cmake
@@ -39,6 +39,9 @@
 	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"


Attempting to fix dependence of ScaLAPACK on external math libraries

--- cmake/external_projects/ElMath/ScaLAPACK.cmake
+++ cmake/external_projects/ElMath/ScaLAPACK.cmake
@@ -174,6 +174,12 @@
   if(MATH_LIBS_AT_CONFIG AND
      NOT CUSTOM_BLAS_SUFFIX AND NOT CUSTOM_LAPACK_SUFFIX)
     set(LAPACK_COMMAND -D LAPACK_LIBRARIES=${MATH_LIBS_AT_CONFIG})
+  elseif(EL_HAVE_VECLIB AND
+         NOT EL_PREFER_OPENBLAS AND NOT EL_PREFER_BLIS_LAPACK)
+    set(LAPACK_COMMAND -D LAPACK_LIBRARIES="-framework vecLib")
+  elseif(EL_HAVE_ACCELERATE AND
+         NOT EL_PREFER_OPENBLAS AND NOT EL_PREFER_BLIS_LAPACK)
+    set(LAPACK_COMMAND -D LAPACK_LIBRARIES="-framework Accelerate")
   else()
     if((EL_DISABLE_OPENBLAS OR EL_PREFER_BLIS_LAPACK)
        AND NOT EL_DISABLE_BLIS_LAPACK)
@@ -264,15 +270,22 @@
      NOT CUSTOM_BLAS_SUFFIX AND NOT CUSTOM_LAPACK_SUFFIX)
     set(SCALAPACK_LIBS ${SCALAPACK_BASE} ${MATH_LIBS_AT_CONFIG})
     set(SCALAPACK_LIBS_AT_CONFIG ${MATH_LIBS_AT_CONFIG})
+  elseif(EL_HAVE_VECLIB AND
+         NOT EL_PREFER_OPENBLAS AND NOT EL_PREFER_BLIS_LAPACK)
+    set(SCALAPACK_LIBS "${SCALAPACK_BASE} -framework vecLib")
+  elseif(EL_HAVE_ACCELERATE AND
+         NOT EL_PREFER_OPENBLAS AND NOT EL_PREFER_BLIS_LAPACK)
+    set(SCALAPACK_LIBS "${SCALAPACK_BASE} -framework Accelerate")
   else()
     if((EL_DISABLE_OPENBLAS OR EL_PREFER_BLIS_LAPACK)
        AND NOT EL_DISABLE_BLIS_LAPACK)
-      set(EL_BUILD_BLIS_LAPACK TRUE)
+      set(EL_BUILT_BLIS_LAPACK TRUE)
     else()
       set(EL_BUILT_OPENBLAS TRUE)
     endif()
   endif()

+  # NOTE: This is such a mess...sorry
   if(EL_BUILT_OPENBLAS)
     add_library(libopenblas ${LIBRARY_TYPE} IMPORTED)
     El_library_name(openblas_name openblas)