fix typo in creating tasking system libraries list

--- components/ospcommon/cmake/macros.cmake
+++ components/ospcommon/cmake/macros.cmake
@@ -458,7 +458,7 @@
     find_package(TBB REQUIRED)
     set(TASKING_SYSTEM_DEFINITIONS -DOSPRAY_TASKING_TBB)
     set(TASKING_SYSTEM_INCLUDES ${TBB_INCLUDE_DIRS})
-    set(TASKING_SYSTEM_LIBS ${TBB_LIBRARIES})
+    set(TASKING_SYSTEM_LIBS ${TASKING_SYSTEM_LIBS} ${TBB_LIBRARIES})
   else(OSPRAY_TASKING_TBB)
     unset(TBB_INCLUDE_DIR          CACHE)
     unset(TBB_LIBRARY              CACHE)
@@ -488,7 +488,7 @@
     elseif(OSPRAY_TASKING_LIBDISPATCH)
       find_package(libdispatch REQUIRED)
       set(TASKING_SYSTEM_INCLUDES ${LIBDISPATCH_INCLUDE_DIRS})
-      set(TASKING_SYSTEM_LIBS ${LIBDISPATCH_LIBRARIES})
+      set(TASKING_SYSTEM_LIBS ${TASKING_SYSTEM_LIBS} ${LIBDISPATCH_LIBRARIES})
       set(TASKING_SYSTEM_DEFINITIONS -DOSPRAY_TASKING_LIBDISPATCH)
     else()#Debug
       # Do nothing, will fall back to scalar code (useful for debugging)


cmake: legacy artifacts removed

cmake: legacy artifacts removed

--- cmake/ConfigOutput.cmake
+++ cmake/ConfigOutput.cmake
@@ -9,10 +9,10 @@
     if (MSVC_IDE AND NOT ver_res EQUAL -1)
         foreach(conf ${CMAKE_CONFIGURATION_TYPES})
             string(TOUPPER ${conf} conf_u)
-            set_target_properties(${targ1} ${ARGV} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${conf_u} ${CMAKE_BINARY_DIR}/${conf}/bin)
+            set_target_properties(${ARGV} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${conf_u} ${CMAKE_BINARY_DIR}/${conf}/bin)
         endforeach(conf)
     else (MSVC_IDE AND NOT ver_res EQUAL -1)
-        set_target_properties(${targ1} ${ARGV} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+        set_target_properties(${ARGV} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     endif (MSVC_IDE AND NOT ver_res EQUAL -1)
 endmacro (ConfigOutputDir ...)

@@ -34,10 +34,10 @@
 #   1) sets VERSION properly
 #   2) sets binary output dir appropriately
 macro(FinalizeBinaries ...)
-    ConfigOutputDir(${targ1} ${ARGV})
+    ConfigOutputDir(${ARGV})

     # set version only for windows since on linux cmake makes strange links
     if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-        set_target_properties(${targ1} ${ARGV} PROPERTIES VERSION ${SEDNA_BUILD_VERSION})
+        set_target_properties(${ARGV} PROPERTIES VERSION ${SEDNA_BUILD_VERSION})
     endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
 endmacro(FinalizeBinaries ...)


Fixed compilation without Flex and Bison

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -1,129 +1,129 @@
-################################################################################
-# Copyright 1998-2013 by authors (see AUTHORS.txt)
-#
-#   This file is part of LuxRender.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-include(FindPkgMacros)
-getenv_path(LuxRays_DEPENDENCIES_DIR)
-
-################################################################################
-#
-# Core dependencies
-#
-################################################################################
-
-# Find threading library
-FIND_PACKAGE(Threads REQUIRED)
-
-# Find FreeImage
-find_package(FreeImage)
-
-if (FreeImage_FOUND)
-	include_directories(SYSTEM ${FreeImage_INCLUDE_DIRS})
-endif ()
-
-if(NOT APPLE)
-	# Find Python Libraries
-	find_package(PythonLibs)
-else(not APPLE)
-	# use Blender python libs for static compiling !
-	SET(PYTHON_LIBRARIES ${OSX_DEPENDENCY_ROOT}/lib/BF_pythonlibs/py33_uni_intel/libbf_python_ext.a ${OSX_DEPENDENCY_ROOT}/lib/BF_pythonlibs/py33_uni_intel/libbf_python.a)
-	SET(PYTHON_INCLUDE_DIRS ${OSX_DEPENDENCY_ROOT}/include/Python3.3m)
-	SET(PYTHONLIBS_FOUND ON)
-endif()
-include_directories (${PYTHON_INCLUDE_DIRS})
-
-# Find Boost
-set(Boost_USE_STATIC_LIBS       OFF)
-set(Boost_USE_MULTITHREADED     ON)
-set(Boost_USE_STATIC_RUNTIME    OFF)
-set(BOOST_ROOT                  "${BOOST_SEARCH_PATH}")
-#set(Boost_DEBUG                 ON)
-set(Boost_MINIMUM_VERSION       "1.44.0")
-
-set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.1" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0")
-
-set(LUXRAYS_BOOST_COMPONENTS thread program_options filesystem serialization iostreams regex system python)
-find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
-if (NOT Boost_FOUND)
-        # Try again with the other type of libs
-        if(Boost_USE_STATIC_LIBS)
-                set(Boost_USE_STATIC_LIBS)
-        else()
-                set(Boost_USE_STATIC_LIBS OFF)
-        endif()
-        find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
-endif()
-
-if (Boost_FOUND)
-	include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
-	link_directories(${Boost_LIBRARY_DIRS})
-	# Don't use old boost versions interfaces
-	ADD_DEFINITIONS(-DBOOST_FILESYSTEM_NO_DEPRECATED)
-endif ()
-
-
-# OpenGL
-find_package(OpenGL)
-
-if (OPENGL_FOUND)
-	include_directories(SYSTEM ${OPENGL_INCLUDE_PATH})
-endif()
-
-set(GLEW_ROOT                  "${GLEW_SEARCH_PATH}")
-if(NOT APPLE)
-	find_package(GLEW)
-endif()
-
-# GLEW
-if (GLEW_FOUND)
-	include_directories(SYSTEM ${GLEW_INCLUDE_PATH})
-endif ()
-
-
-set(GLUT_ROOT                  "${GLUT_SEARCH_PATH}")
-find_package(GLUT)
-
-# GLUT
-if (GLUT_FOUND)
-	include_directories(SYSTEM ${GLUT_INCLUDE_PATH})
-endif ()
-
-# OpenCL
-set(OPENCL_ROOT                "${OPENCL_SEARCH_PATH}")
-find_package(OpenCL)
-
-if (OPENCL_FOUND)
-	include_directories(SYSTEM ${OPENCL_INCLUDE_DIR} ${OPENCL_C_INCLUDE_DIR})
-endif ()
-
-# Find BISON
-IF (NOT BISON_NOT_AVAILABLE)
-	FIND_PACKAGE(BISON REQUIRED)
-	IF (NOT BISON_FOUND)
-		MESSAGE(WARNING "bison not found - try compilation using already generated files")
-		SET(BISON_NOT_AVAILABLE 1)
-	ENDIF (NOT BISON_FOUND)
-ENDIF (NOT BISON_NOT_AVAILABLE)
-
-# Find BISON
-IF (NOT FLEX_NOT_AVAILABLE)
-	FIND_PACKAGE(FLEX REQUIRED)
-	IF (NOT FLEX_FOUND)
-		MESSAGE(WARNING "flex not found - try compilation using already generated files")
-		SET(FLEX_NOT_AVAILABLE 1)
-	ENDIF (NOT FLEX_FOUND)
-ENDIF (NOT FLEX_NOT_AVAILABLE)
+################################################################################
+# Copyright 1998-2013 by authors (see AUTHORS.txt)
+#
+#   This file is part of LuxRender.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+include(FindPkgMacros)
+getenv_path(LuxRays_DEPENDENCIES_DIR)
+
+################################################################################
+#
+# Core dependencies
+#
+################################################################################
+
+# Find threading library
+FIND_PACKAGE(Threads REQUIRED)
+
+# Find FreeImage
+find_package(FreeImage)
+
+if (FreeImage_FOUND)
+	include_directories(SYSTEM ${FreeImage_INCLUDE_DIRS})
+endif ()
+
+if(NOT APPLE)
+	# Find Python Libraries
+	find_package(PythonLibs)
+else(not APPLE)
+	# use Blender python libs for static compiling !
+	SET(PYTHON_LIBRARIES ${OSX_DEPENDENCY_ROOT}/lib/BF_pythonlibs/py33_uni_intel/libbf_python_ext.a ${OSX_DEPENDENCY_ROOT}/lib/BF_pythonlibs/py33_uni_intel/libbf_python.a)
+	SET(PYTHON_INCLUDE_DIRS ${OSX_DEPENDENCY_ROOT}/include/Python3.3m)
+	SET(PYTHONLIBS_FOUND ON)
+endif()
+include_directories (${PYTHON_INCLUDE_DIRS})
+
+# Find Boost
+set(Boost_USE_STATIC_LIBS       OFF)
+set(Boost_USE_MULTITHREADED     ON)
+set(Boost_USE_STATIC_RUNTIME    OFF)
+set(BOOST_ROOT                  "${BOOST_SEARCH_PATH}")
+#set(Boost_DEBUG                 ON)
+set(Boost_MINIMUM_VERSION       "1.44.0")
+
+set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.1" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0")
+
+set(LUXRAYS_BOOST_COMPONENTS thread program_options filesystem serialization iostreams regex system python)
+find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
+if (NOT Boost_FOUND)
+        # Try again with the other type of libs
+        if(Boost_USE_STATIC_LIBS)
+                set(Boost_USE_STATIC_LIBS)
+        else()
+                set(Boost_USE_STATIC_LIBS OFF)
+        endif()
+        find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
+endif()
+
+if (Boost_FOUND)
+	include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
+	link_directories(${Boost_LIBRARY_DIRS})
+	# Don't use old boost versions interfaces
+	ADD_DEFINITIONS(-DBOOST_FILESYSTEM_NO_DEPRECATED)
+endif ()
+
+
+# OpenGL
+find_package(OpenGL)
+
+if (OPENGL_FOUND)
+	include_directories(SYSTEM ${OPENGL_INCLUDE_PATH})
+endif()
+
+set(GLEW_ROOT                  "${GLEW_SEARCH_PATH}")
+if(NOT APPLE)
+	find_package(GLEW)
+endif()
+
+# GLEW
+if (GLEW_FOUND)
+	include_directories(SYSTEM ${GLEW_INCLUDE_PATH})
+endif ()
+
+
+set(GLUT_ROOT                  "${GLUT_SEARCH_PATH}")
+find_package(GLUT)
+
+# GLUT
+if (GLUT_FOUND)
+	include_directories(SYSTEM ${GLUT_INCLUDE_PATH})
+endif ()
+
+# OpenCL
+set(OPENCL_ROOT                "${OPENCL_SEARCH_PATH}")
+find_package(OpenCL)
+
+if (OPENCL_FOUND)
+	include_directories(SYSTEM ${OPENCL_INCLUDE_DIR} ${OPENCL_C_INCLUDE_DIR})
+endif ()
+
+# Find BISON
+IF (NOT BISON_NOT_AVAILABLE)
+	FIND_PACKAGE(BISON)
+	IF (NOT BISON_FOUND)
+		MESSAGE(WARNING "bison not found - try compilation using already generated files")
+		SET(BISON_NOT_AVAILABLE 1)
+	ENDIF (NOT BISON_FOUND)
+ENDIF (NOT BISON_NOT_AVAILABLE)
+
+# Find BISON
+IF (NOT FLEX_NOT_AVAILABLE)
+	FIND_PACKAGE(FLEX)
+	IF (NOT FLEX_FOUND)
+		MESSAGE(WARNING "flex not found - try compilation using already generated files")
+		SET(FLEX_NOT_AVAILABLE 1)
+	ENDIF (NOT FLEX_FOUND)
+ENDIF (NOT FLEX_NOT_AVAILABLE)


Possibly fixed ZMQ dependency issues.

Possibly fixed ZMQ dependency issues.

--- cmake/External/zmq.cmake
+++ cmake/External/zmq.cmake
@@ -44,7 +44,7 @@
       )

     set(ZMQ_FOUND TRUE)
-    set(ZMQ_INCLUDE_DIRS ${ZMQ_INSTALL}/include PARENT_SCOPE)
+    set(ZMQ_INCLUDE_DIRS ${ZMQ_INSTALL}/include)

 	if(MSVC)
 		FILE(GLOB_RECURSE ZMQ_LIBRARIES "${ZMQ_INSTALL}/lib/libzmq-${CMAKE_VS_PLATFORM_TOOLSET}*.lib")
@@ -53,7 +53,7 @@
 		FILE(GLOB_RECURSE ZMQ_LIBRARIES "${ZMQ_INSTALL}/lib/libzmq-*.a")
 		#set(ZMQ_LIBRARIES ${ZMQ_INSTALL}/lib/libZMQ.a ${CMAKE_THREAD_LIBS_INIT})
 	endif()
-    set(ZMQ_LIBRARY_DIRS ${ZMQ_INSTALL}/lib PARENT_SCOPE)
+    set(ZMQ_LIBRARY_DIRS ${ZMQ_INSTALL}/lib)
     set(ZMQ_EXTERNAL TRUE)

     list(APPEND external_project_dependencies ZMQ)


Update FindSenseKit.cmake

Update FindSenseKit.cmake

--- cmake/FindSenseKit.cmake
+++ cmake/FindSenseKit.cmake
@@ -3,15 +3,19 @@
 #
 # Usage
 # -----
-# find_package(SenseKit REQUIRED) // find the graphics, window and system modules
+# find_package(SenseKit REQUIRED)
 #
 # Output
 # ------
 #
 # This script defines the following variables:
-# - SENSEKIT_LIBRARIES:    the list of all libraries corresponding to the required modules
+# - SENSEKIT_LIBRARIES:    the list of all core SenseKit libraries
 # - SENSEKIT_FOUND:        true if all the required modules are found
 # - SENSEKIT_INCLUDE_DIR:  the path where SenseKit headers are located (the directory containing the SenseKit/SenseKit.h file)
+# - SENSEKIT_LIB_DIR:      the path where SenseKit libs are located
+# - SENSEKIT_PLUGIN_LIBRARIES: the list of all plugin libraries
+# - SENSEKIT_TOML:         a list TOML configuration files for SenseKit
+# - SENSEKIT_PLUGIN_TOML:  a list of TOML configuration files for plugins
 #
 # example:
 #   find_package(SenseKit REQUIRED)
@@ -21,103 +25,123 @@

 # define the list of search paths for headers and libraries
 set(FIND_SENSEKIT_PATHS
-    ${SENSEKIT_ROOT}
-    $ENV{SENSEKIT_ROOT}
-    ..
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local
-    /usr
-    /sw
-    /opt/local
-    /opt/csw
-    /opt)
-
+  ${SENSEKIT_ROOT}
+  $ENV{SENSEKIT_ROOT}
+  ..
+  SenseKitSDK
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /usr/local
+  /usr
+  /sw
+  /opt/local
+  /opt/csw
+  /opt)

 # find the required libraries
 set(SENSEKIT_FOUND TRUE) # will be set to false if one of the required modules is not found

 if (NOT SENSEKIT_SDK_BUILD)
-    # find the SenseKit include directory
-    find_path(SENSEKIT_INCLUDE_DIR SenseKit/SenseKit.h
-              PATH_SUFFIXES include
-              PATHS ${FIND_SENSEKIT_PATHS})
+  # find the SenseKit include directory
+  find_path(SENSEKIT_INCLUDE_DIR SenseKit/SenseKit.h
+    PATH_SUFFIXES include
+    PATHS ${FIND_SENSEKIT_PATHS})

-    set(SENSEKIT_FIND_COMPONENTS
-        SenseKit
-        SenseKitAPI
-        SenseKitUL
-        )
+  set(SENSEKIT_FIND_COMPONENTS
+    SenseKit
+    SenseKitAPI
+    SenseKitUL
+    )

-    foreach(FIND_SENSEKIT_COMPONENT ${SENSEKIT_FIND_COMPONENTS})
-        string(TOUPPER ${FIND_SENSEKIT_COMPONENT} FIND_SENSEKIT_COMPONENT_UPPER)
-
-        # dynamic release library
-        find_library(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE
-                     NAMES ${FIND_SENSEKIT_COMPONENT}
-                     PATH_SUFFIXES lib64 lib
-                     PATHS ${FIND_SENSEKIT_PATHS})
+  MARK_AS_ADVANCED(SENSEKIT_LIB_DIR)

-        # dynamic debug library
-        find_library(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG
-                     NAMES ${FIND_SENSEKIT_COMPONENT}-d
-                     PATH_SUFFIXES lib64 lib
-                     PATHS ${FIND_SENSEKIT_PATHS})
+  foreach(FIND_SENSEKIT_COMPONENT ${SENSEKIT_FIND_COMPONENTS})
+    string(TOUPPER ${FIND_SENSEKIT_COMPONENT} FIND_SENSEKIT_COMPONENT_UPPER)

-        if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG OR SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE)
-            # library found
-            set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_FOUND TRUE)
-
-            # if both are found, set SENSEKIT_XXX_LIBRARY to contain both
-            if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG AND SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE)
-                set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY debug     ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG}
-                                                              optimized ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE})
-            endif()
+    # dynamic release library
+    find_library(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE
+      NAMES ${FIND_SENSEKIT_COMPONENT}
+      PATH_SUFFIXES lib64 lib
+      PATHS ${FIND_SENSEKIT_PATHS})

-            # if only one debug/release variant is found, set the other to be equal to the found one
-            if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE)
-                # debug and not release
-                set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG})
-                set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY         ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG})
-            endif()
-            if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG)
-                # release and not debug
-                set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE})
-                set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY       ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE})
-            endif()
-        else()
-            # library not found
-            set(SENSEKIT_FOUND FALSE)
-            set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_FOUND FALSE)
-            set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY "")
-            set(FIND_SENSEKIT_MISSING "${FIND_SENSEKIT_MISSING} SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY")
-        endif()
+    # dynamic debug library
+    find_library(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG
+      NAMES ${FIND_SENSEKIT_COMPONENT}-d
+      PATH_SUFFIXES lib64 lib
+      PATHS ${FIND_SENSEKIT_PATHS})

-        # mark as advanced
-        MARK_AS_ADVANCED(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY
-                         SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE
-                         SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG)
+    if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG OR SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE)
+      # library found

-        # add to the global list of libraries
-        set(SENSEKIT_LIBRARIES ${SENSEKIT_LIBRARIES} "${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY}")
-    endforeach()
+      set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_FOUND TRUE)
+
+      # if both are found, set SENSEKIT_XXX_LIBRARY to contain both
+      if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG AND SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE)
+        set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY debug     ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG}
+          optimized ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE})
+      endif()
+
+      # if only one debug/release variant is found, set the other to be equal to the found one
+      if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE)
+        # debug and not release
+        set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG})
+        set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY         ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG})
+      endif()
+      if (SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG)
+        # release and not debug
+        set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE})
+        set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY       ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE})
+      endif()
+
+      if (NOT SENSEKIT_LIB_DIR)
+          get_filename_component(SENSEKIT_LIB_DIR ${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE} DIRECTORY)
+      endif()
+    else()
+      # library not found
+      set(SENSEKIT_FOUND FALSE)
+      set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_FOUND FALSE)
+      set(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY "")
+      set(FIND_SENSEKIT_MISSING "${FIND_SENSEKIT_MISSING} SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY")
+    endif()
+
+    # mark as advanced
+    MARK_AS_ADVANCED(SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY
+      SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_RELEASE
+      SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY_DEBUG)
+
+    # add to the global list of libraries
+    set(SENSEKIT_LIBRARIES ${SENSEKIT_LIBRARIES} "${SENSEKIT_${FIND_SENSEKIT_COMPONENT_UPPER}_LIBRARY}")
+  endforeach()
+
+  if (SENSEKIT_FOUND)
+    FILE(GLOB SENSEKIT_PLUGIN_LIBRARIES   "${SENSEKIT_LIB_DIR}/Plugins/*.dll"
+                                          "${SENSEKIT_LIB_DIR}/Plugins/*.dylib"
+                                          "${SENSEKIT_LIB_DIR}/Plugins/*.so")
+    FILE(GLOB SENSEKIT_PLUGIN_TOML   "${SENSEKIT_LIB_DIR}/Plugins/*.toml")
+    FILE(GLOB SENSEKIT_TOML   "${SENSEKIT_LIB_DIR}/*.toml")
+
+  endif()
 endif()

 # handle errors
 if(NOT SENSEKIT_FOUND)
-    # include directory or library not found
-    set(FIND_SENSEKIT_ERROR "Could NOT find SenseKit (missing: ${FIND_SENSEKIT_MISSING})")
-    if(SENSEKIT_FIND_REQUIRED)
-        # fatal error
-        message(FATAL_ERROR ${FIND_SENSEKIT_ERROR})
-    elseif(NOT SENSEKIT_FIND_QUIETLY)
-        # error but continue
-        message("${FIND_SENSEKIT_ERROR}")
-    endif()
+  # include directory or library not found
+  set(FIND_SENSEKIT_ERROR "Could NOT find SenseKit (missing: ${FIND_SENSEKIT_MISSING})")
+  if(SENSEKIT_FIND_REQUIRED)
+    # fatal error
+    message(FATAL_ERROR ${FIND_SENSEKIT_ERROR})
+  elseif(NOT SENSEKIT_FIND_QUIETLY)
+    # error but continue
+    message("${FIND_SENSEKIT_ERROR}")
+  endif()
 endif()

 # handle success
 if(SENSEKIT_FOUND)
-    message(STATUS "Found SenseKit in ${SENSEKIT_INCLUDE_DIR}")
-    message(STATUS "Found SenseKit libraries: ${SENSEKIT_LIBRARIES}")
+  message(STATUS "Found SenseKit includes in ${SENSEKIT_INCLUDE_DIR}")
+  message(STATUS "Found SenseKit lib dir: ${SENSEKIT_LIB_DIR}")
+  message(STATUS "Found SenseKit libraries: ${SENSEKIT_LIBRARIES}")
+  message(STATUS "Found SenseKit TOML: ${SENSEKIT_TOML}")
+  message(STATUS "Found SenseKit plugins: ${SENSEKIT_PLUGIN_LIBRARIES}")
+  message(STATUS "Found SenseKit plugin TOML: ${SENSEKIT_PLUGIN_TOML}")
 endif()


Install dll files to plugins folder on Windows

--- cmake/SquashPlugin.cmake
+++ cmake/SquashPlugin.cmake
@@ -102,6 +102,7 @@
     DESTINATION "${SQUASH_PLUGIN_DIRECTORY}/${SQUASH_PLUGIN_NAME}")

   install(TARGETS ${PLUGIN_TARGET}
+    RUNTIME DESTINATION "${SQUASH_PLUGIN_DIRECTORY}/${SQUASH_PLUGIN_NAME}"
     LIBRARY DESTINATION "${SQUASH_PLUGIN_DIRECTORY}/${SQUASH_PLUGIN_NAME}"
     ARCHIVE DESTINATION "${SQUASH_PLUGIN_DIRECTORY}/${SQUASH_PLUGIN_NAME}")


r10909/sofa : push eeb8240..c466c2d

r10909/sofa : push eeb8240..c466c2d

* commit c466c2dc1c675618ae927acbd94c369939a895e8
Revert "cmake: use RegisterProjects() for gtest"

   1 files changed, 3 insertions(+), 1 deletions(-)

Former-commit-id: b2264b4b0b9909cf989917a09b95380a7dbfd1e7

--- cmake/dependencies.cmake
+++ cmake/dependencies.cmake
@@ -44,7 +44,9 @@

 ## google test
 if(SOFA-MISC_BUILD_GTEST)
-    RegisterProjects("gtest" PATH "${SOFA_EXTLIBS_DIR}/gtest")
+    add_subdirectory("${SOFA_EXTLIBS_DIR}/gtest")
+    # try to replace with :
+    # RegisterProjects("gtest" "gtest_main" PATH "${SOFA_EXTLIBS_DIR}/gtest")

     if(MSVC)
         get_target_property(gtestCompilerDefines gtest COMPILE_DEFINITIONS)


cmake: don't enable color diagnostics for xcc

The compiler option "-fdiagnostics-color=always" is not known to XCC
(which is based on really old GCC). So don't enable color
diagnostic output when building with XCC.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/compiler/gcc/compiler_flags.cmake
+++ cmake/compiler/gcc/compiler_flags.cmake
@@ -192,4 +192,6 @@
 set_property(TARGET asm PROPERTY required "-xassembler-with-cpp")

 # gcc flag for colourful diagnostic messages
+if (NOT COMPILER STREQUAL "xcc")
 set_compiler_property(PROPERTY diagnostic -fdiagnostics-color=always)
+endif()


PARQUET-1220: Don't build Thrift examples and tutorials in the ExternalProject

Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>

Closes #440 from xhochy/PARQUET-1220 and squashes the following commits:

de2ee1b [Korn, Uwe] PARQUET-1220: Don't build Thrift examples and tutorials in the ExternalProject

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -193,6 +193,8 @@
                         "-DCMAKE_INSTALL_RPATH=${THRIFT_PREFIX}/lib"
                         "-DBUILD_SHARED_LIBS=OFF"
                         "-DBUILD_TESTING=OFF"
+                        "-DBUILD_EXAMPLES=OFF"
+                        "-DBUILD_TUTORIALS=OFF"
                         "-DWITH_QT4=OFF"
                         "-DWITH_C_GLIB=OFF"
                         "-DWITH_JAVA=OFF"
@@ -200,6 +202,7 @@
                         "-DWITH_HASKELL=OFF"
                         "-DWITH_CPP=ON"
                         "-DWITH_STATIC_LIB=ON"
+                        "-DWITH_LIBEVENT=OFF"
                         )

   set(THRIFT_STATIC_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}thrift")


[Config][CMake] Migrated to new FindPython3 (from deprecated FindPythonLibs)

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -487,40 +487,28 @@
   # The first check searches for the libraries and include paths.
   # However, on some older versions (e.g., on RedHat/CentOS 5.x),
   # only the static library is searched.
-  find_package (PythonLibs ${_required_version} REQUIRED)
+  find_package (Python3 COMPONENTS Interpreter Development REQUIRED)

   # The second check is to get the dynamic library for sure.
-  find_package (PythonLibsWrapper ${_required_version} REQUIRED)
-
-  if (PYTHONLIBS_FOUND)
-	# Derive the version of Python (for whatever reason, FindPythonLibs
-	# does not seem to provide that version variable.
-	get_filename_component (PYTHONLIBS_LIB_FILENAME ${PYTHON_LIBRARIES} NAME)
-	string (REGEX REPLACE "^libpython([0-9]+.[0-9]+).*$" "\\1"
-	  PYTHONLIBS_VERSION "${PYTHONLIBS_LIB_FILENAME}")
-
-	if (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-	  set (PY_MAJOR_VERSION "${CMAKE_MATCH_1}")
-	  set (PY_MINOR_VERSION "${CMAKE_MATCH_2}")
-	  set (PY_PATCH_VERSION "${CMAKE_MATCH_3}")
-	endif (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-
-	message (STATUS "Found PythonLibs ${PYTHONLIBS_VERSION} (${PYTHONLIBS_VERSION_STRING} / ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION})")
-
-	# Set the Python installation directory
-	set (INSTALL_PY_LIB_DIR
-	  ${INSTALL_LIB_DIR}/python${PYTHONLIBS_VERSION}/site-packages/py${PROJECT_NAME}
-	  CACHE PATH "Installation directory for Python libraries")
-
-	# Update the list of include directories for the project
-    include_directories (${PYTHON_INCLUDE_DIRS})
+  #find_package (PythonLibsWrapper ${_required_version} REQUIRED)
+
+  if (Python3_FOUND)
+    message (STATUS "Found Python3 ${Python3_VERSION} (${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH})")
+
+    # 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}
+      CACHE PATH "Installation directory for Python libraries")
+
+    # Update the list of include directories for the project
+    include_directories (${Python3_INCLUDE_DIRS})

     # Update the list of dependencies for the project
-    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${PYTHON_LIBRARIES})
-
-  else (PYTHONLIBS_FOUND)
+    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${Python3_LIBRARIES})
+
+  else (Python3_FOUND)
 	message (FATAL_ERROR "Python libraries are missing. Please install them (e.g., 'python-devel' for the Fedora/RedHat package)")
-  endif (PYTHONLIBS_FOUND)
+  endif (Python3_FOUND)

 endmacro (get_python)

@@ -618,8 +606,8 @@
   #         On some platform/Boost version combinations, the Python version
   #         may be just the major version (2 or 3 as of 2019) or the major
   #         and minor versions (e.g., 27, 28, 34, 36, 37 as of 2019)
-  set (python_cpt_name1 "python${PY_MAJOR_VERSION}")
-  set (python_cpt_name2 "python${PY_MAJOR_VERSION}${PY_MINOR_VERSION}")
+  set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
+  set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
@@ -1473,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/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)
@@ -2555,27 +2543,26 @@

 # Python
 macro (display_python)
-  if (PYTHONLIBS_FOUND)
+  if (Python3_FOUND)
     message (STATUS)
-	message (STATUS "* Python:")
-	message (STATUS "  - PYTHONLIBS_VERSION ............ : ${PYTHONLIBS_VERSION}")
-	message (STATUS "  - PY_{MAJOR,MINOR,PATCH}_VERSION  : ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION}")
-	message (STATUS "  - PYTHON_LIBRARIES .............. : ${PYTHON_LIBRARIES}")
-	message (STATUS "  - PYTHON_INCLUDE_PATH ........... : ${PYTHON_INCLUDE_PATH}")
-	message (STATUS "  - PYTHON_INCLUDE_DIRS ........... : ${PYTHON_INCLUDE_DIRS}")
-	message (STATUS "  - PYTHON_DEBUG_LIBRARIES ........ : ${PYTHON_DEBUG_LIBRARIES}")
-	message (STATUS "  - Python_ADDITIONAL_VERSIONS .... : ${Python_ADDITIONAL_VERSIONS}")
-  endif (PYTHONLIBS_FOUND)
+    message (STATUS "* Python:")
+    message (STATUS "  - Python3_VERSION ............... : ${Python3_VERSION}")
+    message (STATUS "  - Python3_VERSION_{MJR,MNR,PTCH}  : ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH}")
+    message (STATUS "  - Python3_INCLUDE_DIRS .......... : ${Python3_INCLUDE_DIRS}")
+    message (STATUS "  - Python3_LIBRARIES ............. : ${Python3_LIBRARIES}")
+    message (STATUS "  - Python3_LIBRARY_DIRS .......... : ${Python3_LIBRARY_DIRS}")
+    message (STATUS "  - Python3_RUNTIME_LIBRARY_DIRS .. : ${Python3_RUNTIME_LIBRARY_DIRS}")
+  endif (Python3_FOUND)
 endmacro (display_python)

 # ICU
 macro (display_icu)
   if (ICU_FOUND)
     message (STATUS)
-	message (STATUS "* ICU:")
-	message (STATUS "  - ICU_VERSION ................... : ${ICU_VERSION}")
-	message (STATUS "  - ICU_LIBRARIES ................. : ${ICU_LIBRARIES}")
-	message (STATUS "  - ICU_INCLUDE_DIRS .............. : ${ICU_INCLUDE_DIR}")
+    message (STATUS "* ICU:")
+    message (STATUS "  - ICU_VERSION ................... : ${ICU_VERSION}")
+    message (STATUS "  - ICU_LIBRARIES ................. : ${ICU_LIBRARIES}")
+    message (STATUS "  - ICU_INCLUDE_DIRS .............. : ${ICU_INCLUDE_DIR}")
   endif (ICU_FOUND)
 endmacro (display_icu)


dont use -march=native on Android

dont use -march=native on Android

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@4796 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -6,7 +6,7 @@
     if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
         execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion"
                         OUTPUT_VARIABLE GCC_VERSION_STRING)
-        if(GCC_VERSION_STRING VERSION_GREATER 4.2 AND NOT APPLE)
+        if(GCC_VERSION_STRING VERSION_GREATER 4.2 AND NOT APPLE AND NOT ANDROID_NDK)
           SET(SSE_FLAGS "${SSE_FLAGS} -march=native")
           message(STATUS "Using CPU native flags for SSE optimization: ${SSE_FLAGS}")
         endif()


px4fmu-v2_test add drivers/test_ppm

px4fmu-v2_test add drivers/test_ppm

--- cmake/configs/nuttx_px4fmu-v2_test.cmake
+++ cmake/configs/nuttx_px4fmu-v2_test.cmake
@@ -70,6 +70,7 @@
 	#
 	# Testing
 	#
+	drivers/test_ppm
 	modules/commander/commander_tests
 	modules/controllib_test
 	modules/mavlink/mavlink_tests


Fix MSan build type

Fix MSan build type

--- cmake/Sanitizers.cmake
+++ cmake/Sanitizers.cmake
@@ -27,7 +27,6 @@

 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     kl_define_build_type(MSan
-        "-O2 -g -fsanitize=memory -fno-omit-frame-pointer -DNDEBUG"
-        "-fsanitize=memory"
+        COMPILER_FLAGS "-O2 -g -fsanitize=memory -fno-omit-frame-pointer -DNDEBUG"
     )
 endif()


add ability to prepend to pythonpath for integration tests

--- cmake/TestHelper.cmake
+++ cmake/TestHelper.cmake
@@ -61,9 +61,10 @@
 endmacro(def_test testName)

 macro(def_integration_test exe_tgt testName script)
+    set(PPATH "${BC_PYTHONPATH_EXTRA}:${CMAKE_SOURCE_DIR}/build-common/python:$ENV{PYTHONPATH}")
     add_test(
         NAME ${testName}
-        COMMAND sh -ec "PYTHONPATH='${CMAKE_SOURCE_DIR}/build-common/python:$ENV{PYTHONPATH}' ${CMAKE_CURRENT_SOURCE_DIR}/${script} $<TARGET_FILE:${exe_tgt}>"
+        COMMAND sh -ec "PYTHONPATH='${PPATH}' ${CMAKE_CURRENT_SOURCE_DIR}/${script} $<TARGET_FILE:${exe_tgt}>"
     )
     set_tests_properties(${testName} PROPERTIES LABELS integration)
 endmacro(def_integration_test testName script)


Adding logic for detecting whether or not a Mac must link vecLib or Accelerate

--- cmake/tests/Math.cmake
+++ cmake/tests/Math.cmake
@@ -8,8 +8,22 @@
 if(MATH_LIBS)
   message(STATUS "Using user-defined MATH_LIBS=${MATH_LIBS}")
 elseif(APPLE)
-  set(MATH_LIBS "-framework vecLib" CACHE STRING ${MATH_DESC})
-  message(STATUS "Using Apple vecLib framework.")
+  # Try to determine whether to use vecLib (old) or Accelerate (new)
+  set(CMAKE_REQUIRED_FLAGS "${MPI_C_COMPILE_FLAGS} ${MPI_LINK_FLAGS}")
+  set(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})
+  set(CMAKE_REQUIRED_LIBRARIES "-framework vecLib;${MPI_C_LIBRARIES}")
+  check_function_exists(dpotrf  EL_HAVE_DPOTRF_VECLIB)
+  check_function_exists(dpotrf_ EL_HAVE_DPOTRF_POST_VECLIB)
+  set(CMAKE_REQUIRED_LIBRARIES "-framework Accelerate;${MPI_C_LIBRARIES}")
+  check_function_exists(dpotrf  EL_HAVE_DPOTRF_ACCELERATE)
+  check_function_exists(dpotrf_ EL_HAVE_DPOTRF_POST_ACCELERATE)
+  if(EL_HAVE_DPOTRF_VECLIB OR EL_HAVE_DPOTRF_POST_VECLIB)
+    set(MATH_LIBS "-framework vecLib" CACHE STRING ${MATH_DESC})
+    message(STATUS "Using Apple vecLib framework.")
+  elseif(EL_HAVE_DPOTRF_ACCELERATE OR EL_HAVE_DPOTRF_POST_ACCELERATE)
+    set(MATH_LIBS "-framework Accelerate" CACHE STRING ${MATH_DESC})
+    message(STATUS "Using Apple Accelerate framework.")
+  endif()
 else()
   # Look for default BLAS and LAPACK
   if(REFERENCE_ROOT)
@@ -35,6 +49,7 @@
     message(FATAL_ERROR "Could not find BLAS/LAPACK. Please specify MATH_LIBS")
   endif()
 endif()
+
 # Check the BLAS and LAPACK underscore conventions
 set(CMAKE_REQUIRED_FLAGS "${MPI_C_COMPILE_FLAGS} ${MPI_LINK_FLAGS}")
 set(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})


fix ei_add_property

fix ei_add_property

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -1,7 +1,7 @@

 macro(ei_add_property prop value)
   get_property(previous GLOBAL PROPERTY ${prop})
-  if (NOT ${previous} OR ${previous} STREQUAL "")
+  if ((NOT previous) OR (previous STREQUAL ""))
     set_property(GLOBAL PROPERTY ${prop} "${value}")
   else()
     set_property(GLOBAL PROPERTY ${prop} "${previous} ${value}")


Move CUDA version checks earlier in configuration

--- cmake/FindCudaArch.cmake
+++ cmake/FindCudaArch.cmake
@@ -61,6 +61,13 @@

   IF(NOT CUDA_GPU_DETECT_OUTPUT)
     message(STATUS "Automatic GPU detection failed. Building for all known architectures.")
+      # Check CUDA version and remove unsupported architectures
+      if (${CUDA_VERSION} VERSION_LESS "10.0")
+        STRING(REPLACE "7.5" "" KNOWN_GPU_ARCHITECTURES "${KNOWN_GPU_ARCHITECTURES}")
+      endif()
+      if(${CUDA_VERSION} VERSION_LESS "11.0")
+        STRING(REPLACE "8.0 8.6" "" KNOWN_GPU_ARCHITECTURES "${KNOWN_GPU_ARCHITECTURES}")
+      endif()
     SET(${OUT_VARIABLE} ${KNOWN_GPU_ARCHITECTURES} PARENT_SCOPE)
   ELSE()
     SET(${OUT_VARIABLE} ${CUDA_GPU_DETECT_OUTPUT} PARENT_SCOPE)
@@ -118,13 +125,6 @@
   elseif(${CUDA_ARCH_NAME} STREQUAL "Ampere")
 	  SET(__cuda_arch_bin "8.0 8.6")
   elseif(${CUDA_ARCH_NAME} STREQUAL "All")
-    # Check CUDA version and remove unsupported architectures
-    if (${CUDA_VERSION} VERSION_LESS 10.0)
-      STRING(REPLACE "7.5" "" KNOWN_GPU_ARCHITECTURES "${KNOWN_GPU_ARCHITECTURES}")
-    endif()
-    if(${CUDA_VERSION} VERSION_LESS 11.0)
-      STRING(REPLACE "8.0 8.6" "" KNOWN_GPU_ARCHITECTURES "${KNOWN_GPU_ARCHITECTURES}")
-    endif()
     # Enable build of all supported architectures
     SET(__cuda_arch_bin ${KNOWN_GPU_ARCHITECTURES})
   elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")


Fixed trivial bug in FindTinyDTLS.cmake

Fixed trivial bug in FindTinyDTLS.cmake

--- cmake/FindTinyDTLS.cmake
+++ cmake/FindTinyDTLS.cmake
@@ -99,5 +99,5 @@
     set_target_properties(tinydtls PROPERTIES
                           INTERFACE_INCLUDE_DIRECTORIES "${TINYDTLS_INCLUDE_DIR}"
                           IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-                          IMPORTED_LOCATION "${TINYDTLS_LIBRARY}")
+                          IMPORTED_LOCATION "${TINYDTLS_LIBRARIES}")
 endif()


Removing cmake policy CMP0077 as it isn't necessary.

Signed-off-by: Colm Donelan <c908d7595fdc90184dc90d54f2152b78a6b8dbc4@arm.com>
Change-Id: I99e2726ae76acdebaf17704ad5f12bccfc6051fe

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -3,8 +3,6 @@
 # Copyright 2020 NXP
 # SPDX-License-Identifier: MIT
 #
-
-cmake_policy(SET CMP0077 NEW)

 option(BUILD_ONNX_PARSER "Build Onnx parser" OFF)
 option(BUILD_UNIT_TESTS "Build unit tests" ON)


cmake: Update package-name.cmake

cmake: Update package-name.cmake

--- cmake/package-name.cmake
+++ cmake/package-name.cmake
@@ -25,6 +25,12 @@
 #
 # If a git tag is present it will replace branch and commit hash
 #     tiscamera_MAJ.MIN.PAT.COMMIT_COUNT_tag_arch.deb
+#
+# If the built version is NOT a Release build,
+# the build type will be additionally appended.
+# this will always be lower case
+#     tiscamera_MAJ.MIN.PAT_arch_buildtype.deb
+#

 function (create_package_name return_value name version)

@@ -38,10 +44,29 @@

     git_commit_tag(GIT_TAG)

+    set(build_type "")
+
+    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+
+      # empty since 'Release' is considered the default
+      set(build_type "")
+
+    else ()
+
+      # prepend a '_' this makes the rest of the name generation easier
+      # build_type will always be the last property in the string
+      # so no problems should be created by this
+      set(build_type "_${CMAKE_BUILD_TYPE}")
+
+    endif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+
+    # we do not want '_Debug' as a string but '_debug'
+    string(TOLOWER "${build_type}" build_type)
+
     if (GIT_TAG)

       set(${return_value}
-        "${name}_${version}_${GIT_TAG}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}"
+        "${name}_${version}_${GIT_TAG}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}${build_type}"
         PARENT_SCOPE)

     else ()
@@ -55,18 +80,18 @@

         if ("${GIT_BRANCH}" STREQUAL "master")
           set(${return_value}
-            "${name}_${version}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}" PARENT_SCOPE)
+            "${name}_${version}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}${build_type}" PARENT_SCOPE)
         else ()
           set(${return_value}
-            "${name}_${version}.${GIT_COMMIT_COUNT}~${GIT_BRANCH}_${GIT_COMMIT_HASH}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}"
+            "${name}_${version}.${GIT_COMMIT_COUNT}~${GIT_BRANCH}_${GIT_COMMIT_HASH}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}${build_type}"
             PARENT_SCOPE)

         endif ("${GIT_BRANCH}" STREQUAL "master")

-      else () # this will be the case when users download the github zip and compile on deb systems
+      else () # this will be the case when users download the github zip and compiles on deb systems

         set(${return_value}
-          "${name}_${version}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}" PARENT_SCOPE)
+          "${name}_${version}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}${build_type}" PARENT_SCOPE)

       endif(GIT_COMMIT_HASH)

@@ -75,7 +100,7 @@
   else(DPKG_PROGRAM)

     set(${return_value}
-      "${name}_${version}_${CMAKE_SYSTEM_NAME}" PARENT_SCOPE)
+      "${name}_${version}_${CMAKE_SYSTEM_NAME}${build_type}" PARENT_SCOPE)

   endif(DPKG_PROGRAM)


fix typo in branch checkout command

fix typo in branch checkout command

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -87,7 +87,7 @@

 ## -- Checkout command
 if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-	set(CTEST_CHECKOUT_COMMAND     "${CTEST_GIT_COMMAND} clone -B {CTEST_BRANCH} git://scm.gforge.inria.fr/openvibe/openvibe.git ${CTEST_SOURCE_DIRECTORY}")
+	set(CTEST_CHECKOUT_COMMAND     "${CTEST_GIT_COMMAND} clone -b {CTEST_BRANCH} git://scm.gforge.inria.fr/openvibe/openvibe.git ${CTEST_SOURCE_DIRECTORY}")
 endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")

 ## -- Update Command


Use GIR_FILENAME and GIR_TYPELIB as the targetnames when building gir's

--- cmake/Modules/GObjectIntrospection.cmake
+++ cmake/Modules/GObjectIntrospection.cmake
@@ -194,7 +194,7 @@
 		VERBATIM
 	)

-	add_custom_target("${GIR_LIBRARY} gir" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME})
+	add_custom_target("${GIR_FILENAME}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME})

 	install(
 		FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
@@ -213,7 +213,7 @@
 		WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 	)

-	add_custom_target("${GIR_LIBRARY} typelib" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME} ${GIR_TYPELIB})
+	add_custom_target("${GIR_TYPELIB}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME} ${GIR_TYPELIB})
 	install(
 		FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB}
 		DESTINATION ${GIR_TYPELIBDIR}


Allow VS 2012

Allow VS 2012

--- cmake/environment/CheckEnvironment.cmake
+++ cmake/environment/CheckEnvironment.cmake
@@ -23,10 +23,10 @@
 ## #############################################################################

 if (WIN32)
-  # Check for Visual Studio 2008 or 2010
-  if (NOT MSVC9 AND NOT MSVC10)
+  # Check for Visual Studio 2008 or 2010 or 2012
+  if (NOT MSVC9 AND NOT MSVC10 AND NOT MSVC11)
     message(SEND_ERROR
-      "MedInria can only be compiled with Visual Studio 2008 or 2010 at this time."
+      "MedInria can only be compiled with Visual Studio 2008 or 2010 or 2012 at this time."
       )
   endif()


fixed 0 char warning in cmake 3.1

fixed 0 char warning in cmake 3.1

--- cmake/string/cmake_string_unescape.cmake
+++ cmake/string/cmake_string_unescape.cmake
@@ -11,7 +11,7 @@
     string(REPLACE "\\;" ";"  str "${str}")
     string(REPLACE "\\n" "\n" str "${str}")
     string(REPLACE "\\r" "\r" str "${str}")
-    string(REPLACE "\\0" "\0" str "${str}")
+    string(REPLACE "\\0" "" str "${str}") ## not supported  in cmake strings
     string(REPLACE "\\ " " " str "${str}")
     return_ref(str)
   endfunction()


Clean a little config.h.cmake

Clean a little config.h.cmake

svn path=/trunk/KDE/kdenetwork/kopete/; revision=540666

--- config-kopete.h.cmake
+++ config-kopete.h.cmake
@@ -40,3 +40,7 @@

 /* enable support for the smpppd */
 /* #undef USE_SMPPPD */
+
+/* Define if you have a tm_gmtoff member in struct tm */
+#define HAVE_TM_GMTOFF 1
+


[FIX]

[FIX]

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

--- util/cmake/SeqAnUsabilityAnalyzer.cmake
+++ util/cmake/SeqAnUsabilityAnalyzer.cmake
@@ -46,17 +46,17 @@
   endif (NOT SEQAN_INSTRUMENTATION)

   message(STATUS "Prepare SeqAn Usability Analyzer data collection...")
-#  if (CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
-#    # Use EXE for instrumentation with bundled Python runtime.
-#    execute_process (COMMAND ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
-#    add_custom_target (seqan_sua_target ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
-#                       COMMENT "Build Instrumentation...")
-#  else (CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
+  if (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+    # Use EXE for instrumentation with bundled Python runtime.
+    execute_process (COMMAND ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
+    add_custom_target (seqan_sua_target ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
+                       COMMENT "Build Instrumentation...")
+  else (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
     # Use system's Python runtime.
     execute_process (COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
     add_custom_target (seqan_sua_target ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
                        COMMENT "Build Instrumentation...")
-#  endif (CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
+  endif (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
 endfunction (seqan_setup_sua)

 # ---------------------------------------------------------------------------
@@ -74,17 +74,17 @@
   add_dependencies (${TARGET} seqan_sua_target)

   # Add hooks before and after building.
-#  if (CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
-#    set (_INST ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe)
-#    add_custom_command (TARGET ${TARGET}
-#                        PRE_BUILD
-#                        COMMAND ${_INST} pre_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
-#                        COMMENT "Pre Build Instrumentation...")
-#    add_custom_command (TARGET ${TARGET}
-#                        POST_BUILD
-#                        COMMAND ${_INST} post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
-#                        COMMENT "Post Build Instrumentation...")
-#  else (CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
+  if (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+    set (_INST ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe)
+    add_custom_command (TARGET ${TARGET}
+                        PRE_BUILD
+                        COMMAND ${_INST} pre_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
+                        COMMENT "Pre Build Instrumentation...")
+    add_custom_command (TARGET ${TARGET}
+                        POST_BUILD
+                        COMMAND ${_INST} post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
+                        COMMENT "Post Build Instrumentation...")
+  else (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
     set (_INST ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py)
     add_custom_command (TARGET ${TARGET}
                         PRE_BUILD
@@ -94,5 +94,5 @@
                         POST_BUILD
                         COMMAND ${_INST} post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
                         COMMENT "Post Build Instrumentation...")
-#  endif (CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
+  endif (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
 endfunction (seqan_add_sua_dependency TARGET)


Add include/trilinos to search pathes for trilinos

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

--- deal.II/cmake/modules/FindTRILINOS.cmake
+++ deal.II/cmake/modules/FindTRILINOS.cmake
@@ -42,6 +42,8 @@
     lib${LIB_SUFFIX}/cmake/Trilinos
     lib64/cmake/Trilinos
     lib/cmake/Trilinos
+    include/Trilinos
+    include/trilinos
   NO_SYSTEM_ENVIRONMENT_PATH
   )


[C++, Build] fix typo in Findjsmn.cmake

[C++, Build] fix typo in Findjsmn.cmake

Change-Id: I800c05441e7a2ddd6d05b2d022b5d462ae31b7b4

--- cpp/CMake/Findjsmn.cmake
+++ cpp/CMake/Findjsmn.cmake
@@ -2,5 +2,5 @@
 find_library(jsmn_LIBRARY libjsmn.a)

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(jmsn DEFAULT_MSG
+find_package_handle_standard_args(jsmn DEFAULT_MSG
     jsmn_LIBRARY jsmn_INCLUDE_DIR)


Removed unused BALLConfigOpenEye_Babel.cmake

--- cmake/BALLConfigOpenEye_Babel.cmake
+++ cmake/BALLConfigOpenEye_Babel.cmake
@@ -1,13 +0,0 @@
-FIND_PACKAGE(OpenEye)
-IF(NOT OPENEYE_FOUND)
-	FIND_PACKAGE(OpenBabel)
-	SET(PREFIX OPENBABEL)
-ELSE()
-	SET(PREFIX OPENEYE)
-ENDIF()
-
-IF(OPENBABEL_FOUND OR OPENEYE_FOUND)
-	SET(BALL_HAS_${PREFIX} TRUE)
-	LIST(APPEND BALL_DEP_LIBRARIES ${${PREFIX}_LIBRARIES})
-	INCLUDE_DIRECTORIES(${${PREFIX}_INCLUDE_DIRS})
-ENDIF()


Fix cross-compiling windows version detection

--- cmake/EigenDetermineOSVersion.cmake
+++ cmake/EigenDetermineOSVersion.cmake
@@ -26,7 +26,7 @@
 endfunction()

 function(DetermineOSVersion OS_VERSION)
-  if (WIN32)
+  if (WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
     file (TO_NATIVE_PATH "$ENV{COMSPEC}" SHELL)
     exec_program( ${SHELL} ARGS "/c" "ver" OUTPUT_VARIABLE ver_output)


remove an unused old cmake module file

remove an unused old cmake module file

--- cmake/Modules/FindMessagePack.cmake
+++ cmake/Modules/FindMessagePack.cmake
@@ -1,18 +0,0 @@
-# - Find MessagePack
-# Find the native MessagePack headers and libraries.
-#
-#  MessagePack_INCLUDE_DIRS - where to find msgpack.hpp, etc.
-#  MessagePack_LIBRARIES    - List of libraries when using MessagePack.
-#  MessagePack_FOUND        - True if MessagePack found.
-
-find_path(MessagePack_INCLUDE_DIR NAMES msgpack.hpp)
-
-find_library(MessagePack_LIBRARY NAMES libmsgpack msgpack)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(MessagePack DEFAULT_MSG MessagePack_LIBRARY MessagePack_INCLUDE_DIR)
-
-set(MessagePack_LIBRARIES ${MessagePack_LIBRARY})
-set(MessagePack_INCLUDE_DIRS ${MessagePack_INCLUDE_DIR})
-
-mark_as_advanced(MessagePack_LIBRARY MessagePack_INCLUDE_DIR)


hunter_download: Create HUNTER_*_CMAKE_ARGS variable

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -311,6 +311,11 @@
   file(REMOVE "${HUNTER_ARGS_FILE}")
   hunter_create_args_file("${package_cmake_args}" "${HUNTER_ARGS_FILE}")

+  # Pass the raw list of arguments to build scheme:
+  # * https://github.com/ruslo/hunter/blob/v0.23.18/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in#L95-L100
+  # * https://github.com/ruslo/hunter/issues/1525
+  set(HUNTER_${HUNTER_PACKAGE_NAME}_CMAKE_ARGS "${package_cmake_args}")
+
   # Check if package can be loaded from cache
   hunter_load_from_cache()


[doctest] adding the old version back in

--- cmake/projects/doctest/hunter.cmake
+++ cmake/projects/doctest/hunter.cmake
@@ -14,6 +14,17 @@
     PACKAGE_NAME
     doctest
     VERSION
+    "1.1.4-hunter-1"
+    URL
+    "https://github.com/piribes/doctest/archive/1.1.4-hunter-1.tar.gz"
+    SHA1
+    684580f4cf1f40ca7750bea90facc4564a807c2a
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    doctest
+    VERSION
     "1.2.0"
     URL
     "https://github.com/onqtam/doctest/archive/1.2.0.tar.gz"
@@ -22,6 +33,8 @@
 )

 hunter_cmake_args(doctest CMAKE_ARGS
+    DOCTEST_SKIP_EXAMPLES=ON
+    DOCTEST_SKIP_COVERAGE=ON
     DOCTEST_WITH_TESTS=OFF
 )


Enforcing cmake policy 0022 to old behavior.

--- system_definitions.cmake
+++ system_definitions.cmake
@@ -14,7 +14,7 @@
 # limitations under the License.
 #

-
+cmake_policy(SET CMP0022 OLD)

 ##
 # This file is the system level counterpart to the component_definitions file


Bump boost version to 1.55 in CMake build

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -5,7 +5,7 @@
 set(Caffe_COMPILE_OPTIONS "")

 # ---[ Boost
-find_package(Boost 1.46 REQUIRED COMPONENTS system thread filesystem)
+find_package(Boost 1.55 REQUIRED COMPONENTS system thread filesystem)
 list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${Boost_INCLUDE_DIRS})
 list(APPEND Caffe_LINKER_LIBS PUBLIC ${Boost_LIBRARIES})


try detecting OpenCV from .pc file

try detecting OpenCV from .pc file

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -5,13 +5,19 @@
 # Defines: OpenCV_FOUND, OpenCV_INCLUDE_DIRS, OpenCV_LIBS, OpenCV_LINK_LIBRARIES
 # ----------------------------------------------------------------------------
 if(DEFINED OpenCV_DIR)
+    get_filename_component(OpenCV_DIR_TYPE ${OpenCV_DIR} EXT)

-    find_package(OpenCV REQUIRED core highgui imgproc ml PATHS ${OpenCV_DIR})
+    if(OpenCV_DIR_EXT STREQUAL ".pc")
+
+        find_package(PkgConfig)
+        pkg_check_modules(OpenCV opencv)
+
+    else(OpenCV_DIR_EXT STREQUAL ".pc")
+        find_package(OpenCV REQUIRED core highgui imgproc ml PATHS ${OpenCV_DIR})
+    endif(OpenCV_DIR_EXT STREQUAL ".pc")

 else(DEFINED OpenCV_DIR)
-
     find_package(OpenCV REQUIRED core highgui imgproc ml)
-
 endif(DEFINED OpenCV_DIR)

 if(OpenCV_FOUND)
@@ -20,7 +26,5 @@
     list(APPEND ${ROOT_PROJECT}_LIBS ${OpenCV_LIBS})

 else(OpenCV_FOUND)
-
     message(SEND_ERROR "Failed to find OpenCV. Double check that \"OpenCV_DIR\" points to the root of an OpenCV build directory.")
-
 endif(OpenCV_FOUND)


disable non MLP2 code within Eigen3

disable non MLP2 code within Eigen3

--- cmake/dependencies.cmake
+++ cmake/dependencies.cmake
@@ -13,4 +13,4 @@
 # Eigen
 find_package(Eigen3 3.3 REQUIRED)
 include_directories(${EIGEN3_INCLUDE_DIR})
-add_definitions(-DEIGEN_DONT_PARALLELIZE)
+add_definitions(-DEIGEN_DONT_PARALLELIZE -DEIGEN_MPL2_ONLY)


Revert "update cub to 1.9.8, test=develop (#24895)" (#26504)

This reverts commit 0cb0318253a8372ce292822f6ed5513a1e20d30f.

--- cmake/external/cub.cmake
+++ cmake/external/cub.cmake
@@ -17,7 +17,7 @@
 set(CUB_PREFIX_DIR ${THIRD_PARTY_PATH}/cub)
 set(CUB_SOURCE_DIR ${THIRD_PARTY_PATH}/cub/src/extern_cub)
 set(CUB_REPOSITORY https://github.com/NVlabs/cub.git)
-set(CUB_TAG        1.9.8)
+set(CUB_TAG        1.8.0)

 cache_third_party(extern_cub
     REPOSITORY    ${CUB_REPOSITORY}


Update version for 5.9.6 release.

Update version for 5.9.6 release.

svn path=/trunk/; revision=11057

--- cmake/modules/plplot_version.cmake
+++ cmake/modules/plplot_version.cmake
@@ -1,15 +1,15 @@
 # For now, must set this by hand before each release.  This value affects
 # at least the documentation build and perhaps other parts of the release.
-set(RELEASE_DATE "2009-09-06")
+set(RELEASE_DATE "2010-06-05")

 # Version data that need review and possible modification for each release.

-set(VERSION 5.9.5)
+set(VERSION 5.9.6)

 # CPack version numbers for release tarball name.
 set(CPACK_PACKAGE_VERSION_MAJOR 5)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 5)
+set(CPACK_PACKAGE_VERSION_PATCH 6)

 # PLplot library version information.

@@ -43,7 +43,7 @@
 set(qsastime_VERSION ${qsastime_SOVERSION}.0.1)

 set(plplot_SOVERSION 9)
-set(plplot_VERSION ${plplot_SOVERSION}.7.0)
+set(plplot_VERSION ${plplot_SOVERSION}.8.0)

 set(plplotcxx_SOVERSION 9)
 set(plplotcxx_VERSION ${plplotcxx_SOVERSION}.3.0)


Package xproto: added dependency for xorg-macros

--- cmake/projects/xproto/hunter.cmake
+++ cmake/projects/xproto/hunter.cmake
@@ -5,6 +5,7 @@

 include(hunter_add_version)
 include(hunter_cacheable)
+include(hunter_cmake_args)
 include(hunter_configuration_types)
 include(hunter_download)
 include(hunter_pick_scheme)
@@ -23,9 +24,14 @@

 hunter_configuration_types(xproto CONFIGURATION_TYPES Release)
 hunter_pick_scheme(DEFAULT url_sha1_autotools)
+hunter_cmake_args(
+    xproto
+    CMAKE_ARGS
+      DEPENDS_ON_PACKAGES=xorg-macros
+)
 hunter_cacheable(xproto)
 hunter_download(
     PACKAGE_NAME xproto
-    PACKAGE_INTERNAL_DEPS_ID "1"
+    PACKAGE_INTERNAL_DEPS_ID "2"
     PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xproto.pc"
 )


update bullet

update bullet

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -80,7 +80,7 @@
 set(microstrain_depends common_utils)

 set(bullet_url https://github.com/RobotLocomotion/bullet-pod.git)
-set(bullet_revision 4319ffd7e9251066d93064f5a8dab12e33dbe5e2)
+set(bullet_revision 24b0a184e177c793a1b2f37f55d3544f2a7c33ae)
 set(bullet_depends)

 set(fovis_url ssh://git@github.com/fovis/fovis.git)


[numerics] fix linking issue

[numerics] fix linking issue

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -615,6 +615,6 @@
   END_TEST(SOCP/test)

   add_library(numerics-test SHARED ${TEST_UTILS_SOURCES})
-  target_link_libraries(numerics-test ${COMPONENT})
+  target_link_libraries(numerics-test ${PRIVATE} ${COMPONENT})
   target_link_libraries(numerics-test ${PRIVATE} ${${COMPONENT}_LINK_LIBRARIES})
 endif()


Keep silencing the thirdparty build logs for travis.

--- cmake/ThirdPartyDependenciesMacros.cmake
+++ cmake/ThirdPartyDependenciesMacros.cmake
@@ -43,7 +43,7 @@
     set(ThirdPartyLibrariesPatterns "" CACHE INTERNAL "List of built libraries glob patterns to bundle.")
 endif()

-option(LOG_THIRD_PARTY_BUILD_TO_FILE "Logs the build processes of third party dependencies to file if enabled, otherwise the output is " OFF)
+option(LOG_THIRD_PARTY_BUILD_TO_FILE "Logs the build processes of third party dependencies to file if enabled, otherwise the output is " ON)

 # Some variables that could be different for third party projects.
 if(NOT THIRDPARTY_C_COMPILER)


Force LF: basic-deps.info

Force LF: basic-deps.info

--- cmake/modules/hunter_save_to_cache.cmake
+++ cmake/modules/hunter_save_to_cache.cmake
@@ -144,9 +144,10 @@
   endif()
   set(basic_deps_info "${cache_meta_dir}/basic-deps.info")
   set(basic_deps_done "${cache_meta_dir}/basic-deps.DONE")
-  set(basic_deps_info_temp "${cache_meta_dir}/basic-deps.info-TEMP")
-
-  file(WRITE "${basic_deps_info_temp}" "")
+  set(basic_deps_info_nolf "${cache_meta_dir}/basic-deps.info.NOLF")
+  set(basic_deps_info_temp "${cache_meta_dir}/basic-deps.info.TEMP")
+
+  file(WRITE "${basic_deps_info_nolf}" "")
   list(LENGTH basic_dependencies len)
   if(len EQUAL 0)
     hunter_status_debug("No basic dependencies for package: ${human_readable}")
@@ -154,9 +155,18 @@
     hunter_status_debug("Basic dependencies for package: ${human_readable}")
     foreach(x ${basic_dependencies})
       hunter_status_debug("  ${x}")
-      file(APPEND "${basic_deps_info_temp}" "${x}\n")
+      file(APPEND "${basic_deps_info_nolf}" "${x}\n")
     endforeach()
   endif()
+
+  # About '@ONLY': no substitutions expected but COPYONLY can't be
+  # used with NEWLINE_STYLE
+  configure_file(
+      "${basic_deps_info_nolf}"
+      "${basic_deps_info_temp}"
+      @ONLY
+      NEWLINE_STYLE LF
+  )

   if(EXISTS "${basic_deps_info}")
     if(NOT EXISTS "${basic_deps_done}")


Updated FindMagnum.cmake documentation.

Updated FindMagnum.cmake documentation.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -16,11 +16,14 @@
 # Additional dependencies are specified by the components. The optional
 # components are:
 #
-#  GlutContext   - GLUT context (depends on GLUT package)
 #  MeshTools     - MeshTools library
 #  Physics       - Physics library
 #  Primitives    - Library with stock geometric primitives (static)
 #  Shaders       - Library with stock shaders
+#
+#  EglContext    - EGL context (depends on EGL and X11 libraries)
+#  GlutContext   - GLUT context (depends on GLUT library)
+#  Sdl2Context   - SDL2 context (depends on SDL2 library)
 #
 # Example usage with specifying additional components is:
 #


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -455,8 +455,8 @@
             # Dynamic plugins don't have any prefix (e.g. `lib` on Linux),
             # search with empty prefix and then reset that back so we don't
             # accidentaly break something else
-            set(_tmp_prefixes ${CMAKE_FIND_LIBRARY_PREFIXES})
-            set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
+            set(_tmp_prefixes "${CMAKE_FIND_LIBRARY_PREFIXES}")
+            set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};")

             # Try to find both debug and release version. Dynamic and static
             # debug libraries are in different places.


edit wildcard for excluding non-elm source from coverage report

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -142,10 +142,10 @@

 		# Capturing lcov counters and generating report
 		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info.tmp
-		COMMAND ${LCOV_PATH} --extract ${_outputname}.info.tmp 'elm/*' --output-file ${_outputname}.info.tmp
+		COMMAND ${LCOV_PATH} --extract ${_outputname}.info.tmp '*elm*' --output-file ${_outputname}.info.tmp
 		COMMAND ${LCOV_PATH} --remove ${_outputname}.info.tmp 'tests/*' 'test/*' '/usr/*' '/opt/*' 'opencv/modules/*' --output-file ${_outputname}.info
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info
-		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info.tmp
+		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info.tmp*

 		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."


exclude /opt/ from coverage report

exclude /opt/ from coverage report

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -142,7 +142,7 @@

 		# Capturing lcov counters and generating report
 		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+                COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' '/opt/*' --output-file ${_outputname}.info.cleaned
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
 		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned


CHG: Fix typo

CHG: Fix typo

--- cmake/FindOpenblas.cmake
+++ cmake/FindOpenblas.cmake
@@ -33,9 +33,9 @@
 # Look for includes
 FIND_PATH(OPENBLAS_INCLUDE_DIR NAMES cblas.h HINTS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
 # Library
-FIND_LIBRARY(OPENBLAS_LIBRARIES NAMES ${OPENBLAS_NAMES} HINTS ${OPENLAS_LIB_SEARCH_PATHS})
+FIND_LIBRARY(OPENBLAS_LIBRARIES NAMES ${OPENBLAS_NAMES} HINTS ${OPENBLAS_LIB_SEARCH_PATHS})

-# handle the QUIETLY and REQUIRED arguments and set FlyCapture_FOUND to TRUE if
+# handle the QUIETLY and REQUIRED arguments and set BLAS_FOUND to TRUE if
 # all listed variables are TRUE
 INCLUDE( "FindPackageHandleStandardArgs" )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( "BLAS" DEFAULT_MSG OPENBLAS_INCLUDE_DIR OPENBLAS_LIBRARIES)


Fix wrong directory structure in install/include

--- cmake/Installation.cmake
+++ cmake/Installation.cmake
@@ -16,8 +16,9 @@

 # libbiodynamo.so
 install(TARGETS biodynamo LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-# headers
-install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+# headers and python scripts
+install(DIRECTORY src/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+        FILES_MATCHING PATTERN "*.h" PATTERN "*.py")
 #   third party headers
 file(GLOB MPARK_HEADERS ${CMAKE_BINARY_DIR}/mpark/mpark/*)
 install(FILES ${MPARK_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mpark)


Install to dist-packages by default on ubuntu.

--- cmake/ectoFindDeps.cmake
+++ cmake/ectoFindDeps.cmake
@@ -24,10 +24,12 @@
 string(REGEX MATCH "[0-9].[0-9]" PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_FULL}")

 if(UNIX)
-    set(PYTHON_PLUGIN_INSTALL_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages/opencv)
-    set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages)
+    if(APPLE)
+        set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages CACHE PATH "Where to install the python packages.")
+    else() #debian based assumed, install to the dist-packages.
+        set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages CACHE PATH "Where to install the python packages.")
+    endif()
 elseif(WIN32)
     get_filename_component(PYTHON_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION_MAJOR_MINOR}\\InstallPath]" ABSOLUTE CACHE)
-    set(PYTHON_PLUGIN_INSTALL_PATH "${PYTHON_PATH}/Lib/site-packages/opencv")
-    set(PYTHON_PACKAGES_PATH "${PYTHON_PATH}/Lib/site-packages")
+    set(PYTHON_PACKAGES_PATH "${PYTHON_PATH}/Lib/site-packages" CACHE PATH "Where to install the python packages.")
 endif()


update xpu cmake: xdnn 0601 (#43051)

update xpu cmake: xdnn 0601 (#43051)

* update xpu cmake: xdnn 0527. test=kunlun

* update to xdnn 0531.

* update to xdnn 0531. test=kunlun

* update to xdnn 0601. test=kunlun

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -9,7 +9,7 @@

 if(NOT DEFINED XPU_BASE_URL)
   SET(XPU_BASE_URL_WITHOUT_DATE "https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev")
-  SET(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20220520")
+  SET(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20220601")
 else()
   SET(XPU_BASE_URL "${XPU_BASE_URL}")
 endif()
@@ -17,7 +17,7 @@
 # ubuntu and centos: use output by XDNN API team
 if(NOT DEFINED XPU_XDNN_BASE_URL)
   SET(XPU_XDNN_BASE_URL_WITHOUT_DATE "https://klx-sdk-release-public.su.bcebos.com/xdnn/dev")
-  SET(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL_WITHOUT_DATE}/20220520")
+  SET(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL_WITHOUT_DATE}/20220601")
 else()
   SET(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL}")
 endif()


fix obj-c compile errors on cmake >= 3.20 (#277)

* fix obj-c compile errors on cmake >= 3.20

* format fix

--- cmake/fips_private.cmake
+++ cmake/fips_private.cmake
@@ -238,8 +238,12 @@

         if (FIPS_OSX)
             # mark .m as .c file for older cmake versions (bug is fixed in cmake 3.1+)
-            if ("${f_ext}" STREQUAL ".m")
-                set_source_files_properties(${cur_file} PROPERTIES LANGUAGE C)
+            # breaks in CMake 3.20+
+            # see: https://cmake.org/cmake/help/latest/policy/CMP0119.html#policy:CMP0119
+            if (${CMAKE_VERSION} VERSION_LESS "3.1.0")
+                if ("${f_ext}" STREQUAL ".m")
+                    set_source_files_properties(${cur_file} PROPERTIES LANGUAGE C)
+                endif()
             endif()

             # handle plist files special


CMake: Prevent CMake error if list is empty on message

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -38,6 +38,7 @@
 #--------------------------------------------------------------------
 # Only output error messages
 function(message)
+if( GET )
   list(GET ARGV 0 MessageType)
   if(MessageType STREQUAL FATAL_ERROR OR
      MessageType STREQUAL SEND_ERROR OR
@@ -46,6 +47,7 @@
     list(REMOVE_AT ARGV 0)
     _message(STATUS "${ARGV}")
   endif()
+endif()
 endfunction()
 function(ivw_message)
     _message(${ARGV})


set CMAKE_COMPILER_ID to GNU in iOS toolchain

The current ios toolchain is GNU based but the iOSToolchain.cmake
set the CMAKE_COMPILER_ID to gcc which isn't known by cmake.

--- cmake/iOSToolchain.cmake
+++ cmake/iOSToolchain.cmake
@@ -46,8 +46,8 @@
 # Force the compilers to gcc for iOS
 if(NOT CMAKE_C_COMPILER)
 	include (CMakeForceCompiler)
-	CMAKE_FORCE_C_COMPILER (gcc gcc)
-	CMAKE_FORCE_CXX_COMPILER (g++ g++)
+	CMAKE_FORCE_C_COMPILER (gcc GNU)
+	CMAKE_FORCE_CXX_COMPILER (g++ GNU)
 endif()

 # Skip the platform compiler checks for cross compiling


build: grpc needs openssl and pkg-config now

Co-authored-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/gRPC.cmake
+++ cmake/modules/gRPC.cmake
@@ -66,6 +66,11 @@
   endif()

 else()
+  find_package(PkgConfig)
+    if(NOT PKG_CONFIG_FOUND)
+      message(FATAL_ERROR "pkg-config binary not found")
+  endif()
+  message(STATUS "Found pkg-config executable: ${PKG_CONFIG_EXECUTABLE}")
   set(GRPC_SRC "${PROJECT_BINARY_DIR}/grpc-prefix/src/grpc")
   set(GRPC_INCLUDE "${GRPC_SRC}/include")
   set(GRPC_LIBS_ABSOLUTE "${GRPC_SRC}/libs/opt")
@@ -86,26 +91,31 @@
   message(STATUS "Using bundled gRPC in '${GRPC_SRC}'")
   message(
     STATUS
-      "Bundled gRPC comes with ---> protobuf: compiler: ${PROTOC}, include: ${PROTOBUF_INCLUDE}, lib: ${PROTOBUF_LIB}")
-  message(STATUS "Bundled gRPC comes with ---> zlib: include: ${ZLIB_INCLUDE}, lib: ${ZLIB_LIB}}")
-  message(STATUS "Bundled gRPC comes with ---> gRPC cpp plugin: include: ${GRPC_CPP_PLUGIN}")
+      "Bundled gRPC comes with protobuf: compiler: ${PROTOC}, include: ${PROTOBUF_INCLUDE}, lib: ${PROTOBUF_LIB}")
+  message(STATUS "Bundled gRPC comes with zlib: include: ${ZLIB_INCLUDE}, lib: ${ZLIB_LIB}}")
+  message(STATUS "Bundled gRPC comes with gRPC C++ plugin: include: ${GRPC_CPP_PLUGIN}")

   get_filename_component(PROTOC_DIR ${PROTOC} PATH)

   ExternalProject_Add(
     grpc
+    DEPENDS openssl
     GIT_REPOSITORY https://github.com/grpc/grpc.git
-    GIT_TAG v1.26.0
+    GIT_TAG v1.25.0
     GIT_SUBMODULES "third_party/protobuf third_party/zlib third_party/cares/cares"
     BUILD_IN_SOURCE 1
     BUILD_BYPRODUCTS ${GRPC_LIB} ${GRPCPP_LIB}
     INSTALL_COMMAND ""
     CONFIGURE_COMMAND ""
+    PATCH_COMMAND patch -p1 < ${PROJECT_SOURCE_DIR}/cmake/patch/grpc-1.25.0-Makefile.patch
     BUILD_COMMAND
       CFLAGS=-Wno-implicit-fallthrough
+      LDFLAGS=-static
       HAS_SYSTEM_ZLIB=false
       HAS_SYSTEM_PROTOBUF=false
       HAS_SYSTEM_CARES=false
+      PKG_CONFIG_PATH=${OPENSSL_BUNDLE_DIR}
+      PKG_CONFIG=${PKG_CONFIG_EXECUTABLE}
       PATH=${PROTOC_DIR}:$ENV{PATH}
       make
       static_cxx


No longer needed.  Switched to using CMake builtin helper

--- src/lio/cmake/FindOpenSSL.cmake
+++ src/lio/cmake/FindOpenSSL.cmake
@@ -1,103 +0,0 @@
-# - Try to find the OpenSSL encryption library
-# Once done this will define
-#
-#  OPENSSL_FOUND - system has the OpenSSL library
-#  OPENSSL_INCLUDE_DIR - the OpenSSL include directory
-#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
-
-if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-
-  # in cache already
-  SET(OPENSSL_FOUND TRUE)
-
-else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-
-  FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h
-     $ENV{HOME}/include/
-     /usr/include/
-     /usr/local/include/
-     $ENV{ProgramFiles}/OpenSSL/include/
-     $ENV{SystemDrive}/OpenSSL/include/
-  )
-
-  if(WIN32 AND MSVC)
-      # /MD and /MDd are the standard values - if somone wants to use
-      # others, the libnames have to change here too
-      # see http://www.openssl.org/support/faq.html#PROG2 for their meaning
-
-      FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-      FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-      FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-      FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-
-      IF(MSVC_IDE)
-        IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-            SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG})
-        ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-          MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl")
-        ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-      ELSE(MSVC_IDE)
-        STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
-        IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-          SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG})
-        ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-          SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE})
-        ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-      ENDIF(MSVC_IDE)
-      MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE LIB_EAY_DEBUG LIB_EAY_RELEASE)
-  else(WIN32 AND MSVC)
-
-   FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD libeay32 libeay32MD
-      PATHS
-      $ENV{HOME}/lib/
-      /usr/lib
-      /usr/local/lib
-   )
-   FIND_LIBRARY(CRYPTO_LIBRARIES crypto
-      PATHS
-      $ENV{HOME}/lib/
-      /usr/lib
-      /usr/local/lib
-   )
-
-  endif(WIN32 AND MSVC)
-
-  if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-     set(OPENSSL_FOUND TRUE)
-  endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-
-  if (CRYPTO_LIBRARIES)
-     set(CRYPTO_FOUND TRUE)
-     message(STATUS "Found libcrypto: ${CRYPTO_LIBRARIES}")
-  endif (CRYPTO_LIBRARIES)
-
-  if (OPENSSL_FOUND)
-     if (NOT OpenSSL_FIND_QUIETLY)
-        message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES} ${OPENSSL_INCLUDE_DIR}")
-     endif (NOT OpenSSL_FIND_QUIETLY)
-  else (OPENSSL_FOUND)
-     if (OpenSSL_FIND_REQUIRED)
-        message(FATAL_ERROR "Could NOT find OpenSSL")
-     endif (OpenSSL_FIND_REQUIRED)
-  endif (OPENSSL_FOUND)
-
-  MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-
-endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-


fix: android debug build

fix: android debug build

--- toolchains/android.cmake
+++ toolchains/android.cmake
@@ -30,8 +30,11 @@
 set(ANDROID_PROJECT_DIR ${PROJECT_SOURCE_DIR}/android/tangram)

 if(CMAKE_BUILD_TYPE MATCHES Debug)
-include(toolchains/android.gdb.cmake)
-android_ndk_gdb_enable()
+ if(POLICY CMP0026)
+   cmake_policy(SET CMP0026 OLD)
+ endif()
+ include(toolchains/android.gdb.cmake)
+ android_ndk_gdb_enable()
 endif()

 set(LIB_NAME tangram) # in order to have libtangram.so
@@ -61,7 +64,7 @@
   -fPIC)

 if(CMAKE_BUILD_TYPE MATCHES Debug)
-android_ndk_gdb_debuggable(${LIB_NAME})
+  android_ndk_gdb_debuggable(${LIB_NAME})
 endif()

 # install to android library dir


Made dashboard script template more user-friendly.

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -26,7 +26,8 @@
 #set(CTEST_DASHBOARD_ROOT "C:/dartclients")

 # The directory containing the Qt binaries
-set(QT_BINARY_DIR "/home/user/Qt/5.4/gcc_64/bin")
+set(QT5_INSTALL_PREFIX "/home/user/Qt/5.4/gcc_64")
+set(QT_BINARY_DIR "${QT5_INSTALL_PREFIX}/bin")
 # For Windows, e.g.
 #set(QT_BINARY_DIR "C:/Qt/5.4/msvc2013_64_opengl/bin")

@@ -92,7 +93,7 @@
 # Use the MITK_INITIAL_CACHE the pass variables to the MITK-Build.
 # add entries like this
 #MITK_USE_OpenCV:BOOL=OFF
-CMAKE_PREFIX_PATH:PATH=/home/user/Qt/5.4/gcc_64
+CMAKE_PREFIX_PATH:PATH=${QT5_INSTALL_PREFIX}
 DESIRED_QT_VERSION:STRING=5
 ")


DOC: Wiki examples update to 2016-05-22.

Change-Id: I49061d370747c6095360f9423969427b282c04f7

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -4,9 +4,8 @@

 # If the environment var RemoteGitTag exists, use it
 if (NOT DEFINED ENV{RemoteGitTag})
-  # February 18, 2016
-  # Additional tests and baselines
-  set(GIT_TAG 5b474c63f04d17c7773abd1e33f9ea295d291e59)
+  # May 22, 2016
+  set(GIT_TAG 1a2a68ca98966bff35ba9332619ffbb9a278d0e9)
 else()
   set(GIT_TAG $ENV{RemoteGitTag})
 endif()


Add debug info.

Add debug info.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -38,6 +38,10 @@
 	elseif(PROJ_TYPE STREQUAL "SHARED")
 		set(OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 	endif()
+
+    if(DEFINED DSN_DEBUG_CMAKE)
+        message(STATUS "OUTPUT_DIRECTORY = ${OUTPUT_DIRECTORY}")
+    endif()

     if(PROJ_LANG STREQUAL "CXX")
         if(NOT (PROJ_INC_PATH STREQUAL ""))


Add linker flags

Add linker flags

--- data/findOpenFrameworks-v0.9.cmake
+++ data/findOpenFrameworks-v0.9.cmake
@@ -30,6 +30,15 @@
             -D_UNICODE
             -DUNICODE
             )
+
+        set(OF_LINKER_FLAGS
+            /NODEFAULTLIB:PocoFoundationmdd.lib
+            /NODEFAULTLIB:atlthunk.lib
+            /NODEFAULTLIB:msvcrt
+            /NODEFAULTLIB:libcmt
+            /NODEFAULTLIB:LIBC
+            /NODEFAULTLIB:LIBCMTD
+            )
     else()
         ADD_DEFINITIONS(
             -DWIN32
@@ -41,7 +50,16 @@
             -D_UNICODE
             -DUNICODE
             )
+
+        set(OF_LINKER_FLAGS
+            /NODEFAULTLIB:PocoFoundationmd.lib
+            /NODEFAULTLIB:LIBCMT
+            /NODEFAULTLIB:LIBC.LIBS
+            /NODEFAULTLIB:atlthunk.lib
+            )
     endif(DEBUG_MODE)
+
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OF_LINKER_FLAGS}")
 endif(MSVC)

 #BOOST


fix path of cmake_runtime_output_directory

--- tools/cmake/common.cmake
+++ tools/cmake/common.cmake
@@ -107,7 +107,7 @@
 )

 if(MINGW OR UNIX)
-  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dist/bin)
+  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dist/bin)
 endif(MINGW OR UNIX)

 add_executable(${APP} WIN32 ${HDRS} ${SRCS})


BUG: Missing VTK_DIR in initial cache when re-building using a script

When ctest -S is run, we overwrite the current cmakecache.txt file so
that the values in the script are used.  However, any user-specified
or cmake-derived values from the initial run (e.g., VTK_DIR) are lost!
The current solution is hack-ish.  Ideally we should only modify the
necessary variables in the current cache, not replace all of them.

--- DashboardScripts/tubetk_cmakecache.cmake
+++ DashboardScripts/tubetk_cmakecache.cmake
@@ -1,28 +1,28 @@
 ##############################################################################
-#
+#
 # Library:   TubeTK
-#
+#
 # Copyright 2010 Kitware Inc. 28 Corporate Drive,
 # Clifton Park, NY, 12065, USA.
-#
-# All rights reserved.
-#
+#
+# All rights reserved.
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-#
+#
 #       http://www.apache.org/licenses/LICENSE-2.0
-#
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
+#
 ##############################################################################

 set( CTEST_SITE "${SITE_NAME}" )
-set( CTEST_BUILD_NAME
+set( CTEST_BUILD_NAME
   "${SITE_BUILD_NAME}-${SCRIPT_NAME}-$ENV{TUBETK_RUN_MODEL}" )
 set( CTEST_BUILD_CONFIGURATION "${SITE_BUILD_TYPE}" )

@@ -49,17 +49,17 @@

 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SITE_CXX_FLAGS}" )
 set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SITE_C_FLAGS}" )
-set( CMAKE_EXE_LINKER_FLAGS
+set( CMAKE_EXE_LINKER_FLAGS
   "${CMAKE_EXE_LINKER_FLAGS} ${SITE_EXE_LINKER_FLAGS}" )
-set( CMAKE_SHARED_LINKER_FLAGS
+set( CMAKE_SHARED_LINKER_FLAGS
   "${CMAKE_SHARED_LINKER_FLAGS} ${SITE_SHARED_LINKER_FLAGS}" )

 set( CTEST_COVERAGE_COMMAND "${SITE_COVERAGE_COMMAND}" )

 set( CTEST_MEMORYCHECK_COMMAND "${SITE_MEMORYCHECK_COMMAND}" )
-set( CTEST_MEMORYCHECK_COMMAND_OPTIONS
+set( CTEST_MEMORYCHECK_COMMAND_OPTIONS
   "${SITE_MEMORYCHECK_COMMAND_OPTIONS}" )
-set( CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
+set( CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
   "${SITE_MEMORYCHECK_SUPPRESSIONS_FILE}" )

 message( "Running ${SCRIPT_NAME} script..." )
@@ -86,30 +86,37 @@
   " )

 if( EXISTS ${SITE_BINARY_DIR}/Insight-Build/CMakeCache.txt )
-  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
     "
     ITK_DIR:PATH=${SITE_BINARY_DIR}/Insight-Build
     " )
 endif()

 if( EXISTS ${SITE_BINARY_DIR}/GenerateCLP-Build/CMakeCache.txt)
-  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
     "
     GenerateCLP_DIR:PATH=${SITE_BINARY_DIR}/GenerateCLP-Build
     " )
 endif()

 if( EXISTS ${SITE_BINARY_DIR}/OpenIGTLink-Build/CMakeCache.txt )
-  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
     "
     OpenIGTLink_DIR:PATH=${SITE_BINARY_DIR}/OpenIGTLink-Build
     " )
 endif()

 if( EXISTS ${SITE_BINARY_DIR}/CTK-Build/CMakeCache.txt )
-  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
     "
     CTK_DIR:PATH=${SITE_BINARY_DIR}/CTK-Build
     " )
 endif()

+if( EXISTS ${SITE_BINARY_DIR}/VTK-Build/CMakeCache.txt )
+  file( APPEND "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+    "
+    VTK_DIR:PATH=${SITE_BINARY_DIR}/VTK-Build
+    " )
+endif()
+


WIN32 compilation of the PARAVIS module.

--- salome_adm/cmake_files/FindSalomeVTK.cmake
+++ salome_adm/cmake_files/FindSalomeVTK.cmake
@@ -37,6 +37,7 @@
   vtkFiltersVerdict
   vtkRenderingLabel
   vtkInteractionWidgets
+  vtkInfovisCore
 )

 #   Seting the following variable is equivalent to having passed the components


BUG: Required GCC version for gold linker is 4.8.3.

Test failures (MinimumDecesionRuleTest, EuclideanDistanceTest,
GaussianDensityFunctionTest, MaximumDecisionRuleTest, and
MaximumRatioDecisionRuleTest) were observed to fail with 4.8.2.

Change-Id: I677bffd2fd79a982974c4e844f535903443358ae

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -196,7 +196,7 @@
       set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -Wno-array-bounds")
     endif()

-    if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.7" AND
+    if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.8.3" AND
        "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
       ITK_CHECK_CXX_COMPILER_FLAG("-fuse-ld=gold" have_gold)
       if(have_gold)


ENH: Bump ExternalInsight version.

ENH: Bump ExternalInsight version.

Bump ITK to the latest version in Slicer.  This is the commit
on the release branch that will likely be ITK v4.4.1.

Closes issue #30.

Change-Id: I3186240cc8c500009f7c798f6f135460f76e2a2c

--- CMake/Superbuild/External_Insight.cmake
+++ CMake/Superbuild/External_Insight.cmake
@@ -49,8 +49,8 @@

   ExternalProject_Add( ${proj}
     GIT_REPOSITORY "${GIT_PROTOCOL}://itk.org/ITK.git"
-    # master on 2013-02-28
-    GIT_TAG "9fe3eaaac2321f"
+    # release on 2013-07-10
+    GIT_TAG "41abd503c51277d4ead198e6dbe5020d5a0c6bbf"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${ITK_DIR}
     CMAKE_GENERATOR ${gen}


CMake: ios.toolchain - silence warnings with newer CMake versions

--- CMake/toolchain/ios.toolchain.xcode.cmake
+++ CMake/toolchain/ios.toolchain.xcode.cmake
@@ -50,10 +50,11 @@
   string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
 endif ()

-# Force the compilers to gcc for iOS
-include (CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
-CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
+# Force the compilers for iOS
+# deprecated with CMake 3.5. uncomment below if you use an older version.
+# include (CMakeForceCompiler)
+# CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
+# CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
 set(CMAKE_AR ar CACHE FILEPATH "" FORCE)

 # Skip the platform compiler checks for cross compiling


Version 2.4.8

Version 2.4.8

--- VERSION.cmake
+++ VERSION.cmake
@@ -44,10 +44,10 @@
 #    set COMPATMINOR to MINOR. (binary incompatible change)
 #

-# Package version 2.4.7
+# Package version 2.4.8
 SET(OPENWSMAN_MAJOR "2")
 SET(OPENWSMAN_MINOR "4")
-SET(OPENWSMAN_PATCH "7")
+SET(OPENWSMAN_PATCH "8")

 # Plugin API 2.2
 SET(OPENWSMAN_PLUGIN_API_MAJOR "2")


Build: Fix cross-compiling on Android failing due to -latomic check (#3560)

Currently when cross-compiling for Android build fails due to usage of
TRY_RUN(). In the particular case it tries to figure out whether atomics
can be used without the libatomic library.

Fortunately we don't need this check because on Android NDK atomics are
built-in and libatomic.so is not present. Only static dummy libatomic.a
exists for compatibility with -latomic flag.

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -347,7 +347,7 @@
 # Check if we need libatomic on this platform.  We shouldn't on mainstream
 # x86/x86_64, but might on some other platforms.
 #
-if (NOT MSVC AND NOT APPLE)
+if (NOT MSVC AND NOT APPLE AND NOT ANDROID)
     cmake_push_check_state ()
     check_cxx_source_runs(
        "#include <atomic>


Use hidden visibility with GCC and Clang am: 0fa7ebccc4 am: 13641fa112 am: ce28e6a975
am: 9b193e525e

Change-Id: I2ce6b8077e1777e9ad0c3276c049aee3812966c4

--- framework/delibs/cmake/CFlags.cmake
+++ framework/delibs/cmake/CFlags.cmake
@@ -53,6 +53,11 @@
 	# Turn on -Wstrict-overflow=5 and check all warnings before removing
 	set(CMAKE_C_FLAGS			"${CMAKE_C_FLAGS} -fwrapv")
 	set(CMAKE_CXX_FLAGS			"${CMAKE_CXX_FLAGS} -fwrapv")
+
+	# Force compiler to not export any symbols.
+	# Any static libraries build are linked into the standalone executable binaries.
+	set(CMAKE_C_FLAGS			"${CMAKE_C_FLAGS} -fvisibility=hidden")
+	set(CMAKE_CXX_FLAGS			"${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
 elseif (DE_COMPILER_IS_MSC)
 	# Compiler flags for msc


Reactivated ToFImageRecorderTest

Reactivated ToFImageRecorderTest

--- Modules/ToFHardware/Testing/files.cmake
+++ Modules/ToFHardware/Testing/files.cmake
@@ -4,10 +4,10 @@
   mitkToFCameraMITKPlayerDeviceTest.cpp
   mitkToFCameraPMDCamBoardControllerTest.cpp
   mitkToFCameraPMDCamBoardDeviceTest.cpp
-  mitkToFCameraPMDRawDataCamBoardDeviceTest.cpp
+#  mitkToFCameraPMDRawDataCamBoardDeviceTest.cpp
   mitkToFCameraPMDCamCubeControllerTest.cpp
   mitkToFCameraPMDCamCubeDeviceTest.cpp
-  #mitkToFCameraPMDRawDataCamCubeDeviceTest.cpp
+# mitkToFCameraPMDRawDataCamCubeDeviceTest.cpp
   mitkToFCameraPMDControllerTest.cpp
   mitkToFCameraPMDDeviceTest.cpp
   mitkToFCameraPMDRawDataDeviceTest.cpp
@@ -19,7 +19,7 @@
   mitkToFCameraPMDPlayerDeviceTest.cpp
   mitkToFImageCsvWriterTest.cpp
   mitkToFImageGrabberTest.cpp
-  #mitkToFImageRecorderTest.cpp
+  mitkToFImageRecorderTest.cpp
   #mitkToFImageRecorderFilterTest.cpp
   mitkToFImageWriterTest.cpp
   #mitkToFNrrdImageWriterTest.cpp


COMP: message

COMP: message

--- CMake/selxModules.cmake
+++ CMake/selxModules.cmake
@@ -78,7 +78,7 @@

 	# scan for interface header files
 	if(EXISTS "${CMAKE_SOURCE_DIR}/${${MODULE}_PATH}/interfaces/")
-	  message(STATUS "Found ${CMAKE_SOURCE_DIR}/${${MODULE}_PATH}/interfaces")
+	  message(STATUS "   Including: ${CMAKE_SOURCE_DIR}/${${MODULE}_PATH}/interfaces")
 	  list( APPEND SUPERELASTIX_INTERFACE_DIRS "${CMAKE_SOURCE_DIR}/${${MODULE}_PATH}/interfaces" )
 	endif()
   endforeach()


Added OpenCV binary dir to path for Windows tests.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -36,8 +36,9 @@
   set(VTK_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/VTK-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(ITK_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/ITK-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(GDCM_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/GDCM-build/bin/${CTEST_BUILD_CONFIGURATION}")
+  set(OPENCV_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/OpenCV-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(BLUEBERRY_OSGI_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin/${CTEST_BUILD_CONFIGURATION}")
-  set(CTEST_PATH "${CTEST_PATH};${QT_BINARY_DIR};${VTK_BINARY_DIR};${ITK_BINARY_DIR};${GDCM_BINARY_DIR};${BLUEBERRY_OSGI_DIR}")
+  set(CTEST_PATH "${CTEST_PATH};${QT_BINARY_DIR};${VTK_BINARY_DIR};${ITK_BINARY_DIR};${GDCM_BINARY_DIR};${OPENCV_BINARY_DIR};${BLUEBERRY_OSGI_DIR}")
 endif()
 set(ENV{PATH} "${CTEST_PATH}")


CMake: Fix msbuild failures when invoked from Xcode.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -294,6 +294,9 @@
     if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
         # Workaround for some cases where csc has issues when invoked by CMake.
         set (TERM_WORKAROUND env TERM=xterm)
+    elseif ("${CMAKE_GENERATOR}" STREQUAL "Xcode")
+        # Xcode adds something to environment which makes msbuild targets fail. Invoke msbuild with clean environment instead.
+        set (TERM_WORKAROUND env -i)
     endif ()
     if (CMAKE_VS_MSBUILD_COMMAND)
         set (MSBUILD ${CMAKE_VS_MSBUILD_COMMAND} CACHE STRING "")


next version on this branch will be 3.0.12

--- CMakeModules/WTS-Package.cmake
+++ CMakeModules/WTS-Package.cmake
@@ -1,7 +1,7 @@
 SET(PROJECT_NAME_LONG "Watch That Sound Tool")
 SET(CPACK_PACKAGE_VERSION_MAJOR "3")
 SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "11")
+SET(CPACK_PACKAGE_VERSION_PATCH "12")
 SET(PROJECT_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
 SET(APPLICATION_NAME ${PROJECT_NAME})


cmake: fine-grained detection of compiler flags (#458)

--- src/cmake/common-settings.cmake
+++ src/cmake/common-settings.cmake
@@ -20,6 +20,25 @@

 #
+# Macro for automatically detect compiler flag
+#
+macro(compile_flag  flag varname)
+	check_cxx_compiler_flag("${flag}" "YUNI_HAS_CXX_FLAG_${varname}")
+	if ("${YUNI_HAS_CXX_FLAG_${varname}}")
+		foreach (arg ${ARGN})
+			set("CMAKE_CXX_FLAGS_${arg}" "${CMAKE_CXX_FLAGS_${arg}} ${flag}")
+		endforeach()
+	endif()
+	check_c_compiler_flag("${flag}" "YUNI_HAS_C_FLAG_${varname}")
+	if ("${YUNI_HAS_C_FLAG_${varname}}")
+		foreach (arg ${ARGN})
+			set("CMAKE_C_FLAGS_${arg}" "${CMAKE_C_FLAGS_${arg}} ${flag}")
+		endforeach()
+	endif()
+endmacro()
+
+
+#
 # Clang Detection
 #
 if (CMAKE_CXX_COMPILER MATCHES ".*clang")
@@ -41,20 +60,10 @@

 # Common options to all GCC-based compilers
-set(YUNI_COMMON_CC_OPTIONS   "-Wall -Wextra -Wunused-parameter -Wconversion")
-set(YUNI_COMMON_CXX_OPTIONS  "-Woverloaded-virtual")
-if(NOT MSVC)
-	check_cxx_compiler_flag("-Wunused-but-set-variable -Wunused-but-set-parameter"
-		YUNI_HAS_GCC_UNUSED_BUT_PARAM)
-	if (YUNI_HAS_GCC_UNUSED_BUT_PARAM)
-		set(YUNI_COMMON_CC_OPTIONS  "${YUNI_COMMON_CC_OPTIONS} -Wunused-but-set-variable -Wunused-but-set-parameter")
-	endif (YUNI_HAS_GCC_UNUSED_BUT_PARAM)
-endif()
-
-set(YUNI_COMMON_CC_OPTIONS  "${YUNI_COMMON_CC_OPTIONS} -Wmissing-noreturn -Wcast-align  -Wfloat-equal -Wundef")
+set(YUNI_COMMON_CC_OPTIONS   "")
 set(YUNI_COMMON_CC_OPTIONS  "${YUNI_COMMON_CC_OPTIONS} -D_REENTRANT -DXUSE_MTSAFE_API")
 set(YUNI_COMMON_CC_OPTIONS  "${YUNI_COMMON_CC_OPTIONS} -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64")
-
+set(YUNI_COMMON_CXX_OPTIONS  "")

 set(COMMON_MSVC_FLAGS "/W3 /MP4 /Zi")
 set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /DREENTRANT /D_LARGEFILE_SOURCE /D_LARGEFILE64_SOURCE /D_FILE_OFFSET_BITS=64")
@@ -71,12 +80,6 @@
 	check_cxx_compiler_flag("-std=c++11"     YUNI_HAS_CPP11_SUPPORT)
 	check_cxx_compiler_flag("-std=c++0x"     YUNI_HAS_GCC_CPP0X_SUPPORT)
 	check_cxx_compiler_flag("-stdlib=libc++" YUNI_HAS_LIB_CPP11_SUPPORT) # clang, Apple gcc...
-	check_cxx_compiler_flag("-g"             YUNI_HAS_COMPILER_DEBUG_INFORMATION)
-	check_cxx_compiler_flag("-O3"            YUNI_HAS_COMPILER_OPTIMIZATION_LEVEL_3)
-	if (CLANG)
-		# currently, only clang really supports -O4
-		check_cxx_compiler_flag("-O4"        YUNI_HAS_COMPILER_OPTIMIZATION_LEVEL_4)
-	endif()

 	if (YUNI_HAS_CPP14_SUPPORT)
 		set(YUNI_COMMON_CXX_OPTIONS  "${YUNI_COMMON_CXX_OPTIONS} -std=c++14")
@@ -92,26 +95,13 @@
 	if (YUNI_HAS_LIB_CPP11_SUPPORT)
 		set(YUNI_COMMON_CXX_OPTIONS  "${YUNI_COMMON_CXX_OPTIONS} -stdlib=libc++")
 	endif()
-endif()
-if (NOT MSVC AND NOT CLANG)
-	# clang produces the warning "argument unused during compilation"
-	check_cxx_compiler_flag("-ggdb"  YUNI_HAS_GCC_FLAG_GGDB)
-	# clang produces the warning "argument unused during compilation"
-	check_cxx_compiler_flag("-ggdb3" YUNI_HAS_GCC_FLAG_GGDB3)
-endif()
-
-if (APPLE)
+
+endif()
+
+if (APPLE AND CLANG)
 	# http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-January/012999.html
 	# Temporary workaround for compiling with Clang on OS X
 	set(YUNI_COMMON_CC_OPTIONS_UNIX  "${YUNI_COMMON_CC_OPTIONS_UNIX} -U__STRICT_ANSI__")
-endif()
-
-set(COMPILER_OPTIMIZATION_LEVEL "")
-if (YUNI_HAS_COMPILER_OPTIMIZATION_LEVEL_3)
-	set(COMPILER_OPTIMIZATION_LEVEL "-O3")
-endif()
-if (YUNI_HAS_COMPILER_OPTIMIZATION_LEVEL_4)
-	set(COMPILER_OPTIMIZATION_LEVEL "-O4")
 endif()

@@ -131,23 +121,23 @@

 if(NOT WIN32)
-	set(CMAKE_CXX_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS_UNIX} ${YUNI_COMMON_CXX_OPTIONS} ${COMPILER_OPTIMIZATION_LEVEL} -fomit-frame-pointer -fstrict-aliasing -momit-leaf-frame-pointer -fno-tree-pre -falign-loops -mfpmath=sse -msse -msse2 -Wuninitialized")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS_UNIX} ${YUNI_COMMON_CXX_OPTIONS} ${COMPILER_OPTIMIZATION_LEVEL} -fomit-frame-pointer -mfpmath=sse -msse -msse2")
-	set(CMAKE_CXX_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS_UNIX} ${YUNI_COMMON_CXX_OPTIONS} -g")
-
-	set(CMAKE_C_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS_UNIX} ${COMPILER_OPTIMIZATION_LEVEL} -fomit-frame-pointer -fstrict-aliasing -momit-leaf-frame-pointer -fno-tree-pre -falign-loops -mfpmath=sse -msse -msse2 -Wuninitialized")
-	set(CMAKE_C_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS_UNIX} ${COMPILER_OPTIMIZATION_LEVEL} -fomit-frame-pointer -mfpmath=sse -msse -msse2")
-	set(CMAKE_C_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS_UNIX} -g")
+	set(CMAKE_CXX_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS_UNIX} ${YUNI_COMMON_CXX_OPTIONS}")
+	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS_UNIX} ${YUNI_COMMON_CXX_OPTIONS}")
+	set(CMAKE_CXX_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS_UNIX} ${YUNI_COMMON_CXX_OPTIONS}")
+
+	set(CMAKE_C_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS_UNIX}")
+	set(CMAKE_C_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS_UNIX}")
+	set(CMAKE_C_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS_UNIX}")
 endif()

 if(MINGW)
-	set(CMAKE_CXX_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS} ${YUNI_COMMON_CXX_OPTIONS} ${COMPILER_OPTIMIZATION_LEVEL} -fomit-frame-pointer -fstrict-aliasing -momit-leaf-frame-pointer -fno-tree-pre -falign-loops -mthreads -Wuninitialized")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS} ${YUNI_COMMON_CXX_OPTIONS} -mthreads")
-	set(CMAKE_CXX_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS} ${YUNI_COMMON_CXX_OPTIONS} -mthreads")
-
-	set(CMAKE_C_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS} ${COMPILER_OPTIMIZATION_LEVEL} -fomit-frame-pointer -fstrict-aliasing -momit-leaf-frame-pointer -fno-tree-pre -falign-loops -mthreads -Wuninitialized")
-	set(CMAKE_C_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS} -mthreads")
-	set(CMAKE_C_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS} -mthreads")
+	set(CMAKE_CXX_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS} ${YUNI_COMMON_CXX_OPTIONS}")
+	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS} ${YUNI_COMMON_CXX_OPTIONS}")
+	set(CMAKE_CXX_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS} ${YUNI_COMMON_CXX_OPTIONS}")
+
+	set(CMAKE_C_FLAGS_RELEASE         "${YUNI_COMMON_CC_OPTIONS}")
+	set(CMAKE_C_FLAGS_RELWITHDEBINFO  "${YUNI_COMMON_CC_OPTIONS}")
+	set(CMAKE_C_FLAGS_DEBUG           "${YUNI_COMMON_CC_OPTIONS}")
 endif()

 if(MSVC)
@@ -181,29 +171,48 @@
 	set(CMAKE_C_FLAGS_RELEASE    "${CMAKE_C_FLAGS_RELEASE} ${MSVC_RELEASE_FLAGS}")
 endif()

-
-if(APPLE)
-	# The SSE instruction set is mandatory
-	set(CMAKE_CXX_FLAGS_RELEASE         "${CMAKE_CXX_FLAGS_RELEASE} -msse2 -fvisibility=hidden")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "${CMAKE_CXX_FLAGS_RELEASE} -msse2 -fvisibility=hidden")
-	set(CMAKE_CXX_FLAGS_DEBUG           "${CMAKE_CXX_FLAGS_DEBUG}   -msse2 -gfull -fvisibility=hidden")
-
-	set(CMAKE_C_FLAGS_RELEASE           "${CMAKE_C_FLAGS_RELEASE} -msse2")
-	set(CMAKE_C_FLAGS_RELWITHDEBINFO    "${CMAKE_C_FLAGS_RELEASE} -msse2")
-	set(CMAKE_C_FLAGS_DEBUG             "${CMAKE_C_FLAGS_DEBUG}   -msse2 -gfull")
-endif()
-if (YUNI_HAS_COMPILER_DEBUG_INFORMATION)
-	set(CMAKE_CXX_FLAGS_DEBUG           "${CMAKE_CXX_FLAGS_DEBUG} -g")
-	set(CMAKE_C_FLAGS_DEBUG             "${CMAKE_C_FLAGS_DEBUG} -g")
-endif()
-if (YUNI_HAS_GCC_FLAG_GGDB)
-	set(CMAKE_CXX_FLAGS_DEBUG           "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
-	set(CMAKE_C_FLAGS_DEBUG             "${CMAKE_C_FLAGS_DEBUG}   -ggdb")
-endif()
-if (YUNI_HAS_GCC_FLAG_GGDB3)
-	set(CMAKE_CXX_FLAGS_DEBUG           "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
-	set(CMAKE_C_FLAGS_DEBUG             "${CMAKE_C_FLAGS_DEBUG}   -ggdb3")
-endif()
+if (NOT MSVC)
+	# Optimisation
+	compile_flag("-O3"                   O3  RELEASE)
+	compile_flag("-fomit-frame-pointer"  FOMIT_FRAME_POINTER  RELEASE RELWITHDEBINFO)
+	compile_flag("-fstrict-aliasing"     STRICT_ALIASING      RELEASE RELWITHDEBINFO)
+	compile_flag("-msse"                 MSSE                 RELEASE RELWITHDEBINFO)
+	compile_flag("-msse2"                MSSE2                RELEASE RELWITHDEBINFO)
+	compile_flag("-mfpmath=sse"          FPMATH_MSSE          RELEASE RELWITHDEBINFO)
+	compile_flag("-fvisibility=hidden"   VISIBILITY_HIDDEN    RELEASE DEBUG RELWITHDEBINFO)
+
+	# link
+	compile_flag("-flto"                 FLTO  RELEASE RELWITHDEBINFO)
+
+	# debugging symbols
+	compile_flag("-g"     DEBUG_G     DEBUG RELWITHDEBINFO)
+	compile_flag("-gfull" DEBUG_GFULL DEBUG RELWITHDEBINFO)
+	compile_flag("-ggdb"  DEBUG_GDB   DEBUG RELWITHDEBINFO)
+	compile_flag("-ggdb3" DEBUG_GDB3  DEBUG RELWITHDEBINFO)
+
+	# warnings
+	compile_flag("-W"                         W   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wall"                      W_ALL   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wextra"                    W_EXTRA   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wunused-parameter"         W_UNUSED_PARAMETER   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wconversion"               W_CONVERSION   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Woverloaded-virtual"       W_OVERLOADED_VIRTUAL   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wundef"                    W_UNDEF   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wfloat-equal"              W_FLOAT_EQUAL   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wmissing-noreturn"         W_MISSING_NORETURN   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wcast-align"               W_CAST_ALIGN   RELEASE DEBUG RELWITHDEBINFO)
+	compile_flag("-Wuninitialized"            W_UNINITIALIZED   RELEASE DEBUG RELWITHDEBINFO)
+
+endif()
+
+
+if (MINGW)
+	# mthreads is required on windows with mingw
+	compile_flag("-mthreads"   MTHREADS   RELEASE DEBUG RELWITHDEBINFO)
+endif()
+
+
+

 # NDEBUG
 if(MSVC)


SuperBuild: fix rpath rule added for libgeotiff

--- SuperBuild/CMake/External_geotiff.cmake
+++ SuperBuild/CMake/External_geotiff.cmake
@@ -50,6 +50,8 @@

     SUPERBUILD_PATCH_SOURCE(GEOTIFF "patch-configure-script")

+    FIX_RPATH_FOR_AUTOCONF_BUILD(GEOTIFF "libgeotiff*.dylib")
+
   else()

     ExternalProject_Add(GEOTIFF


disable compiler error for unused commandline arguments

--- globals.cmake
+++ globals.cmake
@@ -40,7 +40,7 @@
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 	set(MIRRAGE_DEFAULT_COMPILER_ARGS -Wextra -Wall -pedantic -Wextra-semi
 		-Wzero-as-null-pointer-constant -Wold-style-cast -Werror
-		-Wno-unused-parameter -Wno-unused-private-field -Wno-missing-braces)
+		-Wno-unused-parameter -Wno-unused-private-field -Wno-missing-braces -Wno-error-unused-command-line-argument)

 elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
 	set(MIRRAGE_DEFAULT_COMPILER_ARGS -Wextra -Wall -pedantic