[CLI] [Cmake] Use Virgil Crypto library from tag virgil-crypto-1.0.0.

--- cmake/virgil.cmake
+++ cmake/virgil.cmake
@@ -85,7 +85,7 @@

         ExternalProject_Add (${VIRGIL}_project
             GIT_REPOSITORY "https://github.com/VirgilSecurity/virgil.git"
-            GIT_TAG "release-1.0.0"
+            GIT_TAG "virgil-crypto-1.0.0"
             PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ext/virgil.crypto"
             CMAKE_ARGS ${CMAKE_ARGS}
         )


ENH: update phenotb remote module git tag

--- Modules/Remote/phenotb.remote.cmake
+++ Modules/Remote/phenotb.remote.cmake
@@ -27,5 +27,5 @@
 https://gitlab.orfeo-toolbox.org/jinglada/phenotb
 "
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/jinglada/phenotb.git
-  GIT_TAG c9349eb89a652a18b28a40dfb3fa352b76388527
-)
+  GIT_TAG 72ba22feac301ae00869b5604c2eef17d6a3fae5
+  )


Correct version number after upmerge

Correct version number after upmerge

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

--- version.cmake
+++ version.cmake
@@ -2,11 +2,11 @@
 ## Version Information
 ###
 set ( HPCC_PROJECT "community" )
-set ( HPCC_MAJOR 5 )
-set ( HPCC_MINOR 4 )
+set ( HPCC_MAJOR 6 )
+set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_MATURITY "trunk" )
+set ( HPCC_SEQUENCE 0 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


[ioninja] release 3.2.2

[ioninja] release 3.2.2

--- version.cmake
+++ version.cmake
@@ -1,5 +1,5 @@
 set (VERSION_MAJOR     5)
-set (VERSION_MINOR     2)
+set (VERSION_MINOR     3)
 set (VERSION_REVISION  0)
 set (VERSION_TAG)


Split off 7.12.x

Split off 7.12.x

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

--- version.cmake
+++ version.cmake
@@ -6,6 +6,6 @@
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 11 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Polish

Polish

--- CMakeModules/VersionUtils.cmake
+++ CMakeModules/VersionUtils.cmake
@@ -1,9 +1,4 @@
 function(GENERATE_VERSION_METADATA)
-   set(_VERSION_MAJOR_  ${VERSION_MAJOR}  PARENT_SCOPE)
-   set(_VERSION_MINOR_  ${VERSION_MINOR}  PARENT_SCOPE)
-   set(_VERSION_PATCH_  ${VERSION_PATCH}  PARENT_SCOPE)
-   set(_VERSION_SUFFIX_ ${VERSION_SUFFIX} PARENT_SCOPE)
-
    find_package(Git)
    if(EXISTS ${CMAKE_SOURCE_DIR}/.git AND GIT_FOUND)
       execute_process(
@@ -19,10 +14,21 @@
       string(REGEX MATCH "-dirty$" _VERSION_DIRTY_ ${_VERSION_DIRTY_})
       if(${_VERSION_DIRTY_} STREQUAL "")
          set(_VERSION_DIRTY_ "false")
-       else()
+      else()
          set(_VERSION_DIRTY_ "true")
       endif()
+      set(_VERSION_MAJOR_  ${VERSION_MAJOR}   PARENT_SCOPE)
+      set(_VERSION_MINOR_  ${VERSION_MINOR}   PARENT_SCOPE)
+      set(_VERSION_PATCH_  ${VERSION_PATCH}   PARENT_SCOPE)
+      set(_VERSION_SUFFIX_ ${VERSION_SUFFIX}  PARENT_SCOPE)
+      set(_VERSION_HASH_   ${_VERSION_HASH_}  PARENT_SCOPE)
+      set(_VERSION_DIRTY_  ${_VERSION_DIRTY_} PARENT_SCOPE)
+   else()
+      set(_VERSION_MAJOR_  "unknown" PARENT_SCOPE)
+      set(_VERSION_MINOR_  ""        PARENT_SCOPE)
+      set(_VERSION_PATCH_  ""        PARENT_SCOPE)
+      set(_VERSION_SUFFIX_ ""        PARENT_SCOPE)
+      set(_VERSION_HASH_   ""        PARENT_SCOPE)
+      set(_VERSION_DIRTY_  ""        PARENT_SCOPE)
    endif()
-   set(_VERSION_HASH_  ${_VERSION_HASH_}  PARENT_SCOPE)
-   set(_VERSION_DIRTY_ ${_VERSION_DIRTY_} PARENT_SCOPE)
 endfunction()


fix(Translation): Add Option SRCS to MANAGE_GETTEXT_LOCALES

--- Modules/ManageTranslation.cmake
+++ Modules/ManageTranslation.cmake
@@ -376,7 +376,7 @@
     ENDIF()
 ENDFUNCTION(MANAGE_POT_FILE)

-SET(MANAGE_GETTEXT_LOCALES_VALID_OPTIONS "WORKING_DIRECTORY" "LOCALES" "SYSTEM_LOCALES" "DETECT_PO_DIR")
+SET(MANAGE_GETTEXT_LOCALES_VALID_OPTIONS "WORKING_DIRECTORY" "LOCALES" "SYSTEM_LOCALES" "DETECT_PO_DIR" "SRCS")
 FUNCTION(MANAGE_GETTEXT_LOCALES localeListVar)
     VARIABLE_PARSE_ARGN(_o MANAGE_GETTEXT_LOCALES_VALID_OPTIONS ${ARGN})
     SET(detectedPoDir "NOTFOUND")


Programmatically pass all CMake ITK_ variables to ITK external project

This enables defining variables such as ITK_USE_FFTWD or
ITK_USE_SYSTEM_TIFF in the SimpleITK superbuild and them being passed
to the ITK external project.

Change-Id: I55175273cbd3f13cc1e3c1bef56f7ce505133123

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -2,13 +2,22 @@
 #-----------------------------------------------------------------------------
 # Get and build itk

-set(ITK_LANGUAGES_VARS
-      PYTHON_EXECUTABLE
-      PYTHON_INCLUDE_DIR
-      )
+get_cmake_property( _varNames VARIABLES )

-VariableListToCache( ITK_LANGUAGES_VARS  ep_languages_cache )
-VariableListToArgs( ITK_LANGUAGES_VARS  ep_languages_args )
+foreach (_varName ${_varNames})
+  if(_varName MATCHES "^ITK_" OR _varName MATCHES "FFTW")
+    message( "Variable defined ${_varName}: ${${_varName}}")
+    list(APPEND ITK_VARS ${_varName})
+  endif()
+endforeach()
+
+list(APPEND ITK_VARS
+  PYTHON_EXECUTABLE
+  PYTHON_INCLUDE_DIR
+  )
+
+VariableListToCache( ITK_VARS  ep_itk_cache )
+VariableListToArgs( ITK_VARS  ep_itk_args )

 set(proj ITK)  ## Use ITK convention of calling it ITK
@@ -25,7 +34,7 @@
 endif()

-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_languages_cache}\n${ep_common_cache}" )
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_itk_cache}\n${ep_common_cache}" )

 ExternalProject_Add(${proj}
   GIT_REPOSITORY ${ITK_REPOSITORY}
@@ -37,8 +46,8 @@
   CMAKE_ARGS
   --no-warn-unused-cli
   -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
+  ${ep_itk_args}
   ${ep_common_args}
-  ${ep_languages_args}
   -DBUILD_EXAMPLES:BOOL=OFF
   -DBUILD_TESTING:BOOL=OFF
   -DBUILD_SHARED_LIBS:BOOL=${ITK_BUILD_SHARED_LIBS}


fixing copying of shared library for android toolchain

--- toolchains/android.toolchain.cmake
+++ toolchains/android.toolchain.cmake
@@ -1508,9 +1508,9 @@
 set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" )

 if( DEFINED LIBRARY_OUTPUT_PATH_ROOT
-      OR EXISTS "${CMAKE_SOURCE_DIR}/AndroidManifest.xml"
+      OR EXISTS "${CMAKE_SOURCE_DIR}/android/AndroidManifest.xml"
       OR (EXISTS "${CMAKE_SOURCE_DIR}/../AndroidManifest.xml" AND EXISTS "${CMAKE_SOURCE_DIR}/../jni/") )
-  set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "Root for binaries output, set this to change where Android libs are installed to" )
+  set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR}/android CACHE PATH "Root for binaries output, set this to change where Android libs are installed to" )
   if( NOT _CMAKE_IN_TRY_COMPILE )
     if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
       set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )


check_source_runs.cmake: result is a global, so make it different for each call to this function.

--- cmake/check_source_runs.cmake
+++ cmake/check_source_runs.cmake
@@ -28,11 +28,11 @@
 	ELSE( cppad_cxx_flags )
 		SET(CMAKE_REQUIRED_FLAGS   "" )
 	ENDIF( cppad_cxx_flags )
-	CHECK_CXX_SOURCE_RUNS("${source}" result)
-	IF( result )
+	CHECK_CXX_SOURCE_RUNS("${source}" ${variable}_result)
+	IF( ${variable}_result )
 		SET(${variable} 1)
-	ELSE( result )
+	ELSE( ${variable}_result )
 		SET(${variable} 0)
-	ENDIF( result )
+	ENDIF( ${variable}_result )
 	MESSAGE(STATUS "${variable} = ${${variable}}" )
 ENDMACRO( check_source_runs )


Update Hunter archive

Update Hunter archive

--- common.cmake
+++ common.cmake
@@ -5,7 +5,7 @@
 # * https://github.com/ruslo/hunter
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")
 HunterGate(
-    URL "https://github.com/ruslo/hunter/archive/v0.12.3.tar.gz"
-    SHA1 "0dc8f1acca07afbe2c291f4c5555cfd88e49e372"
+    ULR "https://github.com/ruslo/hunter/archive/v0.12.11.tar.gz"
+    SHA1 "79173425791e1fac4bafdecfc47a4edb994b2b1d"
     ${CONFIG_FILE}
 )


Build issue fix.

Build issue fix.


Also submit Done part

Also submit Done part

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -183,7 +183,7 @@
 macro(finalize_submission)

   # Note should be at the end
-  ctest_submit(PARTS Notes RETRY_DELAY 3 RETRY_COUNT 3)
+  ctest_submit(PARTS Notes Done RETRY_DELAY 3 RETRY_COUNT 3)

   # Send status to the "CDash Web Admin"
   if(CDASH_ADMIN_URL_PREFIX)


Up required Swig version to 3 in find_package command

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -63,7 +63,7 @@
 # General SWIG configuration
 #

-find_package ( SWIG 2 REQUIRED )
+find_package ( SWIG 3 REQUIRED )

 include (sitkUseSWIG)


COMP: Suppress warnings on PGI with commonly used patterns

 - Suppress warnings for redundant semicolons (macros)
 - Suppress warnings for constant value assertions (error handling)

Together these comprised 2640 warnings.

Change-Id: I4540fedf6bf323530548e66c12956dff32603402

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -96,6 +96,15 @@
   ENDIF()
 ENDIF()

+IF(CMAKE_CXX_COMPILER_ID STREQUAL PGI)
+  # --diag_suppress=236 is for constant value asserts used for error handling
+  # This can be restricted to the implementation and doesn't need to propogate
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --diag_suppress=236")
+
+  # --diag_suppress=381 is for redundant semi-colons used in macros
+  # This needs to propogate to anything that includes VTK headers
+  SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} --diag_suppress=381")
+ENDIF()

 IF(MSVC)
 # Use the highest warning level for visual c++ compiler.


Fixed a stupid install bug on Linux introduced in my latest CMake changes

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40723

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -26,29 +26,29 @@
 endfunction(ogre_create_vcproj_userfile)

 # install targets according to current build type
-function(ogre_install_target TARGETNAME)
+function(ogre_install_target TARGETNAME SUFFIX)
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
-    LIBRARY DESTINATION "lib" CONFIGURATIONS Release None ""
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS Release None ""
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS Release None ""
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS Release None ""
     FRAMEWORK DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
   )
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
-    LIBRARY DESTINATION "lib" CONFIGURATIONS RelWithDebInfo
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS RelWithDebInfo
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS RelWithDebInfo
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS RelWithDebInfo
     FRAMEWORK DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
   )
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
-    LIBRARY DESTINATION "lib" CONFIGURATIONS MinSizeRel
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS MinSizeRel
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS MinSizeRel
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS MinSizeRel
     FRAMEWORK DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
   )
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
-    LIBRARY DESTINATION "lib" CONFIGURATIONS Debug
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS Debug
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS Debug
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS Debug
     FRAMEWORK DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
   )
 endfunction(ogre_install_target)
@@ -75,7 +75,7 @@
       set_target_properties(${LIBNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
 	endif (CMAKE_COMPILER_IS_GNUCXX)
   endif (OGRE_STATIC)
-  ogre_install_target(${LIBNAME})
+  ogre_install_target(${LIBNAME} "")

   if (OGRE_INSTALL_PDB)
     # install debug pdb files
@@ -115,7 +115,7 @@
       set_target_properties(${PLUGINNAME} PROPERTIES PREFIX "")
 	endif (CMAKE_COMPILER_IS_GNUCXX)
   endif (OGRE_STATIC)
-  ogre_install_target(${PLUGINNAME})
+  ogre_install_target(${PLUGINNAME} ${OGRE_PLUGIN_PATH})

   if (OGRE_INSTALL_PDB)
     # install debug pdb files
@@ -227,18 +227,18 @@
   endif (APPLE)

   if (OGRE_INSTALL_SAMPLES)
-    ogre_install_target(${SAMPLENAME})
+    ogre_install_target(${SAMPLENAME} "")
+    if (OGRE_INSTALL_PDB)
+      # install debug pdb files
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${SAMPLENAME}.pdb
+        DESTINATION bin${OGRE_DEBUG_PATH} CONFIGURATIONS Debug
+        )
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${SAMPLENAME}.pdb
+        DESTINATION bin${OGRE_RELWDBG_PATH} CONFIGURATIONS RelWithDebInfo
+        )
+    endif ()
   endif ()

-  if (OGRE_INSTALL_PDB)
-    # install debug pdb files
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${SAMPLENAME}.pdb
-	  DESTINATION bin${OGRE_DEBUG_PATH} CONFIGURATIONS Debug
-	)
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${SAMPLENAME}.pdb
-	  DESTINATION bin${OGRE_RELWDBG_PATH} CONFIGURATIONS RelWithDebInfo
-	)
-  endif ()
 endfunction(ogre_config_sample)

 # setup Ogre tool build
@@ -253,18 +253,18 @@
   endif ()

   if (OGRE_INSTALL_TOOLS)
-    ogre_install_target(${TOOLNAME})
+    ogre_install_target(${TOOLNAME} "")
+    if (OGRE_INSTALL_PDB)
+      # install debug pdb files
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}.pdb
+        DESTINATION bin${OGRE_DEBUG_PATH}
+        CONFIGURATIONS Debug
+        )
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${TOOLNAME}.pdb
+        DESTINATION bin${OGRE_RELWDBG_PATH}
+        CONFIGURATIONS RelWithDebInfo
+        )
+    endif ()
   endif ()

-  if (OGRE_INSTALL_PDB)
-    # install debug pdb files
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}.pdb
-	  DESTINATION bin${OGRE_DEBUG_PATH}
-	  CONFIGURATIONS Debug
-	)
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${TOOLNAME}.pdb
-	  DESTINATION bin${OGRE_RELWDBG_PATH}
-	  CONFIGURATIONS RelWithDebInfo
-	)
-  endif ()
 endfunction(ogre_config_tool)


From Ulrich Hertlein, "Patch for FindAVFoundation to work with OS X 10.9"

--- CMakeModules/FindAVFoundation.cmake
+++ CMakeModules/FindAVFoundation.cmake
@@ -32,7 +32,7 @@
       # AVFoundation exists since 10.7, but only 10.8 has all features necessary for OSG
       # so check the SDK-setting

-      IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8")
+      IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.9")
           # nothing special here ;-)
       ELSE()
           MESSAGE("AVFoundation disabled for SDK < 10.8")


Turn on Boost.program_options in build

Turn on Boost.program_options in build

--- CMake/CMakeExternals/Boost.cmake
+++ CMake/CMakeExternals/Boost.cmake
@@ -13,7 +13,7 @@
 #============================================================================*/

 set(RCCPP_USE_Boost 1)
-set(RCCPP_USE_Boost_LIBRARIES "filesystem;system;date_time;regex;thread;iostreams")
+set(RCCPP_USE_Boost_LIBRARIES "filesystem;system;date_time;regex;thread;iostreams;program_options")

 if(RCCPP_USE_Boost)


Set QT_INSTALLED_LIBRARY_DIR in case of Qt5.

--- CMake/ctkMacroSetupPlugins.cmake
+++ CMake/ctkMacroSetupPlugins.cmake
@@ -113,9 +113,19 @@

   # Set the variable QT_INSTALLED_LIBRARY_DIR that contains all
   # Qt shared libraries
-  set(QT_INSTALLED_LIBRARY_DIR ${QT_LIBRARY_DIR})
-  if(WIN32)
-    get_filename_component(QT_INSTALLED_LIBRARY_DIR ${QT_QMAKE_EXECUTABLE} PATH)
+  if (CTK_QT_VERSION VERSION_GREATER "4")
+    if(WIN32)
+      get_target_property(_qt5_moc_executable Qt5::moc LOCATION)
+      get_filename_component(QT_INSTALLED_LIBRARY_DIR ${_qt5_moc_executable} PATH)
+    else()
+      get_target_property(_qt5_core_lib Qt5::Core LOCATION)
+      get_filename_component(QT_INSTALLED_LIBRARY_DIR ${_qt5_core_lib} PATH)
+    endif()
+  else()
+    set(QT_INSTALLED_LIBRARY_DIR ${QT_LIBRARY_DIR})
+    if(WIN32)
+      get_filename_component(QT_INSTALLED_LIBRARY_DIR ${QT_QMAKE_EXECUTABLE} PATH)
+    endif()
   endif()

   set(plugin_symbolic_names )


OGRE_SAMPLES_LIST should have been updated in ogre_config_sample_lib, not ogre_config_sample_exe

--HG--
branch : v1-7

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -290,12 +290,6 @@
   endif (CMAKE_COMPILER_IS_GNUCXX)
   ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)

-  # Add sample to the list of link targets
-  # Global property so that we can build this up across entire sample tree
-  # since vars are local to containing scope of directories / functions
-  get_property(OGRE_SAMPLES_LIST GLOBAL PROPERTY "OGRE_SAMPLES_LIST")
-  set_property (GLOBAL PROPERTY "OGRE_SAMPLES_LIST" ${OGRE_SAMPLES_LIST} ${SAMPLENAME})
-
 endfunction(ogre_config_sample_common)

 function(ogre_config_sample_exe SAMPLENAME)
@@ -326,6 +320,13 @@
 		  CONFIGURATIONS RelWithDebInfo
 		  )
   endif ()
+
+  # Add sample to the list of link targets
+  # Global property so that we can build this up across entire sample tree
+  # since vars are local to containing scope of directories / functions
+  get_property(OGRE_SAMPLES_LIST GLOBAL PROPERTY "OGRE_SAMPLES_LIST")
+  set_property (GLOBAL PROPERTY "OGRE_SAMPLES_LIST" ${OGRE_SAMPLES_LIST} ${SAMPLENAME})
+
 endfunction(ogre_config_sample_lib)


Turn on unused parameter warnings for MSVC

--- CMake/mitkFunctionCreateModule.cmake
+++ CMake/mitkFunctionCreateModule.cmake
@@ -63,6 +63,7 @@
 #!
 #! Multi-value Parameters (all optional):
 #!
+
 #! \param SUBPROJECTS List of CDash labels
 #! \param INCLUDE_DIRS Include directories for this module:
 #!        \verbatim
@@ -343,6 +344,7 @@
     if(NOT MODULE_WARNINGS_NO_ERRORS)
       if(MSVC_VERSION)
         mitkFunctionCheckCAndCXXCompilerFlags("/WX" module_c_flags module_cxx_flags)
+        mitkFunctionCheckCAndCXXCompilerFlags("/w34100" module_c_flags module_cxx_flags)
       else()
         mitkFunctionCheckCAndCXXCompilerFlags(-Werror module_c_flags module_cxx_flags)


Fixed Ogre include directory lookup when using the deps and not a custom Ogre version.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -141,52 +141,25 @@
 endmacro (configure_python_qt)

 macro (configure_ogre)
-    if ("$ENV{OGRE_HOME}" STREQUAL "" OR NOT WIN32)
-        if (APPLE)
-    	  FIND_LIBRARY(OGRE_LIBRARY NAMES Ogre)
-    	  set (OGRE_INCLUDE_DIRS ${OGRE_LIBRARY}/Headers)
-    	  set (OGRE_LIBRARIES ${OGRE_LIBRARY})
-        else ()
-            sagase_configure_package (OGRE
-            NAMES Ogre OgreSDK ogre OGRE
-            COMPONENTS Ogre ogre OGRE OgreMain
-            PREFIXES ${ENV_OGRE_HOME} ${ENV_NAALI_DEP_PATH})
-        endif ()
-
-        sagase_configure_report (OGRE)
-    else()
-        # DX blitting define for naali
-        add_definitions(-DUSE_D3D9_SUBSURFACE_BLIT)
-        include_directories($ENV{OGRE_HOME})
-        # Ogre built from sources
-        include_directories($ENV{OGRE_HOME}/include)
-        include_directories($ENV{OGRE_HOME}/include/RenderSystems/Direct3D9/include)
-        include_directories($ENV{OGRE_HOME}/RenderSystems/Direct3D9/include)
-        # Ogre official sdk
-        include_directories($ENV{OGRE_HOME}/include/OGRE)
-        include_directories($ENV{OGRE_HOME}/include/OGRE/RenderSystems/Direct3D9)
-        link_directories($ENV{OGRE_HOME}/lib)
-
-        # Print some fake sagase reporting as we cant fill
-        # OGRE_INCLUDE_DIRS and OGRE_LIBRARIES lists due to link_ogre() logic
-        message (STATUS "** Configuring OGRE")
-        message (STATUS "-- Using OGRE_HOME environment variable")
-        message (STATUS "       " $ENV{OGRE_HOME})
-        message (STATUS "-- Include Directories:")
-        message (STATUS "       " $ENV{OGRE_HOME}/include)
-        message (STATUS "       " $ENV{OGRE_HOME}/include/OGRE)
-        message (STATUS "-- Library Directories:")
-        message (STATUS "       " $ENV{OGRE_HOME}/lib)
-        message (STATUS "-- Libraries:")
-        message (STATUS "        OgreMain.lib")
-        message (STATUS "        RenderSystem_Direct3D9.lib")
-        message (STATUS "-- Debug Libraries:")
-        message (STATUS "        OgreMain_d.lib")
-        message (STATUS "        RenderSystem_Direct3D9_d.lib")
-        message (STATUS "-- Defines:")
-        message (STATUS "        USE_D3D9_SUBSURFACE_BLIT")
-        message (STATUS "")
-    endif()
+	SET(OGRE_HOME $ENV{OGRE_HOME})
+#	if ("${OGRE_HOME}" STREQUAL "")
+		SET(OGRE_HOME ${ENV_NAALI_DEP_PATH}/Ogre)
+#	endif()
+
+    # DX blitting define for naali
+    add_definitions(-DUSE_D3D9_SUBSURFACE_BLIT)
+    include_directories(${OGRE_HOME})
+    # Tundra deps Ogre
+    include_directories(${OGRE_HOME}/include/RenderSystems/Direct3D9)
+    include_directories(${OGRE_HOME}/RenderSystems/Direct3D9)
+    # Ogre built from sources
+    include_directories(${OGRE_HOME}/include)
+    include_directories(${OGRE_HOME}/include/RenderSystems/Direct3D9/include)
+    include_directories(${OGRE_HOME}/RenderSystems/Direct3D9/include)
+    # Ogre official sdk
+    include_directories(${OGRE_HOME}/include/OGRE)
+    include_directories(${OGRE_HOME}/include/OGRE/RenderSystems/Direct3D9)
+    link_directories(${OGRE_HOME}/lib)
 endmacro (configure_ogre)

 macro(link_ogre)


ENH: Update Cuberille Remote to 2015-05-01.

Change-Id: I93b5255712f7d3f4a365f5fbd55f64f91f60431a

--- Modules/Remote/Cuberille.remote.cmake
+++ Modules/Remote/Cuberille.remote.cmake
@@ -17,5 +17,5 @@
 http://www.insight-journal.org/browse/publication/213
 "
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git
-  GIT_TAG eb9672c4ce279d587af412393980137f1bafd166
+  GIT_TAG 077b6b14683bc7352020a2c7f9a3c39f7a953997
   )


fix stric-aliasing warning

fix stric-aliasing warning

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -82,6 +82,7 @@
     )
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     set(_connext_compile_flags
+      "-Wno-strict-aliasing"
       "-Wno-unused-but-set-variable"
       "-Wno-unused-parameter"
       "-Wno-unused-variable"


CI: update diapotb branch

CI: update diapotb branch

--- Modules/Remote/diapotb.remote.cmake
+++ Modules/Remote/diapotb.remote.cmake
@@ -22,5 +22,5 @@
 otb_fetch_module(DiapOTBModule
   "OTB module for SAR processing in Diapason."
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/remote_modules/diapotb.git
-  GIT_TAG d38457a019d2ef15a47d04c21f235c9e9fe4acd5
+  GIT_TAG ec5970752f44dc0b2e7357d1b223f5825d1ec5ab
 )


SuperBuild: include gtk+ libs in Qt build only if asked explicitly

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -9,6 +9,9 @@
 # if(UNIX AND NOT APPLE)
 #   message(STATUS "  SuperBuild may fail to compile Qt4. If so, you should install it via package manager.")
 # endif()
+
+
+option(QT4_SB_ENABLE_GTK "Enable GTK+ stlye with qt using -gtkstlye. Default is OFF" OFF)

 if(NOT DEFINED git_protocol)
   set(git_protocol "git")
@@ -30,8 +33,14 @@
   if(APPLE)
     set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-framework")
   else() #Linux
-    set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -sm -xrender -xrandr -gtkstyle")
+    if(QT4_SB_ENABLE_GTK)
+      message(STATUS "QT4_SB_ENABLE_GTK is activated. QT4 build includes  gtk+ and libfreetype, libpng (dependencies of gtk+ package)")
+      set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -sm -xrender -xrandr -gtkstyle")
+    else()
+      set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-gtkstyle")
+    endif()
   endif()
+  #common for all unix
   set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-nis -no-javascript-jit -v")
 elseif(MSVC)
   set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -mp")


Remove references to external generated messages in generator

--- rosidl_typesupport_connext_c/cmake/rosidl_typesupport_connext_c_generate_interfaces.cmake
+++ rosidl_typesupport_connext_c/cmake/rosidl_typesupport_connext_c_generate_interfaces.cmake
@@ -232,9 +232,9 @@
 )

 if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
-  if(NOT "${_generated_msg_files}${_generated_external_msg_files} " STREQUAL " ")
+  if(NOT "${_generated_msg_files} " STREQUAL " ")
     install(
-      FILES ${_generated_msg_files} ${_generated_external_msg_files}
+      FILES ${_generated_msg_files}
       DESTINATION "include/${PROJECT_NAME}/msg/dds_connext_c"
     )
   endif()
@@ -245,10 +245,7 @@
     )
   endif()

-  if(
-    NOT "${_generated_msg_files}${_generated_external_msg_files} " STREQUAL " " OR
-    NOT "${_generated_srv_files}${_generated_external_srv_files} " STREQUAL " "
-  )
+  if(NOT "${_generated_msg_files} " STREQUAL " " OR NOT "${_generated_srv_files} " STREQUAL " ")
     ament_export_include_directories(include)
   endif()


remove tmp file

remove tmp file

--- cmake/BenchmarkMacros.cmake
+++ cmake/BenchmarkMacros.cmake
@@ -76,6 +76,7 @@
             COMMAND "${PDFTK_COMMAND}" ARGS "${tmpfile}" dump_data output "${metafile}"
             COMMAND "${CMAKE_COMMAND}" ARGS -D metafile=${metafile} -D name=${name} -P "${CMAKE_CURRENT_SOURCE_DIR}/processPdfMetaData.cmake"
             COMMAND "${PDFTK_COMMAND}" ARGS "${tmpfile}" update_info "${metafile}" output "${pdffile}"
+            COMMAND "${CMAKE_COMMAND}" ARGS -E remove "${tmpfile}"
             DEPENDS "${tmpfile}"
             COMMENT "Adjusting PDF Title of ${pdffile}"
             VERBATIM


small fix when compiling with clang on apple.

Signed-off-by: Étienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -35,7 +35,7 @@
 	# Warning flags
 	set(NORMAL_WARNINGS -Wall -Wextra)

-	if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+	if(NOT (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang"))
 		set(FULL_WARNINGS
 			${NORMAL_WARNINGS}
 			-pedantic


turn Parasolid/Acis off by default...

turn Parasolid/Acis off by default...

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -42,14 +42,14 @@
   SimMeshTools
   SimPartitionWrapper-${SIM_MPI})

-option(SIM_PARASOLID "Use Parasolid through Simmetrix" ON)
+option(SIM_PARASOLID "Use Parasolid through Simmetrix" OFF)
 if (SIM_PARASOLID)
   set(SIM_LIB_NAMES
       ${SIM_LIB_NAMES}
       SimParasolid260
       pskernel)
 endif()
-option(SIM_ACIS "Use Acis through Simmetrix" ON)
+option(SIM_ACIS "Use Acis through Simmetrix" OFF)
 if (SIM_ACIS)
   set(SIM_LIB_NAMES
       ${SIM_LIB_NAMES}


i18n/i10n: Fixes mistakes in the documentation

--- cmake/LXQtTranslateTs.cmake
+++ cmake/LXQtTranslateTs.cmake
@@ -30,7 +30,7 @@
 #                           [UPDATE_TRANSLATIONS [Yes | No]]
 #                           SOURCES <sources>
 #                           [TEMPLATE] translation_template
-#                           [TRANSLATIONS_DIRECTORY] translation_directory
+#                           [TRANSLATION_DIR] translation_directory
 #                           [INSTALL_DIR] install_directory
 #                    )
 #     Output:
@@ -46,7 +46,7 @@
 #       TEMPLATE Optional translations files base name. Defaults to
 #                ${PROJECT_NAME}. An .ts extensions is added.
 #
-#       TRANSLATIONS_DIR Optional path to the directory with the .ts files,
+#       TRANSLATION_DIR Optional path to the directory with the .ts files,
 #                        relative to the CMakeList.txt. Defaults to
 #                        "translations".
 #


[INTERNAL] simd: disable cmake warnings for >=clang5.0 (which is known to work)

--- util/cmake/SeqAnSimdUtility.cmake
+++ util/cmake/SeqAnSimdUtility.cmake
@@ -528,10 +528,11 @@
     set(umesimd_test_blacklist "")

     if (COMPILER_CLANG)
-        # clang >=4.0.0
-        if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) AND (";${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD};" MATCHES ";avx512_skx;"))
-            message(AUTHOR_WARNING "Clang >=4.0.0 reevaluate if AVX512_skx (seqan-simd only) binaries are working. "
-                    "At least https://llvm.org/bugs/show_bug.cgi?id=31731 seems to be fixed")
+        # clang 4.x
+        if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) AND (";${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD};" MATCHES ";avx512_skx;"))
+            message(AUTHOR_WARNING "Clang 4.x; reevaluate if AVX512_skx (seqan-simd only) binaries are working. "
+                    "An earlier version had an Internal Compiler Error (https://llvm.org/bugs/show_bug.cgi?id=31731), "
+                    "which was fixed, the produced binaries might work now. (clang 5.0 is known to work)")
         # clang =3.9.0
         elseif (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1)
             # Build the executables, but don't execute them, because clang <= 3.9.x


ORC-396: also look for LZ4 libs in lib64 subdir

Fixes #302

Signed-off-by: Deepak Majeti <ac74a751f8042cdea853d6c3daf0ad34bd511bbe@apache.org>

--- cmake_modules/FindLZ4.cmake
+++ cmake_modules/FindLZ4.cmake
@@ -30,7 +30,7 @@

 find_library (LZ4_LIBRARIES NAMES lz4 HINTS
   ${_lz4_path}
-  PATH_SUFFIXES "lib")
+  PATH_SUFFIXES "lib" "lib64")

 if (LZ4_INCLUDE_DIR AND LZ4_LIBRARIES)
   set (LZ4_FOUND TRUE)


standardize target suffix

standardize target suffix

--- rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
@@ -11,6 +11,8 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+set(_target_suffix "__rosidl_typesupport_opensplice_cpp")

 # avoid generating any opensplice specific stuff for builtin_msgs
 if(NOT "${PROJECT_NAME} " STREQUAL "builtin_msgs ")
@@ -148,8 +150,6 @@

 endif()

-set(_target_suffix "__dds_opensplice_cpp")
-
 link_directories(${OpenSplice_LIBRARY_DIRS})
 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED ${_generated_files})
 if(WIN32)


Change default Service URI from stg to prod

--- cmake/virgil.cmake
+++ cmake/virgil.cmake
@@ -113,7 +113,7 @@
         set (CMAKE_ARGS
             -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
             -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-            -DENABLE_STAGING_ENV=ON
+            -DENABLE_STAGING_ENV=OFF
             -DINSTALL_EXT_LIBS=ON
         )


Fix elasticsearch install make process when upgrading.

If performing a "make" on top of an existing working copy, the
elasticsearch build process could leave left-over files from the
previous version. These extra files could then prevent ElasticSearch
from starting up (we saw this happen when upgrading from ElaticSearch
1.7 to 2.3).

--- build/cmake/elasticsearch.cmake
+++ build/cmake/elasticsearch.cmake
@@ -7,7 +7,7 @@
   URL_HASH SHA1=${ELASTICSEARCH_HASH}
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
-  INSTALL_COMMAND rsync -a -v <SOURCE_DIR>/ ${STAGE_EMBEDDED_DIR}/elasticsearch/
+  INSTALL_COMMAND rsync -a -v --delete-after <SOURCE_DIR>/ ${STAGE_EMBEDDED_DIR}/elasticsearch/
     COMMAND cd ${STAGE_EMBEDDED_DIR}/bin && ln -snf ../elasticsearch/bin/plugin ./plugin
     COMMAND cd ${STAGE_EMBEDDED_DIR}/bin && ln -snf ../elasticsearch/bin/elasticsearch ./elasticsearch
 )


build: Update botan bundle

build: Update botan bundle

--- cmake/botan.cmake
+++ cmake/botan.cmake
@@ -5,7 +5,7 @@
 ExternalProject_Add(botan
         PREFIX botan
         URL https://github.com/includeos/botan/releases/download/inc-2.0/botan-includeos.tar.gz
-        URL_HASH MD5=142801a69fd87b65dae12d395ef2a995
+        URL_HASH MD5=952980834c93e61dc836bb7c400f4d57
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
         UPDATE_COMMAND ""


Add test if S_IRGRP is defined

Add test if S_IRGRP is defined

--- cmake/check.cmake
+++ cmake/check.cmake
@@ -1,6 +1,7 @@
 include (CheckFunctionExists)
 include (CheckIncludeFile)
 include (CheckLibraryExists)
+include (CheckSymbolExists)
 include (CheckTypeSize)
 include (TestBigEndian)

@@ -87,6 +88,8 @@
 check_function_exists(lrintf        	HAVE_LRINTF)
 check_function_exists(lround        	HAVE_LROUND)

+check_symbol_exists (S_IRGRP sys/stat.h HAVE_DECL_S_IRGRP)
+
 test_big_endian(WORDS_BIGENDIAN)
 if (WORDS_BIGENDIAN)
 	set (WORDS_BIGENDIAN 1)


Fix cmake broken when using lower version.

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

 CheckCompilerCXX11Flag()
-string(APPEND CMAKE_CXX_FLAGS " -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

 # safe_set_flag
 #


Fix MinGW windows build

Fix MinGW windows build

--- cmake/g3log.cmake
+++ cmake/g3log.cmake
@@ -18,11 +18,14 @@
     set(GENERATOR ${CMAKE_GENERATOR})
 endif ()

+set(SH_NOT_FOUND "CMAKE_SH-NOTFOUND")
+
 if (NOT EXISTS G3LOGGER_BUILD_DIR)
     message("Configuring G3log")
     file(MAKE_DIRECTORY ${G3LOGGER_BUILD_DIR})
     execute_process(COMMAND ${CMAKE_COMMAND}
             "-G${GENERATOR}"
+            "-DCMAKE_SH=${SH_NOT_FOUND}"
             "-DCMAKE_BUILD_TYPE=Release"
             "-DG3_SHARED_LIB=OFF"
             "-H${DEP_ROOT_DIR}/${G3LOG_NAME}"


Bugfix: also set cmake host variable in cross-compiling scenario

--- cmake/oryol.cmake
+++ cmake/oryol.cmake
@@ -53,19 +53,15 @@
     set (ORYOL_HOST_WIN32 0)
     set (ORYOL_HOST_OSX 0)
     set (ORYOL_HOST_LINUX 0)
-
-    # manually override toolschain file for non-crosscompiling scenario
-    if (NOT CMAKE_TOOLCHAIN_FILE)
-        if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
-            set(ORYOL_HOST_WINDOWS 1)
-            message("Oryol host system: Windows")
-        elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
-            set(ORYOL_HOST_OSX 1)
-            message("Oryol host system: OSX")
-        elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
-            set(ORYOL_HOST_LINUX 1)
-            message("Oryol host system: Linux")
-        endif()
+    if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
+        set(ORYOL_HOST_WINDOWS 1)
+        message("Oryol host system: Windows")
+    elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
+        set(ORYOL_HOST_OSX 1)
+        message("Oryol host system: OSX")
+    elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
+        set(ORYOL_HOST_LINUX 1)
+        message("Oryol host system: Linux")
     endif()

     # manually include "toolchain" files for non-crosscompiling scenarios


cmake: add -Wcomma for clang

cmake: add -Wcomma for clang

--- cmake/Reaper.cmake
+++ cmake/Reaper.cmake
@@ -71,6 +71,11 @@
                 "-Wpointer-arith" "-Wredundant-decls" "-Winline" "-Wformat"
                 "-Wformat-security" "-Winit-self"
                 "-Wdeprecated-declarations" "-Wmissing-declarations")
+
+            if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+                list(APPEND REAPER_DEBUG_FLAGS "-Wcomma")
+            endif()
+
             if(REAPER_WARNING_AS_ERRORS)
                 list(APPEND REAPER_DEBUG_FLAGS "-Werror")
             endif()


Move suppression of used-but-marked-unused warning to targets that aren't cellml.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -101,7 +101,6 @@
       -Wno-global-constructors
       -Wno-missing-prototypes
       -Wno-padded
-      -Wno-used-but-marked-unused
     )

     if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 7.0.0)
@@ -112,6 +111,7 @@

     if(NOT "${_TARGET}" STREQUAL "cellml")
       list(APPEND _COMPILE_OPTIONS
+        -Wno-used-but-marked-unused
         --system-header-prefix=gtest/
       )
     endif()


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -763,7 +763,7 @@
                                   DEPENDS ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME}
                                   COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
                                                                     ${QT_LIBRARY_DIR}/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
-                                                                    ${DEST_PLUGINS_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+                                                                    ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
             ENDFOREACH()
         ENDIF()

@@ -778,7 +778,7 @@
                               DEPENDS ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME}
                               COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
                                                                 ${QT_LIBRARY_DIR}/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
-                                                                ${PROJECT_BUILD_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+                                                                ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME})
         ENDFOREACH()
     ENDIF()


cmake(dotnet): Fix byproduct of SNK project

--- cmake/dotnet.cmake
+++ cmake/dotnet.cmake
@@ -123,6 +123,9 @@
     COMMAND ${DOTNET_EXECUTABLE} run
     --project ${OR_TOOLS_DOTNET_SNK}/${OR_TOOLS_DOTNET_SNK}.csproj
     /or-tools.snk
+    BYPRODUCTS
+      dotnet/${OR_TOOLS_DOTNET_SNK}/bin
+      dotnet/${OR_TOOLS_DOTNET_SNK}/obj
     COMMENT "Generate or-tools.snk using CreateSigningKey project"
     WORKING_DIRECTORY dotnet
     VERBATIM


Doc try to set "-std" flag when CMake cxx standard flags are present

These two variables may conflict, and cause inconsistency with the
expected result. Only allow one to be set.

--- CMake/sitkCheckRequiredFlags.cmake
+++ CMake/sitkCheckRequiredFlags.cmake
@@ -67,21 +67,37 @@
   endforeach()
 endforeach()

+set(HAS_CXX_STD_FLAG ${_HAS_FLAG})
+
+
+#
+# Let the user set the CXX_STANDARD via these CMake variable, although
+# it is preferred to set it in the CXX_FLAGS, as it will be propagated
+# to SimpleITK's public compile options.
+#
+if( DEFINED CMAKE_CXX_STANDARD
+    OR DEFINED CMAKE_CXX_STANDARD_REQUIRED
+    OR DEFINED CMAKE_CXX_EXTENSIONS )
+  if(HAS_CXX_STD_FLAG)
+    message(SEND_ERROR "CMake CXX standard variables are not supported
+      concurrently with CXX flag: \"-std=\"! Use only one to configure CXX standard.")
+  endif()
+elseif(NOT HAS_CXX_STD_FLAG)
+
 #
 # Check if we need to enable C++11 with a compiler flag
 #

-if(NOT _HAS_FLAG)
+  check_cxx_compiler_flag( "-std=c++11" CXX_HAS_stdcxx11)

-  check_cxx_compiler_flag( "-std=c++11" CXX_HAS_stdcxx11)
   if (CXX_HAS_stdcxx11)

     message(STATUS "Checking if c++11 is required...")
-    try_compile(SITK_CHECK_CXX11
+    try_compile(SITK_CXX11_NOT_REQUIRED
       "${PROJECT_BINARY_DIR}"
       "${CMAKE_CURRENT_LIST_DIR}/sitk_check_cxx11_required.cxx"
       OUTPUT_VARIABLE OUTPUT)
-    if(${SITK_CHECK_CXX11})
+    if(SITK_CXX11_NOT_REQUIRED)
       message(STATUS "Checking if c++11 is required... NO" )
     else()
       message(STATUS "Checking if c++11 is required... YES" )


- fixes the absence of the RDKit prefix in .so/.dylib libraries (#1915)

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -74,13 +74,13 @@
   IF(RDKLIB_LINK_LIBRARIES)
     target_link_libraries(${RDKLIB_NAME} PUBLIC ${RDKLIB_LINK_LIBRARIES})
   ENDIF(RDKLIB_LINK_LIBRARIES)
-  if(WIN32)
+  if((NOT MSVC) OR RDK_INSTALL_DLLS_MSVC)
     set_target_properties(${RDKLIB_NAME} PROPERTIES
                           OUTPUT_NAME "RDKit${RDKLIB_NAME}"
                           VERSION "${RDKit_ABI}.${RDKit_Year}.${RDKit_Month}.${RDKit_Revision}"
                           VERSION ${RDKit_VERSION}
                           SOVERSION ${RDKit_ABI} )
-  endif(WIN32)
+  endif()
   set_target_properties(${RDKLIB_NAME} PROPERTIES
                         ARCHIVE_OUTPUT_DIRECTORY ${RDK_ARCHIVE_OUTPUT_DIRECTORY}
                         RUNTIME_OUTPUT_DIRECTORY ${RDK_RUNTIME_OUTPUT_DIRECTORY}


llvm 3.4

llvm 3.4

--- FindLLVM.cmake
+++ FindLLVM.cmake
@@ -6,7 +6,7 @@
 #  LLVM_LFLAGS      - llvm linker flags
 #  LLVM_MODULE_LIBS - list of llvm libs for working with modules.

-set(LLVM_VERSION "3.3")
+set(LLVM_VERSION "3.4")

 find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-${LLVM_VERSION} DOC "llvm-config executable")


Small cleanup of `DOConfigureCompiler.cmake`

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -40,10 +40,9 @@
   if(GCC_MAJOR MATCHES "\\.+")
     set(GCC_MAJOR "")
   endif()
-  message(STATUS "Found GCC. Major version ${GCC_MAJOR}, minor version ${GCC_MINOR}")
-  set(GCC_VERSION ${GCC_MAJOR}${GCC_MINOR})
+  set(GCC_VERSION "${GCC_MAJOR}.${GCC_MINOR}")

-  do_substep_message("${CMAKE_CXX_COMPILER} version: ${GCC_VERSION}")
+  do_substep_message("${CMAKE_CXX_COMPILER_ID} compiler version: ${GCC_VERSION}"")
   if (GCC_VERSION  VERSION_LESS 4.5)
     message(FATAL_ERROR "GNU compiler version lower than 4.5 are not supported anymore: C++0x features (auto and lambda) are needed.")
   elseif (GCC_VERSION  VERSION_LESS 4.7)


forgot to uncomment a line to fix the build for cmake > 2.4444

--- cmake_modules/FindLibTidy.cmake
+++ cmake_modules/FindLibTidy.cmake
@@ -20,7 +20,7 @@
 FIND_LIBRARY(LIBTIDY_LIBRARY NAMES tidy)
 MARK_AS_ADVANCED(LIBTIDY_LIBRARY)

-INCLUDE(FindPackageHandleStandardArgs)
+# INCLUDE(FindPackageHandleStandardArgs)
 # only available in cmake > 2.6
 # FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBTIDY DEFAULT_MSG LIBTIDY_INCLUDE_DIR LIBTIDY_LIBRARY)
 #IF (LIBTIDY_FOUND)


BUG: Fix midas_add_test macro

BUG: Fix midas_add_test macro

SVN-Revision: 3267

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -151,6 +151,6 @@
   add_test(${testName}_fetchData "${CMAKE_COMMAND}" -P "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake")
   set_tests_properties(${testName}_fetchData PROPERTIES FAIL_REGULAR_EXPRESSION "(Error downloading)|(Error: Computed checksum)")
   # Finally, create the test
-  add_test(${testName} ${testArgs})
+  add_test(${testArgs})
   set_tests_properties(${testName} PROPERTIES DEPENDS ${testName}_fetchData)
 endfunction(midas_add_test)


SuperBuild: GDAL. configure with --with-macosx-framwork=no on macosx

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -25,9 +25,13 @@
   if(UNIX)
     set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
     mark_as_advanced(GDAL_SB_EXTRA_OPTIONS)
-
     #Convert GDAL_SB_EXTRA_OPTIONS to a list to allow to add multiple instructions to the CONFIGURE_COMMAND
     separate_arguments(GDAL_SB_EXTRA_OPTIONS)
+
+    #we dont do any framework build on osx. So let's be sure on case of gdal
+    if(APPLE)
+      list(APPEND GDAL_SB_CONFIG "--with-macosx-framework=no")
+    endif()

     ExternalProject_Add(GDAL
       PREFIX GDAL


ENH: more version parsing

ENH: more version parsing

--- SuperBuild/CMake/SystemCheckup.cmake
+++ SuperBuild/CMake/SystemCheckup.cmake
@@ -41,6 +41,11 @@
       set(_SB_CHECKUP_${_uppervar}_VERSION "${${_var_name}_VERSION_MAJOR}.${${_var_name}_VERSION_MINOR}.${${_var_name}_VERSION_PATCH}")
     endif()

+    # fix incomplete version numbers
+    if(_SB_CHECKUP_${_uppervar}_VERSION MATCHES "^[0-9]+\\.[0-9]+\$")
+      set(_SB_CHECKUP_${_uppervar}_VERSION "${_SB_CHECKUP_${_uppervar}_VERSION}.0")
+    endif()
+
   endif()
 endmacro(SB_CHECKUP_FIND_PACKAGE)

@@ -63,25 +68,30 @@

 macro(SB_CHECKUP_FIND_VERSIONS lib header major_name minor_name patch_name)
   string(TOUPPER ${lib} _upperlib)
-  if(_SB_CHECKUP_${_upperlib}_FOUND AND EXISTS ${header})
-    unset(_header_content)
-    set(_major_regex ".*# *define +${major_name} +([0-9]+).*")
-    set(_minor_regex ".*# *define +${minor_name} +([0-9]+).*")
-    set(_patch_regex ".*# *define +${patch_name} +([0-9]+).*")
-    file(READ ${header} _header_content)
-    string(REGEX REPLACE ${_major_regex} "\\1"
-           _SB_CHECKUP_${_upperlib}_VERSION_MAJOR
-           ${_header_content})
-    string(REGEX REPLACE ${_minor_regex} "\\1"
-           _SB_CHECKUP_${_upperlib}_VERSION_MINOR
-           ${_header_content})
-    string(REGEX REPLACE ${_patch_regex} "\\1"
-           _SB_CHECKUP_${_upperlib}_VERSION_PATCH
-           ${_header_content})
-    math(EXPR _SB_CHECKUP_${_upperlib}_VERSION_NUMBER
-      "((${_SB_CHECKUP_${_upperlib}_VERSION_MAJOR})*100+${_SB_CHECKUP_${_upperlib}_VERSION_MINOR})*100+${_SB_CHECKUP_${_upperlib}_VERSION_PATCH}")
-    set(_SB_CHECKUP_${_upperlib}_VERSION "${_SB_CHECKUP_${_upperlib}_VERSION_MAJOR}.${_SB_CHECKUP_${_upperlib}_VERSION_MINOR}.${_SB_CHECKUP_${_upperlib}_VERSION_PATCH}")
-    message(STATUS "|  version = ${_SB_CHECKUP_${_upperlib}_VERSION}")
+  if(_SB_CHECKUP_${_upperlib}_FOUND)
+    foreach(inc_path ${${_upperlib}_INCLUDE_DIRS})
+      if(EXISTS "${inc_path}/${header}")
+        unset(_header_content)
+        set(_major_regex ".*# *define +${major_name} +([0-9]+).*")
+        set(_minor_regex ".*# *define +${minor_name} +([0-9]+).*")
+        set(_patch_regex ".*# *define +${patch_name} +([0-9]+).*")
+        file(READ "${inc_path}/${header}" _header_content)
+        string(REGEX REPLACE ${_major_regex} "\\1"
+               _SB_CHECKUP_${_upperlib}_VERSION_MAJOR
+               ${_header_content})
+        string(REGEX REPLACE ${_minor_regex} "\\1"
+               _SB_CHECKUP_${_upperlib}_VERSION_MINOR
+               ${_header_content})
+        string(REGEX REPLACE ${_patch_regex} "\\1"
+               _SB_CHECKUP_${_upperlib}_VERSION_PATCH
+               ${_header_content})
+        math(EXPR _SB_CHECKUP_${_upperlib}_VERSION_NUMBER
+          "((${_SB_CHECKUP_${_upperlib}_VERSION_MAJOR})*100+${_SB_CHECKUP_${_upperlib}_VERSION_MINOR})*100+${_SB_CHECKUP_${_upperlib}_VERSION_PATCH}")
+        set(_SB_CHECKUP_${_upperlib}_VERSION "${_SB_CHECKUP_${_upperlib}_VERSION_MAJOR}.${_SB_CHECKUP_${_upperlib}_VERSION_MINOR}.${_SB_CHECKUP_${_upperlib}_VERSION_PATCH}")
+        message(STATUS "|  version = ${_SB_CHECKUP_${_upperlib}_VERSION}")
+        break()
+      endif()
+    endforeach()
   endif()
 endmacro(SB_CHECKUP_FIND_VERSIONS)

@@ -98,7 +108,7 @@
 # GDAL
 SB_CHECKUP_FIND_PACKAGE(GDAL)
 SB_CHECKUP_FIND_VERSIONS(GDAL
-                         ${GDAL_INCLUDE_DIR}/gdal_version.h
+                         gdal_version.h
                          GDAL_VERSION_MAJOR
                          GDAL_VERSION_MINOR
                          GDAL_VERSION_REV)
@@ -112,7 +122,7 @@
 # libkml
 SB_CHECKUP_FIND_PACKAGE(LibKML)
 SB_CHECKUP_FIND_VERSIONS(LibKML
-                         ${LIBKML_INCLUDE_DIR}/kml/base/version.h
+                         kml/base/version.h
                          LIBKML_MAJOR_VERSION
                          LIBKML_MINOR_VERSION
                          LIBKML_MICRO_VERSION)
@@ -133,6 +143,11 @@

 # OpenJPEG
 SB_CHECKUP_FIND_PACKAGE(OpenJPEG)
+SB_CHECKUP_FIND_VERSIONS(OpenJPEG
+                         opj_config.h
+                         OPJ_VERSION_MAJOR
+                         OPJ_VERSION_MINOR
+                         OPJ_VERSION_BUILD)

 # OpenThreads
 SB_CHECKUP_FIND_PACKAGE(OpenThreads)


Correct version of virtualenv currently used

The version on Midas is correctly named as virtualenv-15.1.0.tar.gz
with the correct MD5 hash. The CMake script simply had the incorrect
string version.

--- SuperBuild/External_virtualenv.cmake
+++ SuperBuild/External_virtualenv.cmake
@@ -7,7 +7,7 @@

 set(proj virtualenv)

-set(${proj}_TARGET_VERSION 15.1.5)
+set(${proj}_TARGET_VERSION 15.1.0)
 set(${proj}_DOWNLOAD_SOURCE_HASH "44e19f4134906fe2d75124427dc9b716")

 # based on the standard EP_PREFIX locations, but since we don't build


ENH: include superbuild dependencies

ENH: include superbuild dependencies

--- Superbuild/CMake/SuperBuild_Macro.cmake
+++ Superbuild/CMake/SuperBuild_Macro.cmake
@@ -63,3 +63,12 @@
   set(${NEW_SB_PROJECT}_SB_SRC ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/src/${NEW_SB_PROJECT})
   set(${NEW_SB_PROJECT}_SB_CONFIG)
 endmacro(SETUP_SUPERBUILD)
+
+# Macro to include dependencies
+macro(INCLUDE_SUPERBUILD_DEPENDENCIES)
+  foreach(dep ${ARGV})
+    string(TOLOWER ${dep} dep_lower)
+    include(External_${dep_lower})
+  endforeach()
+endmacro(INCLUDE_SUPERBUILD_DEPENDENCIES)
+


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 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   21)
+SET(KWSYS_DATE_STAMP_DAY   22)


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 11)

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


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 05)

 # 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 05)

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


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   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


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   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


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 10)

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


site-packages should be PYTHON_PACKAGES_DIR

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -14,7 +14,7 @@
   set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb" CACHE STRING "extra arguments to setuptools")
 endif()

-set(INSTALLED_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_XDOTY}/site-packages
+set(INSTALLED_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_XDOTY}/${PYTHON_PACKAGES_DIR}
   CACHE INTERNAL "This needs to be in pythonpath when setup.py install is called.  And it needs to match.  But setuptools won't tell us where it will install things.")


fix PYTHON_PACKAGES_DIR and SETUPTOOLS_ARG_EXTRA to be up-to-date when passing -DSETUPTOOLS_DEB_LAYOUT=.. (fix #314)

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -13,20 +13,20 @@
 endif()

 if(SETUPTOOLS_DEB_LAYOUT)
-  set(PYTHON_PACKAGES_DIR dist-packages CACHE STRING "dist-packages or site-packages")
-  set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb" CACHE STRING "extra arguments to setuptools")
+  set(PYTHON_PACKAGES_DIR dist-packages)
+  set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb")
 else()
-  set(PYTHON_PACKAGES_DIR site-packages CACHE STRING "dist-packages or site-packages")
+  set(PYTHON_PACKAGES_DIR site-packages)
   file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/bin PYTHON_INSTALL_PREFIX) # setuptools is fussy about windows paths
-  set(SETUPTOOLS_ARG_EXTRA "--install-scripts=${PYTHON_INSTALL_PREFIX}" CACHE STRING "extra arguments to setuptools")
+  set(SETUPTOOLS_ARG_EXTRA "--install-scripts=${PYTHON_INSTALL_PREFIX}")
 endif()

 if(NOT MSVC)
   set(PYTHON_INSTALL_DIR lib/python${PYTHON_VERSION_XDOTY}/${PYTHON_PACKAGES_DIR}
-    CACHE INTERNAL "This needs to be in PYTHONPATH when setup.py install is called.  And it needs to match.  But setuptools won't tell us where it will install things.")
+    CACHE INTERNAL "This needs to be in PYTHONPATH when 'setup.py install' is called.  And it needs to match.  But setuptools won't tell us where it will install things.")
 else()
   # Windows setuptools installs to lib/site-packages not lib/python2.7/site-packages
   # Or is this SETUPTOOLS_DEB_LAYOUT dependent?
   set(PYTHON_INSTALL_DIR lib/${PYTHON_PACKAGES_DIR}
-    CACHE INTERNAL "This needs to be in PYTHONPATH when setup.py install is called.  And it needs to match.  But setuptools won't tell us where it will install things.")
+    CACHE INTERNAL "This needs to be in PYTHONPATH when 'setup.py install' is called.  And it needs to match.  But setuptools won't tell us where it will install things.")
 endif()


CI: update diapotb branch

CI: update diapotb branch

--- Modules/Remote/diapotb.remote.cmake
+++ Modules/Remote/diapotb.remote.cmake
@@ -22,5 +22,5 @@
 otb_fetch_module(DiapOTBModule
   "OTB module for SAR processing in Diapason."
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/remote_modules/diapotb.git
-  GIT_TAG d38457a019d2ef15a47d04c21f235c9e9fe4acd5
+  GIT_TAG ec5970752f44dc0b2e7357d1b223f5825d1ec5ab
 )


fixed pathes (path to java needed )

fixed pathes (path to java needed )

--- BuildSetup.cmake
+++ BuildSetup.cmake
@@ -16,17 +16,21 @@
 #############################################################################

 # ILC_HOME
-SET( ILC_HOME "/afs/desy.de/group/it/ilcsoft/v01-01_beta"
+SET( ILC_HOME "/afs/desy.de/group/it/ilcsoft"
     CACHE PATH "Path to ILC Software" FORCE )

 #############################################################################
 # Java
 #############################################################################

-# If you don't want to use the java version automatically detected by cmake
-# you can define here what java to use
+#specify path to the java version that you want to use

+#  ---- SL4
 # Path to Java
+SET( JAVA_HOME "${ILC_HOME}/java/1.6.0"
+    CACHE PATH "Path to Java" FORCE )
+
+#  ---- SL3
 #SET( JAVA_HOME "${ILC_HOME}/java/1.5.0"
 #    CACHE PATH "Path to Java" FORCE )

@@ -38,7 +42,7 @@
 #############################################################################

 # Enable this for building LCIO with CLHEP
-#SET( BUILD_WITH "CLHEP" CACHE STRING "Build LCIO with these optional packages" FORCE )
+SET( BUILD_WITH "CLHEP" CACHE STRING "Build LCIO with these optional packages" FORCE )

 # Path to CLHEP
 SET( CLHEP_HOME "${ILC_HOME}/CLHEP/2.0.2.2"


CI: fix build name

CI: fix build name

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -30,7 +30,7 @@
 if("$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" AND "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
   set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} to $ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME})")
 elseif("$ENV{CI_COMMIT_REF_NAME}")
-  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_COMMIT_SHORT_SHA})")
+  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_COMMIT_REF_NAME})")
 endif()
 set (CTEST_SITE "${IMAGE_NAME}")

@@ -48,6 +48,7 @@
 set (OTB_LARGEINPUT_ROOT "") # todo

 message(STATUS "CI profile : $ENV{OTB_CI_PROFILE}")
+message(STATUS "CI_COMMIT_REF_NAME : $ENV{CI_COMMIT_REF_NAME}")

 #The following file set the CONFIGURE_OPTIONS variable
 set (CONFIGURE_OPTIONS  "")


BUG: Reverted change of ExternalGoogleTest.cmake which was accidentally committed

This reverts part of commit 501ebe7fd652883786f4c0f582d5b021acc2d537.

--- SuperBuild/ExternalGoogleTest.cmake
+++ SuperBuild/ExternalGoogleTest.cmake
@@ -20,7 +20,7 @@
 set( proj GoogleTest )

 set( GTEST_TARGET_VERSION 1.7.0 )
-set( GTEST_DOWNLOAD_SOURCE_HASH "b3a2048beb0f8d6cbb2d5c95e7f639780eff5805" )
+set( GTEST_DOWNLOAD_SOURCE_HASH "2d6ec8ccdf5c46b05ba54a9fd1d130d7" )

 set( GTEST_binary_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-build )
 set( GTEST_source_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj} )


COMP: Update ctkDashboardDriverScript - Continuous dashboard now empty build dir when started

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -68,7 +68,7 @@
   set(force_build TRUE)
   set(model Experimental)
 elseif (SCRIPT_MODE STREQUAL "continuous")
-  set(empty_binary_directory FALSE)
+  set(empty_binary_directory TRUE)
   set(force_build FALSE)
   set(model Continuous)
 elseif (SCRIPT_MODE STREQUAL "nightly")


Temporarily use ${ENV_NAALI_DEP_PATH}/bullet-2.77 on linux instead of ${ENV_NAALI_DEP_PATH}/Bullet.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -455,7 +455,11 @@

 macro(use_package_bullet)
     if ("$ENV{BULLET_DIR}" STREQUAL "")
-       set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
+       if (WIN32)
+          set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
+       else # todo: This should be temporary? Always just use the above directory.
+          set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/bullet-2.77)
+       endif()
     else()
        set(BULLET_DIR $ENV{BULLET_DIR})
     endif()


Find MKL cluster libraries (BLACS, scalapack, etc.)

--- modules/FindMKL.cmake
+++ modules/FindMKL.cmake
@@ -9,8 +9,10 @@
 #   find_package(MKL
 #     [version] [EXACT]      # Minimum or EXACT version e.g. 11.3.2,
 #     [REQUIRED]             # Fail with error if MKL is not found
-#     [COMPONENTS <libs>...] # Cluster libraries by their canonical name e.g.
-#     )                      # "ScaLAPACK" for "libmkl_scalapack_{i}lp64.{a,so}"
+#     [COMPONENTS <libs>...] # Cluster libraries e.g. "PARDISO", "CDFT",
+#     )                      # "ScaLAPACK" or "BLACS" (case sensitive).
+#                            # Dependencies (PARDISO, CDFT and ScaLAPACK require
+#                            # BLACS) are handled automatically
 #
 # This module finds headers and requested cluster libraries.  Results are
 # reported in variables::
@@ -336,7 +338,6 @@
       endif()
       list(APPEND MKL_LIBRARIES ${MKL_INTERFACE_LIB})
     endif()
-    unset(_MKL_INTERFACE_LC)
     unset(_MKL_INTERFACE_LIBRARY)
     unset(_MKL_IS_64BIT)
   endif()
@@ -370,6 +371,80 @@
   unset(_MKL_THREADING_LC)
   unset(_MKL_THREADING_LIBS)

+  # All components currently require BLACS so if any are listed find BLACS first
+  list(LENGTH MKL_FIND_COMPONENTS _MKL_NUM_COMPONENTS)
+  if(${_MKL_NUM_COMPONENTS} GREATER 0)
+    STRING(TOLOWER ${MKL_MESSAGE_PASSING} _MKL_MPI_LC)
+    if(${_MKL_MPI_LC} STREQUAL "intel")
+      set(_MKL_BLACS_LIBNAME "mkl_blacs_intelmpi_${_MKL_INTERFACE_LC}")
+    elseif(${_MKL_MPI_LC} STREQUAL "mpich")
+      set(_MKL_BLACS_LIBNAME "mkl_blacs_${_MKL_INTERFACE_LC}")
+    elseif(${_MKL_MPI_LC} STREQUAL "mpich2")
+      set(_MKL_BLACS_LIBNAME "mkl_blacs_intelmpi_${_MKL_INTERFACE_LC}")
+    elseif(${_MKL_MPI_LC} STREQUAL "openmpi")
+      set(_MKL_BLACS_LIBNAME "mkl_blacs_openmpi_${_MKL_INTERFACE_LC}")
+    elseif(${_MKL_MPI_LC} STREQUAL "sgi")
+      set(_MKL_BLACS_LIBNAME "mkl_blacs_sgimpt_${_MKL_INTERFACE_LC}")
+    endif()
+    unset(_MKL_MPI_LC)
+
+    find_library(MKL_BLACS_LIB
+                 "${_MKL_BLACS_LIBNAME}"
+                 HINTS ${_MKL_LIBRARY_SEARCH_DIRS})
+    if("${MKL_BLACS_LIB}" STREQUAL "MKL_BLACS_LIB-NOTFOUND")
+      set(MKL_FOUND 0)
+    else()
+      list(APPEND MKL_LIBRARIES ${MKL_BLACS_LIB})
+      set(MKL_BLACS_FOUND TRUE)
+    endif()
+
+    # There is absolutely no pattern to the component libraries in MKL.
+    # Cluster PARDISO has no library
+    # CDFT is only available as libmkl_cdft_core.so
+    # ScaLAPACK is available as libmkl_scalapack_lp64.so or
+    # libmkl_scalapack_ilp64.so depending on MKL_INTERFACE and only on intel64
+    # and not Mac OS
+
+    # Cluster PARDISO
+    list(FIND MKL_FIND_COMPONENTS PARDISO _MKL_INDEXOF_PARDISO)
+    if (${_MKL_INDEXOF_PARDISO} GREATER -1)
+      set(MKL_PARDISO_LIB "") # :trollface:
+      set(MKL_PARDISO_FOUND TRUE)
+    endif()
+    unset(_MKL_INDEXOF_PARDISO)
+
+    # CDFT
+    list(FIND MKL_FIND_COMPONENTS CDFT _MKL_INDEXOF_CDFT)
+    if (${_MKL_INDEXOF_CDFT} GREATER -1)
+      find_library(MKL_CDFT_LIB
+                   "mkl_cdft_core"
+                   HINTS ${_MKL_LIBRARY_SEARCH_DIRS})
+      if("${MKL_CDFT_LIB}" STREQUAL "MKL_CDFT_LIB-NOTFOUND")
+        set(MKL_FOUND 0)
+      else()
+        list(APPEND MKL_LIBRARIES ${MKL_CDFT_LIB})
+        set(MKL_CDFT_FOUND TRUE)
+      endif()
+    endif()
+    unset(_MKL_INDEXOF_CDFT)
+
+    # ScaLAPACK
+    list(FIND MKL_FIND_COMPONENTS ScaLAPACK _MKL_INDEXOF_SCALAPACK)
+    if (${_MKL_INDEXOF_SCALAPACK} GREATER -1)
+      find_library(MKL_SCALAPACK_LIB
+                   "mkl_scalapack_${_MKL_INTERFACE_LC}"
+                   HINTS ${_MKL_LIBRARY_SEARCH_DIRS})
+      if("${MKL_SCALAPACK_LIB}" STREQUAL "MKL_SCALAPACK_LIB-NOTFOUND")
+        set(MKL_FOUND 0)
+      else()
+        list(APPEND MKL_LIBRARIES ${MKL_SCALAPACK_LIB})
+        set(MKL_SCALAPACK_FOUND TRUE)
+      endif()
+    endif()
+    unset(_MKL_INDEXOF_SCALAPACK)
+  endif()
+  unset(_MKL_INTERFACE_LC)
+
   # Construct MKL_LIBRARIES and MKL_DEFINITIONS
   list(REMOVE_DUPLICATES MKL_DEFINITIONS)
   list(REMOVE_DUPLICATES MKL_LIBRARIES)


Rolling back with iOS deployment target (otherwise we can't build for armv7 anymore)

--- core/cmake/toolchains/ios.cmake
+++ core/cmake/toolchains/ios.cmake
@@ -5,7 +5,7 @@
   CACHE STRING "ios_archs"
 )

-set(IOS_DEPLOYMENT_TARGET 11.0
+set(IOS_DEPLOYMENT_TARGET 10.0
   CACHE STRING "ios_deployment_target"
 )


[cmake] Fix quote around parameter

[cmake] Fix quote around parameter

--- cmake/radium_setup_functions.cmake
+++ cmake/radium_setup_functions.cmake
@@ -431,7 +431,7 @@
     if (ARGS_FILES)
         set_target_properties(${ARGS_TARGET}
             PROPERTIES
-            RADIUM_TARGET_RESOURCES_FILES ${ARGS_FILES}
+            RADIUM_TARGET_RESOURCES_FILES "${ARGS_FILES}"
             )
     else ()
         file(GLOB_RECURSE ARGS_FILES RELATIVE ${ARGS_DIRECTORY} ${ARGS_DIRECTORY}/*)


refs #6198 install jemalloc so mongo can use it (and eventually mysql too)

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

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -24,6 +24,15 @@
 set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
   "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
 add_dependencies(jemalloc build_jemalloc)
+add_library(jemalloc_nopic STATIC IMPORTED)
+set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
+  "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
+add_dependencies(jemalloc_nopic build_jemalloc)
+
+install(
+  DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib"
+  DESTINATION .
+  )

 ## add lzma with an external project
 set(xz_configure_opts --with-pic --enable-static)


BUG: fix mantis 1185. deactivate hdf5, netcdf and xml2

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -29,14 +29,6 @@
   ADD_SUPERBUILD_CONFIGURE_VAR(EXPAT_ROOT    --with-expat)
   ADD_SUPERBUILD_CONFIGURE_VAR(CURL_ROOT     --with-curl "/bin/curl-config")
   ADD_SUPERBUILD_CONFIGURE_VAR(GEOS_ROOT     --with-geos "/bin/geos-config")
-
-  #if(USE_SYSTEM_TIFF)
-  #  if(NOT SYSTEM_TIFF_PREFIX STREQUAL "")
-  #    list(APPEND GDAL_SB_CONFIG --with-libtiff=${SYSTEM_TIFF_PREFIX})
-  #  endif()
-  #else()
-  #  list(APPEND GDAL_SB_CONFIG --with-libtiff=${SB_INSTALL_PREFIX})
-  #endif()

   if(UNIX)
     set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
@@ -57,7 +49,7 @@
         COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/${proj}/S2_patch ${GDAL_SB_SRC}
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
-      CONFIGURE_COMMAND
+      CONFIGURE_COMMAND
         # use 'env' because CTest launcher doesn't perform shell interpretation
         ${SB_ENV_CONFIGURE_CMD}
         ${GDAL_SB_BUILD_DIR}/configure
@@ -66,6 +58,10 @@
         --without-ogdi
         --without-jasper
         --with-sentinel2
+        --without-netcdf #netcdf is not added by superbuild. better to deactivate it.
+        --without-hdf4
+        --without-hdf5
+        --without-xml2
         ${GDAL_SB_CONFIG}
         ${GDAL_SB_EXTRA_OPTIONS}
       BUILD_COMMAND $(MAKE)


PKG: osx_pkgsetup.in -> macx_pkgsetup.in

--- SuperBuild/CMake/Package_Macro.cmake
+++ SuperBuild/CMake/Package_Macro.cmake
@@ -43,7 +43,7 @@

   set(PKGSETUP_IN_FILENAME linux_pkgsetup.in)
   if(APPLE)
-    set(PKGSETUP_IN_FILENAME osx_pkgsetup.in)
+    set(PKGSETUP_IN_FILENAME macx_pkgsetup.in)
   endif()
   configure_file(${PACKAGE_SUPPORT_FILES_DIR}/${PKGSETUP_IN_FILENAME}
     ${CMAKE_BINARY_DIR}/pkgsetup @ONLY)


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   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

 # 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
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


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 05)

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


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 04)

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


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 05)

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


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 06)

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


doc: skip 3rdparty/ from input

doc: skip 3rdparty/ from input

--- doc/Doxyfile.cmake
+++ doc/Doxyfile.cmake
@@ -674,7 +674,8 @@
 # Note that relative paths are relative to the directory from which doxygen is
 # run.

-EXCLUDE                = @CMAKE_CURRENT_SOURCE_DIR@/../src/gmio_support/stl_occ_utils.h
+EXCLUDE                = @CMAKE_CURRENT_SOURCE_DIR@/../src/gmio_support/stl_occ_utils.h \
+                         @CMAKE_CURRENT_SOURCE_DIR@/../src/3rdparty

 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
 # directories that are symbolic links (a Unix file system feature) are excluded


Move Xcode support to C++14

Move Xcode support to C++14

Ninja builds already inherit C++ from LLVM.

--- cmake/modules/SwiftXcodeSupport.cmake
+++ cmake/modules/SwiftXcodeSupport.cmake
@@ -100,8 +100,8 @@
   # Force usage of Clang.
   set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0"
       CACHE STRING "Xcode Compiler")
-  # Use C++'11.
-  set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11"
+  # Use C++'14.
+  set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14"
       CACHE STRING "Xcode C++ Language Standard")
   # Use libc++.
   set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++"


added profiling option to allow profiling/debug. Jira ticket BLD-300

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -115,6 +115,14 @@
   set_cflags_if_supported(
     -Wpacked
     )
+endif ()
+
+##
+option (PROFILING "Allow profiling and debug" OFF)
+if (PROFILING)
+  set_cflags_if_supported(
+    -fno-omit-frame-pointer
+  )
 endif ()

 ## this hits with optimized builds somewhere in ftleaf_split, we don't


BUG: Fixing of the compilation of the LAPACK and LAPACKE libraries

--- SuperBuild/External_LAPACK.cmake
+++ SuperBuild/External_LAPACK.cmake
@@ -86,8 +86,8 @@
       ${${proj}_DEPENDENCIES}
     )

-  set(${extProjName}_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/lib64/cmake/lapack-3.7.1/)
-  set(LAPACKE_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/lib64/cmake/lapacke-3.7.1/)
+  set(${extProjName}_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-build)
+  set(LAPACKE_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-build)

   message(STATUS "Appending dir: ${LAPACKE_DIR}")
   list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS LAPACKE_DIR:PATH)


CMake >= 2.8.3 required (FindPackageHandleStandardArgs was "buggy")

--- FindICU.cmake
+++ FindICU.cmake
@@ -1,4 +1,7 @@
 # This module can find the International Components for Unicode (ICU) Library
+#
+# Requirements:
+# - CMake >= 2.8.3
 #
 # The following variables will be defined for your use:
 #   - ICU_FOUND             : were all of your specified components found (include dependencies)?


Add dropbox to the list of external data

--- cmake/ITKExamplesExternalData.cmake
+++ cmake/ITKExamplesExternalData.cmake
@@ -26,6 +26,9 @@
 file:///var/bigharddrive/%(algo)/%(hash)")
 mark_as_advanced(ExternalData_URL_TEMPLATES)
 list(APPEND ExternalData_URL_TEMPLATES
+  # Data published on dropbox
+  "http://dl.dropbox.com/u/61255957/%(algo)/%(hash)"
+
   # Data published by MIDAS
   "http://midas.kitware.com/api/rest/midas.bitstream.by.hash?hash=%(hash)&algorithm=%(algo)"


try also -march=bdver1, should help open64

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -160,11 +160,13 @@
       list(APPEND _march_flag_list "k8")
       list(APPEND _available_vector_units_list "sse" "sse2" "sse3")
    elseif(TARGET_ARCHITECTURE STREQUAL "interlagos")
+      list(APPEND _march_flag_list "bdver1")
       list(APPEND _march_flag_list "bulldozer")
       list(APPEND _march_flag_list "barcelona")
       list(APPEND _march_flag_list "core2")
       list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4a" "sse4.1" "sse4.2" "avx" "xop" "fma4")
    elseif(TARGET_ARCHITECTURE STREQUAL "bulldozer")
+      list(APPEND _march_flag_list "bdver1")
       list(APPEND _march_flag_list "bulldozer")
       list(APPEND _march_flag_list "barcelona")
       list(APPEND _march_flag_list "core2")


[cmake] removes metis stuff from suitesparse find

--- cmake/modules/FindSuiteSparse.cmake
+++ cmake/modules/FindSuiteSparse.cmake
@@ -481,15 +481,6 @@
   ENDIF (NOT EXISTS ${SUITESPARSE_VERSION_FILE})
 ENDIF (SUITESPARSE_CONFIG_FOUND)

-# METIS (Optional dependency).
-FIND_LIBRARY(METIS_LIBRARY NAMES metis
-  PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
-IF (EXISTS ${METIS_LIBRARY})
-  MESSAGE(STATUS "Found METIS library: ${METIS_LIBRARY}.")
-ELSE (EXISTS ${METIS_LIBRARY})
-  MESSAGE(STATUS "Did not find METIS library (optional SuiteSparse dependency)")
-ENDIF (EXISTS ${METIS_LIBRARY})
-MARK_AS_ADVANCED(METIS_LIBRARY)

 # Only mark SuiteSparse as found if all required dependencies have been found.
 SET(SUITESPARSE_FOUND FALSE)


Fix SHA1 hash.

Fix SHA1 hash.

--- cmake/projects/libdill/hunter.cmake
+++ cmake/projects/libdill/hunter.cmake
@@ -10,7 +10,7 @@
     PACKAGE_NAME libdill
     VERSION "1.6"
     URL "https://github.com/isaachier/libdill/archive/hunter-1.6-p1.tar.gz"
-    SHA1 "fa46951cca010b6a829b9d8aaf6a94a221cc7002")
+    SHA1 "06a6aa00364007b2f19d942b503566bb15136a93")
 hunter_cmake_args(libdill CMAKE_ARGS
                   BUILD_TESTING=OFF
                   BUILD_PERF=OFF)


faster uselib

faster uselib

About 3 times faster on a fast machine with ssd disks, probably
much faster on slow disk machines

For HAL, the cmake.log is 42 times smaller: reduced from 563Mb to 13.5Mb
While keeping the CMakeCache.txt nearly identical

Change-Id: If9022aa48f70c49bb097fede19f7fd1f5e1b45d7
Reviewed-on: http://gerrit.aldebaran.lan:8080/10547
Tested-by: ckilner <3484075e8fc074f79e3af104726e0e82624120eb@aldebaran-robotics.com>
Reviewed-by: ckilner <3484075e8fc074f79e3af104726e0e82624120eb@aldebaran-robotics.com>

--- cmake/qibuild/internal/uselib.cmake
+++ cmake/qibuild/internal/uselib.cmake
@@ -29,28 +29,43 @@
   set(CMAKE_FIND_LIBRARY_SUFFIXES "${_backup}" PARENT_SCOPE)
 endfunction()

-
-#compute the dependencies list, removing duplicate
-function(_qi_use_lib_get_deps name _OUT_list)
+# Reworked to give a very similar CMakeCache as before
+# but be about three times faster
+#
+# We have to call find once on each dependence
+# We have to make a list where each dependence is to the right
+# of any dependencies that need it
+#
+# The logic needed is:
+#
+# _qi_use_lib_get_deps(DEPLIST, DEPS)
+#  DEPLIST.ADD(DEPS)
+#  foreach DEP in DEPS:
+#    if DEP not DEP.FOUND_ALREADY:
+#      DEEP FIND(DEP)
+#    if DEP_DEPENDS:
+#      ADD DEP_DEPNDS TO CACHE
+#      DEPLIST.ADD(DEP_DEPENDS)
+#  return dedupe(DEPLIST)
+#
+function(_qi_use_lib_get_deps dep_list_name)
+  # if no args, return quick
   set(_result ${ARGN})
   list(LENGTH _result _count)
   if (_count EQUAL 0)
     return()
   endif()

-  string(TOUPPER ${name} _U_NAME)
+  # we may already have items in the entry list
+  # TODO some of ARGN could be lower case
+  # LIST(APPEND ${dep_list_name} ${ARGN})

   foreach(_pkg ${ARGN})
-    if (${name} STREQUAL ${_pkg})
-      qi_warning("Package ${name} depends on ${_pkg} this is a recursive dependencies, please fix ${name}.")
-    else()
-      string(TOUPPER ${_pkg} _U_PKG)
-      # First, we search for *-config.cmake files
-      # generated by qiBuild, then we look
-      # for upstream Find-*.cmake
-      # See: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package
-      if (NOT ${_U_PKG}_SEARCHED AND NOT ${_U_PKG}_PACKAGE_FOUND)
-
+    string(TOUPPER ${_pkg} _U_PKG)
+    LIST(APPEND ${dep_list_name} ${_U_PKG})
+
+    qi_global_get(_searched "${_U_PKG}_SEARCHED ")
+    if ( NOT _searched AND NOT ${_U_PKG}_PACKAGE_FOUND)
         _qi_check_for_static("${_U_PKG}" _backup_static)

         # find_package in two calls. The first call:
@@ -64,16 +79,31 @@
         if(NOT ${_U_PKG}_PACKAGE_FOUND)
           find_package(${_U_PKG} QUIET REQUIRED)
         endif()
-
         _qi_disable_check_for_static("${_backup_static}")
-
-        qi_set_global("${_U_PKG}_SEARCHED" TRUE)
-      endif()
-
-      foreach(_sub_dep ${${_U_PKG}_DEPENDS})
-        _qi_use_lib_get_deps("${_U_PKG}" _new_deps "${_sub_dep}")
-        list(APPEND _result ${_new_deps})
-      endforeach()
+        qi_global_set("${_U_PKG}_SEARCHED" TRUE)
+
+        # The find above may have found some dependencies
+        # but they may not be complete, and we need to call find
+        # once on every dependency
+        if (NOT "${${_U_PKG}_DEPENDS}" STREQUAL "")
+            qi_global_get(_deps_searched "${_U_PKG}_DEPS_SEARCHED")
+            # Check to see if we have done a deep find on this already.
+            # If so, we can skip going deep, and trust the dependency list
+            if (NOT "${_deps_searched}" STREQUAL "TRUE" )
+                # get dependencies recursively
+                _qi_use_lib_get_deps(${_U_PKG}_SUB_DEPS ${${_U_PKG}_DEPENDS})
+
+                # if we have dependencies, store the result of the call in the cache
+                if (NOT "${${_U_PKG}_SUB_DEPS}" STREQUAL "")
+                    set("${_U_PKG}_DEPENDS" ${${_U_PKG}_SUB_DEPS} CACHE INTERNAL "" FORCE)
+                endif()
+            endif()
+        endif()
+    endif()
+
+    # Add the depdencies for this package to the result
+    if (NOT "${${_U_PKG}_DEPENDS}" STREQUAL "")
+        LIST(APPEND ${dep_list_name} "${${_U_PKG}_DEPENDS}")
     endif()
   endforeach()

@@ -83,11 +113,11 @@
   # in fact, we could optimise if we want and only take the last one,
   # but REMOVE_DUPLICATES keep the first occurence
   # so ... we reverse the list, remove duplicate and reverse again!
-  list(REVERSE _result)
-  list(REMOVE_DUPLICATES _result)
-  list(REVERSE _result)
-
-  set(${_OUT_list} ${_result} PARENT_SCOPE)
+  list(REVERSE ${dep_list_name})
+  list(REMOVE_DUPLICATES ${dep_list_name})
+  list(REVERSE ${dep_list_name})
+
+  set(${dep_list_name} ${${dep_list_name}} PARENT_SCOPE)
 endfunction()

@@ -114,9 +144,9 @@
   cmake_parse_arguments(ARG "ASSUME_SYSTEM_INCLUDE" "" "DEPENDS" ${ARGN})
   set(ARG_DEPENDS ${ARG_UNPARSED_ARGUMENTS} ${ARG_DEPENDS})
   string(TOUPPER "${name}" _U_name)
-
-  # Compute a key to store the call of this function,
-  # using '@' as a separator
+  string(TOUPPER "${ARG_DEPENDS}" ARG_DEPENDS)
+
+  # Compute a key to store the call of this function, using '@' as a separator
   set(_key "_QI_USE_LIB_${_U_name}")
   foreach(_arg ${ARG_DEPENDS})
     set(_key "${_key}@${_arg}")
@@ -125,9 +155,10 @@
   if(DEFINED ${_key})
     # qi_use_lib already put in cache
   else()
-    _qi_use_lib_get_deps("${name}" _DEPS ${ARG_DEPENDS})
-    set("${_key}" ${_DEPS} CACHE STRING "" FORCE)
-    mark_as_advanced("${_key}")
+    _qi_use_lib_get_deps(_DEPS "${ARG_DEPENDS}")
+    set("${_key}" ${_DEPS})
+    qi_global_set("${_key}" ${_DEPS})
+
     # Append the new deps to the list of previous deps:
     set(_new_deps ${${_U_name}_DEPENDS} ${_DEPS})
     # reverse, remove duplicated and reverse again:
@@ -136,11 +167,15 @@
       list(REMOVE_DUPLICATES _new_deps)
       list(REVERSE _new_deps)
     endif()
-
     set("${_U_name}_DEPENDS" ${_new_deps} CACHE STRING "" FORCE)
     mark_as_advanced("${_U_name}_DEPENDS")
-  endif()
-
+
+    # Mark that we have already searched the dependencies of this
+    # For the moment, we will still need to call find on it at least once
+    # A future optimization could avoid the find of this for the next target
+    # in this project, or even across projects (risky)
+    qi_global_set(${_U_name}_DEPS_SEARCHED TRUE)
+  endif()

   # Sort include dirs, add dependencies, link with the targets
   # and add correct compile definitions


fixed a bug in the architecture detection script and removed unused code from it. re #152 which should be fixed for now but i still have to figure out why GHOST wanted to try the SSE kernel if no SSE was detected. so the issue will stay open

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -136,28 +136,8 @@
 	endif(_cpu_model GREATER 64)
 endif()
 	endif(_vendor_id STREQUAL "GenuineIntel")
-endmacro()
-
-macro(OptimizeForArchitecture)
-	set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\".")
-set(_force)
-	if(NOT _last_target_arch STREQUAL "${TARGET_ARCHITECTURE}")
-	message(STATUS "target changed from \"${_last_target_arch}\" to \"${TARGET_ARCHITECTURE}\"")
-	set(_force FORCE)
-endif()
-	set(_last_target_arch "${TARGET_ARCHITECTURE}" CACHE STRING "" FORCE)
-mark_as_advanced(_last_target_arch)
-	string(TOLOWER "${TARGET_ARCHITECTURE}" TARGET_ARCHITECTURE)
-
-	set(_march_flag_list)
-set(_available_vector_units_list)
-
-	if(TARGET_ARCHITECTURE STREQUAL "auto")
-AutodetectHostArchitecture()
-	message(STATUS "Detected CPU: ${TARGET_ARCHITECTURE}")
-	endif(TARGET_ARCHITECTURE STREQUAL "auto")
-
-	if(TARGET_ARCHITECTURE STREQUAL "core")
+
+    if(TARGET_ARCHITECTURE STREQUAL "core")
 	list(APPEND _march_flag_list "core2")
 	list(APPEND _available_vector_units_list "sse" "sse2" "sse3")
 	elseif(TARGET_ARCHITECTURE STREQUAL "merom")
@@ -244,8 +224,8 @@
 	else(TARGET_ARCHITECTURE STREQUAL "core")
 	message(FATAL_ERROR "Unknown target architecture: \"${TARGET_ARCHITECTURE}\". Please set TARGET_ARCHITECTURE to a supported value.")
 	endif(TARGET_ARCHITECTURE STREQUAL "core")
-
-	if(NOT TARGET_ARCHITECTURE STREQUAL "none")
+
+    if(NOT TARGET_ARCHITECTURE STREQUAL "none")
 	set(_disable_vector_unit_list)
 set(_enable_vector_unit_list)
 	_my_find(_available_vector_units_list "sse2" SSE2_FOUND)
@@ -284,187 +264,6 @@
 	set(USE_XOP    ${XOP_FOUND}    CACHE BOOL "Use XOP." ${_force})
 	set(USE_FMA4   ${FMA4_FOUND}   CACHE BOOL "Use FMA4." ${_force})
 	mark_as_advanced(USE_SSE2 USE_SSE3 USE_SSSE3 USE_SSE4_1 USE_SSE4_2 USE_SSE4a USE_AVX USE_AVX2 USE_XOP USE_FMA4)
-if(USE_SSE2)
-	list(APPEND _enable_vector_unit_list "sse2")
-else(USE_SSE2)
-	list(APPEND _disable_vector_unit_list "sse2")
-	endif(USE_SSE2)
-if(USE_SSE3)
-	list(APPEND _enable_vector_unit_list "sse3")
-else(USE_SSE3)
-	list(APPEND _disable_vector_unit_list "sse3")
-	endif(USE_SSE3)
-if(USE_SSSE3)
-	list(APPEND _enable_vector_unit_list "ssse3")
-else(USE_SSSE3)
-	list(APPEND _disable_vector_unit_list "ssse3")
-	endif(USE_SSSE3)
-if(USE_SSE4_1)
-	list(APPEND _enable_vector_unit_list "sse4.1")
-else(USE_SSE4_1)
-	list(APPEND _disable_vector_unit_list "sse4.1")
-	endif(USE_SSE4_1)
-if(USE_SSE4_2)
-	list(APPEND _enable_vector_unit_list "sse4.2")
-else(USE_SSE4_2)
-	list(APPEND _disable_vector_unit_list "sse4.2")
-	endif(USE_SSE4_2)
-if(USE_SSE4a)
-	list(APPEND _enable_vector_unit_list "sse4a")
-else(USE_SSE4a)
-	list(APPEND _disable_vector_unit_list "sse4a")
-	endif(USE_SSE4a)
-if(USE_AVX)
-	list(APPEND _enable_vector_unit_list "avx")
-# we want SSE intrinsics to result in instructions using the VEX prefix.
-# Otherwise integer ops (which require the older SSE intrinsics) would
-# always have a large penalty.
-	list(APPEND _enable_vector_unit_list "sse2avx")
-else(USE_AVX)
-	list(APPEND _disable_vector_unit_list "avx")
-	endif(USE_AVX)
-if(USE_XOP)
-	list(APPEND _enable_vector_unit_list "xop")
-else()
-	list(APPEND _disable_vector_unit_list "xop")
-	endif()
-if(USE_FMA4)
-	list(APPEND _enable_vector_unit_list "fma4")
-else()
-	list(APPEND _disable_vector_unit_list "fma4")
-	endif()
-	if(MSVC)
-# MSVC on 32 bit can select /arch:SSE2 (since 2010 also /arch:AVX)
-# MSVC on 64 bit cannot select anything (should have changed with MSVC 2010)
-	_my_find(_enable_vector_unit_list "avx" _avx)
-	set(_avx_flag FALSE)
-if(_avx)
-	set(ARCH_FLAGS "${ARCH_FLAGS} /arch:AVX")
-#AddCompilerFlag("/arch:AVX" CXX_FLAGS ARCH_FLAGS CXX_RESULT _avx_flag)
-	endif()
-if(NOT _avx_flag)
-	_my_find(_enable_vector_unit_list "sse2" _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} /arch:SSE2")
-#AddCompilerFlag("/arch:SSE2" CXX_FLAGS ARCH_FLAGS)
-	endif()
-	endif()
-foreach(_flag ${_enable_vector_unit_list})
-	string(TOUPPER "${_flag}" _flag)
-	string(REPLACE "." "_" _flag "__${_flag}__")
-	add_definitions("-D${_flag}")
-endforeach(_flag)
-	elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") # ICC (on Linux)
-	_my_find(_available_vector_units_list "avx2"    _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xCORE-AVX2")
-#AddCompilerFlag("-xCORE-AVX2" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	_my_find(_available_vector_units_list "f16c"    _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xCORE-AVX-I")
-#AddCompilerFlag("-xCORE-AVX-I" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	_my_find(_available_vector_units_list "avx"    _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xAVX")
-#AddCompilerFlag("-xAVX" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	_my_find(_available_vector_units_list "sse4.2" _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xSSE4.2")
-#AddCompilerFlag("-xSSE4.2" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	_my_find(_available_vector_units_list "sse4.1" _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xSSE4.1")
-#AddCompilerFlag("-xSSE4.1" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	_my_find(_available_vector_units_list "ssse3"  _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xSSSE3")
-#AddCompilerFlag("-xSSSE3" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	_my_find(_available_vector_units_list "sse3"   _found)
-if(_found)
-# If the target host is an AMD machine then we still want to use -xSSE2 because the binary would refuse to run at all otherwise
-	_my_find(_march_flag_list "barcelona" _found)
-if(NOT _found)
-	_my_find(_march_flag_list "k8-sse3" _found)
-	endif(NOT _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xSSE2")
-#AddCompilerFlag("-xSSE2" CXX_FLAGS ARCH_FLAGS)
-else(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xSSE3")
-#AddCompilerFlag("-xSSE3" CXX_FLAGS ARCH_FLAGS)
-	endif(_found)
-else(_found)
-	_my_find(_available_vector_units_list "sse2"   _found)
-if(_found)
-	set(ARCH_FLAGS "${ARCH_FLAGS} -xSSE2")
-#AddCompilerFlag("-xSSE2" CXX_FLAGS ARCH_FLAGS)
-	endif(_found)
-	endif(_found)
-	endif(_found)
-	endif(_found)
-	endif(_found)
-	endif(_found)
-	endif(_found)
-endif(_found)
-	else() # not MSVC and not ICC => GCC, Clang, Open64
-foreach(_flag ${_march_flag_list})
-	set(ARCH_FLAGS "${ARCH_FLAGS} -march=${_flag}")
-#AddCompilerFlag("-march=${_flag}" CXX_RESULT _good CXX_FLAGS ARCH_FLAGS)
-	if(_good)
-	break()
-	endif(_good)
-	endforeach(_flag)
-foreach(_flag ${_enable_vector_unit_list})
-	set(ARCH_FLAGS "${ARCH_FLAGS} -m${_flag}")
-#AddCompilerFlag("-m${_flag}" CXX_RESULT _result)
-	if(_result)
-set(_header FALSE)
-	if(_flag STREQUAL "sse3")
-	set(_header "pmmintrin.h")
-	elseif(_flag STREQUAL "ssse3")
-	set(_header "tmmintrin.h")
-	elseif(_flag STREQUAL "sse4.1")
-	set(_header "smmintrin.h")
-	elseif(_flag STREQUAL "sse4.2")
-	set(_header "smmintrin.h")
-	elseif(_flag STREQUAL "sse4a")
-	set(_header "ammintrin.h")
-	elseif(_flag STREQUAL "avx")
-	set(_header "immintrin.h")
-	elseif(_flag STREQUAL "fma4")
-	set(_header "x86intrin.h")
-	elseif(_flag STREQUAL "xop")
-	set(_header "x86intrin.h")
-endif()
-	set(_resultVar "HAVE_${_header}")
-	string(REPLACE "." "_" _resultVar "${_resultVar}")
-if(_header)
-	CHECK_INCLUDE_FILE("${_header}" ${_resultVar} "-m${_flag}")
-if(NOT ${_resultVar})
-	set(_useVar "USE_${_flag}")
-	string(TOUPPER "${_useVar}" _useVar)
-	string(REPLACE "." "_" _useVar "${_useVar}")
-	message(STATUS "disabling ${_useVar} because ${_header} is missing")
-set(${_useVar} FALSE)
-	list(APPEND _disable_vector_unit_list "${_flag}")
-	endif()
-	endif()
-if(NOT _header OR ${_resultVar})
-	set(ARCH_FLAGS "${ARCH_FLAGS} -m${_flag}")
-	endif()
-	endif()
-	endforeach(_flag)
-foreach(_flag ${_disable_vector_unit_list})
-	set(ARCH_FLAGS "${ARCH_FLAGS} -mno-${_flag}")
-#AddCompilerFlag("-mno-${_flag}" CXX_FLAGS ARCH_FLAGS)
-	endforeach(_flag)
-	endif()
-	endif()
-endmacro(OptimizeForArchitecture)
-
+endif()
+endmacro()
+


Added new source files to the build

Added new source files to the build

--- allocore/modules/gl_module.cmake
+++ allocore/modules/gl_module.cmake
@@ -16,6 +16,7 @@
     allocore/graphics/al_Slab.hpp
     allocore/graphics/al_Stereographic.hpp
     allocore/graphics/al_Texture.hpp
+    allocore/graphics/al_VBO.hpp
     allocore/io/al_App.hpp
     allocore/io/al_ControlNav.hpp
     allocore/io/al_RenderToDisk.hpp
@@ -38,9 +39,11 @@
   src/graphics/al_Shapes.cpp
   src/graphics/al_Stereographic.cpp
   src/graphics/al_Texture.cpp
+  src/graphics/al_VBO.cpp
   src/io/al_App.cpp
   src/io/al_RenderToDisk.cpp
-  src/io/al_Window.cpp)
+  src/io/al_Window.cpp
+  )

 # TODO empty  allocore/graphics/al_Slab.hpp, remove?


[CMAKE] Add a check_linker_flag function

Summary:
Separate the check of the flag from its addition. This has the
beneficial side-effect to discard the need for removing the `Werror`
flag from `CMAKE_REQUIRED_FLAGS`, since its scope is now reduced.

There is no change in behavior.

Test Plan:
  ninja check
Run the Gitian builds

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, deadalnix, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D4961

--- cmake/modules/AddCompilerFlags.cmake
+++ cmake/modules/AddCompilerFlags.cmake
@@ -116,43 +116,46 @@
 # However since CMake 3.2 introduced the CMP0056 policy, the
 # CMAKE_EXE_LINKER_FLAGS variable is used by the try_compile function, so there
 # is a workaround that allow for testing the linker flags.
+function(check_linker_flag RESULT FLAG)
+	# Some linkers (e.g.: Clang) will issue a -Wunused-command-line-argument
+	# warning when an unknown linker flag is set.
+	# Using -Werror will promote these warnings to errors so
+	# CHECK_CXX_COMPILER_FLAG() will return false, preventing the flag from
+	# being set.
+	add_compiler_flags_to_var(
+		CMAKE_REQUIRED_FLAGS
+		CXX
+		"-Werror=unused-command-line-argument"
+	)
+
+	# Save the current linker flags
+	set(SAVE_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+
+	# If the flag is already set, avoid duplicating it
+	string(FIND "${CMAKE_EXE_LINKER_FLAGS}" "${FLAG}" FLAG_POSITION)
+	if(${FLAG_POSITION} LESS 0)
+		string(APPEND CMAKE_EXE_LINKER_FLAGS " ${FLAG}")
+	endif()
+
+	# CHECK_CXX_COMPILER_FLAG calls CHECK_CXX_SOURCE_COMPILES which in turn
+	# calls try_compile, so it will check our flag
+	CHECK_CXX_COMPILER_FLAG("" ${RESULT})
+
+	# Restore CMAKE_EXE_LINKER_FLAGS
+	set(CMAKE_EXE_LINKER_FLAGS ${SAVE_CMAKE_EXE_LINKER_FLAGS})
+
+	set(${RESULT} ${${RESULT}} PARENT_SCOPE)
+endfunction()
+
 function(add_linker_flags)
 	foreach(f ${ARGN})
 		sanitize_c_cxx_definition("have_linker_" ${f} FLAG_IS_SUPPORTED)

-		# Some linkers (e.g.: Clang) will issue a -Wunused-command-line-argument
-		# warning when an unknown linker flag is set.
-		# Using -Werror will promote these warnings to errors so
-		# CHECK_CXX_COMPILER_FLAG() will return false, preventing the flag from
-		# being set.
-		add_compiler_flags_to_var(
-			CMAKE_REQUIRED_FLAGS
-			CXX
-			"-Werror=unused-command-line-argument"
-		)
+		check_linker_flag(${FLAG_IS_SUPPORTED} ${f})

-		# Save the current linker flags
-		set(SAVE_CMAKE_EXE_LINKERFLAGS ${CMAKE_EXE_LINKER_FLAGS})
-
-		# If the flag is already set, avoid duplicating it
-		string(FIND "${CMAKE_EXE_LINKER_FLAGS}" "${f}" FLAG_POSITION)
-		if(${FLAG_POSITION} LESS 0)
+		# If the flag is supported, add it to CMAKE_EXE_LINKER_FLAGS
+		if(${FLAG_IS_SUPPORTED})
 			string(APPEND CMAKE_EXE_LINKER_FLAGS " ${f}")
-		endif()
-
-		# CHECK_CXX_COMPILER_FLAG calls CHECK_CXX_SOURCE_COMPILES which in turn
-		# calls try_compile, so it will check our flag
-		CHECK_CXX_COMPILER_FLAG("" ${FLAG_IS_SUPPORTED})
-
-		# Unset the -Werror=unused-command-line-argument flag if it is set.
-		remove_compiler_flags_from_var(
-			CMAKE_REQUIRED_FLAGS
-			"-Werror=unused-command-line-argument"
-		)
-
-		# If the flag is not supported restore CMAKE_EXE_LINKER_FLAGS
-		if(NOT ${FLAG_IS_SUPPORTED})
-			set(CMAKE_EXE_LINKER_FLAGS ${SAVE_CMAKE_EXE_LINKERFLAGS})
 		endif()
 	endforeach()
 	set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} PARENT_SCOPE)


Changing CMake settings back to default zlib

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -95,7 +95,7 @@
 ROOT_BUILD_OPTION(clad ON "Enable clad, the cling automatic differentiation plugin.")
 ROOT_BUILD_OPTION(cling ON "Enable new CLING C++ interpreter")
 ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
-set(compression_default "lz4" CACHE STRING "ROOT compression algorithm used as a default, default option is lz4. Can be lz4, zlib, or lzma")
+set(compression_default "zlib" CACHE STRING "ROOT compression algorithm used as a default, default option is zlib. Can be lz4, zlib, or lzma")
 ROOT_BUILD_OPTION(cuda OFF "Use CUDA if it is found in the system")
 ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
 ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
@@ -188,8 +188,8 @@
 #--- Compression algorithms in ROOT-------------------------------------------------------------
 if(NOT compression_default MATCHES "zlib|lz4|lzma")
   message(STATUS "Not supported compression algorithm, ROOT compression algorithms are zlib, lzma and lz4.
-    ROOT will fall back to default algorithm: lz4")
-  set(compression_default "lz4" CACHE STRING "" FORCE)
+    ROOT will fall back to default algorithm: zlib")
+  set(compression_default "zlib" CACHE STRING "" FORCE)
 else()
   message(STATUS "ROOT default compression algorithm is " ${compression_default})
 endif()


ENH: upgrade SuperBuild GDAL to 3.2.1

ENH: upgrade SuperBuild GDAL to 3.2.1

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -112,10 +112,10 @@
     ${GDAL_SB_EXTRA_OPTIONS}
     )

-  # For now gdal is built if Superbuild has find python... And only on UNIX
+  # For now gdal is built if Superbuild has find python... And only on UNIX
   # That might be a problem
   # User will not be able to override this...
-  if ( OTB_WRAP_PYTHON AND PYTHON_EXECUTABLE)
+  if(OTB_WRAP_PYTHON AND PYTHON_EXECUTABLE)
     list(APPEND GDAL_CONFIGURE_COMMAND "--with-python=${PYTHON_EXECUTABLE}")
   endif()

@@ -128,11 +128,11 @@
   foreach(opt_line ${GDAL_SB_EXTRA_OPTIONS})
     file(APPEND "${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt" "${opt_line}\r\n")
   endforeach()
-
+
   if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
     file(APPEND "${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt" "WIN64=YES\r\n")
   endif()
-
+
   set(GDAL_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E touch  ${CMAKE_BINARY_DIR}/configure)
   set(GDAL_BUILD_COMMAND nmake
     /f ${GDAL_SB_SRC}/makefile.vc
@@ -149,8 +149,8 @@

 ExternalProject_Add(GDAL
   PREFIX GDAL
-  URL "http://download.osgeo.org/gdal/3.1.0/gdal-3.1.0.tar.gz"
-  URL_MD5 bda0f002cd63b51c8d2f1b1400daffa9
+  URL "https://download.osgeo.org/gdal/3.2.1/gdal-3.2.1.tar.xz"
+  URL_MD5 cf7fe042403e73ad991aa5797247b586
   SOURCE_DIR ${GDAL_SB_SRC}
   BINARY_DIR ${GDAL_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


ENH: Deactivate PROJ's test building

ENH: Deactivate PROJ's test building

--- SuperBuild/CMake/External_proj.cmake
+++ SuperBuild/CMake/External_proj.cmake
@@ -28,7 +28,7 @@
 ExternalProject_Add(PROJ
   DEPENDS ${PROJ_DEPENDENCIES}
   PREFIX PROJ
-  URL "http://download.osgeo.org/proj/proj-6.2.1.tar.gz"
+  URL "http://download.osgeo.org/proj/proj-6.2.1.tar.gz"  # If we update PROJ to v7+, check option PROJ_TESTS!
   URL_MD5 9f874e227d221daf95f7858dc55dfa3e
   BINARY_DIR ${PROJ_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
@@ -40,6 +40,7 @@
   -DBUILD_FRAMEWORKS_AND_BUNDLE:BOOL=FALSE
   -DPROJ_LIB_SUBDIR:STRING=lib
   -DPROJ_INCLUDE_SUBDIR:STRING=include
+  -DPROJ_TESTS:BOOL=OFF  # Starting with PROJ 7.0, the PROJ_TESTS option has been renamed into BUILD_TESTING
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   LOG_DOWNLOAD 1
   LOG_CONFIGURE 1


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 10)

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


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   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


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 06)

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