- fix compilation on ubuntu

- fix compilation on ubuntu

--- CMakeModules/FindLIBCOMBINE.cmake
+++ CMakeModules/FindLIBCOMBINE.cmake
@@ -8,8 +8,10 @@
 # of Manchester.
 # All rights reserved.

-
-
+#
+#
+#
+#
 # Locate libCOMBINE
 # This module defines:
 # COMBINE_INCLUDE_DIR, where to find the headers
@@ -24,6 +26,8 @@
 # Modified by Ralph Gauges

 # message (STATUS "$ENV{COMBINE_DIR}")
+
+
 set(COMBINE_LIBRARY_NAME)
 if (UNIX)
   set(COMBINE_LIBRARY_NAME Combine-static)
@@ -32,11 +36,11 @@
 endif()

-find_package(combine CONFIG REQUIRED
-  CONFIGS Combine-config.cmake
-          Combine-static-config.cmake
-          libCombine-config.cmake
-          libCombine-static-config.cmake
+find_package(${COMBINE_LIBRARY_NAME} CONFIG QUIET)
+
+if (NOT ${COMBINE_LIBRARY_NAME}_FOUND)
+  find_package(${COMBINE_LIBRARY_NAME} CONFIG QUIET
+  CONFIGS ${COMBINE_LIBRARY_NAME}-config.cmake
   PATHS $ENV{COMBINE_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake
         ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake
         /usr/${CMAKE_INSTALL_LIBDIR}/cmake
@@ -44,13 +48,27 @@
         ${COPASI_DEPENDENCY_DIR}/lib/cmake
         /usr/lib/cmake
   )
+endif()

-set(COMBINE_FOUND ${combine_FOUND})
+if (NOT ${COMBINE_LIBRARY_NAME}_FOUND)
+  message(FATAL_ERROR "not found yet
+
+
+")
+
+endif()
+
+
+if (${COMBINE_LIBRARY_NAME}_FOUND)

 get_target_property(COMBINE_INCLUDE_DIR ${COMBINE_LIBRARY_NAME} INTERFACE_INCLUDE_DIRECTORIES)
-get_target_property(COMBINE_LIBRARY ${COMBINE_LIBRARY_NAME} IMPORTED_LOCATION_RELEASE)
+get_target_property(COMBINE_LIBRARY ${COMBINE_LIBRARY_NAME} IMPORTED_LOCATION)
 if (NOT COMBINE_LIBRARY)
 get_target_property(COMBINE_LIBRARY ${COMBINE_LIBRARY_NAME} IMPORTED_LOCATION_DEBUG)
+endif()
+
+if (NOT COMBINE_LIBRARY)
+set(COMBINE_LIBRARY)
 endif()

 get_target_property(COMBINE_INTERFACE_LINK_LIBRARIES ${COMBINE_LIBRARY_NAME} INTERFACE_LINK_LIBRARIES)
@@ -58,6 +76,65 @@
   set(COMBINE_LIBRARY ${COMBINE_LIBRARY} ${COMBINE_INTERFACE_LINK_LIBRARIES})
 endif (COMBINE_INTERFACE_LINK_LIBRARIES)

+else()
+
+
+find_path(COMBINE_INCLUDE_DIR combine/combinearchive.h
+    PATHS $ENV{COMBINE_DIR}/include
+          $ENV{COMBINE_DIR}
+          ${COPASI_DEPENDENCY_DIR}/include
+          ${COPASI_DEPENDENCY_DIR}
+          ~/Library/Frameworks
+          /Library/Frameworks
+          /sw/include        # Fink
+          /opt/local/include # MacPorts
+          /opt/csw/include   # Blastwave
+          /opt/include
+          /usr/freeware/include
+    NO_DEFAULT_PATH)
+
+if (NOT COMBINE_INCLUDE_DIR)
+    message(FATAL_ERROR "COMBINE include dir not found not found!")
+endif (NOT COMBINE_INCLUDE_DIR)
+
+if (NOT COMBINE_INCLUDE_DIR)
+    find_path(COMBINE_INCLUDE_DIR combine/combinearchive.h)
+endif (NOT COMBINE_INCLUDE_DIR)
+
+find_library(COMBINE_LIBRARY
+    NAMES ${COMBINE_LIBRARY_NAME}
+    PATHS $ENV{COMBINE_DIR}/lib
+          $ENV{COMBINE_DIR}
+          ${COPASI_DEPENDENCY_DIR}/lib
+          ${COPASI_DEPENDENCY_DIR}
+          ~/Library/Frameworks
+          /Library/Frameworks
+          /sw/lib         Fink
+          /opt/local/lib  MacPorts
+          /opt/csw/lib    Blastwave
+          /opt/lib
+          /usr/freeware/lib64
+    NO_DEFAULT_PATH)
+
+if (NOT COMBINE_LIBRARY)
+    find_library(COMBINE_LIBRARY
+        NAMES ${COMBINE_LIBRARY_NAME})
+endif (NOT COMBINE_LIBRARY)
+
+
+endif()
+
+if (NOT COMBINE_LIBRARY)
+    message(FATAL_ERROR "COMBINE library not found!")
+endif (NOT COMBINE_LIBRARY)
+
+set(COMBINE_FOUND "NO")
+if(COMBINE_LIBRARY)
+    if   (COMBINE_INCLUDE_DIR)
+        SET(COMBINE_FOUND "YES")
+    endif(COMBINE_INCLUDE_DIR)
+endif(COMBINE_LIBRARY)
+
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COMBINE REQUIRED COMBINE_INCLUDE_DIR COMBINE_LIBRARY)


chore: SET --> set

chore: SET --> set

--- CMake/GNU-ARM-Toolchain.cmake
+++ CMake/GNU-ARM-Toolchain.cmake
@@ -10,19 +10,19 @@
 set(CMAKE_OBJCOPY arm-none-eabi-objcopy)
 set(CMAKE_OBJDUMP arm-none-eabi-objdump)

-#set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

 # core flags
-SET(CORE_FLAGS "-mthumb -mcpu=cortex-m4 -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork --specs=nano.specs --specs=nosys.specs")
+set(CORE_FLAGS "-mthumb -mcpu=cortex-m4 -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork --specs=nano.specs --specs=nosys.specs")

 # compiler: language specific flags
-SET(CMAKE_C_FLAGS "${CORE_FLAGS} -fno-builtin -Wall -std=gnu99 -fdata-sections -ffunction-sections -g3 -gdwarf-2" CACHE INTERNAL "c compiler flags")
-SET(CMAKE_CXX_FLAGS "${CORE_FLAGS} -fno-rtti -fno-exceptions -fno-builtin -Wall -std=gnu++11 -fdata-sections -ffunction-sections -g -ggdb3" CACHE INTERNAL "cxx compiler flags")
+set(CMAKE_C_FLAGS "${CORE_FLAGS} -fno-builtin -Wall -std=gnu99 -fdata-sections -ffunction-sections -g3 -gdwarf-2" CACHE INTERNAL "c compiler flags")
+set(CMAKE_CXX_FLAGS "${CORE_FLAGS} -fno-rtti -fno-exceptions -fno-builtin -Wall -std=gnu++11 -fdata-sections -ffunction-sections -g -ggdb3" CACHE INTERNAL "cxx compiler flags")

-SET(CMAKE_ASM_FLAGS "${CORE_FLAGS} -g -ggdb3 -D__USES_CXX" CACHE INTERNAL "asm compiler flags")
+set(CMAKE_ASM_FLAGS "${CORE_FLAGS} -g -ggdb3 -D__USES_CXX" CACHE INTERNAL "asm compiler flags")

 # linker specific flags
-SET(CMAKE_EXE_FLAGS "${CORE_FLAGS} -g -Wl,--gc-sections")
+set(CMAKE_EXE_FLAGS "${CORE_FLAGS} -g -Wl,--gc-sections")

 # search for programs in the build host directories
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)


Disable error from default template arguments in functions

C++ allows for default template arguments in functions (since C++0x),
just like in classes. Visual Studio produces an error, however. This
change disables the error when using Visual Studio.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -89,10 +89,13 @@
 	# Enable parallel builds:
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")

-	if (SURGSIM_WARNINGS_AS_ERRORS)
+	if(SURGSIM_WARNINGS_AS_ERRORS)
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
 	endif(SURGSIM_WARNINGS_AS_ERRORS)

+	# Allow for default template arguments in function templates, permitted in C++11
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w14519 /wd4519")
+
 	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")  # is this needed?
 	set(CMAKE_DEBUG_POSTFIX "d")


remove findeigen3

remove findeigen3

--- CMakeModules/FindEIGEN3.cmake
+++ CMakeModules/FindEIGEN3.cmake
@@ -1,132 +0,0 @@
-###############################################################################
-#
-# CMake script for finding the Eigen library.
-#
-# http://eigen.tuxfamily.org/index.php?title=Main_Page
-#
-# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
-# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
-# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD
-# license.
-#
-#
-# Input variables:
-#
-# - Eigen_ROOT_DIR (optional): When specified, header files and libraries
-#   will be searched for in `${Eigen_ROOT_DIR}/include` and
-#   `${Eigen_ROOT_DIR}/libs` respectively, and the default CMake search order
-#   will be ignored. When unspecified, the default CMake search order is used.
-#   This variable can be specified either as a CMake or environment variable.
-#   If both are set, preference is given to the CMake variable.
-#   Use this variable for finding packages installed in a nonstandard location,
-#   or for enforcing that one of multiple package installations is picked up.
-#
-# Cache variables (not intended to be used in CMakeLists.txt files)
-#
-# - Eigen_INCLUDE_DIR: Absolute path to package headers.
-#
-#
-# Output variables:
-#
-# - Eigen_FOUND: Boolean that indicates if the package was found
-# - Eigen_INCLUDE_DIRS: Paths to the necessary header files
-# - Eigen_VERSION: Version of Eigen library found
-# - Eigen_DEFINITIONS: Definitions to be passed on behalf of eigen
-#
-#
-# Example usage:
-#
-#   # Passing the version means Eigen_FOUND will only be TRUE if a
-#   # version >= the provided version is found.
-#   find_package(Eigen 3.1.2)
-#   if(NOT Eigen_FOUND)
-#     # Error handling
-#   endif()
-#   ...
-#   add_definitions(${Eigen_DEFINITIONS})
-#   ...
-#   include_directories(${Eigen_INCLUDE_DIRS} ...)
-#
-###############################################################################
-
-find_package(PkgConfig)
-pkg_check_modules(PC_EIGEN eigen3)
-
-
-find_package(Eigen3 QUIET NO_MODULE PATHS ${PC_EIGEN_PREFIX}/ NO_DEFAULT_PATH)
-if (NOT EIGEN3_FOUND)
-  # Search user-installed locations first, so that we prefer user installs
-  # to system installs where both exist.
-  list(APPEND EIGEN3_CHECK_INCLUDE_DIRS
-    /usr/local/include
-    /usr/local/homebrew/include # Mac OS X
-    /opt/local/var/macports/software # Mac OS X.
-    /opt/local/include
-    /usr/include)
-  # Additional suffixes to try appending to each search path.
-  list(APPEND EIGEN3_CHECK_PATH_SUFFIXES
-    eigen3 # Default root directory for Eigen.
-    Eigen/include/eigen3 # Windows (for C:/Program Files prefix) < 3.3
-    Eigen3/include/eigen3 ) # Windows (for C:/Program Files prefix) >= 3.3
-
-  # Search supplied hint directories first if supplied.
-  find_path(EIGEN3_INCLUDE_DIR
-    NAMES Eigen/Core
-    HINTS ${EIGEN3_INCLUDE_DIR_HINTS}
-    PATHS ${EIGEN3_CHECK_INCLUDE_DIRS}
-    PATH_SUFFIXES ${EIGEN3_CHECK_PATH_SUFFIXES})
-
-  if (NOT EIGEN3_INCLUDE_DIR OR
-      NOT EXISTS ${EIGEN3_INCLUDE_DIR})
-    message(ERROR
-      "Could not find eigen3 include directory, set EIGEN_INCLUDE_DIR to "
-      "path to eigen3 include directory, e.g. /usr/local/include/eigen3.")
-  endif (NOT EIGEN3_INCLUDE_DIR OR
-    NOT EXISTS ${EIGEN3_INCLUDE_DIR})
-
-  # Mark internally as found, then verify. EIGEN_REPORT_NOT_FOUND() unsets
-  # if called.
-  set(EIGEN3_FOUND TRUE)
-endif()
-
-
-
-if (EIGEN3_INCLUDE_DIR)
-  set(EIGEN3_VERSION_FILE ${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h)
-  if (NOT EXISTS ${EIGEN3_VERSION_FILE})
-    message(ERROR
-      "Could not find file: ${EIGEN3_VERSION_FILE} "
-      "containing version information in Eigen install located at: "
-      "${EIGEN3_INCLUDE_DIR}.")
-  else (NOT EXISTS ${EIGEN3_VERSION_FILE})
-    file(READ ${EIGEN3_VERSION_FILE} EIGEN3_VERSION_FILE_CONTENTS)
-
-    string(REGEX MATCH "#define EIGEN_WORLD_VERSION [0-9]+"
-      EIGEN3_WORLD_VERSION "${EIGEN3_VERSION_FILE_CONTENTS}")
-    string(REGEX REPLACE "#define EIGEN_WORLD_VERSION ([0-9]+)" "\\1"
-      EIGEN3_WORLD_VERSION "${EIGEN3_WORLD_VERSION}")
-
-    string(REGEX MATCH "#define EIGEN_MAJOR_VERSION [0-9]+"
-      EIGEN3_MAJOR_VERSION "${EIGEN3_VERSION_FILE_CONTENTS}")
-    string(REGEX REPLACE "#define EIGEN_MAJOR_VERSION ([0-9]+)" "\\1"
-      EIGEN3_MAJOR_VERSION "${EIGEN3_MAJOR_VERSION}")
-
-    string(REGEX MATCH "#define EIGEN_MINOR_VERSION [0-9]+"
-      EIGEN3_MINOR_VERSION "${EIGEN3_VERSION_FILE_CONTENTS}")
-    string(REGEX REPLACE "#define EIGEN_MINOR_VERSION ([0-9]+)" "\\1"
-      EIGEN3_MINOR_VERSION "${EIGEN3_MINOR_VERSION}")
-
-    # This is on a single line s/t CMake does not interpret it as a list of
-    # elements and insert ';' separators which would result in 3.;2.;0 nonsense.
-    set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
-  endif (NOT EXISTS ${EIGEN3_VERSION_FILE})
-endif (EIGEN3_INCLUDE_DIR)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(EIGEN3 REQUIRED_VARS EIGEN3_INCLUDE_DIR VERSION_VAR EIGEN3_VERSION)
-
-mark_as_advanced(EIGEN3_INCLUDE_DIR EIGEN3_VERSION)
-
-
-


delete obsolete FindEigen3.cmake

delete obsolete FindEigen3.cmake

--- CMakeModules/FindEigen3.cmake
+++ CMakeModules/FindEigen3.cmake
@@ -1,107 +0,0 @@
-# - Try to find Eigen3 lib
-#
-# This module supports requiring a minimum version, e.g. you can do
-#   find_package(Eigen3 3.1.2)
-# to require version 3.1.2 or newer of Eigen3.
-#
-# Once done this will define
-#
-#  EIGEN3_FOUND - system has eigen lib with correct version
-#  EIGEN3_INCLUDE_DIR - the eigen include directory
-#  EIGEN3_VERSION - eigen version
-#
-# and the following imported target:
-#
-#  Eigen3::Eigen - The header-only Eigen library
-#
-# This module reads hints about search locations from
-# the following environment variables:
-#
-# EIGEN3_ROOT
-# EIGEN3_ROOT_DIR
-
-# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
-# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
-# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-
-if(NOT Eigen3_FIND_VERSION)
-  if(NOT Eigen3_FIND_VERSION_MAJOR)
-    set(Eigen3_FIND_VERSION_MAJOR 2)
-  endif(NOT Eigen3_FIND_VERSION_MAJOR)
-  if(NOT Eigen3_FIND_VERSION_MINOR)
-    set(Eigen3_FIND_VERSION_MINOR 91)
-  endif(NOT Eigen3_FIND_VERSION_MINOR)
-  if(NOT Eigen3_FIND_VERSION_PATCH)
-    set(Eigen3_FIND_VERSION_PATCH 0)
-  endif(NOT Eigen3_FIND_VERSION_PATCH)
-
-  set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
-endif(NOT Eigen3_FIND_VERSION)
-
-macro(_eigen3_check_version)
-  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
-
-  string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
-  set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
-
-  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
-  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK FALSE)
-  else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK TRUE)
-  endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-
-  if(NOT EIGEN3_VERSION_OK)
-
-    message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
-                   "but at least version ${Eigen3_FIND_VERSION} is required")
-  endif(NOT EIGEN3_VERSION_OK)
-endmacro(_eigen3_check_version)
-
-if (EIGEN3_INCLUDE_DIR)
-
-  # in cache already
-  _eigen3_check_version()
-  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
-  set(Eigen3_FOUND ${EIGEN3_VERSION_OK})
-
-else (EIGEN3_INCLUDE_DIR)
-
-  # search first if an Eigen3Config.cmake is available in the system,
-  # if successful this would set EIGEN3_INCLUDE_DIR and the rest of
-  # the script will work as usual
-  find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
-
-  if(NOT EIGEN3_INCLUDE_DIR)
-    find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
-        HINTS
-        ENV EIGEN3_ROOT
-        ENV EIGEN3_ROOT_DIR
-        PATHS
-        ${CMAKE_INSTALL_PREFIX}/include
-        ${KDE4_INCLUDE_DIR}
-        PATH_SUFFIXES eigen3 eigen
-      )
-  endif(NOT EIGEN3_INCLUDE_DIR)
-
-  if(EIGEN3_INCLUDE_DIR)
-    _eigen3_check_version()
-  endif(EIGEN3_INCLUDE_DIR)
-
-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
-
-  mark_as_advanced(EIGEN3_INCLUDE_DIR)
-
-endif(EIGEN3_INCLUDE_DIR)
-
-if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
-  add_library(Eigen3::Eigen INTERFACE IMPORTED)
-  set_target_properties(Eigen3::Eigen PROPERTIES
-    INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}")
-endif()


reset OGRE_FRAMEWORK_INCLUDES if NOTFOUND. It avoids having a NOTFOUND in OGRE_INCLUDE_DIR that breaks some build systems

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -240,6 +240,9 @@
   set(OGRE_LIBRARY "NOTFOUND")
 endif ()

+if(${OGRE_FRAMEWORK_INCLUDES} STREQUAL NOTFOUND)
+  unset(OGRE_FRAMEWORK_INCLUDES CACHE)
+endif()
 set(OGRE_INCLUDE_DIR ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INCLUDE_DIR} ${OGRE_FRAMEWORK_INCLUDES})
 list(REMOVE_DUPLICATES OGRE_INCLUDE_DIR)
 findpkg_finish(OGRE)


Add threading library's include directory to Ogre include directories in FindOGRE.cmake

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -285,6 +285,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${Boost_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
       endif ()
     elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 2)
       find_package(POCO QUIET)
@@ -292,6 +293,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${POCO_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${POCO_INCLUDE_DIRS})
       endif ()
     elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 3)
       find_package(TBB QUIET)
@@ -299,6 +301,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${TBB_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
       endif ()
     endif ()
   endif ()


COMP: Merge branch 'bug-13543-viewport-last-final'

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 6af89bce)
+  set(revision_tag 65aaf5ca)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


change error to warning in python module version check

--- CMakeModules/FindPython.cmake
+++ CMakeModules/FindPython.cmake
@@ -157,7 +157,7 @@
                     set(PY_${module_upper}_VERSION ${_version} CACHE STRING
                         "Version of Python module ${module}")
                 else()
-                    message(SEND_ERROR "Module '${module}' version ${_version} found, but minimum version ${_minversion} required.")
+                    message(WARNING "Module '${module}' version ${_version} found, but minimum version ${_minversion} required.")
                 endif()
             endif(NOT _status)
         endif (_minversion STREQUAL "")


Remove the deprecated PYTHON_INCLUDE_PATH variable.

This variable has been deprecated for years and its presence can
lead to extreme frustration.  If it is set in the cache, then it
is used as the PYTHON_INCLUDE_DIR.  That means that if someone
removes PYTHON_INCLUDE_DIR from their cache (e.g. while trying to
debug their build), then cmake will set PYTHON_INCLUDE_DIR from
the internally cached PYTHON_INCLUDE_PATH instead of searching the
system for Python.h like it should.

Also fix the variable names in the documentation for this macro,
which were different from the names of the variables that were actually
used.

Change-Id: I55d54b9d05085118c97a2e1d417e8e6b31289f8a

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -4,10 +4,9 @@
 # the library is. This code sets the following variables:
 #
 #  PYTHONLIBS_FOUND           - have the Python libs been found
-#  PYTHON_LIBRARIES           - path to the python library
-#  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
-#  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
-#  PYTHON_DEBUG_LIBRARIES     - path to the debug library
+#  PYTHON_LIBRARY             - path to the python library
+#  PYTHON_INCLUDE_DIR         - path to where Python.h is found
+#  PYTHON_DEBUG_LIBRARY       - path to the debug library
 #  PYTHON_VERSION             - python version string e.g. 2.7.1
 #  PYTHON_MAJOR_VERSION       - python major version number
 #  PYTHON_MINOR_VERSION       - python minor version number
@@ -70,13 +69,6 @@
     PATH_SUFFIXES python${_CURRENT_VERSION}/config
   )

-  # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
-  # PYTHON_INCLUDE_DIR is not set.
-  IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
-    SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
-      "Path to where Python.h is found" FORCE)
-  ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
-
   # Only look for include directory if library was found, this ensures
   # that version will be matched between include dir and library
   IF(PYTHON_LIBRARY)
@@ -104,10 +96,6 @@
         python${_CURRENT_VERSION}
     )
   ENDIF(PYTHON_LIBRARY)
-
-  # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
-  SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
-    "Path to where Python.h is found (deprecated)")

 ENDFOREACH(_CURRENT_VERSION)


Enable CMP0067, and warn if needed and not available

--- CMake/sitkCheckCXX11.cmake
+++ CMake/sitkCheckCXX11.cmake
@@ -14,6 +14,16 @@
 # SITK_HAS_TR1_FUNCTIONAL
 # SITK_HAS_TR1_TYPE_TRAITS
 # SITK_HAS_TR1_UNORDERED_MAP
+
+if(POLICY CMP0067) # CMake 3.8.2
+  cmake_policy(SET CMP0067 NEW)
+elseif( DEFINED CMAKE_CXX_STANDARD
+  OR DEFINED CMAKE_CXX_STANDARD_REQUIRED
+  OR CMAKE_CXX_EXTENSIONS )
+message(WARNING "CXX standard variables are not properly supported by \
+  CMake ${CMAKE_VERSION}. Configuration compilations will not detect \
+  features properly!")
+endif()

 #
 # Function to wrap try compiles on the aggregate cxx test file1


Updated Boost version to 1.55

Updated Boost version to 1.55

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -97,8 +97,8 @@
       # Boost needs in-source builds
       BINARY_DIR ${proj}-src
       PREFIX ${proj}-cmake
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_54_0.tar.bz2
-      URL_MD5 15cb8c0803064faef0c4ddf5bc5ca279
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_55_0.tar.bz2
+      URL_MD5 d6eef4b4cacb2183f2bf265a5a03a354
       INSTALL_DIR ${proj}-install
       CONFIGURE_COMMAND "${_boost_cfg_cmd}"
       BUILD_COMMAND "${_boost_build_cmd}"


Upgraded to newer DCMTK commit to avoid mktemp warning introduced by using DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -19,12 +19,11 @@
   SET(DCMTK_DEPENDS ${proj})

   IF(NOT DEFINED DCMTK_DIR)
-
-    SET(revision_tag 09db15ff595da6c353)
+    SET(revision_tag 085525e643cab5ac82)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()
-
+
 #     MESSAGE(STATUS "Adding project:${proj}")
     # Set CMake OSX variable to pass down the external project
     set(CMAKE_OSX_EXTERNAL_PROJECT_ARGS)
@@ -34,7 +33,6 @@
         -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
         -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
     endif()
-
     ExternalProject_Add(${proj}
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
       BINARY_DIR ${proj}-build


update find ibl

update find ibl

--- CMakeModules/FindIbl.cmake
+++ CMakeModules/FindIbl.cmake
@@ -8,9 +8,10 @@
 # IBL_LIBRARY
 #

-FIND_PATH( IBL_INCLUDE_DIR ibl/tools.hpp
+FIND_PATH( IBL_INCLUDE_DIR ibl/base/ImplicitBase.hpp
         ${CMAKE_SOURCE_DIR}/3rdPartyLibraries/ibl
         ${CMAKE_SOURCE_DIR}/../Radium-Engine-Plugins/ibl/include
+        ${CMAKE_SOURCE_DIR}/../Radium-Engine-Plugins/ibl/
         DOC "The ibl include directory")

 FIND_LIBRARY( IBL_LIBRARY


Add current List directory so that BackwardMacros.cmake correctly includes the directory

--- BackwardMacros.cmake
+++ BackwardMacros.cmake
@@ -111,7 +111,7 @@
 	message(STATUS "${def}")
 endforeach()

-LIST(APPEND BACKWARD_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
+LIST(APPEND BACKWARD_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR})

 macro(add_backward target)
 	target_include_directories(${target} PRIVATE ${BACKWARD_INCLUDE_DIRS})


SVN_SILENT made messages (.desktop file)

--- vlc/vlc.desktop.cmake
+++ vlc/vlc.desktop.cmake
@@ -14,6 +14,7 @@
 Name[ca@valencia]=VLC
 Name[cs]=VLC
 Name[da]=VLC
+Name[de]=VLC
 Name[es]=VLC
 Name[et]=VLC
 Name[hu]=VLC
@@ -35,6 +36,7 @@
 Comment[ca@valencia]=Dorsal del VLC pel Phonon
 Comment[cs]=Podpůrná vrstva VLC
 Comment[da]=Phonon VLC-motor
+Comment[de]=Phonon-Treiber für VLC
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
 Comment[hu]=Phonon VLC-backend


ERR: allow builds for Cocoa and Carbon

ERR: allow builds for Cocoa and Carbon

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -119,10 +119,13 @@

 IF(APPLE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
-  SET(CMAKE_CXX_SHLIB_LINK_FLAGS "${CMAKE_CXX_SHLIB_LINK_FLAGS} -multiply_defined suppress -framework Carbon")
   IF (VTK_USE_CARBON)
+    SET(CMAKE_CXX_SHLIB_LINK_FLAGS "${CMAKE_CXX_SHLIB_LINK_FLAGS} -multiply_defined suppress -framework Carbon")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpascal-strings")
   ENDIF (VTK_USE_CARBON)
+  IF (VTK_USE_COCOA)
+    SET(CMAKE_CXX_SHLIB_LINK_FLAGS "${CMAKE_CXX_SHLIB_LINK_FLAGS} -multiply_defined suppress -framework Cocoa")
+  ENDIF (VTK_USE_COCOA)
 ENDIF(APPLE)

 IF(CMAKE_COMPILER_IS_GNUCXX)


Add comment about disabling round robin packing.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -23,6 +23,8 @@
       --place_algorithm bounding_box
       --enable_timing_computations off
       --allow_unrelated_clustering on
+      # TODO: Consider removing round robin packing once tile split and
+      # equivilant tiles are in.
       --round_robin_prepacking on
     RR_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_routing_import.py


disable uavcan build to make space for other modules

--- cmake/configs/nuttx_px4fmu-v2_test.cmake
+++ cmake/configs/nuttx_px4fmu-v2_test.cmake
@@ -96,7 +96,7 @@
 	modules/navigator
 	modules/mavlink
 	#modules/gpio_led
-	modules/uavcan
+	#modules/uavcan
 	modules/land_detector

 	#
@@ -198,10 +198,10 @@
 	px4io-v2
 	)

-set(config_extra_libs
-	uavcan
-	uavcan_stm32_driver
-	)
+#set(config_extra_libs
+#	uavcan
+#	uavcan_stm32_driver
+#	)

 set(config_io_extra_libs
 	)


Use C rather than C++ to check prototypes.  I can see nothing in that test
code that requires a C++ compiler (at least for the headers we are checking),
and the cmake results seem fine with this change to C.  C is much more
convenient from the build-system perspective since this removes the
absolute requirement of having a C++ compiler in order to build PLplot.

svn path=/trunk/; revision=10148

--- cmake/modules/CheckPrototypeExists.cmake
+++ cmake/modules/CheckPrototypeExists.cmake
@@ -10,7 +10,8 @@
 #  VARIABLE - variable to store the result
 #

-INCLUDE(CheckCXXSourceCompiles)
+# AWI further change from C++ to C since that is the core PLplot language.
+INCLUDE(CheckCSourceCompiles)

 MACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
    SET(_INCLUDE_FILES)
@@ -33,6 +34,6 @@
   return 0;
 }
 ")
-   CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
+   CHECK_C_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
 ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)


SuperBuild: pipe build logs to file (libsvm)

--- SuperBuild/CMake/External_libsvm.cmake
+++ SuperBuild/CMake/External_libsvm.cmake
@@ -35,6 +35,9 @@
   PATCH_COMMAND ${CMAKE_COMMAND} -E copy
   ${CMAKE_SOURCE_DIR}/patches/LIBSVM/CMakeLists.txt
   ${LIBSVM_SB_SRC}
+  LOG_CONFIGURE 1
+  LOG_BUILD 1
+  LOG_INSTALL 1
   )

 set(_SB_LIBSVM_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)


FogBugz #10429: Update cmake files across sub-projects

--- common.cmake
+++ common.cmake
@@ -51,8 +51,8 @@

 include_directories( include  )

-file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp")
-file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" )
+file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
+file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")

 add_library (${PROJECT} ${PROJECT_SRC} ${PROJECT_INCLUDES})


ENH: Build Applications

ENH: Build Applications

--- Mountain_Aylward_TubeTK.cmake
+++ Mountain_Aylward_TubeTK.cmake
@@ -150,6 +150,9 @@
 # If build testing is on, some test data will download during building, and
 #   some will download during testing.
 set( BUILD_TESTING ON )
+
+# If build applications is on, the applications will be built
+set( TubeTK_BUILD_APPLICATIONS ON )

 # Tests are run in a python virtual environment, if this variable on
 set( BUILD_TESTING_VIRTUAL_ENV ON )


general cleanup

general cleanup

--- share/hugh/cmake/compiler/msvc.cmake
+++ share/hugh/cmake/compiler/msvc.cmake
@@ -14,27 +14,33 @@
 #list(APPEND DISABLED_WARNINGS "/wd4068")

 # nonstandard extension used : nameless struct/union
-list(APPEND DISABLED_WARNINGS "/wd4201")
+#list(APPEND DISABLED_WARNINGS "/wd4201")

 if("SHARED" STREQUAL "${CMAKE_LIBRARY_TYPE}")
   # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
   #list(APPEND DISABLED_WARNINGS "/wd4251")
 endif()

+# cast truncates constant value
+#list(APPEND DISABLED_WARNINGS "/wd4310")
+
 # new behavior: elements of array '*' will be default initialized
 #list(APPEND DISABLED_WARNINGS "/wd4351")
+
+# declaration of '*' hides global declaration
+list(APPEND DISABLED_WARNINGS "/wd4459")

 # 'identifier': unreferenced local function has been removed
 #list(APPEND DISABLED_WARNINGS "/wd4505")

 # assignment operator could not be generated
-list(APPEND DISABLED_WARNINGS "/wd4512")
+#list(APPEND DISABLED_WARNINGS "/wd4512")

 # default template arguments are only allowed on a class template
 #list(APPEND DISABLED_WARNINGS "/wd4519")

 # unreachable code (somewhere in boost)
-#list(APPEND DISABLED_WARNINGS "/wd4702")
+list(APPEND DISABLED_WARNINGS "/wd4702")

 string(REGEX REPLACE ";" " " DISABLED_WARNINGS "${DISABLED_WARNINGS}") # ";" -> " "

@@ -49,17 +55,33 @@

 # avoid pulling all of windows.h
 add_definitions("-DWIN32_LEAN_AND_MEAN")
-# http://stackoverflow.com/questions/5004858/stdmin-gives-error
+
+# see [http://stackoverflow.com/questions/5004858]
 add_definitions("-DNOMINMAX")
+
 # get rid of (stupid/obfuscated) security warnings
 #add_definitions("-D_CRT_SECURE_NO_DEPRECATE")
-#add_definitions("-D_CRT_SECURE_NO_WARNINGS")
+add_definitions("-D_CRT_SECURE_NO_WARNINGS")
 #add_definitions("-D_CRT_NONSTDC_NO_DEPRECATE")
 #add_definitions("-D_SCL_SECURE_NO_WARNINGS")
 #add_definitions("-D_SCL_SECURE_NO_DEPRECATE")
 #add_definitions("-D_SECURE_SCL=0")
+
 # doesn't work with default boost-library selection
 # add_definitions("-D_HAS_ITERATOR_DEBUGGING=0")

 # D3D11
 add_definitions("-DD3D11_NO_HELPERS") # see ${WindowsSDK_ROOT_DIR}\Include\um\d3d11.idl
+
+# avoid MSB8029; see [http://stackoverflow.com/questions/34744098]
+# and yes, trial and error indicates that both TEMP and TMP have to be set!
+if ("x" STREQUAL "x$ENV{TEMP}" OR "x" STREQUAL "x$ENV{TMP}")
+  set(TMPDIR "${CMAKE_BINARY_DIR}/tmp.msvc")
+
+  if(NOT EXISTS ${TMPDIR})
+    file(MAKE_DIRECTORY ${TMPDIR})
+  endif()
+
+  set(ENV{TEMP} ${TMPDIR})
+  set(ENV{TMP}  ${TMPDIR})
+endif()


From Torben Dannhauer, update to reflect addition of NVTT to Windows 3rdPartyPackage

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -92,6 +92,8 @@
             SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "" FORCE)
             SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
         ENDIF(LIBXML2_FOUND)
+        #FIND_DEPENDENCY(DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX EXSUFFIX)
+        FIND_Package(NVTT)
 #luigi#INCLUDE(FindOSGDepends.cmake)
 ENDMACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)

@@ -104,10 +106,25 @@

 OPTION(USE_3DPARTY_BIN "Set to ON to use Mike prebuilt dependencies situated side of OpenSceneGraph source.  Use OFF for avoiding." ON)
 IF(USE_3DPARTY_BIN)
+
+    # Check Architecture
+    IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+        MESSAGE( STATUS "32 bit architecture detected" )
+        SET(DESTINATION_ARCH "x86")
+    ENDIF()
+    IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+        MESSAGE( STATUS "64 bit architecture detected" )
+        SET(DESTINATION_ARCH "x64")
+    ENDIF()
+
     GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)
     SET(TEST_3DPARTY_DIR "${PARENT_DIR}/3rdparty")
     IF(NOT EXISTS ${TEST_3DPARTY_DIR})
-        IF(MSVC71)
+        SET(3RDPARTY_DIR_BY_ENV $ENV{OSG_3RDPARTY_DIR})
+        IF(3RDPARTY_DIR_BY_ENV)
+            MESSAGE( STATUS "3rdParty-Package ENV variable found:${3RDPARTY_DIR_BY_ENV}/${DESTINATION_ARCH}" )
+            SET(TEST_3DPARTY_DIR "${3RDPARTY_DIR_BY_ENV}/${DESTINATION_ARCH}")
+        ELSEIF(MSVC71)
             SET(TEST_3DPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs71")
         ELSEIF(MSVC80)
             SET(TEST_3DPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs80sp1")
@@ -117,6 +134,7 @@
     ENDIF(NOT EXISTS ${TEST_3DPARTY_DIR})
     SET(ACTUAL_3DPARTY_DIR "${TEST_3DPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
     IF(EXISTS ${ACTUAL_3DPARTY_DIR})
+        SET (3rdPartyRoot ${ACTUAL_3DPARTY_DIR})
         SEARCH_3RDPARTY(${ACTUAL_3DPARTY_DIR})
     ENDIF(EXISTS ${ACTUAL_3DPARTY_DIR})
 ENDIF(USE_3DPARTY_BIN)


cmake: removed debug statements

cmake: removed debug statements

--- CMakeModules/hgscript.cmake
+++ CMakeModules/hgscript.cmake
@@ -9,8 +9,6 @@
 endif(MERCURIAL_FOUND)
 file(READ ${INPUT} CONTENT)
 string(REGEX REPLACE "#CSG_HG_ID#" "${THIS_HG_ID}" NEW_CONTENT "${CONTENT}")
-string(REGEX MATCH "Copyright.*License" XXX "${CONTENT}")
-message("hallo ${XXX}")
 file(WRITE "${OUTPUT}.tmp" "${NEW_CONTENT}")
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OUTPUT}.tmp ${OUTPUT})
 execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${OUTPUT}.tmp)


[FIX,INTERNAL] Fixing too verbose message in build system.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13984 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -455,7 +455,6 @@
         get_filename_component (BIN_NAME "${BIN_NAME}" NAME_WE)

         get_filename_component (FILE_NAME "${ENTRY}" NAME)
-        message (STATUS "FILE_NAME ${FILE_NAME}")
         if (NOT "${FILE_NAME}" MATCHES "^\\.")
             add_executable(${PREFIX}${BIN_NAME} ${ENTRY})
             target_link_libraries (${PREFIX}${BIN_NAME} ${SEQAN_LIBRARIES})


ADD: added vtkPointSetSlicer

ADD: added vtkPointSetSlicer

--- Core/Algorithms/files.cmake
+++ Core/Algorithms/files.cmake
@@ -55,4 +55,5 @@
   mitkUnstructuredGridHistogram.cpp
   mitkUnstructuredGridSource.cpp
   mitkVolumeCalculator.cpp
+  vtkPointSetSlicer.cxx
 )


Fixed cmake build

Fixed cmake build

--- src/cmake/core.cmake
+++ src/cmake/core.cmake
@@ -43,6 +43,7 @@
   core/basetypes/MCSet.cc
   core/basetypes/MCString.cc
   core/basetypes/MCValue.cc
+  core/basetypes/ConvertUTF.c
   ${basetypes_files_apple}
 )


cmake(xcode): Fix compilation

cmake(xcode): Fix compilation

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -117,6 +117,13 @@

 # Main Target
 add_library(${PROJECT_NAME} "")
+# Xcode fails to build if library doesn't contains at least one source file.
+if(XCODE)
+	file(GENERATE
+		OUTPUT ${PROJECT_BINARY_DIR}/${PROJECT_NAME}/version.cpp
+		CONTENT "namespace {char* version = \"${PROJECT_VERSION}\";}")
+	target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}/version.cpp)
+endif()

 list(APPEND OR_TOOLS_COMPILE_DEFINITIONS
   "USE_BOP" # enable BOP support


ENH: VTK version update to v7.0.0

ENH: VTK version update to v7.0.0

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -26,26 +26,26 @@

 #Setting VTK_VERSION_MAJOR to its default value if it has not been set before
-set(VTK_VERSION_MAJOR 5 CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6).")
-# Set the possible values of VTK major version for cmake-gui
-set_property(CACHE VTK_VERSION_MAJOR PROPERTY STRINGS "5" "6")
-if(NOT "${VTK_VERSION_MAJOR}" STREQUAL "5" AND NOT "${VTK_VERSION_MAJOR}" STREQUAL "6")
-  set(VTK_VERSION_MAJOR 5 CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6)." FORCE)
-  message(WARNING "Setting VTK_VERSION_MAJOR to '5' as an valid value was specified.")
-endif()
-
-set(USE_VTKv5 ON)
-set(USE_VTKv6 OFF)
-if(${VTK_VERSION_MAJOR} STREQUAL "6")
-  set(USE_VTKv5 OFF)
-  set(USE_VTKv6 ON)
-endif()
-
-if(USE_VTKv6)
-  set(${extProjName}_REQUIRED_VERSION "6.1")  #If a required version is necessary, then set this, else leave blank
-else()
-  set(${extProjName}_REQUIRED_VERSION "5.10")  #If a required version is necessary, then set this, else leave blank
-endif()
+# set(VTK_VERSION_MAJOR 5 CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6).")
+# # Set the possible values of VTK major version for cmake-gui
+# set_property(CACHE VTK_VERSION_MAJOR PROPERTY STRINGS "5" "6")
+# if(NOT "${VTK_VERSION_MAJOR}" STREQUAL "5" AND NOT "${VTK_VERSION_MAJOR}" STREQUAL "6")
+#   set(VTK_VERSION_MAJOR 5 CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6)." FORCE)
+#   message(WARNING "Setting VTK_VERSION_MAJOR to '5' as an valid value was specified.")
+# endif()
+
+# set(USE_VTKv5 ON)
+# set(USE_VTKv6 OFF)
+# if(${VTK_VERSION_MAJOR} STREQUAL "6")
+#   set(USE_VTKv5 OFF)
+#   set(USE_VTKv6 ON)
+# endif()
+
+# if(USE_VTKv6)
+#   set(${extProjName}_REQUIRED_VERSION "6.1")  #If a required version is necessary, then set this, else leave blank
+# else()
+#   set(${extProjName}_REQUIRED_VERSION "5.10")  #If a required version is necessary, then set this, else leave blank
+# endif()

 # Sanity checks
 #if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
@@ -96,13 +96,13 @@

   set(VTK_QT_ARGS)
   if(${PRIMARY_PROJECT_NAME}_USE_QT)
-    if(USE_VTKv6)
+    # if(USE_VTKv6)
       set(VTK_QT_ARGS
         -DModule_vtkGUISupportQt:BOOL=ON
         )
-    else()
-      set(VTK_QT_ARGS)
-    endif()
+    # else()
+    #   set(VTK_QT_ARGS)
+    # endif()
     if(NOT APPLE)
       list(APPEND VTK_QT_ARGS
         #-DDESIRED_QT_VERSION:STRING=4 # Unused
@@ -190,13 +190,13 @@
       ${VTK_MAC_ARGS}
     )
   ### --- End Project specific additions
-if(USE_VTKv6)
-  set(${proj}_GIT_TAG "v6.1.0")
+  # if(USE_VTKv6)
+  set(${proj}_GIT_TAG "v7.0.0")
   set(${proj}_REPOSITORY ${git_protocol}://vtk.org/VTK.git)
-else()
-  set(${proj}_REPOSITORY ${git_protocol}://github.com/BRAINSia/VTK.git)
-  set(${proj}_GIT_TAG "FixClangFailure_VTK5.10_release")
-endif()
+  # else()
+  #   set(${proj}_REPOSITORY ${git_protocol}://github.com/BRAINSia/VTK.git)
+  #   set(${proj}_GIT_TAG "FixClangFailure_VTK5.10_release")
+  # endif()
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -219,26 +219,28 @@
     )

-  set(VTKPatchScript ${CMAKE_CURRENT_LIST_DIR}/External_VTK_patch.cmake)
-  ExternalProject_Add_Step(${proj} VTKPatch
-    COMMENT "get rid of obsolete C/CXX flags"
-    DEPENDEES download
-    DEPENDERS configure
-    COMMAND ${CMAKE_COMMAND}
-    -DVTKSource=<SOURCE_DIR>
-    -DUSE_VTKv6=${USE_VTKv6}
-    -P ${VTKPatchScript}
-    )
-
-if(USE_VTKv6)
-  set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-6.1)
-else()
-  set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-5.10)
-endif()
+  # set(VTKPatchScript ${CMAKE_CURRENT_LIST_DIR}/External_VTK_patch.cmake)
+  # ExternalProject_Add_Step(${proj} VTKPatch
+  #   COMMENT "get rid of obsolete C/CXX flags"
+  #   DEPENDEES download
+  #   DEPENDERS configure
+  #   COMMAND ${CMAKE_COMMAND}
+  #   -DVTKSource=<SOURCE_DIR>
+  #   -DUSE_VTKv6=${USE_VTKv6}
+  #   -P ${VTKPatchScript}
+  #   )
+
+# if(USE_VTKv6)
+#   set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-6.1)
+# else()
+#   set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-5.10)
+# endif()
+
+set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-7.0)

 else()
   if(${USE_SYSTEM_${extProjName}})
-    message("USING the system ${extProjName}, set ${extProjName}_DIR=${${extProjName}_DIR}, USE_VTKv6=${USE_VTKv6}, VTK_VERSION_MAJOR=${VTK_VERSION_MAJOR}")
+    message("USING the system ${extProjName}, set ${extProjName}_DIR=${${extProjName}_DIR}")
     find_package(${extProjName} REQUIRED)
   endif()
   # The project is provided using ${extProjName}_DIR, nevertheless since other


FindVOTCA_TOOLS.cmake: fixed some typos

FindVOTCA_TOOLS.cmake: fixed some typos

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -1,5 +1,5 @@
-# - Find libgmx
-# Find the native libgmx headers and libraries.
+# - Find libvotca_tools
+# Find the native libvotca_tools headers and libraries.
 #
 #  VOTCA_TOOLS_INCLUDE_DIRS - where to find votca/tools/version.h, etc.
 #  VOTCA_TOOLS_LIBRARIES    - List of libraries when using expat.


Added mingw support. (7)

Added mingw support. (7)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -71,7 +71,8 @@
             if($ENV{CC} STREQUAL "x86_64-w64-mingw32-gcc" )
                 set(CC_ARCH "x86_64")
             elseif($ENV{CC} STREQUAL "i686-w64-mingw32-gcc")
-                set(CC_ARCH "x86")            endif()
+                set(CC_ARCH "x86")
+            endif()
             #Warmup wine or test timings are going to be wrong
             exec_program(wine ARGS version OUTPUT_VARIABLE WINE_VERSION)
         endif()


include android support as system headers to silent useless warnings

--- build/toolchains/android.toolchain.cmake
+++ build/toolchains/android.toolchain.cmake
@@ -1129,7 +1129,7 @@
   set( ANDROID_STL_INCLUDE_DIRS     "${ANDROID_LLVM_ROOT}/libcxx/include"
                                     "${ANDROID_ABI_INCLUDE_DIRS}" )
   # android support sfiles
-  include_directories (${ANDROID_NDK}/sources/android/support/include )
+  include_directories ( SYSTEM ${ANDROID_NDK}/sources/android/support/include )
   if( EXISTS "${ANDROID_LLVM_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/libc++_shared.so" )
   	set( __libstl 				"${ANDROID_LLVM_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/libc++_shared.so" )
   else()


ManageRelease: Update comment

ManageRelease: Update comment

--- Modules/ManageRelease.cmake
+++ Modules/ManageRelease.cmake
@@ -11,12 +11,12 @@
 #      do not have to get the irrelevant dependencies.
 #      For the "hard" dependency, use cmake command "ADD_DEPENDENCIES".
 #      * Parameters:
-#        - releaseTarget ...: Targets to be executed before a release.
+#        + releaseTarget ...: Targets to be executed before a release.
 #          Note that sequence of the targets does not guarantee the
 #          sequence of execution.
-#        - DEPENDS dependFile ...: Files that target "release" depends on.
+#        + DEPENDS dependFile ...: Files that target "release" depends on.
 #      * Defines following targets:
-#        - release: Perform everything required for a release.
+#        + release: Perform everything required for a release.
 #

 IF(DEFINED _MANAGE_RELEASE_CMAKE_)


adress #1329 -flips off direc6tx sound by default

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -58,12 +58,8 @@
 mark_as_advanced(TORQUE_ADVANCED_LIGHTING)
 option(TORQUE_BASIC_LIGHTING "Basic Lighting" ON)
 mark_as_advanced(TORQUE_BASIC_LIGHTING)
-if(WIN32)
-	option(TORQUE_SFX_DirectX "DirectX Sound" ON)
-	mark_as_advanced(TORQUE_SFX_DirectX)
-else()
-	set(TORQUE_SFX_DirectX OFF)
-endif()
+option(TORQUE_SFX_DirectX "DirectX Sound" OFF)
+mark_as_advanced(TORQUE_SFX_DirectX)
 option(TORQUE_SFX_OPENAL "OpenAL Sound" ON)
 #windows uses openal-soft
 if(WIN32)


[UPD] FindMatlab detects now the difference between 32btis and 64bits processors and adapt the MEX extension.

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@236 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindMatlab.cmake
+++ CMake/FindMatlab.cmake
@@ -66,7 +66,11 @@
     IF(MATLAB_OLD_WIN_MEXFILE_EXT)
       SET(MATLAB_MEXFILE_EXT dll)
     ELSE(MATLAB_OLD_WIN_MEXFILE_EXT)
-      SET(MATLAB_MEXFILE_EXT mexw32)
+      IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+        SET(MATLAB_MEXFILE_EXT mexw32)
+      ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
+        SET(MATLAB_MEXFILE_EXT mexw64)
+      ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
     ENDIF (MATLAB_OLD_WIN_MEXFILE_EXT)
   ELSE(CMAKE_CXX_COMPILER MATCHES "^.*cl.exe$" OR CMAKE_CXX_COMPILER MATCHES "^.*cl$")
     MESSAGE(FATAL_ERROR "Matlab Mex files are only supported by MS Visual Studio")
@@ -80,11 +84,11 @@
 ELSE(WIN32)
   # MEX files extension
   IF(APPLE)
-    IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+    IF(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
       SET(MATLAB_MEXFILE_EXT mexmaci)
-    ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+    ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
       SET(MATLAB_MEXFILE_EXT mexmac)
-    ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+    ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
     SET(LIBMEX "libmex.dylib")
     SET(LIBMX "libmx.dylib")
     SET(LIBENG "libeng.dylib")


Update windows flags for Qt 4.8.6 (assumes msvc 2012 for now)

--- Superbuild/Projects/win32/qt.cmake
+++ Superbuild/Projects/win32/qt.cmake
@@ -1,3 +1,7 @@
+set(compiler_platform win32-msvc2012)
+if (false)
+  set(compiler_platform win32-g++)
+endif()
 # fix the zdll.lib issue (qt wants the library to be named differently hence
 # skipping using our zlib on windows. Let qt build its own zlib.)
 add_external_project_or_use_system(
@@ -22,6 +26,8 @@
                     -qt-libjpeg
                     -qt-libtiff
                     #-webkit
+                    -no-webkit
+                    -platform ${compiler_platform}
                     -xmlpatterns
                     -I <INSTALL_DIR>/include
                     -L <INSTALL_DIR>/lib


On release 0.4.9994

On release 0.4.9994

--- Modules/ManageSourceVersionControl.cmake
+++ Modules/ManageSourceVersionControl.cmake
@@ -61,8 +61,9 @@
 	    "fi")

 	ADD_CUSTOM_TARGET(force_commit
-	    COMMAND ${_force_commit_cmd}
+	    COMMAND eval "${_force_commit_cmd}"
 	    COMMENT "Force commit uncommitted changes"
+	    VERBATIM
 	    )

 	ADD_CUSTOM_TARGET(tag


STYLE: Remove custom environmental override for WikiExamples

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -1,16 +1,8 @@
 #
 # ITK WikiExamples
 #
-
-# If the environment var WikiExamplesTag exists, use it
-if (NOT DEFINED ENV{WikiExamplesTag})
-  set(GIT_TAG 07f0e1622ca3eeed8b9c5b9665b066b785af86e8)
-else()
-  set(GIT_TAG $ENV{WikiExamplesTag})
-endif()
-
 itk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use ITK."
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
-  GIT_TAG ${GIT_TAG}
+  GIT_TAG 07f0e1622ca3eeed8b9c5b9665b066b785af86e8
   )


Change to build on Mac OS X 10.10 (Yosemite).

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -19,7 +19,7 @@
 # OS pre mods
 if(${OS_NAME} STREQUAL "DARWIN")
   exec_program (sw_vers ARGS -productVersion OUTPUT_VARIABLE TEST_VER)
-  if(${TEST_VER} MATCHES "10.[6789]" AND ${SYS_ARCH} MATCHES "I386")
+  if(${TEST_VER} MATCHES "10.([6789]|10)" AND ${SYS_ARCH} MATCHES "I386")
 	set (SYS_ARCH "X86_64")
   endif()
 elseif(${OS_NAME} MATCHES "WIN")


Displaying correct variable in warning message.

--- cmake/FindJSDoc.cmake
+++ cmake/FindJSDoc.cmake
@@ -25,7 +25,7 @@
             ERROR_QUIET)

         if(NOT ${success} EQUAL 0)
-            string(REPLACE ";" " " cmdline "${JSDoc_EXECUTABLE}")
+            string(REPLACE ";" " " cmdline "${JSDoc_TEST_EXECUTABLE}")
             message(WARNING "Could not determine invocation for JSDoc (tried \"${cmdline}\") - please edit JSDoc_EXECUTABLE by hand or set JSDoc_PATH to the location you extracted the jsdoc zip file.")
         else()
             set(JSDoc_EXECUTABLE ${JSDoc_TEST_EXECUTABLE} CACHE FILE "jsdoc executable" FORCE)


Apply libc++ MinGW CMake fix to libc++abi

git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@302754 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -27,6 +27,11 @@
   elseif (LIBCXXABI_HAS_GCC_S_LIB)
     list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
   endif ()
+  if (MINGW)
+    # Mingw64 requires quite a few "C" runtime libraries in order for basic
+    # programs to link successfully with -nodefaultlibs.
+    list(APPEND CMAKE_REQUIRED_LIBRARIES mingw32 gcc gcc_eh mingwex msvcrt gcc)
+  endif()
   if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)
     set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all")
   endif ()


[CMake] Check -ffreestanding as C not C++ flag

When -ffreestanding is used, main() isn't considered special and
when compiled as C++ code it'll get mangled which makes the
compilation fail since main() will be undefined so this check will
never succeed.

Differential Revision: https://reviews.llvm.org/D49332

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -53,6 +53,7 @@
 endif ()

 # CodeGen options.
+check_c_compiler_flag(-ffreestanding         COMPILER_RT_HAS_FFREESTANDING_FLAG)
 check_cxx_compiler_flag(-fPIC                COMPILER_RT_HAS_FPIC_FLAG)
 check_cxx_compiler_flag(-fPIE                COMPILER_RT_HAS_FPIE_FLAG)
 check_cxx_compiler_flag(-fno-builtin         COMPILER_RT_HAS_FNO_BUILTIN_FLAG)
@@ -64,7 +65,6 @@
 check_cxx_compiler_flag(-fvisibility=hidden  COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG)
 check_cxx_compiler_flag(-frtti               COMPILER_RT_HAS_FRTTI_FLAG)
 check_cxx_compiler_flag(-fno-rtti            COMPILER_RT_HAS_FNO_RTTI_FLAG)
-check_cxx_compiler_flag(-ffreestanding       COMPILER_RT_HAS_FFREESTANDING_FLAG)
 check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG)
 check_cxx_compiler_flag(-std=c++11           COMPILER_RT_HAS_STD_CXX11_FLAG)
 check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)


MDEV-6347 Build RHEL7 packages

MDEV-6347 Build RHEL7 packages

add "mysql-compat-server" alias to MariaDB-server package

--- cmake/cpack_rpm.cmake
+++ cmake/cpack_rpm.cmake
@@ -188,6 +188,7 @@
   ALTERNATIVE_NAME("client" "mysql")
   ALTERNATIVE_NAME("devel"  "mariadb-devel")
   ALTERNATIVE_NAME("server" "mariadb-server")
+  ALTERNATIVE_NAME("server" "mysql-compat-server")
   ALTERNATIVE_NAME("shared" "mariadb-libs")
   ALTERNATIVE_NAME("shared" "mysql-libs")
   ALTERNATIVE_NAME("test"   "mariadb-test")


Fixed issue where debug settings wouldn't be applied

Also added ability to use only LSAN

--- cmake/platform/unix/compiler/GNU.cmake
+++ cmake/platform/unix/compiler/GNU.cmake
@@ -7,14 +7,19 @@

 add_compiler_flags(-pipe)

-if(DEBUG)
+if(CMAKE_BUILD_TYPE MATCHES Debug)
   add_compiler_flags(-O0)

-  IF( ENABLE_ASAN )
+  if( ENABLE_ASAN )
     add_compiler_flags(-fsanitize=address -fno-omit-frame-pointer)
-    add_linker_flags(-fsanitize=address)
-  ENDIF()
-  add_linker_flags(-rdynamic)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
+  elseif( ENABLE_LSAN )
+    add_compiler_flags(-fsanitize=leak -fno-omit-frame-pointer)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=leak")
+  endif()
+
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
 endif()

 if (WITH_COVERAGE_REPORTS)


[Config] Added other versions of Boost.Python

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -518,7 +518,7 @@

 # ~~~~~~~~~~ ICU ~~~~~~~~~
 macro (get_icu)
-  # cmake_policy(SET CMP0074 NEW)
+  cmake_policy (SET CMP0074 NEW)
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
@@ -606,7 +606,7 @@
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system
-	locale python27 python34 regex)
+	locale python python27 python34 python37 regex)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}


cmake build reworked: qore creates cmake support files during configuration; modules using cmake just do not use FindQore.cmake in internal trees but use system-wide QoreConfig.cmake

git-svn-id: 4cfee5cd3619bc8cc86be56f2a5e59021084636e@6201 1b0b35fe-f740-4c1b-b404-a338b32e513b

--- cmake/FindQore.cmake
+++ cmake/FindQore.cmake
@@ -1,150 +0,0 @@
-#
-# Cmake module for Qore programming language
-#
-# (c) 2009 Qore Technologies, http://qoretechnologies.com
-#
-# QORE_FOUND - system has it
-# QORE_INCLUDE_DIR
-# QORE_LIBRARY
-# QORE_MODULES_DIR
-#
-# QORE_EXECUTABLE
-# QORE_QPP_EXECUTABLE
-#
-
-SET(QORE_FOUND FALSE)
-
-
-MACRO (QORE_WRAP_QPP _cpp_files _inputs )
-  message(STATUS "QPP: ${QORE_QPP_EXECUTABLE}")
-  message(STATUS "QPP2: ${_inputs}")
-
-  FOREACH (it ${_inputs})
-    message(STATUS "QPP1: ${it}")
-    GET_FILENAME_COMPONENT(_outfile ${it} NAME_WE)
-    GET_FILENAME_COMPONENT(_infile ${it} ABSOLUTE)
-    SET(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/${_outfile}.cpp)
-    SET(_doxfile ${CMAKE_CURRENT_BINARY_DIR}/${_outfile}.dox.h)
-    message(STATUS "QPP processing: ${_infile} -> ${_cppfile} ${_doxfile}")
-    ADD_CUSTOM_COMMAND(OUTPUT ${_cppfile} ${_doxfile}
-      COMMAND ${QORE_QPP_EXECUTABLE}
-      ARGS --output=${_cppfile} --dox-output=${_doxfile} ${_infile}
-      MAIN_DEPENDENCY ${_infile}
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      )
-    SET(${_cpp_files} ${${_cpp_files}} ${_cppfile})
-  ENDFOREACH (it)
-
-  message(STATUS "QPP files: ${${_cpp_files}}")
-
-ENDMACRO (QORE_WRAP_QPP)
-
-
-
-FIND_PATH (QORE_INCLUDE_DIR qore/Qore.h
-    /usr/include
-    /usr/include/qore
-    /usr/local/include
-    /usr/local/include/qore
-    /opt/qore/include/qore
-    /opt/qore/include
-    ${QORE_INCLUDE_PATH}
-)
-
-FIND_LIBRARY (QORE_LIBRARY
-    NAMES libqore libqore.so libqore.dylib
-    PATHS
-      /usr/lib
-      /usr/local/lib
-	  /opt/qore/lib
-	  ${QORE_LIBRARY_PATH}
-    )
-
-IF (QORE_LIBRARY AND QORE_INCLUDE_DIR)
-    SET(QORE_LIBRARIES ${QORE_LIBRARY})
-    SET(QORE_FOUND TRUE)
-ENDIF (QORE_LIBRARY AND QORE_INCLUDE_DIR)
-
-
-# get Qore version form 'qore --short-version' command etc
-FIND_PROGRAM(QORE_EXECUTABLE NAMES qore DOC "Searching for qore executable")
-IF (NOT QORE_EXECUTABLE)
-    MESSAGE( FATAL_ERROR "Cannot find 'qore' executable. Check if it's in your PATH" )
-ENDIF (NOT QORE_EXECUTABLE)
-
-FIND_PROGRAM(QORE_QPP_EXECUTABLE NAMES qpp DOC "Searching for qore qpp preprocessor")
-IF (NOT QORE_QPP_EXECUTABLE)
-    MESSAGE( FATAL_ERROR "Cannot find 'qpp' executable. Check if it's in your PATH" )
-ENDIF (NOT QORE_QPP_EXECUTABLE)
-
-
-IF (QORE_MIN_VERSION)
-    #now parse the parts of the user given version string into variables
-    # qore version is taken from qore executable - format major.minor.patch-build
-    STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qore_version "${QORE_MIN_VERSION}")
-    IF (NOT req_qore_version)
-        MESSAGE( FATAL_ERROR "Invalid Qore version string given: \"${QORE_MIN_VERSION}\", expected e.g. \"0.7.3\"")
-    ENDIF (NOT req_qore_version)
-
-    # now parse the parts of the user given version string into variables
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qore_major_v "${QORE_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qore_minor_v "${QORE_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qore_patch_v "${QORE_MIN_VERSION}")
-
-    EXEC_PROGRAM(${QORE_EXECUTABLE} ARGS "--short-version" OUTPUT_VARIABLE QORE_VERSION)
-    IF (NOT QORE_VERSION)
-        MESSAGE( FATAL_ERROR "Unknown Qore version. No data taken from 'qore --short-version'" )
-    ELSE (NOT QORE_VERSION)
-        MESSAGE( STATUS "Qore version: ${QORE_VERSION}" )
-    ENDIF (NOT QORE_VERSION)
-
-    # compare requested version with the one found
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+\\-[0-9]+" "\\1" qore_major_v "${QORE_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+\\-[0-9]+" "\\1" qore_minor_v "${QORE_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)\\-[0-9]+" "\\1" qore_patch_v "${QORE_VERSION}")
-    # compute an overall version number which can be compared at once
-    MATH(EXPR req_v "${req_qore_major_v}*10000 + ${req_qore_minor_v}*100 + ${req_qore_patch_v}")
-    MATH(EXPR found_v "${qore_major_v}*10000 + ${qore_minor_v}*100 + ${qore_patch_v}")
-    #MESSAGE (STATUS "${req_qore_major_v} ${req_qore_minor_v} ${req_qore_patch_v}")
-    #MESSAGE (STATUS "${qore_major_v} ${qore_minor_v} ${qore_patch_v}")
-    # and decide finally
-    IF (found_v LESS req_v)
-        SET (QORE_FOUND FALSE)
-        MESSAGE (STATUS "Requested Qore version is bigger than found. ${QORE_MIN_VERSION} vs ${QORE_VERSION}" )
-    ENDIF (found_v LESS req_v)
-
-ENDIF (QORE_MIN_VERSION)
-
-# module install dir
-EXEC_PROGRAM(${QORE_EXECUTABLE} ARGS "--module-dir" OUTPUT_VARIABLE QORE_MODULES_DIR)
-IF (NOT QORE_MODULES_DIR)
-    MESSAGE( FATAL_ERROR "Unknown Qore modules location. No data taken from 'qore --module-dir'" )
-ELSE (NOT QORE_MODULES_DIR)
-    MESSAGE( STATUS "Qore modules dir: ${QORE_MODULES_DIR}" )
-ENDIF (NOT QORE_MODULES_DIR)
-
-# module API version
-IF (NOT QORE_API_VERSION)
-    EXEC_PROGRAM(${QORE_EXECUTABLE} ARGS "--latest-module-api" OUTPUT_VARIABLE QORE_API_VERSION)
-ENDIF (NOT QORE_API_VERSION)
-IF (NOT QORE_API_VERSION)
-    MESSAGE( FATAL_ERROR "Unknown Qore module API version. No data taken from 'qore --latest-module-api'. It can be specified manually with -DQORE_API_VERSION")
-ELSE (NOT QORE_API_VERSION)
-    MESSAGE( STATUS "Qore module API version: ${QORE_API_VERSION}")
-ENDIF (NOT QORE_API_VERSION)
-
-
-IF (QORE_FOUND)
-    MESSAGE(STATUS "Found Qore lib: ${QORE_LIBRARY}")
-    MESSAGE(STATUS "      includes: ${QORE_INCLUDE_DIR}")
-ELSE (QORE_FOUND)
-    MESSAGE(STATUS "E! Found Qore lib: ${QORE_LIBRARY}")
-    MESSAGE(STATUS "E!      includes: ${QORE_INCLUDE_DIR}")
-
-  IF (Qore_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find Qore library")
-  ENDIF (Qore_FIND_REQUIRED)
-ENDIF (QORE_FOUND)
-
-MARK_AS_ADVANCED(QORE_INCLUDE_DIR QORE_LIBRARY)
-


Restore clang_rt library name on i686-android.

Summary:
Recent changes canonicalized clang_rt library names to refer to
"i386" on all x86 targets. Android historically uses i686.

This change adds a special case to keep i686 in all clang_rt
libraries when targeting Android.

Reviewers: hans, mgorny, beanz

Subscribers: srhines, cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D37278

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -86,6 +86,14 @@
   add_dependencies(compiler-rt ${name})
 endfunction()

+macro(set_output_name output name arch)
+  if(ANDROID AND ${arch} STREQUAL "i386")
+    set(${output} "${name}-i686${COMPILER_RT_OS_SUFFIX}")
+  else()
+    set(${output} "${name}-${arch}${COMPILER_RT_OS_SUFFIX}")
+  endif()
+endmacro()
+
 # Adds static or shared runtime for a list of architectures and operating
 # systems and puts it in the proper directory in the build and install trees.
 # add_compiler_rt_runtime(<name>
@@ -142,15 +150,15 @@
       endif()
       if(type STREQUAL "STATIC")
         set(libname "${name}-${arch}")
-        set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
+        set_output_name(output_name_${libname} ${name} ${arch})
       else()
         set(libname "${name}-dynamic-${arch}")
         set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})
         set(extra_link_flags_${libname} ${TARGET_${arch}_LINK_FLAGS} ${LIB_LINK_FLAGS})
         if(WIN32)
-          set(output_name_${libname} ${name}_dynamic-${arch}${COMPILER_RT_OS_SUFFIX})
+          set_output_name(output_name_${libname} ${name}_dynamic ${arch})
         else()
-          set(output_name_${libname} ${name}-${arch}${COMPILER_RT_OS_SUFFIX})
+          set_output_name(output_name_${libname} ${name} ${arch})
         endif()
       endif()
       set(sources_${libname} ${LIB_SOURCES})


RootNewMacros.cmake: remove variables set to default value

The right name is CMAKE_VERBOSE_MAKEFILE in any case, and
the other variable is set to override the default on a per
directory basis.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -40,9 +40,6 @@
       PREFIX ${libprefix}
       IMPORT_PREFIX ${libprefix} )
 endif()
-
-set(CMAKE_VERBOSE_MAKEFILES OFF)
-set(CMAKE_INCLUDE_CURRENT_DIR OFF)

 include(CMakeParseArguments)


delete extra code in onnxruntime_unittests.cmake

--- cmake/onnxruntime_unittests.cmake
+++ cmake/onnxruntime_unittests.cmake
@@ -557,7 +557,3 @@
 target_include_directories(onnxruntime_mlas_test PRIVATE ${ONNXRUNTIME_ROOT}/core/mlas/inc)
 target_link_libraries(onnxruntime_mlas_test PRIVATE onnxruntime_mlas)
 set_target_properties(onnxruntime_mlas_test PROPERTIES FOLDER "ONNXRuntimeTest")
-
-if (onnxruntime_ENABLE_MICROSOFT_INTERNAL)
-  include(onnxruntime_standalone_tests_internal.cmake)
-endif()


CMake +IDEs: allow .h to show up in projects

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -106,19 +106,19 @@
 		"${CMAKE_SOURCE_DIR}/libs/${name}/src/*.cpp"
 		"${CMAKE_SOURCE_DIR}/libs/${name}/src/*.c"
 		"${CMAKE_SOURCE_DIR}/libs/${name}/src/*.cxx"
-#		"${CMAKE_SOURCE_DIR}/libs/${name}/src/*.h"
-#		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}/*.h"
-#		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}/*.hpp"
-#		"${CMAKE_SOURCE_DIR}/doc/doxygen-pages/lib_mrpt_${name}.h"
+		"${CMAKE_SOURCE_DIR}/libs/${name}/src/*.h"
+		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}/*.h"
+		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}/*.hpp"
+		"${CMAKE_SOURCE_DIR}/doc/doxygen-pages/lib_mrpt_${name}.h"
 		)
 	list(APPEND ${name}_EXTRA_SRCS_NAME
 		"${name}"
 		"${name}"
 		"${name}"
-#		"${name} Internal Headers"
-#		"${name} Public Headers"
-#		"${name} Public Headers"
-#		"Documentation"
+		"${name} Internal Headers"
+		"${name} Public Headers"
+		"${name} Public Headers"
+		"${name} docs Headers"
 		)
 	# Only add these ones for "normal" libraries:
 	if (NOT ${headers_only})
@@ -190,10 +190,12 @@
 	if (NOT ${headers_only})
 		# A libray target:
 		add_library(${name}
-			${all_${name}_srcs}      # sources
 			${MRPT_VERSION_RC_FILE}  # Only !="" in Win32: the .rc file with version info
 			)

+		# Add sources as and headers as PRIVATE sources:
+		target_sources(${name} PRIVATE ${all_${name}_srcs})
+
 		# private include dirs for this lib:
 		target_include_directories(${name} PRIVATE
 				$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/libs/${name}/src/> # To include ${name}-precomp.h
@@ -214,8 +216,12 @@
 	else()
 		# A hdr-only library: needs no real compiling
 		add_library(${name} INTERFACE)
+
+		REMOVE_MATCHING_FILES_FROM_LIST(".*.h" all_${name}_srcs)
+
 		# List of hdr files (for editing in IDEs,etc.):
 		target_sources(${name} INTERFACE ${all_${name}_srcs})
+
 		set(iftype INTERFACE)
 	endif ()


Add addressmodel (32/64 bit) to boost build definition.

Required to make it work in VS2010.

--- superbuild/External-Boost.cmake
+++ superbuild/External-Boost.cmake
@@ -20,6 +20,11 @@
 set( Boost_Patch_Script ${Boost_Patches_DIR}/boost_patch.sh )
 set( Boost_Patch_Command ${SHELL_CMD} ${Boost_Patch_Script} )

+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(Boost_address_model 64)
+else()
+  set(Boost_address_model 32)
+endif()

 ExternalProject_Add(Boost
   BUILD_IN_SOURCE 1
@@ -28,7 +33,7 @@
   UPDATE_COMMAND ""
   PATCH_COMMAND ${Boost_Patch_Command}
   CONFIGURE_COMMAND ${Boost_Bootstrap_Command} --prefix=${INSTALL_DEPECENCIES_DIR}/lib --with-libraries=thread --with-libraries=system
-  BUILD_COMMAND ${Boost_b2_Command} install -j8   --prefix=${INSTALL_DEPECENCIES_DIR}
+  BUILD_COMMAND ${Boost_b2_Command} install -j8   --prefix=${INSTALL_DEPECENCIES_DIR} address-model=${Boost_address_model}
   INSTALL_COMMAND ""
 )


添加rc文件到工程

添加rc文件到工程

--- build/cmake/dxm_builder/dxm_builder_module_sources.cmake
+++ build/cmake/dxm_builder/dxm_builder_module_sources.cmake
@@ -14,7 +14,7 @@

 	# 独立平台源码
 	if(DXM_CMAKE_PLATFORM_WIN32 OR DXM_CMAKE_PLATFORM_WIN64)
-		_internal_src_import_from_dir( src.win32/cpp .h .hpp .hxx .c .cpp .cxx .cc )
+		_internal_src_import_from_dir( src.win32/cpp .h .hpp .hxx .c .cpp .cxx .cc .rc)
 		_internal_src_import_from_dir( package .pkg .bat )
 		_internal_src_import_from_dir( proto .proto )
 		_internal_src_import_from_dir( tbl .tbl )


COMP: Update External_niral_utilities to use official repo

--- SuperBuild/External_niral_utilities.cmake
+++ SuperBuild/External_niral_utilities.cmake
@@ -79,8 +79,8 @@
     )

   ### --- End Project specific additions
-  set( ${proj}_REPOSITORY ${git_protocol}://github.com/jcfr/niral_utilities.git )
-  set( ${proj}_GIT_TAG a8635a0a37d29536d3281180a9b39936307419f7)
+  set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git )
+  set( ${proj}_GIT_TAG 0218afc2696899761bba0671276dc06564be1135)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


[Config] Fixed the delivery directory of Python modules and libraries

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -497,7 +497,7 @@

     # Set the Python installation directory
     set (INSTALL_PY_LIB_DIR
-      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
       CACHE PATH "Installation directory for Python libraries")

     # Update the list of include directories for the project
@@ -1461,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


ENH: replacing git command

ENH: replacing git command

--- Testing/Dashboard/pxDashboardCommon.cmake
+++ Testing/Dashboard/pxDashboardCommon.cmake
@@ -92,7 +92,7 @@
 if( NOT DEFINED CTEST_GIT_COMMAND )
   find_program( CTEST_GIT_COMMAND
     NAMES git git.cmd
-    HINTS "C:/cygwin/bin/" )
+    HINTS "C:/Program Files (x86)/Git/bin/" )
 endif()
 if( NOT DEFINED CTEST_GIT_COMMAND )
   message( FATAL_ERROR "No Git Found." )


Fix doxygit install target

Fix doxygit install target

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -120,11 +120,13 @@
     WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")

  # hack to detect that not invoked as script and not under CI
-if(VERSION_MAJOR AND NOT $ENV{TRAVIS})
-  foreach(FOLDER ${GIT_DOCUMENTATION_INSTALL})
-    install(DIRECTORY ${FOLDER} DESTINATION share/${CMAKE_PROJECT_NAME}
-      CONFIGURATIONS Release)
-  endforeach()
+if(VERSION_MAJOR)
+  if(NOT "$ENV{TRAVIS}")
+    foreach(FOLDER ${GIT_DOCUMENTATION_INSTALL})
+      install(DIRECTORY ${FOLDER} DESTINATION share/${CMAKE_PROJECT_NAME}
+        CONFIGURATIONS Release)
+    endforeach()
+  endif()
   install(FILES index.html DESTINATION share/${CMAKE_PROJECT_NAME}
     CONFIGURATIONS Release)
 endif()


Cannot build examples/c++/qt_example because of undefined symbols for
-DENABLE_DYNDRIVERS=OFF case.  Until this is sorted out post-release,
disable all Qt devices for the -DENABLE_DYNDRIVERS=OFF case.

svn path=/trunk/; revision=9890

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -40,7 +40,7 @@

 find_package(Qt4)
 if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt)
-  if(QT4_FOUND)
+  if(ENABLE_DYNDRIVERS AND QT4_FOUND)
     if(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2)
       set(QT_USE_QTSVG 1)
     endif(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2)
@@ -55,7 +55,7 @@
     set(qt_RPATH ${QT_LIBRARY_DIR})
     #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}")
     set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${qt_LINK_FLAGS})
-  else(QT4_FOUND)
+  else(ENABLE_DYNDRIVERS AND QT4_FOUND)
     set(PLD_bmpqt OFF CACHE BOOL "Enable Qt Windows bmp device" FORCE)
     set(PLD_jpgqt OFF CACHE BOOL "Enable Qt jpg device" FORCE)
     set(PLD_pngqt OFF CACHE BOOL "Enable Qt png device" FORCE)
@@ -66,7 +66,7 @@
     set(PLD_qtwidget OFF CACHE BOOL "Enable Qt interactive device" FORCE)
     set(PLD_svgqt OFF CACHE BOOL "Enable Qt SVG device" FORCE)
     set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE)
-  endif(QT4_FOUND)
+  endif(ENABLE_DYNDRIVERS AND QT4_FOUND)
 endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt)

 if(PLD_extqt)


fixed gtest integration

fixed gtest integration

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -21,7 +21,7 @@
 # @public
 #
 function(catkin_add_gtest target)
-  if(NOT GTEST_FOUND)
+  if(NOT GTEST_FOUND AND NOT GTEST_FROM_SOURCE_FOUND)
     message(STATUS "skipping gtest '${target}' in project '${PROJECT_NAME}'")
     return()
   endif()
@@ -36,8 +36,11 @@
   include_directories(${GTEST_INCLUDE_DIRS})
   link_directories(${GTEST_LIBRARY_DIRS})
   add_executable(${target} EXCLUDE_FROM_ALL ${_gtest_DEFAULT_ARGS})
+  assert(${GTEST_LIBRARIES})
   target_link_libraries(${target} ${GTEST_LIBRARIES} ${THREADS_LIBRARY})

+  # make sure gtest is built before the test target
+  add_dependencies(${target} gtest gtest_main)
   # make sure the target is built before running tests
   add_dependencies(tests ${target})

@@ -52,32 +55,54 @@
   catkin_add_gtest(${ARGN})
 endfunction()

-if(_CATKIN_GTEST_SRC_FOUND)
-  return()
-endif()
-
 find_package(GTest QUIET)
 if(NOT GTEST_FOUND)
-  find_file(_CATKIN_GTEST_SRC "gtest.cc" PATHS "/usr/src/gtest/src" "${CMAKE_SOURCE_DIR}/gtest/src" NO_DEFAULT_PATH NO_CMAKE_PATH)
+  # only add gtest directory once per workspace
+  if(NOT TARGET gtest)
+    find_file(_CATKIN_GTEST_SRC "gtest.cc"
+      PATHS
+      # search in the current workspace
+      "${CMAKE_SOURCE_DIR}/gtest/src"
+      # fall back to system installed path (i.e. on Ubuntu)
+      "/usr/src/gtest/src"
+      NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+    find_file(_CATKIN_GTEST_INCLUDE "gtest/gtest.h"
+      PATHS
+      # search in the current workspace
+      "${CMAKE_SOURCE_DIR}/gtest/include"
+      # fall back to system installed path (i.e. on Ubuntu)
+      "/usr/include/gtest"
+      NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)

-  if(_CATKIN_GTEST_SRC)
-    GET_FILENAME_COMPONENT(_CATKIN_GTEST_DIR ${_CATKIN_GTEST_SRC} PATH)
-    set(_CATKIN_GTEST_DIR "${_CATKIN_GTEST_DIR}/../" CACHE INTERNAL "")
-    # add source dir directly (this only works on Ubuntu for now)
-    add_subdirectory(${_CATKIN_GTEST_DIR} "../gtest")
+    if(_CATKIN_GTEST_SRC)
+      get_filename_component(_CATKIN_GTEST_SOURCE_DIR ${_CATKIN_GTEST_SRC} PATH)
+      get_filename_component(_CATKIN_GTEST_BASE_DIR ${_CATKIN_GTEST_SOURCE_DIR} PATH)
+      # add CMakeLists.txt from gtest dir
+      set(_CATKIN_GTEST_BINARY_DIR ${CMAKE_BINARY_DIR}/gtest)
+      add_subdirectory(${_CATKIN_GTEST_BASE_DIR} ${_CATKIN_GTEST_BINARY_DIR})
+      get_filename_component(_CATKIN_GTEST_INCLUDE_DIR ${_CATKIN_GTEST_INCLUDE} PATH)
+      # set from-source variables
+      set(GTEST_FROM_SOURCE_FOUND TRUE CACHE INTERNAL "")
+      set(GTEST_FROM_SOURCE_INCLUDE_DIRS ${_CATKIN_GTEST_INCLUDE_DIR} CACHE INTERNAL "")
+      set(GTEST_FROM_SOURCE_LIBRARY_DIRS ${_CATKIN_GTEST_BINARY_DIR} CACHE INTERNAL "")
+      set(GTEST_FROM_SOURCE_LIBRARIES "gtest" CACHE INTERNAL "")
+      set(GTEST_FROM_SOURCE_MAIN_LIBRARIES "gtest_main" CACHE INTERNAL "")
+      message(STATUS "Found gtest sources under '${_CATKIN_GTEST_BASE_DIR}': gtests will be built")
+    endif()
+    if(NOT GTEST_FROM_SOURCE_FOUND)
+      message(WARNING "gtest not found, C++ tests can not be built. You can run 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the root of your workspace")
+    endif()
+  endif()
+  if(GTEST_FROM_SOURCE_FOUND)
     # set the same variables as find_package()
-    set(GTEST_FOUND TRUE CACHE INTERNAL "")
-    find_path(GTEST_INCLUDE_DIRS gtest/gtest.h)
-    set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} CACHE INTERNAL "")
-    set(GTEST_LIBRARIES "gtest" CACHE INTERNAL "")
-    set(GTEST_MAIN_LIBRARIES "gtest_main" CACHE INTERNAL "")
-    set(GTEST_BOTH_LIBRARIES "${GTEST_LIBRARIES};${GTEST_MAIN_LIBRARIES}" CACHE INTERNAL "")
-    set(GTEST_LIBRARY_DIRS ${CMAKE_BINARY_DIR}/gtest CACHE INTERNAL "")
-    message(STATUS "Found gtest sources under '/usr/src/gtest': gtests will be built")
-    set(_CATKIN_GTEST_SRC_FOUND TRUE CACHE INTERNAL "")
-  endif()
-  if(NOT GTEST_FOUND)
-    message(WARNING "gtest not found, C++ tests can not be built. You can run \"svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest\" in the root of your workspace")
+    # do NOT set GTEST_FOUND in the cache since when using gtest from source
+    # we must always add the subdirectory to have the gtest targets defined
+    set(GTEST_FOUND ${GTEST_FROM_SOURCE_FOUND})
+    set(GTEST_INCLUDE_DIRS ${GTEST_FROM_SOURCE_INCLUDE_DIRS})
+    set(GTEST_LIBRARY_DIRS ${GTEST_FROM_SOURCE_LIBRARY_DIRS})
+    set(GTEST_LIBRARIES ${GTEST_FROM_SOURCE_LIBRARIES})
+    set(GTEST_MAIN_LIBRARIES ${GTEST_FROM_SOURCE_MAIN_LIBRARIES})
+    set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
   endif()
 else()
   message(STATUS "Found gtest: gtests will be built")


emscripten: use -s NO_EXIT_RUNTIME=1, this reduces code size a bit more

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -223,7 +223,7 @@
 set(CMAKE_C_FLAGS_PROFILING "${EMSCRIPTEN_OPT} --profiling")

 # linker flags
-set(CMAKE_EXE_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file ${EMSCRIPTEN_MEMORY_INIT_FLAG} -s MEM_INIT_METHOD=${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY} -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\" -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} ${EMSCRIPTEN_WASM_FLAGS}")
+set(CMAKE_EXE_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file ${EMSCRIPTEN_MEMORY_INIT_FLAG} -s MEM_INIT_METHOD=${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY} -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\" -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} -s NO_EXIT_RUNTIME=1 ${EMSCRIPTEN_WASM_FLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")
 set(CMAKE_EXE_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
@@ -232,7 +232,7 @@
 set(CMAKE_STATIC_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION}")

 # dynamic lib linker flags
-set(CMAKE_SHARED_LINKER_FLAGS "-shared ${EMSCRIPTEN_CONFIG_OPTIONS} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file 0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\" -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} ${EMSCRIPTEN_WASM_FLAGS}")
+set(CMAKE_SHARED_LINKER_FLAGS "-shared ${EMSCRIPTEN_CONFIG_OPTIONS} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file 0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\" -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} -s NO_EXIT_RUNTIME=1 ${EMSCRIPTEN_WASM_FLAGS}")
 set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")
 set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")


Hotfix: Update FW with fix for crash w/ depth-rgb aligment

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "a365ab1f9d9b9a44afb00bb648e3bceb730fe797")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "1b93fa5bce981ec0624688db407231cf8e822b6d")

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


FW fix for resource allocation issues when setRuntimeModeSwitch is used

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "d492416efbfe1961620697df8a4470b122bd3cf3")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "29036665ba3c8416048f602f0bfc82c17d26fc2e")

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


Revert "Minor indentation fixes to SearchInstalledSoftware.cmake"

This reverts commit 8fb665ae9369a14dfcb373b5de05c6377b59beaf.


Warn when broken version of Davix is found

Davix 0.6.8 introduced regressions that lead to runtime errors
with ROOT, although the code still compiles. The first fixed
version is 0.7.1. Fixes: ROOT-9780. Related issue: ROOT-9730.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -938,6 +938,9 @@

   if(fail-on-missing)
     find_package(Davix 0.6.4 REQUIRED)
+    if(DAVIX_VERSION VERSION_GREATER_EQUAL 0.6.8 AND DAVIX_VERSION VERSION_LESS 0.7.1)
+      message(WARNING "Davix versions 0.6.8 to 0.7.0 have a bug and do not work with ROOT, please upgrade to 0.7.1 or later.")
+    endif()
   else()
     find_package(Davix 0.6.4)
     if(NOT DAVIX_FOUND)


 - More rigorous check of existance of OpenGL

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@49123 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -266,7 +266,7 @@
 if(opengl)
   message(STATUS "Looking for OpenGL")
   find_package(OpenGL)
-  if(NOT OPENGL_FOUND)
+  if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND)
     if(fail-on-missing)
       message(FATAL_ERROR "OpenGL package not found and opengl option required")
     else()


flexisip.spec: use systemd macros for daemons management

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -63,10 +63,7 @@
 Requires: %{pkg_prefix}liblinphone
 %endif

-Requires(post): /sbin/chkconfig coreutils
-Requires(preun): /sbin/chkconfig /sbin/chkconfig
-Requires(postun): /sbin/service
-
+%{systemd_requires}

 %if 0%{?rhel} && 0%{?rhel} <= 7
 %global cmake_name cmake3
@@ -75,6 +72,8 @@
 %global cmake_name cmake
 %define ctest_name ctest
 %endif
+
+%global flexisip_services %(printf 'flexisip.service flexisip-proxy.service'; if [ @ENABLE_PRESENCE@ -eq 1 ]; then printf ' flexisip-presence.service'; fi; if [ @ENABLE_CONFERENCE@ -eq 1 ]; then printf ' flexisip-conference.service\n'; fi)

 %description
 Extensible SIP proxy with media capabilities. Designed for robustness and easy of use.
@@ -171,47 +170,13 @@
 rm -rf $RPM_BUILD_ROOT

 %post
-if [ $1 = 1 ]; then
-  /sbin/chkconfig --add flexisip-proxy
-  /sbin/chkconfig flexisip-proxy on
-  service flexisip-proxy start
-
-  %if @ENABLE_PRESENCE@
-  /sbin/chkconfig --add flexisip-presence
-  /sbin/chkconfig flexisip-presence on
-  service flexisip-presence start
-  %endif
-  %if @ENABLE_CONFERENCE@
-  /sbin/chkconfig --add flexisip-conference
-  /sbin/chkconfig flexisip-conference on
-  service flexisip-conference start
-  %endif
-fi
+%systemd_post %flexisip_services

 %preun
-if [ $1 = 0 ]; then
-  service flexisip-proxy stop >/dev/null 2>&1 ||:
-  /sbin/chkconfig --del flexisip-proxy
-%if @ENABLE_PRESENCE@
-  service flexisip-presence stop >/dev/null 2>&1 ||:
-  /sbin/chkconfig --del flexisip-presence
-%endif
-%if @ENABLE_CONFERENCE@
-  service flexisip-conference stop >/dev/null 2>&1 ||:
-  /sbin/chkconfig --del flexisip-conference
-%endif
-fi
+%systemd_preun %flexisip_services

 %postun
-if [ "$1" -ge "1" ]; then
-  service flexisip condrestart > /dev/null 2>&1 ||:
-%if @ENABLE_PRESENCE@
-  service flexisip-presence condrestart > /dev/null 2>&1 ||:
-%endif
-%if @ENABLE_CONFERENCE@
-  service flexisip-conference condrestart > /dev/null 2>&1 ||:
-%endif
-fi
+%systemd_postun %flexisip_services

 %files
 %defattr(-,root,root,-)


[t:4814] fix project root name

[t:4814] fix project root name

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43395 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCTest.cmake
+++ cmake_modules/TokuSetupCTest.cmake
@@ -104,7 +104,7 @@
   file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" "${bash_suppressions}")

   ## setup a function to write tests that will run with helgrind
-  set(CMAKE_HELGRIND_COMMAND_STRING "valgrind --quiet --tool=helgrind --error-exitcode=1 --suppressions=${TOKUDB_SOURCE_DIR}/src/tests/helgrind.suppressions --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown")
+  set(CMAKE_HELGRIND_COMMAND_STRING "valgrind --quiet --tool=helgrind --error-exitcode=1 --suppressions=${TokuDB_SOURCE_DIR}/src/tests/helgrind.suppressions --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown")
   function(add_helgrind_test name)
     if (CMAKE_SYSTEM_NAME MATCHES Darwin OR
         ((CMAKE_C_COMPILER_ID MATCHES Intel) AND
@@ -126,7 +126,7 @@
   endfunction(add_helgrind_test)

   ## setup a function to write tests that will run with drd
-  set(CMAKE_DRD_COMMAND_STRING "valgrind --quiet --tool=drd --error-exitcode=1 --suppressions=${TOKUDB_SOURCE_DIR}/src/tests/drd.suppressions --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown")
+  set(CMAKE_DRD_COMMAND_STRING "valgrind --quiet --tool=drd --error-exitcode=1 --suppressions=${TokuDB_SOURCE_DIR}/src/tests/drd.suppressions --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown")
   function(add_drd_test name)
     if (CMAKE_SYSTEM_NAME MATCHES Darwin OR
         ((CMAKE_C_COMPILER_ID MATCHES Intel) AND


Don't link to boost system on MSVC or APPLE. Build fails on OSX with it, and it's not needed on MSVC. Not all linuxes need it either, but apparently some do, so keep it around.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -41,7 +41,11 @@
 set(Boost_DETAILED_FAILURE_MSG FALSE)
 set(Boost_ADDITIONAL_VERSIONS "1.39.0" "1.40.0" "1.41.0" "1.42.0" "1.43.0" "1.44.0" "1.46.1")

-find_package(Boost 1.39.0 COMPONENTS system thread regex)
+if (APPLE OR MSVC)
+   find_package(Boost 1.39.0 COMPONENTS thread regex)
+else()
+   find_package(Boost 1.39.0 COMPONENTS system thread regex) # Some Ubuntu 12.10 installs require system, others do not. OSX fails with system. Not needed on MSVC
+endif()

 if (Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS})


Fixed Check cmake module.

Fixed Check cmake module.

--- cmake/Modules/FindCheck.cmake
+++ cmake/Modules/FindCheck.cmake
@@ -18,17 +18,10 @@
   # in cache already
   set(CHECK_FOUND TRUE)
 else (CHECK_LIBRARIES AND CHECK_INCLUDE_DIRS)
-  # use pkg-config to get the directories and then use these values
-  # in the FIND_PATH() and FIND_LIBRARY() calls
-  if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-    include(UsePkgConfig)
-    pkgconfig(check _CHECK_INCLUDEDIR _CHECK_LIBDIR _CHECK_LDFLAGS _CHECK_CFLAGS)
-  else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-    find_package(PkgConfig)
-    if (PKG_CONFIG_FOUND)
-      pkg_check_modules(_CHECK check)
-    endif (PKG_CONFIG_FOUND)
-  endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+  find_package(PkgConfig)
+  if (PKG_CONFIG_FOUND)
+    pkg_check_modules(_CHECK check)
+  endif (PKG_CONFIG_FOUND)

   find_path(CHECK_INCLUDE_DIR
     NAMES
@@ -39,8 +32,8 @@
       /usr/local/include
       /opt/local/include
       /sw/include
+      /usr/lib/sfw/include
   )
-  mark_as_advanced(CHECK_INCLUDE_DIR)

   # check_pic is a workaround for ubuntu's check bug which does not compile
   # check as a shared library with -fPIC.
@@ -54,37 +47,23 @@
       /usr/local/lib
       /opt/local/lib
       /sw/lib
+      /usr/sfw/lib/64
+      /usr/sfw/lib
   )
-  mark_as_advanced(CHECK_LIBRARY)
-
-  if (CHECK_LIBRARY)
-    set(CHECK_FOUND TRUE CACHE INTERNAL "Wether the check library has been found" FORCE)
-  endif (CHECK_LIBRARY)

   set(CHECK_INCLUDE_DIRS
     ${CHECK_INCLUDE_DIR}
   )

-  if (CHECK_FOUND)
+  if (CHECK_LIBRARY)
     set(CHECK_LIBRARIES
-      ${CHECK_LIBRARIES}
-      ${CHECK_LIBRARY}
+        ${CHECK_LIBRARIES}
+        ${CHECK_LIBRARY}
     )
-  endif (CHECK_FOUND)
+  endif (CHECK_LIBRARY)

-  if (CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES)
-     set(CHECK_FOUND TRUE)
-  endif (CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES)
-
-  if (CHECK_FOUND)
-    if (NOT Check_FIND_QUIETLY)
-      message(STATUS "Found Check: ${CHECK_LIBRARIES}")
-    endif (NOT Check_FIND_QUIETLY)
-  else (CHECK_FOUND)
-    if (Check_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find Check")
-    endif (Check_FIND_REQUIRED)
-  endif (CHECK_FOUND)
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(Check DEFAULT_MSG CHECK_LIBRARIES CHECK_INCLUDE_DIRS)

   # show the CHECK_INCLUDE_DIRS and CHECK_LIBRARIES variables only in the advanced view
   mark_as_advanced(CHECK_INCLUDE_DIRS CHECK_LIBRARIES)


added secp256k1 dependency;  headers to build

--- cmake/libbitcrypto-core.cmake
+++ cmake/libbitcrypto-core.cmake
@@ -3,7 +3,6 @@
 #add_definitions(-D__DEBUG__)

 include_directories(${CMAKE_BINARY_DIR}/include/bitcrypto)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)

 file(GLOB SOURCES
@@ -11,7 +10,9 @@
     "src/external/*.cpp"
 )

-file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_SOURCE_DIR}/src
+
+
+file(GLOB HEADERS RELATIVE ${CMAKE_SOURCE_DIR}/src
     "src/*.hpp"
     "src/*.ipp"
     "src/external/*.h"
@@ -20,6 +21,23 @@

+
 add_library(bitcrypto-core STATIC ${SOURCES})
+add_dependencies(bitcrypto-core libsecp256k1)
+
+add_custom_command(
+    TARGET bitcrypto-core
+    PRE_BUILD
+    COMMAND ${CMAKE_COMMAND} ARGS -E make_directory ${CMAKE_BINARY_DIR}/include/bitcrypto/external
+)
+
+foreach(HEADER ${HEADERS})
+    add_custom_command(
+        TARGET bitcrypto-core
+        PRE_BUILD
+        COMMAND ${CMAKE_COMMAND}
+        ARGS -E copy ${CMAKE_SOURCE_DIR}/src/${HEADER} ${CMAKE_BINARY_DIR}/include/bitcrypto/${HEADER}
+)
+endforeach(HEADER )


improved FindCPLEX.cmake on Windows

improved FindCPLEX.cmake on Windows

--- cmake/modules/FindCPLEX.cmake
+++ cmake/modules/FindCPLEX.cmake
@@ -7,62 +7,85 @@
 #  CPLEX_INCLUDE_DIRS       - include directory
 #  CPLEX_LIBRARIES          - library files

-## config
-set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
+if(WIN32)
+  execute_process(COMMAND cmd /C set CPLEX_STUDIO_DIR OUTPUT_VARIABLE CPLEX_STUDIO_DIR_VAR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  if(NOT CPLEX_STUDIO_DIR_VAR)
+    MESSAGE(FATAL_ERROR "Unable to find CPLEX: environment variable CPLEX_STUDIO_DIR<VERSION> not set.")
+  endif()
+
+  STRING(REGEX REPLACE "^CPLEX_STUDIO_DIR" "" CPLEX_STUDIO_DIR_VAR ${CPLEX_STUDIO_DIR_VAR})
+  STRING(REGEX MATCH "^[0-9]+" CPLEX_WIN_VERSION ${CPLEX_STUDIO_DIR_VAR})
+  STRING(REGEX REPLACE "^[0-9]+=" "" CPLEX_STUDIO_DIR_VAR ${CPLEX_STUDIO_DIR_VAR})
+  file(TO_CMAKE_PATH "${CPLEX_STUDIO_DIR_VAR}" CPLEX_ROOT_DIR_GUESS)
+
+  set(CPLEX_WIN_VERSION ${CPLEX_WIN_VERSION} CACHE STRING "CPLEX version to be used.")
+  set(CPLEX_ROOT_DIR "${CPLEX_ROOT_DIR_GUESS}" CACHE PATH "CPLEX root directory.")
+
+  MESSAGE(STATUS "Found CLPEX version ${CPLEX_WIN_VERSION} at '${CPLEX_ROOT_DIR}'")
+
+  STRING(REGEX REPLACE "/VC/bin/.*" "" VISUAL_STUDIO_PATH ${CMAKE_C_COMPILER})
+  STRING(REGEX MATCH "Studio [0-9]+" CPLEX_WIN_VS_VERSION ${VISUAL_STUDIO_PATH})
+  STRING(REGEX REPLACE "Studio " "" CPLEX_WIN_VS_VERSION ${CPLEX_WIN_VS_VERSION})
+
+  if(${CPLEX_WIN_VS_VERSION} STREQUAL "9")
+    set(CPLEX_WIN_VS_VERSION 2008)
+  elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "10")
+    set(CPLEX_WIN_VS_VERSION 2010)
+  elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "11")
+    set(CPLEX_WIN_VS_VERSION 2012)
+  else()
+    MESSAGE(FATAL_ERROR "CPLEX: unknown Visual Studio version at '${VISUAL_STUDIO_PATH}'.")
+  endif()
+
+  set(CPLEX_WIN_VS_VERSION ${CPLEX_WIN_VS_VERSION} CACHE STRING "Visual Studio Version")
+
+  if("${CMAKE_C_COMPILER}" MATCHES "amd64")
+    set(CPLEX_WIN_BITNESS x64)
+  else()
+    set(CPLEX_WIN_BITNESS x86)
+  endif()
+
+  set(CPLEX_WIN_BITNESS ${CPLEX_WIN_BITNESS} CACHE STRING "On Windows: x86 or x64 (32bit resp. 64bit)")

-if(WIN32)
-  if(NOT CPLEX_WIN_VERSION)
-    set(CPLEX_WIN_VERSION 125 CACHE STRING "Cplex version integer code. Necessary on Windows to guess root dir and to determine the library name, i.e. cplex125.lib")
-  endif(NOT CPLEX_WIN_VERSION)
-
-  if(NOT CPLEX_WIN_VS_VERSION)
-    set(CPLEX_WIN_VS_VERSION 2010 CACHE STRING "Cplex Visual Studio version, for instance 2008 or 2010.")
-  endif(NOT CPLEX_WIN_VS_VERSION)
+  MESSAGE(STATUS "CPLEX: using Visual Studio ${CPLEX_WIN_VS_VERSION} ${CPLEX_WIN_BITNESS} at '${VISUAL_STUDIO_PATH}'")

   if(NOT CPLEX_WIN_LINKAGE)
-    set(CPLEX_WIN_LINKAGE mda CACHE STRING "Cplex linkage variant on Windows. One of these: mda (dll, release), mdd (dll, debug), mta (static, release), mtd (static, debug)")
+    set(CPLEX_WIN_LINKAGE mda CACHE STRING "CPLEX linkage variant on Windows. One of these: mda (dll, release), mdd (dll, debug), mta (static, release), mtd (static, debug)")
   endif(NOT CPLEX_WIN_LINKAGE)
-
-  if(NOT CPLEX_WIN_BITNESS)
-    set(CPLEX_WIN_BITNESS x64 CACHE STRING "On Windows: x86 or x64 (32bit resp. 64bit)")
-  endif(NOT CPLEX_WIN_BITNESS)

   # now, generate platform string
   set(CPLEX_WIN_PLATFORM "${CPLEX_WIN_BITNESS}_windows_vs${CPLEX_WIN_VS_VERSION}/stat_${CPLEX_WIN_LINKAGE}")

-else(WIN32)
+else()
+
+  set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory.")
   set(CPLEX_WIN_PLATFORM "")
-endif(WIN32)
+
+endif()

-## cplex root dir guessing
-# windows: trying to guess the root dir from a
-# env variable set by the cplex installer
-set(WIN_ROOT_GUESS $ENV{CPLEX_STUDIO_DIR${CPLEX_WIN_VERSION}})

 FIND_PATH(CPLEX_INCLUDE_DIR
   ilcplex/cplex.h
   HINTS ${CPLEX_ROOT_DIR}/cplex/include
         ${CPLEX_ROOT_DIR}/include
-	${WIN_ROOT_GUESS}/cplex/include
   PATHS ENV C_INCLUDE_PATH
         ENV C_PLUS_INCLUDE_PATH
         ENV INCLUDE_PATH
   )

-FIND_PATH(CONCERT_INCLUDE_DIR
+FIND_PATH(CPLEX_CONCERT_INCLUDE_DIR
   ilconcert/iloenv.h
   HINTS ${CPLEX_ROOT_DIR}/concert/include
         ${CPLEX_ROOT_DIR}/include
-        ${WIN_ROOT_GUESS}/concert/include
   PATHS ENV C_INCLUDE_PATH
         ENV C_PLUS_INCLUDE_PATH
         ENV INCLUDE_PATH
   )

 FIND_LIBRARY(CPLEX_LIBRARY
-  NAMES cplex cplex${CPLEX_WIN_VERSION}
+  NAMES cplex${CPLEX_WIN_VERSION} cplex
   HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
-        ${WIN_ROOT_GUESS}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
@@ -71,40 +94,32 @@
   )
 message(STATUS "CPLEX Library: ${CPLEX_LIBRARY}")

-FIND_LIBRARY(ILOCPLEX_LIBRARY
+FIND_LIBRARY(CPLEX_ILOCPLEX_LIBRARY
   ilocplex
-  HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
-        ${WIN_ROOT_GUESS}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
+  HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
   PATHS ENV LIBRARY_PATH
         ENV LD_LIBRARY_PATH
   )
-message(STATUS "ILOCPLEX Library: ${ILOCPLEX_LIBRARY}")
+message(STATUS "ILOCPLEX Library: ${CPLEX_ILOCPLEX_LIBRARY}")

-FIND_LIBRARY(CONCERT_LIBRARY
+FIND_LIBRARY(CPLEX_CONCERT_LIBRARY
   concert
-  HINTS ${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_WIN_PLATFORM} #windows
-        ${WIN_ROOT_GUESS}/concert/lib/${CPLEX_WIN_PLATFORM} #windows
+  HINTS ${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_WIN_PLATFORM} #windows
         ${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic #osx
   PATHS ENV LIBRARY_PATH
         ENV LD_LIBRARY_PATH
   )
-message(STATUS "CONCERT Library: ${CONCERT_LIBRARY}")
+message(STATUS "CONCERT Library: ${CPLEX_CONCERT_LIBRARY}")

-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG
- CPLEX_LIBRARY CPLEX_INCLUDE_DIR ILOCPLEX_LIBRARY CONCERT_LIBRARY CONCERT_INCLUDE_DIR)
-
 if(WIN32)
 	FIND_PATH(CPLEX_BIN_DIR
-	  cplex121.dll
-          HINTS ${CPLEX_ROOT_DIR}/bin/${CPLEX_WIN_PLATFORM} #windows
-                ${WIN_ROOT_GUESS}/bin/${CPLEX_WIN_PLATFORM} #windows
-	  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
+	  cplex${CPLEX_WIN_VERSION}.dll
+          HINTS ${CPLEX_ROOT_DIR}/cplex/bin/${CPLEX_WIN_PLATFORM} #windows
 	  )
 else()
 	FIND_PATH(CPLEX_BIN_DIR
@@ -118,15 +133,19 @@
 endif()
 message(STATUS "CPLEX Bin Dir: ${CPLEX_BIN_DIR}")

+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG
+ CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_LIBRARY CPLEX_CONCERT_INCLUDE_DIR)
+
 IF(CPLEX_FOUND)
-  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CONCERT_INCLUDE_DIR})
-  SET(CPLEX_LIBRARIES ${CONCERT_LIBRARY} ${ILOCPLEX_LIBRARY} ${CPLEX_LIBRARY} )
+  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CPLEX_CONCERT_INCLUDE_DIR})
+  SET(CPLEX_LIBRARIES ${CPLEX_CONCERT_LIBRARY} ${CPLEX_ILOCPLEX_LIBRARY} ${CPLEX_LIBRARY} )
   IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
   ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 ENDIF(CPLEX_FOUND)

-MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR ILOCPLEX_LIBRARY CONCERT_INCLUDE_DIR CONCERT_LIBRARY CPLEX_BIN_DIR)
+MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_CONCERT_LIBRARY)


Updated name of parser library per reviewer request.

--- cmake/modules/FindDrake.cmake
+++ cmake/modules/FindDrake.cmake
@@ -13,7 +13,7 @@
   list(APPEND _library_var_names ${varName})
 endmacro()

-find_drake_library(DRAKE_PARSERS_LIBRARY drakeParsers "Drake Parsers library")
+find_drake_library(DRAKE_MULTI_BODY_PARSERS_LIBRARY drakeMultibodyParsers "Drake Multibody Parsers library")
 find_drake_library(DRAKE_RBM_LIBRARY drakeRBM "Drake RBM library")
 find_drake_library(DRAKE_COMMON_LIBRARY drakeCommon "Drake Common library")
 find_drake_library(DRAKE_JOINTS_LIBRARY drakeJoints "Drake Joints library")
@@ -21,8 +21,8 @@
 find_drake_library(DRAKE_CHULL_LIBRARY drakeConvexHull "Drake Convex Hull library")
 find_drake_library(DRAKE_GEOMETRYUTIL_LIBRARY drakeGeometryUtil "Drake Geometry Util library")

-if(NOT DRAKE_PARSERS_LIBRARY)
-  list(REMOVE_ITEM _library_var_names DRAKE_PARSERS_LIBRARY)
+if(NOT DRAKE_MULTI_BODY_PARSERS_LIBRARY)
+  list(REMOVE_ITEM _library_var_names DRAKE_MULTI_BODY_PARSERS_LIBRARY)
 endif()

 if(NOT DRAKE_COMMON_LIBRARY)