Build fails due to c++20 (module) in fmt #16

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -2,6 +2,7 @@

   # Module library
   file(GLOB SOURCE_FILES "fmt/src/*.cc")
+  list(FILTER SOURCE_FILES EXCLUDE REGEX ".*/fmt.cc")
   add_library(fmt ${SOURCE_FILES})
   if(MSVC)
     set_target_properties(fmt PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")


update

update

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -6,7 +6,7 @@
   if(MSVC)
     set_target_properties(fmt PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
   else()
-    set_target_properties(zlib PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow")
+    set_target_properties(fmt PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow")
   endif()
   target_include_directories(fmt PUBLIC "fmt/include")
   target_link_libraries(fmt)


Fix module path in downstream projects

Fix module path in downstream projects

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -54,7 +54,7 @@
   "if(CMAKE_VERSION VERSION_LESS 2.8.3) # WAR bug\n"
   "  get_filename_component(CMAKE_CURRENT_LIST_DIR \${CMAKE_CURRENT_LIST_FILE} PATH)\n"
   "endif()\n"
-  "list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})\n"
+  "list(APPEND CMAKE_MODULE_PATH \${CMAKE_CURRENT_LIST_DIR})\n"
 )

 set(_config_file_body
@@ -299,7 +299,7 @@
     set(${${_dependent}_name}_findmode REQUIRED)
     set(_FIND_VERSION)
   endif()
-
+
   # Use the components specified by FindPackages.cmake
   set(${_dependent}_components "${${UPPER_PROJECT_NAME}_${_DEPENDENT}_COMPONENTS}")
   if(${_dependent}_components)


toolchain: Do not pollute TOOLCHAIN_HOME

Use it's own variable HOST_TOOLS_HOME for host tools and don't
unconditionally set TOOLCHAIN_HOME, preventing the detection of
llvm/clang host toolchain.

Signed-off-by: Oleg Zhurakivskyy <cdb82bfa180f8df716a77d2c2557196a597a233c@intel.com>

--- cmake/toolchain/zephyr/0.9.5/host-tools.cmake
+++ cmake/toolchain/zephyr/0.9.5/host-tools.cmake
@@ -1,16 +1,16 @@
 # SPDX-License-Identifier: Apache-2.0

 if(MINGW)
-  set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32)
+  set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32)
 else()
-  set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)
+  set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)
 endif()

 # Path used for searching by the find_*() functions, with appropriate
 # suffixes added. Ensures that the SDK's host tools will be found when
 # we call, e.g. find_program(QEMU qemu-system-x86)
-list(APPEND CMAKE_PREFIX_PATH ${TOOLCHAIN_HOME}/usr)
+list(APPEND CMAKE_PREFIX_PATH ${HOST_TOOLS_HOME}/usr)

 # TODO: Use find_* somehow for these as well?
-set_ifndef(QEMU_BIOS            ${TOOLCHAIN_HOME}/usr/share/qemu)
-set_ifndef(OPENOCD_DEFAULT_PATH ${TOOLCHAIN_HOME}/usr/share/openocd/scripts)
+set_ifndef(QEMU_BIOS            ${HOST_TOOLS_HOME}/usr/share/qemu)
+set_ifndef(OPENOCD_DEFAULT_PATH ${HOST_TOOLS_HOME}/usr/share/openocd/scripts)


added option for relro and pie

added option for relro and pie

--- cmake_compiler_settings/cmake/gcc_flags.cmake
+++ cmake_compiler_settings/cmake/gcc_flags.cmake
@@ -145,5 +145,11 @@
 # add check if compiling with -O1, in that case we should use -D_FORTIFY_SOURCE=1...
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2") # =1 when using -O1..

-# add option for relro, pie,
+option(RELRO "Enable full relro" OFF)
+if(RELRO)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,relro,-z,now")
+else()
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,relro")
+endif()

+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fpie")


STYLE: document MIDAS_FETCH_ONLY option in the script.

SVN-Revision: 3278

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -23,6 +23,9 @@
 #         MIDAS{foo.ext.md5}, the actual file foo.ext will be
 #         substituted for it at test time once the file is downloaded,
 #         assuming the keyfile foo.ext.md5 exists in MIDAS_KEY_DIR.
+#         If an arg is of the form MIDAS_FETCH_ONLY{foo.ext.md5},
+#         it will be downloaded prior to running the test, but it will
+#         not be passed as an argument to the test.
 #
 # EXAMPLE:
 #  midas_add_test(someTest php MIDAS{test.php.md5})


Fix the Engine cmake file

Fix the Engine cmake file

--- engine/cmake/FindGluonEngine.cmake
+++ engine/cmake/FindGluonEngine.cmake
@@ -1,61 +1,57 @@
-# - Try to find Gluon
+# - Try to find Gluon Engine
 #
 # Once done this will define
-#  GLUON_FOUND - system has Gluon
-#  GLUON_INCLUDES - all include directories required for Gluon, use it with KDE4_INCLUDES
-#  GLUON_INCLUDE_DIR - the Gluon include directory
-#  GLUON_LIBRARY - the Gluon library
+#  GLUON_ENGINE_FOUND - system has Gluon Engine
+#  GLUON_ENGINE_INCLUDES - all include directories required for Gluon Engine, use it with KDE4_INCLUDES
+#  GLUON_ENGINE_INCLUDE_DIR - the Gluon Engine include directory
+#  GLUON_ENGINE_LIBRARY - the Gluon Engine library
+#  GLUON_ENGINE_LIBS - All libraries required for Gluon Engine
 #
 # Copyright (C) 2009 Guillaume Martres
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-if (GLUON_LIBRARY AND GLUON_INCLUDE_DIR)
+if (GLUON_ENGINE_LIBRARY AND GLUON_ENGINE_INCLUDE_DIR)
   # Already in cache, be silent
-  set(GLUON_FOUND TRUE)
-endif (GLUON_LIBRARY AND GLUON_INCLUDE_DIR)
+  set(GLUON_ENGINE_FOUND TRUE)
+endif (GLUON_ENGINE_LIBRARY AND GLUON_ENGINE_INCLUDE_DIR)

-if (Gluon_FIND_REQUIRED)
-    set(_gluonReq "REQUIRED")
-endif (Gluon_FIND_REQUIRED)
+if (GluonEngine_FIND_REQUIRED)
+    set(_gluonEngineReq "REQUIRED")
+endif (GluonEngine_FIND_REQUIRED)

-find_package(KAL ${_gluonReq})
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_INSTALL_PREFIX}/share/gluon/cmake)

-if (APPLE)
-# KCL doesn't build on Apple yet - just ignore it
-set(KCL_INCLUDES "")
-set(KCLENGINE_H "")
-else (APPLE)
-find_package(KCL ${_gluonReq})
-set(KCLENGINE_H gluon/kcl/kclengine.h)
-endif (APPLE)
+find_package(GluonCore _gluonEngineReq)

-find_package(KGL ${_gluonReq})
-
-
-find_path(GLUON_INCLUDE_DIR
+find_path(GLUON_ENGINE_INCLUDE_DIR
     NAMES
-    gluon/kgl/kglengine.h
-    gluon/kal/kalengine.h
-    ${KCLENGINE_H}
+    engine/gluon_engine_export.h
     PATHS
     ${INCLUDE_INSTALL_DIR}
+    PATH_SUFFIXES
+    gluon
 )

-set(GLUON_INCLUDES
-    ${GLUONCOMMON_INCLUDES}
-    ${GLUON_INCLUDE_DIR}
-    ${KAL_INCLUDES}
-    ${KCL_INCLUDES}
-    ${KGL_INCLUDES}
-    CACHE STRING "Includes needed to use gluon"
+set(GLUON_ENGINE_INCLUDES
+    ${GLUON_CORE_INCLUDES}
+    ${GLUON_ENGINE_INCLUDE_DIR}
+    CACHE PATHS "Includes needed for Gluon Engine"
 )

-find_library(GLUON_LIBRARY NAMES gluon
+find_library(GLUON_ENGINE_LIBRARY
+    NAMES
+    GluonEngine
     PATHS
     ${LIB_INSTALL_DIR}
 )

+set(GLUON_ENGINE_LIBS
+    ${GLUON_CORE_LIBS}
+    ${GLUON_ENGINE_LIBRARY}
+    CACHE PATHS "Libraries needed for Gluon Engine"
+)
+
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Gluon DEFAULT_MSG GLUON_LIBRARY GLUON_INCLUDE_DIR)
+find_package_handle_standard_args(GluonEngine DEFAULT_MSG GLUON_ENGINE_LIBRARY GLUON_ENGINE_INCLUDE_DIR)


COMP: Respect CMAKE_CXX_STANDARD during config

During the introspection process it is important
that the tests that run to determine compiler
features use the same compilation flags as
the final program.  This is particularly important
when using the new CMAKE_CXX_STANDARD=11 flag for
C++11 conformance.

Only pass the CMAKE_CXX_STANDARD to try/compile if set.

This is related to: https://cmake.org/Bug/view.php?id=15361#c37760

Change-Id: I71d1f87fdd1218f514a96f0cf626bdff1c0f3081

--- Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_config_macros.cmake
+++ Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_config_macros.cmake
@@ -1,3 +1,4 @@
+INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)

@@ -14,19 +15,22 @@
   ENDIF( VXL_UPDATE_CONFIGURATION )
   IF(NOT DEFINED "${TEST}")
     # Perform test
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
-        "-D${TEST} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
-      SET(TEST_ADD_LIBRARIES
-          "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+      SET(TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
     MESSAGE(STATUS "Performing Test ${TEST}")

+    if(CMAKE_CXX_STANDARD)
+      set(TRY_COMP_CXX_STANDARD
+        -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD})
+    endif()
     TRY_COMPILE(${TEST}
                 ${CMAKE_BINARY_DIR}
                 ${vxl_config_SOURCE_DIR}/${FILE}
-                CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-                "${TEST_ADD_LIBRARIES}"
+                CMAKE_FLAGS
+                  -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS} "${TEST_ADD_LIBRARIES}"
+                  ${TRY_COMP_CXX_STANDARD}
+                COMPILE_DEFINITIONS -D${TEST}
                 OUTPUT_VARIABLE OUTPUT)
     IF(${TEST})
       SET(${TEST} 1 CACHE INTERNAL "VXL test ${FUNCTION}")
@@ -161,6 +165,17 @@
     SET(${VARIABLE} 0)
   ENDIF()
 ENDMACRO(PERFORM_CHECK_HEADER FILE VARIABLE)
+
+
+MACRO(PERFORM_CHECK_C_HEADER FILE VARIABLE)
+  IF( VXL_UPDATE_CONFIGURATION )
+    UNSET(${VARIABLE})
+  ENDIF( VXL_UPDATE_CONFIGURATION )
+  CHECK_INCLUDE_FILES(${FILE} ${VARIABLE})
+  IF("x${${VARIABLE}}" STREQUAL "x")
+    SET(${VARIABLE} 0)
+  ENDIF()
+ENDMACRO(PERFORM_CHECK_C_HEADER FILE VARIABLE)

 #
 # Check value of variable and if true, set to VALUE_TRUE, otherwise to


fix down script

fix down script

--- CheckDwUtils.cmake
+++ CheckDwUtils.cmake
@@ -19,11 +19,17 @@

     macro(DOWN_UTILS_RUN SRC DST)
         message(STATUS "download file ${SRC} to ${DST}")
-        file(DOWNLOAD
-            "${SRC}"
-            "${DST}"
-            SHOW_PROGRESS
-        )
+        find_program (CURL_FULL_PATH curl)
+        if(CURL_FULL_PATH)
+            execute_process(COMMAND ${CURL_FULL_PATH} --insecure -L ${SRC} -o ${DST})
+        else()
+            find_program (WGET_FULL_PATH wget)
+            if(WGET_FULL_PATH)
+                execute_process(COMMAND ${WGET_FULL_PATH} --no-check-certificate -v ${SRC} -O ${DST})
+            else()
+                file(DOWNLOAD ${SRC} ${DST} SHOW_PROGRESS)
+            endif()
+        endif()
     endmacro()

     message(STATUS "download ")


update coverage module

update coverage module

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

     # Capturing lcov counters and generating report
     COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/include/*' '/usr/local/*' --output-file ${_outputname}.info.cleaned
     COMMAND ${CMAKE_COMMAND} -E rename ${_outputname}.info.cleaned ${_outputname}.info
   )

@@ -165,7 +165,7 @@
 			DEPENDS ${_targetname}_info
 			COMMAND ${COVERALLS_PATH} ${_outputname}.info
 			WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-			COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and uploading report."
+			COMMENT "Processing code coverage counters and uploading report."
 		)
 	endif()

@@ -179,7 +179,7 @@
 		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info

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

 	# Show info where to find the report


ENH: Only compile Slicer CLI module that are necessary (or required to compile necessary modules)

--- SuperBuild/External_SlicerCLI.cmake
+++ SuperBuild/External_SlicerCLI.cmake
@@ -60,31 +60,31 @@
 SlicerMacroCheckExternalProjectDependency(${proj})

 set( SlicerCLIModules
-     MedianImageFilter
+#     MedianImageFilter
      N4ITKBiasFieldCorrection
      ResampleDTIVolume
      ResampleScalarVectorDWIVolume
-     ThresholdScalarVolume
-     AddScalarVolumes
-     BSplineToDeformationField
-     CastScalarVolume
-     CheckerBoardFilter
-     ConnectedComponent
-     DWIJointRicianLMMSEFilter
-     DWIRicianLMMSEFilter
-     GaussianBlurImageFilter
-     GradientAnisotropicDiffusion
-     GrayscaleFillHoleImageFilter
-     HistogramMatching
-     ImageLabelCombine
-     LabelMapSmoothing
-     MaskScalarVolume
-     OrientScalarVolume
-     RobustStatisticsSegmenter
-     SimpleRegionGrowingSegmentation
-     SubtractScalarVolumes
-     ThresholdScalarVolume
-     VotingBinaryHoleFillingImageFilter
+#     ThresholdScalarVolume
+#     AddScalarVolumes
+#     BSplineToDeformationField
+#     CastScalarVolume
+#     CheckerBoardFilter
+#     ConnectedComponent
+#     DWIJointRicianLMMSEFilter
+#     DWIRicianLMMSEFilter
+#     GaussianBlurImageFilter
+#     GradientAnisotropicDiffusion
+#     GrayscaleFillHoleImageFilter
+#     HistogramMatching
+#     ImageLabelCombine
+#     LabelMapSmoothing
+#     MaskScalarVolume
+#     OrientScalarVolume
+#     RobustStatisticsSegmenter
+#     SimpleRegionGrowingSegmentation
+#     SubtractScalarVolumes
+#     ThresholdScalarVolume
+#     VotingBinaryHoleFillingImageFilter
      #MultiplyScalarVolumes->vtkITK
      #DWIToDTIEstimation->vtkITK+MRML
      #DWIUnbiasedNonLocalMeansFilter->vtkITK+MRML


From Torben Dannhauer, build updates for NVTT.

--- CMakeModules/FindNVTT.cmake
+++ CMakeModules/FindNVTT.cmake
@@ -98,6 +98,85 @@
   PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
 )

+# NVTHREAD
+FIND_LIBRARY(NVTHREAD_LIBRARY
+  NAMES nvthread
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+FIND_LIBRARY(NVTHREAD_LIBRARY_DEBUG
+  NAMES nvthread_d
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+
+# SQUISH
+FIND_LIBRARY(NVSQUISH_LIBRARY
+  NAMES squish
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+FIND_LIBRARY(NVSQUISH_LIBRARY_DEBUG
+  NAMES squish_d
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+
+# BC6H
+FIND_LIBRARY(NVBC6H_LIBRARY
+  NAMES bc6h
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+FIND_LIBRARY(NVBC6H_LIBRARY_DEBUG
+  NAMES bc6h_d
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+
+# BC7
+FIND_LIBRARY(NVBC7_LIBRARY
+  NAMES bc7
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)
+FIND_LIBRARY(NVBC7_LIBRARY_DEBUG
+  NAMES bc7_d
+  PATHS
+  /usr/local
+  /usr
+  $ENV{NVTT_DIR}
+  ${3rdPartyRoot}
+  PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
+)


project fix: ffmpeg

project fix: ffmpeg

fix for specifying minimal ffmpeg build
cmake -DXP_STEP=build -DXP_DEFAULT=OFF -DXP_PRO_FFMPEG=ON
correctly turns on the right ffmpeg version for windows/linux
issue https://github.com/smanders/externpro/issues/356

--- projects/ffmpeg.cmake
+++ projects/ffmpeg.cmake
@@ -49,10 +49,12 @@
     return()
   endif()
   if(ff_VER VERSION_EQUAL FFMPEG_MSWVER)
+    xpPatchProject(${PRO_FFMPEG_${FFMPEG_MSWVER}})
     set(BUILD_CONFIGS Release) # we only need a release version
     xpCmakeBuild(ffmpeg_${ff_VER} "" "-DFFMPEG_VER=${ff_VER}")
   elseif(ff_VER VERSION_EQUAL FFMPEG_CFGVER)
     xpBuildDeps(depTgts ${PRO_FFMPEG_${FFMPEG_CFGVER}})
+    xpPatchProject(${PRO_FFMPEG_${FFMPEG_CFGVER}})
     set(XP_CONFIGURE_BASE ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${STAGE_DIR}/share/cmake
       PATH=${STAGE_DIR}/bin:$ENV{PATH} # prepend path to yasm
       <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> #--enable-shared --disable-static
@@ -93,13 +95,14 @@
 endfunction()
 ########################################
 macro(addproject_ffmpeg XP_TARGET)
+  list(APPEND depTgts ffmpeg_${ff_VER})
   message(STATUS "target ${XP_TARGET}")
   if(XP_BUILD_VERBOSE)
     xpVerboseListing("[CONFIGURE]" "${XP_CONFIGURE_CMD}")
     xpVerboseListing("[DEPS]" "${depTgts}")
   endif()
   ExternalProject_Get_Property(ffmpeg_${ff_VER} SOURCE_DIR)
-  ExternalProject_Add(${XP_TARGET} DEPENDS ffmpeg_${ff_VER} ${depTgts}
+  ExternalProject_Add(${XP_TARGET} DEPENDS ${depTgts}
     DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR}
     SOURCE_DIR ${SOURCE_DIR}
     CONFIGURE_COMMAND ${XP_CONFIGURE_CMD}


simplified find for libtcmalloc

simplified find for libtcmalloc

--- backend/modules/FindTcmalloc.cmake
+++ backend/modules/FindTcmalloc.cmake
@@ -5,12 +5,7 @@
 #  Tcmalloc_LIBRARIES   - List of libraries when using Tcmalloc.
 #  Tcmalloc_FOUND       - True if Tcmalloc found.

-find_path(Tcmalloc_INCLUDE_DIR google/tcmalloc.h NO_DEFAULT_PATH PATHS
-  ${HT_DEPENDENCY_INCLUDE_DIR}
-  /usr/include
-  /opt/local/include
-  /usr/local/include
-)
+find_path(Tcmalloc_INCLUDE_DIR google/tcmalloc.h)

 if (USE_TCMALLOC)
   set(Tcmalloc_NAMES tcmalloc)
@@ -20,7 +15,6 @@

 find_library(Tcmalloc_LIBRARY NO_DEFAULT_PATH
   NAMES ${Tcmalloc_NAMES}
-  PATHS ${HT_DEPENDENCY_LIB_DIR} /lib /usr/lib /usr/local/lib /opt/local/lib
 )

 if (Tcmalloc_INCLUDE_DIR AND Tcmalloc_LIBRARY)


BUG: FFTW was built as part of the superbuild process, but the paths to the FFTW libraries were not passed along to AtlasWerks.

AtlasWerks was therefore built using the fftw libraries it could find on the system, which could be dynamic libraries.

--- SuperBuild/FindExternalTools.cmake
+++ SuperBuild/FindExternalTools.cmake
@@ -363,11 +363,11 @@
   -DITK_DIR:PATH=${ITK_DIR}
   -DVTK_DIR:PATH=${VTK_DIR}
   -DLAPACK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/CLAPACK-build
-#  -DFFTW_INSTALL_BASE_PATH:PATH=${FFTW_DIR} # will use find_library to find the libs
-#  -DFFTWF_LIB:PATH=${FFTW_DIR}/lib/libfftw3f.a # FFTW in float
-#  -DFFTWD_LIB:PATH=${FFTW_DIR}/lib/libfftw3.a # FFTW in double # needed for AtlasWerks to configure, not to compile with
-#  -DFFTWF_THREADS_LIB:PATH=${FFTW_DIR}/lib/libfftw3f_threads.a
-#  -DFFTWD_THREADS_LIB:PATH=${FFTW_DIR}/lib/libfftw3_threads.a
+  -DFFTW_INSTALL_BASE_PATH:PATH=${FFTW_DIR} # will use find_library to find the libs
+  -DFFTWF_LIB:PATH=${FFTW_DIR}/lib/libfftw3f.a # FFTW in float
+  -DFFTWD_LIB:PATH=${FFTW_DIR}/lib/libfftw3.a # FFTW in double # needed for AtlasWerks to configure, not to compile with
+  -DFFTWF_THREADS_LIB:PATH=${FFTW_DIR}/lib/libfftw3f_threads.a
+  -DFFTWD_THREADS_LIB:PATH=${FFTW_DIR}/lib/libfftw3_threads.a
   -DFFTW_INCLUDE_PATH:PATH=${FFTW_DIR}/include # will be used to set FFTW_INSTALL_BASE_PATH by finding the path = remove the /include
   -DAtlasWerks_COMPILE_TESTING:BOOL=OFF
   -DatlasWerks_COMPILE_APP_Affine:BOOL=OFF


Set PYBIND11_PYTHON_VERSION to 3.6 for Linux

--- projects/tomviz.cmake
+++ projects/tomviz.cmake
@@ -12,7 +12,7 @@
   list(APPEND tomviz_extra_cmake_args
     -DQT_XMLPATTERNS_EXECUTABLE:FILEPATH=${QT_XMLPATTERNS_EXECUTABLE})
 endif()
-if (APPLE)
+if (UNIX)
   list(APPEND tomviz_extra_cmake_args
     -DPYBIND11_PYTHON_VERSION:STRING=3.6)
 endif()


ENH: sync with cmake cvs: also support python 2.6

Alex

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -13,7 +13,7 @@
 # Search for the python framework on Apple.
 CMAKE_FIND_FRAMEWORKS(Python)

-FOREACH(_CURRENT_VERSION 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
   STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
   IF(WIN32)
     FIND_LIBRARY(PYTHON_DEBUG_LIBRARY


ENH: Added case for Python 2.7.

ENH: Added case for Python 2.7.

Change-Id: Ib7f8fa98a733245279a3b200cb333ca60d900c81

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -27,7 +27,7 @@
 # Search for the python framework on Apple.
 CMAKE_FIND_FRAMEWORKS(Python)

-FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
   STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
   IF(WIN32)
     FIND_LIBRARY(PYTHON_DEBUG_LIBRARY


COMP: Handle Apple separately.

COMP: Handle Apple separately.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -67,7 +67,7 @@
       set(_boost_layout "--layout=tagged")
     endif()

-    if(UNIX)
+    if(UNIX AND NOT APPLE)
       if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
         set(_boost_with_toolset "gcc")
       elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")


cmake: FindGSL.cmake, fixed a bug on OpenSuse

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -27,33 +27,33 @@
 find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )

 #added gsl depends
-#BUG in OpenSuse (missing libgslcblas.so link libgsl.so)
+#BUG in OpenSuse (missing libgslcblas.so link in libgsl.so)
 #if (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)
-if (PC_GSL_LIBRARIES AND NOT GSL_LIBRARY)
+if (PC_GSL_LIBRARIES AND NOT GSL_DEP_LIBRARY)
   list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
   foreach (LIB ${PC_GSL_LIBRARIES})
     find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
-    list(APPEND GSL_LIBRARY ${GSL_${LIB}})
+    list(APPEND GSL_DEP_LIBRARY ${GSL_${LIB}})
     unset(GSL_${LIB} CACHE)
   endforeach(LIB)
-  set(GSL_LIBRARY "${GSL_LIBRARY}" CACHE FILEPATH "lib GSL and its deps" FORCE)
-endif (PC_GSL_LIBRARIES AND NOT GSL_LIBRARY)
+  set(GSL_DEP_LIBRARY "${GSL_DEP_LIBRARY}" CACHE FILEPATH "GSL dep libs" FORCE)
+endif (PC_GSL_LIBRARIES AND NOT GSL_DEP_LIBRARY)
 #endif (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE
 # if all listed variables are TRUE
-find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR )
+find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR GSL_DEP_LIBRARY )
+
+set(GSL_LIBRARIES "${GSL_LIBRARY};${GSL_DEP_LIBRARY}")
+set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )

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

-set(GSL_LIBRARIES ${GSL_LIBRARY} )
-set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
-
 mark_as_advanced(GSL_INCLUDE_DIR GSL_LIBRARY)


Added latest versions of ROS

Added latest versions of ROS

--- CMakeModules/FindROS.cmake
+++ CMakeModules/FindROS.cmake
@@ -12,7 +12,7 @@
 #

-SET(AVAILABLE_ROS_VERSIONS "kinetic;jade;indigo;hydro;groovy")
+SET(AVAILABLE_ROS_VERSIONS "noetic;melodic;lunar;kinetic;jade;indigo;hydro;groovy")

 IF(ROSDEPS)
 ELSE(ROSDEPS)


Do not generate IDL files for .srv files for OpenSplice

--- rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
@@ -6,9 +6,18 @@
 # avoid generating any opensplice specific stuff for builtin_msgs
 if(NOT "${PROJECT_NAME} " STREQUAL "builtin_msgs ")

+set(_ros_idl_files "")
+foreach(_idl_file ${rosidl_generate_interfaces_IDL_FILES})
+  get_filename_component(_extension "${_idl_file}" EXT)
+  # Skip .srv files
+  if("${_extension}" STREQUAL ".msg")
+    list(APPEND _ros_idl_files "${_idl_file}")
+  endif()
+endforeach()
+
 rosidl_generate_dds_interfaces(
   ${rosidl_generate_interfaces_TARGET}__dds_opensplice_idl
-  IDL_FILES ${rosidl_generate_interfaces_IDL_FILES}
+  IDL_FILES ${_ros_idl_files}
   DEPENDENCY_PACKAGE_NAMES ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}
   OUTPUT_SUBFOLDERS "dds_opensplice"
   EXTENSION "rosidl_typesupport_opensplice_cpp.rosidl_generator_dds_idl_extension"


fixed test data copy on linux. test on windows to be done before master merge

--- WkTest.cmake
+++ WkTest.cmake
@@ -67,18 +67,6 @@
 endmacro(WkTestDataDir dir)

 #
-# Defining where data used by tests should be found when using the build exe.
-#
-macro(WkTestDataBuildDir dir)
-	if (${PROJECT_NAME} STREQUAL "Project")
-		message(FATAL_ERROR "WkTestDataBuildDir needs to be called after WkProject")
-	else ()
-		set ( ${PROJECT_NAME}_TEST_DATA_BUILD_DIR ${dir} CACHE PATH "Data directory for ${PROJECT_NAME} build tests products with root at ${PROJECT_BINARY_DIR}" )
-		mark_as_advanced ( ${PROJECT_NAME}_TEST_DATA_BUILD_DIR )
-	endif()
-endmacro(WkTestDataBuildDir dir)
-
-#
 #WkTestBuild( test_name [test_source [...] ] )
 #

@@ -91,10 +79,7 @@

 	# Default: "data" w root at ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}
 	WkTestDataDir("data")
-
-	# Default: "${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}" w root at ${PROJECT_BINARY_DIR}
-	WkTestDataBuildDir("${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}")
-
+
 	option(${PROJECT_NAME}_ENABLE_TESTS "Wether or not you want the project to include the tests and enable automatic testing for ${PROJECT_NAME}" OFF)

 	IF(${PROJECT_NAME}_ENABLE_TESTS)
@@ -189,10 +174,16 @@
 	foreach ( test_data ${ARGN} )

 		# warning : tests are run from the project root...
-		FILE(TO_NATIVE_PATH "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data}" ${test_data}_NATIVE_SRC_PATH)
-		FILE(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DATA_BUILD_DIR}/${test_data}" ${test_data}_NATIVE_BLD_PATH)
-		ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${${test_data}_NATIVE_SRC_PATH}" "${${test_data}_NATIVE_BLD_PATH}" COMMENT "Copying ${${test_data}_NATIVE_SRC_PATH} to ${${test_data}_NATIVE_BLD_PATH}" )
-
+		#FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data} ${test_data}_NATIVE_SRC_PATH)
+		#FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data} ${test_data}_NATIVE_BLD_PATH)
+		#ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${${test_data}_NATIVE_SRC_PATH}" "${${test_data}_NATIVE_BLD_PATH}" COMMENT "Copying ${${test_data}_NATIVE_SRC_PATH} to ${${test_data}_NATIVE_BLD_PATH}" VERBATIM)
+		ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy
+			"${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data}"
+			"${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data}"
+			COMMENT
+			"Copying ${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data} to ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data}"
+			VERBATIM)
+
 		#message ("test data src: ${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}/${test_data}")
 		#message ("test data dest: ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DATA_BUILD_DIR}/${test_data}")


adding copy of testdata directory when test is enabled

--- WkTest.cmake
+++ WkTest.cmake
@@ -85,6 +85,17 @@
 	IF(${PROJECT_NAME}_ENABLE_TESTS)
 		ENABLE_TESTING()

+		#copying data for tests
+		IF(EXISTS "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}" AND IS_DIRECTORY "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}")
+		    #message(STATUS "adding copy command for ${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}")
+		    ADD_CUSTOM_COMMAND( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
+			    "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"
+			    "${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"
+			    COMMENT
+			    "Copying ${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR} to ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"
+			    VERBATIM)
+        ENDIF()
+
 		IF ( ${ARGC} EQUAL 1 )
 			FILE(GLOB testsource RELATIVE ${PROJECT_SOURCE_DIR} ${${PROJECT_NAME}_TEST_DIR}/${test_name}.c ${${PROJECT_NAME}_TEST_DIR}/${test_name}.cc ${${PROJECT_NAME}_TEST_DIR}/${test_name}.cpp )
 			MESSAGE ( STATUS "== Detected ${test_name} Source : ${testsource}" )


[C++] Update usage description in JoynrGeneratorConfig.cmake

--- tools/generator/joynr-generator-standalone/src/main/scripts/JoynrGeneratorConfig.cmake
+++ tools/generator/joynr-generator-standalone/src/main/scripts/JoynrGeneratorConfig.cmake
@@ -12,7 +12,7 @@
 #                  [GENERATION_ID id]
 #                  [OUTPUT_HEADER_PATH dir]
 #                  [INCLUDE_PREFIX prefix]
-#                  [ADD_VERSION_TO name|package|none])
+#                  [ADD_VERSION_TO comment|package|none])

 include(CMakeParseArguments)


Begin post-0.4 development

Begin post-0.4 development

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 0)
+set(CastXML_VERSION_PATCH 20210112)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


Accomodate SuSE and Ubuntu

Accomodate SuSE and Ubuntu

--- cmake/Modules/cvmfs_compiler.cmake
+++ cmake/Modules/cvmfs_compiler.cmake
@@ -42,8 +42,8 @@
     OUTPUT_VARIABLE CVMFS_GCC_VERSION
     ERROR_VARIABLE  CVMFS_GCC_VERSION
   )
-  STRING(REGEX REPLACE "[A-Za-z]* \\(GCC\\) ([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CVMFS_GCC_MAJOR "${CVMFS_GCC_VERSION}")
-  STRING(REGEX REPLACE "[A-Za-z]* \\(GCC\\) [0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CVMFS_GCC_MINOR "${CVMFS_GCC_VERSION}")
+  STRING(REGEX REPLACE "[A-Za-z]* \\(.+\\) ([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CVMFS_GCC_MAJOR "${CVMFS_GCC_VERSION}")
+  STRING(REGEX REPLACE "[A-Za-z]* \\(.+\\) [0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CVMFS_GCC_MINOR "${CVMFS_GCC_VERSION}")
   if (${CVMFS_GCC_MAJOR} LESS 4)
     message (FATAL_ERROR "GCC < 4.1 unsupported")
   endif (${CVMFS_GCC_MAJOR} LESS 4)


Refs #2315. Support for multiple same thirdparty

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -15,125 +15,133 @@
 macro(find_eprosima_package package)
     if(NOT (EPROSIMA_INSTALLER AND (MSVC OR MSVC_IDE)))
         if(THIRDPARTY)
-            set(${package}ExternalDir ${PROJECT_BINARY_DIR}/external/${package})
-
-            if(MINION)
-                set(CMAKE_INSTALL_PREFIX_ "${CMAKE_INSTALL_PREFIX}")
+            set(EPROSIMA_PACKAGE_EXTERNAL_DIR "" CACHE STRING "External directory to compile eprosima libraries")
+
+            if("${EPROSIMA_PACKAGE_EXTERNAL_DIR}" STREQUAL "")
+                set(${package}ExternalDir ${PROJECT_BINARY_DIR}/external/${package})
             else()
-                set(CMAKE_INSTALL_PREFIX_ "${PROJECT_BINARY_DIR}/external/install")
-            endif()
-
-            set(ANDROID_BUILD_OPTIONS "")
-            if(ANDROID)
-                set(ANDROID_BUILD_OPTIONS "-DANDROID_ABI=${ANDROID_ABI}"
-                    "-DANDROID_NDK=${ANDROID_NDK}"
-                    "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
-                    "-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}"
-                    "-DANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}"
-                    "-DANDROID_PLATFORM=${ANDROID_PLATFORM}"
-                    "-DANDROID_STL=${ANDROID_STL}"
-                    "-DANDROID_PIE=${ANDROID_PIE}"
-                    "-DANDROID_CPP_FEATURES=${ANDROID_CPP_FEATURES}"
-                    "-DANDROID_ALLOW_UNDEFINED_SYMBOLS=${ANDROID_ALLOW_UNDEFINED_SYMBOLS}"
-                    "-DANDROID_ARM_MODE=${ANDROID_ARM_MODE}"
-                    "-DANDROID_ARM_NEON=${ANDROID_ARM_NEON}"
-                    "-DANDROID_DISABLE_NO_EXECUTE=${ANDROID_DISABLE_NO_EXECUTE}"
-                    "-DANDROID_DISABLE_RELRO=${ANDROID_DISABLE_RELRO}"
-                    "-DANDROID_DISABLE_FORMAT_STRING_CHECKS=${ANDROID_DISABLE_FORMAT_STRING_CHECKS}"
-                    "-DANDROID_FUNCTION_LEVEL_LINKING=${ANDROID_FUNCTION_LEVEL_LINKING}"
+                set(${package}ExternalDir ${EPROSIMA_PACKAGE_EXTERNAL_DIR}/${package})
+            endif()
+
+            if(NOT EXISTS "${${package}ExternalDir}/cmake_install.cmake")
+                if(MINION)
+                    set(CMAKE_INSTALL_PREFIX_ "${CMAKE_INSTALL_PREFIX}")
+                else()
+                    set(CMAKE_INSTALL_PREFIX_ "${PROJECT_BINARY_DIR}/external/install")
+                endif()
+
+                set(ANDROID_BUILD_OPTIONS "")
+                if(ANDROID)
+                    set(ANDROID_BUILD_OPTIONS "-DANDROID_ABI=${ANDROID_ABI}"
+                        "-DANDROID_NDK=${ANDROID_NDK}"
+                        "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
+                        "-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}"
+                        "-DANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}"
+                        "-DANDROID_PLATFORM=${ANDROID_PLATFORM}"
+                        "-DANDROID_STL=${ANDROID_STL}"
+                        "-DANDROID_PIE=${ANDROID_PIE}"
+                        "-DANDROID_CPP_FEATURES=${ANDROID_CPP_FEATURES}"
+                        "-DANDROID_ALLOW_UNDEFINED_SYMBOLS=${ANDROID_ALLOW_UNDEFINED_SYMBOLS}"
+                        "-DANDROID_ARM_MODE=${ANDROID_ARM_MODE}"
+                        "-DANDROID_ARM_NEON=${ANDROID_ARM_NEON}"
+                        "-DANDROID_DISABLE_NO_EXECUTE=${ANDROID_DISABLE_NO_EXECUTE}"
+                        "-DANDROID_DISABLE_RELRO=${ANDROID_DISABLE_RELRO}"
+                        "-DANDROID_DISABLE_FORMAT_STRING_CHECKS=${ANDROID_DISABLE_FORMAT_STRING_CHECKS}"
+                        "-DANDROID_FUNCTION_LEVEL_LINKING=${ANDROID_FUNCTION_LEVEL_LINKING}"
+                        )
+                endif()
+
+                # Separate CMAKE_PREFIX_PATH
+                string(REPLACE ";" "|" CMAKE_PREFIX_PATH_ "${CMAKE_PREFIX_PATH}")
+                string(REPLACE " " "\\ " CMAKE_C_FLAGS_ "${CMAKE_C_FLAGS}")
+                string(REPLACE " " "\\ " CMAKE_CXX_FLAGS_ "${CMAKE_CXX_FLAGS}")
+
+                set(${package}_CMAKE_ARGS
+                    "\${SOURCE_DIR_}"
+                    "\${GENERATOR_}"
+                    "\${CMAKE_C_COMPILER_}"
+                    "\${CMAKE_CXX_COMPILER_}"
+                    "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS_}"
+                    "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS_}"
+                    ${BUILD_OPTION}
+                    ${ANDROID_BUILD_OPTIONS}
+                    "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
+                    "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}"
+                    "-DMINION=ON"
+                    "-DEPROSIMA_INSTALLER_MINION=${EPROSIMA_INSTALLER_MINION}"
+                    "-DBIN_INSTALL_DIR:PATH=${BIN_INSTALL_DIR}"
+                    "-DINCLUDE_INSTALL_DIR:PATH=${INCLUDE_INSTALL_DIR}"
+                    "-DLIB_INSTALL_DIR:PATH=${LIB_INSTALL_DIR}"
+                    "-DLICENSE_INSTALL_DIR:PATH=licenses"
+                    "\${CMAKE_INSTALL_PREFIX_}"
+                    "\${CMAKE_PREFIX_PATH_}"
                     )
-            endif()
-
-            # Separate CMAKE_PREFIX_PATH
-            string(REPLACE ";" "|" CMAKE_PREFIX_PATH_ "${CMAKE_PREFIX_PATH}")
-            string(REPLACE " " "\\ " CMAKE_C_FLAGS_ "${CMAKE_C_FLAGS}")
-            string(REPLACE " " "\\ " CMAKE_CXX_FLAGS_ "${CMAKE_CXX_FLAGS}")
-
-            set(${package}_CMAKE_ARGS
-                "\${SOURCE_DIR_}"
-                "\${GENERATOR_}"
-                "\${CMAKE_C_COMPILER_}"
-                "\${CMAKE_CXX_COMPILER_}"
-                "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS_}"
-                "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS_}"
-                ${BUILD_OPTION}
-                ${ANDROID_BUILD_OPTIONS}
-                "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
-                "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}"
-                "-DMINION=ON"
-                "-DEPROSIMA_INSTALLER_MINION=${EPROSIMA_INSTALLER_MINION}"
-                "-DBIN_INSTALL_DIR:PATH=${BIN_INSTALL_DIR}"
-                "-DINCLUDE_INSTALL_DIR:PATH=${INCLUDE_INSTALL_DIR}"
-                "-DLIB_INSTALL_DIR:PATH=${LIB_INSTALL_DIR}"
-                "-DLICENSE_INSTALL_DIR:PATH=licenses"
-                "\${CMAKE_INSTALL_PREFIX_}"
-                "\${CMAKE_PREFIX_PATH_}"
-                )
-            list(APPEND ${package}_CMAKE_ARGS LIST_SEPARATOR "|")
-
-            file(MAKE_DIRECTORY ${${package}ExternalDir})
-            file(WRITE ${${package}ExternalDir}/CMakeLists.txt
-                "cmake_minimum_required(VERSION 2.8.12)\n"
-                "include(ExternalProject)\n"
-                "set(SOURCE_DIR_ \"${PROJECT_SOURCE_DIR}/thirdparty/${package}\")\n"
-                "set(GENERATOR_ -G \"${CMAKE_GENERATOR}\")\n"
-                "set(CMAKE_INSTALL_PREFIX_ \"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX_}\")\n"
-                "set(CMAKE_PREFIX_PATH_ -DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH_}\")\n"
-                "set(CMAKE_C_COMPILER_ \"-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}\")\n"
-                "set(CMAKE_CXX_COMPILER_ \"-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}\")\n"
-                "ExternalProject_Add(${package}\n"
-                "CONFIGURE_COMMAND \"${CMAKE_COMMAND}\"\n"
-                "${${package}_CMAKE_ARGS}\n"
-                "DOWNLOAD_COMMAND \"\"\n"
-                "UPDATE_COMMAND cd \"${PROJECT_SOURCE_DIR}\" && git submodule update --recursive --init \"thirdparty/${package}\"\n"
-                "SOURCE_DIR \${SOURCE_DIR_}\n"
-                "BINARY_DIR \"${${package}ExternalDir}/build\"\n"
-                ")\n")
-
-            execute_process(COMMAND ${CMAKE_COMMAND}
-                -G ${CMAKE_GENERATOR}
-                ${BUILD_OPTION}
-                ${ANDROID_BUILD_OPTIONS}
-                WORKING_DIRECTORY ${${package}ExternalDir}
-                RESULT_VARIABLE EXECUTE_RESULT
-                )
-
-            if(NOT EXECUTE_RESULT EQUAL 0)
-                message(FATAL_ERROR "Cannot configure Git submodule ${package}")
-            endif()
-
-            if(MSVC OR MSVC_IDE)
-                if("${CMAKE_BUILD_TYPE}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
-                    set(BUILD_TYPE_GENERATION "Release")
-                else()
-                    set(BUILD_TYPE_GENERATION ${CMAKE_BUILD_TYPE})
-                endif()
-
-                execute_process(COMMAND ${CMAKE_COMMAND} --build . --config Debug
+                list(APPEND ${package}_CMAKE_ARGS LIST_SEPARATOR "|")
+
+                file(MAKE_DIRECTORY ${${package}ExternalDir})
+                file(WRITE ${${package}ExternalDir}/CMakeLists.txt
+                    "cmake_minimum_required(VERSION 2.8.12)\n"
+                    "include(ExternalProject)\n"
+                    "set(SOURCE_DIR_ \"${PROJECT_SOURCE_DIR}/thirdparty/${package}\")\n"
+                    "set(GENERATOR_ -G \"${CMAKE_GENERATOR}\")\n"
+                    "set(CMAKE_INSTALL_PREFIX_ \"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX_}\")\n"
+                    "set(CMAKE_PREFIX_PATH_ -DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH_}\")\n"
+                    "set(CMAKE_C_COMPILER_ \"-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}\")\n"
+                    "set(CMAKE_CXX_COMPILER_ \"-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}\")\n"
+                    "ExternalProject_Add(${package}\n"
+                    "CONFIGURE_COMMAND \"${CMAKE_COMMAND}\"\n"
+                    "${${package}_CMAKE_ARGS}\n"
+                    "DOWNLOAD_COMMAND \"\"\n"
+                    "UPDATE_COMMAND cd \"${PROJECT_SOURCE_DIR}\" && git submodule update --recursive --init \"thirdparty/${package}\"\n"
+                    "SOURCE_DIR \${SOURCE_DIR_}\n"
+                    "BINARY_DIR \"${${package}ExternalDir}/build\"\n"
+                    ")\n")
+
+                execute_process(COMMAND ${CMAKE_COMMAND}
+                    -G ${CMAKE_GENERATOR}
+                    ${BUILD_OPTION}
+                    ${ANDROID_BUILD_OPTIONS}
                     WORKING_DIRECTORY ${${package}ExternalDir}
                     RESULT_VARIABLE EXECUTE_RESULT
                     )

                 if(NOT EXECUTE_RESULT EQUAL 0)
-                    message(FATAL_ERROR "Cannot build Git submodule ${package} in Debug mode")
-                endif()
-
-                execute_process(COMMAND ${CMAKE_COMMAND} --build . --config ${BUILD_TYPE_GENERATION}
-                    WORKING_DIRECTORY ${${package}ExternalDir}
-                    RESULT_VARIABLE EXECUTE_RESULT
-                    )
-
-                if(NOT EXECUTE_RESULT EQUAL 0)
-                    message(FATAL_ERROR "Cannot build Git submodule ${package} in ${BUILD_TYPE_GENERATION} mode")
-                endif()
-            else()
-                execute_process(COMMAND ${CMAKE_COMMAND} --build .
-                    WORKING_DIRECTORY ${${package}ExternalDir}
-                    RESULT_VARIABLE EXECUTE_RESULT
-                    )
-
-                if(NOT EXECUTE_RESULT EQUAL 0)
-                    message(FATAL_ERROR "Cannot build Git submodule ${package}")
+                    message(FATAL_ERROR "Cannot configure Git submodule ${package}")
+                endif()
+
+                if(MSVC OR MSVC_IDE)
+                    if("${CMAKE_BUILD_TYPE}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
+                        set(BUILD_TYPE_GENERATION "Release")
+                    else()
+                        set(BUILD_TYPE_GENERATION ${CMAKE_BUILD_TYPE})
+                    endif()
+
+                    execute_process(COMMAND ${CMAKE_COMMAND} --build . --config Debug
+                        WORKING_DIRECTORY ${${package}ExternalDir}
+                        RESULT_VARIABLE EXECUTE_RESULT
+                        )
+
+                    if(NOT EXECUTE_RESULT EQUAL 0)
+                        message(FATAL_ERROR "Cannot build Git submodule ${package} in Debug mode")
+                    endif()
+
+                    execute_process(COMMAND ${CMAKE_COMMAND} --build . --config ${BUILD_TYPE_GENERATION}
+                        WORKING_DIRECTORY ${${package}ExternalDir}
+                        RESULT_VARIABLE EXECUTE_RESULT
+                        )
+
+                    if(NOT EXECUTE_RESULT EQUAL 0)
+                        message(FATAL_ERROR "Cannot build Git submodule ${package} in ${BUILD_TYPE_GENERATION} mode")
+                    endif()
+                else()
+                    execute_process(COMMAND ${CMAKE_COMMAND} --build .
+                        WORKING_DIRECTORY ${${package}ExternalDir}
+                        RESULT_VARIABLE EXECUTE_RESULT
+                        )
+
+                    if(NOT EXECUTE_RESULT EQUAL 0)
+                        message(FATAL_ERROR "Cannot build Git submodule ${package}")
+                    endif()
                 endif()
             endif()


The code for the wxwidgets driver is now spread out over some files.

svn path=/trunk/; revision=8399

--- cmake/modules/drivers-finish.cmake
+++ cmake/modules/drivers-finish.cmake
@@ -42,7 +42,9 @@
       if(DRIVER STREQUAL "wxwidgets")
         set(${DRIVER}_SOURCE
 	${CMAKE_SOURCE_DIR}/drivers/${DRIVER}.cpp
-	${${DRIVER}_SOURCE}
+	${CMAKE_SOURCE_DIR}/drivers/${DRIVER}_app.cpp
+  ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}_dc.cpp
+  ${${DRIVER}_SOURCE}
 	)
       elseif(DRIVER STREQUAL "psttf")
         set(${DRIVER}_SOURCE


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/buffer/hunter.cmake
+++ cmake/projects/buffer/hunter.cmake
@@ -3,6 +3,17 @@
 include(hunter_pick_scheme)

 # List of versions here...
+
+hunter_add_version(
+    PACKAGE_NAME
+    buffer
+    VERSION
+    "0.1.6"
+    URL
+    "https://github.com/designerror/buffer/archive/v0.1.7.tar.gz"
+    SHA1
+    bc9d644ea606bcd1dfbb42582ed593d4c42d9531
+)

 hunter_add_version(
     PACKAGE_NAME


Fixed require to not try to hook up targets for header only libraries.  Updated create_test (which had previously only been a test/experiement itself) to be more useful and use googletest.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -23,6 +23,8 @@
   endif ()

   set(CURRENT_TARGET ${target})
+  set(LOCAL_TARGET ${target})
+
   if (NOT "${PROJECT_NAME}" STREQUAL ${target})
     add_project(${target})
   endif ()
@@ -94,49 +96,36 @@
 endmacro(get_relative_path)

 macro(create_test target)
-  set(LAST_TARGET ${CURRENT_TARGET})
-  set(CURRENT_TARGET ${target})
-
-  file(GLOB_RECURSE SOURCES test/*.cpp test/*.h)
-  add_executable(${target} ${SOURCES})
-
-  include_directories(
-    ${CMAKE_CURRENT_LIST_DIR}/test
-  )
-
-  if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
-    string(LENGTH "${CMAKE_SOURCE_DIR}" string_length)
-    math(EXPR string_length "${string_length} + 1")
-    string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${string_length} -1 current_path)
-    get_filename_component(current_path ${current_path} DIRECTORY)
-    set_target_properties(${target} PROPERTIES FOLDER ${current_path})
-  endif ()
-
-  require(${LAST_TEST})
-
+  if (MINGW)
+    create_executable(${target})
+    link_external_static(googletest gtest)
+    target_link_libraries(${target} "${MYTHIC_DEPENDENCIES}/googletest/lib/libgtest_main.a")
+  endif ()
 endmacro(create_test)

 macro(require)
-  foreach (library_name ${ARGN})
-    #    message("${PROJECT_NAME} require ${library_name}")
-    find_package(${library_name} REQUIRED)
-
-    if (TARGET ${library_name})
-      if (IOS)
-        target_link_libraries(${CURRENT_TARGET}
-          $<TARGET_FILE:${library_name}>
-          )
-      else ()
-        target_link_libraries(${CURRENT_TARGET}
-          $<TARGET_LINKER_FILE:${library_name}>
+  if (LOCAL_TARGET)
+    foreach (library_name ${ARGN})
+      #    message("${PROJECT_NAME} require ${library_name}")
+      find_package(${library_name} REQUIRED)
+
+      if (TARGET ${library_name})
+        if (IOS)
+          target_link_libraries(${CURRENT_TARGET}
+            $<TARGET_FILE:${library_name}>
+            )
+        else ()
+          target_link_libraries(${CURRENT_TARGET}
+            $<TARGET_LINKER_FILE:${library_name}>
+            )
+        endif ()
+
+        add_dependencies(${CURRENT_TARGET}
+          ${library_name}
           )
       endif ()
-
-      add_dependencies(${CURRENT_TARGET}
-        ${library_name}
-        )
-    endif ()
-  endforeach ()
+    endforeach ()
+  endif ()
 endmacro()

 if (IOS)


Workaround compile issue

Workaround compile issue

--- scripts/superbuild/dependencies/dep_gtest.cmake
+++ scripts/superbuild/dependencies/dep_gtest.cmake
@@ -21,6 +21,7 @@
     -Dgtest_force_shared_crt=ON
     -DCMAKE_INSTALL_PREFIX:PATH=${COMPONENT_PATH}
     -DCMAKE_BUILD_TYPE=${DEPENDENCIES_BUILD_TYPE}
+    -DBUILD_GMOCK=OFF
 )

 list(APPEND CMAKE_PREFIX_PATH ${COMPONENT_PATH})


FindPSQGENERICLINTER: Find the populate-cache executable

--- FindPSQGENERICLINTER.cmake
+++ FindPSQGENERICLINTER.cmake
@@ -9,6 +9,9 @@
 #                               polysquare-generic-file-linter executable
 # STYLE_GUIDE_LINT_SPELLCHECK_EXECUTABLE : Fully qualified path to the
 #                                          spellcheck-linter executable
+# STYLE_GUIDE_LINT_POP_CACHE_EXECUTABLE : Fully qualified path to the
+#                                         polysquare-generic-file-linter-
+#                                         populate-cache executable
 #
 # The following variables will affect the operation of this script
 # STYLE_GUIDE_LINT_SEARCH_PATHS : List of directories to search for
@@ -18,6 +21,21 @@
 # See /LICENCE.md for Copyright information

 include ("cmake/tooling-find-pkg-util/ToolingFindPackageUtil")
+
+function (_style_guide_linter_not_found_msg EXECUTABLE RETURN_VALUE)
+
+    set (MSG
+         "The '${EXECUTABLE}' executable was not found in any search or "
+         "system paths.\n.."
+         "Please adjust STYLE_GUIDE_LINT_SEARCH_PATHS to the installation"
+         " prefix of the '${EXECUTABLE}'\n executable or install "
+         "'${EXECUTABLE}'")
+
+    string (REPLACE ";" " " MSG "${MSG}")
+
+    set (${RETURN_VALUE} "${MSG}" PARENT_SCOPE)
+
+endfunction ()

 function (style_guide_linter_find)

@@ -32,6 +50,8 @@
     set (BIN_SUBDIR bin)
     set (STYLE_GUIDE_LINT_EXECUTABLE polysquare-generic-file-linter)
     set (STYLE_GUIDE_LINT_SPELLCHECK_EXECUTABLE spellcheck-linter)
+    set (STYLE_GUIDE_LINT_POP_CACHE_EXECUTABLE
+         polysquare-generic-file-linter-populate-cache)

     psq_find_tool_executable ("${STYLE_GUIDE_LINT_EXECUTABLE}"
                               STYLE_GUIDE_LINT_EXECUTABLE
@@ -43,40 +63,44 @@
                               PATHS ${STYLE_GUIDE_LINT_SEARCH_PATHS}
                               PATH_SUFFIXES "${BIN_SUBDIR}")

+    psq_find_tool_executable ("${STYLE_GUIDE_LINT_POP_CACHE_EXECUTABLE}"
+                              STYLE_GUIDE_LINT_POP_CACHE_EXECUTABLE
+                              PATHS ${STYLE_GUIDE_LINT_SEARCH_PATHS}
+                              PATH_SUFFIXES "${BIN_SUBDIR}")
+
+    _style_guide_linter_not_found_msg ("${STYLE_GUIDE_LINT_EXECUTABLE}"
+                                       STYLE_GUIDE_LINT_EXECUTABLE_MSG)
     psq_report_not_found_if_not_quiet (StyleGuideLinter
                                        STYLE_GUIDE_LINT_EXECUTABLE
-                                       "The 'polysquare-generic-file-linter' "
-                                       "executable was not found "
-                                       "in any search or system paths.\n.."
-                                       "Please adjust "
-                                       "STYLE_GUIDE_LINT_SEARCH_PATHS "
-                                       "to the installation prefix of the"
-                                       "'polysquare-generic-file-linter'\n.. "
-                                       "executable or install"
-                                       "polysquare-generic-file-linter")
+                                       ${STYLE_GUIDE_LINT_EXECUTABLE_MSG})

     psq_check_and_report_tool_version (StyleGuideLinter
                                        "latest"
                                        REQUIRED_VARS
                                        STYLE_GUIDE_LINT_EXECUTABLE)

+    _style_guide_linter_not_found_msg ("${${POP_CACHE_EXECUTABLE_NAME}}"
+                                       POPULATE_CACHE_EXECUTABLE_MSG)
+    psq_report_not_found_if_not_quiet (StyleGuideLinterCachePopulate
+                                       STYLE_GUIDE_LINT_POP_CACHE_EXECUTABLE
+                                       ${POPULATE_CACHE_EXECUTABLE_MSG})
+
+    psq_check_and_report_tool_version (StyleGuideLinterCachePopulate
+                                       "latest"
+                                       REQUIRED_VARS
+                                       STYLE_GUIDE_LINT_POP_CACHE_EXECUTABLE)
+
+    set (SPELLCHECK_EXECUTABLE_NAME STYLE_GUIDE_LINT_SPELLCHECK_EXECUTABLE)
+    _style_guide_linter_not_found_msg ("${${SPELLCHECK_EXECUTABLE_NAME}}"
+                                       STYLE_GUIDE_LINT_EXECUTABLE_MSG)
     psq_report_not_found_if_not_quiet (SpellingLinter
                                        STYLE_GUIDE_LINT_SPELLCHECK_EXECUTABLE
-                                       "The 'spellcheck-linter' "
-                                       "executable was not found "
-                                       "in any search or system paths.\n.."
-                                       "Please adjust "
-                                       "STYLE_GUIDE_LINT_SEARCH_PATHS "
-                                       "to the installation prefix of the"
-                                       "'spellcheck-linter'\n.. "
-                                       "executable or install"
-                                       "spellcheck-linter")
+                                       ${SPELLCHECK_EXECUTABLE_MSG})

     psq_check_and_report_tool_version (SpellingLinter
                                        "latest"
                                        REQUIRED_VARS
                                        STYLE_GUIDE_LINT_SPELLCHECK_EXECUTABLE)
-

     set (STYLE_GUIDE_LINT_FOUND # NOLINT:style/set_var_case
          ${StyleGuideLinter_FOUND}


Pass ExternalData_OBJECT_STORES to SimpleITK sub-project

Change-Id: I46d8ce0abef606c85ad65437ee8a1c0a605c9e9c

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -383,6 +383,7 @@
   endif()
 endforeach()

+list(APPEND SimpleITK_VARS ExternalData_OBJECT_STORES)

 VariableListToCache( SimpleITK_VARS  ep_simpleitk_cache )
 VariableListToArgs( SimpleITK_VARS  ep_simpleitk_args )


Removing deleted source files material_editor_dialog_wx.cpp/.h from build.

https://tracker.physiomeproject.org/show_bug.cgi?id=2648

--- source/cmake/interfaces_source_files.cmake
+++ source/cmake/interfaces_source_files.cmake
@@ -65,10 +65,8 @@

 	IF(  ${GRAPHICS_API} MATCHES OPENGL_GRAPHICS )
 		SET( MATERIAL_INTERFACE_SRCS
-			source/material/material_editor_dialog_wx.cpp
 			source/material/material_editor_wx.cpp )
 		SET( MATERIAL_INTERFACE_HDRS
-			source/material/material_editor_dialog_wx.h
 			source/material/material_editor_wx.h )
 	ENDIF(  ${GRAPHICS_API} MATCHES OPENGL_GRAPHICS )


Fine then.

Fine then.

--- cmake-scripts/Findwxwidgets3.cmake
+++ cmake-scripts/Findwxwidgets3.cmake
@@ -46,15 +46,23 @@
     SET(WXWIDGETS_LIBRARY "")

     EXECUTE_PROCESS(
-        COMMAND ${WX_CONFIG} "--cxxflags" "--libs"
-        OUTPUT_VARIABLE WX_OPTS
+        COMMAND ${WX_CONFIG} "--cxxflags"
+        OUTPUT_VARIABLE WX_INC_OPTS
     )

-    STRING(REGEX REPLACE "(\r?\n)+$" "" WX_OPTS "${WX_OPTS}")
+    EXECUTE_PROCESS(
+        COMMAND ${WX_CONFIG} "--libs"
+        OUTPUT_VARIABLE WX_LIB_OPTS
+    )

-    IF(WX_OPTS)
+    STRING(REGEX REPLACE "(\r?\n)+$" "" WX_LIB_OPTS "${WX_LIB_OPTS}")
+    STRING(REGEX REPLACE "(\r?\n)+$" "" WX_INC_OPTS "${WX_INC_OPTS}")
+
+    IF(WX_INC_OPTS AND WX_LIB_OPTS)
         SET(WXWIDGETS_FOUND TRUE)
-    ENDIF(WX_OPTS)
+    ENDIF(WX_INC_OPTS AND WX_LIB_OPTS)
+
+    SET(WX_OPTS "${WX_LIB_OPTS} ${WX_INC_OPTS}")
 ENDIF(MINGW)

 IF(WXWIDGETS_FOUND)


Bumped hardcoded fallback version

Bumped hardcoded fallback version

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set(hardcoded_tomviz_version "0.7.2")
+set(hardcoded_tomviz_version "0.8.0")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


- Fix oopsie in install path

- Fix oopsie in install path

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -225,7 +225,7 @@
             )
             install(
                 DIRECTORY
-                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bin/${TARGET}.bundle
+                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}.bundle

                 DESTINATION
                 bin


project.properties file generation fixed for per-component installation.

--- cmake/OpenCVDetectAndroidSDK.cmake
+++ cmake/OpenCVDetectAndroidSDK.cmake
@@ -365,7 +365,7 @@
       endif()
       install(CODE "EXECUTE_PROCESS(COMMAND ${ANDROID_EXECUTABLE} --silent update project --path . --target \"${android_proj_sdk_target}\" --name \"${target}\" ${inst_lib_opt}
                                     WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}\"
-                                   )"  COMPONENT dev)
+                                   )"  COMPONENT samples)
       #empty 'gen'
       install(CODE "MAKE_DIRECTORY(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}/gen\")" COMPONENT samples)
     endif()


.so priority over .a.

.so priority over .a.

--- cmake/modules/FindHttpParser.cmake
+++ cmake/modules/FindHttpParser.cmake
@@ -26,7 +26,7 @@
   HINTS ${_HTTP_PARSER_ROOT_HINTS_AND_PATHS}
   PATH_SUFFIXES include)
 find_library(HTTP_PARSER_LIBRARY
-  NAMES http_parser libhttp_parser
+  NAMES libhttp_parser.so http_parser libhttp_parser
   HINTS ${_HTTP_PARSER_ROOT_HINTS_AND_PATHS}
   PATH_SUFFIXES lib lib64)
 find_package_handle_standard_args(HttpParser "Could NOT find http-parser, try to set the path to the http-parser root folder in the system variable HTTP_PARSER_ROOT_DIR"


CMake: use VERBATIM for add_custom_command

This improves the escaping behaviour of CMake.
Taken from the unofficial Arch Linux package:

https://aur4.archlinux.org/packages/ball

--- cmake/BALLMacros.cmake
+++ cmake/BALLMacros.cmake
@@ -26,7 +26,7 @@
     ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
       COMMAND ${QT_UIC_EXECUTABLE}
       ARGS ${ui_options} -o ${outfile} ${infile}
-      MAIN_DEPENDENCY ${infile})
+      MAIN_DEPENDENCY ${infile} VERBATIM)
     SET(${outfiles} ${${outfiles}} ${outfile})
   ENDFOREACH (it)
 ENDMACRO (QT4_WRAP_UI_BALL)


Remove BuildFlags.cmake.

Remove BuildFlags.cmake.

--- cmake/BuildFlags.cmake
+++ cmake/BuildFlags.cmake
@@ -1,86 +0,0 @@
-#if (MSVC AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
-
-  # Final flags are Common + build-specific flags (e.g., Release, Debug)
-
-  # '*' indicates CMake default option
-  # '+' indicates default compiler behavior
-
-  #================#
-  # Compiler flags #
-  #================#
-
-  #set(CompileCommon
-  #   /DWIN32     #*
-  # # /D_WINDOWS  #*
-  #   /D_CONSOLE  #
-  #   /DINCNE     # CSE-specific
-  #   /W3         #*Warning level
-  #   /GR         #*Enable Run-Time Type Information TODO: keep?
-  #   /EHsc       #*Specifies the model of exception handling (sc options).
-  #   /nologo     # Suppresses display of sign-on banner.
-  #   /fp:precise #+Specifies floating-point behavior.
-  #   /fp:except- # Specifies floating-point behavior.
-  #   /arch:IA32  # Specifies the architecture for code generation (no special instructions).
-  #)
-  #string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CompileCommon}")
-
-  # set(CompileRelease
-  # # /DNDEBUG    #* TODO: Add back?
-  # # /MD         #*Creates a multithreaded DLL using MSVCRT.lib.
-  #   /MT         # Creates a multithreaded executable file using LIBCMT.lib.
-  #   /GF         # Enables string pooling.
-  #   /GL         # Enables whole program optimization.
-  #   /Gy         # Enables function-level linking.
-  # # /O2         #*Creates fast code.
-  # # /Ob2        #*Controls inline expansion (level 2).
-  #   /Oi         # Generates intrinsic functions.
-  #   /Ot         # Favors fast code.
-  #   /Ox         # Uses maximum optimization (/Ob2gity /Gs).
-  #   /Oy         # Omits frame pointer (x86 only).
-  #   /Gd         # Uses the __cdecl calling convention (x86 only).
-  #   /Zi         #*Generates complete debugging information.
-  #   /GS-        # Buffers security check.
-  #   /MP         # Compiles multiple source files by using multiple processes.
-  # )
-#  string(REPLACE ";" " " CMAKE_CXX_FLAGS_RELEASE "${CompileRelease}")
-
-  # set(CompileDebug
-  #   /D_DEBUG    #*
-  # # /MDd        #*Creates a debug multithreaded DLL using MSVCRT.lib.
-  #   /MTd        # Creates a debug multithreaded executable file using LIBCMTD.lib.
-  #   /Zi         #*Generates complete debugging information.
-  # # /Ob0        #*Controls inline expansion (level 0 -- disabled).
-  #   /Od         #*Disables optimization.
-  #   /RTC1       #*Enables run-time error checking.
-  # )
-  # string(REPLACE ";" " " CMAKE_CXX_FLAGS_DEBUG "${CompileDebug}")
-
-  #==============#
-  # Linker flags #
-  #==============#
-
-#   set(LinkCommon
-#     /NOLOGO     # Suppresses the startup banner.
-#     /DYNAMICBASE#Specifies whether to generate an executable image that can be randomly rebased at load time by using the address space layout randomization (ASLR) feature.
-#     /MACHINE:X86 # Specifies the target platform.
-#   )
-#   string(REPLACE ";" " " CMAKE_EXE_LINKER_FLAGS "${LinkCommon}")
-
-#   set(LinkRelease
-#     /LTCG       # Specifies link-time code generation.
-#     /DEBUG	    # Creates debugging information.
-#     /MAP        # Creates a mapfile.
-#     /INCREMENTAL:NO # Controls incremental linking.
-#   )
-#   string(REPLACE ";" " " CMAKE_EXE_LINKER_FLAGS_RELEASE "${LinkRelease}")
-
-#   set(LinkDebug
-#     /DEBUG	    # Creates debugging information.
-#     /MAP        # Creates a mapfile.
-#     /INCREMENTAL # Controls incremental linking.
-#   )
-#   string(REPLACE ";" " " CMAKE_EXE_LINKER_FLAGS_DEBUG "${LinkDebug}")
-
-
-
-# endif()


WASAPI: use `check_include_file` instead of 'find_path` in CMake

# Current issue:

When attempting to compile under MSVC (#49), CMake can't find the WASAPI headers. I'm running Windows 10, Visual Studio Community 2015, and the latest SDK.

# Proposed fix:

Use `check_include_file` instead of `find_path`, which seems more semantically correct anyways.

--- cmake/FindWASAPI.cmake
+++ cmake/FindWASAPI.cmake
@@ -3,13 +3,13 @@
 # See http://opensource.org/licenses/MIT

 # WASAPI_FOUND
-# WASAPI_INCLUDE_DIR
+# AUDIOCLIENT_H

 if (WIN32)
-    find_path(WASAPI_INCLUDE_DIR NAMES audioclient.h)
+  include(CheckIncludeFile)
+  check_include_file(audioclient.h AUDIOCLIENT_H)
 endif()

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WASAPI DEFAULT_MSG WASAPI_INCLUDE_DIR)
-
-mark_as_advanced(WASAPI_INCLUDE_DIR)
+find_package_handle_standard_args(WASAPI DEFAULT_MSG AUDIOCLIENT_H)
+mark_as_advanced(AUDIOCLIENT_H)


doc: Update CMake BASIS URLs

doc: Update CMake BASIS URLs

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -27,7 +27,7 @@
 # have to be specified here such that the top-level IRTK project can analyze the
 # inter-module dependencies, as well as dependencies on third-party libraries.
 #
-# @sa http://opensource.andreasschuh.com/cmake-basis/standard/modules.html
+# @sa https://cmake-basis.github.io/standard/modules.html
 #
 # @ingroup BasisSettings
 ################################################################################


Add example to find library dependencies to configure script

--- template-config.cmake
+++ template-config.cmake
@@ -3,6 +3,11 @@
 # or from an install location.
 #
 # Please adjust the list of submodules to search for.
+
+
+# Find depencencies
+include(CMakeFindDependencyMacro)
+#find_dependency(glm)

 # List of modules
@@ -40,6 +45,7 @@
     return()
 endif()

+
 # Try common build locations
 if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
     find_modules("build-debug/cmake")
@@ -49,5 +55,6 @@
     find_modules("build-debug/cmake")
 endif()

+
 # Signal success/failure to CMake
 set(template_FOUND ${MODULE_FOUND})


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

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

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -16,6 +16,7 @@
 Name[de]=GStreamer
 Name[en_GB]=GStreamer
 Name[es]=GStreamer
+Name[eu]=GStreamer
 Name[fi]=GStreamer
 Name[fr]=GStreamer
 Name[gl]=GStreamer
@@ -45,6 +46,7 @@
 Comment[de]=Phonon-Treiber für GStreamer
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon
+Comment[eu]=Phonon GStreamer bizkarraldekoa
 Comment[fi]=Phonon GStreamer -taustajärjestelmä
 Comment[fr]=Moteur GStreamer pour Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon


fix openblas / openMP problem

fix openblas / openMP problem

--- include/pass_bits/config.hpp.cmake
+++ include/pass_bits/config.hpp.cmake
@@ -2,7 +2,6 @@

 // Armadillo
 #define ARMA_DONT_PRINT_ERRORS
-#define ARMA_USE_BLAS
 #define ARMA_USE_CXX11
 #include <armadillo>
 #include <cblas.h>


update cmake.

update cmake.

--- cmake-scripts/FindFlatbuffers.cmake
+++ cmake-scripts/FindFlatbuffers.cmake
@@ -1,5 +1,6 @@
 # Find flatbuffers
 #
+#  FLATBUFFERS_FLATC       - flatc.
 #  FLATBUFFERS_INCLUDE_DIR - where to find flatbuffers/*.
 #  FLATBUFFERS_LIBRARY     - List of libraries when using flatbuffers.
 #  FLATBUFFERS_FOUND       - True if flatbuffers found.
@@ -12,12 +13,13 @@
   set(FLATBUFFERS_FIND_QUIETLY TRUE)
 endif()

+find_program(FLATBUFFERS_FLATC flatc PATHS ${PROJECT_BINARY_DIR}/flatbuffers/flatbuffers/bin)
 find_path(FLATBUFFERS_INCLUDE_DIR flatbuffers/flatbuffers.h PATHS ${PROJECT_BINARY_DIR}/flatbuffers/flatbuffers/include)
 find_library(FLATBUFFERS_LIBRARY flatbuffers PATHS ${PROJECT_BINARY_DIR}/flatbuffers/flatbuffers/lib)

 # handle the QUIETLY and REQUIRED arguments and set FLATBUFFERS_FOUND to TRUE
 # if all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(FLATBUFFERS DEFAULT_MSG FLATBUFFERS_LIBRARY FLATBUFFERS_INCLUDE_DIR)
+find_package_handle_standard_args(FLATBUFFERS DEFAULT_MSG FLATBUFFERS_LIBRARY FLATBUFFERS_INCLUDE_DIR FLATBUFFERS_FLATC)

-mark_as_advanced(FLATBUFFERS_LIBRARY FLATBUFFERS_INCLUDE_DIR)
+mark_as_advanced(FLATBUFFERS_LIBRARY FLATBUFFERS_INCLUDE_DIR FLATBUFFERS_FLATC)


mark helper variables as advanced

mark helper variables as advanced

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -33,6 +33,7 @@
       elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
          get_filename_component(_vendor_id "[HKEY_LOCAL_MACHINE\\Hardware\\Description\\System\\CentralProcessor\\0;VendorIdentifier]" NAME CACHE)
          get_filename_component(_cpu_id "[HKEY_LOCAL_MACHINE\\Hardware\\Description\\System\\CentralProcessor\\0;Identifier]" NAME CACHE)
+         mark_as_advanced(_vendor_id _cpu_id)
          string(REGEX REPLACE ".* Family ([0-9]+) .*" "\\1" _cpu_family "${_cpu_id}")
          string(REGEX REPLACE ".* Model ([0-9]+) .*" "\\1" _cpu_model "${_cpu_id}")
       endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")


Qt 5.10 OSX: Add QuartzCore dependency

Qt 5.10 OSX: Add QuartzCore dependency

--- cmake/Qt5Gui_ZZZ_HunterPlugin.cmake
+++ cmake/Qt5Gui_ZZZ_HunterPlugin.cmake
@@ -157,6 +157,10 @@
       "${_qt_install_prefix}/lib/lib${_qt_platform_support_name}.a"
       "${_qt_install_prefix}/lib/lib${_qt_platform_support_name}_debug.a"
   )
+
+  if(NOT Qt5Core_VERSION VERSION_LESS 5.10)
+    _qt_cmake_extra_helpers_add_interface(Qt5::QCocoaIntegrationPlugin "-framework QuartzCore")
+  endif()

   if(NOT Qt5Core_VERSION VERSION_LESS 5.9)
     # _png_create_info_struct


Force incremental linking to be off for MSVC. Whilst I'm here copy
the stacksize flag used in the Python building system.

This was an effort to try and stop the Visual Studio build from emitting
the error message

```
70>LINK : fatal error LNK1104: cannot open file
'C:\Users\dan\dev\z3-1\build_console\Debug\z3.ilk'
```

Unfortunately this has not fixed the issue.

--- cmake/compiler_flags_override.cmake
+++ cmake/compiler_flags_override.cmake
@@ -23,6 +23,14 @@
   set(CMAKE_${_lang}_FLAGS_MINSIZEREL_INIT     "/MT /O1 /Ob1")
   set(CMAKE_${_lang}_FLAGS_RELEASE_INIT        "/MT /O2 /Ob2")
   set(CMAKE_${_lang}_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1")
+  # Override linker flags (see Windows-MSVC.cmake for CMake's defaults)
+  # The stack size comes from the Python build system.
+  set(_msvc_stack_size "8388608")
+  set(CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /INCREMENTAL:NO /STACK:${_msvc_stack_size}")
+  set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /INCREMENTAL:NO /STACK:${_msvc_stack_size}")
+  set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO /STACK:${_msvc_stack_size}")
+  set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO /STACK:${_msvc_stack_size}")
+  unset(_msvc_stack_size)
 else()
   message(FATAL_ERROR "Overrides not set for ${_lang} compiler \"${CMAKE_${_lang}_COMPILER_ID}\"")
 endif()


Bug 781833 - Do not set '-Wl,--no-undefined' on BSD

--- cmake/modules/SetupBuildFlags.cmake
+++ cmake/modules/SetupBuildFlags.cmake
@@ -77,9 +77,9 @@
 		endforeach()
 	endif(CMAKE_CXX_COMPILER_ID)

-	if(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU"))
+	if(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD"))
 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
 		set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
 		set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
-	endif(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU"))
+	endif(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD"))
 endmacro()


uselib: Disable ASSUME_SYSTEM_INCLUDE option when gcc version >= 6.0

This option sets -isystem gcc flag instead of -I to silence warnings
coming from external libraries.

Warning silence is only a side-effect of -isystem flag, using it
breaks cross compilation since #include_next directive addition in gcc
6.0.0.

To be able to build NAOqi with gcc>=6.0 we need to disable this option.

see:
https://stackoverflow.com/questions/37218953/isystem-on-a-system-include-directory-causes-errors

Change-Id: I2780810373b1e4a6b7bf04c32215f86d5bc3f728

--- cmake/qibuild/internal/uselib.cmake
+++ cmake/qibuild/internal/uselib.cmake
@@ -266,8 +266,8 @@
   endforeach()

   foreach(_inc_dir ${_inc_dirs})
-    if(${ARG_ASSUME_SYSTEM_INCLUDE})
-      include_directories(SYSTEM ${_inc_dir})
+    if((${ARG_ASSUME_SYSTEM_INCLUDE}) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0"))
+        include_directories(SYSTEM ${_inc_dir})
     else()
       include_directories(${_inc_dir})
     endif()


Fix HAVE_POSIX_FALLOCATE entry.

Fix HAVE_POSIX_FALLOCATE entry.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -178,6 +178,9 @@

 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 #cmakedefine HAVE_NDIR_H ${HAVE_NDIR_H}
+
+/* Define to 1 if you have the `posix_fallocate' function. */
+#cmakedefine HAVE_POSIX_FALLOCATE ${HAVE_POSIX_FALLOCATE}

 /* Define to 1 if you have the `posix_spawn' function. */
 #cmakedefine HAVE_POSIX_SPAWN ${HAVE_POSIX_SPAWN}
@@ -537,6 +540,4 @@
 /* Define to 1 if you have the `_chsize_s' function. */
 #cmakedefine HAVE__CHSIZE_S ${HAVE__CHSIZE_S}

-#cmakedefine HAVE_POSIX_FALLOCATE ${HAVE_POSIX_FALLOCATE}
-
 #endif


SuperBuild: fix up curl install prefix for x86 and x64

--- SuperBuild/CMake/External_curl.cmake
+++ SuperBuild/CMake/External_curl.cmake
@@ -9,8 +9,25 @@
   ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL)
 endif()

-#TODO: add openssl and other dependencies
+
 if(MSVC)
+
+if(NOT BUILD_SHARED_LIBS)
+  message(FATAL_ERROR "static build or curl not supported")
+endif()
+
+if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "amd64" OR
+    "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64" )
+  set(CURL_INSTALL_DIR_PREFIX "libcurl-vc-x64")
+else()
+  set(CURL_INSTALL_DIR_PREFIX "libcurl-vc-x86")
+endif()
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+  set(CURL_INSTALL_DIR_PREFIX "${CURL_INSTALL_DIR_PREFIX}-release")
+else()
+  set(CURL_INSTALL_DIR_PREFIX "${CURL_INSTALL_DIR_PREFIX}-debug")
+endif()
+
   ExternalProject_Add(CURL
     PREFIX CURL
     URL "http://curl.haxx.se/download/curl-7.40.0.tar.gz"
@@ -23,7 +40,8 @@
     PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CURL_SB_SRC} ${CURL_SB_BUILD_DIR}
     CONFIGURE_COMMAND ""
     BUILD_COMMAND nmake /f ${CURL_SB_BUILD_DIR}/winbuild/Makefile.vc mode=dll WITH_ZLIB=dll WITH_DEVEL=${SB_INSTALL_PREFIX}
-    INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${CURL_SB_BUILD_DIR}/builds/ ${CMAKE_COMMAND} -E copy_directory libcurl-vc-x86-release-dll-zlib-dll-ipv6-sspi-winssl ${SB_INSTALL_PREFIX}
+    INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
+    ${CURL_SB_BUILD_DIR}/builds/${CURL_INSTALL_DIR_PREFIX}-dll-zlib-dll-ipv6-sspi-winssl/ ${SB_INSTALL_PREFIX}
     )

 else(UNIX)


ENH: DTIProcess had an invalid xml file.

--- SuperBuild/External_DTIProcess.cmake
+++ SuperBuild/External_DTIProcess.cmake
@@ -3,7 +3,7 @@

 ExternalProject_Add(DTIProcess
   SVN_REPOSITORY "https://www.nitrc.org/svn/dtiprocess/trunk"
-  SVN_REVISION -r "171"
+  SVN_REVISION -r "174"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
   SOURCE_DIR DTIProcess


Use earlier FetchContent pattern to support earlier cmake version

--- thirdparty/fltk.cmake
+++ thirdparty/fltk.cmake
@@ -1,5 +1,5 @@
 # FLTK library
-cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.11 FATAL_ERROR)

 include(FetchContent)

@@ -8,5 +8,8 @@
   GIT_REPOSITORY "https://github.com/fltk/fltk"
 )

-FetchContent_MakeAvailable(
-  fltk)
+FetchContent_GetProperties(fltk)
+if (NOT fltk_POPULATED)
+    FetchContent_Populate(fltk)
+    add_subdirectory(${fltk_SOURCE_DIR} ${fltk_BINARY_DIR})
+endif()


Fix broken test for CMake "-NOTFOUND" string

Former-commit-id: c2ac24013a551f1b7a4807a6253418a6fb804edf

--- halide.cmake
+++ halide.cmake
@@ -331,11 +331,11 @@
 # Given the target of a static library, return the path to the actual .a file
 function(_halide_get_static_library_actual_path TARGET OUTVAR)
   get_target_property(DIR ${TARGET} LIBRARY_OUTPUT_DIRECTORY)
-  if (NOT "${DIR}")
+  if (DIR)
+    set(DIR "${DIR}/")
+  else()
     # Set to empty string since it could be "DIR-NOTFOUND"
     set(DIR "")
-  else()
-    set(DIR "${DIR}/")
   endif()
   set(${OUTVAR} "${DIR}${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
 endfunction()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2010)

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

 # 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

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Include CoreCmdApps in WorkbenchRelease configuration

- FileConverter
- ImageTypeConverter

--- CMake/BuildConfigurations/WorkbenchRelease.cmake
+++ CMake/BuildConfigurations/WorkbenchRelease.cmake
@@ -16,6 +16,10 @@
   org.mitk.gui.qt.matchpoint.manipulator
 )

+if(NOT MITK_USE_SUPERBUILD)
+  set(BUILD_CoreCmdApps ON CACHE BOOL "" FORCE)
+endif()
+
 set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)

 find_package(Doxygen REQUIRED)


Provide an empty add_feature_info for older cmake versions

--- MarbleMacros.cmake
+++ MarbleMacros.cmake
@@ -248,3 +248,12 @@
    endif (WITH_${_name})
 endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
 endif()
+
+# older cmake version don't have the add_feature_info macro.
+# It's just informative, so we add our own that does
+# nothing in that case
+if(NOT COMMAND ADD_FEATURE_INFO)
+macro(ADD_FEATURE_INFO)
+  # just ignore it
+endmacro()
+endif()


Remove sha for source package

Remove sha for source package

This is now done outside of this makefile.

--- build/Package.cmake
+++ build/Package.cmake
@@ -28,15 +28,3 @@
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_source")

 include(CPack)
-
-find_program(SHA1SUM_COMMAND sha1sum)
-if(NOT SHA1SUM_COMMAND)
-	message(WARNING "Cannot find sha1sum command")
-else()
-	add_custom_target(package_source_sha
-		COMMAND $(MAKE) package_source
-		COMMAND sha1sum ${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_source.tar.gz > ${CMAKE_BINARY_DIR}/${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_source.tar.gz.sha1.txt
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Build source package" VERBATIM
-	)
-endif()


remove obsolete comment

remove obsolete comment

see previous commit

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -33,7 +33,6 @@
   endforeach()
 endmacro(simLibCheck)

-# not sure how simmodsuite will work within tribits - ignore for now
 set(SIMMODSUITE_LIBS "")
 set(SIM_LIB_NAMES
   SimPartitionedMesh-mpi


Update to binaryen 1.38.9

Update to binaryen 1.38.9

--- cmake/ProjectBinaryen.cmake
+++ cmake/ProjectBinaryen.cmake
@@ -38,12 +38,12 @@

 ExternalProject_Add(binaryen
     PREFIX ${prefix}
-    DOWNLOAD_NAME binaryen-1.37.35.tar.gz
+    DOWNLOAD_NAME binaryen-1.38.9.tar.gz
     DOWNLOAD_DIR ${prefix}/downloads
     SOURCE_DIR ${source_dir}
     BINARY_DIR ${binary_dir}
-    URL https://github.com/WebAssembly/binaryen/archive/1.37.35.tar.gz
-    URL_HASH SHA256=19439e41dc576446eaae0c4a8e07d4cd4c40aea7dfb0a6475b925686852f8006
+    URL https://github.com/WebAssembly/binaryen/archive/1.38.9.tar.gz
+    URL_HASH SHA256=f8c6d4deb83dba8709c4df9f7983080ec0f9412e88899767ed2815b911ce1ebd
     CMAKE_ARGS
     -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     -DCMAKE_BUILD_TYPE=Release


cmake: move shield board/conf handling

cmake: move shield board/conf handling

Move handling for shield boards/board.overlay, shield.conf and
boards/board.conf inside the SHIELD_LIST check.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -309,35 +309,35 @@
           shield_dts_fixups
           ${shield_dir}/${s}/dts_fixup.h
         )
+
+        # search for shield/boards/board.overlay file
+        if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.overlay)
+          # add shield/board overlay to the shield overlays list
+          list(APPEND
+            shield_dts_files
+            ${shield_dir}/${s}/boards/${BOARD}.overlay
+          )
+        endif()
+
+        # search for shield/shield.conf file
+        if(EXISTS ${shield_dir}/${s}/${s}.conf)
+          # add shield.conf to the shield config list
+          list(APPEND
+            shield_conf_files
+            ${shield_dir}/${s}/${s}.conf
+          )
+        endif()
+
+        # search for shield/boards/board.conf file
+        if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.conf)
+          # add HW specific board.conf to the shield config list
+          list(APPEND
+            shield_conf_files
+            ${shield_dir}/${s}/boards/${BOARD}.conf
+          )
+        endif()
       else()
         list(APPEND NOT_FOUND_SHIELD_LIST ${s})
-      endif()
-
-      # search for shield/boards/board.overlay file
-      if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.overlay)
-        # add shield/board overlay to the shield overlays list
-        list(APPEND
-          shield_dts_files
-          ${shield_dir}/${s}/boards/${BOARD}.overlay
-        )
-      endif()
-
-      # search for shield/shield.conf file
-      if(EXISTS ${shield_dir}/${s}/${s}.conf)
-        # add shield.conf to the shield config list
-        list(APPEND
-          shield_conf_files
-          ${shield_dir}/${s}/${s}.conf
-        )
-      endif()
-
-      # search for shield/boards/board.conf file
-      if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.conf)
-        # add HW specific board.conf to the shield config list
-        list(APPEND
-          shield_conf_files
-          ${shield_dir}/${s}/boards/${BOARD}.conf
-        )
       endif()
     endforeach()
   endif()


Update default config

Update default config

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -17,6 +17,7 @@
 hunter_config(Comet VERSION 4.0.1)
 hunter_config(CppNetlib VERSION 0.10.1-hunter-3)
 hunter_config(CppNetlibUri VERSION 1.0.4-hunter)
+hunter_config(Eigen VERSION 3.2.4)
 hunter_config(Expat VERSION 2.1.0)
 hunter_config(GPUImage VERSION 0.1.6-hunter-1)
 hunter_config(GSL VERSION 1.16)
@@ -30,6 +31,7 @@
 hunter_config(Libcxx VERSION 3.5.0)
 hunter_config(Libcxxabi VERSION 3.5.0)
 hunter_config(Libssh2 VERSION 1.4.4-patch-2)
+hunter_config(OpenCV VERSION 2.4.11)
 hunter_config(OpenSSL VERSION 1.0.2a)
 hunter_config(PNG VERSION 1.6.16-patch-4)
 hunter_config(RapidJSON VERSION 0.11-hunter)


Apply NGRAPH_TARGET_ARCH to mkldnn build also. (#2135)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -114,6 +114,7 @@
             -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
             -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
             -DMKLROOT=${MKL_ROOT}
+            "-DARCH_OPT_FLAGS=-march=${NGRAPH_TARGET_ARCH} -mtune=${NGRAPH_TARGET_ARCH}"
         TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/tmp"
         STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/stamp"
         DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/download"
@@ -145,6 +146,7 @@
             -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
             -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
             -DMKLROOT=${MKL_ROOT}
+            "-DARCH_OPT_FLAGS=-march=${NGRAPH_TARGET_ARCH} -mtune=${NGRAPH_TARGET_ARCH}"
         TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/tmp"
         STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/stamp"
         DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/download"


fix up Ubuntu build

fix up Ubuntu build

This change fixes the linkage issue.  We need to get the GitHub
CMake setup to populate the CLANG_USED_LIBS instead of using
CLANG_ALL_LIBS.

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -61,15 +61,15 @@
         llvm_add_library(${name} ${libkind} ${srcs} LINK_LIBS
                                 -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group
                                 -Wl,--start-group ${SWIFT_ALL_LIBS} -Wl,--end-group
-                                -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group
+                                -Wl,--start-group ${CLANG_ALL_LIBS} -Wl,--end-group
           )
       else()
         llvm_add_library(${name} ${libkind} ${srcs} LINK_LIBS
-                                ${LLDB_USED_LIBS} ${SWIFT_ALL_LIBS} ${CLANG_USED_LIBS}
+                                ${LLDB_USED_LIBS} ${SWIFT_ALL_LIBS} ${CLANG_ALL_LIBS}
           )
       endif()
     else()
-      llvm_add_library(${name} ${libking} ${srcs})
+        llvm_add_library(${name} ${libkind} ${srcs})
     endif()

     if (${name} STREQUAL "liblldb")


Avoid using the recently added APPEND_STRING feature. This should
restore support for CMake versions before 2.8.6 -- sorry for the
trouble!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -181,17 +181,19 @@

   include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
   set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
-  if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
-    set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-rtti")
-  elseif (MSVC)
-    set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " /GR-")
-  endif ()
-
   if (NOT LLVM_ENABLE_THREADS)
     set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0)
   endif ()

+  get_property(target_compile_flags TARGET ${test_name} PROPERTY COMPILE_FLAGS)
+  if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+    set(target_compile_flags "${target_compile_flags} -fno-rtti")
+  elseif (MSVC)
+    set(target_compile_flags "${target_compile_flags} /GR-")
+  endif ()
+
   if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
-    set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-variadic-macros")
+    set(target_compile_flags "${target_compile_flags} -Wno-variadic-macros")
   endif ()
+  set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}")
 endfunction()


Improve package file name

Improve package file name

Strip the minor number if 0 and always add the build type and lua
version in the file name.

--- build/Package.cmake
+++ build/Package.cmake
@@ -8,19 +8,19 @@
 set(CPACK_PACKAGE_RELOCATABLE FALSE)
 set(CPACK_PACKAGE_NAME "haka")
 set(CPACK_PACKAGE_VENDOR "Arkoon Network Security")
-set(CPACK_PACKAGE_VERSION "${HAKA_VERSION_MAJOR}.${HAKA_VERSION_MINOR}.${HAKA_VERSION_PATCH}${HAKA_VERSION_BUILD}")
 set(CPACK_PACKAGE_VERSION_MAJOR ${HAKA_VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${HAKA_VERSION_MINOR})
 set(CPACK_PACKAGE_VERSION_PATCH ${HAKA_VERSION_PATCH})

-if(HAKA_VERSION_BUILD STREQUAL "")
-	set(CPACK_PACKAGE_FULLNAME "${CPACK_PACKAGE_NAME}")
+if(${HAKA_VERSION_PATCH} GREATER 0)
+	set(CPACK_PACKAGE_VERSION "${HAKA_VERSION_MAJOR}.${HAKA_VERSION_MINOR}.${HAKA_VERSION_PATCH}${HAKA_VERSION_BUILD}")
 else()
-	string(TOLOWER ${CMAKE_BUILD_TYPE} build)
-	set(CPACK_PACKAGE_FULLNAME "${CPACK_PACKAGE_NAME}-${build}-${CMAKE_LUA}")
+	set(CPACK_PACKAGE_VERSION "${HAKA_VERSION_MAJOR}.${HAKA_VERSION_MINOR}${HAKA_VERSION_BUILD}")
 endif()

-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FULLNAME}_${CPACK_PACKAGE_VERSION}")
+string(TOLOWER ${CMAKE_BUILD_TYPE} build)
+set(CPACK_PACKAGE_FULLNAME "${CPACK_PACKAGE_NAME}-${build}-${CMAKE_LUA}")
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FULLNAME}_${CPACK_PACKAGE_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")

 # Sources
 set(CPACK_SOURCE_GENERATOR "TGZ")


scipy: Upgraded to 0.14.0

scipy: Upgraded to 0.14.0

--- scipy.cmake
+++ scipy.cmake
@@ -17,10 +17,10 @@
 include (blas)

 external_source (scipy
-    0.11.0
-    scipy-0.11.0.tar.gz
-    842c81d35fd63579c41a8ca21a2419b9
-    http://downloads.sourceforge.net/project/scipy/scipy/0.11.0/scipy-0.11.0.tar.gz)
+    0.14.0
+    scipy-0.14.0.tar.gz
+    d7c7f4ccf8b07b08d6fe49d5cd51f85d
+    https://pypi.python.org/packages/source/s/scipy)

 # Select FORTRAN ABI
 if (Fortran_COMPILER_NAME STREQUAL "gfortran")


do not add any compile flags globally

do not add any compile flags globally

This gives opportunity for 3rd parties to remove some default compiler
flags before calling add_compile_options.

--- build_options.cmake
+++ build_options.cmake
@@ -56,15 +56,6 @@
     endforeach()
 endfunction()

-TNUN_add_compile_options( Debug ${TNUN_compiler_debug_flags} ${TNUN_compiler_debug_symbols} )
-TNUN_add_compile_options( Release ${TNUN_compiler_release_flags} )
-
-option( TNUN_DEBUG_SYMBOLS_IN_RELEASE "Generate debug symbols for easier debugging of release builds" false )
-if ( ${TNUN_DEBUG_SYMBOLS_IN_RELEASE} )
-    TNUN_add_compile_options( Release ${TNUN_compiler_debug_symbols} )
-endif()
-
-
 ################################################################################
 #
 # add_link_options()
@@ -82,10 +73,3 @@
         link_libraries( $<$<CONFIG:${configuration}>:${arg}> )
     endforeach()
 endfunction()
-
-TNUN_add_link_options( Debug ${TNUN_linker_debug_flags} )
-TNUN_add_link_options( Release ${TNUN_linker_release_flags} )
-
-if ( ${TNUN_DEBUG_SYMBOLS_IN_RELEASE} )
-    TNUN_add_link_options   ( Release ${TNUN_linker_debug_symbols} )
-endif()


Try abi tag without eol

Try abi tag without eol

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -35,16 +35,8 @@
       "v0"
       CACHE STRING "ABI tag for libatframe_utils.")
 endif()
-set(LIBATFRAME_UTILS_NAMESPACE_BEGIN
-    "  \\
-namespace util { \\
-inline namespace ${LIBATFRAME_UTILS_ABI_TAG} {
-")
-set(LIBATFRAME_UTILS_NAMESPACE_END
-    "  \\
-}  /* ${LIBATFRAME_UTILS_ABI_TAG} */ \\
-}  /* util */
-")
+set(LIBATFRAME_UTILS_NAMESPACE_BEGIN "namespace util { inline namespace ${LIBATFRAME_UTILS_ABI_TAG} {")
+set(LIBATFRAME_UTILS_NAMESPACE_END "} }")

 cmake_dependent_option(LIBUNWIND_ENABLED "Enable using libunwind." ON "NOT WIN32;NOT MINGW;NOT CYGWIN" OFF)
 option(LOG_WRAPPER_ENABLE_LUA_SUPPORT "Enable lua support." ON)


adding Parasolid support to nightly builds

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -128,6 +128,7 @@
   "-DENABLE_MPAS=ON"
   "-DPCU_COMPRESS=ON"
   "-DIS_TESTING=True"
+  "-DSIM_PARASOLID=ON"
   "-DSIM_MPI=mpich3.1.2"
 )
 SET(REPO git@github.com:SCOREC/core-sim.git)
@@ -161,6 +162,7 @@
   "-DENABLE_MPAS=ON"
   "-DPCU_COMPRESS=ON"
   "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_CURRENT_LIST_DIR}/clangmake.sh"
+  "-DSIM_PARASOLID=ON"
   "-DSIM_MPI=mpich3.1.2"
 )
 SET(REPO git@github.com:SCOREC/core-sim.git)


reusing the build dir between subprojects, install for permanence

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -75,7 +75,7 @@
   submit_part(${subproject_name} "Update")

   ctest_configure(
-    BUILD "${CTEST_BINARY_DIRECTORY}/${subproject_name}"
+    BUILD "${CTEST_BINARY_DIRECTORY}"
     SOURCE "${CTEST_SOURCE_DIRECTORY}/${subproject_name}"
     OPTIONS "${config_opts}"
     RETURN_VALUE HAD_ERROR)
@@ -85,7 +85,7 @@

   submit_part(${subproject_name} Configure)

-  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}/${subproject_name}"
+  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
       RETURN_VALUE HAD_ERROR)
   if(HAD_ERROR)
     message(FATAL_ERROR "Cannot build ${subproject_name}!")
@@ -93,7 +93,7 @@

   submit_part(${subproject_name} Build)

-  ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}/${subproject_name}")
+  ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")

   submit_part(${subproject_name} Test)
 endmacro()


trying to abstract a subcomponent

trying to abstract a subcomponent

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -37,19 +37,6 @@
 find_program(CTEST_GIT_COMMAND NAMES git)
 set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")

-SET(SCOREC_REPO https://github.com/SCOREC/core.git)
-
-if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}/core")
-  EXECUTE_PROCESS(COMMAND "${CTEST_GIT_COMMAND}"
-    clone ${SCOREC_REPO} ${CTEST_SOURCE_DIRECTORY}/core
-    OUTPUT_VARIABLE _out
-    ERROR_VARIABLE _err
-    RESULT_VARIABLE HAD_ERROR)
-  if(HAD_ERROR)
-    message(FATAL_ERROR "Cannot checkout core repository!")
-  endif()
-endif()
-
 ctest_start(${CTEST_TEST_TYPE})

 if(CTEST_DO_SUBMIT)
@@ -60,68 +47,85 @@
   endif()
 endif()

-set_property(GLOBAL PROPERTY SubProject core)
-set_property(GLOBAL PROPERTY Label core)
+macro(submit_part subproject_name part)
+  if(CTEST_DO_SUBMIT)
+    ctest_submit(PARTS ${part} RETURN_VALUE HAD_ERROR)
+    if(HAD_ERROR)
+      message(FATAL_ERROR "Cannot submit ${subproject_name} ${part} results!")
+    endif()
+  endif()
+endmacro()

-ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}/core" RETURN_VALUE count)
-message("Found ${count} changed files")
+macro(run_subproject subproject_name repo_url config_opts)
+  set_property(GLOBAL PROPERTY SubProject ${subproject_name})
+  set_property(GLOBAL PROPERTY Label ${subproject_name})

-if(CTEST_DO_SUBMIT)
-  ctest_submit(PARTS Update RETURN_VALUE HAD_ERROR)
+  if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}/${subproject_name}")
+    EXECUTE_PROCESS(COMMAND "${CTEST_GIT_COMMAND}"
+      clone ${repo_url} ${CTEST_SOURCE_DIRECTORY}/${subproject_name}
+      RESULT_VARIABLE HAD_ERROR)
+    if(HAD_ERROR)
+      message(FATAL_ERROR "Cannot checkout ${subproject_name} repository!")
+    endif()
+  endif()
+
+  ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}/${subproject_name}" RETURN_VALUE count)
+  message("Found ${count} changed files")
+
+  submit_part(${subproject_name} "Update")
+
+  ctest_configure(
+    BUILD "${CTEST_BINARY_DIRECTORY}/${subproject_name}"
+    SOURCE "${CTEST_SOURCE_DIRECTORY}/${subproject_name}"
+    OPTIONS "${config_opts}"
+    RETURN_VALUE HAD_ERROR)
   if(HAD_ERROR)
-    message(FATAL_ERROR "Cannot submit core update results!")
+    message(FATAL_ERROR "Cannot configure ${subproject_name}!")
   endif()
-endif()
+
+  submit_part(${subproject_name} Configure)
+
+  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}/${subproject_name}"
+      RETURN_VALUE HAD_ERROR)
+  if(HAD_ERROR)
+    message(FATAL_ERROR "Cannot build ${subproject_name}!")
+  endif()
+
+  submit_part(${subproject_name} Build)
+
+  ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}/${subproject_name}")
+
+  submit_part(${subproject_name} Test)
+endmacro()

 SET(CONFIGURE_OPTIONS
   "-DCMAKE_C_COMPILER=mpicc"
   "-DCMAKE_CXX_COMPILER=mpicxx"
-  "-DCMAKE_C_FLAGS=-O2 -g"
-  "-DCMAKE_CXX_FLAGS=-O2 -g"
+  "-DCMAKE_C_FLAGS=-O2 -g -Wall"
+  "-DCMAKE_CXX_FLAGS=-O2 -g -Wall"
   "-DENABLE_THREADS=ON"
   "-DENABLE_ZOLTAN=ON"
   "-DENABLE_MPAS=ON"
   "-DIS_TESTING=True"
 )
+SET(REPO https://github.com/SCOREC/core.git)

-ctest_configure(
-  BUILD "${CTEST_BINARY_DIRECTORY}"
-  SOURCE "${CTEST_SOURCE_DIRECTORY}/core"
-  OPTIONS "${CONFIGURE_OPTIONS}"
-  RETURN_VALUE HAD_ERROR)
+run_subproject("core" "${REPO}" "${CONFIGURE_OPTIONS}")

-if(HAD_ERROR)
-	message(FATAL_ERROR "Cannot configure core build!")
-endif()
-
-if(CTEST_DO_SUBMIT)
-  ctest_submit(PARTS Configure RETURN_VALUE HAD_ERROR)
-  if(HAD_ERROR)
-    message(FATAL_ERROR "Cannot submit core configure results!")
-  endif()
-endif()
-
-ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE HAD_ERROR)
-
-if(HAD_ERROR)
-	message(FATAL_ERROR "Cannot build core!")
-endif()
-
-if(CTEST_DO_SUBMIT)
-  ctest_submit(PARTS Build RETURN_VALUE HAD_ERROR)
-  if(HAD_ERROR)
-    message(FATAL_ERROR "Cannot submit core build results!")
-  endif()
-endif()
-
-ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
-
-if(CTEST_DO_SUBMIT)
-  ctest_submit(PARTS Test RETURN_VALUE HAD_ERROR)
-  if(HAD_ERROR)
-    message(FATAL_ERROR "Cannot submit core test results!")
-  endif()
-endif()
+# SET(CONFIGURE_OPTIONS
+#   "-DCMAKE_C_COMPILER=mpicc"
+#   "-DCMAKE_CXX_COMPILER=mpicxx"
+#   "-DCMAKE_C_FLAGS=-O2 -g -Wall"
+#   "-DCMAKE_CXX_FLAGS=-O2 -g -Wall"
+#   "-DENABLE_THREADS=ON"
+#   "-DENABLE_ZOLTAN=ON"
+#   "-DENABLE_MPAS=ON"
+#   "-DIS_TESTING=True"
+#   "-DSIM_MPI=openmpi16"
+# )
+# SET(REPO git@bitbucket.org:ibaned/scorec.git)
+#
+# run_subproject("core-sim" "${REPO}" "${CONFIGURE_OPTIONS}")

 message("DONE")


Garbage collect HAVE_EXECINFO_H from config.h.cmake after r300062. NFCI.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -59,9 +59,6 @@
 /* Define to 1 if you have the <errno.h> header file. */
 #cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}

-/* Define to 1 if you have the <execinfo.h> header file. */
-#cmakedefine HAVE_EXECINFO_H ${HAVE_EXECINFO_H}
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #cmakedefine HAVE_FCNTL_H ${HAVE_FCNTL_H}