Rewrite the FindSampgdk3 module

Rewrite the FindSampgdk3 module

--- cmake/Modules/FindSampgdk3.cmake
+++ cmake/Modules/FindSampgdk3.cmake
@@ -1,17 +1,64 @@
-# Try to find Sampgdk3
+# Find sampgdk 3.x library and headers
 #
 # Defined variables:
-# - Sampgdk3_FOUND
-# - Sampgdk3_INCLUDE_DIRS
-# - Sampgdk3_LIBRARIES
+#   Sampgdk3_FOUND
+#   Sampgdk3_LIBRARY_DIRS
+#   Sampgdk3_LIBRARY (cached)
+#   Sampgdk3_LIBRARY_DEBUG
+#   Sampgdk3_LIBRARY_RELEASE
+#   Sampgdk3_LIBRARIES
+#   Sampgdk3_INCLUDE_DIR (cached)
+#   Sampgdk3_INCLUDE_DIRS

-find_path(Sampgdk3_INCLUDE_DIR NAMES sampgdk/a_samp.h)
-find_library(Sampgdk3_LIBRARY NAMES sampgdk3 libsampgdk3)
+find_path(Sampgdk3_INCLUDE_DIR NAMES "sampgdk/a_samp.h")
+
+find_library(Sampgdk3_LIBRARY_DEBUG NAMES "sampgdk3_d" "libsampgdk_d.so.3")
+find_library(Sampgdk3_LIBRARY_RELEASE NAMES "sampgdk3" "libsampgdk.so.3")
+
+if(Sampgdk3_LIBRARY_DEBUG AND Sampgdk3_LIBRARY_RELEASE)
+	if(CMAKE_CONFIGURATIONS OR CMAKE_BUILD_TYPE)
+		set(Sampgdk3_LIBRARY debug ${Sampgdk3_LIBRARY_DEBUG} optimized ${Sampgdk3_LIBRARY_RELEASE})
+	else()
+		set(Sampgdk3_LIBRARY ${Sampgdk3_LIBRARY_RELEASE})
+	endif()
+endif()
+
+if(Sampgdk3_LIBRARY_DEBUG AND NOT Sampgdk3_LIBRARY_RELEASE)
+	set(Sampgdk3_LIBRARY         ${Sampgdk3_LIBRARY_DEBUG})
+	set(Sampgdk3_LIBRARY_RELEASE ${Sampgdk3_LIBRARY_DEBUG})
+endif()
+
+if(Sampgdk3_LIBRARY_RELEASE AND NOT Sampgdk3_LIBRARY_DEBUG)
+	set(Sampgdk3_LIBRARY         ${Sampgdk3_LIBRARY_RELEASE})
+	set(Sampgdk3_LIBRARY_DEBUG   ${Sampgdk3_LIBRARY_RELEASE})
+endif()
+
+set(Sampgdk3_LIBRARY ${Sampgdk3_LIBRARY} CACHE FILEPATH "SA-MP GDK library")
+set(Sampgdk3_INCLUDE_DIR ${Sampgdk3_INCLUDE_DIR} CACHE PATH "SA-MP GDK include directory")
+
+mark_as_advanced(
+	Sampgdk3_LIBRARY_DIRS
+	Sampgdk3_LIBRARY
+	Sampgdk3_LIBRARY_DEBUG
+	Sampgdk3_LIBRARY_RELEASE
+	Sampgdk3_INCLUDE_DIR
+)
+
+foreach(lib IN LISTS Sampgdk3_LIBRARY)
+	get_filename_component(path "${lib}" PATH)
+	list(APPEND Sampgdk3_LIBRARY_DIRS "${path}")
+endforeach()
+list(REMOVE_DUPLICATES Sampgdk3_LIBRARY_DIRS)

 set(Sampgdk3_LIBRARIES ${Sampgdk3_LIBRARY})
 set(Sampgdk3_INCLUDE_DIRS ${Sampgdk3_INCLUDE_DIR})

+mark_as_advanced(
+	Sampgdk3_LIBRARIES
+	Sampgdk3_INCLUDE_DIRS
+)
+
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Sampgdk3 DEFAULT_MSG Sampgdk3_LIBRARY Sampgdk3_INCLUDE_DIR)
-
-mark_as_advanced(Sampgdk3_LIBRARIES Sampgdk3_INCLUDE_DIRS)
+find_package_handle_standard_args(Sampgdk3
+	REQUIRED_VARS Sampgdk3_INCLUDE_DIRS Sampgdk3_LIBRARY_DIRS Sampgdk3_LIBRARIES
+)


build: add a dependency on the swift compiler

Add a dependency on the swift compiler to ensure that a change to the
compiler will rebuild the swift portions.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -57,6 +57,7 @@
                        ${module_directory}/${ASL_MODULE_NAME}.swiftdoc
                      DEPENDS
                        ${ASL_SOURCES}
+                       ${CMAKE_SWIFT_COMPILER}
                      COMMAND
                        ${CMAKE_COMMAND} -E make_directory ${module_directory}
                      COMMAND


Revert "Disable autostart for now so usb works."

This reverts commit b2c67a4cf90b2db2ffbb1bb0453623ce12c4d66d.

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -291,23 +291,21 @@
 	set(romfs_pruner ${CMAKE_SOURCE_DIR}/Tools/px_romfs_pruner.py)
 	set(bin_to_obj ${CMAKE_SOURCE_DIR}/cmake/nuttx/bin_to_obj.py)

+
 	#message(STATUS "temp_dir: ${romfs_temp_dir}")
 	#message(STATUS "src_dir: ${romfs_src_dir}")

 	add_custom_command(OUTPUT rc.autostart
 		COMMAND ${PYTHON_EXECUTABLE} ${romfs_autostart}
-			-a ${romfs_src_dir}/init.d
+			-a ${romfs_src_dir}/init.d/
 			-s rc.autostart
 		)

 	add_custom_command(OUTPUT romfs.bin
 		COMMAND cmake -E remove_directory ${romfs_temp_dir}
 		COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}
-		# TODO XXX hack to get nsh to work, copying real
-	    # autostart in currently makes nsh fail over usb
-		COMMAND cmake -E touch ${romfs_temp_dir}/init.d/rc.autostart
-		#COMMAND cmake -E copy rc.autostart ${romfs_temp_dir}/init.d
-		#TODO add romfs cleanup of temp file .~, .swp etc
+		COMMAND cmake -E copy rc.autostart ${romfs_temp_dir}/init.d
+		#TODO add romfs cleanup and pruning
 		COMMAND ${PYTHON_EXECUTABLE} ${romfs_pruner}
 			--folder ${romfs_temp_dir}
 		COMMAND ${GENROMFS} -f ${CMAKE_CURRENT_BINARY_DIR}/romfs.bin


don't print coverage sources

don't print coverage sources

--- share/cmake/Coveralls.cmake
+++ share/cmake/Coveralls.cmake
@@ -57,7 +57,7 @@
 		set(COVERAGE_SRCS "${COVERAGE_SRCS}*${COVERAGE_SRC}")
 	endforeach()

-	message("Coverage sources: ${COVERAGE_SRCS}")
+	#message("Coverage sources: ${COVERAGE_SRCS}")
 	set(COVERALLS_FILE ${PROJECT_BINARY_DIR}/coveralls.json)

 	add_custom_target(coveralls_generate


nightly configuration parameters

nightly configuration parameters

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -273,20 +273,16 @@

 # Main code !
 ctest_start(${CTEST_TEST_TYPE})
-#ctest_update()
-#ctest_configure()
-#ctest_build()
-#ctest_test()

 SET(CONFIGURE_OPTIONS
   "-DCMAKE_C_COMPILER:FILEPATH=mpicc"
   "-DCMAKE_CXX_COMPILER:FILEPATH=mpicxx"
   "-DCMAKE_Fortran_COMPILER:FILEPATH=mpif90"
-  "-DCMAKE_Fortran_FLAGS=\"-fpic -ffree-line-length-0\""
-  "-Dmsi_DIR=${MSI_ROOT}"
-  "-SCOREC_DIR=${SCOREC_ROOT}"
-  "-DENABLE_ZOLTAN:BOOL=ON"
-  "-DPCU_COMPRESS:BOOL=ON"
+  "-DSCOREC_DIR:FILEPATH=$ENV{PUMI_ROOT}/lib/cmake/SCOREC/"
+  "-DENABLE_PETSC:BOOL=ON"
+  "-DPETSC_DIR:FILEPATH=$ENV{PETSC_DIR}"
+  "-DPETSC_ARCH:FILEPATH=$ENV{PETSC_ARCH}"
+  "-DENABLE_COMPLEX:BOOL=OFF"
   "-DENABLE_TESTING:BOOL=ON"
   )


Capitalize C++11

Capitalize C++11

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -120,7 +120,7 @@
   endif()

   # CMAKE_OSX_DEPLOYMENT_TARGET < 10.9 implies -stdlib=libstdc++, which doesn't have
-  # complete c++11 support. override with libc++
+  # complete C++11 support. Override with libc++
   if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" PARENT_SCOPE)
   endif()


corrected HDF5_dir for win32

corrected HDF5_dir for win32

--- superbuild/External-HDF5.cmake
+++ superbuild/External-HDF5.cmake
@@ -14,5 +14,8 @@
     -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DEPECENCIES_DIR}
   INSTALL_DIR ${INSTALL_DEPECENCIES_DIR}
 )
-
+if (WIN32)
+set( HDF5_DIR ${INSTALL_DEPECENCIES_DIR}/cmake/hdf5/ )
+else ()
 set( HDF5_DIR ${INSTALL_DEPECENCIES_DIR}/share/cmake/hdf5/ )
+endif ()


fixed cuda find macro

fixed cuda find macro

--- imp_cmake/cmake/macros/imp_finders.cmake
+++ imp_cmake/cmake/macros/imp_finders.cmake
@@ -7,8 +7,9 @@
 # CUDA
 ##
 find_package(CUDA)
-imp_debug("FOUND_CUDA: ${FOUND_CUDA}")
-if ((NOT ${FOUND_CUDA}) OR (NOT (${CUDA_VERSION_MAJOR} LESS 7)))
+imp_debug("CUDA_FOUND: ${CUDA_FOUND}")
+imp_debug("CUDA_VERSION_MAJOR: ${CUDA_VERSION_MAJOR}")
+if ((NOT ${CUDA_FOUND}) OR (${CUDA_VERSION_MAJOR} LESS 7))
    imp_debug("CUDA not found or too old CUDA version (CUDA_VERSION_MAJOR < 7). Skipping this package.")
    return()
 endif()


cmake: remove work-around for modules doxygen

There was a hack in the cmake scripts that helped generating the doxygen
documentation for modules in spite of the file organisation. This commit
removes this since it is no longer necessary.

Former-commit-id: c52b999fafac3c8b5d1a385bc8038cd2fd0965b5

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -60,7 +60,7 @@
         set(tag_files)
         foreach(dependency ${dependencies})
             list(APPEND dependencies_targets "doc-${dependency}")
-            set(tag_files "${tag_files} misc/doxygen-tags/${dependency}=../${dependency}")
+            set(tag_files "${tag_files} misc/doxygen-tagfiles/${dependency}=../${dependency}")
         endforeach()

         # Generate a Doxyfile based on Doxyfile.in, with configure_file()
@@ -90,14 +90,6 @@
         sofa_get_complete_dependencies(${project} project_dependencies)
         sofa_list_intersection(documentable_dependencies project_dependencies SOFA_DOCUMENTABLE_PROJECTS)
         set(input "${GLOBAL_PROJECT_PATH_${project}}")
-
-        # Temporary workaround for modules, which are not organised by directory:
-        # we extract the list of source files from the CMakeLists.txt files.
-        if("${input}" MATCHES ".*/modules/sofa/component/.*")
-            if(NOT WIN32)
-                execute_process(COMMAND bash -c "sed -e 's/#.*//' ${input}/CMakeLists.txt | sed -ne '/\\.\\.\\/.*\\(h\\|cpp\\|inl\\)/s/.*\\(\\.\\.\\/.*\\(h\\|cpp\\|inl\\)\\).*/\\1/p' | sed -e ':foo;N;$!bfoo;s/\\n/ /g' | sed -e 's:\\.\\.:${SOFA_SRC_DIR}/modules/sofa/component:g'" OUTPUT_VARIABLE input)
-            endif()
-        endif()

         add_doc_target("${project}" "${input}" "${documentable_dependencies};SOFA")
     endforeach()


Enable Jenkins to use the asio tag

Enable Jenkins to use the asio tag

--- cmake/jenkins.cmake
+++ cmake/jenkins.cmake
@@ -8,3 +8,7 @@
   set(CMAKE_C_COMPILER "clang" CACHE STRING "c++ compiler option")
   set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "c++ compiler option")
 endif()
+if ("${LABEL_EXPR}" MATCHES "asio")
+  message(STATUS "Set define to use boost asio for the multiplexer")
+  add_definitions(-DCAF_USE_ASIO)
+endif()


fix issue with cmake modules naming

fix issue with cmake modules naming

--- cmake/modules.cmake
+++ cmake/modules.cmake
@@ -57,7 +57,7 @@

 macro (eval_cmakelists module_path)
 	if (EXISTS ${module_path}/CMakeLists.txt)
-		include (${module_path}/CMAKELists.txt)
+		include (${module_path}/CMakeLists.txt)
 	endif ()
 endmacro ()


Delete cmake_install.cmake

Delete cmake_install.cmake

--- cmake_install.cmake
+++ cmake_install.cmake
@@ -1,44 +0,0 @@
-# Install script for directory: /home/sean/git_repo
-
-# Set the install prefix
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  set(CMAKE_INSTALL_PREFIX "/usr/local")
-endif()
-string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  if(BUILD_TYPE)
-    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  else()
-    set(CMAKE_INSTALL_CONFIG_NAME "")
-  endif()
-  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-endif()
-
-# Set the component getting installed.
-if(NOT CMAKE_INSTALL_COMPONENT)
-  if(COMPONENT)
-    message(STATUS "Install component: \"${COMPONENT}\"")
-    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  else()
-    set(CMAKE_INSTALL_COMPONENT)
-  endif()
-endif()
-
-# Install shared libraries without execute permission?
-if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-  set(CMAKE_INSTALL_SO_NO_EXE "1")
-endif()
-
-if(CMAKE_INSTALL_COMPONENT)
-  set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-else()
-  set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-endif()
-
-string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
-       "${CMAKE_INSTALL_MANIFEST_FILES}")
-file(WRITE "/home/sean/git_repo/${CMAKE_INSTALL_MANIFEST}"
-     "${CMAKE_INSTALL_MANIFEST_CONTENT}")


cmake: emu: qemu: do not enable CAN bus on NIOS2 and LEON3

QEMU for NIOS2 and LEON3 do not provide support for the "can-bus" object
type. Skip configuring CAN bus command line arguments for these.

Signed-off-by: Henrik Brix Andersen <24a3f13c22635bab658e39fc5f1e63c575328aae@vestas.com>

--- cmake/emu/qemu.cmake
+++ cmake/emu/qemu.cmake
@@ -269,7 +269,7 @@
   endif()
 endif(QEMU_PIPE_STACK)

-if(CONFIG_CAN)
+if(CONFIG_CAN AND NOT (CONFIG_NIOS2 OR CONFIG_SOC_LEON3))
   # Add CAN bus 0
   list(APPEND QEMU_FLAGS -object can-bus,id=canbus0)


do not build zlib into a subfolder, but into main includes folder

--- cmake/get-zlib.cmake
+++ cmake/get-zlib.cmake
@@ -1,7 +1,7 @@
 #------------------------------------------------------------------------------
 # External Project:     zlib
 # Downloads:            http://zlib.net/
-# Github:               https://github.com/madler/zlib
+# Github:               https://github.com/madler/zlib
 #------------------------------------------------------------------------------

 include(ExternalProject)
@@ -11,7 +11,7 @@
 set(ZLIB_CMAKE_ARGS
     ${COMMON_CMAKE_ARGS}
       -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_INSTALL_PREFIX=${DEPENDENCY_INSTALL_DIR}/zlib
+      -DCMAKE_INSTALL_PREFIX=${DEPENDENCY_INSTALL_DIR}
       #-DCMAKE_PREFIX_PATH=${DEPENDENCY_INSTALL_DIR} ${CMAKE_PREFIX_PATH}
       -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
       -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}


Change SOFA repo url and hash.

Change SOFA repo url and hash.

--- CMake/Superbuild/External_Sofa.cmake
+++ CMake/Superbuild/External_Sofa.cmake
@@ -61,8 +61,8 @@
   ExternalProject_Add(${proj}
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
-    GIT_REPOSITORY "git@github.com:ricortiz/SOFA.git"
-    GIT_TAG "60bad2f46ecf8a749246fd083278b293f264a22f"
+    GIT_REPOSITORY "git@github.com:ricortiz/Bender-SOFA.git"
+    GIT_TAG "9ec8cc4fc1cdab28a4791eae57112f40cb19e48c"
     UPDATE_COMMAND ""
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


ENH: Add more message output to ctkDashboardDriverScript.cmake

A message is now printed when coverage and memcheck are started.

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -173,6 +173,7 @@

       # Coverage per sub-project (library, application or plugin)
       if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
+        message("Coverage ${subproject}")
         ctest_coverage(BUILD "${ctk_build_dir}" LABELS "${subproject}")
         ctest_submit(PARTS Coverage)
       endif ()
@@ -189,12 +190,14 @@

     # Global coverage ...
     if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
+      message("Global coverage")
       ctest_coverage(BUILD "${ctk_build_dir}")
       ctest_submit(PARTS Coverage)
     endif ()

     # Global dynamic analysis ...
     if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
+        message("Global memcheck")
         ctest_memcheck(BUILD "${ctk_build_dir}")
         ctest_submit(PARTS MemCheck)
       endif ()


 SET CTEST_NIGHTLY_START_TIME to 19:00:00 CEST
So we need to program Nightly test just before this time
see : http://www.cmake.org/Wiki/CTest:Nightly,_Experimental,_Continuous

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

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -109,7 +109,8 @@
 ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")

 SET(CTEST_PROJECT_NAME "OpenViBe")
-#SET(CTEST_NIGHTLY_START_TIME "20:00:00 EST")
+# set time for update
+SET(CTEST_NIGHTLY_START_TIME "19:00:00 CEST")
 SET(CTEST_DROP_METHOD "http")
 SET(CTEST_DROP_SITE "cdash.inria.fr")
 SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenViBe")


rapidxml use script: INTERFACE, xpro::rapidxml TARGET

issue https://github.com/smanders/externpro/issues/244

--- projects/use/usexp-rapidxml-config.cmake
+++ projects/use/usexp-rapidxml-config.cmake
@@ -10,6 +10,14 @@
 set(verDir /${prj}_@VER@)
 unset(${PRJ}_INCLUDE_DIR CACHE)
 find_path(${PRJ}_INCLUDE_DIR rapidxml/rapidxml.hpp PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
+if(NOT TARGET xpro::rapidxml)
+  add_library(xpro::rapidxml INTERFACE IMPORTED)
+  if(${PRJ}_INCLUDE_DIR)
+    set_target_properties(xpro::rapidxml PROPERTIES
+      INTERFACE_INCLUDE_DIRECTORIES "${${PRJ}_INCLUDE_DIR}"
+      )
+  endif()
+endif()
 set(reqVars ${PRJ}_VER ${PRJ}_INCLUDE_DIR)
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


Fix install of dependencies (including Boost) into sdk area on OS X

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -10,20 +10,9 @@
 #####################################################
 # Install dependencies
 #####################################################
-
-if (UNIX)
+if ((NOT APPLE) AND (NOT WIN32))
   return()
 endif()
-
-# determine if we have a common dependencies folder to install from.
-# this is not a fool-proof test, but it should be good enough.
-get_filename_component(OGRE_DEP1_DIR ${FREETYPE_INCLUDE_DIR}/../ ABSOLUTE)
-get_filename_component(OGRE_DEP2_DIR ${ZLIB_INCLUDE_DIR}/../ ABSOLUTE)
-if (OGRE_DEP1_DIR STREQUAL OGRE_DEP2_DIR)
-  set(OGRE_DEP_DIR ${OGRE_DEP1_DIR})
-else ()
-  return()
-endif ()

 option(OGRE_INSTALL_DEPENDENCIES "Install dependency libs needed for samples" TRUE)
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)


renamed variable to fulfill the naming convention

--- Modules/OpenCVVideoSupport/files.cmake
+++ Modules/OpenCVVideoSupport/files.cmake
@@ -7,8 +7,8 @@
     mitkImageToOpenCVImageFilter.cpp
 )

-IF(MITK_USE_VIDEOINPUT_LIB)
+IF(MITK_USE_videoInput)
   SET(CPP_FILES ${CPP_FILES}
     mitkVideoInputSource.cpp
   )
-ENDIF(MITK_USE_VIDEOINPUT_LIB)+ENDIF(MITK_USE_videoInput)


Add choice of python versions

Add choice of python versions

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -1,21 +1,21 @@
 #  For more information, please see: http://software.sci.utah.edu
-#
+#
 #  The MIT License
-#
+#
 #  Copyright (c) 2015 Scientific Computing and Imaging Institute,
 #  University of Utah.
-#
-#
+#
+#
 #  Permission is hereby granted, free of charge, to any person obtaining a
 #  copy of this software and associated documentation files (the "Software"),
 #  to deal in the Software without restriction, including without limitation
 #  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 #  and/or sell copies of the Software, and to permit persons to whom the
 #  Software is furnished to do so, subject to the following conditions:
-#
+#
 #  The above copyright notice and this permission notice shall be included
-#  in all copies or substantial portions of the Software.
-#
+#  in all copies or substantial portions of the Software.
+#
 #  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 #  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 #  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -28,10 +28,17 @@

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})

-# TODO: update when upgrading
-SET(PY_MAJOR 3)
-SET(PY_MINOR 4)
-SET(PY_PATCH 3)
+set(USER_PYTHON_VERSION "3.4.3" CACHE STRING "Branch name corresponding to Python version number")
+set_property(CACHE USER_PYTHON_VERSION PROPERTY STRINGS 3.4.3 3.6.3 3.7.1)
+
+string(REPLACE "." ";" USER_PYTHON_VERSION_LIST ${USER_PYTHON_VERSION})
+list(GET USER_PYTHON_VERSION_LIST 0 USER_PYTHON_VERSION_MAJOR)
+list(GET USER_PYTHON_VERSION_LIST 1 USER_PYTHON_VERSION_MINOR)
+list(GET USER_PYTHON_VERSION_LIST 2 USER_PYTHON_VERSION_PATCH)
+
+SET(PY_MAJOR USER_PYTHON_VERSION_MAJOR)
+SET(PY_MINOR USER_PYTHON_VERSION_MINOR)
+SET(PY_PATCH USER_PYTHON_VERSION_PATCH)
 SET(SCI_PYTHON_VERSION "${PY_MAJOR}.${PY_MINOR}.${PY_PATCH}")
 SET(SCI_PYTHON_VERSION_SHORT "${PY_MAJOR}.${PY_MINOR}")
 SET(SCI_PYTHON_VERSION_SHORT_WIN32 "${PY_MAJOR}${PY_MINOR}")
@@ -46,7 +53,7 @@
 SET(python_ABIFLAG_PYMALLOC "m")
 SET(ABIFLAGS "${python_ABIFLAG_PYMALLOC}${python_ABIFLAG_PYDEBUG}")

-SET(python_GIT_TAG "origin/master")
+SET(python_GIT_TAG "origin/${USER_PYTHON_VERSION}")
 SET(python_GIT_URL "https://github.com/CIBC-Internal/python.git")

 SET(python_WIN32_ARCH)


rearranged libraries according to dependency

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -48,21 +48,22 @@

 # Find all libraries, store debug and release separately
 foreach(lib
-    dcmdata
+    dcmpstat
+    dcmsr
+    dcmsign
+    dcmtls
+    dcmqrdb
+    dcmnet
+    dcmjpeg
     dcmimage
     dcmimgle
-    dcmjpeg
-    dcmnet
-    dcmpstat
-    dcmqrdb
-    dcmsign
-    dcmsr
-    dcmtls
+    dcmdata
+    oflog
+    ofstd
     ijg12
     ijg16
     ijg8
-    oflog
-    ofstd)
+    )

   # Find Release libraries
   find_library(DCMTK_${lib}_LIBRARY_RELEASE


ManageFile: Fix absolute file handling

ManageFile: Fix absolute file handling

--- Modules/ManageFile.cmake
+++ Modules/ManageFile.cmake
@@ -44,7 +44,7 @@
 #
 # Defines following macros:
 #   MANAGE_FILE_INSTALL(fileType
-#     [files | FILES files] [DEST_SUBDIR subDir] [ARGS args]
+#     [files | FILES files] [DEST_SUBDIR subDir] [RENAME newName] [ARGS args]
 #   )
 #     - Manage file installation.
 #       * Parameter:
@@ -54,6 +54,7 @@
 #           LIB, LIBEXEC, TARGETS
 #         + DEST_SUBDIR subDir: Subdir of Destination dir
 #         + files: Files to be installed.
+#         + RENAME newName: Destination filename.
 #         + args: Arguments for INSTALL.
 #
 #   GIT_GLOB_TO_CMAKE_REGEX(var glob)
@@ -83,29 +84,41 @@
 	_MANAGE_FILE_SET_FILE_INSTALL_LIST(${_fLT})
     ENDFOREACH(_fLT ${FILE_INSTALL_LIST_TYPES})

-
     MACRO(_MANAGE_FILE_INSTALL_FILE_OR_DIR fileType)
+	IF(_opt_RENAME)
+	    SET(_install_options "RENAME" "${_opt_RENAME}")
+	ELSE(_opt_RENAME)
+	    SET(_install_options "")
+	ENDIF (_opt_RENAME)
 	FOREACH(_f ${_fileList})
 	    GET_FILENAME_COMPONENT(_a "${_f}" ABSOLUTE)
 	    SET(_absolute "")
 	    STRING(REGEX MATCH "^/" _absolute "${_f}")
 	    IF(IS_DIRECTORY "${_a}")
-		INSTALL(DIRECTORY ${_f} DESTINATION "${_destDir}" ${ARGN})
-		IF(_absolute)
-		    GET_FILENAME_COMPONENT(_f "${_f}" NAME)
-		ENDIF(_absolute)
-	    ELSE(IS_DIRECTORY "${_a}")
-		INSTALL(FILES ${_f} DESTINATION "${_destDir}" ${ARGN})
-		IF(_absolute)
-		    GET_FILENAME_COMPONENT(_f "${_f}" NAME)
-		ENDIF(_absolute)
-	    ENDIF(IS_DIRECTORY "${_a}")
+		SET(_install_type "DIRECTORY")
+	    ELSE(IS_DIRECTORY "${_a}")
+		IF("${fileType}" STREQUAL "BIN")
+		    SET(_install_type "PROGRAMS")
+		ELSE("${fileType}" STREQUAL "BIN")
+		    SET(_install_type "FILES")
+		ENDIF("${fileType}" STREQUAL "BIN")
+	    ENDIF(IS_DIRECTORY "${_a}")
+	    INSTALL(${_install_type} ${_f} DESTINATION "${_destDir}"
+		${_install_options} ${ARGN})
+	    IF(_opt_RENAME)
+		SET(_n "${_opt_RENAME}")
+	    ELSEIF(_absolute)
+		GET_FILENAME_COMPONENT(_n "${_f}" NAME)
+	    ELSE(_opt_RENAME)
+		SET(_n "${_f}")
+	    ENDIF(_opt_RENAME)
+
 	    IF(_opt_DEST_SUBDIR)
 		LIST(APPEND FILE_INSTALL_${fileType}_LIST
-		    "${_opt_DEST_SUBDIR}/${_f}")
+		    "${_opt_DEST_SUBDIR}/${_n}")
 	    ELSE(_opt_DEST_SUBDIR)
 		LIST(APPEND FILE_INSTALL_${fileType}_LIST
-		    "${_f}")
+		    "${_n}")
 	    ENDIF(_opt_DEST_SUBDIR)
 	ENDFOREACH(_f ${_fileList})
 	_MANAGE_FILE_SET_FILE_INSTALL_LIST("${fileType}")
@@ -149,7 +162,7 @@
     ENDMACRO(_MANAGE_FILE_INSTALL_TARGET)

     MACRO(MANAGE_FILE_INSTALL fileType)
-	SET(_validOptions "DEST_SUBDIR" "FILES" "ARGS")
+	SET(_validOptions "DEST_SUBDIR" "FILES" "ARGS" "RENAME")
 	VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN})
 	SET(_fileList "")
 	LIST(APPEND _fileList ${_opt} ${_opt_FILES})
@@ -157,12 +170,6 @@
 	IF("${fileType}" STREQUAL "SYSCONF_NO_REPLACE")
 	    SET(_destDir "${SYSCONF_DIR}/${_opt_DEST_SUBDIR}")
 	    _MANAGE_FILE_INSTALL_FILE_OR_DIR("${fileType}")
-	ELSEIF("${fileType}" STREQUAL "BIN")
-	    SET(_destDir "${${fileType}_DIR}/${_opt_DEST_SUBDIR}")
-	    INSTALL(PROGRAMS ${_fileList} DESTINATION "${_destDir}" ${_opt_ARGS})
-	    LIST(APPEND FILE_INSTALL_${fileType}_LIST
-		"${_fileList}")
-	    _MANAGE_FILE_SET_FILE_INSTALL_LIST("${fileType}")
 	ELSEIF("${fileType}" STREQUAL "TARGETS")
 	    _MANAGE_FILE_INSTALL_TARGET(${_opt_ARGS})
 	ELSE("${fileType}" STREQUAL "SYSCONF_NO_REPLACE")


Added support for libclang 3.8

Added support for libclang 3.8

--- src/cmake/Modules/FindLibClang.cmake
+++ src/cmake/Modules/FindLibClang.cmake
@@ -14,7 +14,8 @@
 #               Known LLVM release numbers.

 # most recent versions come first
-set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.7.1
+set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.8
+  3.7.1
   3.7
   3.6.2
   3.6.1


TEST: pass --nox11 to stop spawn xterm (linux crontask)

--- Packaging/testing.cmake
+++ Packaging/testing.cmake
@@ -22,7 +22,7 @@
   #uninstall OTB
   set(uninstall_otb_CMD ${pkg_extracted_dir}/tools/uninstall_otb.bat)
 else()
-  set(install_package_ARGS "--noprogress;--target;${pkg_extracted_dir}")
+  set(install_package_ARGS "--noprogress;--nox11;--target;${pkg_extracted_dir}")
   set(install_package_CMD "${PACKAGE_OUTPUT_FILE}")
   #selftester
   set(selftester_CMD ${pkg_extracted_dir}/tools/selftester.sh)


Try build without iconv linking for mac

Try build without iconv linking for mac

Change-Id: I2f8186d770591460ba69c6e148c7c410ac376f32
Reviewed-on: https://gerrit.mozy.lab.emc.com/115549
Reviewed-by: Solon Chen <d71559596efb07a187137058471851089dd52131@dell.com>

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -125,7 +125,6 @@
 macro(add_osspecific_linking targetname)
     if (CMAKE_HOST_APPLE)
         target_link_libraries(${targetname}
-            iconv
             "-framework CoreServices"
             "-framework CoreFoundation"
             "-framework SystemConfiguration"


ENH:  Just trying a few more directories on winders.

--- CMake/FindMySQL.cmake
+++ CMake/FindMySQL.cmake
@@ -24,6 +24,7 @@
   /usr/local/include/mysql
   /usr/local/mysql/include
   "C:/Program Files/MySQL/include"
+  "C:/MySQL/include"
   DOC "Specify the directory containing mysql.h."
 )

@@ -36,6 +37,7 @@
   /usr/local/lib/mysql
   /usr/local/mysql/lib
   "C:/Program Files/MySQL/lib"
+  "C:/MySQL/lib/debug"
   DOC "Specify the mysql library here."
 )


Split off 7.8.44

Split off 7.8.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 8 )
-set ( HPCC_POINT 43 )
+set ( HPCC_POINT 45 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 6.0.0-rc2 Release Candidate 2

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

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


Nagios Monitoring 7.0.0-rc4 Release Candidate 4

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 3 )
+set ( HPCC_SEQUENCE 4 )
 ###


Make pkgconfig targets globally imported targets

Signed-off-by: Ralph Giles <65585f72bf62a11d2f4105aa30c20fe94efea46f@thaumas.net>
Signed-off-by: evpobr <5e0e5824270792833773a279da5678ebbd548119@gmail.com>

--- opusfileConfig.cmake
+++ opusfileConfig.cmake
@@ -12,6 +12,7 @@
 if(NOT TARGET Ogg::ogg)
   find_package(PkgConfig REQUIRED ${cmake_quiet_arg})
   pkg_check_modules(Ogg ${cmake_required_arg} ${cmake_quiet_arg} IMPORTED_TARGET ogg)
+  set_target_properties(PkgConfig::Ogg PROPERTIES IMPORTED_GLOBAL TRUE)
   add_library(Ogg::ogg ALIAS PkgConfig::Ogg)
 endif()

@@ -25,6 +26,7 @@
 if(NOT TARGET Opus::opus)
   find_package(PkgConfig REQUIRED ${cmake_quiet_arg})
   pkg_check_modules(Opus ${cmake_required_arg} ${cmake_quiet_arg} IMPORTED_TARGET opus)
+  set_target_properties(PkgConfig::Opus PROPERTIES IMPORTED_GLOBAL TRUE)
   add_library(Opus::opus ALIAS PkgConfig::Opus)
 endif()


Don't run "yarn clean" since it may remove needed files.

This isn't quite the same as "npm prune" that we were replacing. "clean"
will remove files from inside the npm directories that it thinks are
inessential. But this doesn't always work.

--- build/cmake/core-admin-ui.cmake
+++ build/cmake/core-admin-ui.cmake
@@ -28,7 +28,7 @@
   DEPENDS
     yarn
     ${STAMP_DIR}/core-admin-ui-build-dir
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn install && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn clean
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn install
   COMMAND touch ${STAMP_DIR}/core-admin-ui-yarn-install
 )


Converted create_library macro into shared create_target macro used by separate create_library and create_executable macros.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -7,7 +7,7 @@
   set(BUILD_SHARED_LIBS true)
 endif ()

-macro(create_library target)
+macro(create_target target is_executable)
   set(CMAKE_OSX_ARCHITECTURES "armv7 arm64")

   # Optimize debug build to help diagnose release build crashes.
@@ -20,9 +20,7 @@
   endif ()

   set(CURRENT_TARGET ${target})
-  #message(WARNING "*${PROJECT_NAME} STREQUAL ${target}*")
   if (NOT "${PROJECT_NAME}" STREQUAL ${target})
-    #    message(WARNING "No project for ${target}")
     add_project(${target})
   endif ()

@@ -36,16 +34,17 @@

     file(GLOB_RECURSE HEADERS source/*.h)
     set(CURRENT_SOURCES ${CURRENT_SOURCES} PARENT_SCOPE)
-    add_library(${target} ${CURRENT_SOURCES} ${HEADERS})
-  else ()
-    add_library(${target} ${ARGN})
-  endif ()
-
-  #  if (NOT ANDROID)
-  #    set("TARGET_FILE_DIR_${target}" $<TARGET_FILE_DIR:${target}>)
-  ##    set("TARGET_LINKER_FILE_${target}" $<TARGET_LINKER_FILE:${target}>)
-  #    set("TARGET_FILE_${target}" $<TARGET_FILE:${target}>)
-  #  endif ()
+    #    add_library(${target} ${CURRENT_SOURCES} ${HEADERS})
+    set(SOURCES ${CURRENT_SOURCES} ${HEADERS})
+  else ()
+    set(SOURCES ${ARGN})
+  endif ()
+
+  if (${is_executable})
+    add_executable(${target} ${SOURCES})
+  else ()
+    add_library(${target} ${SOURCES})
+  endif ()

   if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
     string(LENGTH "${CMAKE_SOURCE_DIR}" string_length)
@@ -55,14 +54,12 @@
     if (NOT ANDROID)
       set_target_properties(${target} PROPERTIES FOLDER ${current_path})
     endif ()
-    #      message( "${current_path} ${temp}")
   endif ()

   include_directories(${CMAKE_TOOLS}/include) # for dllexport

   if (IOS)
     set_xcode_property(${target} IPHONEOS_DEPLOYMENT_TARGET "8.4")
-    #set_xcode_property(${target} ARCHS "armv7 arm64")
     set_xcode_property(${target} VALID_ARCHS "armv7 armv7s arm64")
     set_xcode_property(${target} SUPPORTED_PLATFORMS "iphonesimulator iphoneos")
     set_xcode_property(${target} ONLY_ACTIVE_ARCH "NO")
@@ -71,7 +68,15 @@
     set_target_properties(${target} PROPERTIES DEFINE_SYMBOL "EXPORTING_DLL")
   endif (IOS)

+endmacro(create_target)
+
+macro(create_library target)
+  create_target(${target} FALSE)
 endmacro(create_library)
+
+macro(create_executable target)
+  create_target(${target} TRUE)
+endmacro(create_executable)

 macro(get_relative_path result root_path path)
   string(LENGTH "${root_path}" string_length)


Squashed '3rdparty/github/cmake-utils/' changes from ee0bf6cc..f20c24c8

f20c24c8 Fix -D${packageDepend}_static to -D${packageDepend}_STATIC

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: f20c24c8bfbeded84c27033f4155408fbaa5806b

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -160,9 +160,9 @@
       #
       IF (_STATIC)
         IF (MYPACKAGE_DEBUG)
-          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding -D${packageDepend}_static compile definition to target ${_target}")
-        ENDIF ()
-        TARGET_COMPILE_DEFINITIONS(${_target} PUBLIC -D${packageDepend}_static)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding -D${packageDepend}_STATIC compile definition to target ${_target}")
+        ENDIF ()
+        TARGET_COMPILE_DEFINITIONS(${_target} PUBLIC -D${packageDepend}_STATIC)
         IF (MYPACKAGE_DEBUG)
           MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} dependency becomes ${packageDepend}_static for target ${_target}")
         ENDIF ()


no, let's do things another way. not needed.

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

--- cmake/modules/FindRedland.cmake
+++ cmake/modules/FindRedland.cmake
@@ -1,233 +0,0 @@
-# - Try to find Redland
-# Once done this will define
-#
-#  REDLAND_FOUND       - system has Redland
-#  REDLAND_LIBRARIES   - Link these to use REDLAND
-#  REDLAND_DEFINITIONS - Compiler switches required for using REDLAND
-#  REDLAND_VERSION     - The redland version string
-
-# (c) 2007 Sebastian Trueg <trueg@kde.org>
-#
-# Based on FindFontconfig Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-INCLUDE(MacroEnsureVersion)
-
-
-#if (REDLAND_LIBRARIES AND REDLAND_INCLUDE_DIR AND RASQAL_INCLUDE_DIR AND RASQAL_LIBRARIES AND RAPTOR_LIBRARIES)
-
-  # in cache already
-#  set(REDLAND_FOUND TRUE)
-
-#else (REDLAND_LIBRARIES AND REDLAND_INCLUDE_DIR and RASQUAL_INCLUDE_DIR AND RASQAL_LIBRARIES AND RAPTOR_LIBRARIES)
-
-  FIND_PROGRAM(
-    REDLAND_CONFIG
-    NAMES redland-config
-    )
-
-  if(REDLAND_CONFIG)
-    EXECUTE_PROCESS(
-      COMMAND ${REDLAND_CONFIG} --version
-      OUTPUT_VARIABLE REDLAND_VERSION
-      )
-    if(REDLAND_VERSION)
-      STRING(REPLACE "\n" "" REDLAND_VERSION ${REDLAND_VERSION})
-
-      # extract include paths from redland-config
-      EXECUTE_PROCESS(
-        COMMAND ${REDLAND_CONFIG} --cflags
-        OUTPUT_VARIABLE redland_LIBS_ARGS)
-      STRING( REPLACE " " ";" redland_LIBS_ARGS ${redland_LIBS_ARGS} )
-      FOREACH( _ARG ${redland_LIBS_ARGS} )
-        IF(${_ARG} MATCHES "^-I")
-          STRING(REGEX REPLACE "^-I" "" _ARG ${_ARG})
-          STRING( REPLACE "\n" "" _ARG ${_ARG} )
-          LIST(APPEND redland_INCLUDE_DIRS ${_ARG})
-        ENDIF(${_ARG} MATCHES "^-I")
-      ENDFOREACH(_ARG)
-
-      # extract lib paths from redland-config
-      EXECUTE_PROCESS(
-        COMMAND ${REDLAND_CONFIG} --libs
-        OUTPUT_VARIABLE redland_CFLAGS_ARGS)
-      STRING( REPLACE " " ";" redland_CFLAGS_ARGS ${redland_CFLAGS_ARGS} )
-      FOREACH( _ARG ${redland_CFLAGS_ARGS} )
-        IF(${_ARG} MATCHES "^-L")
-          STRING(REGEX REPLACE "^-L" "" _ARG ${_ARG})
-          LIST(APPEND redland_LIBRARY_DIRS ${_ARG})
-        ENDIF(${_ARG} MATCHES "^-L")
-      ENDFOREACH(_ARG)
-    endif(REDLAND_VERSION)
-  endif(REDLAND_CONFIG)
-
-  # raptor is not redland, look for it separately
-  FIND_PROGRAM(
-    RAPTOR_CONFIG
-    NAMES raptor-config
-    )
-  if(RAPTOR_CONFIG)
-    EXECUTE_PROCESS(
-      COMMAND ${RAPTOR_CONFIG} --version
-      OUTPUT_VARIABLE RAPTOR_VERSION
-      )
-    if(RAPTOR_VERSION)
-      STRING(REPLACE "\n" "" RAPTOR_VERSION ${RAPTOR_VERSION})
-
-      MACRO_ENSURE_VERSION("1.4.16" ${RAPTOR_VERSION} RAPTOR_HAVE_TRIG)
-
-      # extract include paths from raptor-config
-      EXECUTE_PROCESS(
-        COMMAND ${RAPTOR_CONFIG} --cflags
-        OUTPUT_VARIABLE raptor_CFLAGS_ARGS)
-      STRING( REPLACE " " ";" raptor_CFLAGS_ARGS ${raptor_CFLAGS_ARGS} )
-      FOREACH( _ARG ${raptor_CFLAGS_ARGS} )
-        IF(${_ARG} MATCHES "^-I")
-          STRING(REGEX REPLACE "^-I" "" _ARG ${_ARG})
-          STRING( REPLACE "\n" "" _ARG ${_ARG} )
-          LIST(APPEND raptor_INCLUDE_DIRS ${_ARG})
-        ENDIF(${_ARG} MATCHES "^-I")
-      ENDFOREACH(_ARG)
-
-      # extract lib paths from raptor-config
-      EXECUTE_PROCESS(
-        COMMAND ${RAPTOR_CONFIG} --libs
-        OUTPUT_VARIABLE raptor_CFLAGS_ARGS)
-      STRING( REPLACE " " ";" raptor_CFLAGS_ARGS ${raptor_CFLAGS_ARGS} )
-      FOREACH( _ARG ${raptor_CFLAGS_ARGS} )
-        IF(${_ARG} MATCHES "^-L")
-          STRING(REGEX REPLACE "^-L" "" _ARG ${_ARG})
-          LIST(APPEND raptor_LIBRARY_DIRS ${_ARG})
-        ENDIF(${_ARG} MATCHES "^-L")
-      ENDFOREACH(_ARG)
-    endif(RAPTOR_VERSION)
-  else(RAPTOR_CONFIG)
-    SET(RAPTOR_VERSION "1.0.0")
-  endif(RAPTOR_CONFIG)
-
-
-  # rasqal is not redland, look for it separately
-  FIND_PROGRAM(
-    RASQAL_CONFIG
-    NAMES rasqal-config
-    )
-
-  if(RASQAL_CONFIG)
-    EXECUTE_PROCESS(
-      COMMAND ${RASQAL_CONFIG} --version
-      OUTPUT_VARIABLE RASQAL_VERSION
-      )
-    if(RASQAL_VERSION)
-      STRING(REPLACE "\n" "" RASQAL_VERSION ${RASQAL_VERSION})
-
-      # extract include paths from rasqal-config
-      EXECUTE_PROCESS(
-        COMMAND ${RASQAL_CONFIG} --cflags
-        OUTPUT_VARIABLE rasqal_CFLAGS_ARGS)
-      STRING( REPLACE " " ";" rasqal_CFLAGS_ARGS ${rasqal_CFLAGS_ARGS} )
-      FOREACH( _ARG ${rasqal_CFLAGS_ARGS} )
-        IF(${_ARG} MATCHES "^-I")
-          STRING(REGEX REPLACE "^-I" "" _ARG ${_ARG})
-          STRING( REPLACE "\n" "" _ARG ${_ARG} )
-          LIST(APPEND rasqal_INCLUDE_DIRS ${_ARG})
-        ENDIF(${_ARG} MATCHES "^-I")
-      ENDFOREACH(_ARG)
-
-      # extract lib paths from rasqal-config
-      EXECUTE_PROCESS(
-        COMMAND ${RASQAL_CONFIG} --libs
-        OUTPUT_VARIABLE rasqal_CFLAGS_ARGS)
-      STRING( REPLACE " " ";" rasqal_CFLAGS_ARGS ${rasqal_CFLAGS_ARGS} )
-      FOREACH( _ARG ${rasqal_CFLAGS_ARGS} )
-        IF(${_ARG} MATCHES "^-L")
-          STRING(REGEX REPLACE "^-L" "" _ARG ${_ARG})
-          LIST(APPEND rasqal_LIBRARY_DIRS ${_ARG})
-        ENDIF(${_ARG} MATCHES "^-L")
-      ENDFOREACH(_ARG)
-    endif(RASQAL_VERSION)
-  endif(RASQAL_CONFIG)
-
-  # now a hack for win32 (only?)
-  # soprano only includes <redland.h> instead <redland/redland.h>
-  if(WIN32)
-    find_path(REDLAND_INCLUDE_DIR_TMP redland/redland.h
-      PATHS
-      ${_REDLANDIncDir}
-    )
-    if(REDLAND_INCLUDE_DIR_TMP)
-      set(REDLAND_INCLUDE_DIR ${REDLAND_INCLUDE_DIR_TMP}/redland CACHE PATH "Path to a file.")
-    endif(REDLAND_INCLUDE_DIR_TMP)
-
-    find_path(RASQAL_INCLUDE_DIR_TMP redland/rasqal.h
-      PATHS
-      ${redland_INCLUDE_DIRS}
-    )
-    if(RASQAL_INCLUDE_DIR_TMP)
-      set(RASQAL_INCLUDE_DIR ${RASQAL_INCLUDE_DIR_TMP}/redland CACHE PATH "Path to a file.")
-    endif(RASQAL_INCLUDE_DIR_TMP)
-
-    find_path(RAPTOR_INCLUDE_DIR_TMP redland/raptor.h
-      PATHS
-      ${redland_INCLUDE_DIRS}
-    )
-    if(RAPTOR_INCLUDE_DIR_TMP)
-      set(RAPTOR_INCLUDE_DIR ${RAPTOR_INCLUDE_DIR_TMP}/redland CACHE PATH "Path to a file.")
-    endif(RAPTOR_INCLUDE_DIR_TMP)
-  else(WIN32)
-    find_path(REDLAND_INCLUDE_DIR redland.h
-      PATHS
-      ${redland_INCLUDE_DIRS}
-      /usr/X11/include
-    )
-    find_path(RASQAL_INCLUDE_DIR rasqal.h
-      PATHS
-      ${redland_INCLUDE_DIRS}
-      ${rasqal_INCLUDE_DIRS}
-      /usr/X11/include
-    )
-    find_path(RAPTOR_INCLUDE_DIR raptor.h
-      PATHS
-      ${redland_INCLUDE_DIRS}
-      ${raptor_INCLUDE_DIRS}
-      /usr/X11/include
-    )
-  endif(WIN32)
-
-  find_library(REDLAND_LIBRARIES NAMES rdf librdf
-    PATHS
-    ${redland_LIBRARY_DIRS}
-  )
-
-  find_library(RASQAL_LIBRARIES NAMES rasqal librasqal
-    PATHS
-    ${rasqal_LIBRARY_DIRS}
-  )
-
-  find_library(RAPTOR_LIBRARIES NAMES raptor libraptor
-    PATHS
-    ${raptor_LIBRARY_DIRS}
-  )
-
-  if (REDLAND_LIBRARIES AND REDLAND_INCLUDE_DIR AND RASQAL_INCLUDE_DIR AND RASQAL_LIBRARIES AND RAPTOR_LIBRARIES)
-    set(REDLAND_FOUND TRUE)
-  endif (REDLAND_LIBRARIES AND REDLAND_INCLUDE_DIR AND RASQAL_INCLUDE_DIR AND RASQAL_LIBRARIES AND RAPTOR_LIBRARIES)
-
-  if (REDLAND_FOUND)
-    set(REDLAND_DEFINITIONS ${redland_CFLAGS})
-    if (NOT Redland_FIND_QUIETLY)
-      message(STATUS "Found Redland ${REDLAND_VERSION}: libs - ${REDLAND_LIBRARIES}; includes - ${REDLAND_INCLUDE_DIR}")
-      message(STATUS "Found Raptor ${RAPTOR_VERSION}: libs - ${RAPTOR_LIBRARIES}; includes - ${RAPTOR_INCLUDE_DIR}")
-      message(STATUS "Found Rasqal ${RASQAL_VERSION}: libs - ${RASQAL_LIBRARIES}; includes - ${RASQAL_INCLUDE_DIR}")
-    endif (NOT Redland_FIND_QUIETLY)
-  else (REDLAND_FOUND)
-    if (Redland_FIND_REQUIRED)
-      message(FATAL_ERROR "Could NOT find Redland")
-    endif (Redland_FIND_REQUIRED)
-  endif (REDLAND_FOUND)
-
-#  mark_as_advanced(REDLAND_LIBRARIES)
-
-#endif (REDLAND_LIBRARIES AND REDLAND_INCLUDE_DIR AND RASQAL_INCLUDE_DIR AND RASQAL_LIBRARIES AND RAPTOR_LIBRARIES)


added cmake support for static schism libraries on unix

--- cmake/modules/find_schism.cmake
+++ cmake/modules/find_schism.cmake
@@ -85,7 +85,7 @@

 		    IF (UNIX)
 			    FIND_PATH(_CUR_SEARCH
-					    NAMES libscm_gl_core.so
+					    NAMES libscm_gl_core.so libscm_gl_core.a
 					    PATHS ${_SEARCH_DIR}
 					    NO_DEFAULT_PATH)
 		    ELSEIF(WIN32)
@@ -114,7 +114,7 @@

     FOREACH(_LIB_DIR ${_SCHISM_FOUND_LIB_DIR})
 		    IF (UNIX)
-			    file(GLOB _SCHISM_LIBRARIES ${_LIB_DIR}/*.so)
+          file(GLOB _SCHISM_LIBRARIES ${_LIB_DIR}/libscm*)
 		    ELSEIF(WIN32)
 			    file(GLOB _SCHISM_LIBRARY_ABSOLUTE_PATHS ${_LIB_DIR}/release/scm*.lib)
 			    FOREACH (_SCHISM_LIB_PATH ${_SCHISM_LIBRARY_ABSOLUTE_PATHS})


Fix CMake Math Expr

Fix CMake Math Expr

Workaround negative numbers for older versions of CMake when using math expr.

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -251,7 +251,11 @@
                 endif()
                 math(EXPR j ${j}+1)
             endwhile()
-            math(EXPR i ${i}+1)
+            if (i LESS 0) #CMake with some older versions (at least 3.6.0) do not support negative numbers in math expr e.g.: math(EXPR i -1+1)
+                set(i 0)
+            else()
+                math(EXPR i ${i}+1)
+            endif()
         endwhile()
     endif()


refactor: drop no longer used cmake directory

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -1,193 +0,0 @@
-# Copyright (c) 2012 - 2015, Lars Bilke
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this
-#    list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors
-#    may be used to endorse or promote products derived from this software without
-#    specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-# 2012-01-31, Lars Bilke
-# - Enable Code Coverage
-#
-# 2013-09-17, Joakim Söderberg
-# - Added support for Clang.
-# - Some additional usage instructions.
-#
-# USAGE:
-
-# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here:
-#      http://stackoverflow.com/a/22404544/80480
-#
-# 1. Copy this file into your cmake modules path.
-#
-# 2. Add the following line to your CMakeLists.txt:
-#      INCLUDE(CodeCoverage)
-#
-# 3. Set compiler flags to turn off optimization and enable coverage:
-#    SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#	 SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#
-# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
-#    which runs your test executable and produces a lcov code coverage report:
-#    Example:
-#	 SETUP_TARGET_FOR_COVERAGE(
-#				my_coverage_target  # Name for custom target.
-#				test_driver         # Name of the test driver executable that runs the tests.
-#									# NOTE! This should always have a ZERO as exit code
-#									# otherwise the coverage generation will not complete.
-#				coverage            # Name of output directory.
-#				)
-#
-# 4. Build a Debug build:
-#	 cmake -DCMAKE_BUILD_TYPE=Debug ..
-#	 make
-#	 make my_coverage_target
-#
-#
-
-# Check prereqs
-FIND_PROGRAM( GCOV_PATH gcov )
-FIND_PROGRAM( LCOV_PATH lcov )
-FIND_PROGRAM( GENHTML_PATH genhtml )
-FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
-
-IF(NOT GCOV_PATH)
-	MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
-ENDIF() # NOT GCOV_PATH
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
-	# Clang version 3.0.0 and greater now supports gcov as well.
-	MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
-
-	IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-		MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-	ENDIF()
-ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
-
-SET(CMAKE_CXX_FLAGS_COVERAGE
-    "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-    CACHE STRING "Flags used by the C++ compiler during coverage builds."
-    FORCE )
-SET(CMAKE_C_FLAGS_COVERAGE
-    "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-    CACHE STRING "Flags used by the C compiler during coverage builds."
-    FORCE )
-SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used for linking binaries during coverage builds."
-    FORCE )
-SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used by the shared libraries linker during coverage builds."
-    FORCE )
-MARK_AS_ADVANCED(
-    CMAKE_CXX_FLAGS_COVERAGE
-    CMAKE_C_FLAGS_COVERAGE
-    CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
-
-IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
-  MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
-ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
-
-
-# Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests.
-#						MUST return ZERO always, even on errors.
-#						If not, no coverage report will be created!
-# Param _outputname     lcov output is generated as _outputname.info
-#                       HTML report is generated in _outputname/index.html
-# Optional fourth parameter is passed as arguments to _testrunner
-#   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
-
-	IF(NOT LCOV_PATH)
-		MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
-	ENDIF() # NOT LCOV_PATH
-
-	IF(NOT GENHTML_PATH)
-		MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
-	ENDIF() # NOT GENHTML_PATH
-
-	# Setup target
-	ADD_CUSTOM_TARGET(${_targetname}
-
-		# Cleanup lcov
-		${LCOV_PATH} --directory . --zerocounters
-
-		# Run tests
-		COMMAND ${_testrunner} ${ARGV3}
-
-		# Capturing lcov counters and generating report
-		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
-		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
-		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
-
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
-	)
-
-	# Show info where to find the report
-	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-		COMMAND ;
-		COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
-	)
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
-
-# Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests
-# Param _outputname     cobertura output is generated as _outputname.xml
-# Optional fourth parameter is passed as arguments to _testrunner
-#   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
-
-	IF(NOT PYTHON_EXECUTABLE)
-		MESSAGE(FATAL_ERROR "Python not found! Aborting...")
-	ENDIF() # NOT PYTHON_EXECUTABLE
-
-	IF(NOT GCOVR_PATH)
-		MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
-	ENDIF() # NOT GCOVR_PATH
-
-	ADD_CUSTOM_TARGET(${_targetname}
-
-		# Run tests
-		${_testrunner} ${ARGV3}
-
-		# Running gcovr
-		COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/'  -o ${_outputname}.xml
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Running gcovr to produce Cobertura code coverage report."
-	)
-
-	# Show info where to find the report
-	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-		COMMAND ;
-		COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
-	)
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA


Support openCV 2

Support openCV 2

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -47,10 +47,6 @@
   find_package(LMDB REQUIRED)
   include_directories(SYSTEM ${LMDB_INCLUDE_DIR})
   list(APPEND Caffe2_LINKER_LIBS ${LMDB_LIBRARIES})
-  add_definitions(-DUSE_LMDB)
-  if(ALLOW_LMDB_NOLOCK)
-    add_definitions(-DALLOW_LMDB_NOLOCK)
-  endif()
 endif()

 # ---[ LevelDB
@@ -58,7 +54,6 @@
   find_package(LevelDB REQUIRED)
   include_directories(SYSTEM ${LevelDB_INCLUDE})
   list(APPEND Caffe2_LINKER_LIBS ${LevelDB_LIBRARIES})
-  add_definitions(-DUSE_LEVELDB)
 endif()

 # ---[ Snappy
@@ -70,11 +65,15 @@

 # ---[ OpenCV
 if(USE_OPENCV)
+  # OpenCV 3
   find_package(OpenCV QUIET COMPONENTS core highgui imgproc imgcodecs)
+  if(NOT OpenCV_FOUND)
+    # OpenCV 2
+    find_package(OpenCV QUIET COMPONENTS core highgui imgproc)
+  endif()
   include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})
   list(APPEND Caffe2_LINKER_LIBS ${OpenCV_LIBS})
   message(STATUS "OpenCV found (${OpenCV_CONFIG_PATH})")
-  add_definitions(-DUSE_OPENCV)
 endif()

 # ---[ EIGEN


remove debug message

remove debug message

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -6,8 +6,9 @@
 # ----------------------------------------------------------------------------
 set(OpenCV_REQUIRED_MODULES core highgui imgproc ml)
 if(DEFINED OpenCV_DIR)
+
     get_filename_component(OpenCV_DIR_EXT ${OpenCV_DIR} EXT)
-    message(STATUS "OpenCV_DIR_EXT${OpenCV_DIR_EXT}...")
+
     if(OpenCV_DIR_EXT STREQUAL ".pc")

         if(NOT EXISTS ${OpenCV_DIR})


Fix build with >=freetype-2.5.1 wrt #1007

--HG--
branch : v0-8

--- cmake/FindFreetype.cmake
+++ cmake/FindFreetype.cmake
@@ -3,8 +3,12 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h)
+find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES include/freetype2 include)
 find_path(FREETYPE_H_PATH_ftconfig NAMES freetype/config/ftconfig.h PATH_SUFFIXES freetype2)
+if (NOT FREETYPE_H_PATH_ftconfig)
+    find_path(FREETYPE_H_PATH_ftconfig NAMES config/ftconfig.h PATH_SUFFIXES include/freetype2 include)
+endif()
+
 find_library(FREETYPE_LIB NAMES freetype2 freetype libfreetype PATH_SUFFIXES dynamic)
 find_library(FREETYPE_LIB_DBG NAMES freetype_d libfreetype_d PATH_SUFFIXES dynamic)
 mark_as_advanced(FREETYPE_H_PATH_ft2build FREETYPE_H_PATH_ftconfig FREETYPE_LIB FREETYPE_LIB_DBG)


cmake: gh-747, post-merge fixes (a bit shorter) status output)

--- cmake/FindReadline.cmake
+++ cmake/FindReadline.cmake
@@ -29,12 +29,12 @@
   SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
   SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY})
   IF (EXISTS ${READLINE_INCLUDE_DIR}/readline/rlconf.h)
-    MESSAGE(STATUS "Found GNU readline")
     set(HAVE_GNU_READLINE 1)
+    set(libname "GNU readline")
   ELSE()
-    MESSAGE(STATUS "Found readline")
+    set(libname "readline")
   ENDIF ()
-  MESSAGE(STATUS "readline library: ${READLINE_READLINE_LIBRARY}, include dir ${READLINE_INCLUDE_DIR}")
+  MESSAGE(STATUS "Found ${libname}: ${READLINE_READLINE_LIBRARY}, include dir ${READLINE_INCLUDE_DIR}")
   IF (TERMCAP_FOUND)
     SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY})
   ENDIF (TERMCAP_FOUND)


add PKG_CONFIG_PATH

add PKG_CONFIG_PATH

--- cmake/InstallFolly.cmake
+++ cmake/InstallFolly.cmake
@@ -2,7 +2,7 @@
     DOWNLOAD_NAME       folly-${FOLLY_VERSION}.tar.gz
     URL                 https://github.com/facebook/folly/archive/v${FOLLY_VERSION}.tar.gz
     URL_MD5             ${FOLLY_URL_MD5}
-    CONFIGURE_COMMAND   cd <SOURCE_DIR>/folly && autoreconf -vi && CXXFLAGS=-I<INSTALL_DIR>/include LDFLAGS=-L<INSTALL_DIR>/lib <SOURCE_DIR>/folly/configure --prefix=<INSTALL_DIR> ${WITH_OPENSSL} --with-boost=${BOOST_ROOT}
+    CONFIGURE_COMMAND   cd <SOURCE_DIR>/folly && autoreconf -vi && CXXFLAGS=-I<INSTALL_DIR>/include LDFLAGS=-L<INSTALL_DIR>/lib/pkgconfig PKG_CONFIG_PATH=<INSTALL_DIR>/lib <SOURCE_DIR>/folly/configure --prefix=<INSTALL_DIR> ${WITH_OPENSSL} --with-boost=${BOOST_ROOT}
     BUILD_COMMAND       cd <SOURCE_DIR>/folly && make
     INSTALL_COMMAND     cd <SOURCE_DIR>/folly && make install
 )


remove wrong settings

remove wrong settings

--- cmake/InstallFolly.cmake
+++ cmake/InstallFolly.cmake
@@ -15,8 +15,8 @@
                             LIBRARY_PATH=<INSTALL_DIR>/lib
                             LDFLAGS=-L<INSTALL_DIR>/lib
                             PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig
-                            CFLAGS=-I<INSTALL_DIR>/include -stdlib=libc++
-                            CXXFLAGS=-I<INSTALL_DIR>/include -stdlib=libc++
+                            CFLAGS=-I<INSTALL_DIR>/include
+                            CXXFLAGS=-I<INSTALL_DIR>/include
                             LIBS=${CMAKE_THREAD_LIBS_INIT}
                             OPENSSL_CFLAGS=-I${OPENSSL_INCLUDE_DIR}
                             OPENSSL_LIBS=-L${OPENSSL_LIBRARY_DIR}


Fix MinGW detection on x86

Fix MinGW detection on x86

Make detection of x64 using the gcc's target triplet identical
to the one used in cmake/OpenCVDetectCXXCompiler.cmake.
Otherwise, MinGW-w64 setups will always be treated as x64 since
they contain "w64" as vendor key.

--- cmake/OpenCVConfig.cmake
+++ cmake/OpenCVConfig.cmake
@@ -89,7 +89,7 @@
   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
                   OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
+  if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
     set(MINGW64 1)
     set(OpenCV_ARCH x64)
   else()


forgot to install lcmtypes jar file.

forgot to install lcmtypes jar file.

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

--- cmake/new_lcmtypes.cmake
+++ cmake/new_lcmtypes.cmake
@@ -237,6 +237,7 @@

     add_jar(${LCMTYPES_JARNAME} ${LCMTYPES_JAVA_SOURCEFILES})

+    install_jar(${LCMTYPES_JARNAME} share/java)
     pods_install_pkg_config_file(lcmtypes_${PROJECT_NAME}-java
     	CLASSPATH ${LCMTYPES_JARNAME}
     	DESCRIPTION "LCM type java bindings for ${PROJECT_NAME}"


cmake: make NaCl initialize earlier

cmake: make NaCl initialize earlier

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -79,6 +79,22 @@
 endif()

 #
+# DRIVERS / PLUGINS - support for parent cmake list specification
+#
+
+# Add extra drivers defined from command line
+set(DRIVERS ${DRIVERS} ${EXTRA_DRIVERS})
+if(DRIVERS)
+  list(REMOVE_DUPLICATES DRIVERS) # Remove duplicate drivers
+endif()
+# Add extra plugins defined from command line
+set(PLUGINS ${PLUGINS} ${EXTRA_PLUGINS})
+if(PLUGINS)
+  list(REMOVE_DUPLICATES PLUGINS) # Remove duplicate plugins
+endif()
+
+
+#
 # NACL.TXT
 #

@@ -94,20 +110,6 @@
    set(PLUGINS ${PLUGINS} nacl)
 endif()

-#
-# DRIVERS / PLUGINS - support for parent cmake list specification
-#
-
-# Add extra drivers defined from command line
-set(DRIVERS ${DRIVERS} ${EXTRA_DRIVERS})
-if(DRIVERS)
-  list(REMOVE_DUPLICATES DRIVERS) # Remove duplicate drivers
-endif()
-# Add extra plugins defined from command line
-set(PLUGINS ${PLUGINS} ${EXTRA_PLUGINS})
-if(PLUGINS)
-  list(REMOVE_DUPLICATES PLUGINS) # Remove duplicate plugins
-endif()

 # Function:
 # Add plugin / driver as library, set link options


Fix target when adding link flag to FloatScan target

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -347,7 +347,7 @@

 if(NOT (TARGET STM32::Nano::FloatScan))
     add_library(STM32::Nano::FloatScan INTERFACE IMPORTED)
-    target_link_options(STM32::Nano::FloatPrint INTERFACE
+    target_link_options(STM32::Nano::FloatScan INTERFACE
         $<$<C_COMPILER_ID:GNU>:-Wl,--undefined,_scanf_float>
     )
 endif()


don't do parallel tests for now

don't do parallel tests for now

--- cmake/travis_build.cmake
+++ cmake/travis_build.cmake
@@ -9,7 +9,7 @@
 ctest_start("Continuous")
 ctest_configure()
 ctest_build()
-ctest_test(PARALLEL_LEVEL 3 RETURN_VALUE res)
+ctest_test(PARALLEL_LEVEL 1 RETURN_VALUE res)
 ctest_coverage()
 file(REMOVE ${CTEST_BINARY_DIRECTORY}/coverage.xml)


Bump version number

Bump version number

--- version.cmake
+++ version.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2011-2014, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

-set(VPM_FRAMEWORK_VERSION 1.06.03)
+set(VPM_FRAMEWORK_VERSION 1.07.00)

 macro(vpm_set_version _name _version)
   if(VPM_VERBOSE)


Nagios Monitoring 6.0.0-rc1 Release Candidate 1 (retag)

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

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


Split off 8.6.12

Split off 8.6.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 6 )
-set ( HPCC_POINT 11 )
+set ( HPCC_POINT 13 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[axl] release 6.0.0

[axl] release 6.0.0

--- version.cmake
+++ version.cmake
@@ -9,9 +9,9 @@
 #
 #...............................................................................

-set (AXL_VERSION_MAJOR     5)
-set (AXL_VERSION_MINOR     5)
-set (AXL_VERSION_REVISION  6)
+set (AXL_VERSION_MAJOR     6)
+set (AXL_VERSION_MINOR     0)
+set (AXL_VERSION_REVISION  0)
 set (AXL_VERSION_TAG)

 set (AXL_VERSION_FILE_SUFFIX "${AXL_VERSION_MAJOR}.${AXL_VERSION_MINOR}.${AXL_VERSION_REVISION}")


Split off 8.6.8

Split off 8.6.8

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 7 )
+set ( HPCC_POINT 9 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


pkgconfig: update name and add version string

Signed-off-by: Thomas Ingleby <bb80a585db4bdbe09547a7483d1a31841fd0e0e8@intel.com>

--- src/littleb.pc.cmake
+++ src/littleb.pc.cmake
@@ -3,9 +3,9 @@
 libdir=${exec_prefix}/@LIB_INSTALL_DIR@
 includedir=${prefix}/include

-Name: mraa
+Name: littleb
 Description: Low Level Skeleton Library for Communication
-Version: @mraa_VERSION_STRING@
+Version: @littleb_VERSION_STRING@

-Libs: -L${libdir} -lmraa
+Libs: -L${libdir} -llittleb
 Cflags: -I${includedir}


Use "Subversion_SVN_EXECUTABLE" explicitly instead of "svn patch".

Even though"Subversion_SVN_EXECUTABLE" is set automatically when
configuring the build, running the "googletest" .csproj fails due to
supposedly missing svn command.

--- common/build_gtest.cmake
+++ common/build_gtest.cmake
@@ -37,7 +37,7 @@
     SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
     SVN_REVISION -r 660
     TIMEOUT 10
-    PATCH_COMMAND svn patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest"
+    PATCH_COMMAND "${Subversion_SVN_EXECUTABLE}" patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest" patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest"
     # Force separate output paths for debug and release builds to allow easy
     # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
     CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}


add ragel to dependencies

add ragel to dependencies


Follow-up to 1719a9b3d11ded4b944293a2d2fa9f88028f63c8: Only disable NEON extension for Apple ARM builds, leave it enabled for Raspberry PI.

--- deps/PNG/PNG.cmake
+++ deps/PNG/PNG.cmake
@@ -1,3 +1,9 @@
+if (APPLE)
+    # Only disable NEON extension for Apple ARM builds, leave it enabled for Raspberry PI.
+    set(_disable_neon_extension "-DPNG_ARM_NEON=off")
+else ()
+    set(_disable_neon_extension "")
+endif ()

 prusaslicer_add_cmake_project(PNG
     GIT_REPOSITORY https://github.com/glennrp/libpng.git
@@ -9,7 +15,7 @@
         -DPNG_PREFIX=prusaslicer_
         -DPNG_TESTS=OFF
         -DDISABLE_DEPENDENCY_TRACKING=OFF
-        -DPNG_ARM_NEON=off
+        ${_disable_neon_extension}
 )

 if (MSVC)


[numerics] fix borken syntax

[numerics] fix borken syntax

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -221,7 +221,7 @@
   # Oliverie
   IF(NOT DEV_MODE)
    SET(NCP_NEWTON_FBLSA-NCP_ZI1_PROPERTIES WILL_FAIL TRUE)
-   set_tests_properties(NCP_NEWTON_FBLSA-NCP_ZI1 TIMEOUT 60)
+   set_tests_properties(NCP_NEWTON_FBLSA-NCP_ZI1 PROPERTIES TIMEOUT 60)
   ENDIF(NOT DEV_MODE)

   END_TEST() # NCP


Revert "Tweak Coverage settings" in #462, exclusion of tests needed by Tide + Deflect

--- Coverage.cmake
+++ Coverage.cmake
@@ -87,8 +87,9 @@

   if(NOT TARGET ${PROJECT_NAME}-lcov-remove)
     get_property(GENERATED_FILES GLOBAL PROPERTY COMMON_GENERATED_FILES)
+    # 'tests/*' excluded otherwise unit test source file coverage is produced
     add_custom_target(${PROJECT_NAME}-lcov-remove
-      COMMAND ${LCOV} -q --remove lcov.info '*.l' 'CMake/test/*'
+      COMMAND ${LCOV} -q --remove lcov.info '*.l' 'tests/*' 'CMake/test/*'
         '*/install/*' 'moc_*' 'qrc_*' ${GENERATED_FILES} '${LCOV_EXCLUDE}'
         --output-file lcov2.info
       COMMENT "Cleaning up code coverage counters"


Updated version name.

Updated version name.

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -1,6 +1,6 @@
 # edit the following three version numbers
 SET(VERSION_MAJOR 0)
-SET(VERSION_MINOR 1)
+SET(VERSION_MINOR 2)
 SET(VERSION_RELEASE 0)

 #


cmake: fix the linker type check for --whole-archive option

Checking that the host is macOS is not sufficient here, since the
linker is still a GNU linker when cross-compiling for a chip.
Instead, use the linker_type variable introduced in the previous
commit.

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -525,17 +525,17 @@
         __component_get_target(build_component_target ${build_component})
         __component_get_property(whole_archive ${build_component_target} WHOLE_ARCHIVE)
         if(whole_archive)
-            if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
-                message(STATUS "Component ${build_component} will be linked with -Wl,-force_load")
-                target_link_libraries(${project_elf} PRIVATE
-                                       "-Wl,-force_load"
-                                       ${build_component})
-            else()
+            if(linker_type STREQUAL "GNU")
                 message(STATUS "Component ${build_component} will be linked with -Wl,--whole-archive")
                 target_link_libraries(${project_elf} PRIVATE
                                        "-Wl,--whole-archive"
                                        ${build_component}
                                        "-Wl,--no-whole-archive")
+            elseif(linker_type STREQUAL "Darwin")
+                message(STATUS "Component ${build_component} will be linked with -Wl,-force_load")
+                target_link_libraries(${project_elf} PRIVATE
+                                       "-Wl,-force_load"
+                                       ${build_component})
             endif()
         else()
             target_link_libraries(${project_elf} PRIVATE ${build_component})


new appveyor cache file

new appveyor cache file

--- appveyor.cmake
+++ appveyor.cmake
@@ -1 +1,6 @@
-set(BOOST_ROOT "C:\projects\morebin\boost.1.58.0.0\lib\native" CACHE PATH "")
+set(BUILD_DIR C:/projects/morebin CACHE PATH "")
+set(Boost_INCLUDE_DIR ${BUILD_DIR}/boost.1.58.0.0/lib/native/include CACHE PATH "")
+set(Boost_DATE_TIME_LIBRARY_RELEASE ${BUILD_DIR}/boost_date_time-vc120.1.58.0.0/lib/native/address-model-64/lib/boost_date_time-vc120-mt-1_58.dll CACHE PATH "")
+set(Boost_DATE_TIME_LIBRARY_DEBUG ${BUILD_DIR}/boost_date_time-vc120.1.58.0.0/lib/native/address-model-64/lib/boost_date_time-vc120-mt-gd-1_58.dll CACHE PATH "")
+set(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE ${BUILD_DIR}/boost_program_options-vc120.1.58.0.0/lib/native/address-model-64/lib/boost_program_options-vc120-mt-1_58.dll CACHE PATH "")
+set(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG ${BUILD_DIR}/boost_program_options-vc120.1.58.0.0/lib/native/address-model-64/lib/boost_program_options-vc120-mt-gd-1_58.dll CACHE PATH "")


#define RETSIGTYPE void.  (This is only a first approximation, and should be
replaced by the appropriate test result for whether signal is int or void, but
that test hasn't been programmed yet.)

Change potential #define value from nothing to 1 when the in-place
documentation (originally generated by autoheader from the documentation of
our autotools configuration files which might be incorrect) says to do so.
This change allows both the #if and #ifdef macros to be used, while before
we were restricted just to #ifdef for these particular #define's.

svn path=/trunk/; revision=6830

--- config.h.cmake
+++ config.h.cmake
@@ -25,38 +25,38 @@
 #cmakedefine ENABLE_DYNDRIVERS

 /* Define to 1 if you have the <cmath> header file. */
-#cmakedefine HAVE_CMATH
+#cmakedefine HAVE_CMATH 1

 /* Define if you have c++ accessible stdint.h */
 #cmakedefine HAVE_CXX_STDINT_H

 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
    */
-#cmakedefine HAVE_DIRENT_H
+#cmakedefine HAVE_DIRENT_H 1

 /* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H
+#cmakedefine HAVE_DLFCN_H 1

 /* Define if finite is available */
 #cmakedefine HAVE_FINITE

 /* Define to 1 if you have the `fork' function. */
-#cmakedefine HAVE_FORK
+#cmakedefine HAVE_FORK 1

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

 /* Define to 1 if you have the <glib.h> header file. */
-#cmakedefine HAVE_GLIB_H
+#cmakedefine HAVE_GLIB_H 1

 /* Define to 1 if you have the <glib-object.h> header file. */
-#cmakedefine HAVE_GLIB_OBJECT_H
+#cmakedefine HAVE_GLIB_OBJECT_H 1

 /* Define to 1 if you have the <gtk/gtk.h> header file. */
-#cmakedefine HAVE_GTK_GTK_H
+#cmakedefine HAVE_GTK_GTK_H 1

 /* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H
+#cmakedefine HAVE_INTTYPES_H 1

 /* Define if isinf is available */
 #cmakedefine HAVE_ISINF
@@ -68,38 +68,38 @@
 #cmakedefine HAVE_ITCL

 /* Define to 1 if you have the <itclDecls.h> header file. */
-#cmakedefine HAVE_ITCLDECLS_H
+#cmakedefine HAVE_ITCLDECLS_H 1

 /* Define if [incr], [Tk] is available */
 #cmakedefine HAVE_ITK

 /* Define to 1 if you have the <jni.h> header file. */
-#cmakedefine HAVE_JNI_H
+#cmakedefine HAVE_JNI_H 1

 /* Define to 1 if you have the <libart_lgpl/libart.h> header file. */
-#cmakedefine HAVE_LIBART_LGPL_LIBART_H
+#cmakedefine HAVE_LIBART_LGPL_LIBART_H 1

 /* Define to 1 if you have the <libgnomecanvas/libgnomecanvas.h> header file.
    */
-#cmakedefine HAVE_LIBGNOMECANVAS_LIBGNOMECANVAS_H
+#cmakedefine HAVE_LIBGNOMECANVAS_LIBGNOMECANVAS_H 1

 /* Define to 1 if you have the <libgnomeprint/gnome-print.h> header file. */
-#cmakedefine HAVE_LIBGNOMEPRINT_GNOME_PRINT_H
+#cmakedefine HAVE_LIBGNOMEPRINT_GNOME_PRINT_H 1

 /* Define to 1 if you have the `m' library (-lm). */
-#cmakedefine HAVE_LIBM
+#cmakedefine HAVE_LIBM 1

 /* Define if libunicode is available */
 #cmakedefine HAVE_LIBUNICODE

 /* Define to 1 if you have the <math.h> header file. */
-#cmakedefine HAVE_MATH_H
+#cmakedefine HAVE_MATH_H 1

 /* Define to 1 if you have the <memory.h> header file. */
-#cmakedefine HAVE_MEMORY_H
+#cmakedefine HAVE_MEMORY_H 1

 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#cmakedefine HAVE_NDIR_H
+#cmakedefine HAVE_NDIR_H 1

 /* Define if popen is available */
 #cmakedefine HAVE_POPEN
@@ -111,60 +111,60 @@
 #cmakedefine HAVE_QHULL

 /* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H
+#cmakedefine HAVE_STDINT_H 1

 /* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H
+#cmakedefine HAVE_STDLIB_H 1

 /* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H
+#cmakedefine HAVE_STRINGS_H 1

 /* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H
+#cmakedefine HAVE_STRING_H 1

 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
    */
-#cmakedefine HAVE_SYS_DIR_H
+#cmakedefine HAVE_SYS_DIR_H 1

 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
    */
-#cmakedefine HAVE_SYS_NDIR_H
+#cmakedefine HAVE_SYS_NDIR_H 1

 /* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H
+#cmakedefine HAVE_SYS_STAT_H 1

 /* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H
+#cmakedefine HAVE_SYS_TYPES_H 1

 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#cmakedefine HAVE_SYS_WAIT_H
+#cmakedefine HAVE_SYS_WAIT_H 1

 /* Define to 1 if you have the <termios.h> header file. */
-#cmakedefine HAVE_TERMIOS_H
+#cmakedefine HAVE_TERMIOS_H 1

 /* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_UNISTD_H 1

 /* Define if usleep is available */
 #cmakedefine HAVE_USLEEP

 /* Define to 1 if you have the `vfork' function. */
-#cmakedefine HAVE_VFORK
+#cmakedefine HAVE_VFORK 1

 /* Define to 1 if you have the <vfork.h> header file. */
-#cmakedefine HAVE_VFORK_H
+#cmakedefine HAVE_VFORK_H 1

 /* Define to 1 if `fork' works. */
-#cmakedefine HAVE_WORKING_FORK
+#cmakedefine HAVE_WORKING_FORK 1

 /* Define to 1 if `vfork' works. */
-#cmakedefine HAVE_WORKING_VFORK
+#cmakedefine HAVE_WORKING_VFORK 1

 /* Include sys/type.h if needed */
 #cmakedefine NEED_SYS_TYPE_H

 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#cmakedefine NO_MINUS_C_MINUS_O
+#cmakedefine NO_MINUS_C_MINUS_O 1

 /* Name of package */
 #define PACKAGE "${PACKAGE}"
@@ -396,10 +396,11 @@
 #cmakedefine PL_FREETYPE_SYMBOL_OBLIQUE

 /* Define as the return type of signal handlers (`int' or `void'). */
-#cmakedefine RETSIGTYPE
+/* Frozen at void for now, NEEDS TEST */
+#define RETSIGTYPE void

 /* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS
+#cmakedefine STDC_HEADERS 1

 /* Location of Tcl stuff */
 #define TCL_DIR "${TCL_DIR}"
@@ -414,7 +415,7 @@
 #cmakedefine WITH_CSA

 /* Define to 1 if the X Window System is missing or not being used. */
-#cmakedefine X_DISPLAY_MISSING
+#cmakedefine X_DISPLAY_MISSING 1

 /* Define to `char *' if <sys/types.h> does not define. */
 #cmakedefine caddr_t


Issue #21: Remove spurious endif in CMake config.

--- CMake/ExternalProjects/PCL.cmake
+++ CMake/ExternalProjects/PCL.cmake
@@ -46,7 +46,6 @@
     -DBUILD_CUDA:BOOL=${MYPROJECT_USE_CUDA}
     -DBUILD_GPU:BOOL=${MYPROJECT_USE_CUDA}
   )
-  endif()
   if(MYPROJECT_USE_CUDA)
     list(APPEND _cuda_options
       -DCUDA_TOOLKIT_ROOT_DIR:PATH=${CUDA_TOOLKIT_ROOT_DIR}


minor fix in Examples.cmake# Please enter the commit message for your changes. Lines starting

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -11,7 +11,7 @@
 	set(Matlab_ROOT_DIR_DEFAULT /usr/local/MATLAB/MATLAB_Production_Server/R2013a/)
 endif()
 set(MTF_EXEC_INSTALL_DIR ${MTF_EXEC_INSTALL_DIR_DEFAULT} CACHE PATH "Directory to install the executable")
-set(MTF_PY_INSTALL_DIR ${MTF_PY_INSTALL_DIR_DEFAULT} CACHE PATH "Directory to install the Python interface module (normally the CModules sub directory of PTF)")
+set(MTF_PY_INSTALL_DIR ${MTF_PY_INSTALL_DIR_DEFAULT} CACHE PATH "Directory to install the Python interface module")
 set(Matlab_ROOT_DIR ${Matlab_ROOT_DIR_DEFAULT} CACHE PATH "MATLAB root directory")

 # set(WARNING_FLAGS -Wfatal-errors -Wno-write-strings -Wno-unused-result)


BUG: Typo in module name.

BUG: Typo in module name.

IO-Spatialobjects -> IO-SpatialObjects

Change-Id: Iea01b5571b36a497e22328e1137348c691e9385c

--- Modules/Core/Mesh/itk-module.cmake
+++ Modules/Core/Mesh/itk-module.cmake
@@ -1,2 +1,2 @@
-itk_module(ITK-Mesh DEPENDS ITK-Transform TEST_DEPENDS ITK-TestKernel ITK-IO-Spatialobjects)
-# Extra test dependecy on IO-SpatialObjects is cuased by itkMeshSpatialObjectIOTest.
+itk_module(ITK-Mesh DEPENDS ITK-Transform TEST_DEPENDS ITK-TestKernel ITK-IO-SpatialObjects)
+# Extra test dependency on IO-SpatialObjects is caused by itkMeshSpatialObjectIOTest.


ENH: Bump TubeTK to version the fixes linux CI

Linux CI failing - needed apt-get update due to changes in
ubuntu repos.

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,5 +48,5 @@
   "http://www.tubetk.org"
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG 61f1156bd9b4af7e34b064f676620584d85bef3a
+  GIT_TAG fac636c8b6155e7888c3932744764406cf9fae88
   )


style: remove bad whitespace

style: remove bad whitespace

--- Superbuild/Projects/win32/veloview.bundle.cmake
+++ Superbuild/Projects/win32/veloview.bundle.cmake
@@ -69,11 +69,7 @@
   set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
 endif()

-
 # install system runtimes.
 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
 include(InstallRequiredSystemLibraries)
 include(CPack)
-
-
-


mark nedmalloc deprecated

mark nedmalloc deprecated

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -183,11 +183,11 @@
 if (OGRE_CONFIG_ALLOCATOR EQUAL 1)
 	set(_allocator "standard")
 elseif (OGRE_CONFIG_ALLOCATOR EQUAL 2)
-	set(_allocator "nedmalloc")
+	set(_allocator "nedmalloc [DEPRECATED]")
 elseif (OGRE_CONFIG_ALLOCATOR EQUAL 3)
 	set(_allocator "user")
 else ()
-    set(_allocator "nedmalloc (pooling)")
+    set(_allocator "nedmalloc (pooling) [DEPRECATED]")
 endif()
 # assert settings
 if (OGRE_ASSERT_MODE EQUAL 0)


Remove hashing of try_compile is favor of CMake standard behavior

The downside to changing to the normal CMake behavior if the use adds
the std=c++11 flag after the initial configuration the try_compiles
will not be re-tried. But this is standard CMake behavior.

--- CMake/sitkCheckCXX11.cmake
+++ CMake/sitkCheckCXX11.cmake
@@ -32,14 +32,8 @@
 # Function to wrap try compiles on the aggregate cxx test file1
 #
 function(sitkCXX11Test VARIABLE)
-  # use the hash of the dependent cxx flags in the variable name to
-  # cache the results.
-  string(MD5 cmake_cxx_flags_hash "#${CMAKE_CXX_FLAGS}")
-  set(cache_var "${VARIABLE}_${cmake_cxx_flags_hash}")

-  if(DEFINED "${cache_var}")
-    set(${VARIABLE} "${${cache_var}}"  CACHE INTERNAL "Using hashed value from TRY_COMPILE")
-  else()
+  if(NOT DEFINED ${VARIABLE})
     message(STATUS "Performing Test ${VARIABLE}")
     set(requred_definitions "${CMAKE_REQUIRED_DEFINITIONS} -D${VARIABLE}")
     try_compile(${VARIABLE}


COMP: Eigen does not configure without BUILD_TESTING set to ON.

--- CMakeExternals/Eigen.cmake
+++ CMakeExternals/Eigen.cmake
@@ -21,7 +21,7 @@
       URL_MD5 9e3bfaaab3db18253cfd87ea697b3ab1
       CMAKE_ARGS
         ${ep_common_args}
-        -DBUILD_TESTING:BOOL=OFF
+        -DBUILD_TESTING:BOOL=ON
         -DEIGEN_BUILD_PKGCONFIG:BOOL=OFF
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}


improve 72b2c9e9b45a to make it work with OpenSUSE again

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -31,30 +31,29 @@
 # if all listed variables are TRUE
 find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR)

-option(GSL_USES_CBLAS "If GSL needs to be linked against cblas" OFF)
-if (GSL_USES_CBLAS)
-  find_library(GSLCBLAS_LIBRARY NAMES gslcblas cblas HINTS ${PC_GSL_LIBRARY_DIRS} )
-  find_package_handle_standard_args(GSL DEFAULT_MSG GSLCBLAS_LIBRARY)
-  if (GSL_FOUND)
-    include(CheckLibraryExists)
-    check_library_exists("${GSLCBLAS_LIBRARY};${MATH_LIBRARIES}" cblas_dsyrk "" FOUND_DSYRK)
-    if(NOT FOUND_DSYRK)
-      message(FATAL_ERROR "Could not find cblas_dsyrk in ${GSLCBLAS_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libcblas in GSLCBLAS_LIBRARY by hand (i.e. -DGSLCBLAS_LIBRARY='/path/to/libcblas.so;/path/to/libm.so')! If your gsl was build against an different version of cblas, specify it in GSLCBLAS_LIBRARY")
-    endif(NOT FOUND_DSYRK)
-  endif(GSL_FOUND)
-else()
-  set(GSLCBLAS_LIBRARY)
-endif (GSL_USES_CBLAS)
-
-set(GSL_LIBRARIES "${GSL_LIBRARY};${GSLCBLAS_LIBRARY}")
+set(GSL_LIBRARIES "${GSL_LIBRARY}")
 set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )

 if (GSL_FOUND)
+  include(CheckLibraryExists)
   #adding MATH_LIBRARIES here to allow static libs, this does not harm us as we are anyway using it
   check_library_exists("${GSL_LIBRARIES};${MATH_LIBRARIES}" gsl_linalg_QR_decomp "" FOUND_QR_DECOMP)
   if(NOT FOUND_QR_DECOMP)
-    message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong.  If you are using a static lib (.a) make sure you have specified all dependencies of libgsl in GSL_LIBRARY by hand (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libm.so') !")
+    #Some distributions like OpenSUSE need cblas in the linker flags, too
+    find_library(GSLCBLAS_LIBRARY NAMES gslcblas cblas HINTS ${PC_GSL_LIBRARY_DIRS} )
+    find_package_handle_standard_args(GSLCBLAS DEFAULT_MSG GSLCBLAS_LIBRARY)
+    if (GSLCBLAS_FOUND)
+      check_library_exists("${GSLCBLAS_LIBRARY};${MATH_LIBRARIES}" cblas_dsyrk "" FOUND_DSYRK)
+      if(NOT FOUND_DSYRK)
+        message(FATAL_ERROR "Could not find cblas_dsyrk in ${GSLCBLAS_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libcblas in GSLCBLAS_LIBRARY by hand (i.e. -DGSLCBLAS_LIBRARY='/path/to/libcblas.so;/path/to/libm.so')! If your gsl was build against an different version of cblas, specify it in GSLCBLAS_LIBRARY")
+      endif(NOT FOUND_DSYRK)
+      set(GSL_LIBRARIES "${GSL_LIBRARY};${GSLCBLAS_LIBRARY}")
+      check_library_exists("${GSL_LIBRARIES};${MATH_LIBRARIES}" gsl_linalg_QR_lssolve "" FOUND_QR_DECOMP_AGAIN)
+    endif(GSLCBLAS_FOUND)
   endif(NOT FOUND_QR_DECOMP)
+  if(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
+      message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong.  If you are using a static lib (.a) make sure you have specified all dependencies of libgsl in GSL_LIBRARY by hand (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libm.so') !")
+  endif(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
 endif (GSL_FOUND)

 mark_as_advanced(GSL_INCLUDE_DIR GSL_LIBRARY)


Enabled C++11 in gcc

Enabled C++11 in gcc

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -59,12 +59,13 @@
 		set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
 		set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
 	elseif(APPLE)
+
+		set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}          -std=c++11")
+		set(CMAKE_CXX_FLAGS_DEBUG    "${CMAKE_CXX_FLAGS_DEBUG}    -std=c++11")
+		set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
+		set(CMAKE_CXX_FLAGS_RELEASE  "${CMAKE_CXX_FLAGS_RELEASE}  -std=c++11")
 		#on os x clang adds pthread for us but we need to add it for gcc
 		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-			set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}          -std=c++11")
-			set(CMAKE_CXX_FLAGS_DEBUG    "${CMAKE_CXX_FLAGS_DEBUG}    -std=c++11")
-			set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
-			set(CMAKE_CXX_FLAGS_RELEASE  "${CMAKE_CXX_FLAGS_RELEASE}  -std=c++11")
 			add_flags_cxx("-stdlib=libc++")
 			add_flags_lnk("-stdlib=libc++")
 		else()
@@ -77,13 +78,10 @@
 			add_flags_cxx("-pthread")
 		endif()

-		# Make CLang use C++11, otherwise MSVC2008-supported extensions don't work ("override" keyword etc.):
-		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-			set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}          -std=c++11")
-			set(CMAKE_CXX_FLAGS_DEBUG    "${CMAKE_CXX_FLAGS_DEBUG}    -std=c++11")
-			set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
-			set(CMAKE_CXX_FLAGS_RELEASE  "${CMAKE_CXX_FLAGS_RELEASE}  -std=c++11")
-		endif()
+		set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}          -std=c++11")
+		set(CMAKE_CXX_FLAGS_DEBUG    "${CMAKE_CXX_FLAGS_DEBUG}    -std=c++11")
+		set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
+		set(CMAKE_CXX_FLAGS_RELEASE  "${CMAKE_CXX_FLAGS_RELEASE}  -std=c++11")

 		# We use a signed char (fixes #640 on RasPi)
 		add_flags_cxx("-fsigned-char")


Do not include/link boost's date_time lib as we don't use it.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -14,9 +14,9 @@
     endif ()

     if (APPLE)
-            set (BOOST_COMPONENTS boost_date_time boost_filesystem boost_system boost_thread boost_regex boost_program_options)
+            set (BOOST_COMPONENTS boost_filesystem boost_system boost_thread boost_regex boost_program_options)
     else ()
-            set (BOOST_COMPONENTS date_time filesystem system thread regex program_options)
+            set (BOOST_COMPONENTS filesystem system thread regex program_options)
     endif ()

     sagase_configure_package (BOOST


Fixed libdir path in pkg-config file

Fixed libdir path in pkg-config file

--- libcmime.pc.cmake
+++ libcmime.pc.cmake
@@ -1,6 +1,6 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@CMAKE_INSTALL_LIBDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
 includedir=${prefix}/include

 Name: libcmime


Turn off warning in code which uses soap-generated headers

--- build/cmake/macros/gSOAPGen.cmake
+++ build/cmake/macros/gSOAPGen.cmake
@@ -67,7 +67,7 @@
 	#  The generated files spew no end of warnings which we can't fix.
 	#  So, turn off the warnings for these files. (-w means no warnings)
 	if (UNIX)
-		set_source_files_properties( ${${_DAEMON}_SOAP_SRCS} PROPERTIES COMPILE_FLAGS "-w")
+		set_source_files_properties( soap_${_DAEMON}Stub.cpp ${${_DAEMON}_SOAP_SRCS} PROPERTIES COMPILE_FLAGS "-w")
 	endif(UNIX)

 	 list(REMOVE_DUPLICATES ${_SRCS})


fixed typo

fixed typo

--- cmake/CompilerOptimizations.cmake
+++ cmake/CompilerOptimizations.cmake
@@ -36,10 +36,10 @@
 check_c_compiler_flag(-mfpmath=sse HAS_FPMATH_SSE)
 check_cxx_compiler_flag(-mfpmath=sse HAS_CXX_FPMATH_SSE)
   if (HAS_FPMATH_SSE)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpmath=sse")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
 endif()
 if (HAS_CXX_FPMATH_SSE)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpmath=sse")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse")
 endif()

 endif()


Adding CMAKE_C and CMAKE_CXX_FLAGS to transmitted flags. The user input flags were not accounted for on mac

--- cmake/ExternalProjectConfig.cmake
+++ cmake/ExternalProjectConfig.cmake
@@ -1,9 +1,8 @@
-set(ep_common_c_flags "${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")
+set(ep_common_c_flags "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")
+set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")

 if (NOT APPLE AND NOT WIN32)
-    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS} -Wall -fpermissive")
-else()
-    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")
+    set(ep_common_cxx_flags "${ep_common_cxx_flags} -Wall -fpermissive")
 endif()

 set(ep_common_cache_args


[CMake] Support component-based installation for runtime libraries

This enables targets like "install-ubsan" and "install-asan" to install all associated runtime libraries.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -125,10 +125,31 @@
   endif()

   if(LIB_PARENT_TARGET)
-    set(COMPONENT_OPTION COMPONENT ${LIB_PARENT_TARGET})
+    # If the parent targets aren't created we should create them
+    if(NOT TARGET ${LIB_PARENT_TARGET})
+      add_custom_target(${LIB_PARENT_TARGET})
+    endif()
+    if(NOT TARGET install-${LIB_PARENT_TARGET})
+      # The parent install target specifies the parent component to scrape up
+      # anything not installed by the individual install targets, and to handle
+      # installation when running the multi-configuration generators.
+      add_custom_target(install-${LIB_PARENT_TARGET}
+                        DEPENDS ${LIB_PARENT_TARGET}
+                        COMMAND "${CMAKE_COMMAND}"
+                                -DCMAKE_INSTALL_COMPONENT=${LIB_PARENT_TARGET}
+                                -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+    endif()
   endif()

   foreach(libname ${libnames})
+    # If you have are using a multi-configuration generator we don't generate
+    # per-library install rules, so we fall back to the parent target COMPONENT
+    if(CMAKE_CONFIGURATION_TYPES AND LIB_PARENT_TARGET)
+      set(COMPONENT_OPTION COMPONENT ${LIB_PARENT_TARGET})
+    else()
+      set(COMPONENT_OPTION COMPONENT ${libname})
+    endif()
+
     add_library(${libname} ${type} ${sources_${libname}})
     set_target_compile_flags(${libname} ${extra_cflags_${libname}})
     set_target_link_flags(${libname} ${extra_linkflags_${libname}})
@@ -150,6 +171,21 @@
               ${COMPONENT_OPTION}
       RUNTIME DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
               ${COMPONENT_OPTION})
+
+    # We only want to generate per-library install targets if you aren't using
+    # an IDE because the extra targets get cluttered in IDEs.
+    if(NOT CMAKE_CONFIGURATION_TYPES)
+      add_custom_target(install-${libname}
+                        DEPENDS ${libname}
+                        COMMAND "${CMAKE_COMMAND}"
+                                -DCMAKE_INSTALL_COMPONENT=${libname}
+                                -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+      # If you have a parent target specified, we bind the new install target
+      # to the parent install target.
+      if(LIB_PARENT_TARGET)
+        add_dependencies(install-${LIB_PARENT_TARGET} install-${libname})
+      endif()
+    endif()
     if(APPLE)
       set_target_properties(${libname} PROPERTIES
       OSX_ARCHITECTURES "${LIB_ARCHS_${libname}}")
@@ -160,7 +196,7 @@
     endif()
   endforeach()
   if(LIB_PARENT_TARGET)
-    add_dependencies(${LIB_PARENT_TARGET} ${libnames})
+    add_dependencies(${LIB_PARENT_TARGET} ${libname})
   endif()
 endfunction()


Update AWS SDK version to 1.7.108.

Update AWS SDK version to 1.7.108.

--- cmake/Modules/FindAWSSDK_EP.cmake
+++ cmake/Modules/FindAWSSDK_EP.cmake
@@ -71,8 +71,8 @@

     ExternalProject_Add(ep_awssdk
       PREFIX "externals"
-      URL "https://github.com/aws/aws-sdk-cpp/archive/1.7.94.zip"
-      URL_HASH SHA1=171c0fa56e880d15c6b369cf66ec7eae4bf63659
+      URL "https://github.com/aws/aws-sdk-cpp/archive/1.7.108.zip"
+      URL_HASH SHA1=d07bae3fe924008b3117936963456dd314787abf
       CMAKE_ARGS
         -DCMAKE_BUILD_TYPE=Release
         -DENABLE_TESTING=OFF


Warnings become errors

Warnings become errors

--- cmake/Modules/PKSavPlatform.cmake
+++ cmake/Modules/PKSavPlatform.cmake
@@ -23,11 +23,12 @@
 ENDIF(${CMAKE_SIZEOF_VOID_P} EQUAL 8)

 IF(PKSAV_GCC OR PKSAV_CLANG)
-    SET(PKSAV_C_FLAGS "-O3 -std=gnu99 -Wall -Wextra -fvisibility=hidden")
+    SET(PKSAV_C_FLAGS "-O3 -std=gnu99 -Wall -Wextra -Werror -fvisibility=hidden")
 ELSEIF(MSVC)
     ADD_DEFINITIONS(/MP)                       # Multi-threaded build
     ADD_DEFINITIONS(/EHsc)                     # Exception handling
     ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) # Ignore deprecation warnings
+    ADD_DEFINITIONS(/WX)                       # Warnings become errors
 ENDIF(PKSAV_GCC OR PKSAV_CLANG)

 #


Fix for ROOT-6458

Fix for ROOT-6458

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -23,7 +23,7 @@

 #----Test if clang setup works----------------------------------------------------------------------
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-  exec_program(${CMAKE_C_COMPILER} ARGS "--version 2>&1 | grep version" OUTPUT_VARIABLE _clang_version_info)
+  exec_program(${CMAKE_CXX_COMPILER} ARGS "--version 2>&1 | grep version" OUTPUT_VARIABLE _clang_version_info)
   string(REGEX REPLACE "^.*[ ]version[ ]([0-9]+)\\.[0-9]+.*" "\\1" CLANG_MAJOR "${_clang_version_info}")
   string(REGEX REPLACE "^.*[ ]version[ ][0-9]+\\.([0-9]+).*" "\\1" CLANG_MINOR "${_clang_version_info}")
   message(STATUS "Found Clang. Major version ${CLANG_MAJOR}, minor version ${CLANG_MINOR}")


Copy the Clang resource directly directly from the clang build

When building a toolchain version of LLDB, build-script will not
create the Swift resource dir. Get the Clang headers directly from
the Clang build.

(cherry picked from commit 2dcf49ce63e50f694a5117cea9d8b73ab8dbd3b6)

--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -98,8 +98,13 @@

 # Copy vendor-specific headers from clang (without staging).
 if(NOT IOS)
+  execute_process(
+     COMMAND ${LLDB_PATH_TO_CLANG_BUILD}/bin/clang -print-resource-dir
+     OUTPUT_VARIABLE CLANG_RESOURCE_PATH
+     OUTPUT_STRIP_TRAILING_WHITESPACE)
+
   add_custom_command(TARGET lldb-framework-headers POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LLDB_PATH_TO_SWIFT_BUILD}/lib/swift/clang/ $<TARGET_FILE_DIR:liblldb>/Resources/Clang
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CLANG_RESOURCE_PATH}/include $<TARGET_FILE_DIR:liblldb>/Resources/Clang/include
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${LLDB_PATH_TO_SWIFT_BUILD}/lib/swift $<TARGET_FILE_DIR:liblldb>/Resources/Swift
     COMMENT "LLDB.framework: copy clang vendor-specific headers"
   )


Always build AWS SDK in release mode for gcc #1351

--- cmake/Modules/FindAWSSDK_EP.cmake
+++ cmake/Modules/FindAWSSDK_EP.cmake
@@ -69,6 +69,15 @@
       list(APPEND DEPENDS ep_zlib)
     endif()

+    # Set AWS cmake build to use specified build type except for gcc
+    # For aws sdk and gcc we must always build in release mode
+    # See https://github.com/TileDB-Inc/TileDB/issues/1351 and
+    # https://github.com/awslabs/aws-checksums/issues/8
+    set(AWS_CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE})
+    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+        set(AWS_CMAKE_BUILD_TYPE "Release")
+    endif()
+
     # Work around for: https://github.com/aws/aws-sdk-cpp/pull/1187
     # AWS SDK builds it's "aws-common" dependencies using `execute_process` to run cmake directly,
     # and does not pass the CMAKE_GENERATOR PLATFORM, so those projects default to Win32 builds,
@@ -87,7 +96,7 @@
       URL "https://github.com/aws/aws-sdk-cpp/archive/1.7.108.zip"
       URL_HASH SHA1=d07bae3fe924008b3117936963456dd314787abf
       CMAKE_ARGS
-        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+        -DCMAKE_BUILD_TYPE=${AWS_CMAKE_BUILD_TYPE}
         -DENABLE_TESTING=OFF
         -DBUILD_ONLY=s3\\$<SEMICOLON>core
         -DBUILD_SHARED_LIBS=OFF


From Brett Viren:
fix gcc version detection.

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

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -25,9 +25,19 @@
 #---Obtain the major and minor version of the GNU compiler-------------------------------------------
 if (CMAKE_COMPILER_IS_GNUCXX)
   exec_program(${CMAKE_C_COMPILER} ARGS "-dumpversion" OUTPUT_VARIABLE _gcc_version_info)
-  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\1" GCC_MAJOR "${_gcc_version_info}")
-  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\2" GCC_MINOR "${_gcc_version_info}")
-  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\3" GCC_PATCH "${_gcc_version_info}")
+  string(REGEX REPLACE "^([0-9]+).*$"                   "\\1" GCC_MAJOR ${_gcc_version_info})
+  string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$"          "\\1" GCC_MINOR ${_gcc_version_info})
+  string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" GCC_PATCH ${_gcc_version_info})
+
+  if(GCC_PATCH MATCHES "\\.+")
+    set(GCC_PATCH "")
+  endif()
+  if(GCC_MINOR MATCHES "\\.+")
+    set(GCC_MINOR "")
+  endif()
+  if(GCC_MAJOR MATCHES "\\.+")
+    set(GCC_MAJOR "")
+  endif()
   message(STATUS "Found GCC. Major version ${GCC_MAJOR}, minor version ${GCC_MINOR}")
   set(COMPILER_VERSION gcc${GCC_MAJOR}${GCC_MINOR}${GCC_PATCH})
 else()


Export C++ standard target property only if defined

In ROOT, CMAKE_CXX_STANDARD is always defined. However,
on dependent projects that use this function we need to
check, since CMAKE_CXX_STANDARD may not be defined.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -646,12 +646,10 @@
     endif()
     #---create a shared library with the .def file------------------------
     add_library(${library} ${_all} SHARED ${lib_srcs})
-    target_compile_features(${library} INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
     target_link_libraries(${library} PUBLIC ${ARG_LIBRARIES} ${ARG_DEPENDENCIES})
     set_target_properties(${library} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
   else()
     add_library( ${library} ${_all} ${ARG_TYPE} ${lib_srcs})
-    target_compile_features(${library} INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
     if(ARG_TYPE STREQUAL SHARED)
       set_target_properties(${library} PROPERTIES  ${ROOT_LIBRARY_PROPERTIES} )
     endif()
@@ -661,6 +659,11 @@
       target_link_libraries(${library} PUBLIC ${ARG_LIBRARIES} ${ARG_DEPENDENCIES})
     endif()
   endif()
+
+  if(DEFINED CMAKE_CXX_STANDARD)
+    target_compile_features(${library} INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
+  endif()
+
   if(TARGET G__${library})
     add_dependencies(${library} G__${library})
   else()


make more use of ${NAME}

make more use of ${NAME}

issue https://github.com/smanders/externpro/issues/356

--- projects/curl.cmake
+++ projects/curl.cmake
@@ -43,8 +43,8 @@
     )
   set(FIND_DEPS "xpFindPkg(PKGS libssh2 cares) # dependencies\n")
   set(TARGETS_FILE lib/cmake/CURL/CURLTargets.cmake)
-  set(EXECUTABLE xpro::curl)
-  set(LIBRARIES xpro::libcurl)
+  set(EXECUTABLE xpro::${NAME})
+  set(LIBRARIES xpro::lib${NAME})
   configure_file(${PRO_DIR}/use/usexp-template-exe-lib-config.cmake
     ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake
     @ONLY NEWLINE_STYLE LF


BUG: Fixed variable name spelling

BUG: Fixed variable name spelling

--- DashboardScripts/tubetk_cmakecache.cmake
+++ DashboardScripts/tubetk_cmakecache.cmake
@@ -31,7 +31,7 @@
 set( CTEST_CMAKE_GENERATOR ${SITE_CMAKE_GENERATOR} )
 set( CTEST_NOTES_FILES "${SITE_SCRIPT_DIR}/${CTEST_SCRIPT_NAME}" )
 set( CTEST_SOURCE_DIRECTORY "${SITE_SOURCE_DIR}" )
-set( CTEST_BINARY_DIRECTORY "${SITE_BINARY_DIR}/${SITE_BINARY_SUBDIR}" )
+set( CTEST_BINARY_DIRECTORY "${SITE_BINARY_DIR}/${SCRIPT_BINARY_SUBDIR}" )

 set( CTEST_BUILD_COMMAND "${SITE_MAKE_COMMAND}" )
 set( CTEST_CMAKE_COMMAND "${SITE_CMAKE_COMMAND}" )


removing old policy on cmake 2.6 to avoid being blocked on 2.8, and everything still works ok

--- dist/WkDepends.cmake
+++ dist/WkDepends.cmake
@@ -44,8 +44,6 @@
 # WkDepends( dependency_name [QUIET / REQUIRED] )

 macro (WkDepends package_name)
-CMAKE_POLICY(PUSH)
-CMAKE_POLICY(VERSION 2.6)

 	#
 	# First check if the package is installed already , quietly
@@ -101,7 +99,6 @@
 		message ( STATUS "== Binary Dependency ${package_name} : NOT FOUND ! " )
 	endif ( ${package_var_name}_FOUND )

-CMAKE_POLICY(POP)
 endmacro (WkDepends package_name)

 #
@@ -109,8 +106,6 @@
 # They will all be forwarded to client projects
 #
 macro(WkLinkDepends package_name)
-CMAKE_POLICY(PUSH)
-CMAKE_POLICY(VERSION 2.6)

 	SetPackageVarName( package_var_name ${package_name} )
 	#message ( "${package_name} -> ${package_var_name}" )
@@ -186,7 +181,6 @@
 		message ( STATUS "== Binary Dependency ${package_name} : FAILED ! " )
 	endif ( ${package_var_name}_FOUND )

-CMAKE_POLICY(POP)
 endmacro(WkLinkDepends package_name)

 macro (WkCopyDepends depend target)


i#1962 Travis CI: re-enable Mac tests

i#1962 Travis CI: re-enable Mac tests

Enables Mac tests accidentally disabled by the clang check in cdd7a7e.

Review-URL: https://codereview.appspot.com/301190043

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -54,7 +54,7 @@
 if (arg_travis)
   # XXX i#1801, i#1962: under clang we have several failing tests.  Until those are
   # fixed, our Travis clang suite only builds and does not run tests.
-  if ($ENV{CC} MATCHES "clang")
+  if (NOT APPLE AND $ENV{CC} MATCHES "clang")
     set(run_tests OFF)
     message("Detected a Travis clang suite: disabling running of tests")
   endif ()


Update version number in cmake soxconfig.h

--- src/soxconfig.h.cmake
+++ src/soxconfig.h.cmake
@@ -1,4 +1,4 @@
-#define PACKAGE_VERSION "14.4.0"
+#define PACKAGE_VERSION "14.4.1git"

 #cmakedefine EXTERNAL_GSM             1
 #cmakedefine EXTERNAL_LPC10           1


tweak cmake message

tweak cmake message

git-svn-id: 7720f8ced686bbe1e9a8fc98aef2dd4d5d9a3e92@46 995b7d7e-cf50-0410-b6c9-9f4ebe303554

--- CMakeModules/FindlibSquish.cmake
+++ CMakeModules/FindlibSquish.cmake
@@ -10,5 +10,5 @@

 IF (LIBSQUISH_LIBRARY AND LIBSQUISH_INCLUDE_DIR)
    SET(LIBSQUISH_FOUND TRUE)
-   MESSAGE(STATUS Found libSquish: ${LIBSQUISH_LIBRARY})
+   MESSAGE(STATUS "Found libSquish: ${LIBSQUISH_LIBRARY}")
 ENDIF (LIBSQUISH_LIBRARY AND LIBSQUISH_INCLUDE_DIR)


Bugfix

Bugfix

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26607 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -27,7 +27,7 @@
   SET(DEAL_II_EXAMPLES_RELDIR "examples")
   SET(DEAL_II_INCLUDE_RELDIR "include")
   SET(DEAL_II_LIBRARY_RELDIR "lib")
-  SET(DEAL_II_PROJECT_CONFIG_RELDIR "")
+  SET(DEAL_II_PROJECT_CONFIG_RELDIR ".")

 ELSE()
   #


COMP (#1543): excluded all wiimote related classes from files.cmake

--- Modules/InputDevices/files.cmake
+++ Modules/InputDevices/files.cmake
@@ -3,6 +3,10 @@
   SpaceNavigator/mitkSpaceNavigatorDriver.cpp
   SpaceNavigator/mitkSpaceNavigatorEvent.cpp
   SpaceNavigator/mitkSpaceNavigatorVtkCameraController.cpp
-  WiiMote/mitkWiiMoteAddOn.cpp
+ # WiiMote/wiiyourself/wiimote.cpp
+ # WiiMote/mitkWiiMoteAddOn.cpp
+ # WiiMote/mitkWiiMoteThread.cpp
+ # WiiMote/mitkWiiMoteVtkCameraController.cpp
+ # WiiMote/mitkWiiMoteEvent.cpp
   )