[CMake] [Darwin] Forcing -fPIC on for all darwin builtins except macho_embedded

We need to add -fPIC to the flags for the builtins in case PIC was turned off at a higher level. We also want to set ENABLE_PIC to Off when building the macho_embedded builtins so the top-level settings don't impact that build.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -258,7 +258,7 @@
 macro(darwin_add_builtin_libraries)
   set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes)

-  set(CFLAGS "-O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
+  set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
   set(CMAKE_C_FLAGS "")
   set(CMAKE_CXX_FLAGS "")
   set(CMAKE_ASM_FLAGS "")
@@ -367,6 +367,7 @@
   set(SOFT_FLOAT_FLAG -mfloat-abi=soft)
   set(HARD_FLOAT_FLAG -mfloat-abi=hard)

+  set(ENABLE_PIC Off)
   set(PIC_FLAG -fPIC)
   set(STATIC_FLAG -static)


add release version

add release version

--- conan.cmake
+++ conan.cmake
@@ -33,7 +33,7 @@
 # but it is only necessary on the end-user side. It is not necessary to create conan
 # packages, in fact it shouldn't be use for that. Check the project documentation.

-# version: 0.15.0-dev
+# version: 0.15.0

 include(CMakeParseArguments)


cmake: Change version to 1.0.1 for next release

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -52,7 +52,7 @@
   # --------------------------------------------------------------------------
   # meta-data
   NAME         "MIRTK"
-  VERSION      "1.0.0" # Version of core (+ external) modules
+  VERSION      "1.0.1" # Version of core (+ external) modules
   SOVERSION    "0"     # API yet unstable
   AUTHORS      "Andreas Schuh"
   DESCRIPTION  "Medical Image Registration ToolKit"


change ilastik default version to master

--- ilastik.cmake
+++ ilastik.cmake
@@ -33,7 +33,7 @@
 include (faulthandler)

 # select the desired ilastik commit
-set(DEFAULT_ILASTIK_VERSION "20131205")
+set(DEFAULT_ILASTIK_VERSION "master")
 IF(NOT DEFINED ILASTIK_VERSION)
     SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
 ENDIF()


fixed reading GSYS env var

fixed reading GSYS env var

--- include.cmake
+++ include.cmake
@@ -115,9 +115,10 @@
                              PARENT_SCOPE)
     endif()
 else()
-    set(GSYS_ENV ${GSYS})
+    set(GSYS_ENV $ENV{GSYS})

-    if (${GSYS_ENV} STREQUALS "leg")
+    message("RGDBG: ${GSYS_ENV}")
+    if ("${GSYS_ENV}" STREQUALS "leg")
         add_definitions(LEG CIA_LEX)
         add_definitions(-Werror-implicit-function-declaration -Wreturn-type -Wmissing-declarations -m64)
         add_definitions(-Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64)
@@ -126,7 +127,7 @@
 #         QMAKE_CFLAGS += -Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64
     endif()

-    if (${GSYS_ENV} STREQUALS "deg")
+    if ("${GSYS_ENV}" STREQUALS "deg")
         add_definitions(DEG CIA_DEX)
         add_definitions(-Werror-implicit-function-declaration -Wreturn-type -Wmissing-declarations -m64)
         add_definitions(-Werror-implicit-function-declaration -Wreturn-type -Wmissing-prototypes -Wmissing-declarations -m64)


Check if variable is set before adding to list

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -269,7 +269,9 @@
 			list (APPEND _targetLinkLibraries ${_library})
 			# process transitive libraries
 			get_target_property(_libraries ${_library} LINK_LIBRARIES)
-			list (APPEND _librariesToProcess ${_libraries})
+			if (_libraries)
+				list (APPEND _librariesToProcess ${_libraries})
+			endif()
 		endif()
 	endwhile()
 	set (${_targetLinkLibrariesVar} ${_targetLinkLibraries} PARENT_SCOPE)


use native paths for output under Windows

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -889,7 +889,7 @@
 	if (NOT _compilerArg1)
 		set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})
 	endif()
-	if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
+	if (WIN32)
 		file (TO_NATIVE_PATH "${_compilerExe}" _compilerExe)
 	endif()
 	string (STRIP "${_compilerArg1}" _compilerArg1)
@@ -1249,7 +1249,7 @@
 		return()
 	endif()
 	# add source files to be scanned
-	if (WIN32 AND "${_option_COMPILER_ID}" MATCHES "MSVC|Intel")
+	if (WIN32)
 		foreach (_sourceFile ${_existingSourceFiles})
 			file (TO_NATIVE_PATH "${_sourceFile}" _sourceFileNative)
 			list (APPEND _cmd "${_sourceFileNative}")
@@ -1260,7 +1260,7 @@
 	if (COTIRE_VERBOSE)
 		message (STATUS "execute_process: ${_cmd}")
 	endif()
-	if (_option_COMPILER_ID MATCHES "MSVC")
+	if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC")
 		# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
 		unset (ENV{VS_UNICODE_OUTPUT})
 	endif()
@@ -1496,7 +1496,12 @@
 	if (_unparsedLines)
 		if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders)
 			list (LENGTH _unparsedLines _skippedLineCount)
-			message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}")
+			if (WIN32)
+				file (TO_NATIVE_PATH "${_unparsedLinesFile}" _unparsedLinesLogPath)
+			else()
+				file (RELATIVE_PATH _unparsedLinesLogPath "${CMAKE_BINARY_DIR}" "${_unparsedLinesFile}")
+			endif()
+			message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesLogPath}")
 		endif()
 		string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}")
 	endif()
@@ -1875,7 +1880,7 @@
 	if (COTIRE_VERBOSE)
 		message (STATUS "execute_process: ${_cmd}")
 	endif()
-	if (_option_COMPILER_ID MATCHES "MSVC")
+	if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC")
 		# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
 		unset (ENV{VS_UNICODE_OUTPUT})
 	elseif (_option_COMPILER_ID MATCHES "GNU|Clang")


update code coverage cmake module

update code coverage cmake module

--- CodeCoverage.cmake
+++ CodeCoverage.cmake
@@ -140,7 +140,7 @@

   ADD_CUSTOM_TARGET(${_targetname}_generate_clean
 	DEPENDS ${_targetname}_clean
-
+
 	COMMAND ${_testrunner} ${ARGN}
   )

@@ -151,7 +151,7 @@
     COMMAND ${CMAKE_COMMAND} -E rename ${_outputname}.info.cleaned ${_outputname}.info
   )

-
+
 	# Setup target
 	ADD_CUSTOM_TARGET(${_targetname}


fixed: remove debug noise

fixed: remove debug noise

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@1696 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -766,15 +766,12 @@
 ENDMACRO(OSG_BOOST_DEP_SETUP)

 FUNCTION(OSG_WRITE_SETTINGS FILENAME)
-    MESSAGE(STATUS "Write settings to ${FILENAME}")
-
     FILE(WRITE ${FILENAME}
             "# CMake.settings -- auto generated\n\n")

     FOREACH(OSG_OPT ${OSG_OPTION_LIST})
         FILE(APPEND ${FILENAME}
              "SET(${OSG_OPT} ${${OSG_OPT}} CACHE INTERNAL \"\")\n")
-        MESSAGE(STATUS "Processing VAR : ${OSG_OPT} : ${OPT_TYPE}")
     ENDFOREACH(OSG_OPT ${OSG_OPTION_LIST})

 ENDFUNCTION(OSG_WRITE_SETTINGS FILENAME)


Use central function for boost build

Use central function for boost build

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -1,6 +1,8 @@
 #-----------------------------------------------------------------------------
 # Boost
 #-----------------------------------------------------------------------------
+
+include(mitkFunctionGetMSVCVersion)

 # Sanity checks
 if(DEFINED BOOST_ROOT AND NOT EXISTS ${BOOST_ROOT})
@@ -45,16 +47,9 @@
     set(_shell_extension .bat)
     set(_boost_layout)
     if(MSVC)
-      if(MSVC_VERSION EQUAL 1600)
-        set(_boost_with_toolset "vc10")
-        set(_boost_toolset "msvc-10.0")
-      elseif(MSVC_VERSION EQUAL 1700)
-        set(_boost_with_toolset "vc11")
-        set(_boost_toolset "msvc-11.0")
-      elseif(MSVC_VERSION EQUAL 1800)
-        set(_boost_with_toolset "vc12")
-        set(_boost_toolset "msvc-12.0")
-      endif()
+      mitkFunctionGetMSVCVersion()
+      set(_boost_with_toolset "vc${VISUAL_STUDIO_VERSION_MAJOR}")
+      set(_boost_toolset "msvc-${VISUAL_STUDIO_VERSION_MAJOR}.0")
     endif()
     set(_install_lib_dir "--libdir=<INSTALL_DIR>/bin")
     set(WIN32_CMAKE_SCRIPT ${ep_prefix}/src/${proj}-cmake/MoveBoostLibsToLibDirForWindows.cmake)


cmake: improve gsl check

cmake: improve gsl check

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -26,6 +26,10 @@
 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})

 if (NOT GSL_LIBRARY)
+  #avoid PC_GSL_LIBRARIES being empty
+  list(INSERT PC_GSL_LIBRARIES 0 gsl)
+  list(REMOVE_DUPLICATES PC_GSL_LIBRARIES)
+  #added gls depends
   foreach (LIB ${PC_GSL_LIBRARIES})
     find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
     list(APPEND GSL_LIBRARY ${GSL_${LIB}})


FindGSL.cmake: better error message

FindGSL.cmake: better error message

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -41,7 +41,7 @@
 include(CheckLibraryExists)
 check_library_exists("${GSL_LIBRARY}" gsl_linalg_QR_decomp "" FOUND_QR_DECOMP)
 if(NOT FOUND_QR_DECOMP)
-  message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GSL_LIBRARY by hand and include 'libgslcblas' in there!")
+  message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GSL_LIBRARY by hand and include libgslcblas and libm in there (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libgslcblas.so;/path/to/libm.so') !")
 endif(NOT FOUND_QR_DECOMP)

 include(FindPackageHandleStandardArgs)


deleted FindMKL

deleted FindMKL

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -1,280 +0,0 @@
-# Copyright (c) 2018, ArrayFire
-# All rights reserved.
-#
-# This file is distributed under 3-clause BSD license. The complete license
-# agreement can be obtained at: http://arrayfire.com/licenses/BSD-3-Clause
-#
-# A FindMKL script based on the recommendations by the Intel's Link Line
-# Advisor. It currently only tested on the 2018 version of MKL on Windows,
-# Linux, and OSX but it should work on older versions.
-#
-# To use this module call the mklvars.(sh,bat) script before you call cmake. This
-# script is located in the bin folder of your mkl installation. This will set the
-# MKLROOT environment variable which will be used to find the libraries on your system.
-#
-# Example:
-# set(MKL_THREAD_LAYER "TBB")
-# find_package(MKL)
-#
-# add_executable(myapp main.cpp)
-# target_link_libraries(myapp PRIVATE MKL::MKL)
-#
-# This module bases its behavior based on the following variables:
-#
-# ``MKL_THREAD_LAYER``
-#   The threading layer that needs to be used by the MKL library. This
-#   Defines which library will be used to parallelize the MKL kernels. Possible
-#   options are TBB(Default), GNU OpenMP, Intel OpenMP, Sequential
-#
-# This module provides the following :prop_tgt:'IMPORTED' targets:
-#
-# ``MKL::MKL``
-#   Target used to define and link all MKL libraries required by Intel's Link
-#   Line Advisor. This usually the only thing you need to link against unless
-#   you want to link against the single dynamic library version of MKL
-#   (libmkl_rt.so)
-#
-#  Optional:
-#
-# ``MKL::ThreadLayer{_STATIC}``
-#   Target used to define the threading layer(TBB, OpenMP, etc.) based on
-#   MKL_THREAD_LAYER variable.
-#
-# ``MKL::ThreadingLibrary``
-#   Target used to define the threading library(libtbb, libomp, etc) that the
-#   application will need to link against.
-#
-# ``MKL::Interface``
-#   Target used to determine which interface library to use(32bit int or 64bit
-#   int).
-#
-# ``MKL::Core``
-#   Target for the dynamic library dispatcher
-#
-# ``MKL::RT``
-#   Target for the single dynamic library
-#
-# ``MKL::{mkl_def;mkl_mc;mkl_mc3;mkl_avx;mkl_avx2;mkl_avx512}{_STATIC}``
-#   Targets for MKL kernel libraries.
-
-include(CheckTypeSize)
-
-check_type_size("int" INT_SIZE
-  BUILTIN_TYPES_ONLY LANGUAGE C)
-
-set(MKL_THREAD_LAYER "TBB" CACHE STRING "The thread layer to choose for MKL")
-set_property(CACHE MKL_THREAD_LAYER PROPERTY STRINGS "TBB" "GNU OpenMP" "Intel OpenMP" "Sequential")
-
-if(NOT MKL_THREAD_LAYER STREQUAL MKL_THREAD_LAYER_LAST)
-  unset(MKL::ThreadLayer CACHE)
-  unset(MKL::ThreadingLibrary CACHE)
-  unset(MKL_ThreadLayer_LINK_LIBRARY CACHE)
-  unset(MKL_ThreadLayer_STATIC_LINK_LIBRARY CACHE)
-  unset(MKL_ThreadLayer_DLL_LIBRARY CACHE)
-  unset(MKL_ThreadingLibrary_LINK_LIBRARY CACHE)
-  unset(MKL_ThreadingLibrary_STATIC_LINK_LIBRARY CACHE)
-  unset(MKL_ThreadingLibrary_DLL_LIBRARY CACHE)
-  set(MKL_THREAD_LAYER_LAST ${MKL_THREAD_LAYER} CACHE INTERNAL "" FORCE)
-endif()
-
-find_path(MKL_INCLUDE_DIR
-  NAMES
-    mkl.h
-    mkl_blas.h
-    mkl_cblas.h
-  PATHS
-    /opt/intel
-    /opt/intel/mkl
-    $ENV{MKLROOT}
-    /opt/intel/compilers_and_libraries/linux/mkl
-  PATH_SUFFIXES
-    include
-    IntelSWTools/compilers_and_libraries/windows/mkl/include
-    )
-mark_as_advanced(MKL_INCLUDE_DIR)
-
-find_path(MKL_FFTW_INCLUDE_DIR
-  NAMES
-    fftw3_mkl.h
-  HINTS
-    ${MKL_INCLUDE_DIR}/fftw)
-mark_as_advanced(MKL_FFTW_INCLUDE_DIR)
-
-
-if(WIN32)
-  if(${MSVC_VERSION} GREATER_EQUAL 1900)
-    set(msvc_dir "vc_mt")
-    set(shared_suffix "_dll")
-    set(md_suffix "md")
-  else()
-    message(WARNING "MKL: MS Version not supported for MKL")
-  endif()
-endif()
-
-# Finds and creates libraries for MKL with the MKL:: prefix
-#
-# Parameters:
-#    NAME:         A variable name describing the library
-#    LIBRARY_NAME: The library that needs to be searched
-#
-# Output Libraries:
-#    MKL::${NAME}
-#    MKL::${NAME}_STATIC
-#
-# Output Variables
-#    MKL_INCLUDE_DIR:                Include directory for MKL
-#    MKL_FFTW_INCLUDE_DIR:           Include directory for the MKL FFTW interface
-#    MKL_${NAME}_LINK_LIBRARY:        on Unix: *.so on Windows *.lib
-#    MKL_${NAME}_STATIC_LINK_LIBRARY: on Unix: *.a  on Windows *.lib
-#    MKL_${NAME}_DLL_LIBRARY:         on Unix: ""   on Windows *.dll
-function(find_mkl_library)
-  set(options "")
-  set(single_args NAME LIBRARY_NAME)
-  set(multi_args "")
-
-  cmake_parse_arguments(mkl_args "${options}" "${single_args}" "${multi_args}" ${ARGN})
-
-  add_library(MKL::${mkl_args_NAME}        SHARED IMPORTED)
-  add_library(MKL::${mkl_args_NAME}_STATIC SHARED IMPORTED)
-  find_library(MKL_${mkl_args_NAME}_LINK_LIBRARY
-    NAMES
-      ${mkl_args_LIBRARY_NAME}${shared_suffix}
-      ${mkl_args_LIBRARY_NAME}${md_suffix}
-      lib${mkl_args_LIBRARY_NAME}${md_suffix}
-      ${mkl_args_LIBRARY_NAME}
-    PATHS
-      /opt/intel/mkl/lib
-      /opt/intel/tbb/lib
-      /opt/intel/lib
-      $ENV{MKLROOT}/lib
-      /opt/intel/compilers_and_libraries/linux/mkl/lib
-    PATH_SUFFIXES
-      IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64
-      IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64
-      IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/${msvc_dir}
-      ""
-      intel64
-      intel64/gcc4.7)
-  mark_as_advanced(MKL_${mkl_args_NAME}_LINK_LIBRARY)
-
-  #message(STATUS "NAME: ${mkl_args_NAME} LIBNAME: ${mkl_args_LIBRARY_NAME} MKL_${mkl_args_NAME}_LINK_LIBRARY  ${MKL_${mkl_args_NAME}_LINK_LIBRARY}")
-
-  # The rt library does not have a static library
-  if(NOT ${mkl_args_NAME} STREQUAL "rt")
-    find_library(MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY
-      NAMES
-        ${CMAKE_STATIC_LIBRARY_PREFIX}${mkl_args_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
-      PATHS
-        /opt/intel/mkl/lib
-        /opt/intel/tbb/lib
-        /opt/intel/lib
-        $ENV{MKLROOT}/lib
-        /opt/intel/compilers_and_libraries/linux/mkl/lib
-      PATH_SUFFIXES
-        ""
-        intel64
-        intel64/gcc4.7
-        IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64
-        IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64
-        IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/${msvc_dir}
-        )
-      mark_as_advanced(MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY)
-    endif()
-
-    set_target_properties(MKL::${mkl_args_NAME}
-      PROPERTIES
-        INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR}"
-        IMPORTED_LOCATION "${MKL_${mkl_args_NAME}_LINK_LIBRARY}"
-        IMPORTED_NO_SONAME TRUE)
-    if(WIN32)
-      find_file(MKL_${mkl_args_NAME}_DLL_LIBRARY
-        NAMES
-          ${CMAKE_SHARED_LIBRARY_PREFIX}${mkl_args_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
-          ${CMAKE_SHARED_LIBRARY_PREFIX}${mkl_args_LIBRARY_NAME}${md_suffix}${CMAKE_SHARED_LIBRARY_SUFFIX}
-          lib${mkl_args_LIBRARY_NAME}${md_suffix}${CMAKE_SHARED_LIBRARY_SUFFIX}
-        PATH_SUFFIXES
-          IntelSWTools/compilers_and_libraries/windows/redist/intel64/mkl
-          IntelSWTools/compilers_and_libraries/windows/redist/intel64/compiler
-          IntelSWTools/compilers_and_libraries/windows/redist/intel64/tbb/${msvc_dir}
-        NO_SYSTEM_ENVIRONMENT_PATH)
-
-      set_target_properties(MKL::${mkl_args_NAME}
-        PROPERTIES
-          IMPORTED_LOCATION "${MKL_${mkl_args_NAME}_DLL_LIBRARY}"
-          IMPORTED_IMPLIB "${MKL_${mkl_args_NAME}_LINK_LIBRARY}")
-
-      mark_as_advanced(MKL_${mkl_args_NAME}_DLL_LIBRARY)
-    endif()
-endfunction()
-
-
-find_mkl_library(NAME Core LIBRARY_NAME mkl_core)
-find_mkl_library(NAME RT LIBRARY_NAME mkl_rt)
-
-# MKL can link against Intel OpenMP, GNU OpenMP, TBB, and Sequential
-if(MKL_THREAD_LAYER STREQUAL "Intel OpenMP")
-  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_intel_thread)
-  find_mkl_library(NAME ThreadingLibrary LIBRARY_NAME iomp5)
-elseif(MKL_THREAD_LAYER STREQUAL "GNU OpenMP")
-  find_package(OpenMP REQUIRED)
-  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_gnu_thread)
-  add_library(MKL::ThreadingLibrary SHARED IMPORTED)
-  set_target_properties(MKL::ThreadingLibrary
-    PROPERTIES
-      IMPORTED_LOCATION "${OpenMP_gomp_LIBRARY}"
-      INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
-elseif(MKL_THREAD_LAYER STREQUAL "TBB")
-  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_tbb_thread)
-  find_mkl_library(NAME ThreadingLibrary LIBRARY_NAME tbb)
-elseif(MKL_THREAD_LAYER STREQUAL "Sequential")
-  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_sequential)
-endif()
-
-if("${INT_SIZE}" EQUAL 4)
-  find_mkl_library(NAME Interface LIBRARY_NAME mkl_intel_lp64)
-else()
-  find_mkl_library(NAME Interface LIBRARY_NAME mkl_intel_ilp64)
-endif()
-
-set(MKL_RUNTIME_KERNEL_LIBRARIES "" CACHE FILEPATH "MKL kernel libraries targeting different CPU architectures")
-set(MKL_KernelLibraries "mkl_def;mkl_mc;mkl_mc3;mkl_avx;mkl_avx2;mkl_avx512")
-
-foreach(lib ${MKL_KernelLibraries})
-  find_mkl_library(NAME ${lib} LIBRARY_NAME ${lib})
-  if(MKL_${lib}_LINK_LIBRARY OR MKL_${lib}_DLL_LIBRARY)
-    list(APPEND MKL_RUNTIME_KERNEL_LIBRARIES $<TARGET_FILE:MKL::${lib}>)
-  endif()
-endforeach()
-mark_as_advanced(MKL_RUNTIME_KERNEL_LIBRARIES)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(MKL
-  REQUIRED_VARS MKL_INCLUDE_DIR MKL_Core_LINK_LIBRARY)
-if(NOT WIN32)
-  find_library(M_LIB m)
-  mark_as_advanced(M_LIB)
-endif()
-if(MKL_FOUND)
-  add_library(MKL::MKL SHARED IMPORTED)
-  if(MKL_THREAD_LAYER STREQUAL "Sequential")
-    set_target_properties(MKL::MKL
-      PROPERTIES
-        IMPORTED_LOCATION "${MKL_Core_LINK_LIBRARY}"
-        INTERFACE_LINK_LIBRARIES "MKL::Interface;MKL::ThreadLayer;${CMAKE_DL_LIBS};${M_LIB}"
-        INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR};${MKL_FFTW_INCLUDE_DIR}"
-        IMPORTED_NO_SONAME TRUE)
-  else()
-    set_target_properties(MKL::MKL
-      PROPERTIES
-        IMPORTED_LOCATION "${MKL_Core_LINK_LIBRARY}"
-        INTERFACE_LINK_LIBRARIES "MKL::Interface;MKL::ThreadLayer;MKL::ThreadingLibrary;${CMAKE_DL_LIBS};${M_LIB}"
-        INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR};${MKL_FFTW_INCLUDE_DIR}"
-        IMPORTED_NO_SONAME TRUE)
-  endif()
-  if(WIN32)
-    set_target_properties(MKL::MKL
-      PROPERTIES
-        IMPORTED_LOCATION "${MKL_Core_DLL_LIBRARY}"
-        IMPORTED_IMPLIB "${MKL_Core_LINK_LIBRARY}")
-  endif()
-endif()


Increment version to 3.2.1

Increment version to 3.2.1

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -3,7 +3,7 @@
 #
 SET(AF_VERSION_MAJOR "3")
 SET(AF_VERSION_MINOR "2")
-SET(AF_VERSION_PATCH "0")
+SET(AF_VERSION_PATCH "1")

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


Preparatory work on using naked_ace from 3rd_party dir.

--- CMakeScripts/FindACE.cmake
+++ CMakeScripts/FindACE.cmake
@@ -17,16 +17,23 @@
     SET(ACE_FIND_QUIETLY TRUE)
 ENDIF (ACE_path AND ACE_lib_path)

-FIND_PATH(ACE_path ace/ACE.h
-  /opt/local/include/ace
-  /usr/local/include/ace
-  /usr/include/ace
-  ${MAIN_INCLUDE_PATH}
-  ${MAIN_INCLUDE_PATH}/ace
+FIND_PATH(ACE_path
+    NAMES
+        ace/ACE.h
+    PATHS
+        ${PROJECT_SOURCE_DIR}/3rd_party/naked_ace/
+        /opt/local/include/ace
+        /usr/local/include/ace
+        /usr/include/ace
+        ${MAIN_INCLUDE_PATH}
+        ${MAIN_INCLUDE_PATH}/ace
+    DOC "Path to ACE framework root directory"
+    NO_DEFAULT_PATH
 )

 FIND_PATH(ACE_lib_path NAMES ACE.lib libACE.so libACE.dylib
     PATHS
+        ${PROJECT_SOURCE_DIR}/3rd_party/naked_ace/out/lib
         /opt/local/lib
         /usr/lib
         /usr/local/lib


Fix FindTuvok.cmake script

Fix FindTuvok.cmake script

--- FindTuvok.cmake
+++ FindTuvok.cmake
@@ -1,17 +1,15 @@
-# Copyright (c) 2013 Ahmet Bilgili <ahmet.bilgili@epfl.ch>
-# Modified from: FindSAGE.cmake
+# Copyright (c) 2015 Ahmet Bilgili <ahmet.bilgili@epfl.ch>
+# Modified from: FindTuvok.cmake

 # - Try to find the TUVOK library
 # Once done this will define
 #
-#  TUVOK_ROOT - Set this variable to the root installation of CAIRO
+#  TUVOK_ROOT - Set this variable to the root installation of Tuvok
 #
 # Read-Only variables:
 #  TUVOK_FOUND - system has the TUVOK library
 #  TUVOK_INCLUDE_DIR - the TUVOK include directory
 #  TUVOK_LIBRARY - The libraries needed to use SAGE
-#  (TODO) TUVOK_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8)
-
 include(FindPackageHandleStandardArgs)

 if(TUVOK_FIND_REQUIRED)
@@ -26,12 +24,12 @@
   set(_TUVOK_quiet QUIET)
 endif()

-find_path(_TUVOK_INCLUDE_DIR StdTuvokDefines.h
+find_path(_TUVOK_INCLUDE_DIR NAMES Tuvok/StdTuvokDefines.h
   HINTS ${PROJECT_SOURCE_DIR}/../../.. $ENV{TUVOK_ROOT} ${TUVOK_ROOT}
-  PATH_SUFFIXES include/Tuvok
+  PATH_SUFFIXES include
   PATHS /usr/local /usr /opt )

-if(_TUVOK_INCLUDE_DIR AND EXISTS "${_TUVOK_INCLUDE_DIR}/StdTuvokDefines.h")
+if(_TUVOK_INCLUDE_DIR AND EXISTS "${_TUVOK_INCLUDE_DIR}/Tuvok/StdTuvokDefines.h")
   set(_TUVOK_FAIL FALSE)
 else()
   set(_TUVOK_FAIL TRUE)
@@ -62,5 +60,5 @@
   set(TUVOK_INCLUDE_DIR)
   set(TUVOK_LIBRARY)
 else()
-  set(TUVOK_INCLUDE_DIR ${_TUVOK_INCLUDE_DIR})
+  set(TUVOK_INCLUDE_DIR ${_TUVOK_INCLUDE_DIR} ${_TUVOK_INCLUDE_DIR}/Tuvok)
 endif()


Fixed GetIncludePath fixture

Fixed GetIncludePath fixture

--- utils/GetIncludePath.cmake
+++ utils/GetIncludePath.cmake
@@ -1,10 +1,16 @@
 FUNCTION(GET_INCLUDE_PATH _project_root _include_path_result)
 	SET(RESULT_INCLUDE_PATH)
 	FILE(GLOB_RECURSE ALL_HEADERS "${_project_root}/*.h")
-	FOREACH(HEADER_FILE ${ALL_HEADERS})
+	FOREACH (HEADER_FILE ${ALL_HEADERS})
 		GET_FILENAME_COMPONENT(HEADER_PATH ${HEADER_FILE} DIRECTORY)
 		LIST(APPEND RESULT_INCLUDE_PATH ${HEADER_PATH})
-	ENDFOREACH(HEADER_FILE)
+	ENDFOREACH (HEADER_FILE)
+
+	LIST(LENGTH "${RESULT_INCLUDE_PATH}" RESULT_LENGTH)
+
+	IF (LENGTH GREATER 1)
+		LIST(REMOVE_DUPLICATES ${RESULT_INCLUDE_PATH})
+	ENDIF (LENGTH GREATER 1)

 	SET(${_include_path_result} "${RESULT_INCLUDE_PATH}" PARENT_SCOPE)
 ENDFUNCTION(GET_INCLUDE_PATH _project_root _include_path_result)


added optimization O3 flag

added optimization O3 flag

--- imp_cmake/cmake/macros/imp_macros.cmake
+++ imp_cmake/cmake/macros/imp_macros.cmake
@@ -23,11 +23,11 @@

 ##! @todo (MWE) extend with default setup stuff that we want to re-use in every package
 macro(imp_setup)
-   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -fPIC")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -Werror -fPIC")

    if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
       message(STATUS "set imp compile flags for Linux system")
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 ")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
       message(STATUS "set imp compile flags for Darwin system")
       set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")


update googletest.cmake to yaml

update googletest.cmake to yaml

--- modules/googletest.cmake
+++ modules/googletest.cmake
@@ -6,9 +6,9 @@
 #
 #   GOOGLETEST_ROOT
 #
-# autocmake.cfg configuration::
+# autocmake.yml configuration::
 #
-#   define: '-DGOOGLETEST_ROOT=external/googletest/googletest'
+#   define: "'-DGOOGLETEST_ROOT=external/googletest/googletest'"

 set(GOOGLETEST_ROOT external/googletest/googletest CACHE STRING "Google Test source root")


Stay on P: on win32

Stay on P: on win32

--- toolchain/Toolchain-Generic-chc12.cmake
+++ toolchain/Toolchain-Generic-chc12.cmake
@@ -13,7 +13,11 @@
 SET (CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

 # Path to compiler, must not contain spaces
+IF (WIN32)
+SET (HC12_PATH "P:")
+ELSE()
 SET (HC12_PATH "/Users/joakim/.wine/drive_c/P")
+ENDIF()

 LIST(APPEND CMAKE_PROGRAM_PATH "${HC12_PATH}/Prog")


Downgrading messages about not being able to detect BLAS and/or LAPACK when combining a found ScaLAPACK library with MATH_LIBS to STATUS from WARNING

--- cmake/external_projects/ElMath/ScaLAPACK.cmake
+++ cmake/external_projects/ElMath/ScaLAPACK.cmake
@@ -89,14 +89,14 @@
       if(EL_HAVE_DTRSM OR EL_HAVE_DTRSM_POST)
         set(HAVE_BLAS TRUE)
       else()
-        message(WARNING "Could not link BLAS")
+        message(STATUS "Cannot link BLAS with found ScaLAPACK and MATH_LIBS")
       endif()
       El_check_function_exists(dsytrd  EL_HAVE_DSYTRD)
       El_check_function_exists(dsytrd_ EL_HAVE_DSYTRD_POST)
       if(EL_HAVE_DSYTRD OR EL_HAVE_DSYTRD_POST)
         set(HAVE_LAPACK TRUE)
       else()
-        message(WARNING "Could not link LAPACK")
+        message(STATUS "Cannot link LAPACK with found ScaLAPACK and MATH_LIBS")
       endif()
       if(EL_SCALAPACK_SUFFIX)
         El_check_function_exists(pdsyngst${EL_SCALAPACK_SUFFIX} EL_HAVE_PDSYNGST)


Explicitly set the GLFW library variables for glbinding

--- CMakeModules/build_glbinding.cmake
+++ CMakeModules/build_glbinding.cmake
@@ -39,6 +39,8 @@
     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     -DBUILD_SHARED_LIBS:BOOL=OFF
     -DOPTION_BUILD_TESTS:BOOL=OFF
+    -DGLFW_LIBRARY_RELEASE:PATH=${GLFW_LIBRARY}
+    -DGLFW_LIBRARY_DEBUG:PATH=${GLFW_LIBRARY}
     ${byproducts}
     )


shifted ismrmrd tag to 1.4.2

shifted ismrmrd tag to 1.4.2

--- version_config.cmake
+++ version_config.cmake
@@ -113,7 +113,7 @@
   set(DEFAULT_ISMRMRD_TAG program_options_fix)
 else()
   set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd )
-  set(DEFAULT_ISMRMRD_TAG v1.4.1)
+  set(DEFAULT_ISMRMRD_TAG v1.4.2)
 endif()

 ## Gadgetron


whitespace fix

whitespace fix

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -610,6 +610,7 @@
         target_link_libraries(megamol-shader-factory INTERFACE "stdc++fs")
       endif()
       target_compile_definitions(megamol-shader-factory INTERFACE MSF_OPENGL_INCLUDE_GLAD)
+
   # obj-io
   elseif (NAME STREQUAL "obj-io")
     if(TARGET obj-io)
@@ -619,6 +620,7 @@
     add_external_headeronly_project(obj-io INTERFACE
       GIT_REPOSITORY https://github.com/thinks/obj-io.git
       INCLUDE_DIR "include/thinks")
+
   # qhull
   elseif(NAME STREQUAL "qhull")
     if(TARGET qhull)
@@ -930,6 +932,7 @@
     add_external_library(vtkm_worklet
       PROJECT vtkm
       LIBRARY ${VTKM_WORKLET_LIB})
+
   else()
     message(FATAL_ERROR "Unknown external required \"${NAME}\"")
   endif()


BUG: Revert Hippo compiler flags

BUG: Revert Hippo compiler flags

--- Hippo_Kitware_TubeTK_Nightly.cmake
+++ Hippo_Kitware_TubeTK_Nightly.cmake
@@ -130,10 +130,8 @@

 set( CTEST_CUSTOM_WARNING_EXCEPTION "/usr/local/include/boost" ${CTEST_CUSTOM_WARNING_EXCEPTION} )

-set( SITE_C_FLAGS "-fdiagnostics-show-option -fPIC -W -Waddress -Warray-bounds -Wc++11-compat -Wchar-subscripts -Wclobbered -Wcomment -Wempty-body -Wenum-compare -Wformat -Wignored-qualifiers -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-field-initializers -Wmissing-parameter-type -Wno-deprecated -Wno-deprecated-declarations -Wnonnull -Wold-style-declaration -Woverride-init -Wparentheses -Wpointer-sign -Wreorder -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused-but-set-parameter -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvolatile-register-var -Wwrite-strings
-" )
-set( SITE_CXX_FLAGS "-fdiagnostics-show-option -fPIC -W -Waddress -Warray-bounds -Wc++11-compat -Wchar-subscripts -Wclobbered -Wcomment -Wempty-body -Wformat -Wignored-qualifiers -Wmaybe-uninitialized -Wmissing-field-initializers -Wno-deprecated -Wno-deprecated-declarations -Wnonnull -Woverride-init -Wparentheses -Wpointer-sign -Wreorder -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused-but-set-parameter -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvolatile-register-var -Wwrite-strings
-" )
+set( SITE_C_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized" )
+set( SITE_CXX_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field" )
 set( SITE_EXE_LINKER_FLAGS "" )
 set( SITE_SHARED_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS}" )


BUG: Fix typo error in CMake/ExternalProject.cmake

--- CMake/ExternalProject.cmake
+++ CMake/ExternalProject.cmake
@@ -685,7 +685,7 @@
   elseif(git_repository)
     #find_package(Git)
     find_program(Git_EXECUTABLE git DOC "git command line client")
-    mars_as_advanced(Git_EXECUTABLE)
+    mark_as_advanced(Git_EXECUTABLE)
     if(NOT Git_EXECUTABLE)
       message(FATAL_ERROR "error: could not git svn for clone of ${name}")
     endif()


Fixed Linux NVTT build issue by restricting the addition of the new libs to just Windows

--- CMakeModules/FindNVTT.cmake
+++ CMakeModules/FindNVTT.cmake
@@ -178,7 +178,12 @@
   PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
 )

-SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE" "NVTHREAD" "NVBC7" "NVBC6H" "NVSQUISH")
+IF (WIN32)
+    SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE" "NVTHREAD" "NVBC7" "NVBC6H" "NVSQUISH")
+ELSE()
+    SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE")
+ENDIF()
+

 FOREACH(LIB ${LIBS_TO_SETUP})
 	IF(${LIB}_LIBRARY_DEBUG)


added test phase

added test phase

--- SuperBuild/External_CCPi-Framework.cmake
+++ SuperBuild/External_CCPi-Framework.cmake
@@ -66,6 +66,9 @@
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi
+    TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py &&
+    ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py &&
+    ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py
     CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir}
     DEPENDS


CUAV X7 Pro: Remove unneeded drivers.

CUAV X7 Pro: Remove unneeded drivers.

--- boards/cuav/x7pro/default.cmake
+++ boards/cuav/x7pro/default.cmake
@@ -29,8 +29,7 @@
 		dshot
 		gps
 		heater
-		#imu # all available imu drivers
-		imu/analog_devices/adis16448
+		#imu # all relevant IMU drivers
 		imu/analog_devices/adis16470
 		imu/bosch/bmi088
 		imu/invensense/icm20649


Test continuous build job triggers

Test continuous build job triggers

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -90,9 +90,9 @@
 # to configure the MITK-Superbuild. The
 set(MITK_INITIAL_CACHE "
 # Example how to set a boolean variable in the MITK-Build via this script:
-#SET(MITK_ENABLE_TOF_HARDWARE \"TRUE\" CACHE INTERNAL \"Enable ToF Hardware\")
+#set(MITK_ENABLE_TOF_HARDWARE \"TRUE\" CACHE INTERNAL \"Enable ToF Hardware\")
 # Example how to set a path variable in the MITK-Build via this script:
-#SET(MITK_PMD_LIB \"/home/kilgus/thomas/PMDSDK2/Linux_x86_64/bin/libpmdaccess2.so\" CACHE INTERNAL \"PMD lib\")
+#set(MITK_PMD_LIB \"/home/kilgus/thomas/PMDSDK2/Linux_x86_64/bin/libpmdaccess2.so\" CACHE INTERNAL \"PMD lib\")
 ")

 set(ADDITIONAL_CMAKECACHE_OPTION "


Added lib prefix for android plugins.

Added lib prefix for android plugins.

--- cmake-local/osvrAddPlugin.cmake
+++ cmake-local/osvrAddPlugin.cmake
@@ -29,8 +29,14 @@
         target_link_libraries(${OSVR_ADD_PLUGIN_NAME} osvr::osvrPluginKit)
     endif()

+    if(ANDROID)
+        set(OSVR_PLUGIN_PREFIX "lib")
+    else()
+        set(OSVR_PLUGIN_PREFIX "")
+    endif()
+
     set_target_properties(${OSVR_ADD_PLUGIN_NAME} PROPERTIES
-        PREFIX ""
+        PREFIX "${OSVR_PLUGIN_PREFIX}"
         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OSVR_CACHED_PLUGIN_DIR}"
         LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OSVR_CACHED_PLUGIN_DIR}")
     if(OSVR_ADD_PLUGIN_MANUAL_LOAD)


Allowed out-of-source-tree builds with Git version derivation

--- cmake/MacroGitVersionInfo.cmake
+++ cmake/MacroGitVersionInfo.cmake
@@ -38,12 +38,14 @@
 		message("-- Looking for git-versioning information.")
 		exec_program (
 			${GIT_EXECUTABLE}
+			${CMAKE_CURRENT_SOURCE_DIR}
 			ARGS diff --quiet
 			RETURN_VALUE GIT_HAVE_CHANGES
 		)

 		exec_program (
 			${GIT_EXECUTABLE}
+			${CMAKE_CURRENT_SOURCE_DIR}
 			ARGS describe --tags --match 'version-*.*-*'
 			OUTPUT_VARIABLE GIT_VERSION_INFO
 		)


Squashed '3rdparty/github/cmake-utils-remote/' changes from 8923133..4214b72

4214b72 LINK_FLAGS

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 4214b729f825882c098df3d7f9bc73d2e49df8ce

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -56,6 +56,7 @@
     # Do the dependency: ADD_SUBDIRECTORY or FIND_PACKAGE
     # ===================================================
     #
+    STRING (TOUPPER ${packageDepend} _PACKAGEDEPEND)
     IF (ALL_IN_ONE)
       GET_FILENAME_COMPONENT(packageDependSourceDirAbsolute ${packageDependSourceDir} ABSOLUTE)
       MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Adding subdirectory ${packageDependSourceDirAbsolute}")
@@ -63,8 +64,7 @@
     ELSE ()
       MESSAGE(STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Looking for ${packageDepend}")
       FIND_PACKAGE (${packageDepend})
-      STRING (TOUPPER ${packageDepend} _FINDPACKAGE)
-      IF (NOT ${_FINDPACKAGE}_FOUND)
+      IF (NOT ${_PACKAGEDEPEND}_FOUND)
         MESSAGE (FATAL_ERROR "[${PROJECT_NAME}-DEPEND-STATUS] Find ${packageDepend} failed")
       ENDIF ()
     ENDIF ()
@@ -114,7 +114,7 @@
           #
           # Include dependency
           #
-          FOREACH (_include_directory ${${packageDepend}_INCLUDE_DIRS})
+          FOREACH (_include_directory ${${_PACKAGEDEPEND}_INCLUDE_DIRS})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_include_directory} include dependency to ${_target}")
             ENDIF ()
@@ -123,7 +123,7 @@
           #
           # Library dependency
           #
-          FOREACH (_library ${${packageDepend}_LIBRARIES})
+          FOREACH (_library ${${_PACKAGEDEPEND}_LIBRARIES})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_library} library dependency to ${_target}")
             ENDIF ()
@@ -132,7 +132,7 @@
           #
           # Compile definitions
           #
-          FOREACH (_flag ${${packageDepend}_C_FLAGS_SHARED})
+          FOREACH (_flag ${${_PACKAGEDEPEND}_C_FLAGS_SHARED})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} compile definition dependency to ${_target}")
             ENDIF ()
@@ -141,7 +141,7 @@
           #
           # Link flags
           #
-          FOREACH (_flag ${${packageDepend}_C_FLAGS_SHARED})
+          FOREACH (_flag ${${_PACKAGEDEPEND}_LINK_FLAGS})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} link flag dependency to ${_target}")
             ENDIF ()
@@ -169,7 +169,7 @@
     ELSE ()
       STRING(REGEX REPLACE " " "\\\\ "  _dependLibraryRuntimeDirectory "${_dependLibraryRuntimeDirectory}")
     ENDIF ()
-    SET(${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}")
+    SET(${_PACKAGEDEPEND}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}")
     IF ("${_test_path}" STREQUAL "")
       MESSAGE(STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Initializing TEST_PATH with PATH")
       SET (_test_path "$ENV{PATH}" )
@@ -179,9 +179,9 @@
     ELSE ()
       SET (SEP ":")
     ENDIF ()
-    SET (_test_path "${${_FINDPACKAGE}_RUNTIME_DIRECTORY}${SEP}${_test_path}")
+    SET (_test_path "${${_PACKAGEDEPEND}_RUNTIME_DIRECTORY}${SEP}${_test_path}")
     IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Prepended ${${_FINDPACKAGE}_RUNTIME_DIRECTORY} to TEST_PATH")
+      MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Prepended ${${_PACKAGEDEPEND}_RUNTIME_DIRECTORY} to TEST_PATH")
     ENDIF ()
     SET_PROPERTY(GLOBAL PROPERTY MYPACKAGE_TEST_PATH "${_test_path}")
   ENDIF ()


Build of tclIndex with CMake requires separate command and arguments.

svn path=/trunk/; revision=6938

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -96,10 +96,11 @@
     # ------------------------------------------------------------------------
     # figure out how to build tclIndex
     # ------------------------------------------------------------------------
+    set(MKTCLINDEX ${CMAKE_SOURCE_DIR}/scripts/mktclIndex)
     if(ENABLE_itcl)
-      set(MKINDEX "${CMAKE_SOURCE_DIR}scripts/mktclIndex -itcl")
+      set(MKTCLINDEX_ARGS "-itcl")
     else(ENABLE_itcl)
-      set(MKINDEX "${CMAKE_SOURCE_DIR}scripts/mktclIndex -tcl")
+      set(MKTCLINDEX_ARGS "-tcl")
     endif(ENABLE_itcl)
     if(ENABLE_itk)
       message(STATUS "Looking for itk.h")


Adding support for Apple Xcode, and run conan install on first configure

--- conan.cmake
+++ conan.cmake
@@ -1,4 +1,12 @@
 include(CMakeParseArguments)
+
+set(POLICY_CHECK "")
+cmake_policy(GET CMP0025 POLICY_CHECK)
+
+message(STATUS "policy set to " ${POLICY_CHECK})
+if (("${POLICY_CHECK}" STREQUAL "") OR ("${POLICY_CHECK}" STREQUAL OLD))
+  message(FATAL_ERROR "This project requires the minimum cmake version to be set to 3.0")
+endif()

 function(conan_install_settings result)
   #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER})
@@ -19,7 +27,16 @@

   if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
     # using GCC
-    set(SETTINGS_STR -s compiler=gcc -s compiler.version=4.9 -s compiler.libcxx=libstdc++)
+    string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
+    list(GET VERSION_LIST 0 MAJOR)
+    list(GET VERSION_LIST 1 MINOR)
+    set(SETTINGS_STR -s compiler=gcc -s compiler.version=${MAJOR}.${MINOR} -s compiler.libcxx=libstdc++)
+  elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang)
+      # using AppleClang
+      string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
+      list(GET VERSION_LIST 0 MAJOR)
+      list(GET VERSION_LIST 1 MINOR)
+      set(SETTINGS_STR -s compiler=apple-clang -s compiler.version=${MAJOR}.${MINOR} -s compiler.libcxx=libc++)
   elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
       # using Clang
       string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
@@ -91,9 +108,20 @@
                       WORKING_DIRECTORY ${CONAN_RUN_DIR})
     add_custom_command(TARGET conan_install
                    POST_BUILD
-                   COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
+                   COMMAND ${CMAKE_COMMAND} "-H${CMAKE_SOURCE_DIR}" "-B${CMAKE_BINARY_DIR}"
                    )

+    if(NOT EXISTS ${CONAN_RUN_DIR}/conanbuildinfo.cmake)
+      set(conan_exec_result "")
+      execute_process(COMMAND  ${conan_command} ${conan_args}
+                      WORKING_DIRECTORY ${CONAN_RUN_DIR}
+                      RESULT_VARIABLE conan_exec_result)
+      if(conan_exec_result EQUAL 0)
+        execute_process(COMMAND ${CMAKE_COMMAND} "-H${CMAKE_SOURCE_DIR}" "-B${CMAKE_BINARY_DIR}")
+      else()
+        message(FATAL_ERROR "Conan Failed with exit code: ${conan_exec_result}")
+      endif()
+    endif()
 endfunction()

 function(conan_generate_conanfile)
@@ -121,7 +149,6 @@
   foreach(ARG ${CONANFILE_IMPORTS})
     file(APPEND ${_FN} ${ARG} "\n")
   endforeach()
-
 endfunction()

 macro(conan_requirements)
@@ -135,15 +162,13 @@
       set(CONAN_RUN_DIR ${CONANFILE_BUILD_DIR})
     else()
       set(CONAN_RUN_DIR ${CMAKE_BINARY_DIR})
-     endif()
+    endif()
     if(CONANFILE_BASIC_SETUP)
-      if(EXISTS ${CONAN_RUN_DIR}/conanbuildinfo.cmake)
-        message(STATUS "*Conan*: Loading conanbuildinfo.cmake")
-        include(${CONAN_RUN_DIR}/conanbuildinfo.cmake)
-        conan_basic_setup()
-      endif()
+
+    message(STATUS "*Conan*: Loading conanbuildinfo.cmake")
+    include(${CONAN_RUN_DIR}/conanbuildinfo.cmake)
+    conan_basic_setup()
+
     endif()
 endmacro()

-
-


update cmake avx2 check (#2591)

update cmake avx2 check (#2591)


add -Woverloaded-virtual flag for gnu compiler

Add warning about overloaded virtual functions which are shadowed
when only a subset of its signatures are overridden in a derived class.

--- cmake/setup_compiler_flags_gnu.cmake
+++ cmake/setup_compiler_flags_gnu.cmake
@@ -64,6 +64,7 @@
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsynth")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsign-compare")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wswitch")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Woverloaded-virtual")

 #
 # Disable Wlong-long that will trigger a lot of warnings when compiling


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -8,6 +8,7 @@
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
+Name[hu]=Azonnali üzenetküldés
 Name[ia]=Messageria instantanee
 Name[it]=Messaggistica istantanea
 Name[kk]=Лезде хабарласу
@@ -31,6 +32,7 @@
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
+Comment[hu]=Csevegés indítása az azonnali üzenetküldési partnerei valamelyikével vagy az azonnali üzenetküldési állapotának módosítása
 Comment[ia]=Initia conversation con qualcunque de tu contactos de IM o modifica tu status de IM
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -70,7 +70,7 @@
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pl]=Rozpocznij rozmowę z którymkolwiek z twoich kontaktów lub zmień swoja dostępność
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
-Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
+Comment[pt_BR]=Inicia uma conversa com um dos seus contatos de MI ou altera o seu status
 Comment[ro]=Începeți o discuție cu oricare dintre contactele de MI sau schimbați-vă starea
 Comment[ru]=Начать общение с любым вашим контактом или изменить ваш статус в системе обмена сообщениями
 Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav


More flexible luajit.cmake

More flexible luajit.cmake

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -206,6 +206,7 @@
   DEPENDS ${LUAJIT_DIR}/dynasm/dynasm.lua minilua
 )

+## Source Lists
 SET(SRC_LJLIB
   ${LUAJIT_DIR}/src/lib_base.c
   ${LUAJIT_DIR}/src/lib_math.c
@@ -217,74 +218,17 @@
   ${LUAJIT_DIR}/src/lib_package.c
   ${LUAJIT_DIR}/src/lib_debug.c
   ${LUAJIT_DIR}/src/lib_jit.c
-  ${LUAJIT_DIR}/src/lib_ffi.c)
-
-SET(SRC_LJCORE
-  ${LUAJIT_DIR}/src/lj_gc.c
-  ${LUAJIT_DIR}/src/lj_err.c
-  ${LUAJIT_DIR}/src/lj_char.c
-  ${LUAJIT_DIR}/src/lj_buf.c
-  ${LUAJIT_DIR}/src/lj_profile.c
-  ${LUAJIT_DIR}/src/lj_strfmt.c
-  ${LUAJIT_DIR}/src/lj_strfmt_num.c
-  ${LUAJIT_DIR}/src/lj_bc.c
-  ${LUAJIT_DIR}/src/lj_obj.c
-  ${LUAJIT_DIR}/src/lj_str.c
-  ${LUAJIT_DIR}/src/lj_tab.c
-  ${LUAJIT_DIR}/src/lj_func.c
-  ${LUAJIT_DIR}/src/lj_udata.c
-  ${LUAJIT_DIR}/src/lj_meta.c
-  ${LUAJIT_DIR}/src/lj_debug.c
-  ${LUAJIT_DIR}/src/lj_state.c
-  ${LUAJIT_DIR}/src/lj_dispatch.c
-  ${LUAJIT_DIR}/src/lj_vmevent.c
-  ${LUAJIT_DIR}/src/lj_vmmath.c
-  ${LUAJIT_DIR}/src/lj_strscan.c
-  ${LUAJIT_DIR}/src/lj_api.c
-  ${LUAJIT_DIR}/src/lj_lex.c
-  ${LUAJIT_DIR}/src/lj_parse.c
-  ${LUAJIT_DIR}/src/lj_bcread.c
-  ${LUAJIT_DIR}/src/lj_bcwrite.c
-  ${LUAJIT_DIR}/src/lj_load.c
-  ${LUAJIT_DIR}/src/lj_ir.c
-  ${LUAJIT_DIR}/src/lj_opt_mem.c
-  ${LUAJIT_DIR}/src/lj_opt_fold.c
-  ${LUAJIT_DIR}/src/lj_opt_narrow.c
-  ${LUAJIT_DIR}/src/lj_opt_dce.c
-  ${LUAJIT_DIR}/src/lj_opt_loop.c
-  ${LUAJIT_DIR}/src/lj_opt_split.c
-  ${LUAJIT_DIR}/src/lj_opt_sink.c
-  ${LUAJIT_DIR}/src/lj_mcode.c
-  ${LUAJIT_DIR}/src/lj_snap.c
-  ${LUAJIT_DIR}/src/lj_record.c
-  ${LUAJIT_DIR}/src/lj_crecord.c
-  ${LUAJIT_DIR}/src/lj_ffrecord.c
-  ${LUAJIT_DIR}/src/lj_asm.c
-  ${LUAJIT_DIR}/src/lj_trace.c
-  ${LUAJIT_DIR}/src/lj_gdbjit.c
-  ${LUAJIT_DIR}/src/lj_ctype.c
-  ${LUAJIT_DIR}/src/lj_cdata.c
-  ${LUAJIT_DIR}/src/lj_cconv.c
-  ${LUAJIT_DIR}/src/lj_ccall.c
-  ${LUAJIT_DIR}/src/lj_ccallback.c
-  ${LUAJIT_DIR}/src/lj_carith.c
-  ${LUAJIT_DIR}/src/lj_clib.c
-  ${LUAJIT_DIR}/src/lj_cparse.c
-  ${LUAJIT_DIR}/src/lj_lib.c
-  ${LUAJIT_DIR}/src/lj_alloc.c
-  ${LUAJIT_DIR}/src/lj_vmmath.c
+  ${LUAJIT_DIR}/src/lib_ffi.c
+)
+
+SET(SRC_LIBAUX
   ${LUAJIT_DIR}/src/lib_aux.c
   ${LUAJIT_DIR}/src/lib_init.c
-  ${SRC_LJLIB})
-
-SET(SRC_BUILDVM
-  ${LUAJIT_DIR}/src/host/buildvm.c
-  ${LUAJIT_DIR}/src/host/buildvm_asm.c
-  ${LUAJIT_DIR}/src/host/buildvm_peobj.c
-  ${LUAJIT_DIR}/src/host/buildvm_lib.c
-  ${LUAJIT_DIR}/src/host/buildvm_fold.c
-  ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h)
-
+)
+file (GLOB_RECURSE SRC_LJCORE   "${LUAJIT_DIR}/src/lj_*.c")
+list (APPEND SRC_LJCORE ${SRC_LJLIB} ${SRC_LIBAUX})
+file (GLOB_RECURSE SRC_BUILDVM  "${LUAJIT_DIR}/src/host/buildvm*.c")
+list (APPEND SRC_BUILDVM ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h)

 ## GENERATE
 ADD_EXECUTABLE(buildvm ${SRC_BUILDVM})


STYLE: Remove redundant dashboard template.

This file is superseded by DashboardTemplate.cmake

--- CMake/TEMPLATE.DashboardScript.cmake
+++ CMake/TEMPLATE.DashboardScript.cmake
@@ -1,149 +0,0 @@
-#============================================================================
-#
-# Copyright (c) Kitware Inc.
-#
-# 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.txt
-#
-# 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.
-#
-#============================================================================
-
-#
-# OS: Windows 7 Professional x64
-# Hardware: Intel Core2 Duo P8600 2.4GHz
-# GPU: GeForce GTX 280M
-#
-
-# Note: The specific version and processor type of this machine should be reported in the
-# header above. Indeed, this file will be send to the dashboard as a NOTE file.
-
-cmake_minimum_required(VERSION 2.8.10)
-
-#
-# Dashboard properties
-#
-set(MY_OPERATING_SYSTEM "Windows7") # Windows, Linux, Darwin...
-set(MY_COMPILER "VS2008express")
-
-if (NOT MY_QT_VERSION)
-  set(MY_QT_VERSION "4.7.4")
-endif()
-
-set(QT_QMAKE_EXECUTABLE "C:/work/Qt/qt-${MY_QT_VERSION}-debug-32bit-vs2008/bin/qmake.exe")
-set(CTEST_SITE "Alienware.kitware") # for example: mymachine.kitware, mymachine.dkfz, ...
-set(CTEST_DASHBOARD_ROOT "")
-
-if (NOT MY_CMAKE_VERSION)
-   set(MY_CMAKE_VERSION "CMake 2.8.10")
-endif()
-
-set(CTEST_CMAKE_COMMAND   "C:/Program Files (x86)/${MY_CMAKE_VERSION}/bin/cmake.exe")
-if (NOT CTEST_CMAKE_GENERATOR)
-  set(CTEST_CMAKE_GENERATOR "Visual Studio 9 Win32")
-endif()
-if (NOT MY_BITNESS)
-  set(MY_BITNESS "32")
-endif()
-#
-# Dashboard options
-#
-set(WITH_KWSTYLE FALSE)
-set(WITH_MEMCHECK FALSE)
-set(WITH_COVERAGE FALSE)
-set(WITH_DOCUMENTATION FALSE)
-
-if (NOT CTEST_BUILD_CONFIGURATION)
-  set(CTEST_BUILD_CONFIGURATION "Debug")
-endif()
-
-set(CTEST_TEST_TIMEOUT 500)
-set(CTEST_BUILD_FLAGS "") # Use multiple CPU cores to build
-set(CTEST_LOG_FILE "${CTEST_DASHBOARD_ROOT}/Logs/Nightly-${CTEST_BUILD_CONFIGURATION}}-${MY_BITNESS}bits.log")
-
-# experimental:
-#     - run_ctest() macro will be called *ONE* time
-#     - binary directory will *NOT* be cleaned
-# continuous:
-#     - run_ctest() macro will be called EVERY 5 minutes ...
-#     - binary directory will *NOT* be cleaned
-#     - configure/build will be executed *ONLY* if the repository has been updated
-# nightly:
-#     - run_ctest() macro will be called *ONE* time
-#     - binary directory *WILL BE* cleaned
-if (NOT SCRIPT_MODE)
-  set(SCRIPT_MODE "experimental") # "experimental", "continuous", "nightly"
-endif()
-
-#
-# Project specific properties
-#
-set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/...-${CTEST_BUILD_CONFIGURATION}-${GIT_BRANCH_NAME}")
-if (NOT CTEST_BINARY_DIRECTORY)
-  set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/...-Superbuild-${CTEST_BUILD_CONFIGURATION}-${MY_BITNESS}bits-${SCRIPT_MODE}-${MY_QT_VERSION}-${MY_CMAKE_VERSION}")
-endif()
-
-# Additionnal CMakeCache options - For example:
-set(ADDITIONNAL_CMAKECACHE_OPTION "")
-
-# set any extra environment variables here
-set(ENV{DISPLAY} ":0")
-
-find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
-find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
-find_program(CTEST_GIT_COMMAND NAMES git)
-message ("********************************************************COMMAND : ${CTEST_GIT_COMMAND}")
-
-#
-# Git repository - Overwrite the default value provided by the driver script
-#
-# set(GIT_REPOSITORY http://github.com/YOURUSERNAME/....git)
-# set(GIT_BRANCH_NAME master)
-
-##########################################
-# WARNING: DO NOT EDIT BEYOND THIS POINT #
-##########################################
-
-set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
-
-#
-# Project specific properties
-#
-set(CTEST_PROJECT_NAME "...")
-set(CTEST_BUILD_NAME "${MY_OPERATING_SYSTEM}-${MY_COMPILER}-${MY_BITNESS}-QT${MY_QT_VERSION}-${MY_CMAKE_VERSION}-${CTEST_BUILD_CONFIGURATION}-${GIT_BRANCH_NAME}")
-
-#
-# Display build info
-#
-message("site name: ${CTEST_SITE}")
-message("build name: ${CTEST_BUILD_NAME}")
-message("script mode: ${SCRIPT_MODE}")
-message("coverage: ${WITH_COVERAGE}, memcheck: ${WITH_MEMCHECK}")
-
-#
-# Convenient macro allowing to download a file
-#
-macro(downloadFile url dest)
-  file(DOWNLOAD ${url} ${dest} STATUS status)
-  list(GET status 0 error_code)
-  list(GET status 1 error_msg)
-  if(error_code)
-    message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
-  endif()
-endmacro()
-
-#
-# Download and include dashboard driver script
-#
-
-set(url http://midas3.kitware.com/midas/download?items=28862)
-set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
-downloadFile(${url} ${dest})
-include(${dest})


fixes issue 800
+ add use_msbuild arg to runsuite_common_pre.cmake for building with
  msbuild.  off by default until we know for sure it works on XP
  and elsewhere.

SVN-Revision: 1398

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -1,5 +1,5 @@
 # **********************************************************
-# Copyright (c) 2011 Google, Inc.    All rights reserved.
+# Copyright (c) 2011-2012 Google, Inc.    All rights reserved.
 # Copyright (c) 2009-2010 VMware, Inc.    All rights reserved.
 # **********************************************************

@@ -66,11 +66,12 @@
 set(arg_preload "")   # cmake file to include prior to each 32-bit build
 set(arg_preload64 "") # cmake file to include prior to each 64-bit build
 set(arg_ssh OFF)      # running over cygwin ssh: disable pdbs
-set(arg_use_nmake OFF)# use nmake instead of devenv
+set(arg_use_nmake OFF)# use nmake instead of visual studio
+set(arg_use_msbuild OFF) # use msbuild instead of devenv for visual studio
 if (UNIX)
   set(arg_use_make ON)  # use unix make
 else (UNIX)
-  set(arg_use_make OFF) # use unix make instead of devenv
+  set(arg_use_make OFF) # use unix make instead of visual studio
 endif (UNIX)
 set(arg_long OFF)     # whether to run the long suite
 set(arg_already_built OFF) # for testing w/ already-built suite
@@ -97,6 +98,9 @@
   endif (${arg} STREQUAL "ssh")
   if (${arg} STREQUAL "use_nmake")
     set(arg_use_nmake ON)
+  endif ()
+  if (${arg} STREQUAL "use_msbuild")
+    set(arg_use_msbuild ON)
   endif ()
   if (${arg} STREQUAL "use_make")
     set(arg_use_make ON)
@@ -238,6 +242,35 @@
     endif ()
   endif ()
   message("Using ${vs_generator} generators")
+  if (arg_use_msbuild)
+    find_program(MSBUILD_PROGRAM msbuild)
+    if (MSBUILD_PROGRAM)
+      set(base_cache "${base_cache}
+        CMAKE_MAKE_PROGRAM:FILEPATH=${MSBUILD_PROGRAM}")
+      # Unfortunately we have to provide all the args (setting CMAKE_MAKE_PROGRAM
+      # doesn't do it for ctest builds).  We want ALL_BUILD.vcproj for pre-VS2010
+      # and ALL_BUILD.vcxproj for VS2010.
+      if (vs_generator MATCHES "Visual Studio 10")
+        set(proj_file "ALL_BUILD.vcxproj")
+      else ()
+        set(proj_file "ALL_BUILD.vcproj")
+      endif ()
+      # Request parallel build on all available cores (sequential by default: i#800)
+      # via "/m".
+      # Configuration will be adjusted per build below.
+      set(CTEST_BUILD_COMMAND
+        "${MSBUILD_PROGRAM} ${proj_file} /p:Configuration=REPLACE_CONFIG /m")
+    else (MSBUILD_PROGRAM)
+      message("WARNING: cannot find msbuild; disabling")
+      set(arg_use_msbuild OFF)
+    endif (MSBUILD_PROGRAM)
+  endif (arg_use_msbuild)
+  if ("${cmake_ver_string}" STREQUAL "2.8.4")
+    # 2.8.4 uses msbuild by default.
+    # XXX: any way to tell other than matching version #?
+    # Request parallel build (sequential by default: i#800)
+    set(extra_build_args "/m")
+  endif ()
 endif (arg_use_make)

 function(get_default_config config builddir)
@@ -293,7 +326,10 @@
       # in the 2.8 release; going ahead and setting now.
       # For Linux these messages make little perf difference, and can help
       # diagnose errors or watch progress.
-      set(os_specific_defines "CMAKE_RULE_MESSAGES:BOOL=OFF")
+      # The messages only apply to Makefile generators, not Visual Studio.
+      if (NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Visual Studio")
+        set(os_specific_defines "CMAKE_RULE_MESSAGES:BOOL=OFF")
+      endif ()
     else (WIN32)
       set(os_specific_defines "")
     endif (WIN32)
@@ -385,9 +421,14 @@
           get_default_config(defconfig "${CTEST_BINARY_DIRECTORY}")
           set(CTEST_BUILD_CONFIGURATION "${defconfig}")
           message("building default config \"${defconfig}\"")
-          if (NOT "${build_args}" STREQUAL "")
-            set(CTEST_BUILD_FLAGS "-- ${build_args}")
+          if (NOT "${build_args}" STREQUAL "" OR
+              NOT "${extra_build_args}" STREQUAL "")
+            set(CTEST_BUILD_FLAGS "-- ${extra_build_args} ${build_args}")
           endif ()
+          if (arg_use_msbuild)
+            string(REPLACE "REPLACE_CONFIG" "${defconfig}" CTEST_BUILD_COMMAND
+              "${CTEST_BUILD_COMMAND}")
+          endif (arg_use_msbuild)
         else ()
           set(CTEST_BUILD_FLAGS "${build_args}")
         endif ()


iox-#1287 Add iox_add_library macro

iox-#1287 Add iox_add_library macro

Signed-off-by: Christian Eltzschig <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@elchris.org>

--- iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
+++ iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
@@ -111,3 +111,61 @@
     DESTINATION ${DESTINATION_CONFIGDIR}
     )
 endMacro()
+
+Macro(iox_add_library)
+    set(arguments TARGET RPATH FILES PUBLIC_LINKS PRIVATE_LINKS PRIVATE_LINKS_LINUX ALIAS)
+    cmake_parse_arguments(IOX "" "" "${arguments}" ${ARGN} )
+
+    add_library( ${IOX_TARGET} ${IOX_FILES} )
+    add_library( ${IOX_ALIAS} ALIAS ${IOX_TARGET})
+
+    set_target_properties(${IOX_TARGET} PROPERTIES
+        CXX_STANDARD_REQUIRED ON
+        CXX_STANDARD ${ICEORYX_CXX_STANDARD}
+        POSITION_INDEPENDENT_CODE ON
+        RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+    )
+
+    target_compile_options(${IOX_TARGET} PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})
+
+    target_link_libraries(${IOX_TARGET}
+        PUBLIC
+        ${IOX_PUBLIC_LINKS}
+        PRIVATE
+        ${IOX_PRIVATE_LINKS}
+        )
+
+    if ( LINUX )
+        target_link_libraries(${IOX_TARGET} PRIVATE ${IOX_PRIVATE_LINKS_LINUX})
+    endif ( LINUX )
+
+    if ( LINUX OR UNIX )
+        set_target_properties(
+            ${IOX_TARGET}
+            PROPERTIES
+            BUILD_RPATH ${IOX_RPATH}
+            INSTALL_RPATH ${IOX_RPATH}
+        )
+    elseif( APPLE )
+        set_target_properties(
+                    ${IOX_TARGET}
+                    PROPERTIES
+                    BUILD_RPATH ${IOX_RPATH}
+                    INSTALL_RPATH ${IOX_RPATH}
+                )
+    endif( LINUX OR UNIX )
+
+    if(PERFORM_CLANG_TIDY)
+        set_target_properties(
+            ${IOX_TARGET}
+            PROPERTIES
+            CXX_CLANG_TIDY "${PERFORM_CLANG_TIDY}"
+        )
+    endif(PERFORM_CLANG_TIDY)
+
+    target_include_directories(${IOX_TARGET}
+        PUBLIC
+        $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+        $<INSTALL_INTERFACE:include/${PREFIX}>
+    )
+endMacro()


update: coverage testing/verbosity

update: coverage testing/verbosity

--- share/hugh/cmake/functions/cma_setup_test.cmake
+++ share/hugh/cmake/functions/cma_setup_test.cmake
@@ -43,7 +43,7 @@
   set(BOOSTTEST_ARGS)
   list(APPEND BOOSTTEST_ARGS "--random=1") # randomized execution order
   if(TST_DEBUG OR VERBOSE)
-    list(APPEND BOOSTTEST_ARGS "--report_level=short")
+    list(APPEND BOOSTTEST_ARGS "--report_level=detailed")
     list(APPEND BOOSTTEST_ARGS "--log_level=message")
   endif()


cmake: restore ccache use when present

cmake: restore ccache use when present

Closes https://github.com/espressif/esp-idf/issues/3116

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -83,6 +83,15 @@
     # Now the configuration is loaded, set the toolchain appropriately
     idf_set_toolchain()

+    # Enable ccache if it's on the path
+    if(NOT CCACHE_DISABLE)
+        find_program(CCACHE_FOUND ccache)
+        if(CCACHE_FOUND)
+            message(STATUS "ccache will be used for faster builds")
+            set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+        endif()
+    endif()
+
     __project(${name} C CXX ASM)

     set(IDF_BUILD_ARTIFACTS ON)


libjpeg.cmake: Use the custom-build 'libtool' executable instead of the system libtool executable (otherwise breaks on mac).

--- libjpeg.cmake
+++ libjpeg.cmake
@@ -27,10 +27,10 @@
         --enable-shared
         LDFLAGS=${FLYEM_LDFLAGS}
         CPPFLAGS=-I${FLYEM_BUILD_DIR}/include
-    BUILD_COMMAND       ${FLYEM_ENV_STRING} make LIBTOOL=libtool
+    BUILD_COMMAND       ${FLYEM_ENV_STRING} make LIBTOOL=./libtool # Must use the libtool that is built in place by the libjpeg Makfile (not the system libtool!)
     BUILD_IN_SOURCE     1
     TEST_COMMAND        ${FLYEM_ENV_STRING} make check
-    INSTALL_COMMAND     ${FLYEM_ENV_STRING} make LIBTOOL=libtool install
+    INSTALL_COMMAND     ${FLYEM_ENV_STRING} make LIBTOOL=./libtool install
 )

 endif (NOT libjpeg_NAME)


Install: LICENSE file

Install: LICENSE file

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -948,7 +948,7 @@
 append_recursive_files_add_to_src_group("${_ALPAKA_ROOT_DIR}/doc/markdown" "${_ALPAKA_ROOT_DIR}" "md" _ALPAKA_FILES_DOC)
 SET_SOURCE_FILES_PROPERTIES(${_ALPAKA_FILES_DOC} PROPERTIES HEADER_FILE_ONLY TRUE)

-SET(_ALPAKA_FILES_OTHER "${_ALPAKA_ROOT_DIR}/.gitignore" "${_ALPAKA_ROOT_DIR}/.travis.yml" "${_ALPAKA_ROOT_DIR}/.zenodo.json" "${_ALPAKA_ROOT_DIR}/COPYING" "${_ALPAKA_ROOT_DIR}/COPYING.LESSER" "${_ALPAKA_ROOT_DIR}/README.md")
+SET(_ALPAKA_FILES_OTHER "${_ALPAKA_ROOT_DIR}/.gitignore" "${_ALPAKA_ROOT_DIR}/.travis.yml" "${_ALPAKA_ROOT_DIR}/.zenodo.json" "${_ALPAKA_ROOT_DIR}/LICENSE" "${_ALPAKA_ROOT_DIR}/README.md")
 SET_SOURCE_FILES_PROPERTIES(${_ALPAKA_FILES_OTHER} PROPERTIES HEADER_FILE_ONLY TRUE)

 #-------------------------------------------------------------------------------


ENH: use last commit on develop branch for temporal-gapfilling remote module

--- Modules/Remote/temporal-gapfilling.remote.cmake
+++ Modules/Remote/temporal-gapfilling.remote.cmake
@@ -26,5 +26,6 @@
 http://tully.ups-tlse.fr/jordi/temporalgapfilling
 "
   GIT_REPOSITORY http://tully.ups-tlse.fr/jordi/temporalgapfilling.git
-  GIT_TAG develop
+  # Commit on develop branch which includes patches for Windows support
+  GIT_TAG 4fc4a71acf7b9b051cda5a3b950de2cdb9d26287
 )


REFAC: set minimum version of opencv to 3.0.0

--- Modules/ThirdParty/OpenCV/otb-module-init.cmake
+++ Modules/ThirdParty/OpenCV/otb-module-init.cmake
@@ -21,9 +21,8 @@
 find_package ( OpenCV REQUIRED )
 mark_as_advanced( OpenCV_DIR )

-if("${OpenCV_VERSION}" VERSION_LESS "2.4.0")
-  message(WARNING "The OpenCV version detected (${OpenCV_VERSION}) is older than 2.4.0, "
-    "it may not be fully compatible with OTB")
+if("${OpenCV_VERSION}" VERSION_LESS "3.0.0")
+  message(ERROR " The OpenCV version detected (${OpenCV_VERSION}) is older than the minimum supported version (3.0.0) ")
 endif()

 if(OpenCV_VERSION_MAJOR EQUAL 4)


blacklist updated to filter out the new zenity backend when on windows. likely need to do the same on mac and potentially resolve conflicts on linux

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -470,7 +470,7 @@
       addLib(nativeFileDialogs)
       set(BLACKLIST ""  )
  	else()
- 	   set(BLACKLIST "nfd_gtk.c" "nfd_cocoa.m" )
+ 	   set(BLACKLIST "nfd_gtk.c" "nfd_cocoa.m" "simple_exec.h" "nfd_zenity.c")
  	   addLib(nativeFileDialogs)
      set(BLACKLIST ""  )
  	   addLib(comctl32)


boards: holybro/durandal add TELEM3 (/dev/ttyS4)

--- boards/holybro/durandal-v1/default.cmake
+++ boards/holybro/durandal-v1/default.cmake
@@ -15,6 +15,7 @@
 		GPS1:/dev/ttyS0
 		TEL1:/dev/ttyS1
 		TEL2:/dev/ttyS2
+		TEL3:/dev/ttyS4
 		TEL4:/dev/ttyS3
 	DRIVERS
 		adc/board_adc


Use release version of V8 by default on Windows.

--- build/modules/FindV8.cmake
+++ build/modules/FindV8.cmake
@@ -64,7 +64,7 @@
 IF(V8_INCLUDE_DIRS AND V8_LIBRARIES)
   SET(V8_FOUND TRUE)
   IF(WIN32)
-   SET(V8_LIBRARIES winmm.lib ws2_32.lib debug ${V8_ROOT}/lib/v8_d.lib optimized ${V8_ROOT}/lib/v8.lib)
+   SET(V8_LIBRARIES winmm.lib ws2_32.lib debug ${V8_ROOT}/lib/v8.lib optimized ${V8_ROOT}/lib/v8.lib)
   ENDIF()
   IF(NOT V8_FIND_QUIETLY)
     MESSAGE(STATUS "Found V8: headers at ${V8_INCLUDE_DIRS}, libraries at ${V8_LIBRARY_DIRS} :: ${V8_LIBRARIES}")


SALOME_GENERATE_TESTS_ENVIRONMENT() macro: strip "Salome" prefix from project name only for Salome project

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -837,7 +837,12 @@
  ENDFOREACH()

  # Get module name as substring of "Salome<ModuleName>"
- STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
+ STRING(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME})
+ IF(_is_salome_project)
+   STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
+ ELSE()
+   SET(PRNAME ${PROJECT_NAME})
+ ENDIF()
  SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")

  # Creating follow string for Windows environement:


ENH: update gdal to 2.2.1

ENH: update gdal to 2.2.1

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -133,8 +133,8 @@

 ExternalProject_Add(GDAL
   PREFIX GDAL
-  URL "http://download.osgeo.org/gdal/2.2.0/gdal-2.2.0.tar.gz"
-  URL_MD5 37d98d32d6ab0b2d7026a6089c3d17ba
+  URL "http://download.osgeo.org/gdal/2.2.1/gdal-2.2.1.tar.gz"
+  URL_MD5 785acf2b0cbf9d56d37c9044d0ee2505
   SOURCE_DIR ${GDAL_SB_SRC}
   BINARY_DIR ${GDAL_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


CMake: Build LuaJIT: use copy_if_different

Use copy_if_different to move luajit products in the post build step to
avoid relinking of projects depending on sol2/luagit.
This is mostly relevant when building sol2 and luajit as subprojects.

--- cmake/Packages/FindLuaBuild/LuaJIT.cmake
+++ cmake/Packages/FindLuaBuild/LuaJIT.cmake
@@ -319,20 +319,20 @@
 # # Post-Build moving steps for necessary items
 # Add post-step to move library afterwards
 set(LUA_JIT_POSTBUILD_COMMENTS "Executable - Moving \"${LUA_JIT_SOURCE_LUA_INTERPRETER}\" to \"${LUA_JIT_DESTINATION_LUA_INTERPRETER}\"...")
-set(LUA_JIT_POSTBUILD_COMMANDS COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_INTERPRETER}" "${LUA_JIT_DESTINATION_LUA_INTERPRETER}")
+set(LUA_JIT_POSTBUILD_COMMANDS COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${LUA_JIT_SOURCE_LUA_INTERPRETER}" "${LUA_JIT_DESTINATION_LUA_INTERPRETER}")
 if (BUILD_LUA_AS_DLL)
 	if (MSVC)
 		set(LUA_JIT_POSTBUILD_COMMENTS "${LUA_JIT_POSTBUILD_COMMENTS} Import Library - Moving \"${LUA_JIT_SOURCE_LUA_IMP_LIB}\" to \"${LUA_JIT_DESTINATION_LUA_IMP_LIB}\"...")
-		set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_IMP_LIB}" "${LUA_JIT_DESTINATION_LUA_IMP_LIB}")
+		set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${LUA_JIT_SOURCE_LUA_IMP_LIB}" "${LUA_JIT_DESTINATION_LUA_IMP_LIB}")

 		set(LUA_JIT_POSTBUILD_COMMENTS "${LUA_JIT_POSTBUILD_COMMENTS} Library - Moving \"${LUA_JIT_SOURCE_LUA_LIB_EXP}\" to \"${LUA_JIT_DESTINATION_LUA_LIB_EXP}\"...")
-		set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} && "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_LIB_EXP}" "${LUA_JIT_DESTINATION_LUA_LIB_EXP}")
+		set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} && "${CMAKE_COMMAND}" -E copy_if_different "${LUA_JIT_SOURCE_LUA_LIB_EXP}" "${LUA_JIT_DESTINATION_LUA_LIB_EXP}")
 	endif()
 	set(LUA_JIT_POSTBUILD_COMMENTS "${LUA_JIT_POSTBUILD_COMMENTS} Dynamic Library - Moving \"${LUA_JIT_SOURCE_LUA_DLL}\" to \"${LUA_JIT_DESTINATION_LUA_DLL}\"...")
-	set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_DLL}" "${LUA_JIT_DESTINATION_LUA_DLL}")
+	set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${LUA_JIT_SOURCE_LUA_DLL}" "${LUA_JIT_DESTINATION_LUA_DLL}")
 else()
 	set(LUA_JIT_POSTBUILD_COMMENTS "${LUA_JIT_POSTBUILD_COMMENTS} Library - Moving \"${LUA_JIT_SOURCE_LUA_LIB}\" to \"${LUA_JIT_DESTINATION_LUA_LIB}\"...")
-	set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_LIB}" "${LUA_JIT_DESTINATION_LUA_LIB}")
+	set(LUA_JIT_POSTBUILD_COMMANDS ${LUA_JIT_POSTBUILD_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${LUA_JIT_SOURCE_LUA_LIB}" "${LUA_JIT_DESTINATION_LUA_LIB}")
 endif()

 if (LUA_LOCAL_DIR)


removing Gtest code from code coverage report

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -109,7 +109,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/*' 'gtest/*' '/usr/*' --output-file ${_outputname}.info.cleaned
 COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
 COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned


Revert 834172 so that automoc4 is found at the correct place.

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -20,7 +20,7 @@
 # check if we are inside KDESupport and automoc is enabled
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project as part of kdesupport
-   set(AUTOMOC4_CONFIG_FILE "${KDESupport_BINARY_DIR}/automoc/Automoc4Config.cmake")
+   set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
 else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project outside kdesupport


Add more search paths for PSQL. Fixes build on Gentoo

--- cmake/FindPostgres.cmake
+++ cmake/FindPostgres.cmake
@@ -1,6 +1,8 @@
 find_path(POSTGRES_INCLUDE_DIR postgres.h
           /usr/include/postgresql
+          /usr/include/postgresql/server
           /usr/local/include/postgresql
+          /usr/local/include/postgresql/server
 )

 find_library(POSTGRES_LIBRARY


minor cmake update

minor cmake update

--- cmake/OpenCVIOLibs.cmake
+++ cmake/OpenCVIOLibs.cmake
@@ -19,7 +19,7 @@
   set(ZLIB_INCLUDE_DIR "${${ZLIB_LIBRARY}_SOURCE_DIR}" "${${ZLIB_LIBRARY}_BINARY_DIR}")
 endif()

-################### libtiff - optional
+################### libtiff - optional (should be searched after zlib)
 if(WITH_TIFF)
   if(BUILD_TIFF)
     set(TIFF_FOUND FALSE)
@@ -67,14 +67,14 @@
   set(JASPER_INCLUDE_DIR "${${JASPER_LIBRARY}_SOURCE_DIR}")
 endif()

-################### libpng - optional
+################### libpng - optional (should be searched after zlib)
 if(WITH_PNG)
   if(BUILD_PNG)
     set(PNG_FOUND FALSE)
   else()
     include(FindPNG)
     if(PNG_FOUND)
-      check_include_file(${PNG_PNG_INCLUDE_DIR}/png.h HAVE_PNG_H)
+      check_include_file(${PNG_PNG_INCLUDE_DIR}/png.h        HAVE_PNG_H)
       check_include_file(${PNG_PNG_INCLUDE_DIR}/libpng/png.h HAVE_LIBPNG_PNG_H)
     endif()
   endif()


always install the stack.xml

always install the stack.xml

--- cmake/catkin_stack.cmake
+++ cmake/catkin_stack.cmake
@@ -14,6 +14,9 @@
     )

   include(${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/stack.cmake)
+  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/stack.xml
+          DESTINATION share/${CATKIN_CURRENT_STACK}
+  )

   assert(CATKIN_ENV)


LTCG disabled by default because of some problems with gtest on windows

--- cmake/global_flags.cmake
+++ cmake/global_flags.cmake
@@ -21,7 +21,7 @@
 # SOFTWARE.

 # define options
-option(LTCG "Link time code generation" ON)
+option(LTCG "Link time code generation" OFF)
 set(ARCHITECTURE "native" CACHE STRING
         "Target architecture to be set for gcc 'march' (or 'none' if option should not be used)")

@@ -35,12 +35,14 @@
         set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL")
         set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
         set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
+        set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
         set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
         set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")

         set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /GL")
         set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
         set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
+        set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
         set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
         set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
     endif()
@@ -48,8 +50,6 @@
     # enable intrinsic functions
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi")
-
-
 elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
     if(LTCG)
         set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")


CMake: remove VS2005 code. Test for UNIX not LINUX

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -203,12 +203,6 @@
 )

 #--------------------------------------------------------------------
-# Disable deprecation warnings for standard C functions
-if(CMAKE_COMPILER_2005)
-    add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
-endif(CMAKE_COMPILER_2005)
-
-#--------------------------------------------------------------------
 # Mac specific
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     add_definitions(-DDARWIN)
@@ -353,7 +347,7 @@
     endif()
 endif()

-if (LINUX)
+if(UNIX)
     set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Will add -fPIC under linux.
 endif()


Possible fix for issue inviwo/inviwo-dev#1137

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -291,10 +291,21 @@
     endif()
     if(IVW_PACKAGE_PROJECT AND BUILD_SHARED_LIBS)
         if(DEFINED MSVC_ACRO)
-            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
-            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcr${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
-            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
-            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcr${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+            if(MSVC_ACRO GREATER 13)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/concrt${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/vccorlib${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/vcruntime${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/concrt${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/vccorlib${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/vcruntime${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+            else()
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcr${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcr${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+            endif()
         endif()
     endif()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Set GLIB2_LIBRARIES to an absolute path when PkgConfig is used.

PkgConfig sets xxx_LIBRARIES to be just the name of the libraries without
the paths or file extensions and sets xxx_LIBRARY_DIRS to be the library
paths, however, target_link_libraries expects an absolute path.  This
uses FIND_LIBRARY after PkgConfig finds the library to get the absolute
path of the library and then override GLIB2_LIBRARIES.

See https://cmake.org/Bug/view.php?id=15804 for a bug that was
filed against CMake regarding this.

--- modules/FindGLIB2.cmake
+++ modules/FindGLIB2.cmake
@@ -42,6 +42,12 @@
   ENDIF ( GLIB2_MIN_VERSION )
   IF ( PKG_CONFIG_FOUND )
     IF ( GLIB2_FOUND )
+      FIND_LIBRARY( _glib2_link_DIR
+                    NAMES glib-2.0 glib
+                    PATHS ${GLIB2_LIBRARY_DIRS} )
+      IF ( _glib2_link_DIR )
+        SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} )
+      ENDIF ( _glib2_link_DIR )
       SET ( GLIB2_CORE_FOUND TRUE )
     ELSE ( GLIB2_FOUND )
       SET ( GLIB2_CORE_FOUND FALSE )


- Fix OSX linkage issue for frameworks, forgot an oopsie

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -119,6 +119,7 @@
             "${TARGET}" "${LINKOPT}"
             "${VERSION_CODE}" "${COPYRIGHT}" "${COMPANY}"
             "${SOURCES}" "${BUNDLE_RSRCS}" "${BUNDLE_HDRS}")
+        target_link_libraries(${LIBRARIES})
     else()
         coffee_add_elibrary(
             "${TARGET}" "${LINKOPT}"


cmake: work with CMake < 2.8.5

cmake: work with CMake < 2.8.5

CMake versions 2.8.4 and earlier were giving this error since r146323:
"string end index: -1 is out of range 0 - 6"

Passing -1 as the length of the desired substring was a new feature
added in CMake 2.8.5:
http://www.cmake.org/Bug/view.php?id=10740

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

--- cmake/modules/VersionFromVCS.cmake
+++ cmake/modules/VersionFromVCS.cmake
@@ -30,7 +30,9 @@
                       OUTPUT_VARIABLE git_output)
       if( git_result EQUAL 0 )
         string(REGEX MATCH r[0-9]+ git_svn_rev ${git_output})
-        string(SUBSTRING "${git_svn_rev}" 1 -1 git_svn_rev_number)
+        string(LENGTH "${git_svn_rev}" rev_length)
+        math(EXPR rev_length "${rev_length}-1")
+        string(SUBSTRING "${git_svn_rev}" 1 ${rev_length} git_svn_rev_number)
         set(SVN_REVISION ${git_svn_rev_number} PARENT_SCOPE)
         set(git_svn_rev "-svn-${git_svn_rev}")


updated for 5.9.9 release.

updated for 5.9.9 release.

svn path=/trunk/; revision=11953

--- cmake/modules/plplot_version.cmake
+++ cmake/modules/plplot_version.cmake
@@ -9,7 +9,7 @@
 # CPack version numbers for release tarball name.
 set(CPACK_PACKAGE_VERSION_MAJOR 5)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 8)
+set(CPACK_PACKAGE_VERSION_PATCH 9)

 # PLplot library version information.


Also use embedded version of tinyxml for MacOS

--- cmakemodules/script_tinyxml2.cmake
+++ cmakemodules/script_tinyxml2.cmake
@@ -12,7 +12,7 @@
 endif()

 set(_use_embeded_default "OFF")
-if (NOT UNIX)
+if (WIN32 OR APPLE)
 	set(_use_embeded_default "ON")
 endif()


moving to a status, should be removed anyway

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

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -268,7 +268,8 @@
 # returns the extension of the mex (the suffixes)
 macro(get_matlab_suffix matlab_root mex_suffix)

-  # todo setup the extension properly. Currently I do not know if this is sufficient for all win32 distributions
+  # todo setup the extension properly. Currently I do not know if this is sufficient for all win32 distributions.
+  # there is also CMAKE_EXECUTABLE_SUFFIX that could be tweaked
   set(mexext_suffix "")
   if(WIN32)
     list(APPEND mexext_suffix ".bat")
@@ -573,7 +574,7 @@

-message("MATLAB_LIB_PREFIX_FOR_LOOKUP ${MATLAB_LIB_PREFIX_FOR_LOOKUP} | MATLAB_LIB_DIR_FOR_LOOKUP = ${MATLAB_LIB_DIR_FOR_LOOKUP}")
+message(STATUS "MATLAB_LIB_PREFIX_FOR_LOOKUP ${MATLAB_LIB_PREFIX_FOR_LOOKUP} | MATLAB_LIB_DIR_FOR_LOOKUP = ${MATLAB_LIB_DIR_FOR_LOOKUP}")

 # WARNING: this thing pollutes the CMAKE_FIND_LIBRARY_PREFIXES global variable.
 # Should it be restored afterwards? Is there a more appropriate way to do that?


[cmake] rc in version does not work

[cmake] rc in version does not work

--- cmake/SiconosVersion.cmake
+++ cmake/SiconosVersion.cmake
@@ -1,7 +1,7 @@
 # --- set siconos current version ---
 set(MAJOR_VERSION 4)
 set(MINOR_VERSION 4)
-set(PATCH_VERSION 0.rc)
+set(PATCH_VERSION 0)
 set(SICONOS_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")

 ### SOVERSION


Reverts commit r190808 and r190556.

Reverts commit r190808 and r190556.

The use of these features in clang has been reverted.

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

--- cmake/modules/GetSVN.cmake
+++ cmake/modules/GetSVN.cmake
@@ -2,44 +2,24 @@
 #
 # Input variables:
 #   FIRST_SOURCE_DIR  - First source directory
-#   FIRST_NAME        - The macro prefix for the first repository's info
-#   SECOND_SOURCE_DIR - Second source directory (opt)
-#   SECOND_NAME       - The macro prefix for the second repository's info (opt)
+#   FIRST_REPOSITORY  - The macro to define to the first revision number.
+#   SECOND_SOURCE_DIR - Second source directory
+#   SECOND_REPOSITORY - The macro to define to the second revision number.
 #   HEADER_FILE       - The header file to write
-#
-# The output header will contain macros FIRST_REPOSITORY and FIRST_REVISION,
-# and SECOND_REPOSITORY and SECOND_REVISION if requested, where "FIRST" and
-# "SECOND" are substituted with the names specified in the input variables.
+include(FindSubversion)
+if (Subversion_FOUND AND EXISTS "${FIRST_SOURCE_DIR}/.svn")
+  # Repository information for the first repository.
+  Subversion_WC_INFO(${FIRST_SOURCE_DIR} MY)
+  file(WRITE ${HEADER_FILE}.txt "#define ${FIRST_REPOSITORY} \"${MY_WC_REVISION}\"\n")

-# Chop off cmake/modules/GetSVN.cmake
-get_filename_component(LLVM_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
-get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
-get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
+  # Repository information for the second repository.
+  if (EXISTS "${SECOND_SOURCE_DIR}/.svn")
+    Subversion_WC_INFO(${SECOND_SOURCE_DIR} MY)
+    file(APPEND ${HEADER_FILE}.txt
+      "#define ${SECOND_REPOSITORY} \"${MY_WC_REVISION}\"\n")
+  endif ()

-# Handle strange terminals
-set(ENV{TERM} "dumb")
-
-function(append_info name path)
-  execute_process(COMMAND "${LLVM_DIR}/utils/GetSourceVersion" "${path}"
-    OUTPUT_VARIABLE revision)
-  string(STRIP "${revision}" revision)
-  execute_process(COMMAND "${LLVM_DIR}/utils/GetRepositoryPath" "${path}"
-    OUTPUT_VARIABLE repository
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-  string(STRIP "${repository}" repository)
-  file(APPEND "${HEADER_FILE}.txt"
-    "#define ${name}_REVISION \"${revision}\"\n")
-  file(APPEND "${HEADER_FILE}.txt"
-    "#define ${name}_REPOSITORY \"${repository}\"\n")
-endfunction()
-
-append_info(${FIRST_NAME} "${FIRST_SOURCE_DIR}")
-if(DEFINED SECOND_SOURCE_DIR)
-  append_info(${SECOND_NAME} "${SECOND_SOURCE_DIR}")
+  # Copy the file only if it has changed.
+  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+    ${HEADER_FILE}.txt ${HEADER_FILE})
 endif()
-
-# Copy the file only if it has changed.
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
-  "${HEADER_FILE}.txt" "${HEADER_FILE}")
-file(REMOVE "${HEADER_FILE}.txt")
-


curves: bump required embree to 3.2.0

curves: bump required embree to 3.2.0

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -49,7 +49,7 @@
 ENDIF()

-SET(EMBREE_VERSION_REQUIRED 3.1.0)
+SET(EMBREE_VERSION_REQUIRED 3.2.0)

 SET(OSPRAY_VERSION
   ${OSPRAY_VERSION_MAJOR}.${OSPRAY_VERSION_MINOR}.${OSPRAY_VERSION_PATCH}


vita.cmake: avoid rebuilding unnecessarily vpk and eboot (#120)

Fix #116.

--- cmake_toolchain/vita.cmake
+++ cmake_toolchain/vita.cmake
@@ -64,12 +64,12 @@
     COMMENT "Converting to Sony ELF ${source}.velf" VERBATIM
   )
   separate_arguments(VITA_MAKE_FSELF_FLAGS)
-  add_custom_target(${target} ALL
+  add_custom_command(OUTPUT ${target}
     COMMAND ${VITA_MAKE_FSELF} ${VITA_MAKE_FSELF_FLAGS} ${source}.velf ${target}
     DEPENDS ${source}.velf
     COMMENT "Creating SELF ${target}"
   )
-  add_dependencies(${target} ${source})
+  add_custom_target(${target}_ ALL DEPENDS ${target})
 endmacro(vita_create_self)
 ##################################################

@@ -178,11 +178,11 @@
     COMMENT "Generating param.sfo for ${target}"
   )
   separate_arguments(VITA_PACK_VPK_FLAGS)
-  add_custom_target(${target} ALL
+  add_custom_command(OUTPUT ${target}
     COMMAND ${VITA_PACK_VPK} ${VITA_PACK_VPK_FLAGS} -s ${target}_param.sfo -b ${eboot} ${target}
-    DEPENDS ${target}_param.sfo
+    DEPENDS ${target}_param.sfo ${eboot}
     COMMENT "Building vpk ${target}"
   )
-  add_dependencies(${target} ${eboot})
+  add_custom_target(${target}_ ALL DEPENDS ${target})
 endmacro(vita_create_vpk)
 ##################################################


cmake: use  in device scripts

cmake: use  in device scripts

Signed-off-by: Elms <23ce84ca7a7de9dc17ad8e8b0bbd717d4f9f9884@freshred.net>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -317,12 +317,13 @@
       separate_arguments(CMD_W_ARGS UNIX_COMMAND ${SCRIPT})
       list(GET CMD_W_ARGS 0 CMD)
       set(TEMP_TARGET arch.${OUTPUT_NAME}.xml)
+      set(DEPS ${PYTHON3} ${PYTHON3_TARGET} ${CMD})
+      append_file_dependency(DEPS ${FINAL_OUTPUT})
+
       add_custom_command(
 	OUTPUT ${TEMP_TARGET}
 	COMMAND ${CMD_W_ARGS} < ${FINAL_FILE} > ${TEMP_TARGET}
-	DEPENDS
-        ${PYTHON3} ${PYTHON3_TARGET}
-	${CMD} ${FINAL_TARGET}
+	DEPENDS ${DEPS}
 	)

       add_file_target(FILE ${TEMP_TARGET} GENERATED)


fix for Windows

fix for Windows

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -116,7 +116,11 @@
 #ELSE()
 SET(EMBREE_CMAKECONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
 SET(EMBREE_CMAKEEXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
-FILE(RELATIVE_PATH EMBREE_RELATIVE_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/")
+IF (WIN32)
+  SET(EMBREE_RELATIVE_ROOT_DIR "../../../")
+ELSE()
+  FILE(RELATIVE_PATH EMBREE_RELATIVE_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/")
+ENDIF()
 #ENDIF()

 CONFIGURE_FILE(common/cmake/embree-config.cmake embree-config-install.cmake @ONLY)


Bug#42733: Type-punning warnings when compiling MySQL -- strict aliasing violations.

Due to the extent of aliasing violations in the MySQL source
code, at this time it is safer to disable strict aliasing related
optimizations in release builds.

As of this patch, only GCC enables strict aliasing by default.
Hence, use the -fno-strict-aliasing option to disable the
aliasing rules.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -131,16 +131,16 @@

   # Default GCC flags
   IF(CMAKE_COMPILER_IS_GNUCC)
-    SET(COMMON_C_FLAGS               "-g -static-libgcc -fno-omit-frame-pointer")
+    SET(COMMON_C_FLAGS               "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing")
     SET(CMAKE_C_FLAGS_DEBUG          "-O ${COMMON_C_FLAGS}")
     SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
   ENDIF()
   IF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(COMMON_CXX_FLAGS               "-g -static-libgcc -fno-omit-frame-pointer")
+    SET(COMMON_CXX_FLAGS               "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing")
     SET(CMAKE_CXX_FLAGS_DEBUG          "-O ${COMMON_CXX_FLAGS}")
     SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
   ENDIF()
-
+
   # HPUX flags
   IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
     IF(CMAKE_C_COMPILER_ID MATCHES "HP")
@@ -156,7 +156,7 @@
     ENDIF()
     SET(WITH_SSL no)
   ENDIF()
-
+
   # Linux flags
   IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
     IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
@@ -173,18 +173,18 @@
       SET(WITH_SSL no)
     ENDIF()
   ENDIF()
-
+
   # OSX flags
   IF(APPLE)
-    SET(COMMON_C_FLAGS                 "-g -fno-common")
+    SET(COMMON_C_FLAGS                 "-g -fno-common -fno-strict-aliasing")
     # XXX: why are we using -felide-constructors on OSX?
-    SET(COMMON_CXX_FLAGS               "-g -fno-common -felide-constructors")
+    SET(COMMON_CXX_FLAGS               "-g -fno-common -felide-constructors -fno-strict-aliasing")
     SET(CMAKE_C_FLAGS_DEBUG            "-O ${COMMON_C_FLAGS}")
     SET(CMAKE_CXX_FLAGS_DEBUG          "-O ${COMMON_CXX_FLAGS}")
     SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-Os ${COMMON_C_FLAGS}")
     SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${COMMON_CXX_FLAGS}")
   ENDIF()
-
+
   # Solaris flags
   IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
     IF(CMAKE_SYSTEM_VERSION VERSION_GREATER "5.9")
@@ -219,7 +219,7 @@
       ENDIF()
     ENDIF()
   ENDIF()
-
+
   IF(CMAKE_C_FLAGS_DEBUG)
     SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}"
       CACHE STRING "Debug C compile flags")


Updated the package file

Updated the package file

Update #194

--- h5cpp-config.cmake
+++ h5cpp-config.cmake
@@ -29,6 +29,15 @@
 set(HDF5_PREFER_PARALLEL @WITH_MPI@)
 find_package(HDF5 @HDF5_VERSION@ EXACT REQUIRED COMPONENTS C)

+#
+# as the libraries are attached to the imported target we have to add the
+# directory where to find them according to the previous find_package call
+#
+foreach(HDF5_LIB ${HDF5_LIBRARIES})
+    get_filename_component(LIB_PATH ${HDF5_LIB} DIRECTORY)
+    link_directories(${LIB_PATH})
+endforeach()
+
 if(H5CPP_MPI_ENABLED AND (NOT HDF5_IS_PARALLEL))
     message(FATAL_ERROR "HDF5 library with MPI support required!")
 endif()


Allow for whitespace in program name and arguments.

--- heaptrack.sh.cmake
+++ heaptrack.sh.cmake
@@ -49,7 +49,6 @@
 debug=
 pid=
 client=
-clientargs=

 while true; do
     case "$1" in
@@ -84,7 +83,7 @@
             break
             ;;
         *)
-            if [ ! -x "$(which $1 2> /dev/null)" ]; then
+            if [ ! -x "$(which "$1" 2> /dev/null)" ]; then
                 echo "Error: Debuggee \"$1\" is not an executable."
                 echo
                 echo "Usage: $0 [--debug|-d] [--help|-h] DEBUGGEE [ARGS...]"
@@ -92,14 +91,13 @@
             fi
             client="$1"
             shift 1
-            clientargs="$@"
             break
             ;;
     esac
 done

 # put output into current pwd
-output=$(pwd)/heaptrack.$(basename $client).$$
+output=$(pwd)/heaptrack.$(basename "$client").$$

 # find preload library and interpreter executable using relative paths
 EXE_PATH=$(readlink -f $(dirname $0))
@@ -142,20 +140,20 @@

     echo "Heaptrack finished! Now run the following to investigate the data:"
     echo
-    echo "  heaptrack_print $output | less"
+    echo "  heaptrack_print \"$output\" | less"
 }
 trap cleanup EXIT

 echo "starting application, this might take some time..."
-echo "output will be written to $output"
+echo "output will be written to \"$output\""

 if [ -z "$debug" ] && [ -z "$pid" ]; then
-  LD_PRELOAD=$LIBHEAPTRACK_PRELOAD DUMP_HEAPTRACK_OUTPUT="$pipe" $client $clientargs
+  LD_PRELOAD=$LIBHEAPTRACK_PRELOAD DUMP_HEAPTRACK_OUTPUT="$pipe" "$client" "$@"
 else
   if [ -z "$pid" ]; then
     gdb --eval-command="set environment LD_PRELOAD=$LIBHEAPTRACK_PRELOAD" \
         --eval-command="set environment DUMP_HEAPTRACK_OUTPUT=$pipe" \
-        --eval-command="run" --args $client $clientargs
+        --eval-command="run" --args "$client" "$@"
   else
     gdb --batch-silent -n -iex="set auto-solib-add off" -p $pid \
         --eval-command="sharedlibrary libdl" \