Fixed build break due to linking problem with libthriftnb The FindThrift cmake module was searching for the non-blocking thrift library using the wrong file name

--- cmake_modules/FindThrift.cmake
+++ cmake_modules/FindThrift.cmake
@@ -42,7 +42,7 @@
   set(Thrift_FOUND TRUE)
   set(Thrift_LIBS ${Thrift_LIB})
   set(Thrift_STATIC_LIB ${Thrift_STATIC_LIB_PATH}/libthrift.a)
-  set(Thrift_NB_STATIC_LIB ${Thrift_STATIC_LIB_PATH}/libthriftnb.so)
+  set(Thrift_NB_STATIC_LIB ${Thrift_STATIC_LIB_PATH}/libthriftnb.a)
   set(Thrift_COMPILER ${THRIFT_COMPILER_PATH}/thrift)
   exec_program(${Thrift_COMPILER}
     ARGS -version OUTPUT_VARIABLE Thrift_VERSION RETURN_VALUE Thrift_RETURN)


Split off 8.6.24

Split off 8.6.24

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

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


VS2008 support: has a subdir named x64 instead of amd64

git-svn-id: ed337ca7cdb08c0ba29d8fe58632bb7686892c2d@548 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -157,7 +157,8 @@
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(CTEST_PROJECT_NAME "DynamoRIO")
 find_program(MAKE_COMMAND make DOC "make command")
-set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j5")
+# XXX: with -j5 I see weird build failures on VS2008, but can't repro w/ VERBOSE=1.
+set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j4")
 set(CTEST_COMMAND "${CTEST_EXECUTABLE_NAME}")

 if (UNIX)
@@ -249,6 +250,10 @@
         set(ENV{PATH} "${newpath}")
         string(REGEX REPLACE "([/\\\\])([Ll][Ii][Bb])" "\\1\\2\\1amd64"
           newlib "$ENV{LIB}")
+        # VS2008's SDKs/Windows/v6.0A uses "x64" instead of "amd64": grrr
+        string(REGEX REPLACE "(6.0A[/\\\\][Ll][Ii][Bb][/\\\\])[Aa][Mm][Dd]64"
+          "\\1x64"
+          newlib "${newlib}")
         set(ENV{LIB} "${newlib}")
         string(REGEX REPLACE "([/\\\\])([Ll][Ii][Bb])" "\\1\\2\\1amd64"
           newlibpath "$ENV{LIBPATH}")
@@ -261,6 +266,8 @@
         set(ENV{PATH} "${newpath}")
         string(REGEX REPLACE "([Ll][Ii][Bb])[/\\\\][Aa][Mm][Dd]64" "\\1"
           newlib "$ENV{LIB}")
+        string(REGEX REPLACE "([Ll][Ii][Bb])[/\\\\][Xx]64" "\\1"
+          newlib "${newlib}")
         set(ENV{LIB} "${newlib}")
         string(REGEX REPLACE "([Ll][Ii][Bb])[/\\\\][Aa][Mm][Dd]64" "\\1"
           newlibpath "$ENV{LIBPATH}")


Split off 7.8.54

Split off 7.8.54

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

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


Split off 8.6.42

Split off 8.6.42

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

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


Split off 7.10.44

Split off 7.10.44

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 43 )
+set ( HPCC_POINT 45 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Added search paths for Windows platforms.

--- FindTBB.cmake
+++ FindTBB.cmake
@@ -107,8 +107,30 @@
   if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
     set(TBB_DEFAULT_SEARCH_DIR "C:/Program Files/Intel/TBB"
                                "C:/Program Files (x86)/Intel/TBB")
-    # TODO: Set the proper suffix paths based on compiler introspection.
-
+
+    # Set the target architecture
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      set(TBB_ARCHITECTURE "intel64")
+    else()
+      set(TBB_ARCHITECTURE "ia32")
+    endif()
+
+    # Set the TBB search library path search suffix based on the version of VC
+    if(WINDOWS_STORE)
+      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11_ui")
+    elseif(MSVC14)
+      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc14")
+    elseif(MSVC12)
+      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc12")
+    elseif(MSVC11)
+      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11")
+    elseif(MSVC10)
+      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc10")
+    endif()
+
+    # Add the library path search suffix for the VC independent version of TBB
+    list(APPEND TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc_mt")
+
   elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     # OS X
     set(TBB_DEFAULT_SEARCH_DIR "/opt/intel/tbb")


FIX: Ensure samples/samples.xml is available in the app bundle.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -290,7 +290,7 @@
         set (_ACTIONCMD ln -sf)
         set (_ACTIONMSG "symlinks to")
     else()
-        set (_ACTIONCMD cp -Rf)
+        set (_ACTIONCMD rsync -r)
         set (_ACTIONMSG "copies of")
     endif()

@@ -330,6 +330,16 @@
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
         COMMAND if [ x${_CEGUI_BUILD_CONFIG} == xDebug ]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/\"
         COMMENT "Creating ${_ACTIONMSG} sample datafiles ${_TARGET_NAME}.app")
+
+    # When CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS is TRUE, this
+    # command symlinks from the build dir back into the source dir, which is
+    # not ideal, however under that scenario there is no other option. Do
+    # not whine about it, if you don't want that, then set
+    # CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS to false and the thing
+    # will be copied to the output app bundle instead.
+    add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
+        COMMAND if [ x${_CEGUI_BUILD_CONFIG} == xDebug ]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_BINARY_DIR}/datafiles/samples \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/datafiles\"
+        COMMENT "Creating ${_ACTIONMSG} samples.xml ${_TARGET_NAME}.app")
 endmacro()

 #


Fix: CMake shits itself if bundle install location is not set on OS X.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -428,6 +428,7 @@
         RUNTIME DESTINATION bin
         LIBRARY DESTINATION ${CEGUI_LIB_INSTALL_DIR}
         ARCHIVE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
+        BUNDLE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
     )

     if (CEGUI_BUILD_STATIC_CONFIGURATION)
@@ -435,6 +436,7 @@
             RUNTIME DESTINATION bin
             LIBRARY DESTINATION ${CEGUI_LIB_INSTALL_DIR}
             ARCHIVE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
+            BUNDLE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
     )
     endif()


Remove old and unused FindYAMLCPP script

--- cmake/FindYAMLCPP.cmake
+++ cmake/FindYAMLCPP.cmake
@@ -1,87 +0,0 @@
-# ==============================================================================
-# Find YAML-CPP
-#
-# This module searches for the YAML-CPP library and header files, using
-# pkg-config if available.  If found, the following variables are defined:
-#
-#     YAMLCPP_FOUND        - True
-#
-#     YAMLCPP_LIBRARIES    - The name of an imported target which contains
-#                            references to both the library file and the
-#                            include directory
-#
-#     YAMLCPP_INCLUDE_DIRS - The include directory
-#
-# If pkg-config was available and able to find the library, the following
-# variables may be defined (otherwise they are empty):
-#
-#     YAMLCPP_VERSION      - Library version
-#
-#     YAMLCPP_DEFINITIONS  - Additional compiler flags
-#
-# ==============================================================================
-
-# Use pkg-config if possible
-find_package (PkgConfig QUIET)
-if (PKG_CONFIG_FOUND)
-    pkg_check_modules (_yamlcpp_pc QUIET "yaml-cpp")
-endif ()
-set (YAMLCPP_DEFINITIONS ${_yamlcpp_pc_CFLAGS_OTHER})
-set (YAMLCPP_VERSION     ${_yamlcpp_pc_VERSION})
-
-# Additional search paths on Windows, since files are typically not placed
-# directly under the prefix paths.
-set (_yamlcpp_extraSearchPaths)
-if (WIN32)
-    foreach (p ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH})
-        file (GLOB d "${p}/*yaml*")
-        list (APPEND _yamlcpp_extraSearchPaths ${d})
-    endforeach ()
-endif ()
-
-# Construct the HINTS directive for find_XXX()
-set (_yamlcpp_findHints
-    $ENV{YAMLCPP_DIR}
-    ${_yamlcpp_pc_INCLUDEDIR}
-    ${_yamlcpp_pc_INCLUDE_DIRS}
-    ${_yamlcpp_pc_LIBDIR}
-    ${_yamlcpp_pc_LIBRARY_DIRS}
-    ${_yamlcpp_extraSearchPaths}
-)
-if (_yamlcpp_findHints)
-    set (_yamlcpp_findHints "HINTS" ${_yamlcpp_findHints})
-endif ()
-
-# Find files
-find_path (YAMLCPP_INCLUDE_DIR "yaml-cpp/yaml.h"
-    ${_yamlcpp_findHints}
-    PATH_SUFFIXES "include"
-)
-find_library (YAMLCPP_LIBRARY "yaml-cpp"
-    ${_yamlcpp_findHints}
-    PATH_SUFFIXES "lib"
-)
-
-# Define imported target
-add_library ("yaml-cpp" UNKNOWN IMPORTED)
-set_target_properties ("yaml-cpp" PROPERTIES
-    INTERFACE_INCLUDE_DIRECTORIES "${YAMLCPP_INCLUDE_DIR}"
-    IMPORTED_CONFIGURATIONS "RELEASE"
-    IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
-    IMPORTED_LOCATION_RELEASE "${YAMLCPP_LIBRARY}"
-)
-
-# Define standard "find script" variables
-set (YAMLCPP_INCLUDE_DIRS ${YAMLCPP_INCLUDE_DIR})
-set (YAMLCPP_LIBRARIES    "yaml-cpp")
-
-# Handle standard args
-set (_yamlcpp_versionCheck)
-if (YAMLCPP_VERSION)
-    set (_yamlcpp_versionCheck "VERSION_VAR" "YAMLCPP_VERSION")
-endif ()
-include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args("YAMLCPP"
-    REQUIRED_VARS YAMLCPP_INCLUDE_DIRS YAMLCPP_LIBRARIES
-    ${_yamlcpp_versionCheck}
-)


Fixed issue with licences folder not found in InstallFAST

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -263,14 +263,16 @@
 # Install licenses
 if(EXISTS ${PROJECT_BINARY_DIR}/licenses)
 install(DIRECTORY ${PROJECT_BINARY_DIR}/licenses/
-		DESTINATION fast/licenses
+	DESTINATION fast/licenses
         COMPONENT fast
 )
 endif()
+if(EXISTS ${PROJECT_BINARY_DIR}/licences)
 install(DIRECTORY ${PROJECT_BINARY_DIR}/licences/
-		DESTINATION fast/licenses
+	DESTINATION fast/licenses
         COMPONENT fast
 )
+endif()
 if(FAST_MODULE_OpenVINO)
 	if(WIN32)
 		install(FILES ${PROJECT_BINARY_DIR}/bin/plugins.xml


ModuleSetup: Handle properly build type subdirectories

--- cmake/ModuleSetup.cmake
+++ cmake/ModuleSetup.cmake
@@ -69,12 +69,17 @@
                 # which results already built libs to be deleted and thus causing build errors in further modules.
                 # See  http://public.kitware.com/Bug/view.php?id=11844 for more info

-                #set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${TARGET_DIR})
-                #set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
-                set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
-                #set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${TARGET_DIR})
-                #set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
-                set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
+                if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+                    set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${TARGET_DIR})
+                    set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${TARGET_DIR})
+                elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+                    set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
+                    set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
+                elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+                    set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
+                    set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
+                endif()
+
                 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace")
             endif()
         endif ()
@@ -339,4 +344,4 @@
 		get_filename_component(name ${file} NAME_WE)
 		execute_process(COMMAND ${QT_LRELEASE_EXECUTABLE} -silent ${file} -qm ${CMAKE_CURRENT_SOURCE_DIR}/bin/data/translations/${name}.qm)
 	endforeach()
-endmacro()+endmacro()


Update ParaView

Update ParaView

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "c11f8acbd092918e72ff444eb8824e1e4c451b59")
+  set(_paraview_revision "281c288ebeccd6589770addbcb57973a81b4764f")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


BUG: update sqlite to version 3.25 used by gdal on its CI with PROJ8

--- SuperBuild/CMake/External_sqlite.cmake
+++ SuperBuild/CMake/External_sqlite.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(SQLITE
   PREFIX SQLITE
-  URL "https://www.sqlite.org/2016/sqlite-amalgamation-3110000.zip"
-  URL_MD5 ab80e70b65da455514a68441ce3e0a8c
+  URL "https://www.sqlite.org/2018/sqlite-amalgamation-3250100.zip"
+  URL_MD5 e250c9a06858c1018896ef56a13c1d08
   SOURCE_DIR ${SQLITE_SB_SRC}
   BINARY_DIR ${SQLITE_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


extend ctest script for SSSE3 and above

extend ctest script for SSSE3 and above

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -209,6 +209,12 @@
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE3)
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSSE3)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE4_1)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON -DEIGEN_TEST_SSE4_1=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE4_2)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON -DEIGEN_TEST_SSE4_1=ON -DEIGEN_TEST_SSE4_2=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES Altivec)
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_ALTIVEC=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES novec)


Enable ITK remote modules to be enables in Superbuild

Update the regular expression used to propagate CMake flags from the
superbuild to the ITK project. Remote the ITK prefix in the module
name enables ITK remote modules to be enabled through the SimpleITK
superbuild process.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -26,7 +26,7 @@
   if(_varName MATCHES "^ITK_"
       OR _varName MATCHES "^ITKV3"
       OR _varName MATCHES "FFTW"
-      OR _varName MATCHES "^Module_ITK")
+      OR _varName MATCHES "^Module_")
     message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to ITK external project.")
     list(APPEND ITK_VARS ${_varName})
   endif()


Update along ITK 4.11+ release branch

Update along ITK 4.11+ release branch

This include merged fixes for the convergence value valgrind defect.

Change-Id: I1beea3d89ace36f7852dce61b235e5fc9648a1e8

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -45,7 +45,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 742deb8906cf1cc9e02641b36e2ea6175160061e ) # v4.11.0+ on release branch
+set(ITK_TAG_COMMAND GIT_TAG b3b8d6210b4134c7b49a41184694e7c7ff30c9e1 ) # v4.11.0+ on release branch

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Allow Hostx64/arm32 combination in configurecompiler.cmake

--- configurecompiler.cmake
+++ configurecompiler.cmake
@@ -158,7 +158,7 @@

 # check if host & target arch combination are valid
 if(NOT(CLR_CMAKE_TARGET_ARCH STREQUAL CLR_CMAKE_HOST_ARCH))
-    if(NOT((CLR_CMAKE_PLATFORM_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM64) OR (CLR_CMAKE_PLATFORM_ARCH_I386 AND CLR_CMAKE_TARGET_ARCH_ARM)))
+    if(NOT((CLR_CMAKE_PLATFORM_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM64) OR (CLR_CMAKE_PLATFORM_ARCH_I386 AND CLR_CMAKE_TARGET_ARCH_ARM) OR (CLR_CMAKE_PLATFORM_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM)))
         message(FATAL_ERROR "Invalid host and target arch combination")
     endif()
 endif()


Fix for MacOsX: Cleanup python detection in CMake

--- lib/smurff-cpp/cmake/scripts/FindPythonExtensions.cmake
+++ lib/smurff-cpp/cmake/scripts/FindPythonExtensions.cmake
@@ -352,8 +352,12 @@
     if(_is_module_lib AND WIN32 AND NOT CYGWIN)
       set_target_properties(${_target} PROPERTIES SUFFIX ".pyd")
     endif()
-
-    target_link_libraries_with_dynamic_lookup(${_target} ${PYTHON_LIBRARIES})
+    if( APPLE )
+      set_target_properties( ${_target} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
+    else()
+      target_link_libraries( ${_target} ${PYTHON_LIBRARIES} )
+      # target_link_libraries_with_dynamic_lookup(${_target} ${PYTHON_LIBRARIES})
+   endif()
   endif()
 endfunction()


X11: GL lib is not needed

X11: GL lib is not needed

--- src/X11/projectDef.cmake
+++ src/X11/projectDef.cmake
@@ -31,5 +31,4 @@
 target_link_libraries(${PROJECT_NAME}
     ${PLUGIN_INTERNAL_DEPS}
     vlc
-    GL
     )


Enable sanitizer for modules when building for the test harness

--- prosoft/core/modules/config_module.cmake
+++ prosoft/core/modules/config_module.cmake
@@ -54,6 +54,11 @@
 	# XXX: can't config sanitizer for modules as we don't know if the host target has it configured

 	if (DEFINED CORETESTS)
+		# However, we do know that our core test harness has the sanitizer enabled for debug builds
+		if(DEBUG)
+			ps_core_config_sanitizer(${TARGET_NAME})
+		endif()
+
 	    # Allows modules to define internal tests
 	    target_include_directories(${TARGET_NAME} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/../../tests") # for catch
 	    target_compile_definitions(${TARGET_NAME} PRIVATE PSTEST_HARNESS=1)


Improve ninja detection.

Improve ninja detection.

--- src/inserts/build.cmake
+++ src/inserts/build.cmake
@@ -93,7 +93,16 @@
         if (NOT ${cmd2} STREQUAL "cmd2-NOTFOUND")
             set(cmd ${CMAKE_MAKE_PROGRAM})
         endif()
-    endif()
+    else()
+        find_program(cmd2 ${cmd})
+        if (${cmd2} STREQUAL "cmd2-NOTFOUND")
+            find_program(cmd2 ninja-build)
+            if (NOT ${cmd2} STREQUAL "cmd2-NOTFOUND")
+                set(cmd ${cmd2})
+            endif()
+        endif()
+    endif()
+
     cppan_debug_message("COMMAND ${cmd} -C ${BUILD_DIR}")
     execute_process(
         COMMAND ${cmd} -C ${BUILD_DIR}


Added Slicer Exetension

Added Slicer Exetension

--- AutoTract.cmake
+++ AutoTract.cmake
@@ -7,6 +7,7 @@
 # SLICER EXTENSION
 #-----------------------------------------------------------------------------
 if( AutoTract_BUILD_SLICER_EXTENSION )
+
   ADD_DEFINITIONS(-DSPV_EXTENSION=1)
   set(EXTENSION_NAME ${LOCAL_PROJECT_NAME} )
   set(MODULE_NAME ${LOCAL_PROJECT_NAME} )


Fix default tag name

Fix default tag name

--- default.cmake
+++ default.cmake
@@ -9,6 +9,6 @@

 # Don't use polly_init (no generator expected)
 set(POLLY_TOOLCHAIN_NAME "Default")
-set(POLLY_TOOLCHAIN_TAG "Default")
+set(POLLY_TOOLCHAIN_TAG "default")

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake")


android(toolchain): fix find_path() behavior (zlib search problem)

--- platforms/android/android.toolchain.cmake
+++ platforms/android/android.toolchain.cmake
@@ -1587,7 +1587,13 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH
+    "${ANDROID_TOOLCHAIN_ROOT}/bin"
+    "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}"
+    "${ANDROID_SYSROOT}"
+    "${ANDROID_NDK}/sysroot"  # NDK16+
+    "${CMAKE_INSTALL_PREFIX}"
+    "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )


- Fix Android APK output path

- Fix Android APK output path

--- cmake/Packaging/AndroidApkBuild.cmake
+++ cmake/Packaging/AndroidApkBuild.cmake
@@ -21,7 +21,7 @@
     set ( ANDROID_PROJECT_TEMPLATE_DIR "${ANDROID_PROJECT_INPUT}/Template" )
     set ( ANDROID_PROJECT_CONFIG_DIR "${ANDROID_PROJECT_INPUT}/Config" )

-    set ( ANDROID_BUILD_OUTPUT "${COFFEE_DEPLOY_DIRECTORY}/android" )
+    set ( ANDROID_BUILD_OUTPUT "${COFFEE_DEPLOY_DIRECTORY}/android-apk" )

 endif()

@@ -78,7 +78,8 @@
         set ( RELEASE_PREFIX "dbg" )
     endif()

-    set ( ANDROID_APK_FILE_OUTPUT "${ANDROID_APK_OUTPUT_DIR}/${ANDROID_PACKAGE_NAME}_${RELEASE_PREFIX}.apk" )
+    set ( ANDROID_APK_FILE_OUTPUT
+        "${ANDROID_APK_OUTPUT_DIR}/${ANDROID_PACKAGE_NAME}_${RELEASE_PREFIX}.apk" )

     set( BUILD_OUTDIR ${ANDROID_BUILD_OUTPUT}/${Target_Name} )


ENH: We do not need boost::date_time

ENH: We do not need boost::date_time

--- Modules/ThirdParty/Boost/otb-module-init.cmake
+++ Modules/ThirdParty/Boost/otb-module-init.cmake
@@ -1,9 +1,6 @@
-# Mandatory components
-# - date_time -> ossim plugins
-set(OTB_Boost_COMPONENTS date_time)
 # Optional components
 if (BUILD_TESTING)
-  list(APPEND OTB_Boost_COMPONENTS unit_test_framework)
+  set(OTB_Boost_COMPONENTS unit_test_framework)
 endif()

 message(STATUS "Looking for boost components: ${OTB_Boost_COMPONENTS}")


ENH: refine boost third party find_package

--- Modules/ThirdParty/Boost/otb-module-init.cmake
+++ Modules/ThirdParty/Boost/otb-module-init.cmake
@@ -1,7 +1,3 @@
-if (BUILD_TESTING)
-  set(OTB_Boost_OPTIONAL_COMPONENTS unit_test_framework)
-endif()
-
 # Required
 message(STATUS "Looking for required Boost headers")
 find_package ( Boost
@@ -10,8 +6,16 @@
   )

 # Optional components
+# Boost (OPTIONAL_COMPONENTS does not work with Boost find_package)
+# unit_test_framework component is used only in GdalAdapters module
+if (BUILD_TESTING)
+  set(OTB_Boost_OPTIONAL_COMPONENTS unit_test_framework)
+endif()
+
+#Quiet find package to avoid message "Could not find boost" because unit_testing_framework is not installed
 message(STATUS "Looking for optional Boost components : ${OTB_Boost_OPTIONAL_COMPONENTS}")
 find_package ( Boost
+  QUIET
   1.35.0
   COMPONENTS ${OTB_Boost_OPTIONAL_COMPONENTS}
   )


Tweak message

Tweak message

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -219,7 +219,8 @@
   set(_eq_coVersion_1.0.1 "0.3.1")
   set(_eq_coVersion_1.0.0 "0.3.0")
   if( "${_eq_coVersion_${EQUALIZER_VERSION}}" STREQUAL "" )
-    message(WARNING "Collage version for Equalizer ${EQUALIZER_VERSION} unknown")
+    message(WARNING
+      "Unknown Collage version for Equalizer ${EQUALIZER_VERSION}")
   endif()
   find_package(Collage "${_eq_coVersion_${EQUALIZER_VERSION}}" EXACT
                ${_eq_required} ${_eq_quiet})


update

update

--- modules/cpp-optparse.cmake
+++ modules/cpp-optparse.cmake
@@ -2,7 +2,12 @@

   # Module library
   file(GLOB SOURCE_FILES "cpp-optparse/OptionParser.cpp")
-  set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
+  if(NOT MSVC)
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
+  else()
+    # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4244")
+  endif()
   add_library(cpp-optparse ${SOURCE_FILES})

   # Module folder


channels: ssh-agnet: cmake: turn off server side channel by default in `ChannelsOptions.cmake` (#5420)

CMake v3.5.1 throws the following error if this is not set:
```
CMake Error at channels/CMakeLists.txt:48 (if):
  if given arguments:

    "OFF" "OR"

  Unknown arguments specified
Call Stack (most recent call first):
  channels/sshagent/ChannelOptions.cmake:6 (define_channel_options)
  channels/CMakeLists.txt:273 (include)
```

--- channels/sshagent/ChannelOptions.cmake
+++ channels/sshagent/ChannelOptions.cmake
@@ -1,6 +1,7 @@

 set(OPTION_DEFAULT OFF)
 set(OPTION_CLIENT_DEFAULT OFF)
+set(OPTION_SERVER_DEFAULT OFF)

 define_channel_options(NAME "sshagent" TYPE "dynamic"
 	DESCRIPTION "SSH Agent Forwarding (experimental)"


CMake: Bugfix, add forgotten build time dependency on ./cmake/config/template-arguments

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

--- deal.II/cmake/macros/macro_expand_instantiations.cmake
+++ deal.II/cmake/macros/macro_expand_instantiations.cmake
@@ -38,6 +38,7 @@
     ADD_CUSTOM_COMMAND(
       OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
       DEPENDS expand_instantiations
+              ${CMAKE_BINARY_DIR}/cmake/config/template-arguments
               ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
       COMMAND expand_instantiations
       ARGS ${CMAKE_BINARY_DIR}/cmake/config/template-arguments


Replaced with std filesystem cmake checker used in h5pp

Former-commit-id: d0770ca588b3eb27e7c376fe5049b8745ad2e4ce

--- cmake-modules/CheckCXXFilesystem.cmake
+++ cmake-modules/CheckCXXFilesystem.cmake
@@ -1,44 +0,0 @@
-function(CheckCXXFilesystem)
-    set(CMAKE_REQUIRED_FLAGS     "-std=c++17")
-    set(CMAKE_REQUIRED_LIBRARIES "-lstdc++fs" )
-    include(CheckIncludeFileCXX)
-    check_include_file_cxx(filesystem    has_filesystem  )
-    check_include_file_cxx(experimental/filesystem    has_experimental_filesystem  )
-
-    if(NOT has_filesystem AND NOT has_experimental_filesystem)
-        message(FATAL_ERROR "\n\
-                Missing <filesystem> and/or <experimental/filesystem> headers.\n\
-                Consider using a newer compiler (GCC 6 or above, Clang 5 or above),\n\
-                or checking the compiler flags. If using Clang, pass the variable \n\
-                GCC_TOOLCHAIN=<path> \n\
-                where path is the install directory of a recent GCC installation.
-                Also, don't forget to compile with flags:  [-lstdc++fs -std=c++17].
-        ")
-    endif()
-
-    include(CheckCXXSourceCompiles)
-    check_cxx_source_compiles("
-        // Include filesystem or experimental/filesystem
-        #if __has_include(<filesystem>)
-        #include <filesystem>
-            namespace check{
-                namespace fs =  std::filesystem;
-            }
-        #elif __has_include(<experimental/filesystem>)
-            #include <experimental/filesystem>
-            namespace check {
-                namespace fs = std::experimental::filesystem;
-            }
-        #else
-            #error Could not find <filesystem> or <experimental/filesystem>
-        #endif
-        int main(){
-            using namespace check;
-            fs::path testpath;
-            return 0;
-        }
-        " FILESYSTEM_COMPILES)
-    if(NOT FILESYSTEM_COMPILES)
-        message(FATAL_ERROR "Unable to compile with filesystem headers")
-    endif()
-endfunction()


Add ASM Jars to the global properties file (sonar)

--- properties.cmake
+++ properties.cmake
@@ -77,13 +77,18 @@

 set(COMMON_CLI_NAME "commons-cli")
 set(COMMON_CLI "${CLAW_X2T_JAR_INSTALL_PATH}/${COMMON_CLI_NAME}.jar")
+set(BUILD_COMMON_CLI "${CMAKE_SOURCE_DIR}/cx2t/lib/${COMMON_CLI_NAME}.jar")

 set(BUILD_ANTLR4 "${CMAKE_SOURCE_DIR}/cx2t/lib/${ANTLR4_NAME}.jar")
 set(
   BUILD_ANTLR4_RUNTIME
   "${CMAKE_SOURCE_DIR}/cx2t/lib/${ANTLR4_RUNTIME_NAME}.jar"
 )
-set(BUILD_COMMON_CLI "${CMAKE_SOURCE_DIR}/cx2t/lib/${COMMON_CLI_NAME}.jar")
+
+set(ASM "asm.jar")
+set(ASM_COMMON "asm-commons.jar")
+set(ASM_TREE "asm-tree.jar")
+set(ASM_BUILD "${CMAKE_SOURCE_DIR}/cx2t/lib/${ASM}.jar:${CMAKE_SOURCE_DIR}/cx2t/lib/${ASM_COMMON}.jar:${CMAKE_SOURCE_DIR}/cx2t/lib/${ASM_TREE}.jar")

 #
 # External program options


fix windows gpu build by disabling nccl which currently will not (#9005)

compile/work on windows

--- tensorflow/contrib/cmake/tf_core_kernels.cmake
+++ tensorflow/contrib/cmake/tf_core_kernels.cmake
@@ -102,6 +102,10 @@
       "${tensorflow_source_dir}/tensorflow/contrib/rnn/kernels/lstm_ops.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/gru_ops.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/lstm_ops.cc"
+      # temporarily disable nccl (nccl itself needs to be ported to windows first)
+      "${tensorflow_source_dir}/tensorflow/contrib/nccl/kernels/nccl_manager.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/nccl/kernels/nccl_ops.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/nccl/ops/nccl_ops.cc"
   )
   list(REMOVE_ITEM tf_core_kernels_srcs ${tf_core_kernels_windows_exclude_srcs})
 endif(WIN32)


Delete FindCPM.cmake

Delete FindCPM.cmake

--- tests/cmake/FindCPM.cmake
+++ tests/cmake/FindCPM.cmake
@@ -1,17 +0,0 @@
-
-set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm_packages" CACHE TYPE STRING)
-  find_package(Git)
-  if(NOT GIT_FOUND)
-    message(FATAL_ERROR "CPM requires Git.")
-  endif()
-  if (NOT EXISTS ${CPM_DIR}/CPM.cmake)
-    message(STATUS "Cloning repo (https://github.com/iauns/cpm)")
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" clone https://github.com/iauns/cpm ${CPM_DIR}
-      RESULT_VARIABLE error_code
-      OUTPUT_QUIET ERROR_QUIET)
-    if(error_code)
-      message(FATAL_ERROR "CPM failed to get the hash for HEAD")
-    endif()
-  endif()
-  include(${CPM_DIR}/CPM.cmake)


[Conf] Added a temporary hack for Boost CMake support - To be removed for Boost 1.72

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1460,6 +1460,8 @@
   if (NOT "${CMAKE_CXX_FLAGS}" MATCHES "-DBOOST_VERSION_MACRO=")
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_VERSION_MACRO=${Boost_VERSION_MACRO}")
   endif (NOT "${CMAKE_CXX_FLAGS}" MATCHES "-DBOOST_VERSION_MACRO=")
+  # Temporary (as of Nov. 2019) hack
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_CXX98_BINDERS=1")

   #
   include_directories (BEFORE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})


Testsuite: Update a comment

Testsuite: Update a comment

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -582,4 +582,4 @@
   MESSAGE("-- Submission successful. Goodbye!")
 ENDIF()

-# .oO( This script is freaky 632 lines long... )
+# .oO( This script is freaky 585 lines long... )


Set correct compiler flags for OpenSpaceTest

--- support/cmake/support_macros.cmake
+++ support/cmake/support_macros.cmake
@@ -394,9 +394,7 @@
                 "/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCMT.lib"
             )
         endif ()
-        set_property(TARGET OpenSpaceTest PROPERTY FOLDER "Unit Tests")
-        set_property(TARGET OpenSpaceTest PROPERTY CXX_STANDARD 14)
-        set_property(TARGET OpenSpaceTest PROPERTY CXX_STANDARD_REQUIRED On)
+        set_compile_settings(OpenSpaceTest)
     endif (OPENSPACE_HAVE_TESTS)
     if (TARGET GhoulTest)
         if (NOT TARGET gtest)


Document that we have packages for Ubuntu "Quantal", "Raring" and "Saucy".

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -42,7 +42,8 @@
 href="http://tarantool.org/dist/ubuntu">http://tarantool.org/dist/ubuntu respectively.

 At the moment the repository contains builds for Debian "Sid", "Jessie",
-"Wheezy" and Ubuntu "Precise". It can be added to your apt sources list with:
+"Wheezy" and Ubuntu "Precise", "Quantal", "Raring", "Saucy".
+It can be added to your apt sources list with:

     wget http://tarantool.org/dist/public.key
     sudo apt-key add ./public.key
@@ -291,8 +292,8 @@
 http://tarantool.org/dist/ubuntu.

 Репозитории содержат пакеты для Debian "Sid", "Jessy",
-"Wheezy" и Ubuntu "Precise". Для установки можно воспользоваться следующим
-скриптом:
+"Wheezy" и Ubuntu "Precise", "Quantal", "Raring", "Saucy".
+Для установки можно воспользоваться следующим скриптом:

     wget http://tarantool.org/dist/public.key
     sudo apt-key add ./public.key


Graph Control 3.10.8-4rc Release Candidate 4

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 10 )
 set ( HPCC_POINT 8 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 3 )
+set ( HPCC_SEQUENCE 4 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Nagios Monitoring Control 6.0.0-betarc1 Beta 1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -5,6 +5,6 @@
 set ( HPCC_MAJOR 6 )
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_MATURITY "betarc" )
+set ( HPCC_SEQUENCE 1 )
 ###


Split off 8.6.50

Split off 8.6.50

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

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


Version number bumped

Version number bumped

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.2.6)
+set(autowiring_VERSION 0.2.7)


Graph Control 4.2.2-rc5 Release Candidate 5

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 2 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 1 )
+set ( HPCC_SEQUENCE 5 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Split off 7.10.60

Split off 7.10.60

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 59 )
+set ( HPCC_POINT 61 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.2.12

Split off 8.2.12

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

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


Split off 7.6.58

Split off 7.6.58

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 6 )
-set ( HPCC_POINT 57 )
+set ( HPCC_POINT 59 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Improve OS X support in FindTBB

Improve OS X support in FindTBB

FindTBB now chooses libc++ based binary libraries by default on Mavericks and above + AppleClang.

--- CMake/FindTBB.cmake
+++ CMake/FindTBB.cmake
@@ -64,18 +64,6 @@
 #=============================================================================
 #  FindTBB helper functions and macros
 #
-
-#===============================================
-# Create search paths based on prefix path
-#===============================================
-macro(create_search_paths PREFIX)
-  foreach(dir ${${PREFIX}_PREFIX_PATH})
-    set(${PREFIX}_INC_SEARCH_PATH ${${PREFIX}_INC_SEARCH_PATH}
-      ${dir}/include ${dir}/Include ${dir}/include/${PREFIX})
-    set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH}
-      ${dir}/lib ${dir}/Lib ${dir}/lib/${PREFIX} ${dir}/Libs)
-  endforeach(dir)
-endmacro(create_search_paths)

 #===============================================
 # Do the final processing for the package find.
@@ -141,9 +129,12 @@

 # Get path, convert backslashes as ${ENV_${var}}
 getenv_path(TBB_ROOT)
-# construct search paths
+
+# initialize search paths
 set(TBB_PREFIX_PATH ${TBB_ROOT} ${ENV_TBB_ROOT})
-create_search_paths(TBB)
+set(TBB_INC_SEARCH_PATH "")
+set(TBB_LIB_SEARCH_PATH "")
+

 # If user built from sources
 set(TBB_BUILD_PREFIX $ENV{TBB_BUILD_PREFIX})
@@ -200,9 +191,32 @@
   endforeach ()
 endif ()

+# For OS X binary distribution, choose libc++ based libraries for Maverics and
+# above and AppleClang
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" AND
+    NOT ${CMAKE_SYSTEM_VERSION} LESS 13.0)
+  set (USE_LIBCXX OFF)
+  cmake_policiy(GET CMP0025 POLICY_VAR)
+
+  if (${POLICY_VAR} STREQUAL "NEW")
+    if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
+      set (USE_LIBCXX ON)
+    endif ()
+  else ()
+    if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+      set (USE_LIBCXX ON)
+    endif ()
+  endif ()
+
+  if (${USE_LIBCXX})
+    foreach (dir ${TBB_PREFIX_PATH})
+      list (APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/libc++ ${dir}/libc++/lib)
+    endforeach ()
+  endif ()
+endif ()

 # check compiler ABI
-if (CMAKE_CXX_COMPILER_ID EQUAL GNU AND
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
     CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
   set(COMPILER_PREFIX "gcc4.1")
 else () # Assume compatibility with 4.4 for other compilers
@@ -215,7 +229,6 @@
   foreach (dir ${TBB_PREFIX_PATH})
     list(APPEND TBB_LIB_SEARCH_PATH ${dir}/${TBB_ARCH_PLATFORM}/lib)
     list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/${TBB_ARCH_PLATFORM})
-    list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib)
   endforeach ()
 endif ()

@@ -233,6 +246,13 @@
   endif ()
 endforeach ()

+# add general search paths
+foreach (dir ${TBB_PREFIX_PATH})
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib ${dir}/Lib ${dir}/lib/tbb
+    ${dir}/Libs)
+  list(APPEND TBB_INC_SEARCH_PATH ${dir}/include ${dir}/Include
+    ${dir}/include/tbb)
+endforeach ()

 set(TBB_LIBRARY_NAMES tbb)
 get_debug_names(TBB_LIBRARY_NAMES)


Add library dependency to superbuild

Add library dependency to superbuild

--- ibtk/CMake/KitCommonBlock.cmake
+++ ibtk/CMake/KitCommonBlock.cmake
@@ -1,24 +1,32 @@
 string(TOLOWER ${PROJECT_NAME} LOWER_PROJECT_NAME)

+set(KIT3D ${LOWER_PROJECT_NAME}${KIT}3D)
+set(KIT2D ${LOWER_PROJECT_NAME}${KIT}2D)
+
+
 if(NOT ${PROJECT_NAME}_BUILD_SINGLE_LIBRARY)
-  add_library(${LOWER_PROJECT_NAME}${KIT}3D ${kit_SRCS3D})
-  set_target_properties(${LOWER_PROJECT_NAME}${KIT}3D PROPERTIES COMPILE_DEFINITIONS NDIM=3)
+  add_library(${KIT3D} ${kit_SRCS3D})
+  set_target_properties(${KIT3D} PROPERTIES COMPILE_DEFINITIONS NDIM=3)
+  add_dependencies(${KIT3D} IBTK-Build)

   if(${PROJECT_NAME}_BUILD_2D_LIBRARY)
-    add_library(${LOWER_PROJECT_NAME}${KIT}2D ${kit_SRCS2D})
-    set_target_properties(${LOWER_PROJECT_NAME}${KIT}2D PROPERTIES COMPILE_DEFINITIONS NDIM=2)
-  endif()
+    add_library(${KIT2D} ${kit_SRCS2D})
+    set_target_properties(${KIT2D} PROPERTIES COMPILE_DEFINITIONS NDIM=2)
+    add_dependencies(${KIT2D} IBTK-Build)
+  endif()
 else()
-  add_library(${LOWER_PROJECT_NAME}${KIT}3D OBJECT ${kit_SRCS3D})
+  add_library(${KIT3D} OBJECT ${kit_SRCS3D})
   if(BUILD_SHARED_LIBS)
-    set_target_properties(${LOWER_PROJECT_NAME}${KIT}3D PROPERTIES COMPILE_FLAGS "-fPIC")
+    set_target_properties(${KIT3D} PROPERTIES COMPILE_FLAGS "-fPIC")
   endif()
-  set_target_properties(${LOWER_PROJECT_NAME}${KIT}3D PROPERTIES COMPILE_DEFINITIONS NDIM=3)
+  set_target_properties(${KIT3D} PROPERTIES COMPILE_DEFINITIONS NDIM=3)
+  add_dependencies(${KIT3D} IBTK-Build)
   if(${PROJECT_NAME}_BUILD_2D_LIBRARY)
-    add_library(${LOWER_PROJECT_NAME}${KIT}2D OBJECT ${kit_SRCS2D})
+    add_library(${KIT2D} OBJECT ${kit_SRCS2D})
     if(BUILD_SHARED_LIBS)
-      set_target_properties(${LOWER_PROJECT_NAME}${KIT}2D PROPERTIES COMPILE_FLAGS "-fPIC")
+      set_target_properties(${KIT2D} PROPERTIES COMPILE_FLAGS "-fPIC")
     endif()
-    set_target_properties(${LOWER_PROJECT_NAME}${KIT}2D PROPERTIES COMPILE_DEFINITIONS NDIM=2)
+    set_target_properties(${KIT2D} PROPERTIES COMPILE_DEFINITIONS NDIM=2)
+    add_dependencies(${KIT2D} IBTK-Build)
   endif()
 endif()


Apparently boost 1.53 now needs atomic in order to use threads.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -162,8 +162,12 @@
 endif()

 if(Boost_FOUND AND Boost_VERSION GREATER 104900)
+    if(Boost_VERSION GREATER 105300)
+        set(OGRE_BOOST_COMPONENTS thread date_time system atomic chrono)
+    else()
         set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
-        find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
+    endif()
+    find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()

 # Optional Boost libs (Boost_${COMPONENT}_FOUND


Correct the automatic paths produced for windows_path.bat and unix_path.sh.

I was trying to use the ${VTK_BINARY_DIR}/windows_path.bat to initalize my
environment in such a way, that I could import vtk in Python on a Windows
machine via "import vtk".

This did not work. Using
http://www.vtk.org/Wiki/VTK/Tutorials/PythonEnvironmentSetup as a reference, I
added ${VTK_BINARY_DIR}/Wrapping/Python to both WINDOWS and UNIX environments,

I also deleted ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} from the Windows PATHs, as
that folder only contains the folders listed earlier (Debug, Release).
RelWithDebInfo and RelMinSize are added as comments

David Kügler <david.kuegler@gris.informatik.tu-darmstadt.de>

--- CMake/vtkBuildPath.cmake
+++ CMake/vtkBuildPath.cmake
@@ -3,34 +3,52 @@
 # file can be sourced in the shell. You can also copy and paste the relevant
 # parts into other files if preferred.
 #
-# Note: on Windows Debug and Release are added, if another build type is
-# used, it would need to be added to the PATH too.
+# Note: Now only setting the path to the latest configuration used (for MSVC/Xcode)

-set(VTK_PYTHONPATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+if (NOT CMAKE_CONFIGURATION_TYPES OR NOT CMAKE_VERSION VERSION_LESS "2.8.12")
+  if(WIN32)
+    set(VTK_PATH_SHELL_SCRIPT "windows_path.bat")
+    set(PATH_FORMAT "set xxx_path_var=xxx_add_path;%xxx_path_var%\r\n")
+    set(PATH_VARIABLE "PATH")
+    set(PATH_SEPARATOR ";")
+  elseif(UNIX)
+    set(VTK_PATH_SHELL_SCRIPT "unix_path.sh")
+    if(APPLE)
+      set(DYLD "DYLD")
+    else()
+      set(DYLD "LD")
+    endif()
+    set(PATH_VARIABLE "${DYLD}_LIBRARY_PATH")
+    set(PATH_SEPARATOR ":")
+    set(PATH_FORMAT "export xxx_path_var=xxx_add_path:\${xxx_path_var}\n")
+  endif()

-if(WIN32)
-  list(APPEND VTK_PYTHONPATH
-    "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Debug"
-    "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Release")
-endif()
+  # set the script file name
+  set(PATH_FILENAME "${VTK_BINARY_DIR}/${VTK_PATH_SHELL_SCRIPT}")

-set(VTK_LIBRARY_PATH
-  "${VTK_PYTHONPATH}")
+  set(cfg_subdir "")
+  if (CMAKE_CONFIGURATION_TYPES)
+    set(cfg_subdir "/$<CONFIGURATION>")
+  endif ()

-if(WIN32)
-  file(WRITE "${VTK_BINARY_DIR}/windows_path.bat"
-    "set PATH=${VTK_LIBRARY_PATH};%PATH%
-    set PYTHONPATH=${VTK_PYTHONPATH};%PYTHONPATH%")
-elseif(UNIX)
-  # Replace the semicolons with colons for Unix operating systems
-  string(REPLACE ";" ":" VTK_LIBRARY_PATH "${VTK_LIBRARY_PATH}")
-  string(REPLACE ";" ":" VTK_PYTHONPATH "${VTK_PYTHONPATH}")
-  if(APPLE)
-    set(DYLD "DYLD")
-  else()
-    set(DYLD "LD")
+  # FOR THE PATH VARIABLE
+  # replace the path to the executables
+  string(REPLACE "xxx_add_path" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${cfg_subdir}" PATH_TEMP "${PATH_FORMAT}")
+  # replace the name of the platform-specific path environment variable
+  string(REPLACE "xxx_path_var" "${PATH_VARIABLE}" PATH_LINES "${PATH_TEMP}")
+
+  if(VTK_WRAP_PYTHON)
+    # FOR THE PYTHONPATH VARIABLE, if PYTHON is wrapped
+    # replace the path to the python-specific files
+    string(REPLACE "xxx_add_path" "${VTK_BINARY_DIR}/Wrapping/Python${PATH_SEPARATOR}${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${cfg_subdir}" PATH_TEMP "${PATH_FORMAT}")
+    # replace pathvar by PYTHONPATH
+    string(REPLACE "xxx_path_var" "PYTHONPATH" PATH_TEMP "${PATH_TEMP}")
+    # apped the line to the file
+    set(PATH_LINES "${PATH_LINES}${PATH_TEMP}")
   endif()
-  file(WRITE "${VTK_BINARY_DIR}/unix_path.sh"
-    "export ${DYLD}_LIBRARY_PATH=${VTK_LIBRARY_PATH}:\${${DYLD}_LIBRARY_PATH}
-    export PYTHONPATH=${VTK_PYTHONPATH}:\${PYTHONPATH}\n")
-endif()
+
+  # write to file
+  file(GENERATE
+    OUTPUT  "${PATH_FILENAME}"
+    CONTENT "${PATH_LINES}")
+endif ()


Use update CTK with increased max vertex degree in DGraph utility.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag de466419)
+    SET(revision_tag 6925794b)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -37,7 +37,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 29d075daa07dbc5618158e4f81d5f431
+      URL_MD5 43430cee2dfec2519cbe33cbfebc3eaf
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Update R.cmake (#4899)

Update R.cmake (#4899)

Co-authored-by: Don van den Bergh <d0579265b24b6d449a2236eac45a6c4dafe3bf1b@hotmail.com>
Co-authored-by: Joris Goosen <b91d96659b76b25bfcda25570cce23bdb39bf6d5@JorisGoosen.nl>

--- Tools/CMake/R.cmake
+++ Tools/CMake/R.cmake
@@ -776,6 +776,7 @@
   endif()

   set(R_EXECUTABLE "${R_HOME_PATH}/bin/R")
+  set(RSCRIPT_EXECUTABLE "${R_HOME_PATH}/bin/Rscript")
   set(RCPP_PATH "${R_LIBRARY_PATH}/Rcpp")
   set(RINSIDE_PATH "${R_LIBRARY_PATH}/RInside")
   set(RENV_PATH "${R_LIBRARY_PATH}/renv")
@@ -783,20 +784,25 @@
   set(USE_LOCAL_R_LIBS_PATH ", lib='${R_LIBRARY_PATH}'")

   message(CHECK_START "Looking for R.h")
-  set(R_INCLUDE_PATH "${R_HOME_PATH}/include")
+  # ask R where it thinks it's include folder is
+  execute_process(COMMAND ${RSCRIPT_EXECUTABLE} -e "cat(R.home(\"include\"))" OUTPUT_VARIABLE R_INCLUDE_PATH)
+  # if R returns a nonexisting directory, try some fallback locations
   if(NOT EXISTS ${R_INCLUDE_PATH})
-    find_file(
-      _R_H
-      NAMES R.h
-      PATHS /usr/include /usr/include/R)
-
-    if(_R_H)
-      get_filename_component(R_INCLUDE_PATH ${_R_H} DIRECTORY)
-      message(CHECK_PASS "found")
-      message(STATUS "  ${_R_H}")
-    else()
-      message(CHECK_FAIL "not found")
-      message(FATAL_ERROR "R.h is necessary for building R-Interface library.")
+    message(STATUS "R return an invalid include directory, trying fallbacks")
+    set(R_INCLUDE_PATH "${R_HOME_PATH}/include")
+    if(NOT EXISTS ${R_INCLUDE_PATH})
+      find_file(
+        _R_H
+        NAMES R.h
+        PATHS /usr/include /usr/include/R /usr/share/R/include)
+      if(_R_H)
+        get_filename_component(R_INCLUDE_PATH ${_R_H} DIRECTORY)
+        message(CHECK_PASS "found")
+        message(STATUS "  ${_R_H}")
+      else()
+        message(CHECK_FAIL "not found")
+        message(FATAL_ERROR "R.h is necessary for building R-Interface library.")
+      endif()
     endif()
   endif()


FindGStreamer_1_0: fix build failure for new gstreamer versions

--- cmake/FindGStreamer_1_0.cmake
+++ cmake/FindGStreamer_1_0.cmake
@@ -53,17 +53,17 @@
 # Helper macro to find a Gstreamer plugin (or Gstreamer itself)
 #   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_1_0_AUDIO")
 #   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
-#   _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
 #   _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
-macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
+macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
     # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
-    pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})

-    find_path(${_component_prefix}_INCLUDE_DIRS
-        NAMES ${_header}
-        HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
-        PATH_SUFFIXES gstreamer-1.0
-    )
+    string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
+    if ("${CMAKE_MATCH_2}" STREQUAL "")
+        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
+    else ()
+        pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
+    endif ()
+    set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})

     find_library(${_component_prefix}_LIBRARIES
         NAMES ${_library} gstreamer_android
@@ -78,8 +78,8 @@
 # 1.1. Find headers and libraries
 set(GLIB_ROOT_DIR ${GSTREAMER_1_0_ROOT_DIR})
 find_package(Glib REQUIRED)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gst/gst.h gstreamer-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gstreamer-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gstbase-1.0)

 # 1.2. Check Gstreamer version
 if (GSTREAMER_1_0_INCLUDE_DIRS)
@@ -110,11 +110,11 @@
 # 2. Find Gstreamer plugins
 # -------------------------

-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gstapp-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gstaudio-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gstfft-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gstpbutils-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gstvideo-1.0)

 # ------------------------------------------------
 # 3. Process the COMPONENTS passed to FIND_PACKAGE


Restore support for samp-server-cli.bat script

--- cmake/FindSAMPServerCLI.cmake
+++ cmake/FindSAMPServerCLI.cmake
@@ -1,7 +1,8 @@
 include(FindPackageHandleStandardArgs)

 if(WIN32)
-  set(_SAMPServerCLI_EXECUTABLE_NAME samp-server-cli.exe)
+  set(_SAMPServerCLI_EXECUTABLE_NAME samp-server-cli.bat
+                                     samp-server-cli.exe)
 else()
   set(_SAMPServerCLI_EXECUTABLE_NAME samp-server-cli)
 endif()


fix find

fix find

--- cmake/modules/FindCheck.cmake
+++ cmake/modules/FindCheck.cmake
@@ -21,13 +21,13 @@
 IF(NOT CHECK_FOUND)
   SET(CHECK_DIR_MESSAGE
     "check C unit testing library was not found. Install check and check-devel.")
-  IF(NOT CHECK_FIND_QUIETLY)
+  IF(NOT Check_FIND_QUIETLY)
     MESSAGE(STATUS "${CHECK_DIR_MESSAGE}")
-  ELSE(NOT CHECK_FIND_QUIETLY)
-    IF(CHECK_FIND_REQUIRED)
+  ELSE(NOT Check_FIND_QUIETLY)
+    IF(Check_FIND_REQUIRED)
       MESSAGE(FATAL_ERROR "${CHECK_DIR_MESSAGE}")
-    ENDIF(CHECK_FIND_REQUIRED)
-  ENDIF(NOT CHECK_FIND_QUIETLY)
+    ENDIF(Check_FIND_REQUIRED)
+  ENDIF(NOT Check_FIND_QUIETLY)
 ELSE(NOT CHECK_FOUND)
   MESSAGE(STATUS "check C unit testing library: ${CHECK_LIBRARIES}")
 ENDIF(NOT CHECK_FOUND)


it's perfectly fine to compile gpgme programs without
extra cflags on a SUSE system, so requiring cflags is wrong

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

--- cmake/modules/FindGpgme.cmake
+++ cmake/modules/FindGpgme.cmake
@@ -32,11 +32,11 @@

   ENDIF (GPGMECONFIG_EXECUTABLE)

-  IF (GPGME_LIBRARIES AND GPGME_INCLUDES)
+  IF (GPGME_LIBRARIES)
       set(GPGME_FOUND TRUE)
       #message(STATUS "Found gpgme: includes: ${GPGME_INCLUDES} libs: ${GPGME_LIBRARIES}")
       message(STATUS "Found gpgme using ${GPGMECONFIG_EXECUTABLE}.")
-  ENDIF (GPGME_LIBRARIES AND GPGME_INCLUDES)
+  ENDIF (GPGME_LIBRARIES)

   IF (NOT GPGME_FOUND)
       message(FATAL_ERROR "You are missing gpgme 0.4.5 or higher.


Convert wxWidgets_LIBRARIES to full pathname form.

svn path=/trunk/; revision=8379

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -23,8 +23,10 @@
 # PLD_wxwidgets		  - ON means the wxwidgets device is enabled.
 # wxwidgets_COMPILE_FLAGS	  - individual COMPILE_FLAGS required to compile wxwidgets
 # 			    device.
-# wxwidgets_LINK_FLAGS	  - individual LINK_FLAGS for dynamic wxwidgets device.
-# DRIVERS_LINK_FLAGS  	  - list of LINK_FLAGS for all static devices.
+# wxwidgets_LINK_FLAGS	  - list of full path names of libraries and
+# 			    linker flags for dynamic wxwidgets device driver.
+# DRIVERS_LINK_FLAGS  	  - list of device LINK_FLAGS for case
+# 			    when ENABLE_DYNDRIVERS OFF.

 # Find wxWidgets needed for driver and bindings
 if(PLD_wxwidgets)
@@ -52,7 +54,8 @@
   ${wxwidgets_COMPILE_FLAGS}
   " ${wxWidgets_DEFINITIONS}"
   )
-  set(wxwidgets_LINK_FLAGS ${wxWidgets_LIBRARIES})
+  # Convert wxWidgets_LIBRARIES to full pathname form.
+  cmake_link_flags(wxwidgets_LINK_FLAGS "${wxWidgets_LIBRARIES}")
   if(WITH_FREETYPE)
     set(
     wxwidgets_COMPILE_FLAGS


Oh FFS

Oh FFS

--- ext/mathematical/FindNewerRubies.cmake
+++ ext/mathematical/FindNewerRubies.cmake
@@ -1,65 +1,292 @@
-# - Find Ruby
-# This module finds if Ruby is installed and determines where the include files
-# and libraries are. It also determines what the name of the library is. This
-# code sets the following variables:
-#
-#  RUBY_INCLUDE_PATH = path to where ruby.h can be found
-#  RUBY_EXECUTABLE   = full path to the ruby binary
-
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
-
-if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
-   # Already in cache, be silent
-   set(RUBY_FIND_QUIETLY TRUE)
-endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
-
-FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.9 ruby19 ruby1.9.1 ruby2.1 ruby2.2)
-
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['archdir']"
-   OUTPUT_VARIABLE RUBY_ARCH_DIR)
-
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['libdir']"
-   OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH)
-
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']"
-   OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH)
-
-# site_ruby
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['sitearchdir']"
-   OUTPUT_VARIABLE RUBY_SITEARCH_DIR)
-
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['sitelibdir']"
-   OUTPUT_VARIABLE RUBY_SITELIB_DIR)
-
-
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir']"
-   OUTPUT_VARIABLE RUBY_VENDORARCH_DIR)
-
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorlibdir']"
-   OUTPUT_VARIABLE RUBY_VENDORLIB_DIR)
-
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"
-  OUTPUT_VARIABLE RUBY_HEADER_DIR)
-
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['arch']"
-  OUTPUT_VARIABLE RUBY_ARCH)
-
-
-FIND_PATH(RUBY_INCLUDE_PATH
-  NAMES ruby.h
-  PATHS
-  ${RUBY_HEADER_DIR}
-)
-
-FIND_LIBRARY(RUBY_LIBRARY
-  NAMES ruby ruby1.9 ruby-1.9.1 ruby2.1 ruby-2.1 ruby-2.2 ruby2.2
-  PATHS ${RUBY_POSSIBLE_LIB_PATH}
-)
-
-MARK_AS_ADVANCED(
+#.rst:
+# FindRuby
+# --------
+#
+# Find Ruby
+#
+# This module finds if Ruby is installed and determines where the
+# include files and libraries are.  Ruby 1.8, 1.9, 2.0, 2.1 & 2.2 are
+# supported.
+#
+# The minimum required version of Ruby can be specified using the
+# standard syntax, e.g.  find_package(Ruby 1.8)
+#
+# It also determines what the name of the library is.  This code sets
+# the following variables:
+#
+# ``RUBY_EXECUTABLE``
+#   full path to the ruby binary
+# ``RUBY_INCLUDE_DIRS``
+#   include dirs to be used when using the ruby library
+# ``RUBY_LIBRARY``
+#   full path to the ruby library
+# ``RUBY_VERSION``
+#   the version of ruby which was found, e.g. "1.8.7"
+# ``RUBY_FOUND``
+#   set to true if ruby ws found successfully
+#
+# Also:
+#
+# ``RUBY_INCLUDE_PATH``
+#   same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
+
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2008-2009 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+#   RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
+#   RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
+#   RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
+#   RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
+#   RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
+
+# uncomment the following line to get debug output for this file
+# set(_RUBY_DEBUG_OUTPUT TRUE)
+
+# Determine the list of possible names of the ruby executable depending
+# on which version of ruby is required
+set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
+
+# if 1.9 is required, don't look for ruby18 and ruby1.8, default to version 1.8
+if(DEFINED Ruby_FIND_VERSION_MAJOR AND DEFINED Ruby_FIND_VERSION_MINOR)
+   set(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${RUBY_FIND_VERSION_MINOR}")
+   # we can't construct that if only major version is given
+   set(_RUBY_POSSIBLE_EXECUTABLE_NAMES
+       ruby${Ruby_FIND_VERSION_MAJOR}.${Ruby_FIND_VERSION_MINOR}
+       ruby${Ruby_FIND_VERSION_MAJOR}${Ruby_FIND_VERSION_MINOR}
+       ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
+else()
+   set(Ruby_FIND_VERSION_SHORT_NODOT "18")
+endif()
+
+if(NOT Ruby_FIND_VERSION_EXACT)
+  list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.2 ruby22)
+  list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.1 ruby21)
+  list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.0 ruby20)
+  list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.9 ruby19)
+
+  # if we want a version below 1.9, also look for ruby 1.8
+  if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
+    list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.8 ruby18)
+  endif()
+
+  list(REMOVE_DUPLICATES _RUBY_POSSIBLE_EXECUTABLE_NAMES)
+endif()
+
+find_program(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
+
+if(RUBY_EXECUTABLE  AND NOT  RUBY_VERSION_MAJOR)
+  function(_RUBY_CONFIG_VAR RBVAR OUTVAR)
+    execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['${RBVAR}']"
+      RESULT_VARIABLE _RUBY_SUCCESS
+      OUTPUT_VARIABLE _RUBY_OUTPUT
+      ERROR_QUIET)
+    if(_RUBY_SUCCESS OR _RUBY_OUTPUT STREQUAL "")
+      execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['${RBVAR}']"
+        RESULT_VARIABLE _RUBY_SUCCESS
+        OUTPUT_VARIABLE _RUBY_OUTPUT
+        ERROR_QUIET)
+    endif()
+    set(${OUTVAR} "${_RUBY_OUTPUT}" PARENT_SCOPE)
+  endfunction()
+
+
+  # query the ruby version
+   _RUBY_CONFIG_VAR("MAJOR" RUBY_VERSION_MAJOR)
+   _RUBY_CONFIG_VAR("MINOR" RUBY_VERSION_MINOR)
+   _RUBY_CONFIG_VAR("TEENY" RUBY_VERSION_PATCH)
+
+   # query the different directories
+   _RUBY_CONFIG_VAR("archdir" RUBY_ARCH_DIR)
+   _RUBY_CONFIG_VAR("arch" RUBY_ARCH)
+   _RUBY_CONFIG_VAR("rubyhdrdir" RUBY_HDR_DIR)
+   _RUBY_CONFIG_VAR("rubyarchhdrdir" RUBY_ARCHHDR_DIR)
+   _RUBY_CONFIG_VAR("libdir" RUBY_POSSIBLE_LIB_DIR)
+   _RUBY_CONFIG_VAR("rubylibdir" RUBY_RUBY_LIB_DIR)
+
+   # site_ruby
+   _RUBY_CONFIG_VAR("sitearchdir" RUBY_SITEARCH_DIR)
+   _RUBY_CONFIG_VAR("sitelibdir" RUBY_SITELIB_DIR)
+
+   # vendor_ruby available ?
+   execute_process(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'"
+      OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY  ERROR_QUIET)
+
+   if(RUBY_HAS_VENDOR_RUBY)
+      _RUBY_CONFIG_VAR("vendorlibdir" RUBY_VENDORLIB_DIR)
+      _RUBY_CONFIG_VAR("vendorarchdir" RUBY_VENDORARCH_DIR)
+   endif()
+
+   # save the results in the cache so we don't have to run ruby the next time again
+   set(RUBY_VERSION_MAJOR    ${RUBY_VERSION_MAJOR}    CACHE PATH "The Ruby major version" FORCE)
+   set(RUBY_VERSION_MINOR    ${RUBY_VERSION_MINOR}    CACHE PATH "The Ruby minor version" FORCE)
+   set(RUBY_VERSION_PATCH    ${RUBY_VERSION_PATCH}    CACHE PATH "The Ruby patch version" FORCE)
+   set(RUBY_ARCH_DIR         ${RUBY_ARCH_DIR}         CACHE PATH "The Ruby arch dir" FORCE)
+   set(RUBY_HDR_DIR          ${RUBY_HDR_DIR}          CACHE PATH "The Ruby header dir (1.9+)" FORCE)
+   set(RUBY_ARCHHDR_DIR      ${RUBY_ARCHHDR_DIR}      CACHE PATH "The Ruby arch header dir (2.0+)" FORCE)
+   set(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir" FORCE)
+   set(RUBY_RUBY_LIB_DIR     ${RUBY_RUBY_LIB_DIR}     CACHE PATH "The Ruby ruby-lib dir" FORCE)
+   set(RUBY_SITEARCH_DIR     ${RUBY_SITEARCH_DIR}     CACHE PATH "The Ruby site arch dir" FORCE)
+   set(RUBY_SITELIB_DIR      ${RUBY_SITELIB_DIR}      CACHE PATH "The Ruby site lib dir" FORCE)
+   set(RUBY_HAS_VENDOR_RUBY  ${RUBY_HAS_VENDOR_RUBY}  CACHE BOOL "Vendor Ruby is available" FORCE)
+   set(RUBY_VENDORARCH_DIR   ${RUBY_VENDORARCH_DIR}   CACHE PATH "The Ruby vendor arch dir" FORCE)
+   set(RUBY_VENDORLIB_DIR    ${RUBY_VENDORLIB_DIR}    CACHE PATH "The Ruby vendor lib dir" FORCE)
+
+   mark_as_advanced(
+     RUBY_ARCH_DIR
+     RUBY_ARCH
+     RUBY_HDR_DIR
+     RUBY_ARCHHDR_DIR
+     RUBY_POSSIBLE_LIB_DIR
+     RUBY_RUBY_LIB_DIR
+     RUBY_SITEARCH_DIR
+     RUBY_SITELIB_DIR
+     RUBY_HAS_VENDOR_RUBY
+     RUBY_VENDORARCH_DIR
+     RUBY_VENDORLIB_DIR
+     RUBY_VERSION_MAJOR
+     RUBY_VERSION_MINOR
+     RUBY_VERSION_PATCH
+     )
+endif()
+
+# In case RUBY_EXECUTABLE could not be executed (e.g. cross compiling)
+# try to detect which version we found. This is not too good.
+if(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
+   # by default assume 1.8.0
+   set(RUBY_VERSION_MAJOR 1)
+   set(RUBY_VERSION_MINOR 8)
+   set(RUBY_VERSION_PATCH 0)
+   # check whether we found 1.9.x
+   if(${RUBY_EXECUTABLE} MATCHES "ruby1.?9")
+      set(RUBY_VERSION_MAJOR 1)
+      set(RUBY_VERSION_MINOR 9)
+   endif()
+   # check whether we found 2.0.x
+   if(${RUBY_EXECUTABLE} MATCHES "ruby2.?0")
+      set(RUBY_VERSION_MAJOR 2)
+      set(RUBY_VERSION_MINOR 0)
+   endif()
+   # check whether we found 2.1.x
+   if(${RUBY_EXECUTABLE} MATCHES "ruby2.?1")
+      set(RUBY_VERSION_MAJOR 2)
+      set(RUBY_VERSION_MINOR 1)
+   endif()
+   # check whether we found 2.2.x
+   if(${RUBY_EXECUTABLE} MATCHES "ruby2.?2")
+      set(RUBY_VERSION_MAJOR 2)
+      set(RUBY_VERSION_MINOR 2)
+   endif()
+endif()
+
+if(RUBY_VERSION_MAJOR)
+   set(RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
+   set(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
+   set(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
+   set(_RUBY_NODOT_VERSION "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}")
+endif()
+
+find_path(RUBY_INCLUDE_DIR
+   NAMES ruby.h
+   HINTS
+   ${RUBY_HDR_DIR}
+   ${RUBY_ARCH_DIR}
+   /usr/lib/ruby/${_RUBY_VERSION_SHORT}/i586-linux-gnu/ )
+
+set(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIR} )
+
+# if ruby > 1.8 is required or if ruby > 1.8 was found, search for the config.h dir
+if( "${Ruby_FIND_VERSION_SHORT_NODOT}" GREATER 18  OR  "${_RUBY_VERSION_SHORT_NODOT}" GREATER 18  OR  RUBY_HDR_DIR)
+   find_path(RUBY_CONFIG_INCLUDE_DIR
+     NAMES ruby/config.h  config.h
+     HINTS
+     ${RUBY_HDR_DIR}/${RUBY_ARCH}
+     ${RUBY_ARCH_DIR}
+     ${RUBY_ARCHHDR_DIR}
+     )
+
+   set(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIRS} ${RUBY_CONFIG_INCLUDE_DIR} )
+endif()
+
+
+# Determine the list of possible names for the ruby library
+set(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT} ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION})
+
+if(WIN32)
+   set( _RUBY_MSVC_RUNTIME "" )
+   if( MSVC60 )
+     set( _RUBY_MSVC_RUNTIME "60" )
+   endif()
+   if( MSVC70 )
+     set( _RUBY_MSVC_RUNTIME "70" )
+   endif()
+   if( MSVC71 )
+     set( _RUBY_MSVC_RUNTIME "71" )
+   endif()
+   if( MSVC80 )
+     set( _RUBY_MSVC_RUNTIME "80" )
+   endif()
+   if( MSVC90 )
+     set( _RUBY_MSVC_RUNTIME "90" )
+   endif()
+
+   set(_RUBY_ARCH_PREFIX "")
+   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+     set(_RUBY_ARCH_PREFIX "x64-")
+   endif()
+
+   list(APPEND _RUBY_POSSIBLE_LIB_NAMES
+               "${_RUBY_ARCH_PREFIX}msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}"
+               "${_RUBY_ARCH_PREFIX}msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}-static"
+               "${_RUBY_ARCH_PREFIX}msvcrt-ruby${_RUBY_NODOT_VERSION}"
+               "${_RUBY_ARCH_PREFIX}msvcrt-ruby${_RUBY_NODOT_VERSION}-static" )
+endif()
+
+find_library(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+set(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
+if(_RUBY_VERSION_SHORT_NODOT GREATER 18)
+   list(APPEND _RUBY_REQUIRED_VARS RUBY_CONFIG_INCLUDE_DIR)
+endif()
+
+if(_RUBY_DEBUG_OUTPUT)
+   message(STATUS "--------FindRuby.cmake debug------------")
+   message(STATUS "_RUBY_POSSIBLE_EXECUTABLE_NAMES: ${_RUBY_POSSIBLE_EXECUTABLE_NAMES}")
+   message(STATUS "_RUBY_POSSIBLE_LIB_NAMES: ${_RUBY_POSSIBLE_LIB_NAMES}")
+   message(STATUS "RUBY_ARCH_DIR: ${RUBY_ARCH_DIR}")
+   message(STATUS "RUBY_HDR_DIR: ${RUBY_HDR_DIR}")
+   message(STATUS "RUBY_POSSIBLE_LIB_DIR: ${RUBY_POSSIBLE_LIB_DIR}")
+   message(STATUS "Found RUBY_VERSION: \"${RUBY_VERSION}\" , short: \"${_RUBY_VERSION_SHORT}\", nodot: \"${_RUBY_VERSION_SHORT_NODOT}\"")
+   message(STATUS "_RUBY_REQUIRED_VARS: ${_RUBY_REQUIRED_VARS}")
+   message(STATUS "RUBY_EXECUTABLE: ${RUBY_EXECUTABLE}")
+   message(STATUS "RUBY_LIBRARY: ${RUBY_LIBRARY}")
+   message(STATUS "RUBY_INCLUDE_DIR: ${RUBY_INCLUDE_DIR}")
+   message(STATUS "RUBY_CONFIG_INCLUDE_DIR: ${RUBY_CONFIG_INCLUDE_DIR}")
+   message(STATUS "--------------------")
+endif()
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ruby  REQUIRED_VARS  ${_RUBY_REQUIRED_VARS}
+                                        VERSION_VAR RUBY_VERSION )
+
+mark_as_advanced(
   RUBY_EXECUTABLE
   RUBY_LIBRARY
-  RUBY_INCLUDE_PATH
-)
+  RUBY_INCLUDE_DIR
+  RUBY_CONFIG_INCLUDE_DIR
+  )
+
+# Set some variables for compatibility with previous version of this file
+set(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR})
+set(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR})
+set(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_DIRS})


small cleanup

small cleanup

git-svn-id: 9eeea04daec118c8b99ac1589bcc03db7f3e68a4@196 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -738,6 +738,7 @@
     set(Matlab_MEX_COMPILER_FOUND TRUE)
   endif()
 endif()
+unset(_matlab_find_mex_compiler)

 # component Matlab program
 list(FIND Matlab_FIND_COMPONENTS MAIN_PROGRAM _matlab_find_matlab_program)
@@ -757,7 +758,7 @@
   endif()

 endif()
-
+unset(_matlab_find_matlab_program)

 # Component MX library
 list(FIND Matlab_FIND_COMPONENTS MX_LIBRARY _matlab_find_mx)
@@ -773,6 +774,8 @@
     set(Matlab_MX_LIBRARY_FOUND TRUE)
   endif()
 endif()
+unset(_matlab_find_mx)
+

 # Component ENG library
 list(FIND Matlab_FIND_COMPONENTS ENG_LIBRARY _matlab_find_eng)
@@ -787,12 +790,11 @@
     set(Matlab_ENG_LIBRARY_FOUND TRUE)
   endif()
 endif()
-
-
-unset(_matlab_find_matlab_program)
-unset(_matlab_find_mex_compiler)
-unset(_matlab_find_mx)
 unset(_matlab_find_eng)
+
+
+
+

 unset(_matlab_lib_dir_for_search)


boards: quark_d2000: openocd: Fixed load image command for D2000.

During cmake migration the load image was not correctly set.
This was causing flash failures.

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

--- boards/x86/quark_d2000_crb/board.cmake
+++ boards/x86/quark_d2000_crb/board.cmake
@@ -1 +1,7 @@
 include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
+
+set(OPENOCD_LOAD_CMD "load_image     ${PROJECT_BINARY_DIR}/${KERNEL_BIN_NAME} ${CONFIG_FLASH_BASE_ADDRESS}")
+
+set_property(GLOBAL APPEND PROPERTY FLASH_SCRIPT_ENV_VARS
+  OPENOCD_LOAD_CMD
+  )


Improvements in CMake package config generation. Added an input variable to choose the target libraries to exclude from the exported list. Fixed extraction of library names from target properties.

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -12,6 +12,8 @@
 #     libraries, format is ${CMAKE_PROJECT_NAME}
 #   ${UPPER_PROJECT_NAME}_FIND_FILES - A list of files to find if no libraries
 #     are produced
+#   ${UPPER_PROJECT_NAME}_EXCLUDE_LIBRARIES - A list of library targets
+#     to remove from the list of exported libraries
 #
 # Output variables
 #   ${UPPER_PROJECT_NAME}_FOUND - Was the project and all of the specified
@@ -31,6 +33,7 @@
 #     CPack deb generator
 #   ${UPPER_PROJECT_NAME}_DEB_DEV_DEPENDENCY - The compile-time dependency for
 #     the CPack deb generator
+

 if(PACKAGECONFIG_DONE)
   return()
@@ -170,15 +173,18 @@
 # location of the includes
 set(INCLUDE_INSTALL_DIR include)

-# compile the list of generated libraries
-get_property(LIBRARY_TARGETS GLOBAL PROPERTY ALL_LIB_TARGETS)
+# compile the list of generated libraries excluding those
+# from ${UPPER_PROJECT_NAME}_EXCLUDE_LIBRARY_TARGETS
+get_property(_all_lib_targets GLOBAL PROPERTY ALL_LIB_TARGETS)
 set(LIBRARY_NAMES)
-foreach(_target ${LIBRARY_TARGETS})
-  get_target_property(_libraryname ${_target} OUTPUT_NAME)
-  if(${_libraryname} MATCHES "_libraryname-NOTFOUND")
-    set(_libraryname ${_target})
-  endif()
-  list(APPEND LIBRARY_NAMES ${_libraryname})
+foreach(_target ${_all_lib_targets})
+  list(FIND ${UPPER_PROJECT_NAME}_EXCLUDE_LIBRARIES ${_target}
+       _contains_${target})
+  if(${_contains_${target}} STREQUAL -1)
+    get_target_property(_fullpath ${_target} LOCATION)
+    get_filename_component(_libraryname ${_fullpath} NAME)
+    list(APPEND LIBRARY_NAMES ${_libraryname})
+  endif()
 endforeach()

 # compile finding of dependent libraries


fixed cmake

fixed cmake

--- 3rdparty/bgfx/cmake/3rdparty/glsl-optimizer.cmake
+++ 3rdparty/bgfx/cmake/3rdparty/glsl-optimizer.cmake
@@ -34,32 +34,37 @@
 file( GLOB GLCPP_SOURCES ${BGFX_DIR}/3rdparty/glsl-optimizer/src/glsl/glcpp/*.c ${BGFX_DIR}/3rdparty/glsl-optimizer/src/util/*.c )
 add_library( glcpp ${GLCPP_SOURCES} )
 target_include_directories( glcpp PUBLIC ${GLSL-OPTIMIZER_INCLUDES} )
-target_compile_definitions( glcpp PRIVATE
-		"__STDC__"
-		"__STDC_VERSION__=199901L"
-		"strdup=_strdup"
-		"alloca=_alloca"
-		"isascii=__isascii"
-		"atoll=_atoi64"
-		"strtoll=_strtoi64"
-		"strtoull=_strtoui64"
-	)
+if(MSVC)
+	target_compile_definitions( glcpp PRIVATE
+			"__STDC__"
+			"__STDC_VERSION__=199901L"
+			"strdup=_strdup"
+			"alloca=_alloca"
+			"isascii=__isascii"
+			"atoll=_atoi64"
+			"strtoll=_strtoi64"
+			"strtoull=_strtoui64"
+		)
+endif()
+
 set_target_properties( glcpp PROPERTIES FOLDER "bgfx/3rdparty" )

 # mesa
 file( GLOB MESA_SOURCES ${BGFX_DIR}/3rdparty/glsl-optimizer/src/mesa/program/*.c ${BGFX_DIR}/3rdparty/glsl-optimizer/src/mesa/main/*.c )
 add_library( mesa ${MESA_SOURCES} )
 target_include_directories( mesa PUBLIC ${GLSL-OPTIMIZER_INCLUDES} )
-target_compile_definitions( mesa PRIVATE
-		"__STDC__"
-		"__STDC_VERSION__=199901L"
-		"strdup=_strdup"
-		"alloca=_alloca"
-		"isascii=__isascii"
-		"atoll=_atoi64"
-		"strtoll=_strtoi64"
-		"strtoull=_strtoui64"
-	)
+if(MSVC)
+	target_compile_definitions( mesa PRIVATE
+			"__STDC__"
+			"__STDC_VERSION__=199901L"
+			"strdup=_strdup"
+			"alloca=_alloca"
+			"isascii=__isascii"
+			"atoll=_atoi64"
+			"strtoll=_strtoi64"
+			"strtoull=_strtoui64"
+		)
+endif()
 set_target_properties( mesa PROPERTIES FOLDER "bgfx/3rdparty" )

 # glsl-optimizer
@@ -71,17 +76,18 @@
 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     target_link_libraries( glsl-optimizer m )
 endif()
-target_compile_definitions(glsl-optimizer PRIVATE
-		"__STDC__"
-		"__STDC_VERSION__=199901L"
-		"strdup=_strdup"
-		"alloca=_alloca"
-		"isascii=__isascii"
-		"atoll=_atoi64"
-		"strtoll=_strtoi64"
-		"strtoull=_strtoui64"
-	)
-if( MSVC )
+if(MSVC)
+	target_compile_definitions(glsl-optimizer PRIVATE
+			"__STDC__"
+			"__STDC_VERSION__=199901L"
+			"strdup=_strdup"
+			"alloca=_alloca"
+			"isascii=__isascii"
+			"atoll=_atoi64"
+			"strtoll=_strtoi64"
+			"strtoull=_strtoui64"
+		)
+
 	target_compile_options( glsl-optimizer PRIVATE
 		"/wd4291"
 		"/wd4100"


Fixed boost_system dependency

Fixed boost_system dependency

--- CMakeModules/FindROS.cmake
+++ CMakeModules/FindROS.cmake
@@ -55,7 +55,8 @@
     LIST(APPEND ROS_LIBRARIES ${${NAME}_LIB})
   ENDFOREACH(NAME)
   #Now that we're not using BOOST by default, boost_system is needed to use ROS libraries
-  LIST(APPEND ROS_LIBRARIES boost_system)
+  FIND_LIBRARY(BOOST_SYSTEM_LIBRARY NAMES boost_system)
+  LIST(APPEND ROS_LIBRARIES ${BOOST_SYSTEM_LIBRARY})
   MESSAGE(STATUS "ROS dependencies ${ROSDEPS} need the following libraries:")
   FOREACH(NAME ${ROS_LIBRARIES})
     MESSAGE(STATUS "  " ${NAME})


bump version to 0.9.2

bump version to 0.9.2

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -9,7 +9,7 @@

 SET(FG_VERSION_MAJOR "0")
 SET(FG_VERSION_MINOR "9")
-SET(FG_VERSION_PATCH "1")
+SET(FG_VERSION_PATCH "2")

 SET(FG_VERSION "${FG_VERSION_MAJOR}.${FG_VERSION_MINOR}.${FG_VERSION_PATCH}")
 SET(FG_API_VERSION_CURRENT ${FG_VERSION_MAJOR}${FG_VERSION_MINOR})


Updating version to 3.1.0

Updating version to 3.1.0

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -2,8 +2,8 @@
 # Make a version file that includes the ArrayFire version and git revision
 #
 SET(AF_VERSION_MAJOR "3")
-SET(AF_VERSION_MINOR "0")
-SET(AF_VERSION_PATCH "2")
+SET(AF_VERSION_MINOR "1")
+SET(AF_VERSION_PATCH "0")

 SET(AF_VERSION "${AF_VERSION_MAJOR}.${AF_VERSION_MINOR}.${AF_VERSION_PATCH}")
 EXECUTE_PROCESS(


[CMAKE] Fix DLL exports

[CMAKE] Fix DLL exports

Summary:
Some symbols are missing from the `libbitcoinconsensus` DLL, because it
expects the preprocessor `DLL_EXPORT` symbol to be defined, but it is
defined by `libtool` only.

Test Plan:
  cmake -GNinja .. \
    -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake \
    -DBUILD_BITCOIN_SEEDER=OFF
  ninja
Use a DLL inspection tool to verify that the `bitcoinconsensus_*`
symbols are exported (checked with Dependency Walker
http://www.dependencywalker.com/ on windows).

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4836

--- cmake/modules/InstallationHelper.cmake
+++ cmake/modules/InstallationHelper.cmake
@@ -51,6 +51,8 @@
 	# For autotools compatibility, rename the library to ${OUTPUT_NAME}-0.dll
 	if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
 		list(APPEND _properties OUTPUT_NAME "${NAME}-${bitcoin-abc_VERSION_MAJOR}")
+		# DLL_EXPORT is defined by libtool, and is expected by some sources.
+		target_compile_definitions(${_shared_name} PRIVATE DLL_EXPORT)
 	else()
 		list(APPEND _properties OUTPUT_NAME "${NAME}")
 	endif()


cmake

cmake

--- cmake/CFlags.cmake
+++ cmake/CFlags.cmake
@@ -1,7 +1,7 @@
 set(CMAKE_CXX_FLAGS "-std=c++0x -ftemplate-depth=500 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wdelete-non-virtual-dtor ${CMAKE_CXX_FLAGS} -Wno-predefined-identifier-outside-function")
 set(CMAKE_C_FLAGS "-std=c11 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -pedantic ${CMAKE_C_FLAGS}")

-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lz -lpthread")
+set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lz -lpthread")

 set(CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}")
 set(CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}")
@@ -14,7 +14,7 @@

 # LINUX FLAGS
 else()
-  set(CMAKE_EXE_LINKER_FLAGS "-ldl -static-libstdc++ -static-libgcc ${CMAKE_EXE_LINKER_FLAGS}")
+  set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl -static-libstdc++ -static-libgcc")
   set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
   set(BUILD_SHARED_LIBRARIES OFF)
   set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS)       # remove -Wl,-Bdynamic


[cmake] Docker.cmake : conflict in cmake/ctest binary directory

--- cmake/Docker.cmake
+++ cmake/Docker.cmake
@@ -140,7 +140,7 @@
   add_custom_target(
     ${DOCKER_IMAGE_AS_DIR}-ctest
     COMMENT "Docker ctest : ${DOCKER_IMAGE}"
-    COMMAND docker run --rm=true ${DOCKER_VFLAGS} --volumes-from=${DOCKER_WORKDIR_AS_NAME} --volumes-from=${DOCKER_REPOSITORY}-${DOCKER_IMAGE}-usr-local --workdir=${DOCKER_WORKDIR} -t ${DOCKER_REPOSITORY}/${DOCKER_IMAGE} ctest -DCTEST_SOURCE_DIRECTORY=${CMAKE_SOURCE_DIR} -DCTEST_BINARY_DIRECTORY=${CMAKE_BINARY_DIR} -S ${DOCKER_CTEST_DRIVER} ${DOCKER_CMAKE_FLAGS_WITHOUT_DOCKER})
+    COMMAND docker run --rm=true ${DOCKER_VFLAGS} --volumes-from=${DOCKER_WORKDIR_AS_NAME} --volumes-from=${DOCKER_REPOSITORY}-${DOCKER_IMAGE}-usr-local --workdir=${DOCKER_WORKDIR} -t ${DOCKER_REPOSITORY}/${DOCKER_IMAGE} ctest -DCTEST_SOURCE_DIRECTORY=${CMAKE_SOURCE_DIR} -DCTEST_BINARY_DIRECTORY=. -S ${DOCKER_CTEST_DRIVER} ${DOCKER_CMAKE_FLAGS_WITHOUT_DOCKER})

   if(NOT TARGET docker-clean)
     add_custom_target(


Trying a temporary solution to get our Linux build to work on Travis-CI.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -868,6 +868,7 @@
         SET(PLUGIN_ORIG_DIRNAME ${QT_PLUGINS_DIR}/${PLUGIN_CATEGORY})
         SET(PLUGIN_DEST_DIRNAME plugins/${PLUGIN_CATEGORY})
         SET(PLUGIN_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+MESSAGE(">>> ${PLUGIN_ORIG_DIRNAME}/${PLUGIN_FILENAME} ---> ${PLUGIN_DEST_DIRNAME}/${PLUGIN_FILENAME}")

         COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${PLUGIN_ORIG_DIRNAME} ${PLUGIN_DEST_DIRNAME} ${PLUGIN_FILENAME})


[Config] Fixed a typo in a CMake list

[Config] Fixed a typo in a CMake list

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -696,7 +696,7 @@
 	# distribution, it can be libboost_python3 or libboost_python3x
 	if (${Boost_PYTHON3_FOUND})
 	  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1})
-	  list (BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
 	endif (${Boost_PYTHON3_FOUND})

 	if (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})


Remove C++11 shim

Remove C++11 shim

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -72,16 +72,6 @@
         )
 endif()

-if(DEFINED C++11)
-    message(DEPRECATION
-        "The C++11 option is deprecated. "
-        "Set CMAKE_CXX_STANDARD explicitly."
-    )
-    if(C++11 AND NOT CMAKE_CXX_STANDARD)
-        set(CMAKE_CXX_STANDARD 11)
-    endif()
-endif()
-
 if (CMAKE_CXX_STANDARD)
     set(CMAKE_CXX_EXTENSIONS OFF)
 endif ()


Cython: Always docstrings

Cython: Always docstrings

--- lib/smurff-cpp/cmake/scripts/UseCython.cmake
+++ lib/smurff-cpp/cmake/scripts/UseCython.cmake
@@ -338,12 +338,6 @@
     set(annotate_arg "--annotate")
   endif()

-  set(no_docstrings_arg "")
-  if(CMAKE_BUILD_TYPE STREQUAL "Release" OR
-     CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
-    set(no_docstrings_arg "--no-docstrings")
-  endif()
-
   set(cython_debug_arg "")
   set(embed_pos_arg "")
   set(line_directives_arg "")
@@ -369,7 +363,7 @@
   add_custom_command(OUTPUT ${generated_file}
                      COMMAND ${CYTHON_EXECUTABLE}
                      ARGS ${cxx_arg} ${include_directory_arg} ${py_version_arg}
-                          ${embed_arg} ${annotate_arg} ${no_docstrings_arg}
+                          ${embed_arg} ${annotate_arg}
                           ${cython_debug_arg} ${embed_pos_arg}
                           ${line_directives_arg} ${CYTHON_FLAGS} ${pyx_location}
                           --output-file ${generated_file}


Add compiler flags used by the buildteam to do release

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -21,3 +21,72 @@
 SET(WITH_FEDERATED_STORAGE_ENGINE 1)
 SET(WITHOUT_EXAMPLE_STORAGE_ENGINE 1)
 SET(WITH_EMBEDDED_SERVER 1)
+SET(ENABLE_LOCAL_INFILE TRUE)
+SET(WITH_SSL bundled)
+SET(WITH_ZLIB bundled)
+
+
+IF(NOT COMPILATION_COMMENT)
+  SET(COMPILATION_COMMENT "MySQL Community Server (GPL)")
+ENDIF()
+
+IF(UNIX)
+  SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql")
+  SET(WITH_EXTRA_CHARSETS complex)
+  SET(WITH_READLINE TRUE)
+  SET(WITH_PIC TRUE)
+
+  # Default GCC flags
+  IF(CMAKE_C_COMPILER_IS_GNUCXX)
+   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer")
+   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti")
+  ENDIF()
+
+
+  # HPUX flags
+  IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+    IF(CMAKE_C_COMPILER_ID MATCHES "HP")
+      IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
+        SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -AC99")
+        SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -Aa")
+      ENDIF()
+    ENDIF()
+    SET(WITH_SSL)
+  ENDIF()
+
+  # Linux flags
+  IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+    IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
+      SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
+      SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
+    ENDIF()
+  ENDIF()
+
+  # OSX flags
+  IF(APPLE)
+   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+  ENDIF()
+
+  # Solaris flags
+  IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+    IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
+      IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
+        IF(CMAKE_SIZEOF_VOIDP EQUAL 4)
+          # 32 bit - optinmization is -xO2
+          SET(CMAKE_C_FLAGS_RELWITHDEBINFO
+            "-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
+          SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
+            "-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
+        ELSE()
+          # 64 bit - optimization is -xO3
+          SET(CMAKE_C_FLAGS_RELWITHDEBINFO
+            "-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
+          SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
+            "-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
+         ENDIF()
+       ENDIF()
+    ENDIF()
+  ENDIF()
+
+ ENDIF()


Removed a newline in string definition - cmake does not support multiline strings

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -17,8 +17,7 @@

 set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE
-    "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0
--DLL_SEND_CRASH_REPORTS=${release_crash_reports} -DNDEBUG")
+    "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=${release_crash_reports} -DNDEBUG")

 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
     "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")


getdeps: add an install_fb_python_executable() function to the CMake utilities

Summary:
Add a `install_fb_python_executable()` function to `FBPythonBinary.cmake` for
helping to install python executables generated with
`add_fb_python_executable()`.  This primarily helps by automatically looking
up the correct output file to install from the generated targets.

Reviewed By: wez

Differential Revision: D18774539

fbshipit-source-id: 4b397580d72ac448f21d1db6d2cdd653cf3635df

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -548,6 +548,30 @@
 endfunction()

 #
+# Install an FB-style packaged python binary.
+#
+# - DESTINATION <export-name>:
+#   Associate the installed target files with the given export-name.
+#
+function(install_fb_python_executable TARGET)
+  # Parse the arguments
+  set(one_value_args DESTINATION)
+  set(multi_value_args)
+  fb_cmake_parse_args(
+    ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
+  )
+
+  if(NOT DEFINED ARG_DESTINATION)
+    set(ARG_DESTINATION bin)
+  endif()
+
+  install(
+    PROGRAMS "$<TARGET_PROPERTY:${TARGET}.GEN_PY_EXE,EXECUTABLE>"
+    DESTINATION "${ARG_DESTINATION}"
+  )
+endfunction()
+
+#
 # Install a python library.
 #
 # - EXPORT <export-name>:


It seems like CMAKE_CXX_FLAGS is getting double appended when building as a nested cmake project,
which breaks my build as gcc does not allow -specs=nosys.specs to be called multiple times.

Removing this fixes it and seems to keep the same compile options, just removing the duplicate definition.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -138,7 +138,7 @@
   set(cxx_base_flags "${cxx_base_flags} ${GTEST_HAS_PTHREAD_MACRO}")

   # For building gtest's own tests and samples.
-  set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}")
+  set(cxx_exception "${cxx_base_flags} ${cxx_exception_flags}")
   set(cxx_no_exception
     "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_no_exception_flags}")
   set(cxx_default "${cxx_exception}")


fix CFLAGS without cast-qual

fix CFLAGS without cast-qual

--- ext_build/boz-vars.cmake
+++ ext_build/boz-vars.cmake
@@ -51,6 +51,6 @@
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wswitch-default")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdeclaration-after-statement")
 add_definitions(-Wmissing-declarations -Wwrite-strings )
-add_definitions(-Wcast-qual -Wunknown-pragmas)
+add_definitions(-Wunknown-pragmas)
 add_definitions(-Wformat-security)
 add_definitions(-Wstrict-aliasing -Wreturn-type -Wmissing-noreturn)


Better fix for the boost 1.56 issues

Better fix for the boost 1.56 issues

--- Compiler.cmake
+++ Compiler.cmake
@@ -34,6 +34,7 @@
 endif()

 option(ENABLE_WARN_DEPRECATED "Enable deprecation warnings" ON)
+option(ENABLE_CXX11_STDLIB "Enable C++11 stdlib" OFF)
 if(ENABLE_WARN_DEPRECATED)
   add_definitions(-DWARN_DEPRECATED) # projects have to pick this one up
 endif()
@@ -58,6 +59,7 @@
     if(GCC_COMPILER_VERSION VERSION_LESS COMMON_MINIMUM_GCC_VERSION)
       message(FATAL_ERROR "Using gcc ${GCC_COMPILER_VERSION}, need at least ${COMMON_MINIMUM_GCC_VERSION}")
     endif()
+    set(CXX11_STDLIB "-stdlib=libc++")
   endif()

   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_GCC_FLAGS}")
@@ -151,3 +153,10 @@
 endif()

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_CXXSTD_FLAGS}")
+if(ENABLE_CXX11_STDLIB)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_STDLIB}")
+else()
+  # Fix boost again to not include std::move and friends
+  add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES
+    -DBOOST_NO_CXX11_REF_QUALIFIERS)
+endif()


* check: remove checking libcap;

* check: remove checking libcap;

--- check.cmake
+++ check.cmake
@@ -67,9 +67,6 @@
 # check bash-completion
 pkg_check_modules(BASH_COMPL bash-completion)

-# check libcap
-pkg_check_modules(CAP libcap)
-
 # check kmod library
 option(KMOD_ENABLE "Disable loadable modules support" ON)
 if (${KMOD_ENABLE})


Added .m and .mm files as implementation files for cc_library

--- Googlify.cmake
+++ Googlify.cmake
@@ -232,7 +232,7 @@
 #! @param ARGN List of C++ sources.
 function(cc_library TARGET)
   get_full_target(${TARGET} FULL_TARGET)
-  string(REGEX MATCHALL "[^;]+\\.cc($|;)" HAS_CC_FILE "${ARGN}")
+  string(REGEX MATCHALL "[^;]+\\.(cc|m|mm)($|;)" HAS_CC_FILE "${ARGN}")
   if ("${HAS_CC_FILE}" STREQUAL "")
     # An empty cc file is required to link a header only library (which
     # although unnecessary is more simple to handle - e.g. if the library was to


COMP: Fix link errors related to not explicitly linking gdi32 on cygwin.

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -27,6 +27,7 @@
 # The platform is gcc on cygwin.
     SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -mwin32")
     SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -mwin32")
+    LINK_LIBRARIES(-lgdi32)
   ENDIF(WIN32)
   IF(MINGW)
     SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -mthreads")
@@ -34,7 +35,6 @@
     SET(VTK_REQUIRED_EXE_LINKER_FLAGS "${VTK_REQUIRED_EXE_LINKER_FLAGS} -mthreads")
     SET(VTK_REQUIRED_SHARED_LINKER_FLAGS "${VTK_REQUIRED_SHARED_LINKER_FLAGS} -mthreads")
     SET(VTK_REQUIRED_MODULE_LINKER_FLAGS "${VTK_REQUIRED_MODULE_LINKER_FLAGS} -mthreads")
-    LINK_LIBRARIES(-lgdi32)
   ENDIF(MINGW)
   IF(CMAKE_SYSTEM MATCHES "SunOS.*")
 # Disable warnings that occur in X11 headers.


Don't remove the build directory.

Don't remove the build directory.

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -539,12 +539,11 @@

     cmake_parse_arguments (RM_BUILD
                            ""
-                           "BINARY_DIR;SOURCE_DIR"
+                           "BINARY_DIR"
                            ""
                            ${CALLER_ARGN})

     file (REMOVE_RECURSE "${RM_BUILD_BINARY_DIR}")
-    file (REMOVE_RECURSE "${RM_BUILD_SOURCE_DIR}")

 endfunction ()


Backport ExternalData.cmake for CMake version 3.0

The string APPEND subcommand was not add to CMake until version 3.4.

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -492,10 +492,10 @@
         if("x${piece}" MATCHES "^x${data_regex}$")
           # Replace this DATA{}-piece with a file path.
           _ExternalData_arg("${target}" "${piece}" "${CMAKE_MATCH_1}" file)
-          string(APPEND outArg "${file}")
+          set(outArg "${outArg}${file}")
         else()
           # No replacement needed for this piece.
-          string(APPEND outArg "${piece}")
+          set(outArg "${outArg}${piece}")
         endif()
       endforeach()
     else()
@@ -715,12 +715,12 @@
     get_filename_component(reldir "${reldata}" PATH)
   endif()
   if(reldir)
-    string(APPEND reldir "/")
+    set(reldir "${reldir}/")
   endif()
   _ExternalData_exact_regex(reldir_regex "${reldir}")
   if(recurse_option)
     set(glob GLOB_RECURSE)
-    string(APPEND reldir_regex "(.+/)?")
+    set(reldir_regex "${reldir_regex}(.+/)?")
   else()
     set(glob GLOB)
   endif()
@@ -736,7 +736,7 @@
   set(all "")
   set(sep "")
   foreach(regex ${associated_regex})
-    string(APPEND all "${sep}${reldir_regex}${regex}")
+    set(all "${all}${sep}${reldir_regex}${regex}")
     set(sep "|")
   endforeach()
   _ExternalData_arg_find_files(${glob} "${reldir}" "${all}")
@@ -1026,9 +1026,9 @@
     else()
       _ExternalData_download_file("${url}" "${tmp}" err errMsg)
     endif()
-    string(APPEND tried "\n  ${url}")
+    set(tried "${tried}\n  ${url}")
     if(err)
-      string(APPEND tried " (${errMsg})")
+      set(tried "${tried} (${errMsg})")
     else()
       # Verify downloaded object.
       _ExternalData_compute_hash(dl_hash "${algo}" "${tmp}")
@@ -1036,7 +1036,7 @@
         set(found 1)
         break()
       else()
-        string(APPEND tried " (wrong hash ${algo}=${dl_hash})")
+        set(tried "${tried} (wrong hash ${algo}=${dl_hash})")
         if("$ENV{ExternalData_DEBUG_DOWNLOAD}" MATCHES ".")
           file(RENAME "${tmp}" "${store}/${algo}/${dl_hash}")
         endif()


CodeGenerator: Link configuration files to binary dir

Change-Id: Ief36b5bf8e950082e2448758ad8eacc7dc161235

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -905,6 +905,12 @@
       ${CONFIG_FILES}
       DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/kurento/modules/${CONFIG_FILES_DIR}
     )
+
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/modules_config/${CONFIG_FILES_DIR})
+    foreach (CONFIG_FILE ${CONFIG_FILES})
+      execute_process (
+          COMMAND ln -fs ${CONFIG_FILE} ${CMAKE_BINARY_DIR}/modules_config/${CONFIG_FILES_DIR})
+    endforeach()
   else()
     message (STATUS "No config files found")
   endif()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


build: add lib64 search path to cppunit

build: add lib64 search path to cppunit

--- src/cmake/FindCppUnit.cmake
+++ src/cmake/FindCppUnit.cmake
@@ -10,18 +10,33 @@
     SET(CPPUNIT_FIND_QUIETLY TRUE)
 ENDIF (CPPUNIT_INCLUDE_DIR)

-FIND_PATH(CPPUNIT_INCLUDE_DIR TestSuite.h PATHS /usr/include/cppunit /usr/include/libcppunit )
+FIND_PATH(CPPUNIT_INCLUDE_DIR TestSuite.h
+    PATHS
+    /usr/include/cppunit
+    /usr/local/include/
+    /usr/local/include/cppunit
+    /usr/include/libcppunit
+)

 SET(CPPUNIT_NAMES cppunit)
-FOREACH( lib ${CPPUNIT_NAMES} )
-    FIND_LIBRARY(CPPUNIT_LIBRARY_${lib} NAMES ${lib} )
+FOREACH(lib ${CPPUNIT_NAMES} )
+    FIND_LIBRARY(CPPUNIT_LIBRARY_${lib}
+        NAMES ${lib}
+        PATHS
+        /usr/lib64
+        /usr/lib
+        /usr/local/lib64
+        /usr/local/lib
+    )
     LIST(APPEND CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY_${lib}})
+    #message(STATUS "===== ${CPPUNIT_LIBRARY_${lib}}")
 ENDFOREACH(lib)
+

 # handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if.
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleCompat)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIR)

 IF(NOT CPPUNIT_FOUND)
     SET( CPPUNIT_LIBRARIES )


Treat CppUnit and Poco as system headers in Blueberry

--- BlueBerry/CMake/MacroCreateCTKPlugin.cmake
+++ BlueBerry/CMake/MacroCreateCTKPlugin.cmake
@@ -113,7 +113,7 @@
   set(_additional_target_libraries )
   if(_PLUGIN_TEST_PLUGIN)
     find_package(CppUnit REQUIRED)
-    include_directories(${CppUnit_INCLUDE_DIRS})
+    include_directories(SYSTEM ${CppUnit_INCLUDE_DIRS})
     list(APPEND _additional_target_libraries ${CppUnit_LIBRARIES})
   endif()

@@ -155,7 +155,7 @@
     target_link_libraries(${PLUGIN_TARGET} mbilog)
   endif()

-  include_directories(${Poco_INCLUDE_DIRS})
+  include_directories(SYSTEM ${Poco_INCLUDE_DIRS})
   include_directories(${BlueBerry_BINARY_DIR})

   # Only add the following Poco libraries due to possible name clashes


cmake development

cmake development

--- lib/agraph/sources.cmake
+++ lib/agraph/sources.cmake
@@ -1,8 +1,10 @@
 # $Id$ $Revision$

-SET(agraph_SRCDIR ${CMAKE_SOURCE_DIR}/lib/agraph)
-
-INCLUDE_DIRECTORIES(${agraph_SRCDIR})
+INCLUDE_DIRECTORIES(
+	${top_SRCDIR}
+	${agraph_SRCDIR}
+	${cdt_SRCDIR}
+)

 ADD_CUSTOM_COMMAND(
 	WORKING_DIRECTORY ${agraph_SRCDIR}
@@ -30,7 +32,6 @@
 	${agraph_SRCDIR}/attr.c
 	${agraph_SRCDIR}/edge.c
 	${agraph_SRCDIR}/flatten.c
-	${agraph_SRCDIR}/grammar.c
 	${agraph_SRCDIR}/graph.c
 	${agraph_SRCDIR}/id.c
 	${agraph_SRCDIR}/imap.c
@@ -41,8 +42,10 @@
 	${agraph_SRCDIR}/pend.c
 	${agraph_SRCDIR}/rec.c
 	${agraph_SRCDIR}/refstr.c
-	${agraph_SRCDIR}/scan.c
 	${agraph_SRCDIR}/subg.c
 	${agraph_SRCDIR}/utils.c
 	${agraph_SRCDIR}/write.c
+	${agraph_SRCDIR}/grammar.c
+	${agraph_SRCDIR}/grammar.h
+	${agraph_SRCDIR}/scan.c
 )


cmake file

cmake file

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -390,7 +390,8 @@
   Rendering/mitkTextOverlay3D.cpp
   Rendering/mitkLabelOverlay3D.cpp
   Rendering/mitkOverlay2DLayouter.cpp
-  Rendering/mitkScaleLegendOverlay
+  Rendering/mitkScaleLegendOverlay.cpp
+  Rendering/mitkLogoOverlay.cpp

   Common/mitkException.cpp
   Common/mitkCommon.h


COMP: missing include in IterativeTriangleCellSubdivision

Change-Id: I8ffbd7057182ee90277fd714953ef31a11c421ad

--- Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake
+++ Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake
@@ -7,5 +7,5 @@
   http://www.insight-journal.org/browse/publication/831
   http://hdl.handle.net/10380/3307"
   GIT_REPOSITORY http://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter
-  GIT_TAG de694991d2c16bc72030f4a0d4cd3a6bf229e1c7
+  GIT_TAG 3597d0547131dd5234c21941db9c6889c055c5a2
   )


select NMake Makefiles on WIN32

select NMake Makefiles on WIN32

--- test.cmake
+++ test.cmake
@@ -2,7 +2,6 @@
 Set(CTEST_BINARY_DIRECTORY $ENV{VC_BUILDDIR})
 Set(CTEST_SITE $ENV{SITE})
 Set(CTEST_BUILD_NAME $ENV{LABEL})
-Set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 Set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)
 set(CTEST_NOTES_FILES ${CTEST_SOURCE_DIRECTORY}/.git/HEAD ${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/$ENV{git_branch})

@@ -10,8 +9,14 @@
 include(CTestConfig.cmake)
 set(CTEST_USE_LAUNCHERS 1) # much improved error/warning message logging

-if(NOT CMAKE_MAKE_PROGRAM)
-   set(CMAKE_MAKE_PROGRAM "make")
+if(WIN32)
+   set(CTEST_CMAKE_GENERATOR "NMake Makefiles")
+   set(CMAKE_MAKE_PROGRAM "nmake")
+else()
+   set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+   if(NOT CMAKE_MAKE_PROGRAM)
+      set(CMAKE_MAKE_PROGRAM "make")
+   endif()
 endif()

 macro(go)