Issue #44: Require exact version of Python libs as well as executable.

--- CMake/mpAddPythonBindings.cmake
+++ CMake/mpAddPythonBindings.cmake
@@ -28,7 +28,7 @@

   if (DEFINED MYPROJECT_PYTHON_VERSION)
     find_package(PythonInterp ${MYPROJECT_PYTHON_VERSION} EXACT REQUIRED)
-    find_package(PythonLibs REQUIRED)
+    find_package(PythonLibs ${MYPROJECT_PYTHON_VERSION} EXACT REQUIRED)
   else()
     find_package(PythonInterp)
     find_package(PythonLibs)


Fix typo in CMake file

Fix typo in CMake file

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -26,7 +26,7 @@
 # Modified Variables:
 #  - _do_find_package - always defined, true if find_pacakge for
 #    languages should be run.
-#  - _find_package_extra_args - may be set to `REQUIRED` of `QUIET` as
+#  - _find_package_extra_args - may be set to `REQUIRED` or `QUIET` as
 #    needed.
 #  - WRAP_<languageName>_DEFAULT - may be set to `ON` or `OFF` if it
 #    can be determined with out a find_package call


Use the same version as patch to official repos.

--- CMakeModules/CodeCoverage.cmake
+++ CMakeModules/CodeCoverage.cmake
@@ -1,14 +1,37 @@
+#
+# 2012-01-31, Lars Bilke
 # - Enable Code Coverage
 #
-# 2012-01-31, Lars Bilke
+# 2013-09-17, Joakim Söderberg
+# - Added support for Clang.
+# - Some additional usage instructions.
 #
 # USAGE:
-# 1. Copy this file into your cmake modules path
+# 1. Copy this file into your cmake modules path.
+#
 # 2. Add the following line to your CMakeLists.txt:
 #      INCLUDE(CodeCoverage)
-#
+#
+# 3. Set compiler flags to turn off optimization and enable coverage:
+#    SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+#	 SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+#
 # 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
-#    which runs your test executable and produces a lcov code coverage report.
+#    which runs your test executable and produces a lcov code coverage report:
+#    Example:
+#	 SETUP_TARGET_FOR_COVERAGE(
+#				my_coverage_target  # Name for custom target.
+#				test_driver         # Name of the test driver executable that runs the tests.
+#									# NOTE! This should always have a ZERO as exit code
+#									# otherwise the coverage generation will not complete.
+#				coverage            # Name of output directory.
+#				)
+#
+# 4. Build a Debug build:
+#	 cmake -DCMAKE_BUILD_TYPE=Debug ..
+#	 make
+#	 make my_coverage_target
+#
 #

 # Check prereqs
@@ -23,7 +46,7 @@

 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
 	# Clang version 3.0.0 and greater now supports gcov as well.
-	MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't, checking for that.")
+	MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")

 	IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 		MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
@@ -31,12 +54,14 @@
 ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX

 IF ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
-  MESSAGE( WARNING "Code coverage results with an optimised (non-Debug) build may be misleading" )
+  MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
 ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"

 # Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests
+# Param _testrunner     The name of the target which runs the tests.
+#						MUST return ZERO always, even on errors.
+#						If not, no coverage report will be created!
 # Param _outputname     lcov output is generated as _outputname.info
 #                       HTML report is generated in _outputname/index.html
 # Optional fourth parameter is passed as arguments to _testrunner


CmakeFedoraScript: Show no error when -Dcmd is not given

--- Modules/CmakeFedoraScript.cmake
+++ Modules/CmakeFedoraScript.cmake
@@ -162,13 +162,15 @@
     ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules
     ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} )

-INCLUDE(ManageFile RESULT_VARIABLE MANAGE_MODULE_PATH)
+INCLUDE(ManageMessage RESULT_VARIABLE MANAGE_MODULE_PATH)
 IF(NOT MANAGE_MODULE_PATH)
-    M_MSG(${M_FATAL} "ManageFile.cmake fedora cannot be found in ${CMAKE_MODULE_PATH}")
+    MESSAGE(FATAL_ERROR "ManageMessage.cmake cannot be found in ${CMAKE_MODULE_PATH}")
 ENDIF(NOT MANAGE_MODULE_PATH)
-INCLUDE(ManageMessage)
+INCLUDE(ManageFile)

-IF(cmd STREQUAL "find_file" OR cmd STREQUAL "find_program")
+IF(cmd STREQUAL "")
+    CMAKE_FEDORA_SCRIPT_PRINT_USAGE()
+ELSEIF(cmd STREQUAL "find_file" OR cmd STREQUAL "find_program")
     IF(NOT names)
 	CMAKE_FEDORA_SCRIPT_PRINT_USAGE()
 	M_MSG(${M_FATAL} "Requires -Dnames=\"<name1;name2>\"")
@@ -180,9 +182,9 @@
     MANAGE_FILE_CACHE_SCRIPT()
 ELSEIF(cmd STREQUAL "get_variable")
     CMAKE_FEDORA_GET_VARIABLE_SCRIPT()
-ELSE(cmd STREQUAL "find_file" OR cmd STREQUAL "find_program")
+ELSE(cmd STREQUAL "")
     CMAKE_FEDORA_SCRIPT_PRINT_USAGE()
     M_MSG(${M_FATAL} "Invalid cmd ${cmd}")
-ENDIF(cmd STREQUAL "find_file" OR cmd STREQUAL "find_program")
+ENDIF(cmd STREQUAL "")


Fix bootstrap -Werror builds after clang r258128

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -403,6 +403,9 @@
     append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     append("-Wcast-qual" CMAKE_CXX_FLAGS)

+    # FIXME: Clean up the codebase, then remove this flag.
+    add_flag_if_supported("-Wno-expansion-to-defined" EXPANSION_TO_DEFINED_FLAG)
+
     # Turn off missing field initializer warnings for gcc to avoid noise from
     # false positives with empty {}. Turn them on otherwise (they're off by
     # default for clang).


re-locate to correct place in configuration and check by compilation


support MSVC 2019

support MSVC 2019

--- cmake/modules/hunter_setup_msvc.cmake
+++ cmake/modules/hunter_setup_msvc.cmake
@@ -43,6 +43,7 @@
     string(COMPARE EQUAL "${MSVC_VERSION}" "1800" _vs_12_2013)
     string(COMPARE EQUAL "${MSVC_VERSION}" "1900" _vs_14_2015)
     string(REGEX MATCH "^191[0-9]$" _vs_15_2017 "${MSVC_VERSION}")
+    string(REGEX MATCH "^192[0-9]$" _vs_16_2019 "${MSVC_VERSION}")

     if(_vs_8_2005)
       set(HUNTER_MSVC_VERSION "8")
@@ -65,6 +66,9 @@
     elseif(_vs_15_2017)
       set(HUNTER_MSVC_VERSION "15")
       set(HUNTER_MSVC_YEAR "2017")
+    elseif(_vs_16_2019)
+      set(HUNTER_MSVC_VERSION "16")
+      set(HUNTER_MSVC_YEAR "2019")
     else()
       hunter_internal_error("Unexpected MSVC_VERSION: '${MSVC_VERSION}'")
     endif()


qibuild.cmake version 10: avoid parsing dependencies.cmake several times

--- cmake/qibuild/templates/qibuild.cmake
+++ cmake/qibuild/templates/qibuild.cmake
@@ -6,13 +6,13 @@
 # This file is part of the qibuild project    #
 ###############################################

-set(QIBUILD_BOOTSTRAP_VERSION 9)
+set(QIBUILD_BOOTSTRAP_VERSION 10)

 # Someone used qibuild and generated a dependencies.cmake
 # file (for the dependencies and where to find qibuild/cmake file),
 # so just use it.
-if(EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
-  include(${CMAKE_BINARY_DIR}/dependencies.cmake)
+if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake)
+  include(${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake)
 endif()

 # Someone called cmake with a toolchain file that is


Fixes #5255.  Disable intel warning 1292: {{{svn merge -c 45766 ../tokudb.3571}}}

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -84,6 +84,7 @@
   set(intel_warnings
     94     # allow arrays of length 0
     589    # do not complain about goto that skips initialization
+    1292   # icc lies (it says it is "__GNUC__", but it doesn't handle the resulting macroexpansions from glibc 2.15.37 (which is designed for gcc 4.7, and appears in Fedora 17)
     2259   # do not complain about "non-pointer conversion from int to u_int8_t (and other small types) may lose significant bits".  this produces too many false positives
     11000  # do not remark about multi-file optimizations, single-file optimizations, and object temp files
     11001


Use list append and add place to load dependencies

--- template-config.cmake
+++ template-config.cmake
@@ -12,17 +12,16 @@
 # TEMPLATE_LIBRARIES -> <PROJECT_NAME>_LIBRARIES
 # TEMPLATE_INCLUDES -> <PROJECT_NAME>_INCLUDES

-
 # TEMPLATE_FIBLIB_LIBRARY -> <PROJECT_NAME>_<...>_LIBRARY
 # TEMPLATE_FIBLIB_LIBRARY_RELEASE -> <PROJECT_NAME>_<...>_LIBRARY_RELEASE
 # TEMPLATE_FIBLIB_LIBRARY_DEBUG -> <PROJECT_NAME>_<...>_LIBRARY_DEBUG
 # TEMPLATE_FIBLIB_INCLUDE_DIR -> <PROJECT_NAME>_<...>_INCLUDE_DIR

-
-
+set(TEMPLATE_INCLUDES "")
+set(TEMPLATE_LIBRARIES "")

 # Definition of function "find" with two mandatory arguments, "LIB_NAME" and "HEADER".
-function (find LIB_NAME HEADER)
+macro (find LIB_NAME HEADER)

     set(HINT_PATHS ${ARGN})

@@ -72,23 +71,16 @@
         set(${LIB_NAME_UPPER}_LIBRARY ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
     endif()

-
-    set(TEMPLATE_INCLUDES  ${TEMPLATE_INCLUDES}  ${${LIB_NAME_UPPER}_INCLUDE_DIR} PARENT_SCOPE)
-    set(TEMPLATE_LIBRARIES ${TEMPLATE_LIBRARIES} ${${LIB_NAME_UPPER}_LIBRARY} PARENT_SCOPE)
+    list(APPEND TEMPLATE_INCLUDES ${${LIB_NAME_UPPER}_INCLUDE_DIR})
+    list(APPEND TEMPLATE_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})

     # DEBUG MESSAGES
-#    message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
-#    message("${LIB_NAME_UPPER}_LIBRARY_RELEASE = ${${LIB_NAME_UPPER}_LIBRARY_RELEASE}")
-#    message("${LIB_NAME_UPPER}_LIBRARY_DEBUG   = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
-#    message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")
+    # message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
+    # message("${LIB_NAME_UPPER}_LIBRARY_RELEASE = ${${LIB_NAME_UPPER}_LIBRARY_RELEASE}")
+    # message("${LIB_NAME_UPPER}_LIBRARY_DEBUG   = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
+    # message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")

-endfunction(find)
-
-
-
-
-
-
+endmacro(find)

 # load standard CMake arguments (c.f. http://stackoverflow.com/questions/7005782/cmake-include-findpackagehandlestandardargs-cmake)
@@ -101,7 +93,7 @@
 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ENV_PROGRAMFILES)
 file(TO_CMAKE_PATH "$ENV{TEMPLATE_DIR}" ENV_TEMPLATE_DIR)

-set(LIB_PATHS
+set(LIB_PATHS
     ${TEMPLATE_DIR}/build
     ${TEMPLATE_DIR}/build/Release
     ${TEMPLATE_DIR}/build/Debug
@@ -120,14 +112,17 @@
     /opt/local/lib64
 )

-
 # Find libraries
 find(fiblib fiblib/fiblib_api.h ${LIB_PATHS})

+if(TEMPLATE_FIBLIB_LIBRARY)
+  # add dependencies
+endif()
+

 # DEBUG
-#message("TEMPLATE_INCLUDES  = ${TEMPLATE_INCLUDES}")
-#message("TEMPLATE_LIBRARIES = ${TEMPLATE_LIBRARIES}")
+# message("TEMPLATE_INCLUDES  = ${TEMPLATE_INCLUDES}")
+# message("TEMPLATE_LIBRARIES = ${TEMPLATE_LIBRARIES}")

 find_package_handle_standard_args(TEMPLATE DEFAULT_MSG TEMPLATE_LIBRARIES TEMPLATE_INCLUDES)
 mark_as_advanced(TEMPLATE_FOUND)


ENH: updateding the ITK version

ENH: updateding the ITK version

The code was frozen a couple of days ago, and ITK's dashboard is being
cleanup. We are taking this as a time to being integrating the changes
into SimpleITK.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -14,7 +14,7 @@
 set(proj ITK)  ## Use ITK convention of calling it ITK
 set(ITK_REPOSITORY git://itk.org/ITK.git)
 set(ITK_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/ITK-4.0)
-set(ITK_TAG_COMMAND GIT_TAG  f75d48c71875fba2dba9d7137acb458d82641105 )
+set(ITK_TAG_COMMAND GIT_TAG  3cb6183bbb1c670f12519fe5eb537b57876e9a89 )
 set(WrapITK_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/ITK-4.0/WrapITK)
 message(STATUS "ITK_WRAPPING=${ITK_WRAPPING}")

@@ -42,7 +42,7 @@
   -DINSTALL_WRAP_ITK_COMPATIBILITY:BOOL=OFF
   -DWRAP_float:BOOL=ON
   -DWRAP_unsigned_char:BOOL=ON
-  -DWRAP_signed_short:BOOL=ON≈ƒ
+  -DWRAP_signed_short:BOOL=ON
   -DWRAP_unsigned_short:BOOL=ON
   -DWRAP_complex_float:BOOL=ON
   -DWRAP_vector_float:BOOL=ON


BUG: Missing $ before the "OVERWRITE" variable.

--- Utilities/KWStyle/KWStyle.cmake
+++ Utilities/KWStyle/KWStyle.cmake
@@ -57,7 +57,7 @@

 SET(KWSTYLE_ARGUMENTS_REVIEW
   -xml ${KWSTYLE_CONFIGURATION_FILE} -v -D ${KWSTYLE_ITK_REVIEW_FILES_LIST}
-  -o {KWSTYLE_ITK_OVERWRITE_FILE} ${KWSTYLE_EDITOR_FORMAT}
+  -o ${KWSTYLE_ITK_OVERWRITE_FILE} ${KWSTYLE_EDITOR_FORMAT}
   )

 SET(KWSTYLE_ARGUMENTS_CODE


check_source_runs.cmake: Make sure there are not compiler definitions.

--- cmake/check_source_runs.cmake
+++ cmake/check_source_runs.cmake
@@ -1,6 +1,6 @@
 # $Id$
 # -----------------------------------------------------------------------------
-# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
+# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
 #
 # CppAD is distributed under multiple licenses. This distribution is under
 # the terms of the
@@ -22,6 +22,7 @@
 MACRO(check_source_runs source variable)
 	SET(CMAKE_REQUIRED_INCLUDES  "")
 	SET(CMAKE_REQUIRED_LIBRARIES "")
+	SET(CMAKE_REQUIRED_DEFINITIONS "")
 	SET(CMAKE_REQUIRED_FLAGS     ${cppad_cxx_flags} )
 	CHECK_CXX_SOURCE_RUNS("${source}" result)
 	IF( result )


Fix the problem that protobuf cannot be used as a DEPS argument in cc_library.

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -14,11 +14,41 @@

 INCLUDE(ExternalProject)

+# Print and set the protobuf library information,
+# finish this cmake process and exit from this file.
 macro(PROMPT_PROTOBUF_LIB)
+    SET(protobuf_DEPS ${ARGN})
+
     MESSAGE(STATUS "Protobuf protoc executable: ${PROTOBUF_PROTOC_EXECUTABLE}")
     MESSAGE(STATUS "Protobuf library: ${PROTOBUF_LIBRARY}")
     MESSAGE(STATUS "Protobuf version: ${PROTOBUF_VERSION}")
     INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
+
+    # Assuming that all the protobuf libraries are of the same type.
+    IF(${PROTOBUF_LIBRARY} MATCHES "${STATIC_LIBRARY_SUFFIX}$")
+        SET(protobuf_LIBTYPE STATIC)
+    ELSEIF(${PROTOBUF_LIBRARY} MATCHES "${DYNAMIC_LIBRARY_SUFFIX}$")
+        SET(protobuf_LIBTYPE SHARED)
+    ELSE()
+        MESSAGE(FATAL_ERROR "Unknown library type: ${PROTOBUF_LIBRARY}")
+    ENDIF()
+
+    ADD_LIBRARY(protobuf ${protobuf_LIBTYPE} IMPORTED GLOBAL)
+    SET_PROPERTY(TARGET protobuf PROPERTY IMPORTED_LOCATION ${PROTOBUF_LIBRARY})
+
+    ADD_LIBRARY(protobuf_lite ${protobuf_LIBTYPE} IMPORTED GLOBAL)
+    SET_PROPERTY(TARGET protobuf_lite PROPERTY IMPORTED_LOCATION ${PROTOBUF_LITE_LIBRARY})
+
+    ADD_LIBRARY(protoc ${protobuf_LIBTYPE} IMPORTED GLOBAL)
+    SET_PROPERTY(TARGET protoc PROPERTY IMPORTED_LOCATION ${PROTOC_LIBRARY})
+
+    FOREACH(dep ${protobuf_DEPS})
+        ADD_DEPENDENCIES(protobuf ${dep})
+        ADD_DEPENDENCIES(protobuf_lite ${dep})
+        ADD_DEPENDENCIES(protoc ${dep})
+    ENDFOREACH()
+
+    LIST(APPEND external_project_dependencies protobuf)
     RETURN()
 endmacro()
 macro(SET_PROTOBUF_VERSION)
@@ -43,8 +73,9 @@
 endif()

 FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
-    SET(PROTOBUF_SOURCES_DIR ${THIRD_PARTY_PATH}/${TARGET_NAME})
-    SET(PROTOBUF_INSTALL_DIR ${THIRD_PARTY_PATH}/install/${TARGET_NAME})
+    STRING(REPLACE "extern_" "" TARGET_DIR_NAME "${TARGET_NAME}")
+    SET(PROTOBUF_SOURCES_DIR ${THIRD_PARTY_PATH}/${TARGET_DIR_NAME})
+    SET(PROTOBUF_INSTALL_DIR ${THIRD_PARTY_PATH}/install/${TARGET_DIR_NAME})

     SET(${TARGET_NAME}_INCLUDE_DIR "${PROTOBUF_INSTALL_DIR}/include" PARENT_SCOPE)
     SET(PROTOBUF_INCLUDE_DIR "${PROTOBUF_INSTALL_DIR}/include" PARENT_SCOPE)
@@ -109,6 +140,8 @@
         SET_PROTOBUF_VERSION()
         IF("${PROTOBUF_VERSION}" VERSION_LESS "3.1.0")
             SET(PROTOBUF_FOUND OFF)
+        ELSE()
+            PROMPT_PROTOBUF_LIB()
         ENDIF()
     ENDIF(PROTOBUF_FOUND)
 ELSE()
@@ -120,18 +153,22 @@
 ENDIF()

 IF(NOT PROTOBUF_FOUND)
-    build_protobuf(protobuf FALSE)
-    LIST(APPEND external_project_dependencies protobuf)
+    build_protobuf(extern_protobuf FALSE)

-    SET(PROTOBUF_INCLUDE_DIR ${protobuf_INCLUDE_DIR}
+    SET(PROTOBUF_INCLUDE_DIR ${extern_protobuf_INCLUDE_DIR}
         CACHE PATH "protobuf include directory." FORCE)
-    IF(NOT CMAKE_CROSSCOMPILING)
-        SET(PROTOBUF_PROTOC_EXECUTABLE ${protobuf_PROTOC_EXECUTABLE}
+    SET(PROTOBUF_LITE_LIBRARY ${extern_protobuf_LITE_LIBRARY}
+        CACHE FILEPATH "protobuf lite library." FORCE)
+    SET(PROTOBUF_LIBRARY ${extern_protobuf_LIBRARY}
+        CACHE FILEPATH "protobuf library." FORCE)
+    SET(PROTOBUF_PROTOC_LIBRARY ${extern_protobuf_PROTOC_LIBRARY}
+        CACHE FILEPATH "protoc library." FORCE)
+
+    IF(CMAKE_CROSSCOMPILING)
+        PROMPT_PROTOBUF_LIB(protobuf_host extern_protobuf)
+    ELSE()
+        SET(PROTOBUF_PROTOC_EXECUTABLE ${extern_protobuf_PROTOC_EXECUTABLE}
             CACHE FILEPATH "protobuf executable." FORCE)
+        PROMPT_PROTOBUF_LIB(extern_protobuf)
     ENDIF()
-    SET(PROTOBUF_LITE_LIBRARY ${protobuf_LITE_LIBRARY} CACHE FILEPATH "protobuf lite library." FORCE)
-    SET(PROTOBUF_LIBRARY ${protobuf_LIBRARY} CACHE FILEPATH "protobuf library." FORCE)
-    SET(PROTOBUF_PROTOC_LIBRARY ${protobuf_PROTOC_LIBRARY} CACHE FILEPATH "protoc library." FORCE)
 ENDIF(NOT PROTOBUF_FOUND)
-
-PROMPT_PROTOBUF_LIB()


remove unnecessary include

remove unnecessary include

--- cmake/find_ros1_package.cmake
+++ cmake/find_ros1_package.cmake
@@ -11,8 +11,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-include(CMakeParseArguments)

 macro(find_ros1_package name)
   cmake_parse_arguments(_ARG "REQUIRED" "" "" ${ARGN})


[swig] prepend utf-8 coding indicator to generated .py files

Fixes #149.

--- cmake/swig_python_tools.cmake
+++ cmake/swig_python_tools.cmake
@@ -121,7 +121,10 @@
   IF(MSVC AND ${COMPONENT} MATCHES "kernel")
     set_source_files_properties(${${_name}_generated_file_fullname} PROPERTIES COMPILE_FLAGS "/bigobj")
   ENDIF()
-
+
+  # Add a post-build step that prepends utf-8 coding indicator to .py files
+  add_custom_command(TARGET ${SWIG_MODULE_${_name}_REAL_NAME}
+    POST_BUILD COMMAND sh -c "(echo '# -*- coding: utf-8 -*-'; cat ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.py) > ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.tmp; mv ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.tmp ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.py" VERBATIM)

   # Check dependencies and then link ...
   add_dependencies(${SWIG_MODULE_${_name}_REAL_NAME} ${COMPONENT})


[cmake] remove clang options

[cmake] remove clang options

--- cmake/swig_python_tools.cmake
+++ cmake/swig_python_tools.cmake
@@ -92,7 +92,7 @@

   # compile flags
   foreach(_dir ${${COMPONENT}_SWIG_INCLUDE_DIRECTORIES})
-    set(${COMPONENT}_SWIG_DEFS "-I${_dir};${${COMPONENT}_SWIG_DEFS};-Wno-sometimes-uninitialized")
+    set(${COMPONENT}_SWIG_DEFS "-I${_dir};${${COMPONENT}_SWIG_DEFS}")
   endforeach()

   IF(WITH_CXX OR NOT ${COMPONENT} MATCHES "numerics")


default MSVCRT version is for XP in toolchain file

--- cmake/toolchain-mingw32.cmake
+++ cmake/toolchain-mingw32.cmake
@@ -1,7 +1,7 @@
 # the name of the target operating system
 set(CMAKE_SYSTEM_NAME Windows)

-add_definitions(-D__MSVCRT_VERSION__=0x0601)
+add_definitions(-D__MSVCRT_VERSION__=0x0710)

 # which compilers to use for C and C++
 set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)


Revert "Revert workaround for CTK external library dirs"

This reverts commit 0d653d2c0ba97ca142be15287ffe64df6d5beea4.

--- CMake/PackageDepends/MITK_CTK_Config.cmake
+++ CMake/PackageDepends/MITK_CTK_Config.cmake
@@ -4,4 +4,13 @@
 list(APPEND ALL_LIBRARIES ${CTK_LIBRARIES})
 link_directories(${CTK_LIBRARY_DIRS} ${CTK_EXTERNAL_LIBRARY_DIRS})

-
+# Temporary workaround for CTK bug of not exposing external project library dirs.
+# Should be removed as soon as this is fixed in CTK. (espakm)
+if(EXISTS "${CTK_DIR}/qRestAPI-build/qRestAPIConfig.cmake")
+  include(${CTK_DIR}/qRestAPI-build/qRestAPIConfig.cmake)
+  link_directories(${qRestAPI_LIBRARY_DIRS})
+endif()
+if(EXISTS "${CTK_DIR}/QuaZip-build/QuaZipConfig.cmake")
+  include(${CTK_DIR}/QuaZip-build/QuaZipConfig.cmake)
+  link_directories(${QUAZIP_LIBRARY_DIRS})
+endif()


STYLE: External_VesselView: do not explicitly pass CMAKE_BUILD_TYPE

The value is already propagated by in ${proj}_EP_ARG

--- CMake/Superbuild/External_VesselView.cmake
+++ CMake/Superbuild/External_VesselView.cmake
@@ -48,7 +48,6 @@
     CMAKE_CACHE_ARGS
       -D${proj}_SUPERBUILD:BOOL=OFF
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-      -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
       -DDOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}
       -D${proj}_INSTALL_BIN_DIR:STRING=${Slicer_INSTALL_BIN_DIR}
       -D${proj}_INSTALL_LIB_DIR:STRING=${Slicer_INSTALL_LIB_DIR}


New version: 0.3.10

New version: 0.3.10

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "9")
+SET(HAWKEY_PATCH "10")


BUG: Remove -Wno-unused-local-typedefs flag.

This flag was used to remove false positive warnings from GCC due to
ConceptChecking on the ITK tests.  However, it did not mask the false positive
warnings for projects that link against ITK.

Commit

  8329f68

fixed the warnings without requiring a flag.  Remove the compiler flag.

Change-Id: Ia1ec42564b2437921e5e0c8efe628aa3ae91f4d9
Suggested-by: Jean-Christophe Fillion-Robin <859d3fd8ca46de62a08fca56c64958e301f5352c@kitware.com>

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -110,7 +110,6 @@
     -Wwrite-strings
     -funit-at-a-time
     -Wno-strict-overflow
-    -Wno-unused-local-typedefs
   )

   # Check this list on C++ compiler only


CMake: Xcode 14.1 does not like empty codesign identities

--- cmake/compileoptions.cmake
+++ cmake/compileoptions.cmake
@@ -45,7 +45,8 @@
     # Causes build to fail if Webbrowser module is enabled due to the added CEF framework
     # This fix is also performed in the CEF example projects:
     # https://bitbucket.org/chromiumembedded/cef/src/2de07250dc6c25ccb5484f25002450afb164782b/cmake/cef_variables.cmake.in#lines-339
-    set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
+    # set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
+    # This fix does not work any more in XCode 14.1 emtpy identities are invalid.
 endif()

 function(ivw_define_standard_properties)


fix the gtest.cmake on windows

fix the gtest.cmake on windows

--- cmake/external/gtest.cmake
+++ cmake/external/gtest.cmake
@@ -51,7 +51,11 @@
         CMAKE_ARGS      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                         -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                         -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+                        -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
+                        -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
                         -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
+                        -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
+                        -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}
                         -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR}
                         -DCMAKE_POSITION_INDEPENDENT_CODE=ON
                         -DBUILD_GMOCK=ON


Do not accept invalid INSTALL_LAYOUT parameter

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -59,13 +59,16 @@
 # - INSTALL_SUPPORTFILESDIR (various extra support files)
 #
 # - INSTALL_MYSQLDATADIR    (data directory)
+#
+# When changing this page,  _please_ do not forget to update public Wiki
+# http://forge.mysql.com/wiki/CMake#Fine-tuning_installation_paths

 IF(NOT INSTALL_LAYOUT)
   SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
 ENDIF()

 SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
-CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
+CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4")

 IF(UNIX)
   IF(INSTALL_LAYOUT MATCHES "RPM")
@@ -83,6 +86,13 @@
     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
+  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR5")
+  LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
+  IF(ind EQUAL -1)
+    MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
+    " Choose between ${VALID_INSTALL_LAYOUTS}" )
+  ENDIF()
+
   SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
     CACHE PATH "config directory (for my.cnf)")
   MARK_AS_ADVANCED(SYSCONFDIR)


CMake logic fix; turn OFF variable created by the option command in properly
cached way.  Also improve messages and deal with white space issues.

svn path=/trunk/; revision=8016

--- cmake/modules/python.cmake
+++ cmake/modules/python.cmake
@@ -60,27 +60,27 @@
   endif(NOT PYTHON_LIBRARIES OR NOT PYTHON_INCLUDE_PATH)
 endif(ENABLE_python)

-option(HAVE_NUMPY "Use numpy rather than depreciated Numeric" ON)
+option(HAVE_NUMPY "Use numpy rather than deprecated Numeric" ON)

 if(ENABLE_python AND NOT NUMERIC_INCLUDE_PATH)
-  if (HAVE_NUMPY)
-  # First check for new version of numpy (replaces Numeric)
-  execute_process(
-  COMMAND
-  ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
-  OUTPUT_VARIABLE NUMPY_INCLUDE_PATH
-  RESULT_VARIABLE NUMPY_ERR
-  OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-  if (NUMPY_ERR)
-    set(HAVE_NUMPY OFF)
-  endif (NUMPY_ERR)
-  endif (HAVE_NUMPY)
-  if (HAVE_NUMPY)
+  if(HAVE_NUMPY)
+    # First check for new version of numpy (replaces Numeric)
+    execute_process(
+    COMMAND
+    ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
+    OUTPUT_VARIABLE NUMPY_INCLUDE_PATH
+    RESULT_VARIABLE NUMPY_ERR
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    if(NUMPY_ERR)
+      set(HAVE_NUMPY OFF CACHE BOOL "Use numpy rather than deprecated Numeric" FORCE)
+    endif(NUMPY_ERR)
+  endif(HAVE_NUMPY)
+  if(HAVE_NUMPY)
     # Set include path to find numpy headers
     set(NUMERIC_INCLUDE_PATH ${NUMPY_INCLUDE_PATH}/numpy CACHE PATH "Path to python Numeric/numpy include files")
     set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "")
-  else (HAVE_NUMPY)
+  else(HAVE_NUMPY)
     # Check for Python Numeric header in same include path or Numeric
     # subdirectory of that path to avoid version mismatch.
     find_path(
@@ -91,15 +91,20 @@
     if (NUMERIC_INCLUDE_PATH)
       set(PYTHON_NUMERIC_NAME Numeric CACHE INTERNAL "")
     endif (NUMERIC_INCLUDE_PATH)
-  endif (HAVE_NUMPY)
+  endif(HAVE_NUMPY)
   if(NUMERIC_INCLUDE_PATH)
     set(
     PYTHON_INCLUDE_PATH
     ${PYTHON_INCLUDE_PATH} ${NUMERIC_INCLUDE_PATH}
     CACHE INTERNAL "")
   else(NUMERIC_INCLUDE_PATH)
-    message(STATUS "WARNING: "
-    "Numeric header not found. Disabling python bindings")
+    if(HAVE_NUMPY)
+      message(STATUS "WARNING: "
+      "NumPy header not found. Disabling python bindings")
+    else(HAVE_NUMPY)
+      message(STATUS "WARNING: "
+      "Numeric header not found. Disabling python bindings")
+    endif(HAVE_NUMPY)
     set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE)
   endif(NUMERIC_INCLUDE_PATH)
 endif(ENABLE_python AND NOT NUMERIC_INCLUDE_PATH)


bugfix for release creation

bugfix for release creation

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -175,7 +175,7 @@
 	#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  ${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} "\n ${UNINSTALL_LIST}\n RMDir \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\tutorials\\\"")
 	#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  ${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} "\n ${UNINSTALL_LIST}\n RMDir \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\"\n")
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config Release --target PACKAGE)
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target PACKAGE)
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES ${CPACK_PACKAGE_FILE_NAME}.exe)
     ENDIF()
   ELSE()
@@ -183,7 +183,7 @@
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.windows")
     SET(CPACK_MONOLITHIC_INSTALL 1)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config Release --target PACKAGE)
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target PACKAGE)
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES ${CPACK_PACKAGE_FILE_NAME}.zip)
     ENDIF()
   ENDIF()
@@ -204,7 +204,7 @@
     SET(CPACK_PACKAGE_VENDOR "intel") # creates short name com.intel.embree2.xxx in pkgutil
     SET(CPACK_OSX_PACKAGE_VERSION 10.7)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config Release --target PACKAGE)
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target PACKAGE)
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES ${CPACK_PACKAGE_FILE_NAME}.dmg)
     ENDIF()
   ELSE()
@@ -212,7 +212,7 @@
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
     SET(CPACK_MONOLITHIC_INSTALL 1)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR} COMMAND COMMAND ${CMAKE_COMMAND} --build . --config Release --target PACKAGE)
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target PACKAGE)
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES ${CPACK_PACKAGE_FILE_NAME}.tgz)
     ENDIF()
   ENDIF()
@@ -237,7 +237,7 @@
     SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
     SET(CPACK_RPM_lib_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh ${EMBREE_ZIP_MODE} ${EMBREE_VERSION})
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh ${EMBREE_ZIP_MODE} ${EMBREE_VERSION})
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES embree-${EMBREE_VERSION}.x86_64.rpm.tar.gz)
     ENDIF()
   ELSE()
@@ -246,7 +246,7 @@
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
     SET(CPACK_MONOLITHIC_INSTALL 1)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh ${EMBREE_ZIP_MODE} ${EMBREE_VERSION})
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh ${EMBREE_ZIP_MODE} ${EMBREE_VERSION})
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES embree-${EMBREE_VERSION}.x86_64.linux.tar.gz)
     ENDIF()
   ENDIF()


Removes cyclic dependency

Removes cyclic dependency

svn path=/branches/work/polkit-qt-1/; revision=1034759

--- polkit-qt-agent-1.pc.cmake
+++ polkit-qt-agent-1.pc.cmake
@@ -6,6 +6,6 @@
 Name: Polkit-qt-1
 Description: Convenience library for using PolicyKit Agent with a Qt-styled API
 Version: @POLKIT_QT_VERSION_STRING@
-Requires: QtCore QtGui polkit-qt-agent-1
+Requires: QtCore QtGui
 Libs: -L${libdir} -lpolkit-qt-agent-1
 Cflags: -I${includedir}


Don't link libm with -Wl,--as-needed on FreeBSD

Patch by jbeich (Jan Beich)

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

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@374037 91177308-0d34-0410-b5e6-96231b3b80d8

--- runtime/cmake/LibompHandleFlags.cmake
+++ runtime/cmake/LibompHandleFlags.cmake
@@ -126,11 +126,11 @@
   if(${IA32})
     libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY)
   endif()
-  if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+  if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD")
     libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
     libomp_append(libflags_local "-lm")
     libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
-  elseif(${CMAKE_SYSTEM_NAME} MATCHES "(Free|Net)BSD")
+  elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
     libomp_append(libflags_local -lm)
   endif()
   set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})


Only require physfs 2.0

Only require physfs 2.0

my patched 'prerelease' 2.1 is needed for working .iso support, but if
you extract the files on the .iso and put in the data/ directory it
should still work

--- framework/cmake/framework.cmake
+++ framework/cmake/framework.cmake
@@ -62,7 +62,7 @@
 		#FIXME: Add Windows support for cmake? (BACKTRACE_WINDOWS?)
 endif()

-pkg_check_modules(PC_PHYSFS REQUIRED physfs>=2.1.0)
+pkg_check_modules(PC_PHYSFS REQUIRED physfs>=2.0.0)

 find_path(PHYSFS_INCLUDE_DIR physfs.h HINTS ${PC_PHYSFS_INCLUDEDIR})
 list(APPEND FRAMEWORK_INCLUDE_DIRS ${PHYSFS_INCLUDE_DIR})


Fix cmake file for openvr

Fix cmake file for openvr

--- Tools/CMake/modules/module_openvr.cmake
+++ Tools/CMake/modules/module_openvr.cmake
@@ -4,11 +4,11 @@
 option(TORQUE_OPENVR "Enable openvr module" OFF)
 mark_as_advanced(TORQUE_OPENVR)
 if(TORQUE_OPENVR)
-	if(TORQUE_OCULUSVR_SDK_PATH STREQUAL "")
+	if(TORQUE_OPENVR_SDK_PATH STREQUAL "")
 		set(TORQUE_OPENVR_SDK_PATH "" CACHE PATH "openvr library path" FORCE)
 	endif()
 else() # hide variable
-    set(TORQUE_OPENVR_SDK_PATH "" CACHE INTERNAL "" FORCE)
+	set(TORQUE_OPENVR_SDK_PATH "" CACHE INTERNAL "" FORCE)
 endif()

 if(TORQUE_OPENVR)


SCIPY detection

SCIPY detection

--- adm_local_without_kernel/cmake_files/FindSalomePython.cmake
+++ adm_local_without_kernel/cmake_files/FindSalomePython.cmake
@@ -167,7 +167,14 @@
   ELSE(NUMPY_FOUND)
     MESSAGE(STATUS "NumPy not found.")
   ENDIF(NUMPY_FOUND)
-
+  # SciPy detection
+  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import scipy ; import sys ; sys.stdout.write(scipy.version.version)" OUTPUT_VARIABLE SCIPY_VERSION ERROR_QUIET )
+  IF(SCIPY_VERSION)
+    SET(SCIPY_FOUND TRUE)
+  ENDIF(SCIPY_VERSION)
+  IF(SCIPY_FOUND)
+    MESSAGE(STATUS "Scipy found : Version ${SCIPY_VERSION}")
+  ENDIF(SCIPY_FOUND)
   ## None here
 ELSE()
   MESSAGE(STATUS "Python was only partially (or not at all) found .")


TRAVIS: missing sumit after ctest test

TRAVIS: missing sumit after ctest test

--- Utilities/Maintenance/TravisBuild.cmake
+++ Utilities/Maintenance/TravisBuild.cmake
@@ -85,9 +85,13 @@
   do_submit()
 endif ()

+#ctest_test with extra verbose is annoying in travis build log.
+#Afer all these are unit-test without much revelent extra verbose output
 execute_process(COMMAND  ${CTEST_COMMAND} "-R" "Tu" "."
   WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
   )
+
+do_submit()

 macro(do_submit)
   ctest_submit()


osx superbuild fix

osx superbuild fix

--- cmake_modules/ExternalProject_TCLTK.cmake
+++ cmake_modules/ExternalProject_TCLTK.cmake
@@ -5,7 +5,7 @@
     UPDATE_COMMAND "" # Disable update
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=${INSTALL_DIR}/../../ INSTALL_PATH=/Frameworks #NATIVE_TCLSH=${HOME}/usr/local/bin/tclsh
+    BUILD_COMMAND make -C macosx install INSTALL_ROOT=${CMAKE_INSTALL_PREFIX}/../ INSTALL_PATH=/Frameworks #NATIVE_TCLSH=${HOME}/usr/local/bin/tclsh
     INSTALL_COMMAND ""
     LOG_DOWNLOAD 1
     LOG_BUILD 1
@@ -18,7 +18,7 @@
     UPDATE_COMMAND "" # Disable update
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=${INSTALL_DIR}/../../ INSTALL_PATH=/Frameworks
+    BUILD_COMMAND make -C macosx install INSTALL_ROOT=${CMAKE_INSTALL_PREFIX}/../ INSTALL_PATH=/Frameworks
     INSTALL_COMMAND ""#make -C macosx install
     LOG_DOWNLOAD 1
     LOG_BUILD 1
@@ -31,7 +31,7 @@
     PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
     UPDATE_COMMAND "" # Disable update
     BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ./configure --with-tcl=${INSTALL_DIR}/../../Frameworks/Tcl.framework --with-tk=${INSTALL_DIR}/../../Frameworks/Tk.framework --prefix=${INSTALL_DIR}
+    CONFIGURE_COMMAND ./configure --with-tcl=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework --with-tk=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
     BUILD_COMMAND make
     INSTALL_COMMAND make install
     LOG_DOWNLOAD 1


Add WIN32 flag on Msys2

Add WIN32 flag on Msys2

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -56,3 +56,7 @@
         add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
     endif (MSVC)
 endif (WIN32)
+
+if (MSYS)
+   add_definitions(-DWIN32)
+endif (MSYS)


using abi includes

using abi includes

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -70,7 +70,7 @@
               COMMAND ${CMAKE_AR} rcs  ${ETHRPC_LIBRARY_PATH} ${LIB_OBJ_DIR}/*.o
         )
     endif ()
-    file(COPY ${CMAKE_CURRENT_BINARY_DIR}/abi/include/abi DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/ethrpc)
+#    file(COPY ${CMAKE_CURRENT_BINARY_DIR}/abi/include/abi DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/ethrpc)
 endif()

 if(NOT SKIP_LIBRARY_INSTALL)
@@ -80,7 +80,7 @@

 set(ETHRPC_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include CACHE STRING "" FORCE)
-set(ETHRPC_INCLUDE_DIRS ${ETHRPC_INCLUDE_DIR} CACHE STRING "" FORCE)
+set(ETHRPC_INCLUDE_DIRS ${ETHRPC_INCLUDE_DIR} ${ABI_INCLUDE_DIRS} CACHE STRING "" FORCE)
 set(ETHRPC_LIBRARY ethrpc CACHE STRING "" FORCE)
 set(ETHRPC_LIBRARIES ${ETHRPC_LIBRARY} CACHE STRING "" FORCE)


Compilation works also with MSMPI

Compilation works also with MSMPI

--- cmake/mpi.cmake
+++ cmake/mpi.cmake
@@ -22,20 +22,29 @@
     IF (WIN32) # FindMPI does not find Intel MPI on Windows, we need to help here
       FIND_PACKAGE(MPI)

-      IF (NOT MPI_CXX_COMPILER)
+      # need to strip quotes, otherwise CMake treats it as relative path
+      STRING(REGEX REPLACE "^\"|\"$" "" MPI_CXX_INCLUDE_PATH ${MPI_CXX_INCLUDE_PATH})
+
+      IF (NOT MPI_CXX_FOUND)
+        # try again, hinting the compiler wrappers
         SET(MPI_CXX_COMPILER mpicxx.bat)
         SET(MPI_C_COMPILER mpicc.bat)
         FIND_PACKAGE(MPI)
+
+        IF (NOT MPI_CXX_LIBRARIES)
+          SET(MPI_LIB_PATH ${MPI_CXX_INCLUDE_PATH}\\..\\lib)
+
+          SET(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
+          FIND_LIBRARY(MPI_LIB NAMES impi HINTS ${MPI_LIB_PATH})
+          SET(MPI_C_LIB ${MPI_LIB})
+          SET(MPI_C_LIBRARIES ${MPI_LIB} CACHE STRING "MPI C libraries to link against" FORCE)
+
+          SET(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
+          FIND_LIBRARY(MPI_LIB NAMES impicxx HINTS ${MPI_LIB_PATH})
+          SET(MPI_CXX_LIBRARIES ${MPI_C_LIB} ${MPI_LIB} CACHE STRING "MPI CXX libraries to link against" FORCE)
+          SET(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI lib detection" FORCE)
+        ENDIF()
       ENDIF()
-
-      # need to strip quotes, otherwise CMake treats it as relative path
-      STRING(REGEX REPLACE "^\"|\"$" "" MPI_CXX_INCLUDE_PATH ${MPI_CXX_INCLUDE_PATH})
-
-      IF (NOT MPI_CXX_LIBRARIES) # use hardcoded libs with absolute paths
-        SET(MPI_LIB_PATH ${MPI_CXX_INCLUDE_PATH}\\..\\lib)
-        SET(MPI_CXX_LIBRARIES ${MPI_LIB_PATH}\\impi.lib ${MPI_LIB_PATH}\\impicxx.lib)
-      ENDIF()
-
     ELSE()
       FIND_PACKAGE(MPI REQUIRED)
     ENDIF()


update to works for rtmpas 4.3.0

update to works for rtmpas 4.3.0

--- src/FindRTMaps.cmake
+++ src/FindRTMaps.cmake
@@ -8,75 +8,64 @@

 SET(RTMAPS_DIR $ENV{RTMAPS_SDKDIR})
 message(STATUS "RTMAPS_DIR = ${RTMAPS_DIR}")
+if(WIN32 AND MSVC)
+	if(MSVC80)
+		set(IDE_VERSION "vc.net2005")
+	elseif(MSVC90)
+		set(IDE_VERSION "vc.net2008")
+	elseif(MSVC10)
+		set(IDE_VERSION "vc.net2010")
+	elseif(MSVC11)
+		set(IDE_VERSION "vc.net2012")
+	elseif(MSVC12)
+		set(IDE_VERSION "vc.net2013")
+	elseif(MSVC14)
+		set(IDE_VERSION "vc.net2015")
+	else()
+		message( FATAL_ERROR " msvc was not found !")
+	endif (MSVC80)
+endif()
+message( STATUS "IDE_VERSION = ${IDE_VERSION}")
+if(ARCH_TYPE STREQUAL "x64")
+	set(IDE_VERSION "${IDE_VERSION}_x64")
+endif()
+message( STATUS "IDE_VERSION = ${IDE_VERSION}")

-find_path( RTMAPS_INCLUDE maps.hpp PATHS ${RTMAPS_DIR}/include )
+find_path( RTMAPS_INCLUDE maps.hpp PATHS ${RTMAPS_DIR}/include ${RTMAPS_DIR}/sdk/${IDE_VERSION}/include )
 if( ${RTMAPS_INCLUDE} STREQUAL "RTMAPS_INCLUDE-NOTFOUND" )
-	message( FATAL_ERROR "FATAL_ERROR : RTMaps is not found ! ")
+	message(STATUS "FATAL_ERROR : RTMaps is not found ! ")
+	set(RTMAPS_FOUND "FALSE")
 else ()
+	set(RTMAPS_FOUND "TRUE")
 	message(STATUS "Found RTMaps in ${RTMAPS_INCLUDE}")
 endif()

-if(WIN32)
-	if(MSVC)
-		if(MSVC80)
-			if(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2005)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2005)
-			else(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2005_x64)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2005_x64)
-			endif(ARCH_TYPE STREQUAL "x86")
-		elseif(MSVC90)
-			if(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2008)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2008)
-			else(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2008_x64)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2008_x64)
-			endif(ARCH_TYPE STREQUAL "x86")
-		elseif(MSVC10)
-			if(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2010)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2010)
-			else(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2010_x64)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2010_x64)
-			endif(ARCH_TYPE STREQUAL "x86")
-		elseif(MSVC11)
-			if(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2012)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2012)
-			else(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2012_x64)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2012_x64)
-			endif(ARCH_TYPE STREQUAL "x86")
-		elseif(MSVC12)
-			if(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2013)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2013)
-			else(ARCH_TYPE STREQUAL "x86")
-				find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS ${RTMAPS_DIR}/lib/vc.net2013_x64)
-				SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib/vc.net2013_x64)
-			endif(ARCH_TYPE STREQUAL "x86")
-		else(MSVC80)
-			message( FATAL_ERROR " msvc was not found !")
-		endif (MSVC80)
-	else(MSVC)
-		message( FATAL_ERROR "not link lib RTMaps without msvc ! ")
-	endif(MSVC)
-else(WIN32)
-	SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib)
-endif(WIN32)
-
+if(RTMAPS_FOUND STREQUAL "TRUE" )
+	if(WIN32)
+		if(MSVC)
+			find_library (RTMAPS_LIBRARY rtmaps_pck.lib PATHS
+			${RTMAPS_DIR}/lib/${IDE_VERSION}
+			${RTMAPS_DIR}/sdk/${IDE_VERSION}/lib )
+			find_path (RTMAPS_LIB_DIR rtmaps_pck.lib PATHS
+			${RTMAPS_DIR}/lib/${IDE_VERSION}
+			${RTMAPS_DIR}/sdk/${IDE_VERSION}/lib )
+			message( STATUS "===> ${RTMAPS_DIR}/sdk/${IDE_VERSION}/lib")
+		else(MSVC)
+			message( FATAL_ERROR "not link lib RTMaps without msvc ! ")
+		endif(MSVC)
+	else(WIN32)
+		SET(RTMAPS_LIB_DIR ${RTMAPS_DIR}/lib)
+	endif(WIN32)
+endif( )

 message( STATUS "RTMAPS_INCLUDE = ${RTMAPS_INCLUDE}")
 message( STATUS "RTMAPS_LIBRARY = ${RTMAPS_LIB_DIR}")

 if(NOT RTMAPS_INCLUDE MATCHES NOTFOUND)
   if(NOT RTMAPS_LIBRARY MATCHES NOTFOUND)
-    set( RTMAPS_FOUND TRUE )
-    include_directories( ${RTMAPS_INCLUDE} )
-    link_directories( ${RTMAPS_LIB_DIR} )
+	set( RTMAPS_FOUND TRUE )
+	include_directories( ${RTMAPS_INCLUDE} )
+	link_directories( ${RTMAPS_LIB_DIR} )
   endif( )
 endif( )


Remove -Wl,--as-needed option, broken on Fedora

--- configure.cmake
+++ configure.cmake
@@ -160,8 +160,6 @@
     ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}
   )
   ENDFOREACH()
-  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed")
-  SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
   SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
 ENDIF()


Fix typo in build logging

Fix typo in build logging

--- CMake/CMakeLibs.cmake
+++ CMake/CMakeLibs.cmake
@@ -39,7 +39,7 @@
 macro(ADD_OSQUERY_LINK_INTERNAL LINK LINK_PATHS LINK_SET)
   if(NOT "${LINK}" MATCHES "(^-.*)")
     find_library("${LINK}_library" NAMES "lib${LINK}.a" "${LINK}" ${LINK_PATHS})
-    message("-- Found dependeny library ${${LINK}_library}")
+    message("-- Found library dependency ${${LINK}_library}")
     if("${${LINK}_library}" STREQUAL "${${LINK}_library}-NOTFOUND")
       string(ASCII 27 Esc)
       message(WARNING "${Esc}[31mDependent library '${LINK}' not found${Esc}[m")
@@ -140,7 +140,7 @@

 macro(GENERATE_TABLE TABLE_FILE NAME BASE_PATH OUTPUT)
   set(TABLE_FILE_GEN ${TABLE_FILE})
-  string(REGEX REPLACE
+  string(REGEX REPLACE
     ".*/specs/.*/(.*)\\.table"
     "${CMAKE_BINARY_DIR}/generated/tables_${NAME}/\\1.cpp"
     TABLE_FILE_GEN


ENH: Adding visualization group to the list of modules groups

--- CMake/OTBGroups.cmake
+++ CMake/OTBGroups.cmake
@@ -16,6 +16,7 @@
   Remote
   Segmentation
   ThirdParty
+  Visualization
   Wrappers
   )

@@ -34,7 +35,9 @@
 set(Registration_documentation "This group contains algorithms related to registration of images")
 set(Segmentation_documentation "This group contains algorithms related to image segmentaiton")
 set(ThirdParty_documentation "This group contains all Orfeo ToolBox third parties")
+set(Visualization_documentation "This group contains Ice (visualization framework) and IceViewer (visualization tool)")
 set(Wrappers_documentation "This group contains the application framework and the wrappers to use it")
+

 set(Remote_documentation "This group of modules is for OTB based code that have
 additional third-party dependencies not bundled with the toolkit,


Fix CMake/RealmCore.cmake

Fix CMake/RealmCore.cmake

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -223,8 +223,8 @@
         BUILD_IN_SOURCE 1
         UPDATE_DISCONNECTED 1
         INSTALL_COMMAND ""
-        CONFIGURE_COMMAND cmake -B build.debug -DOpenSSL_DIR="${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL" -D CMAKE_BUILD_TYPE=Debug ${CORE_SANITIZER_FLAGS} -G Ninja
-                       && cmake -B build.release -DOpenSSL_DIR="${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL" -D CMAKE_BUILD_TYPE=RelWithDebInfo ${CORE_SANITIZER_FLAGS} -G Ninja
+        CONFIGURE_COMMAND cmake -B build.debug -DOpenSSL_DIR=${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL -D CMAKE_BUILD_TYPE=Debug ${CORE_SANITIZER_FLAGS} -G Ninja
+                       && cmake -B build.release -DOpenSSL_DIR=${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL -D CMAKE_BUILD_TYPE=RelWithDebInfo ${CORE_SANITIZER_FLAGS} -G Ninja

         BUILD_COMMAND cmake --build build.debug --target Storage --target QueryParser
                    && cmake --build build.release --target Storage --target QueryParser


Build core as a static library when building it as a dependency.

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -68,8 +68,8 @@
 endfunction()

 macro(define_built_realm_core_target core_directory)
-    set(core_library_debug ${core_directory}/src/realm/librealm-dbg${CMAKE_SHARED_LIBRARY_SUFFIX})
-    set(core_library_release ${core_directory}/src/realm/librealm${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(core_library_debug ${core_directory}/src/realm/librealm-dbg.a)
+    set(core_library_release ${core_directory}/src/realm/librealm.a)
     set(core_libraries ${core_library_debug} ${core_library_release})

     ExternalProject_Add_Step(realm-core ensure-libraries
@@ -78,7 +78,7 @@
         DEPENDEES build
         )

-    add_library(realm SHARED IMPORTED)
+    add_library(realm STATIC IMPORTED)
     add_dependencies(realm realm-core)

     set_property(TARGET realm PROPERTY IMPORTED_LOCATION_DEBUG ${core_library_debug})
@@ -97,7 +97,7 @@
         PREFIX ${core_prefix_directory}
         BUILD_IN_SOURCE 1
         CONFIGURE_COMMAND ""
-        BUILD_COMMAND export ${MAKEFLAGS} && ${MAKE_EQUAL_MAKE} sh build.sh build
+        BUILD_COMMAND export ${MAKEFLAGS} && make -C src/realm librealm.a librealm-dbg.a
         INSTALL_COMMAND ""
         ${USES_TERMINAL_BUILD}
         )
@@ -115,7 +115,7 @@
         BUILD_IN_SOURCE 1
         BUILD_ALWAYS 1
         CONFIGURE_COMMAND ""
-        BUILD_COMMAND export ${MAKEFLAGS} && ${MAKE_EQUAL_MAKE} sh build.sh build
+        BUILD_COMMAND export ${MAKEFLAGS} && make -C src/realm librealm.a librealm-dbg.a
         INSTALL_COMMAND ""
         ${USES_TERMINAL_BUILD}
         )


Revert "CMake: include CheckIncludeFiles for calls to check_include_files."

This reverts commit be36586d74367f562937da041ce6a5615d647f3b.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -1,5 +1,4 @@
 include(CheckIncludeFile)
-include(CheckIncludeFiles)
 include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckLibraryExists)


Update build script

Update build script

--- build/cmake/BuildSettings.cmake
+++ build/cmake/BuildSettings.cmake
@@ -74,13 +74,15 @@
   set(CMAKE_C_FLAGS   "-Wall -Werror -Wextra -Wpedantic -std=c11")
   set(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra -Wpedantic -std=c++14")

-  set(CMAKE_C_FLAGS_DEBUG "-g -D_DEBUG")
+  set(CMAKE_C_FLAGS_DEBUG "-g -D_DEBUG -fprofile-arcs -ftest-coverage")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -D_DEBUG -flto")
   set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -flto")

-  set(CMAKE_CXX_FLAGS_DEBUG "-g -D_DEBUG")
+  set(CMAKE_CXX_FLAGS_DEBUG "-g -D_DEBUG -fprofile-arcs -ftest-coverage")
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -D_DEBUG -flto")
   set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -flto")
+
+  set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-lgcov")

 elseif(APPLE)


Remove unneccessary message

Remove unneccessary message

--- cmake-modules/FindOrcania.cmake
+++ cmake-modules/FindOrcania.cmake
@@ -48,9 +48,7 @@
 elseif (ORCANIA_INCLUDE_DIR AND EXISTS "${ORCANIA_INCLUDE_DIR}/orcania.h")
     set(regex_orcania_version "^#define[ \t]+ORCANIA_VERSION[ \t]+([^\"]+).*")
     file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania.h" orcania_version REGEX "${regex_orcania_version}")
-		MESSAGE("found " ${orcania_version})
     string(REGEX REPLACE "${regex_orcania_version}" "\\1" ORCANIA_VERSION_STRING "${orcania_version}")
-		MESSAGE("regex found " ${ORCANIA_VERSION_STRING})
     unset(regex_orcania_version)
     unset(orcania_version)
 endif ()


Build: Simplify code for Haskell find module

--- cmake/Modules/FindHaskell.cmake
+++ cmake/Modules/FindHaskell.cmake
@@ -48,27 +48,17 @@

 if (NOT GHC_EXECUTABLE)
 	set (HASKELL_NOTFOUND_INFO "GHC not found")
+elseif (NOT CABAL_EXECUTABLE)
+	set (HASKELL_NOTFOUND_INFO "cabal not found")
+elseif (NOT ALEX_EXECUTABLE)
+	set (HASKELL_NOTFOUND_INFO "alex not found")
+elseif (NOT HAPPY_EXECUTABLE)
+	set (HASKELL_NOTFOUND_INFO "happy not found")
+elseif (NOT C2HS_EXECUTABLE)
+	set (HASKELL_NOTFOUND_INFO "c2hs not found")
+elseif (NOT GHC-PKG_EXECUTABLE)
+	set (HASKELL_NOTFOUND_INFO "ghc-pkg not found")
 endif (NOT GHC_EXECUTABLE)
-
-if (NOT CABAL_EXECUTABLE)
-	set (HASKELL_NOTFOUND_INFO "cabal not found")
-endif (NOT CABAL_EXECUTABLE)
-
-if (NOT ALEX_EXECUTABLE)
-	set (HASKELL_NOTFOUND_INFO "alex not found")
-endif (NOT ALEX_EXECUTABLE)
-
-if (NOT HAPPY_EXECUTABLE)
-	set (HASKELL_NOTFOUND_INFO "happy not found")
-endif (NOT HAPPY_EXECUTABLE)
-
-if (NOT C2HS_EXECUTABLE)
-	set (HASKELL_NOTFOUND_INFO "c2hs not found")
-endif (NOT C2HS_EXECUTABLE)
-
-if (NOT GHC-PKG_EXECUTABLE)
-	set (HASKELL_NOTFOUND_INFO "ghc-pkg not found")
-endif (NOT GHC-PKG_EXECUTABLE)

 if (HASKELL_NOTFOUND_INFO)
 	set (HASKELL_NOTFOUND_INFO "${HASKELL_NOTFOUND_INFO}, please refer to the readme in src/bindings/haskell/README.md")


Remove leftovers from cmake-init

Remove leftovers from cmake-init

--- cmake/RuntimeDependencies.cmake
+++ cmake/RuntimeDependencies.cmake
@@ -17,26 +17,3 @@
     # install(FILES ... COMPONENT runtime)

 endif()
-
-
-
-# Paths to executables
-set(apps
-    "\${CMAKE_INSTALL_PREFIX}/${INSTALL_BIN}/fibgui${CMAKE_EXECUTABLE_SUFFIX}"
-)
-
-# run Bundle utilities
-install(CODE "
-    include(\"${CMAKE_ROOT}/Modules/GetPrerequisites.cmake\")
-
-    foreach(app ${apps})
-        message(\"Dependencies for \${app}\")
-
-        get_prerequisites(\${app} prereqs 1 1 \"\" \"\")
-        foreach(lib \${prereqs})
-            message(\"- \${lib}\")
-        endforeach(lib)
-    endforeach(app)
-    "
-    COMPONENT runtime
-)


Removes quotes for cmake execute command

--- cmake/linux-distro-helper.cmake
+++ cmake/linux-distro-helper.cmake
@@ -20,7 +20,7 @@
         PATHS /etc
         NO_DEFAULT_PATH)
       if(OS_RELEASE)
-        execute_process(COMMAND "awk -F= '/^NAME/{print $2}' /etc/os-release"
+        execute_process(COMMAND awk -F= "/^NAME/{print $2}" /etc/os-release
           OUTPUT_VARIABLE GEARSHIFFT_LINUX_DISTRO
           OUTPUT_STRIP_TRAILING_WHITESPACE
           )


search for Pythia8.

search for Pythia8.

git-svn-id: 9d02132d8e1217b86764d694e1605987040d84e5@44236 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/FindPythia8.cmake
+++ cmake/modules/FindPythia8.cmake
@@ -17,7 +17,7 @@
   DOC "Specify the directory containing Pythia.h."
 )

-find_library(PYTHIA8_LIBRARY NAMES libPythia8 PATHS
+find_library(PYTHIA8_LIBRARY NAMES Pythia8 libPythia8 PATHS
   $ENV{PYTHIA8_DIR}/lib
   /opt/pythia8/lib
   /usr/local/lib


Check in updated CMake dependencies after Evan's latest round of
refactorings. Several places that shouldn't have dependend on Target no
longer do. Also almost all of the CodeGen dependencies have gone away
for the MCDisassembler. Others add reasonable dependencies within the
target-specific layers.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,7 +1,7 @@
-set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMDesc LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMARMDesc LLVMARMAsmPrinter LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaDesc LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
@@ -31,23 +31,23 @@
 set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMBlazeDesc LLVMMBlazeAsmPrinter LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC)
 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaDesc LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinDesc LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUDesc LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDesc LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMipsCodeGen LLVMMipsDesc LLVMMipsInfo LLVMPTXCodeGen LLVMPTXDesc LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCDesc LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcDesc LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZDesc LLVMSystemZInfo LLVMTarget LLVMX86AsmParser LLVMX86CodeGen LLVMX86Desc LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMDesc LLVMARMDisassembler LLVMARMInfo LLVMAlphaDesc LLVMAlphaInfo LLVMBlackfinDesc LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUDesc LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeDesc LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430Desc LLVMMSP430Info LLVMMipsDesc LLVMMipsInfo LLVMPTXDesc LLVMPTXInfo LLVMPowerPCDesc LLVMPowerPCInfo LLVMSparcDesc LLVMSparcInfo LLVMSupport LLVMSystemZDesc LLVMSystemZInfo LLVMTarget LLVMX86AsmParser LLVMX86Desc LLVMX86Disassembler LLVMX86Info LLVMXCoreDesc LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMMCJIT LLVMCore LLVMExecutionEngine LLVMRuntimeDyld LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Desc LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMSP430Desc LLVMMC LLVMMSP430Info)
+set(MSVC_LIB_DEPS_LLVMMSP430Desc LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsAsmPrinter LLVMMipsDesc LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMipsDesc LLVMMC LLVMMipsInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMipsDesc LLVMMC LLVMMipsAsmPrinter LLVMMipsInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMObject LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXDesc LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
@@ -55,7 +55,7 @@
 set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCDesc LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMPowerPCDesc LLVMMC LLVMPowerPCInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPowerPCDesc LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMRuntimeDyld LLVMObject LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMTarget LLVMTransformUtils)
@@ -69,10 +69,10 @@
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMTarget LLVMipa)
-set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport LLVMX86Utils)
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMX86AsmPrinter LLVMX86Desc LLVMX86Info LLVMX86Utils)
-set(MSVC_LIB_DEPS_LLVMX86Desc LLVMMC LLVMSupport LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Desc LLVMMC LLVMSupport LLVMX86AsmPrinter LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMX86Utils LLVMCore LLVMSupport)


fixed test

fixed test

--- tests/expr_test.cmake
+++ tests/expr_test.cmake
@@ -22,7 +22,7 @@
   map_create(this)
   expr("asd = bsd = csd = 3")
   ans(res)
-  assert("${ref}" STREQUAL 3)
+  assert("${res}" STREQUAL 3)
   assert(DEREF "{this.asd}" STREQUAL "3")
   assert(DEREF "{this.bsd}" STREQUAL "3")
   assert(DEREF "{this.csd}" STREQUAL "3")


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -2,6 +2,7 @@
 Name=Instant Messaging
 Name[cs]=Instant Messaging
 Name[da]=Instant messaging
+Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
 Name[it]=Messaggistica istantanea
@@ -19,6 +20,7 @@
 Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
+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[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI


Graph Control 5.4.2-rc2 Release Candidate 2

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

--- version.cmake
+++ version.cmake
@@ -5,9 +5,9 @@
 set ( HPCC_MAJOR 5 )

 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "release" )
-set ( HPCC_SEQUENCE 1 )
+set ( HPCC_POINT 2 )
+set ( HPCC_MATURITY "rc" )
+set ( HPCC_SEQUENCE 2 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Graph Control 4.0.0-rc8 Release Candidate 8

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

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


Use cmake ctest variable for ctest binary. (#538)

--- functions.cmake
+++ functions.cmake
@@ -407,7 +407,7 @@
         set(CONTROL_FILE "${ARG_NAME}.run")
         add_custom_target("${CONTROL_FILE}_target" ALL DEPENDS ${CONTROL_FILE})
         add_custom_command(OUTPUT ${CONTROL_FILE}
-                COMMAND ctest --output-on-failure -R ${ARG_NAME} || (rm -f ${CONTROL_FILE} && false)
+                COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -R ${ARG_NAME} || (rm -f ${CONTROL_FILE} && false)
                 COMMAND touch ${CONTROL_FILE}
                 DEPENDS ${TEST_DEPENDENCIES}
                 COMMENT "Executing ${ARG_COMMAND}")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2011)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 05)
+SET(KWSYS_DATE_STAMP_MONTH 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


cmake: consider sdkconfig defaults value from environment

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -313,21 +313,27 @@
     # PROJECT_NAME is taken from the passed name from project() call
     # PROJECT_DIR is set to the current directory
     # PROJECT_VER is from the version text or git revision of the current repo
+    set(_sdkconfig_defaults "$ENV{SDKCONFIG_DEFAULTS}")
+
+    if(NOT _sdkconfig_defaults)
+        if(EXISTS "${CMAKE_SOURCE_DIR}/sdkconfig.defaults")
+            set(_sdkconfig_defaults "${CMAKE_SOURCE_DIR}/sdkconfig.defaults")
+        else()
+            set(_sdkconfig_defaults "")
+        endif()
+    endif()
+
     if(SDKCONFIG_DEFAULTS)
-        foreach(sdkconfig_default ${SDKCONFIG_DEFAULTS})
-            get_filename_component(sdkconfig_default "${sdkconfig_default}" ABSOLUTE)
-            if(NOT EXISTS "${sdkconfig_default}")
-                message(FATAL_ERROR "SDKCONFIG_DEFAULTS '${sdkconfig_default}' does not exist.")
-            endif()
-            list(APPEND sdkconfig_defaults ${sdkconfig_default})
-        endforeach()
-    else()
-        if(EXISTS "${CMAKE_SOURCE_DIR}/sdkconfig.defaults")
-            set(sdkconfig_defaults "${CMAKE_SOURCE_DIR}/sdkconfig.defaults")
-        else()
-            set(sdkconfig_defaults "")
-        endif()
-    endif()
+        set(_sdkconfig_defaults "${SDKCONFIG_DEFAULTS}")
+    endif()
+
+    foreach(sdkconfig_default ${_sdkconfig_defaults})
+        get_filename_component(sdkconfig_default "${sdkconfig_default}" ABSOLUTE)
+        if(NOT EXISTS "${sdkconfig_default}")
+            message(FATAL_ERROR "SDKCONFIG_DEFAULTS '${sdkconfig_default}' does not exist.")
+        endif()
+        list(APPEND sdkconfig_defaults ${sdkconfig_default})
+    endforeach()

     if(SDKCONFIG)
         get_filename_component(sdkconfig "${SDKCONFIG}" ABSOLUTE)


set deployment target for OSX to 10.6, #3491

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -141,6 +141,13 @@
     set(_project ${PROJECT_NAME})
   endif(NOT DEFINED ROSBUILD_DONT_REDEFINE_PROJECT)

+  # Declare that the minimum version of OSX we support is 10.6, #3491.
+  # For background on how CMAKE_OSX_DEPLOYMENT_TARGET works, see:
+  #   http://public.kitware.com/Bug/view.php?id=6195
+  if(APPLE)
+    SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "Deployment target for OSX" FORCE)
+  endif(APPLE)
+
   message("[rosbuild] Building package ${_project}")

   # Must call include(rosconfig) after project, because rosconfig uses


Do not overwrite correct source dir with a fixed location

--- CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake
+++ CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake
@@ -63,7 +63,6 @@

   MESSAGE(STATUS "... generate MDRA profile (from ${ALG_PROFILE})...")

-  set(MatchPoint_SOURCE_DIR "${CMAKE_BINARY_DIR}/../ep/src/MatchPoint")
   include(${MatchPoint_SOURCE_DIR}/CMake/mapFunctionCreateAlgorithmProfile.cmake)
   CREATE_ALGORITHM_PROFILE(${ALG_NAME} ${ALG_PROFILE})


disabled USE_CURL for mingw64 until static lib can be made (can override by passing -DUSE_CURL=1 to build.sh)

--- mingw64/Custom-mingw64.cmake
+++ mingw64/Custom-mingw64.cmake
@@ -9,3 +9,6 @@
 set(NEED_PORTTIME OFF)
 set(TCL_VERSION 8.5)
 set(USE_OPEN_MP OFF)
+
+#Turning off use of CURL until a static library can be used
+set(USE_CURL OFF)


new: integration testing automation framework

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -10,9 +10,6 @@
 #
 # For usage, see the help message by executing this script with option --help.
 #
-
-# TODO:
-# - execution

 ###############################################################
 WD=$PWD/test_output
@@ -39,6 +36,7 @@
 FAILED_TESTS=""

 PHYSISC=${CMAKE_BINARY_DIR}/translator/physisc
+MPIRUN="MPIRUN_UNSET"

 function fail()
 {
@@ -137,19 +135,20 @@
 	src=$1
 	target=$2
 	src_file_base=$(basename $src .c).$target
-	echo "[EXECUTE] Processing $src/$target"
+	exename=$src_file_base.exe
+	echo "[EXECUTE] Executing $exename"
 	case $target in
 		ref)
-			exename=$src_file_base.ref.exe
+			./$exename
 			;;
 		cuda)
-			exename=$src_file_base.cuda.exe
+			./$exename
 			;;
 		mpi)
-			exename=$src_file_base.mpi.exe
+			$MPIRUN ./$exename
 			;;
 		mpi-cuda)
-			exename=$src_file_base.mpi-cuda.exe
+			$MPIRUN ./$exename
 			;;
 		*)
 			echo "ERROR! Unsupported target"
@@ -179,7 +178,7 @@
 	TARGETS=""
 	STAGE="ALL"

-	TEMP=$(getopt -o ht:s: --long help,targets:,translate,compile,execute -- "$@")
+	TEMP=$(getopt -o ht:s:m: --long help,targets:,translate,compile,execute,mpirun -- "$@")
 	if [ $? != 0 ]; then
 		echo "ERROR! Invalid options: $@";
 		print_usage
@@ -204,6 +203,10 @@
 			--execute)
 				STAGE="EXECUTE"
 				shift
+				;;
+			-m|--mpi-run)
+				MPIRUN=$2
+				shift 2
 				;;
 			-h|--help)
 				print_usage
@@ -242,7 +245,8 @@
 			else
 				echo "[TRANSLATE] FAIL"
 				NUM_FAIL_TRANS=$(($NUM_FAIL_TRANS + 1))
-				fail $SHORTNAME $TARGET translate
+				fail $SHORTNAME $TARGET translate
+				continue
 			fi
 			if [ "$STAGE" = "TRANSLATE" ]; then continue; fi
 			echo "[COMPILE] Processing $SHORTNAME for $TARGET target"
@@ -253,6 +257,7 @@
 				echo "[COMPILE] FAIL"
 				NUM_FAIL_COMPILE=$(($NUM_FAIL_COMPILE + 1))
 				fail $SHORTNAME $TARGET compile
+				continue
 			fi
 			if [ "$STAGE" = "COMPILE" ]; then continue; fi
 			if execute $SHORTNAME $TARGET; then
@@ -262,6 +267,7 @@
 				echo "[EXECUTE] FAIL"
 				NUM_FAIL_EXECUTE=$(($NUM_FAIL_EXECUTE + 1))
 				fail $SHORTNAME $TARGET execute
+				continue
 			fi
 		done
 	done


Extend template config script to chose either build or build-debug directory

--- template-config.cmake
+++ template-config.cmake
@@ -37,5 +37,8 @@
 endif()

 # Try common build locations
-find_modules("build/cmake")
-find_modules("build-debug/cmake")
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+    find_modules("build-debug/cmake")
+else()
+    find_modules("build/cmake")
+endif()


Can't compile gtest + c++11 + MSVC anymore

Because then gtest expects variadic templates, which msvc does not yet implement.

--- AddGTest.cmake
+++ AddGTest.cmake
@@ -15,7 +15,6 @@
 else(MINGW)
   find_package(Threads)
 endif(MINGW)
-

 # Add gtest
 if(NOT EXTERNAL_ROOT)
@@ -37,9 +36,9 @@
     LOG_CONFIGURE ON
     LOG_BUILD ON)

-if(PROJECT_USES_CPP11)
+if(PROJECT_USES_CPP11 AND NOT MSVC)
   add_definitions(-DGTEST_LANG_CXX11)
-endif(PROJECT_USES_CPP11)
+endif(PROJECT_USES_CPP11 AND NOT MSVC)

 macro(add_gtest name source)


[INTERNAL] Will remove legacy build system in 1.4.1, not 1.4.

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

--- util/cmake/SeqAnLegacyBuildSystem.cmake
+++ util/cmake/SeqAnLegacyBuildSystem.cmake
@@ -331,7 +331,7 @@
   message ("    For now, we still support the old build system such that you can")
   message ("    migrate to the new system on a slower upgrade path.  However, please")
   message ("    do so in the near future since support for the new build system will")
-  message ("    stop before the next (1.4) release in early 2013.")
+  message ("    stop before the next (1.4.1) release in spring/summer 2013.")
   message ("")
   message ("  ***************************************************************************")
   message ("  * /!\\ NOTICE: YOU HAVE USED THE THE OLD SEQAN BUILD SYSTEMS FUNCTIONS /!\\*")


STYLE: remove message

STYLE: remove message

--- CMake/vtkTclTkMacros.cmake
+++ CMake/vtkTclTkMacros.cmake
@@ -42,7 +42,6 @@
         ".*#define TCL_VERSION[ \t]*\"([0-9][0-9]*\\.[0-9][0-9]*)\".*" "\\1"
         tcl_include_file "${tcl_include_file}")
       IF(${tcl_include_file} MATCHES "^[0-9]*\\.[0-9]*$")
-        MESSAGE("Version ${tcl_include_file}")
         STRING(REGEX REPLACE "^([0-9]*)\\.([0-9]*)$" "\\1" "${tcl_tk_major_version}"
           "${tcl_include_file}")
         STRING(REGEX REPLACE "^([0-9]*)\\.([0-9]*)$" "\\2" "${tcl_tk_minor_version}"


ENH: update DCMTK

ENH: update DCMTK

$ git shortlog DCMTK-3.6.3..29f9de10c2e8576147f16475b156bba98d14ba7d
Jan Schlamelcher (13):
      Updated version information for 3.6.3+ development.
      Enhanced combined date time range matching.
      Added a missing test for universal matching.
      Minor language and coding style fixes in dcmwlm.
      Fixed an issue in dcmwlm / universal matching.
      Introduced a subset of std::filesystem for ofstd.
      Minor fixes for previous commit.
      More fixes for ofstd filesystem.
      Enhanced Doxygen documentation.
      Introduced support for compile time assertions.
      Enhanced ofstd filesystem's unit test.
      Simplified and enhanced dcmwlm's code.
      Fixed C++11 incompatibility in yesterday's commit.

Joerg Riesmeier (70):
      Enhanced verboseness of getDecompressedColorModel.
      Fixed typos.
      Added comment on missing timer start.
      Added comment on unhandled attributes.
      Use default timeout for first PDU to be read.
      Fixed name of retired Storage SOP Class.
      Removed all references to "CVS".
      Updated copyright date.
      Fixed issue with DSRTree<T>::swap().
      Added support for TID 4019 to TID 1419.
      Increased buffer size to avoid possible overflow.
      Added reference to documentation of TID 4019.
      Fixed double declaration of local variable.
      Increased buffer size to avoid possible overflow.
      Added PatientRadiationDoseSRStorage to man page.
      Moved assignment operator to source file.
      Added check for self-assignment.
      Added constructors and assignment operator.
      Fixed inaccurate name specifier of nested class.
      Enhanced code examples for module "dcmsr".
      Fixed partly wrong API documentation.
      Minor fix to API documentation.
      Fixed typos and removed trailing spaces.
      Removed space character at beginning of a line.
      Updated data dictionary for DICOM 2018a.
      Updated mapping of Body Part Examined to codes.
      Fixed classification of command line options.
      Fixed reference to outdated macro name.
      Removed double declaration of local variable.
      Made log output more consistent.
      Fixed outdated log message.
      Enhanced API documentation of DcmObject::getVM().
      Reverted to version before last commit.
      Next try to keep SunPro Studio 12.x quiet.
      Fixed wrong use of preprocessor directive #elif.
      Initialize struct with ={} instead of ={0}.
      Fixed typo in preprocessor directive.
      Fixed typo.
      Made mapping between VR name and enum more robust.
      Added new method getNumberOfValues().
      Made use of new method getNumberOfValues().
      Updated documentation on CP-1704 (Final Text).
      Made clear that an empty code is not valid.
      Added tree node filter "has Concept Name".
      Set observation date/time for all content items.
      Fixed invalid patient's birthdate in demo data.
      Report warning on missing file meta information.
      Added quotation marks around "isinf/isnan(0.)".
      Avoided "double typecast" in comparison operators.
      Added missing comparison operators "==" and "!=".
      Added support for recently approved CPs.
      Updated data dictionary for DICOM 2018b.
      Updated code definitions for DICOM 2018b.
      Updated Context Group classes for DICOM 2018b.
      Added support for Encapsulated STL Storage SOP.
      Fixed possible "use after scope" issue.
      Fixed typos, tab characters, trailing spaces, etc.
      Removed addOption() flag AF_NoWarning.
      Fixed possible issue with scaled overlays.
      Introduced header file for common exit codes.
      Fixed wrong reference to "dcmsend" tool.
      Fixed "unused result warning" on fwrite() calls.
      Fixed bug introduced with last commit.
      Adapted code for recent API change (DEBUG mode).
      Fixed issue with undefined CMAKE_SYSTEM_VERSION.
      Fixed typos in API documentation of new classes.
      Fixed typos in comments.
      Added support for recently approved CPs.
      CP-1765 retired DICOMDIR reference to CDA/XML.
      Fixed issue with incorrect rendering of overlays.

Marco Eichelberg (61):
      Fixed heap buffer overflow in dcmpschk.
      Changed OFSockAddr::size() return type to socklen_t.
      Fixed MSVC x64 type conversion warning.
      Fixed MSVC x64 type conversion warning.
      Fixed undefined behavior warning on 32-bit platforms.
      DcmTagKey comparison operators now return OFBool.
      Added line feed at EOF to fix Sun C++ warning.
      Fixed use of operator delete[], reported by clang.
      Include <sys/timeb.h> only if really needed.
      Fixed minor warnings reported by SunPro Studio
      Fixed heap buffer overflow in dcmpstat module.
      Minor changes to fix warnings on MacOS.
      Fixed include path for OpenSSL
      Fixed two bugs in DNS lookup code.
      Fixed heap overflow issue caused by invalid datasets.
      Fixed minor warning on MacOS
      Regenerated vrscan code with flex-2.6.4.
      Fixed warning introduced by flex-2.6.4 on Win32.
      Fixed compile error on current version of MinGW.
      Fixed compile error on current version of MinGW.
      Use readdir() instead of readdir_r() if safe.
      Removed default clause in DcmItem::newDicomElement().
      Permit external access to byte offsets in DICOM file.
      Added OpenSSL version check to configure/CMake.
      Updated OpenSSL version test to 1.0.2 as minimum.
      Reverted to OpenSSL version test to 1.0.1 as minimum.
      Link OpenSSL against libdl if available.
      Fixed OpenSSL version test on Windows.
      Another fix for the OpenSSL version test on Windows.
      Major revision of TLS code implementing Suppl. 204.
      Enabled NULL ciphers on OpenSSL 1.1.0 and newer.
      Fixed description regarding OpenSSL 1.1.0 and newer.
      Fixed read mode for certificate files to binary.
      Added Perl script that generates test files.
      Added Perl script with dcmtls test suite.
      Minor cleanup in echoscu.
      Implemented cryptographically secure ISAAC PRNG.
      Modified code to use OFRandom instead of srand/rand.
      Completed conversion to OFRandom.
      Replaced strcpy by OFStandard::strlcpy.
      Added DLL export symbols.
      Replaced strcat by OFStandard::strlcat.
      Added export declaration for deny_/allow_severity.
      Changes for OpenSSL without ECDH support.
      Replaced strcpy by OFStandard::strlcpy.
      Replaced strcpy by OFStandard::strlcpy.
      Fixed minor bug introduced with last commit.
      Moved declaration of global variables for libwrap.
      Added logger to module dcmsign.
      Changed DVPSIPCMessage::resizePayload parameter type.
      Undefine isinf() macro if defined.
      Fixed minor warnings.
      Added missing include statement.
      Fixed missing end of comment.
      Fixed incorrect strlcpy buffer size.
      Added OFStandard::snprintf() and vsnprintf().
      Changes to permit compilation with LibreSSL.
      Fixed gcc 8 warning.
      Fixed typo in comment.
      Introduced upper size limit for A-ASSOCIATE PDUs.
      Improved poll() code in module dcmnet.

Michael Onken (33):
      Fix cmake error on Linux with DCMTK_ENABLE_CXX11.
      Ensure isnan/isinf macro is only defined once.
      Renamed VM variables for clarity.
      Fixed integer overflow in pixel buffer allocation.
      Print error details if conversion fails.
      Fixed uninitialized variable.
      Updated importHierarchy() method API.
      Again, fix API for importHierarchy() (see c8fdfb).
      Fixed C++11 template specialization.
      Added virtual destructors to potent. base classes.
      Initialize members.
      Fixed some compare() methods.
      Fixed missing initializers and old-style casts.
      Fixed usage of getVM() versus getNumberOfValues().
      Added member initializations and copy/assignment.
      Enhanced documentation.
      Added import() method for FoR and FoR checks.
      Removed debug output.
      Fixed compare() methods.
      Make sure compare() works on valid objects.
      Simplified cast.
      Added support for CP-1650 (support JWT User ID).
      Fix posible crash if network data is malformed.
      Fix possible crash if network data is malformed.
      Fix underflow in networking code.
      Fix possible bypass of length check.
      Updated copyright for last commits.
      Use POLLOUT if connect() returns EINPROGRESS.
      Make some parameters const in ASC_ methods.
      Fixed RGB to DICOM Lab color conversion.
      Fixed binary segmentations with rows*cols%8 != 0.
      Fix dcmseg test for all compilers.
      Enabled doxygen docs potentially hidden by macros.

Pedro (1):
      Fixed wrong return status from echoscu.

Pedro F. Arizpe-Gomez (4):
      Fixed wrong return status and exit codes for echoscu.
      Documented exit codes in echoscu manpage.
      Made const pointers for interface of core.
      CMake-language style improvements.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -34,7 +34,7 @@

   ExternalProject_SetIfNotDefined(
     ${proj}_REVISION_TAG
-    "DCMTK-3.6.3"
+    "29f9de10c2e8576147f16475b156bba98d14ba7d"
     QUIET
     )


Use the Commontk/DCTMK dropNetwork branch

For the Commontk/CTK dropNetwork branch, use the corresponding
branch of DCMTK.

Note that we will eventually want to switch to the newer dcmtk that
avoids the need for dropNetwork, but this will be a bigger project
to be done later.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -26,7 +26,8 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
-      GIT_TAG "origin/patched"
+      #GIT_TAG "origin/patched"
+      GIT_TAG "origin/dropNetwork"
       CMAKE_GENERATOR ${gen}
       BUILD_COMMAND ""
       CMAKE_ARGS


numpy install step and fixed error in script generation

--- CMakeExternals/Numpy.cmake
+++ CMakeExternals/Numpy.cmake
@@ -48,10 +48,10 @@
           function(MITK_PYTHON_BUILD_STEP proj step)
              set(_command \${ARGN})

-             message(\"Running \${proj} \${step}: \${_command}\")
+             message(\"Running \${proj} \${step}:${PYTHON_EXECUTABLE} \${_command}\")

              execute_process(
-                COMMAND ${PYTHON_EXECUTABLE} setup.py config
+                COMMAND ${PYTHON_EXECUTABLE} \${_command}
                 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/\${proj}-src
                 RESULT_VARIABLE result
                 OUTPUT_VARIABLE output
@@ -72,7 +72,7 @@
       set(_configure_step ${CMAKE_BINARY_DIR}/${proj}_configure_step.cmake)
       file(WRITE ${_configure_step}
          "include(\"${_external_python_project}\")
-          file(WRITE \"${CMAKE_BINARY_DIR}/${proj}/site.cfg\" \"\")
+          file(WRITE \"${CMAKE_BINARY_DIR}/${proj}-src/site.cfg\" \"\")
           MITK_PYTHON_BUILD_STEP(${proj} configure setup.py config)
          ")

@@ -80,19 +80,24 @@
       set(_build_step ${CMAKE_BINARY_DIR}/${proj}_build_step.cmake)
       file(WRITE ${_build_step}
          "include(\"${_external_python_project}\")
-          MITK_PYTHON_BUILD_STEP(${proj} configure setup.py build --fcompiler=none)
+          MITK_PYTHON_BUILD_STEP(${proj} build setup.py build --fcompiler=none)
+         ")
+
+      # install step
+      set(_install_dir "${CMAKE_BINARY_DIR}/${proj}-install")
+      if(WIN32)
+        STRING(REPLACE "/" "\\\\" _install_dir "${CMAKE_BINARY_DIR}/${proj}-install")
+      endif()
+      set(_install_step ${CMAKE_BINARY_DIR}/${proj}_install_step.cmake)
+      file(WRITE ${_install_step}
+         "include(\"${_external_python_project}\")
+          MITK_PYTHON_BUILD_STEP(${proj} install setup.py install --prefix=${_install_dir})
          ")

       #set(Numpy_URL "https://dl.dropboxusercontent.com/u/8367205/ExternalProjects/numpy-1.6.1.tar.gz")
       #set(Numpy_MD5 "2bce18c08fc4fce461656f0f4dd9103e")
       set(Numpy_URL "https://dl.dropboxusercontent.com/u/8367205/ExternalProjects/numpy-1.4.1.tar.gz")
       set(Numpy_MD5 "5c7b5349dc3161763f7f366ceb96516b")
-
-      set(_install_dir "${CMAKE_BINARY_DIR}/${proj}-install")
-
-      if(WIN32)
-        STRING(REPLACE "/" "\\" _install_dir "${CMAKE_BINARY_DIR}/${proj}-install")
-      endif()

       ExternalProject_Add(${proj}
         URL ${Numpy_URL}
@@ -103,7 +108,7 @@
         INSTALL_DIR ${CMAKE_BINARY_DIR}/${proj}-install
         CONFIGURE_COMMAND ${CMAKE_COMMAND} -P ${_configure_step}
         BUILD_COMMAND   ${CMAKE_COMMAND} -P ${_build_step}
-        INSTALL_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/${proj}-src/setup.py install --prefix=${_install_dir}
+        INSTALL_COMMAND ${CMAKE_COMMAND} -P ${_install_step}

         DEPENDS
           ${${proj}_DEPENDENCIES}


From Raymond de Vires, added support for 2018 and 2016 versions of FBX.

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -60,9 +60,13 @@

 SET( FBX_SEARCH_PATHS
     $ENV{FBX_DIR}
+    "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2018.1.1"
+    "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2018.1.1"
     "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2017.1"
     "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2017.1"
     "/Applications/Autodesk/FBX SDK/2017.1"
+    "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.2"
+    "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.2"
     "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.1"
     "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.1"
     "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2015.1"


rolling forward to r8325 to include changes needed for latest drake release

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -1,6 +1,6 @@

 set(libbot-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/libbot-drc)
-set(libbot-drc_revision 8323)
+set(libbot-drc_revision 8325)
 set(libbot-drc_depends)

 set(Eigen_pod_url https://svn.csail.mit.edu/Eigen_pod)


hm it seems cmake does not understand CYGWIN (=> UNIX)

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -1,7 +1,7 @@

 ####################################################################
 #
-# Usage:
+# Usage:
 #  - create a new folder, let's call it cdash
 #  - in that folder, do:
 #    ctest -S path/to/eigen2/test/testsuite.cmake[,option1=value1[,option2=value2]]
@@ -51,25 +51,25 @@
   # pick first
   string(REGEX MATCH "([^,]*)(,.*)?" DUMMY ${ARGLIST})
   SET(TOP ${CMAKE_MATCH_1})
-
+
   # remove first
   string(REGEX MATCHALL "[^,]*,(.*)" DUMMY ${ARGLIST})
   SET(ARGLIST ${CMAKE_MATCH_1})
-
+
   # decompose as a pair key=value
   string(REGEX MATCH "([^=]*)(=.*)?" DUMMY ${TOP})
   SET(KEY ${CMAKE_MATCH_1})
-
+
   string(REGEX MATCH "[^=]*=(.*)" DUMMY ${TOP})
   SET(VALUE ${CMAKE_MATCH_1})
-
+
   # set the variable to the specified value
   if(VALUE)
     SET(${KEY} ${VALUE})
   else(VALUE)
     SET(${KEY} ON)
   endif(VALUE)
-
+
 endwhile(${ARGLIST} MATCHES ".+.*")

 ####################################################################
@@ -158,7 +158,7 @@

 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
-if(WIN32 AND NOT CYGWIN)
+if(WIN32 AND NOT UNIX)
   #message(SEND_ERROR "win32")
   set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
   SET (CTEST_INITIAL_CACHE "
@@ -168,12 +168,12 @@
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-else(WIN32 AND NOT CYGWIN)
+else(WIN32 AND NOT UNIX)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-endif(WIN32 AND NOT CYGWIN)
+endif(WIN32 AND NOT UNIX)

 # set any extra environment variables to use during the execution of the script here:


BUG: Fix Cppcheck build with ninja.

BUG: Fix Cppcheck build with ninja.

Cppcheck only builds with make.

--- CMake/Superbuild/External_Cppcheck.cmake
+++ CMake/Superbuild/External_Cppcheck.cmake
@@ -60,8 +60,8 @@
     LOG_TEST 0
     LOG_INSTALL 0
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND HAVE_RULES=no CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_MAKE_PROGRAM}
-    INSTALL_COMMAND HAVE_RULES=no PREFIX=${${proj}_DIR} ${CMAKE_MAKE_PROGRAM} install
+    BUILD_COMMAND HAVE_RULES=no CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} make
+    INSTALL_COMMAND HAVE_RULES=no PREFIX=${${proj}_DIR} make install
     DEPENDS
       ${${proj}_DEPENDENCIES} )


ENH: CI: PKG: Moved packaging dashboard submission to CI_Package track.

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -64,8 +64,7 @@
 set(CTEST_GIT_UPDATE_CUSTOM echo No update)

-ctest_start( Experimental TRACK Experimental )
-# TODO: ctest_start( Experimental TRACK CI_Package )
+ctest_start( Experimental TRACK CI_Package )

 ctest_update( SOURCE "${OTB_SOURCE_DIR}" )


Remove unused

Remove unused

--- examples/GTest/cache.cmake
+++ examples/GTest/cache.cmake
@@ -1 +0,0 @@
-set(CMAKE_BUILD_TYPE Debug CACHE STRING "")


Fix Models module crash when loading armature with string array

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
     BINARY_DIR ${${proj}_DIR}
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Slicer.git"
-    GIT_TAG "67493c6bf11e3b9c5b57bba48da3314e8f644815"
+    GIT_TAG "dabe11290061a89345e870df0dee6e3fd606d873"
     ${bender_external_update}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


add support for Visual Studio 2017 (#283)

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -136,9 +136,15 @@
       endif()
     endif()
     if(match AND WIN32)
-      string(FIND "${library}" "VS2015/" _found)
-      if(${_found} EQUAL -1)
-        set(match FALSE)
+      set(match FALSE)
+      string(FIND "${library}" "VS2017/" _found)
+      if(NOT ${_found} EQUAL -1)
+        set(match TRUE)
+      else()
+        string(FIND "${library}" "VS2015/" _found)
+        if(NOT ${_found} EQUAL -1)
+          set(match TRUE)
+        endif()
       endif()
     endif()
     # keep libraries matching this platform


Fix dependeces between build-{ep} targets

--- cmake/externals/configuration_steps/EP_AddCustomTargets.cmake
+++ cmake/externals/configuration_steps/EP_AddCustomTargets.cmake
@@ -31,7 +31,7 @@
 ## #############################################################################

 foreach (dependece ${${ep}_dependencies})
-    set(build-${ep}_dependences ${dependece} ${build-${ep}_dependences})
+    set(build-${ep}_dependences build-${dependece} ${build-${ep}_dependences})
 endforeach()

 add_custom_target(build-${ep}


Fixed py_binary

Fixed py_binary

--- Googlify.cmake
+++ Googlify.cmake
@@ -1039,10 +1039,10 @@
       COMMAND echo "import sys" >> ${EXE})
   foreach (python_path ${PYTHON_PATH})
     set(COMMANDS ${COMMANDS}
-        COMMAND echo "sys.path.append(\"${python_path}\")" >> ${EXE})
+        COMMAND echo "sys.path.append('${python_path}')" >> ${EXE})
   endforeach ()
   set(COMMANDS ${COMMANDS}
-      COMMAND echo "execfile(\"${FULL_SRC}\")" >> ${EXE}
+      COMMAND echo "execfile('${FULL_SRC}')" >> ${EXE}
       COMMAND chmod +x ${EXE})
   add_custom_command(
     OUTPUT ${EXE}


Added prefix dir for Qt.

Added prefix dir for Qt.

--- cmake/deps.cmake
+++ cmake/deps.cmake
@@ -5,6 +5,7 @@
     ${CMAKE_PREFIX_PATH}
     "/usr/local/opt"
     "/usr/local/opt/qt5"
+    "/usr/local/Qt-5.2.1"
     )
 ENDIF()


Revert "Changed mturk marketing name."

Revert "Changed mturk marketing name."

This reverts commit bb7f7fa32b7a76d0e4203f17e5ac5ae5af7cee24.

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -76,7 +76,7 @@
 list(APPEND C2J_LIST "machinelearning:2014-12-12")
 list(APPEND C2J_LIST "marketplacecommerceanalytics:2015-07-01")
 list(APPEND C2J_LIST "meteringmarketplace:2016-01-14")
-list(APPEND C2J_LIST "mturk:2017-01-17")
+list(APPEND C2J_LIST "mturk-requester:2017-01-17")
 list(APPEND C2J_LIST "mobileanalytics:2014-06-05")
 list(APPEND C2J_LIST "monitoring:2010-08-01")
 list(APPEND C2J_LIST "opsworks:2013-02-18")


CMake: Cleaned up `External.cmake`.

CMake: Cleaned up `External.cmake`.

This removes a variable export which was made superfluous due to
consistency introduced by `Versions.cmake`.  In effect we would export
the version of a 3rdparty dependency to the same variable passed into
the `EXTERNAL` function.

Review: https://reviews.apache.org/r/62729/

--- 3rdparty/cmake/External.cmake
+++ 3rdparty/cmake/External.cmake
@@ -19,13 +19,12 @@
 # directory structure of a dependency. In particular, if our library's name is
 # boost, we will define the following variables:
 #
-#   BOOST_VERSION    (e.g., 1.53.0)
-#   BOOST_TARGET     (a target folder name to put dep in e.g., boost-1.53.0)
+#   BOOST_TARGET     (a target folder name to put dep in e.g., `boost-1.53.0`)
 #   BOOST_CMAKE_ROOT (where to have CMake put the uncompressed source, e.g.,
-#                     build/3rdparty/boost-1.53.0)
+#                     `build/3rdparty/boost-1.53.0`)
 #   BOOST_ROOT       (where the code goes in various stages of build, e.g.,
-#                     build/.../boost-1.53.0/src, which might contain folders
-#                     build-1.53.0-build, -lib, and so on, for each build step
+#                     `build/.../boost-1.53.0/src`, which might contain folders
+#                     `build-1.53.0-build,` `-lib`, and so on, for each build step
 #                     that dependency has)
 function(EXTERNAL
   LIB_NAME
@@ -35,46 +34,19 @@
   string(TOUPPER ${LIB_NAME} LIB_NAME_UPPER)

   # Names of variables we will set in this function.
-  set(VERSION_VAR    ${LIB_NAME_UPPER}_VERSION)    # e.g., BOOST_VERSION
   set(TARGET_VAR     ${LIB_NAME_UPPER}_TARGET)     # e.g., BOOST_TARGET
   set(CMAKE_ROOT_VAR ${LIB_NAME_UPPER}_CMAKE_ROOT) # e.g., BOOST_CMAKE_ROOT
   set(ROOT_VAR       ${LIB_NAME_UPPER}_ROOT)       # e.g., BOOST_ROOT

   # Generate data that we will put in the above variables.
-  # NOTE: bundled packages are untar'd into the BIN_ROOT, which is why we're
+  # NOTE: bundled packages are extracted into the BIN_ROOT, which is why we're
   #       pointing the source root into BIN_ROOT rather than SRC_ROOT.
-  # TODO(hausdorff): SRC_DATA doesn't work for HTTP, LIBEV, GMOCK, or GTEST.
-  set(VERSION_DATA    ${LIB_VERSION})
-  set(TARGET_DATA     ${LIB_NAME}-${VERSION_DATA})
+  set(TARGET_DATA     ${LIB_NAME}-${LIB_VERSION})
   set(CMAKE_ROOT_DATA ${BIN_ROOT}/${TARGET_DATA})
   set(ROOT_DATA       ${CMAKE_ROOT_DATA}/src/${TARGET_DATA})

-  # Finally, EXPORT THE ABOVE VARIABLES. We take the data variables we just
-  # defined, and export them to variables in the parent scope.
-  #
-  # NOTE: The "export" step is different from the "define the data vars" step
-  #       because an expression like ${VERSION_VAR} will evaluate to
-  #       something like "BOOST_VERSION", not something like "1.53.0". That
-  #       is: to get the version in the parent scope we would do something
-  #       like ${BOOST_VERSION}, which might evaluate to something like
-  #       "1.53.0". So in this function, if you wanted to generate (e.g.) the
-  #       target variable, it is not sufficient to write
-  #       "${LIB_NAME}-${VERSION_VAR}", because this would result in
-  #       something like "boost-BOOST_VERSION" when what we really wanted was
-  #       "boost-1.53.0". Hence, these two steps are different.
-  set(${VERSION_VAR}    # e.g., 1.53.0
-    ${VERSION_DATA}
-    PARENT_SCOPE)
-
-  set(${TARGET_VAR}     # e.g., boost-1.53.0
-    ${TARGET_DATA}
-    PARENT_SCOPE)
-
-  set(${CMAKE_ROOT_VAR} # e.g., build/3rdparty/boost-1.53.0
-    ${CMAKE_ROOT_DATA}
-    PARENT_SCOPE)
-
-  set(${ROOT_VAR}       # e.g., build/.../boost-1.53.0/src
-    ${ROOT_DATA}
-    PARENT_SCOPE)
+  # Finally, export the above variables to the parent scope.
+  set(${TARGET_VAR}     ${TARGET_DATA}     PARENT_SCOPE)
+  set(${CMAKE_ROOT_VAR} ${CMAKE_ROOT_DATA} PARENT_SCOPE)
+  set(${ROOT_VAR}       ${ROOT_DATA}       PARENT_SCOPE)
 endfunction()