Skip try_compile test when the found lib does not the armv7 arch.

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -238,9 +238,12 @@
                 else ()
                     set (CMAKE_TRY_COMPILE_CONFIGURATION Debug)
                 endif ()
+            elseif (IOS)
+                # Debug build does not produce universal binary library, so we could not test compile against the library
+                execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} COMMAND grep -cq armv7 RESULT_VARIABLE SKIP_COMPILE_TEST OUTPUT_QUIET ERROR_QUIET)
             endif ()
             set (COMPILER_FLAGS "${COMPILER_32BIT_FLAG} ${CMAKE_REQUIRED_FLAGS}")
-            if (URHO3D_LIB_TYPE STREQUAL MODULE)
+            if (SKIP_COMPILE_TEST OR URHO3D_LIB_TYPE STREQUAL MODULE)
                 # Module library type cannot be test linked so just assume it is a valid Urho3D module for now
                 set (URHO3D_COMPILE_RESULT 1)
             else ()
@@ -265,9 +268,8 @@
                 # Auto-discover build options used by the found library and export header
                 file (READ ${URHO3D_BASE_INCLUDE_DIR}/Urho3D.h EXPORT_HEADER)
                 if (IOS)
-                    # Since Urho3D library for iOS is a universal binary, we need another way to find out the compiler ABI when the library was built
-                    execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} COMMAND grep -cq 'x86_64' RESULT_VARIABLE GREP_RESULT OUTPUT_QUIET ERROR_QUIET)
-                    math (EXPR ABI_64BIT "1 - ${GREP_RESULT}")
+                    # Since Urho3D library for iOS is a universal binary (except when it was a Debug build), we need another way to find out the compiler ABI when the library was built
+                    execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} COMMAND grep -c x86_64 OUTPUT_VARIABLE ABI_64BIT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
                 elseif (MSVC)
                     if (COMPILER_STATIC_RUNTIME_FLAGS)
                         set (EXPORT_HEADER "${EXPORT_HEADER}#define URHO3D_STATIC_RUNTIME\n")


FindGROMACS.cmake: don't cache GROMACS_DEFINITIONS GROMACS_VERSION, remove GROMACS_DEP_LIBRARIES

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -44,54 +44,30 @@

 find_library(GROMACS_LIBRARY NAMES ${GROMACS_LIBRARY_NAME} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
 if (GROMACS_LIBRARY)
-  if("${GROMACS_LIBRARY}" MATCHES "lib(gmx|gromacs)[^;]*\\.a")
-    if(PC_GROMACS_LIBRARIES)
-      list(REMOVE_ITEM PC_GROMACS_LIBRARIES ${GROMACS_LIBRARY_NAME})
-      foreach (LIB ${PC_GROMACS_LIBRARIES})
-        find_library(GROMACS_${LIB} NAMES ${LIB} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
-        list(APPEND GMX_DEP_LIBRARIES ${GROMACS_${LIB}})
-        unset(GROMACS_${LIB} CACHE)
-      endforeach(LIB)
-    endif(PC_GROMACS_LIBRARIES)
-    if(PC_GROMACS_CFLAGS_OTHER)
-      foreach(LIB ${PC_GROMACS_CFLAGS_OTHER})
-        if (${LIB} MATCHES "thread")
-  	find_package(Threads REQUIRED)
-  	list(APPEND GMX_DEP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-        endif (${LIB} MATCHES "thread")
-      endforeach(LIB)
-    endif(PC_GROMACS_CFLAGS_OTHER)
-    set(GROMACS_DEP_LIBRARIES "${GMX_DEP_LIBRARIES}" CACHE FILEPATH "gromacs depency libs (only needed for static (.a) libgmx")
-  endif("${GROMACS_LIBRARY}" MATCHES "lib(gmx|gromacs)[^;]*\\.a")
   include(CheckLibraryExists)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" GromacsVersion "" FOUND_GROMACS_VERSION)
+  check_library_exists("${GROMACS_LIBRARY}" GromacsVersion "" FOUND_GROMACS_VERSION)
   if(NOT FOUND_GROMACS_VERSION)
-    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY and GROMACS_DEP_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so' -DGROMACS_DEP_LIBRARIES='/path/to/libblas.so;/path/to/libm.so')!")
+    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so;/path/to/libblas.so;/path/to/libm.so')!")
   endif(NOT FOUND_GROMACS_VERSION)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
+  check_library_exists("${GROMACS_LIBRARY}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
   if(NOT FOUND_GROMACS_INIT_MTOP)
     message(FATAL_ERROR "Could not find init_mtop in the gromacs library, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. This most likely means that your gromacs version is too old, we need at least gromacs 4.0.7.")
   endif(NOT FOUND_GROMACS_INIT_MTOP)
   set(GMX_VERSION 40)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" output_env_init "" FOUND_GROMACS_OUTPUT_ENV_INIT)
+  check_library_exists("${GROMACS_LIBRARY}" output_env_init "" FOUND_GROMACS_OUTPUT_ENV_INIT)
   if(FOUND_GROMACS_OUTPUT_ENV_INIT)
     set(GMX_VERSION 45)
   endif(FOUND_GROMACS_OUTPUT_ENV_INIT)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_domdec_vsites "" FOUND_GROMACS_INIT_DOMDEC_VSITES)
+  check_library_exists("${GROMACS_LIBRARY}" init_domdec_vsites "" FOUND_GROMACS_INIT_DOMDEC_VSITES)
   if(FOUND_GROMACS_INIT_DOMDEC_VSITES)
     set(GMX_VERSION 50)
   endif(FOUND_GROMACS_INIT_DOMDEC_VSITES)
-  set(GROMACS_VERSION ${GMX_VERSION} CACHE STRING "Gromacs lib interface version")
-
-  if( ( (    ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (NOT "${GROMACS_PKG}" MATCHES "_d$") ) OR
-      ( (NOT ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (    "${GROMACS_PKG}" MATCHES "_d$") ) )
-      message(WARNING "You are using ${GROMACS_LIBRARY}, but GROMACS_PKG was ${GROMACS_PKG}. There seems to be a mismatch in precision, single vs double, no ending vs. _d. If this is not the case ignore this warning otherwise enable set GROMACS_PKG correctly using -DGROMACS_PKG_OVERWRITE=lib(gmx|gromacs)(_d).")
-  endif()
+  set(GROMACS_VERSION ${GMX_VERSION})

   #Only set GROMACS_DEFINITIONS if GROMACS_LIBRARY was found
-  if ("${GROMACS_PKG}" MATCHES "_d$")
+  if ("${GROMACS_LIBRARY}" MATCHES "lib[^/]*_d\\.[^.]*$")
     list(APPEND GMX_DEFS "-DGMX_DOUBLE")
-  endif ("${GROMACS_PKG}" MATCHES "_d$")
+  endif ("${GROMACS_LIBRARY}" MATCHES "lib[^/]*_d\\.[^.]*$")
   if (PC_GROMACS_CFLAGS_OTHER)
     foreach(DEF ${PC_GROMACS_CFLAGS_OTHER})
       if (${DEF} MATCHES "^-D")
@@ -100,7 +76,7 @@
     endforeach(DEF)
     list(REMOVE_DUPLICATES GMX_DEFS)
   endif (PC_GROMACS_CFLAGS_OTHER)
-  set(GROMACS_DEFINITIONS "${GMX_DEFS}" CACHE STRING "extra GROMACS definitions")
+  set(GROMACS_DEFINITIONS "${GMX_DEFS}")

 else(GROMACS_LIBRARY)
   set(GMX_VERSION 45)
@@ -116,7 +92,7 @@
   find_path(GROMACS_INCLUDE_DIR gromacs/fileio/tpxio.h HINTS ${PC_GROMACS_INCLUDE_DIRS})
 endif("${GROMACS_PKG}" MATCHES "libgmx")

-set(GROMACS_LIBRARIES "${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" )
+set(GROMACS_LIBRARIES "${GROMACS_LIBRARY}" )
 set(GROMACS_INCLUDE_DIRS ${GROMACS_INCLUDE_DIR} )

 include(FindPackageHandleStandardArgs)
@@ -124,4 +100,4 @@
 # if all listed variables are TRUE
 find_package_handle_standard_args(GROMACS DEFAULT_MSG GROMACS_LIBRARY GROMACS_INCLUDE_DIR)

-mark_as_advanced(GROMACS_INCLUDE_DIR GROMACS_LIBRARY GROMACS_DEFINITIONS GROMACS_PKG GROMACS_VERSION GROMACS_DEP_LIBRARIES)
+mark_as_advanced(GROMACS_INCLUDE_DIR GROMACS_LIBRARY GROMACS_PKG)


FindGROMACS.cmake: fix typo

FindGROMACS.cmake: fix typo

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -47,7 +47,7 @@
   include(CheckLibraryExists)
   check_library_exists("${GROMACS_LIBRARY}" GromacsVersion "" FOUND_GROMACS_VERSION)
   if(NOT FOUND_GROMACS_VERSION)
-    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so;/path/to/libblas.so;/path/to/libm.so')!")
+    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY by hand which sets the gromacs lib and it's dependencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so;/path/to/libblas.so;/path/to/libm.so')!")
   endif(NOT FOUND_GROMACS_VERSION)
   check_library_exists("${GROMACS_LIBRARY}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
   if(NOT FOUND_GROMACS_INIT_MTOP)


modified FindGSL.cmake

modified FindGSL.cmake

--- nested_sampling/src/FindGSL.cmake
+++ nested_sampling/src/FindGSL.cmake
@@ -1,32 +1,135 @@
-# - Find GSL
-# Find the native GSL includes and library
+# Try to find gnu scientific library GSL
+# See
+# http://www.gnu.org/software/gsl/  and
+# http://gnuwin32.sourceforge.net/packages/gsl.htm
 #
-#  GSL_INCLUDES    - where to find gsl/gsl_*.h, etc.
-#  GSL_LIBRARIES   - List of libraries when using GSL.
-#  GSL_FOUND       - True if GSL found.
-
-
-if (GSL_INCLUDES)
-  # Already in cache, be silent
-  set (GSL_FIND_QUIETLY TRUE)
-endif (GSL_INCLUDES)
-
-find_path (GSL_INCLUDES gsl/gsl_math.h)
-
-find_library (GSL_LIB NAMES gsl)
-
-set (GSL_CBLAS_LIB "" CACHE FILEPATH "If your program fails to link
-(usually because GSL is not automatically linking a CBLAS and no other
-component of your project provides a CBLAS) then you may need to point
-this variable to a valid CBLAS.  Usually GSL is distributed with
-libgslcblas.{a,so} (next to GSL_LIB) which you may use if an optimized
-CBLAS is unavailable.")
-
-set (GSL_LIBRARIES "${GSL_LIB}" "${GSL_CBLAS_LIB}")
-
-# handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE if
-# all listed variables are TRUE
-include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDES)
-
-mark_as_advanced (GSL_LIB GSL_CBLAS_LIB GSL_INCLUDES)+# Based on a script of Felix Woelk and Jan Woetzel
+# (www.mip.informatik.uni-kiel.de)
+#
+# It defines the following variables:
+#  GSL_FOUND - system has GSL lib
+#  GSL_INCLUDE_DIRS - where to find headers
+#  GSL_LIBRARIES - full path to the libraries
+#  GSL_LIBRARY_DIRS, the directory where the PLplot library is found.
+
+#  CMAKE_GSL_CXX_FLAGS  = Unix compiler flags for GSL, essentially "`gsl-config --cxxflags`"
+#  GSL_LINK_DIRECTORIES = link directories, useful for rpath on Unix
+#  GSL_EXE_LINKER_FLAGS = rpath on Unix
+
+set( GSL_FOUND OFF )
+set( GSL_CBLAS_FOUND OFF )
+
+# Windows, but not for Cygwin and MSys where gsl-config is available
+if( WIN32 AND NOT CYGWIN AND NOT MSYS )
+  # look for headers
+  find_path( GSL_INCLUDE_DIR
+    NAMES gsl/gsl_cdf.h gsl/gsl_randist.h
+    )
+  if( GSL_INCLUDE_DIR )
+    # look for gsl library
+    find_library( GSL_LIBRARY
+      NAMES gsl
+    )
+    if( GSL_LIBRARY )
+      set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
+      get_filename_component( GSL_LIBRARY_DIRS ${GSL_LIBRARY} PATH )
+      set( GSL_FOUND ON )
+    endif( GSL_LIBRARY )
+
+    # look for gsl cblas library
+    find_library( GSL_CBLAS_LIBRARY
+        NAMES gslcblas
+      )
+    if( GSL_CBLAS_LIBRARY )
+      set( GSL_CBLAS_FOUND ON )
+    endif( GSL_CBLAS_LIBRARY )
+
+    set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} )
+  endif( GSL_INCLUDE_DIR )
+
+  mark_as_advanced(
+    GSL_INCLUDE_DIR
+    GSL_LIBRARY
+    GSL_CBLAS_LIBRARY
+  )
+else( WIN32 AND NOT CYGWIN AND NOT MSYS )
+  if( UNIX OR MSYS )
+    find_program( GSL_CONFIG_EXECUTABLE gsl-config
+      /usr/bin/
+      /usr/local/bin
+    )
+
+    if( GSL_CONFIG_EXECUTABLE )
+      set( GSL_FOUND ON )
+
+      # run the gsl-config program to get cxxflags
+      execute_process(
+        COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --cflags
+        OUTPUT_VARIABLE GSL_CFLAGS
+        RESULT_VARIABLE RET
+        ERROR_QUIET
+        )
+      if( RET EQUAL 0 )
+        string( STRIP "${GSL_CFLAGS}" GSL_CFLAGS )
+        separate_arguments( GSL_CFLAGS )
+
+        # parse definitions from cflags; drop -D* from CFLAGS
+        string( REGEX MATCHALL "-D[^;]+"
+          GSL_DEFINITIONS  "${GSL_CFLAGS}" )
+        string( REGEX REPLACE "-D[^;]+;" ""
+          GSL_CFLAGS "${GSL_CFLAGS}" )
+
+        # parse include dirs from cflags; drop -I prefix
+        string( REGEX MATCHALL "-I[^;]+"
+          GSL_INCLUDE_DIRS "${GSL_CFLAGS}" )
+        string( REPLACE "-I" ""
+          GSL_INCLUDE_DIRS "${GSL_INCLUDE_DIRS}")
+        string( REGEX REPLACE "-I[^;]+;" ""
+          GSL_CFLAGS "${GSL_CFLAGS}")
+
+        message("GSL_DEFINITIONS=${GSL_DEFINITIONS}")
+        message("GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS}")
+        message("GSL_CFLAGS=${GSL_CFLAGS}")
+      else( RET EQUAL 0 )
+        set( GSL_FOUND FALSE )
+      endif( RET EQUAL 0 )
+
+      # run the gsl-config program to get the libs
+      execute_process(
+        COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --libs
+        OUTPUT_VARIABLE GSL_LIBRARIES
+        RESULT_VARIABLE RET
+        ERROR_QUIET
+        )
+      if( RET EQUAL 0 )
+        string(STRIP "${GSL_LIBRARIES}" GSL_LIBRARIES )
+        separate_arguments( GSL_LIBRARIES )
+
+        # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
+        string( REGEX MATCHALL "-L[^;]+"
+          GSL_LIBRARY_DIRS "${GSL_LIBRARIES}" )
+        string( REPLACE "-L" ""
+          GSL_LIBRARY_DIRS "${GSL_LIBRARY_DIRS}" )
+      else( RET EQUAL 0 )
+        set( GSL_FOUND FALSE )
+      endif( RET EQUAL 0 )
+
+      MARK_AS_ADVANCED(
+        GSL_CFLAGS
+      )
+      message( STATUS "Using GSL from ${GSL_PREFIX}" )
+    else( GSL_CONFIG_EXECUTABLE )
+      message( STATUS "FindGSL: gsl-config not found.")
+    endif( GSL_CONFIG_EXECUTABLE )
+  endif( UNIX OR MSYS )
+endif( WIN32 AND NOT CYGWIN AND NOT MSYS )
+
+if( GSL_FOUND )
+  if( NOT GSL_FIND_QUIETLY )
+    message( STATUS "FindGSL: Found both GSL headers and library" )
+  endif( NOT GSL_FIND_QUIETLY )
+else( GSL_FOUND )
+ if( GSL_FIND_REQUIRED )
+    message( FATAL_ERROR "FindGSL: Could not find GSL headers or library" )
+  endif( GSL_FIND_REQUIRED )
+endif( GSL_FOUND )


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)


Removed whitespace.

Removed whitespace.

--- modules/install_paths.cmake
+++ modules/install_paths.cmake
@@ -26,7 +26,6 @@
     "${LIB_INSTALL_DIR}/pkgconfig"
     CACHE PATH "The subdirectory to the header prefix (default prefix/lib/pkgconfig)"
   )
-
 endif (UNIX)

 if (WIN32)


fix compile problems with contributed ximgproc/xphoto

--- modules/python/common.cmake
+++ modules/python/common.cmake
@@ -21,6 +21,8 @@
 ocv_list_filterout(candidate_deps "^opencv_optflow$")
 ocv_list_filterout(candidate_deps "^opencv_bgsegm$")
 ocv_list_filterout(candidate_deps "^opencv_xfeatures2d$")
+ocv_list_filterout(candidate_deps "^opencv_ximgproc$")
+ocv_list_filterout(candidate_deps "^opencv_xphoto$")
 ocv_list_filterout(candidate_deps "^opencv_ts$")

 ocv_add_module(${MODULE_NAME} BINDINGS OPTIONAL ${candidate_deps})


[bfd][cygwin] Needs libiberty and libz

[bfd][cygwin] Needs libiberty and libz

--- cmake/Modules/FindLibBfd.cmake
+++ cmake/Modules/FindLibBfd.cmake
@@ -66,8 +66,9 @@
     ENV LD_LIBRARY_PATH)
 #message("LIBBFD_LIBRARY = ${LIBBFD_LIBRARY}")

-if (CMAKE_HOST_APPLE)
-  # required on Homebrew
+if (CMAKE_HOST_APPLE OR CYGWIN)
+  # required on Homebrew, Cygwin
+  # but not on Ubuntu, MSYS2
   find_library (LIBIBERTY_LIBRARY
     NAMES
     iberty


Remove regex matching to avoid escaping

Remove regex matching to avoid escaping

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -300,8 +300,8 @@
           if(NOT ${dir} MATCHES "^[$]")
              list(APPEND incdirs ${dir})
           endif()
-          string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" tmp_src_dir ${CMAKE_SOURCE_DIR})
-          if(${dir} MATCHES "^${tmp_src_dir}")
+          string(FIND ${dir} ${CMAKE_SOURCE_DIR} res)
+          if(${res} GREATER -1)
              list(APPEND headerdirs ${dir})
           endif()
        endforeach()


SuperBuild: fix proj 4.9.3 update on windows

--- SuperBuild/CMake/External_proj.cmake
+++ SuperBuild/CMake/External_proj.cmake
@@ -53,6 +53,9 @@
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
     CMAKE_CACHE_ARGS
     ${SB_CMAKE_CACHE_ARGS}
+    -DBUILD_LIBPROJ_SHARED:BOOL=ON
+    -DPROJ_LIB_SUBDIR:STRING=lib
+    -DPROJ_INCLUDE_SUBDIR:STRING=include
     CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )

@@ -64,7 +67,7 @@

 set(_SB_PROJ_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
 if(WIN32)
-  set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/proj_i.lib)
+  set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/proj_4_9.lib)
 elseif(UNIX)
   set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/libproj${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   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 08)

 # 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   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


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   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


COMP: Deactivated VideoSource Test until update to new openCV complete

--- Modules/US/Testing/files.cmake
+++ Modules/US/Testing/files.cmake
@@ -1,6 +1,6 @@
 SET(MODULE_TESTS
    mitkUSImageTest.cpp
-   mitkUSImageVideoSourceTest.cpp
+   #mitkUSImageVideoSourceTest.cpp // deactivated until updated to current openCV
    mitkUSProbeTest.cpp
    mitkUSDeviceTest.cpp
    #mitkUSPipelineTest.cpp //deactivated until bugfix for mitkImage cloning available


OpenGL is always a dependency when Irrlicht has been compiled with OpenGL support. So search for it always, but only send a Warning when not found, when examples are build too, because only then link error could occur due to missing OpenGL.

--- CMake/Dependencies/DependencyOpenGL.cmake
+++ CMake/Dependencies/DependencyOpenGL.cmake
@@ -22,23 +22,26 @@
 # SOFTWARE.
 #

-if (IRRIMGUI_NATIVE_OPENGL)
-	message(STATUS "Looking for OpenGL header and library...")
+message(STATUS "Looking for OpenGL header and library...")

-	find_package(OpenGL)
+find_package(OpenGL)

-	if (OPENGL_FOUND)
-		MESSAGE(STATUS "OpenGL Correctly Found:")
-		MESSAGE(STATUS " * Include-Dir: ${OPENGL_INCLUDE_DIR}")
-		MESSAGE(STATUS " * Libraries: ${OPENGL_LIBRARIES}")
-		INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
-		SET(IRRIMGUI_DEPENDENCY_LIBRARIES
-		${IRRIMGUI_DEPENDENCY_LIBRARIES}
-		${OPENGL_LIBRARIES}
-		)
+if (OPENGL_FOUND)
+	MESSAGE(STATUS "OpenGL Correctly Found:")
+	MESSAGE(STATUS " * Include-Dir: ${OPENGL_INCLUDE_DIR}")
+	MESSAGE(STATUS " * Libraries: ${OPENGL_LIBRARIES}")
+	INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
+	SET(IRRIMGUI_DEPENDENCY_LIBRARIES
+	${IRRIMGUI_DEPENDENCY_LIBRARIES}
+	${OPENGL_LIBRARIES}
+	)

+else ()
+
+	if (IRRIMGUI_BUILD_EXAMPLES)
+		MESSAGE(WARNING "OpenGL environment missing, when Irrlicht is linked with OpenGL this will lead to linker errors for examples.")
 	else ()
-		MESSAGE(STATUS "OpenGL environment missing")
+		MESSAGE(STATUS "OpenGL environment missing.")
+	endif ()

-	endif ()
-endif ()+endif ()


The Xxf86vm library is linked with help of the X11 dependency file.

--- CMake/OperationSystems/UnixSettings.cmake
+++ CMake/OperationSystems/UnixSettings.cmake
@@ -22,11 +22,7 @@
 # SOFTWARE.
 #

-if (UNIX)
-	SET (OS_DEPENDENT_LIBRARIES
-		${OS_DEPENDENT_LIBRARIES}
-		Xxf86vm
-	)
+if ((UNIX) OR (APPLE))

 	SET (IMGUI_API_VALUE
 	)


removed temporary file

removed temporary file

--- examples/Boost-filesystem/build/_3rdParty/Hunter/config-id/config.cmake
+++ examples/Boost-filesystem/build/_3rdParty/Hunter/config-id/config.cmake
@@ -1,56 +0,0 @@
-include(hunter_config)
-hunter_config(Android-Apk VERSION 1.1.4)
-hunter_config(Android-Build-Tools VERSION 22.0.1)
-hunter_config(Android-Google-APIs VERSION 21)
-hunter_config(Android-Google-APIs-Intel-x86-Atom-System-Image VERSION 21)
-hunter_config(Android-Google-Repository VERSION 19)
-hunter_config(Android-Intel-x86-Atom-System-Image VERSION 21)
-hunter_config(Android-Modules VERSION 1.0.0)
-hunter_config(Android-SDK VERSION 0.0.1)
-hunter_config(Android-SDK-Platform VERSION 21_r02)
-hunter_config(Android-SDK-Platform-tools VERSION r22)
-hunter_config(Android-SDK-Tools VERSION 24.3)
-hunter_config(Android-Support-Repository VERSION 15)
-hunter_config(BZip2 VERSION 1.0.6-p1)
-hunter_config(Boost VERSION 1.58.0-p1)
-hunter_config(CLAPACK VERSION 3.2.1)
-hunter_config(Clang VERSION 3.6.0)
-hunter_config(ClangToolsExtra VERSION 3.6.0)
-hunter_config(Comet VERSION 4.0.1)
-hunter_config(CppNetlib VERSION 0.10.1-hunter-3)
-hunter_config(CppNetlibUri VERSION 1.0.4-hunter)
-hunter_config(CsvParserCPlusPlus VERSION 1.0.1)
-hunter_config(Eigen VERSION 3.2.4-p0)
-hunter_config(Expat VERSION 2.1.0)
-hunter_config(GPUImage VERSION 0.1.6-p5)
-hunter_config(GSL VERSION 1.16)
-hunter_config(GTest VERSION 1.7.0-hunter-10)
-hunter_config(Igloo VERSION 1.1.1-hunter)
-hunter_config(IntSizeof VERSION 1.0.0)
-hunter_config(JsonSpirit VERSION 0.0.4-hunter)
-hunter_config(LLVM VERSION 3.6.0)
-hunter_config(LLVMCompilerRT VERSION 3.6.0)
-hunter_config(Leathers VERSION 0.1.6)
-hunter_config(Libcxx VERSION 3.6.0)
-hunter_config(Libcxxabi VERSION 3.6.0)
-hunter_config(Libssh2 VERSION 1.4.4-patch-2)
-hunter_config(OpenCV VERSION 3.0.0-p2)
-hunter_config(OpenCV-Extra VERSION 3.0.0)
-hunter_config(OpenSSL VERSION 1.0.2a)
-hunter_config(PNG VERSION 1.6.16-p3)
-hunter_config(RapidJSON VERSION 0.11-hunter)
-hunter_config(Sober VERSION 0.1.2)
-hunter_config(Sources-for-Android-SDK VERSION 21)
-hunter_config(Sugar VERSION 1.2.2)
-hunter_config(TIFF VERSION 4.0.2-p3)
-hunter_config(Washer VERSION 0.1.2)
-hunter_config(WinSparkle VERSION 0.4.0)
-hunter_config(ZLIB VERSION 1.2.8-p3)
-hunter_config(ccv VERSION 0.7-p6)
-hunter_config(cvmatio VERSION 1.0.26)
-hunter_config(dlib VERSION 18.14-p1)
-hunter_config(ios_sim VERSION 3.1.1)
-hunter_config(ippicv VERSION 20141027)
-hunter_config(odb VERSION 2.4.0)
-hunter_config(sparsehash VERSION 2.0.2)
-hunter_config(wxWidgets VERSION 3.0.2)


Wrong name of source for ctest configure

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -54,7 +54,7 @@
 ctest_start (Experimental TRACK Experimental)

 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
-    SOURCE "${OTB_SOURCE_DIR}"
+    SOURCE "${CTEST_SOURCE_DIRECTORY}"
     OPTIONS "${CONFIGURE_OPTIONS}"
     RETURN_VALUE _configure_rv
     CAPTURE_CMAKE_ERROR _configure_error


ENH: CI: PKG: Fixed OTB_SOURCE_DIR.

ENH: CI: PKG: Fixed OTB_SOURCE_DIR.

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -21,6 +21,12 @@
 # This script is a prototype for the future CI, it may evolve rapidly in a near future

 include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
+
+set (ENV{LANG} "C") # Only ascii output
+
+get_filename_component( OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY )
+get_filename_component( CI_PROJ_DIR ${OTB_SOURCE_DIR} DIRECTORY )
+get_filename_component( CI_ROOT_DIR ${CI_PROJ_DIR} DIRECTORY )

 set ( DEBUG "1" )


ENH: CI: PKG: Fixed git update command.

ENH: CI: PKG: Fixed git update command.

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -60,6 +60,9 @@
 -DSUPERBUILD_INSTALL_DIR=${CI_ROOT_DIR}/xdk;\
 -DSUPERBUILD_BINARY_DIR=${OTB_SOURCE_DIR};" )

+# Look for a GIT command-line client.
+find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
+
 # Sources are already checked out : do nothing for update
 set(CTEST_GIT_UPDATE_CUSTOM echo No update)


COMP: Missing siftfast include

COMP: Missing siftfast include

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -49,7 +49,7 @@
   ${OTB_SOURCE_DIR}/Utilities/otbedison/segm
   ${OTB_SOURCE_DIR}/Utilities/otbedison/prompt
   ${OTB_SOURCE_DIR}/Utilities/otbedison/edge
-
+  ${OTB_SOURCE_DIR}/Utilities/otbsiftfast
 )
 IF(OTB_COMPILE_JPEG2000)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
@@ -219,6 +219,7 @@
 # ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3/contrib
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbliblas/include
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbedison
+  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbsiftfast
 )

 IF(OTB_COMPILE_JPEG2000)


ENH: provide hint for git location

ENH: provide hint for git location

--- Testing/Dashboard/pxDashboardCommon.cmake
+++ Testing/Dashboard/pxDashboardCommon.cmake
@@ -90,7 +90,9 @@

 # Look for a GIT command-line client.
 if( NOT DEFINED CTEST_GIT_COMMAND )
-  find_program( CTEST_GIT_COMMAND NAMES git git.cmd )
+  find_program( CTEST_GIT_COMMAND
+    NAMES git git.cmd
+    HINTS "C:/cygwin/bin/" )
 endif()
 if( NOT DEFINED CTEST_GIT_COMMAND )
   message( FATAL_ERROR "No Git Found." )


Fix typo

Fix typo

--- cmake/FindChronoEngine.cmake
+++ cmake/FindChronoEngine.cmake
@@ -279,7 +279,7 @@
           PATHS ${CH_LIBDIR_DEBUG}
           )

-        SET(HRONOENGINE_LIBRARY_PYPARSER "")
+        SET(CHRONOENGINE_LIBRARY_PYPARSER "")
         IF(CHRONOENGINE_LIBRARY_PYPARSER_RELEASE)
           SET(CHRONOENGINE_LIBRARY_PYPARSER
             ${CHRONOENGINE_LIBRARY_PYPARSER}


fixed compilation warnings in .cu files

fixed compilation warnings in .cu files

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -174,6 +174,14 @@

       # we remove -Wsign-promo as it generates warnings under linux
       string(REPLACE "-Wsign-promo" "" ${var} "${${var}}")
+
+      # we remove -Wno-delete-non-virtual-dtor because it's used for C++ compiler
+      # but NVCC uses C compiler by default
+      string(REPLACE "-Wno-delete-non-virtual-dtor" "" ${var} "${${var}}")
+
+      # we remove -frtti because it's used for C++ compiler
+      # but NVCC uses C compiler by default
+      string(REPLACE "-frtti" "" ${var} "${${var}}")
     endforeach()

     if(BUILD_SHARED_LIBS)


[cmake] added libfuzzer flags (for convenient switching fuzzing on/off)

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -302,6 +302,7 @@
 		GCC_FLAG_SANITIZE
 		DESCRIPTION "Compile with a specific sanitizer instrumentation"
 		"-fsanitize=address" "-fsanitize=memory" "-fsanitize=thread"
+		"-fsanitize=fuzzer" "-fsanitize=fuzzer,address" "-fsanitize=fuzzer,memory"
 		)

 	axl_create_compiler_flag_setting (


[cmake] added gcc settings for -static-libgcc and -static-libstdc++ (static by default)

this way, the resulting binary has much better chances of running on different
linux distros

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -240,6 +240,20 @@
 		)

 	axl_create_compiler_flag_setting (
+		GCC_FLAG_STATIC_LIBGCC
+		DESCRIPTION "Use static linkage to libgcc"
+		DEFAULT "-static-libgcc"
+		"-static-libgcc"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_CPP_STATIC_LIBSTDCPP
+		DESCRIPTION "Use static linkage to libstdc++"
+		DEFAULT "-static-libstdc++"
+		"-static-libstdc++"
+		)
+
+	axl_create_compiler_flag_setting (
 		GCC_FLAG_CPP_RTTI
 		DESCRIPTION "GNU C++ emits RTTI info"
 		"-frtti" "-fno-rtti"


[cmake] added a few warning-suppressing options for GCC (mostly, to use Xcode comfortably)

CMake generator for Xcode forces -Wmost, thus many non-default warnings clutter the output when building. With these newly added settings, silencing these warning can be done via an external settings.cmake with lines like: axl_override_setting (GCC_FLAG_WARNING_UNUSED_VALUE -Wno-unused-value)

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -330,7 +330,7 @@
 	# that is because GCC diagnostic pragmas get lost if defined in precompiled headers

 	axl_create_compiler_flag_setting (
-		GCC_FLAG_WARNING_UNKNOWN_WARNING_OPTIONS
+		GCC_FLAG_WARNING_UNKNOWN_WARNING_OPTION
 		DESCRIPTION "Warn about unknown warning command-line options"
 		DEFAULT "-Wno-unknown-warning-option"
 		"-Wunknown-warning-option" "-Wno-unknown-warning-option"
@@ -397,6 +397,24 @@
 		"-Wno-stringop-overflow"
 		)

+	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_MISSING_BRACES
+		DESCRIPTION "Warn about missing braces in aggregate initializers"
+		"-Wmissing-braces" "-Wno-missing-braces"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_UNUSED_VARIABLE
+		DESCRIPTION "Warn about unused variables"
+		"-Wunused-variable" "-Wno-unused-variable"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_UNUSED_VALUE
+		DESCRIPTION "Warn about unused expressions"
+		"-Wunused-value" "-Wno-unused-value"
+		)
+
 	# C++ specific warnings

 	axl_create_compiler_flag_setting (
@@ -411,6 +429,12 @@
 		DESCRIPTION "Warn about narrowing conversions"
 		DEFAULT "-Wno-narrowing"
 		"-Wnarrowing" "-Wno-narrowing"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_CPP_DELETE_NON_VIRTUAL_DTOR
+		DESCRIPTION "Warn about calling non-virtual dtor of a class with virtual funtions"
+		"-Wdelete-non-virtual-dtor" "-Wno-delete-non-virtual-dtor"
 		)

 	# the cppcheck static analyzer (introduced in CMake 3.10)


Fix libxml2 build

Fix libxml2 build

--- cmake/external/libxml2.cmake
+++ cmake/external/libxml2.cmake
@@ -38,6 +38,7 @@
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${LIBXML2_SRC_DIR}/autogen.sh --without-python
                                                     --prefix=${LIBXML2_INSTALL_DIR}
+                                                    --enable-static
                                                     CC=${CMAKE_C_COMPILER}
                                                     CXX=${CMAKE_CXX_COMPILER}
                                                     CFLAGS=${LIBXML2_CFLAGS}


Sort LLVM_VERSION_INFO

Sort LLVM_VERSION_INFO

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -413,6 +413,9 @@
 /* Define if we have the oprofile JIT-support library */
 #cmakedefine01 LLVM_USE_OPROFILE

+/* LLVM version information */
+#cmakedefine LLVM_VERSION_INFO "${LLVM_VERSION_INFO}"
+
 /* Major version of the LLVM API */
 #define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR}

@@ -425,9 +428,6 @@
 /* LLVM version string */
 #define LLVM_VERSION_STRING "${PACKAGE_VERSION}"

-/* LLVM version information */
-#cmakedefine LLVM_VERSION_INFO "${LLVM_VERSION_INFO}"
-
 /* Define to the extension used for shared libraries, say, ".so". */
 #cmakedefine LTDL_SHLIB_EXT "${LTDL_SHLIB_EXT}"


build: prefer SWIFT_SDK_*_OBJECT_FORMAT

build: prefer SWIFT_SDK_*_OBJECT_FORMAT

Fix another instance of a SDK target check in favour of the object format check.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -647,8 +647,7 @@

   # The section metadata objects are generated sources, and we need to tell CMake
   # not to expect to find them prior to their generation.
-  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "FREEBSD")
+  if("${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
     if("${libkind}" STREQUAL "SHARED")
       set_source_files_properties(${SWIFT_SECTIONS_OBJECT_BEGIN} PROPERTIES GENERATED 1)
       set_source_files_properties(${SWIFT_SECTIONS_OBJECT_END} PROPERTIES GENERATED 1)


Fixes to deal with  gfal version 1 and 2

Fixes to deal with  gfal version 1 and 2

--- cmake/modules/FindGFAL.cmake
+++ cmake/modules/FindGFAL.cmake
@@ -7,22 +7,27 @@
 #  GFAL_LIBRARIES (not cached)

 find_path(GFAL_INCLUDE_DIR NAMES gfal_api.h
-          PATH_SUFFIXES gfal2 gfal
+          PATH_SUFFIXES . gfal gfal2
           HINTS ${GFAL_DIR}/include $ENV{GFAL_DIR}/include)
-find_library(GFAL_LIBRARY NAMES gfal gfal2
+find_library(GFAL_LIBRARY NAMES gfal gfal2
              HINTS ${GFAL_DIR}/lib $ENV{GFAL_DIR}/lib)
 find_path(SRM_IFCE_INCLUDE_DIR  gfal_srm_ifce_types.h
           HINTS ${SRM_IFCE_DIR}/include $ENV{SRM_IFCE_DIR}/include)
-find_path(GLIB_INCLUDE_DIR NAMES glib.h
-          PATH_SUFFIXES glib-2.0 glib)
+
+if(GFAL_LIBRARY MATCHES gfal2)
+  find_path(GLIB_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0 glib)
+  if(GLIB_INCLUDE_DIR)
+    list(APPEND GFAL_INCLUDE_DIRS ${GLIB_INCLUDE_DIR})
+  endif()
+endif()

 set(GFAL_LIBRARIES ${GFAL_LIBRARY})
-set(GFAL_INCLUDE_DIRS ${GFAL_INCLUDE_DIR} ${SRM_IFCE_INCLUDE_DIR} ${GLIB_INCLUDE_DIR})
+set(GFAL_INCLUDE_DIRS ${GFAL_INCLUDE_DIR} ${SRM_IFCE_INCLUDE_DIR})
+

 # handle the QUIETLY and REQUIRED arguments and set GFAL_FOUND to TRUE if
 # all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GFAL DEFAULT_MSG GFAL_INCLUDE_DIR
-    SRM_IFCE_INCLUDE_DIR GLIB_INCLUDE_DIR GFAL_LIBRARY)
+find_package_handle_standard_args(GFAL DEFAULT_MSG GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY)

 mark_as_advanced(GFAL_FOUND GFAL_INCLUDE_DIR GFAL_LIBRARIES SRM_IFCE_INCLUDE_DIR GLIB_INCLUDE_DIR)


Revert "HADOOP-11505. Various native parts use bswap incorrectly and unportably (Alan Burlison via aw)"

This reverts commit 4c8125d60d47e98b1ec84422888975111e0cbcec.

--- hadoop-common-project/hadoop-common/src/hadoop_endian.h.cmake
+++ hadoop-common-project/hadoop-common/src/hadoop_endian.h.cmake
@@ -1,43 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-/* Hadoop versions of http://austingroupbugs.net/view.php?id=162#c665 */
-
-#ifndef HADOOP_ENDIAN_H
-#define HADOOP_ENDIAN_H
-
-#include <@HADOOP_ENDIAN_H@>
-
-#define HADOOP_LITTLE_ENDIAN 1234
-#define HADOOP_BIG_ENDIAN    4321
-#cmakedefine HADOOP_BYTE_ORDER @HADOOP_BYTE_ORDER@
-
-#define hadoop_htobe16(X) @HADOOP_HTOBE16@(X)
-#define hadoop_htole16(X) @HADOOP_HTOLE16@(X)
-#define hadoop_be16toh(X) @HADOOP_BE16TOH@(X)
-#define hadoop_le16toh(X) @HADOOP_LE16TOH@(X)
-#define hadoop_htobe32(X) @HADOOP_HTOBE32@(X)
-#define hadoop_htole32(X) @HADOOP_HTOLE32@(X)
-#define hadoop_be32toh(X) @HADOOP_BE32TOH@(X)
-#define hadoop_le32toh(X) @HADOOP_LE32TOH@(X)
-#define hadoop_htobe64(X) @HADOOP_HTOBE64@(X)
-#define hadoop_htole64(X) @HADOOP_HTOLE64@(X)
-#define hadoop_be64toh(X) @HADOOP_BE64TOH@(X)
-#define hadoop_le64toh(X) @HADOOP_LE64TOH@(X)
-
-#endif


port-to-0.9: Remove deprecated Find file

--- cmake/modules/FindTelepathyQt4.cmake
+++ cmake/modules/FindTelepathyQt4.cmake
@@ -1,43 +0,0 @@
-# Try to find the Qt4 binding of the Telepathy library
-# TELEPATHY_QT4_FOUND - system has TelepathyQt4
-# TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
-# TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4
-
-# Copyright (c) 2008, Allen Winter <winter@kde.org>
-# Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
-if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
-  # Already in cache, be silent
-  set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
-endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
-
-find_package(PkgConfig)
-if(PKG_CONFIG_FOUND)
-    if (TelepathyQt4_FIND_VERSION_EXACT)
-        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4=${TelepathyQt4_FIND_VERSION})
-    else (TelepathyQt4_FIND_VERSION_EXACT)
-        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=${TelepathyQt4_FIND_VERSION})
-    endif (TelepathyQt4_FIND_VERSION_EXACT)
-endif(PKG_CONFIG_FOUND)
-
-find_path(TELEPATHY_QT4_INCLUDE_DIR
-          NAMES TelepathyQt4/Types
-          HINTS
-          ${PC_TELEPATHY_QT4_INCLUDEDIR}
-          ${PC_TELEPATHY_QT4_INCLUDE_DIRS}
-)
-
-find_library(TELEPATHY_QT4_LIBRARIES
-             NAMES telepathy-qt4
-             HINTS
-             ${PC_TELEPATHY_QT4_LIBDIR}
-             ${PC_TELEPATHY_QT4_LIBRARY_DIRS}
-)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
-                                  TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)


cmake: fix cv2.lib conflict for python2/3 bindings (MSVS)

--- modules/python/common.cmake
+++ modules/python/common.cmake
@@ -67,6 +67,7 @@

 set_target_properties(${the_module} PROPERTIES
                       LIBRARY_OUTPUT_DIRECTORY  "${LIBRARY_OUTPUT_PATH}/${MODULE_INSTALL_SUBDIR}"
+                      ARCHIVE_OUTPUT_NAME ${the_module}  # prevent name conflict for python2/3 outputs
                       PREFIX ""
                       OUTPUT_NAME cv2
                       SUFFIX ${CVPY_SUFFIX})


Let the user specify clang-format executable

This resolves #148.
The user may specify the path to the clang-format executable using
-D CLANG_FORMAT_EXECUTABLE=<...> and we check that the version is 3.9 as
required.

--- cmake/CodeFormat.cmake
+++ cmake/CodeFormat.cmake
@@ -1,21 +1,40 @@
-find_program(CLANG_FORMAT_EXECUTABLE
-    NAMES
-    clang-format-3.9
-    clang-format-mp-3.9
+if(NOT CLANG_FORMAT_EXECUTABLE)
+    find_program(CLANG_FORMAT_EXECUTABLE
+        NAMES
+        clang-format-3.9
+        clang-format-mp-3.9
+    )
+    if(CLANG_FORMAT_EXECUTABLE)
+        message("-- Found clang-format: ${CLANG_FORMAT_EXECUTABLE}")
+    else()
+        message(FATAL_ERROR "-- clang-format not found")
+    endif()
+else()
+    message("-- Using clang-format: ${CLANG_FORMAT_EXECUTABLE}")
+    if(NOT EXISTS ${CLANG_FORMAT_EXECUTABLE})
+        message(FATAL_ERROR "-- clang-format path is invalid")
+    endif()
+endif()
+
+# Check that the vesion of clang-format is 3.9
+execute_process(
+    COMMAND ${CLANG_FORMAT_EXECUTABLE} -version
+    OUTPUT_VARIABLE CLANG_FORMAT_VERSION
 )
-if(CLANG_FORMAT_EXECUTABLE)
-    message("-- Found clang-format: ${CLANG_FORMAT_EXECUTABLE}")
-else()
-    message(FATAL_ERROR "-- clang-format not found")
+if(NOT CLANG_FORMAT_VERSION MATCHES "3.9")
+    message(FATAL_ERROR "You must use clang-format version 3.9")
 endif()
+# Download diff-clang-format.py from ORNL-CEES/Cap
 file(DOWNLOAD
     https://raw.githubusercontent.com/ORNL-CEES/Cap/master/diff-clang-format.py
     ${CMAKE_BINARY_DIR}/diff-clang-format.py
 )
+# Download docopt command line argument parser
 file(DOWNLOAD
     https://raw.githubusercontent.com/docopt/docopt/0.6.2/docopt.py
     ${CMAKE_BINARY_DIR}/docopt.py
 )
+# Add a custom target that applies the C++ code formatting style to the source
 add_custom_target(format-cpp
     ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/diff-clang-format.py
         --file-extension='.hpp'
@@ -26,6 +45,7 @@
         --apply-patch
         ${${PACKAGE_NAME}_SOURCE_DIR}/packages
 )
+# Add a test that checks the code is formatted properly
 file(WRITE
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/check_format_cpp.sh
     "#!/usr/bin/env bash\n"


fixes from pauli

fixes from pauli

--- cmake/FindARPACK.cmake
+++ cmake/FindARPACK.cmake
@@ -1,14 +1,14 @@
 SET(ARPACK_SEARCH_PATHS ${ARPACK_DIR})

 IF (DEFINED ARPACK_SEARCH_PATHS)
-    FIND_LIBRARY(ARPACK_LIB NAMES arpack HINTS ${ARPACK_SEARCH_PATHS} lib lib64)
+    FIND_LIBRARY(ARPACK_LIB NAMES arpack HINTS ${ARPACK_SEARCH_PATHS} PATH_SUFFIXES lib lib64)
 ELSE (DEFINED ARPACK_SEARCH_PATHS)
     FIND_LIBRARY(ARPACK_LIB NAMES arpack HINTS $ENV{ARPACK_DIR} PATH_SUFFIXES lib lib64)
 ENDIF (DEFINED ARPACK_SEARCH_PATHS)

 if(USE_MPI)
   IF (DEFINED ARPACK_SEARCH_PATHS)
-    FIND_LIBRARY(PARPACK_LIB NAMES parpack HINTS ${ARPACK_SEARCH_PATHS} lib lib64)
+    FIND_LIBRARY(PARPACK_LIB NAMES parpack HINTS ${ARPACK_SEARCH_PATHS} PATH_SUFFIXES lib lib64)
   ELSE (DEFINED ARPACK_SEARCH_PATHS)
     FIND_LIBRARY(PARPACK_LIB NAMES parpack HINTS $ENV{ARPACK_DIR} PATH_SUFFIXES lib lib64)
   ENDIF (DEFINED ARPACK_SEARCH_PATHS)


Supress nonconsequential CMake warning message by making endif tag match the
corresponding if tag.

svn path=/trunk/; revision=10083

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -174,7 +174,7 @@
       "WARNING: could not find sip flags so setting ENABLE_pyqt4 to OFF."
       )
     set(ENABLE_pyqt4 OFF CACHE BOOL "Enable pyqt4 Python extension module " FORCE)
-  endif(PYQT_SIP_DIR_ERR)
+  endif(PYQT_SIP_FLAGS_ERR)
   # Must change from blank-delimited string to CMake list so that sip
   # COMMAND will work properly with these flags later on.
   string(REGEX REPLACE " " ";"PYQT_SIP_FLAGS "${PYQT_SIP_FLAGS}")


Add Arch Linux gtest path (#1105)

Add Arch Linux gtest path (#1105)

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -249,6 +249,10 @@
   list(APPEND _gtest_include_paths "${googletest_path}/googletest/include/gtest")
   list(APPEND _gtest_source_paths "${googletest_path}/googletest/src")

+  # Path to gtest from the gtest Arch Linux package. Header location already included
+  # list(APPEND _gtest_include_paths "${gtest_path}/include/gtest")
+  list(APPEND _gtest_source_paths "${googletest_path}/src")
+
   if(CATKIN_TOPLEVEL)
     # Ensure current workspace is searched before system path
     list(INSERT _gtest_include_paths 0 "${CMAKE_SOURCE_DIR}/googletest/googletest/include/gtest")


Update SOFA source directory when changing tag

--- CMake/Superbuild/External_SOFA.cmake
+++ CMake/Superbuild/External_SOFA.cmake
@@ -87,7 +87,6 @@
     GIT_REPOSITORY "git://public.kitware.com/Bender/SOFA.git"
     GIT_TAG "d1d5775fefefd472a2f6b48ceb06a4c3626269d7"
     INSTALL_COMMAND ""
-    UPDATE_COMMAND ""
     CMAKE_GENERATOR ${gen}
     LIST_SEPARATOR &&
     CMAKE_ARGS


CMAKE_CURRENT_LIST_DIR was not correct when invoking target_uses_joedb().

--- compcmake/joedbc.cmake
+++ compcmake/joedbc.cmake
@@ -4,20 +4,22 @@
  set(JOEDB_BUILD_PATH "gcc_release")
 endif()

+set(JOEDB_DIR ${CMAKE_CURRENT_LIST_DIR})
+
 find_program(JOEDBC joedbc
  HINTS
-  ${CMAKE_CURRENT_LIST_DIR}/${JOEDB_BUILD_PATH}
+  ${JOEDB_DIR}/${JOEDB_BUILD_PATH}
 )

 find_library(JOEDB_LIB joedb
  HINTS
-  ${CMAKE_CURRENT_LIST_DIR}/${JOEDB_BUILD_PATH}
+  ${JOEDB_DIR}/${JOEDB_BUILD_PATH}
 )

 message("== JOEDBC = ${JOEDBC}")
 message("== JOEDB_LIB = ${JOEDB_LIB}")

-include("${CMAKE_CURRENT_LIST_DIR}/libssh.cmake")
+include("${JOEDB_DIR}/libssh.cmake")

 add_custom_target(all_joedbc)

@@ -56,7 +58,7 @@
 function(target_uses_joedb target)
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  add_dependencies(${target} all_joedbc)
- target_include_directories(${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../src)
+ target_include_directories(${target} PUBLIC ${JOEDB_DIR}/../src)
  target_link_libraries(${target} ${JOEDB_LIB})
  if (libssh_FOUND)
   target_link_libraries(${target} ${LIBSSH_LIBRARIES})


Fixes translations generation

Fixes translations generation

Closes lxde/lxqt-panel#367.

--- cmake/BuildPlugin.cmake
+++ cmake/BuildPlugin.cmake
@@ -13,6 +13,8 @@
             ${SOURCES}
             ${MOCS}
             ${UIS}
+        TEMPLATE
+            ${NAME}
         INSTALL_DIR
             ${LXQT_TRANSLATIONS_DIR}/${PROGRAM}/${NAME}
     )


Force requiring C++14 in preparation for the libRocket -> RmlUi change.

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -204,12 +204,12 @@
         try_c_cxx_flag(OPTIMIZE_DEBUG "-Og" DEBUG)
     endif()

-    # C++11 support
-    try_cxx_flag(GNUXX11 "-std=gnu++11")
-    if (NOT FLAG_GNUXX11)
-        try_cxx_flag(GNUXX0X "-std=gnu++0x")
-        if (NOT FLAG_GNUXX0X)
-            message(FATAL_ERROR "C++11 not supported by compiler")
+    # C++14 support
+    try_cxx_flag(GNUXX14 "-std=gnu++14")
+    if (NOT FLAG_GNUXX14)
+        try_cxx_flag(GNUXX1Y "-std=gnu++1y")
+        if (NOT FLAG_GNUXX1Y)
+            message(FATAL_ERROR "C++14 not supported by compiler")
         endif()
     endif()


Fix verison detection for multiple lua installations

If both lua 5.3 and lua 5.2 are installed the old code threw an error
that 5.2 was not found since FindLua always picks the neweste version.

--- cmake/FindLuabind.cmake
+++ cmake/FindLuabind.cmake
@@ -4,12 +4,16 @@
 #  LUABIND_LIBRARIES
 #  LUABIND_INCLUDE_DIR, where to find luabind.hpp

-FIND_PACKAGE(Lua REQUIRED)
-IF ("${LUA_VERSION_MAJOR}" STREQUAL "5" AND
-   ("${LUA_VERSION_MINOR}" STREQUAL "1" OR "${LUA_VERSION_MINOR}" STREQUAL "2"))
-	MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
+FIND_PACKAGE(Lua 5.2 EXACT)
+IF (LUA_FOUND)
+    MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
 ELSE()
-	MESSAGE(FATAL_ERROR "Lua ${LUA_VERSION_STRING} detected; need 5.1 or 5.2")
+  FIND_PACKAGE(Lua 5.1 EXACT)
+  IF (LUA_FOUND)
+    MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
+  ELSE()
+    MESSAGE(FATAL_ERROR "Lua 5.1 or 5.2 was not found.")
+  ENDIF()
 ENDIF()

 FIND_PATH(LUABIND_INCLUDE_DIR luabind.hpp


Remove IlmImfUtil/OpenEXRUtil as a dependency, it's not needed.

Signed-off-by: Cary Phillips <42f8ad7a08fc008de6caead15912549a4a0ad947@ilm.com>

--- cmake/FindOpenEXR.cmake
+++ cmake/FindOpenEXR.cmake
@@ -174,10 +174,10 @@
 endif()

 if(${OpenEXR_VERSION_MAJOR} MATCHES "3")
-  set(_OPENEXR_COMPONENT_LIST OpenEXR OpenEXRUtil Iex IlmThread)
+  set(_OPENEXR_COMPONENT_LIST OpenEXR Iex IlmThread)
 else()
-  set(_OPENEXR_COMPONENT_LIST IlmImf IlmImfUtil)
-endif()
+  set(_OPENEXR_COMPONENT_LIST IlmImf)
+endif()

 if(OpenEXR_FIND_COMPONENTS)
   set(OPENEXR_COMPONENTS_PROVIDED TRUE)


Fix errors in cmake files.

Fix errors in cmake files.

--- cmake/FindOpenEXR.cmake
+++ cmake/FindOpenEXR.cmake
@@ -1,57 +1,79 @@
-#
-# Try to find OpenEXR's libraries, and include path.
-# Once done this will define:
-#
-# OPENEXR_FOUND = OpenEXR found.
-# OPENEXR_INCLUDE_PATH = OpenEXR include directory.
-# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
-#
-
-
-IF (WIN32)
-ELSE (WIN32)
-
-	FIND_PATH(OPENEXR_INCLUDE_PATH ImfRgbaFile.h
-		/usr/include
-		/usr/local/include
-		/usr/include/OpenEXR
-		/usr/local/include/OpenEXR)
-
-	FIND_LIBRARY(OPENEXR_HALF_LIBRARY
-		NAMES Half
-		PATHS
-			/usr/lib
-			/usr/local/lib)
-
-	FIND_LIBRARY(OPENEXR_IEX_LIBRARY
-		NAMES Iex
-		PATHS
-			/usr/lib
-			/usr/local/lib)
-
-	FIND_LIBRARY(OPENEXR_IMATH_LIBRARY
-		NAMES Imath
-		PATHS
-			/usr/lib
-			/usr/local/lib)
-
-	FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY
-		NAMES IlmImf
-		PATHS
-			/usr/lib
-			/usr/local/lib)
-
-ENDIF (WIN32)
-
-IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
-	SET(OPENEXR_FOUND TRUE)
-	SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
-ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
-
-MARK_AS_ADVANCED(
-	OPENEXR_INCLUDE_DIR
-	OPENEXR_LIBRARIES
-	OPENEXR_ILMIMF_LIBRARY
-	OPENEXR_IMATH_LIBRARY
-	OPENEXR_IEX_LIBRARY
-	OPENEXR_HALF_LIBRARY)
+#
+# Try to find OpenEXR's libraries, and include path.
+# Once done this will define:
+#
+# OPENEXR_FOUND = OpenEXR found.
+# OPENEXR_INCLUDE_PATHS = OpenEXR include directories.
+# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
+#
+
+INCLUDE(FindZLIB)
+
+
+IF(ZLIB_FOUND)
+
+	SET(LIBRARY_PATHS
+		/usr/lib
+		/usr/local/lib
+		/sw/lib
+		/opt/local/lib
+		$ENV{PROGRAM_FILES}/OpenEXR/lib/static)
+
+	FIND_PATH(OPENEXR_INCLUDE_PATH ImfRgbaFile.h
+		PATH_SUFFIXES OpenEXR
+		/usr/include
+		/usr/local/include
+		/sw/include
+		/opt/local/include)
+
+	FIND_LIBRARY(OPENEXR_HALF_LIBRARY
+		NAMES Half
+		PATHS ${LIBRARY_PATHS})
+
+	FIND_LIBRARY(OPENEXR_IEX_LIBRARY
+		NAMES Iex
+		PATHS ${LIBRARY_PATHS})
+
+	FIND_LIBRARY(OPENEXR_IMATH_LIBRARY
+		NAMES Imath
+		PATHS ${LIBRARY_PATHS})
+
+	FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY
+		NAMES IlmImf
+		PATHS ${LIBRARY_PATHS})
+
+	FIND_LIBRARY(OPENEXR_ILMTHREAD_LIBRARY
+		NAMES IlmThread
+		PATHS ${LIBRARY_PATHS})
+
+ENDIF(ZLIB_FOUND)
+
+#MESSAGE(STATUS ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY})
+
+IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+	SET(OPENEXR_FOUND TRUE)
+	SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
+	SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
+
+	IF(OPENEXR_ILMTHREAD_LIBRARY)
+		SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} ${OPENEXR_ILMTHREAD_LIBRARY})
+	ENDIF(OPENEXR_ILMTHREAD_LIBRARY)
+ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+
+IF(OPENEXR_FOUND)
+	IF(NOT OPENEXR_FIND_QUIETLY)
+		MESSAGE(STATUS "Found OpenEXR: ${OPENEXR_ILMIMF_LIBRARY}")
+	ENDIF(NOT OPENEXR_FIND_QUIETLY)
+ELSE(OPENEXR_FOUND)
+	IF(OPENEXR_FIND_REQUIRED)
+		MESSAGE(FATAL_ERROR "Could not find OpenEXR library")
+	ENDIF(OPENEXR_FIND_REQUIRED)
+ENDIF(OPENEXR_FOUND)
+
+MARK_AS_ADVANCED(
+	OPENEXR_INCLUDE_PATHS
+	OPENEXR_LIBRARIES
+	OPENEXR_ILMIMF_LIBRARY
+	OPENEXR_IMATH_LIBRARY
+	OPENEXR_IEX_LIBRARY
+	OPENEXR_HALF_LIBRARY)


Fixed SystemC library discovery

Fixed SystemC library discovery

--- cmake/FindSystemC.cmake
+++ cmake/FindSystemC.cmake
@@ -128,26 +128,26 @@

 FIND_PATH(SCV_INCLUDE_DIRS
   NAMES scv.h
-  HINTS ${_SYSTEMC_HINTS}
-  PATHS ${_SYSTEMC_PATHS}
+  HINTS ${_SCV_HINTS}
+  PATHS ${_SCV_PATHS}
 )

 FIND_PATH(SCV_LIBRARY_DIRS
   NAMES libscv.a libscv.so
-  HINTS ${_SYSTEMC_HINTS}
-  PATHS ${_SYSTEMC_PATHS}
+  HINTS ${_SCV_HINTS}
+  PATHS ${_SCV_PATHS}
 )

 FIND_PATH(CCI_INCLUDE_DIRS
   NAMES cci_configuration
-  HINTS ${_SYSTEMC_HINTS}
-  PATHS ${_SYSTEMC_PATHS}
+  HINTS ${_CCI_HINTS}
+  PATHS ${_CCI_PATHS}
 )

 FIND_PATH(CCI_LIBRARY_DIRS
   NAMES libcciapi.a libcciapi.so
-  HINTS ${_SYSTEMC_HINTS}
-  PATHS ${_SYSTEMC_PATHS}
+  HINTS ${_CCI_HINTS}
+  PATHS ${_CCI_PATHS}
 )

 if(SystemC_FOUND)


Fixed issue with requiring reconfiguring of cmake before install due to use of GLOB

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -30,28 +30,24 @@
 	COMPONENT fast
 )
 if(WIN32)
-	file(GLOB DLLs ${PROJECT_BINARY_DIR}/bin/*.dll)
-	install(FILES ${DLLs}
-		DESTINATION fast/bin
-		COMPONENT fast
-	)
-	file(GLOB DLLs ${PROJECT_BINARY_DIR}/lib/*.lib)
-	install(FILES ${DLLs}
-		DESTINATION fast/lib
-		COMPONENT fast
-	)
+	install(DIRECTORY ${PROJECT_BINARY_DIR}/bin/
+			DESTINATION fast/bin/
+			COMPONENT fast
+			FILES_MATCHING PATTERN "*.dll")
+	install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/
+			DESTINATION fast/lib/
+			COMPONENT fast
+			FILES_MATCHING PATTERN "*.lib")
 elseif(APPLE)
-	file(GLOB SOs ${PROJECT_BINARY_DIR}/lib/*.dylib)
-	install(FILES ${SOs}
-        DESTINATION fast/lib
-		COMPONENT fast
-    )
+	install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/
+			DESTINATION fast/lib/
+			COMPONENT fast
+			FILES_MATCHING PATTERN "*.dylib")
 else()
-	file(GLOB SOs ${PROJECT_BINARY_DIR}/lib/*.so*)
-	install(FILES ${SOs}
-        DESTINATION fast/lib
-		COMPONENT fast
-    )
+	install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/
+			DESTINATION fast/lib/
+			COMPONENT fast
+			FILES_MATCHING PATTERN "*.so*")
 	# Fix RPaths on install
     install(SCRIPT cmake/FixRPaths.cmake COMPONENT fast)
 endif()
@@ -255,18 +251,22 @@

 # Install license files for depedencies
 # Qt5
-file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/LICENSE.*)
-install(FILES ${LICENSE_FILES}
-		DESTINATION fast/licenses/qt5/
-		COMPONENT fast
-)
+install(CODE "
+		file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/LICENSE.*)
+		file(INSTALL
+			DESTINATION \"$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/fast/licences/qt5/\"
+			FILES ${LICENSE_FILES}
+		)
+	" COMPONENT fast)

 # Eigen
-file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/COPYING.*)
-install(FILES ${LICENSE_FILES}
-		DESTINATION fast/licenses/eigen/
-		COMPONENT fast
-)
+install(CODE "
+		file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/COPYING.*)
+		file(INSTALL
+			DESTINATION \"$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/fast/licences/eigen/\"
+			FILES ${LICENSE_FILES}
+		)
+	" COMPONENT fast)
 # zlib
 install(FILES ${FAST_EXTERNAL_BUILD_DIR}/zlib/src/zlib/README
 		DESTINATION fast/licenses/zlib/


Find cross version of windres.

Find cross version of windres.

	* build-aux/cmake/modules/FindWindRes.cmake: Here.

--- build-aux/cmake/modules/FindWindRes.cmake
+++ build-aux/cmake/modules/FindWindRes.cmake
@@ -2,7 +2,7 @@

 if(NOT WINDRES_EXECUTABLE)

-  find_program(WINDRES_EXECUTABLE NAMES windres)
+  find_program(WINDRES_EXECUTABLE NAMES windres i386-mingw32-windres)
   if(NOT WINDRES_EXECUTABLE)
     message(SEND_ERROR "Cannot find 'windres' executable.")
   endif(NOT WINDRES_EXECUTABLE)


Patch version is the git revision.

Patch version is the git revision.

	* build-aux/cmake/modules/ProjectInfo.cmake: Do that.

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -1,25 +1,13 @@
-##
-## ProjectInfo.cmake: This file is part of libport.
-## Copyright (C) Gostai S.A.S., 2006-2008.
-##
-## This software is provided "as is" without warranty of any kind,
-## either expressed or implied, including but not limited to the
-## implied warranties of fitness for a particular purpose.
-##
-## See the LICENSE file for more information.
-## For comments, bug reports and feedback: http://www.urbiforge.com
-##
+# - Set project information variables.

 include(Tools)

-#FIXME: Remove guards ASAP
-# if(NOT PROJECT_INFO_CMAKE)
-#   set(PROJECT_INFO_CMAKE TRUE)
+if(NOT PROJECT_INFO_CMAKE)
+  set(PROJECT_INFO_CMAKE TRUE)

   check_cmake_vars_exists(
     PROJECT_VERSION_MAJOR
     PROJECT_VERSION_MINOR
-    PROJECT_VERSION_PATCH
     PROJECT_LONGNAME
     )

@@ -30,17 +18,18 @@

   include(Revision)
   revision(PROJECT_DATE PROJECT_ID PROJECT_REVISION)
+  set(PROJECT_VERSION_PATCH ${PROJECT_REVISION})

   message(STATUS "Project repository date: ${PROJECT_DATE}")
   message(STATUS "Project repository ID: ${PROJECT_ID}")
   message(STATUS "Project repository revision: ${PROJECT_REVISION}")

   set(PROJECT_VERSION
-    "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
+    "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
   set(PROJECT_VERSION_REV "version ${PROJECT_VERSION} rev. ${PROJECT_REVISION}")

   set(PROJECT_STRING "${PROJECT_LONGNAME} ${PROJECT_VERSION}")

-  set(PROJECT_TARNAME "${PROJECT_NAME}-${PROJECT_VERSION}")
+  set(PROJECT_TARNAME "${PROJECT_NAME}-${PROJECT_VERSION}-${PROJECT_REVISION}")

-# endif(NOT PROJECT_INFO_CMAKE)
+endif(NOT PROJECT_INFO_CMAKE)


module: add comment to update maintenance scripts too

Change-Id: I8dd447cf717e6277fae464999afbf0c2b4ceb9b3

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -59,6 +59,8 @@
   set(${vtk-module}_TEST_LABELS "")
   set(${vtk-module}_KIT "")
   foreach(arg ${ARGN})
+    # XXX: Adding a new keyword? Update Utilities/Maintenance/WhatModulesVTK.py
+    # and Utilities/Maintenance/VisualizeModuleDependencies.py as well.
     if("${arg}" MATCHES "^((|COMPILE_|PRIVATE_|TEST_|)DEPENDS|DESCRIPTION|TCL_NAME|IMPLEMENTS|BACKEND|DEFAULT|GROUPS|TEST_LABELS|KIT)$")
       set(_doing "${arg}")
     elseif("${arg}" MATCHES "^EXCLUDE_FROM_ALL$")


CUDA runtime: pass build options as vector.

--- runtime/hipacc_cu.hpp.cmake
+++ runtime/hipacc_cu.hpp.cmake
@@ -700,7 +700,7 @@

 // Compile CUDA source file and create module
-void hipaccCompileCUDAToModule(CUmodule &module, std::string file_name, int cc, std::string build_options = std::string()) {
+void hipaccCompileCUDAToModule(CUmodule &module, std::string file_name, int cc, std::vector<std::string> &build_options) {
     char line[FILENAME_MAX];
     FILE *fpipe;

@@ -708,8 +708,8 @@
     ss << cc;

     std::string command = "${NVCC} -ptx -arch=compute_" + ss.str() + " ";
-    command += build_options + " " + file_name;
-    command += " -o " + file_name + ".ptx 2>&1";
+    for (auto option : build_options) command += option + " ";
+    command += file_name + " -o " + file_name + ".ptx 2>&1";

     if (!(fpipe = (FILE *)popen(command.c_str(), "r"))) {
         perror("Problems with pipe");
@@ -1118,8 +1118,13 @@
         num_ppt_ss << ppt;
         num_bs_ss << max_threads;

-        std::string compile_options = "-D PPT=" + num_ppt_ss.str() + " -D BS=" + num_bs_ss.str() + " -I./include ";
-        compile_options += "-D BSX_EXPLORE=64 -D BSY_EXPLORE=1 ";
+        std::vector<std::string> compile_options;
+        compile_options.push_back("-I./include");
+        compile_options.push_back("-D PPT=" + num_ppt_ss.str());
+        compile_options.push_back("-D BS=" + num_bs_ss.str());
+        compile_options.push_back("-D BSX_EXPLORE=64");
+        compile_options.push_back("-D BSY_EXPLORE=1");
+
         CUmodule modReduction;
         hipaccCompileCUDAToModule(modReduction, filename, cc, compile_options);

@@ -1280,9 +1285,10 @@
             num_threads_y_ss << tile_size_y;

             // compile kernel
-            std::string compile_options = "-D BSX_EXPLORE=" +
-                num_threads_x_ss.str() + " -D BSY_EXPLORE=" +
-                num_threads_y_ss.str() + " -I./include ";
+            std::vector<std::string> compile_options;
+            compile_options.push_back("-I./include");
+            compile_options.push_back("-D BSX_EXPLORE=" + num_threads_x_ss.str());
+            compile_options.push_back("-D BSY_EXPLORE=" + num_threads_y_ss.str());

             CUmodule modKernel;
             hipaccCompileCUDAToModule(modKernel, filename, cc, compile_options);


[CMake] [macho_embedded] Check to make sure the compiler supports the architectures before generating build targets

If we don't check the compiler's capabilities we end up generating build targets that the compiler might not be able to build.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -360,7 +360,19 @@
   set(PIC_FLAG_ -fPIC)
   set(STATIC_FLAG -static)

-  set(DARWIN_macho_embedded_ARCHS armv6m armv7m armv7em armv7 i386 x86_64)
+  darwin_test_archs(ios
+      DARWIN_macho_embedded_ios_ARCHS
+      armv6m armv7m armv7em armv7)
+  darwin_test_archs(osx
+      DARWIN_macho_embedded_osx_ARCHS
+      i386 x86_64)
+
+  list(APPEND DARWIN_macho_embedded_ARCHS
+    ${DARWIN_macho_embedded_ios_ARCHS} ${DARWIN_macho_embedded_osx_ARCHS})
+
+  if(NOT DARWIN_macho_embedded_ARCHS)
+    return()
+  endif()

   set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
     ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)


BUG: missing include dirs (bug introduced by recent commits)

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -45,6 +45,7 @@
   ${OTB_SOURCE_DIR}/Code/Testing
   ${OTB_SOURCE_DIR}/Code/Visu
   ${OTB_SOURCE_DIR}/Code/Visualization
+  ${OTB_BINARY_DIR}/Code/Visualization
   ${OTB_SOURCE_DIR}/Utilities/otbsvm
   ${OTB_SOURCE_DIR}/Utilities/otbossim/include
   ${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim


doxygen is now handled through catkin

doxygen is now handled through catkin

--- cmake/doc.cmake
+++ cmake/doc.cmake
@@ -31,47 +31,47 @@
 # TARGET_NAME -> The cmake target to create.
 # SEARCH_DIRS -> a CMake List of directories to search for doxygenated files.
 #
-macro(doxygen TARGET_NAME SEARCH_DIRS)
-  #doxygen based docs
-  set(DOC_SEARCH_DIRS ${SEARCH_DIRS}
-  )
-  foreach(dir ${DOC_SEARCH_DIRS})
-    file(GLOB_RECURSE _doc_sources ${dir}/*)
-    list(APPEND doc_sources ${_doc_sources})
-  endforeach()
-
-  string(REPLACE ";" " " doc_sources "${doc_sources}")
-
-  configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-
-  add_custom_target(${TARGET_NAME}
-    COMMENT "Generating API documentation with Doxygen" VERBATIM
-    )
-
-  add_custom_command(TARGET ${TARGET_NAME}
-    COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    )
-  add_dependencies(doc ${TARGET_NAME})
-endmacro()
-
-macro(find_sphinx)
-  find_program(SPHINX_BUILD sphinx-build)
-  if(SPHINX_BUILD)
-    set(REQUIRED_SPHINX_VERSION "1.0.7")
-    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sphinx;print sphinx.__version__"
-      OUTPUT_VARIABLE SPHINX_VERSION
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      )
-    if("${SPHINX_VERSION}" VERSION_LESS ${REQUIRED_SPHINX_VERSION})
-      MESSAGE(WARNING "You version of sphinx (http://sphinx.pocoo.org) is ${SPHINX_VERSION}, required ${REQUIRED_SPHINX_VERSION}")
-      if (UNIX)
-        MESSAGE(WARNING "You may be able to update with 'easy_install -U sphinx'")
-      endif()
-    endif()
-  endif()
-endmacro()
-
+# macro(doxygen TARGET_NAME SEARCH_DIRS)
+#   #doxygen based docs
+#   set(DOC_SEARCH_DIRS ${SEARCH_DIRS}
+#   )
+#   foreach(dir ${DOC_SEARCH_DIRS})
+#     file(GLOB_RECURSE _doc_sources ${dir}/*)
+#     list(APPEND doc_sources ${_doc_sources})
+#   endforeach()
+#
+#   string(REPLACE ";" " " doc_sources "${doc_sources}")
+#
+#   configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
+#
+#   add_custom_target(${TARGET_NAME}
+#     COMMENT "Generating API documentation with Doxygen" VERBATIM
+#     )
+#
+#   add_custom_command(TARGET ${TARGET_NAME}
+#     COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+#     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+#     )
+#   add_dependencies(doc ${TARGET_NAME})
+# endmacro()
+#
+# macro(find_sphinx)
+#   find_program(SPHINX_BUILD sphinx-build)
+#   if(SPHINX_BUILD)
+#     set(REQUIRED_SPHINX_VERSION "1.0.7")
+#     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sphinx;print sphinx.__version__"
+#       OUTPUT_VARIABLE SPHINX_VERSION
+#       OUTPUT_STRIP_TRAILING_WHITESPACE
+#       )
+#     if("${SPHINX_VERSION}" VERSION_LESS ${REQUIRED_SPHINX_VERSION})
+#       MESSAGE(WARNING "You version of sphinx (http://sphinx.pocoo.org) is ${SPHINX_VERSION}, required ${REQUIRED_SPHINX_VERSION}")
+#       if (UNIX)
+#         MESSAGE(WARNING "You may be able to update with 'easy_install -U sphinx'")
+#       endif()
+#     endif()
+#   endif()
+# endmacro()
+#
 # ##
 # # sphinx(<TARGET_NAME> <SOURCE_DIR> <BUILD_DIR> [PATH1 [ PATH2 [ PATH3 ]]])
 # # TARGET_NAME -> The cmake target to create.


cmake typo

cmake typo

--- cmakemodules/script_gridmap_options.cmake
+++ cmakemodules/script_gridmap_options.cmake
@@ -1,6 +1,6 @@
 # Occupancy grid cellsize in bits: 8 or 16
 # ===================================================
-SET(MRPT_OCCUPANCY_GRID_CELLSIZE 8 CACHE STRING "Cell size for mrpt::slam::COccupancyGridMap2D (either 8 or 16 bits)")
+SET(MRPT_OCCUPANCY_GRID_CELLSIZE 8 CACHE STRING "Cell size for mrpt::maps::COccupancyGridMap2D (either 8 or 16 bits)")
 IF(NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 8 AND NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 16)
 	MESSAGE("MRPT_OCCUPANCY_GRID_CELLSIZE can have the values 8 or 16 only.")
 ENDIF(NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 8 AND NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 16)


Makes it possible to switch to the dynamic CRT.

If FIPS_DYNAMIC_CRT is set, VS compiler will use /MD and /MDd instead /MT and /MTd. The default behaviour is still MT.

This is required because setting one own project to use MD will not work if the project has any fips import as the imports will all be MT.

By setting FIPS_DYNAMIC_CRT before including fips.cmake every import will use the same runtime.

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -66,6 +66,13 @@
 else()
     set(FIPS_VS_EXCEPTION_FLAGS "/EHsc")
 endif()
+
+if (FIPS_DYNAMIC_CRT)
+    set(FIPS_VS_CRT_FLAGS "/MD")
+else()
+    set(FIPS_VS_CRT_FLAGS "/MT")
+endif()
+
 set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /MP /WX /TP /DWIN32")
 set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od /Oy- /D_DEBUG /DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE "/Ox /DNDEBUG")
@@ -74,9 +81,8 @@
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZW")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD /ZW")
 else()
-    # on Win32, link runtime statically
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
-    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")
 endif()

 set(CMAKE_C_FLAGS "/MP /WX /TC /errorReport:queue /DWIN32")
@@ -86,10 +92,9 @@
     # must link runtime as DLLs
     set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /ZW")
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD /ZW")
-else()
-    # on Win32, link runtime statically
-    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
-    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
+else()
+    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
+    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")
 endif()

 # define exe linker flags


findlapack_template

--- cmake/Modules/FindLAPACK.cmake
+++ cmake/Modules/FindLAPACK.cmake
@@ -148,15 +148,20 @@
   endif()
 endif(LAPACK95 IN_LIST LAPACK_FIND_COMPONENTS)

+if(CMAKE_Fortran_COMPILER_ID STREQUAL PGI)
+  get_filename_component(_pgi_path ${CMAKE_Fortran_COMPILER} DIRECTORY)
+  set(_lapack_hints ${_pgi_path}/../)
+endif()
+
 pkg_check_modules(LAPACK lapack-netlib QUIET)
 if(NOT LAPACK_FOUND)
   pkg_check_modules(LAPACK lapack QUIET)  # Netlib on Cygwin, Homebrew and others
 endif()
 find_library(LAPACK_LIB
   NAMES lapack
-  PATHS /usr/local/opt
-  HINTS ${LAPACK_LIBRARY_DIRS} ${LAPACK_LIBDIR}
-  PATH_SUFFIXES lapack lapack/lib)
+  PATHS /usr/local/opt  # homebrew
+  HINTS ${_lapack_hints} ${LAPACK_LIBRARY_DIRS} ${LAPACK_LIBDIR}
+  PATH_SUFFIXES lib lapack lapack/lib)
 if(LAPACK_LIB)
   list(APPEND LAPACK_LIBRARY ${LAPACK_LIB})
 else()
@@ -199,8 +204,8 @@
 find_library(BLAS_LIBRARY
   NAMES refblas blas
   PATHS /usr/local/opt
-  HINTS ${BLAS_LIBRARY_DIRS} ${BLAS_LIBDIR}
-  PATH_SUFFIXES lapack lapack/lib blas)
+  HINTS ${_lapack_hints} ${BLAS_LIBRARY_DIRS} ${BLAS_LIBDIR}
+  PATH_SUFFIXES lib lapack lapack/lib blas)

 if(BLAS_LIBRARY)
   list(APPEND LAPACK_LIBRARY ${BLAS_LIBRARY})


PythonApplyPatches: Refactor logic applying patch to Python 2.7.11 and 2.7.12

--- cmake/PythonApplyPatches.cmake
+++ cmake/PythonApplyPatches.cmake
@@ -92,13 +92,9 @@

 set(_py_version ${PY_VERSION})
 if("${PY_VERSION}" VERSION_LESS "3.0")
-  if("${PY_VERSION}" VERSION_EQUAL "2.7.11" OR "${PY_VERSION}" VERSION_EQUAL "2.7.12")
+  if("${PY_VERSION}" MATCHES "^2\\.7\\.(11|12|13|14)$")
     set(_py_version "2.7.13")
-    message(STATUS "Using ${_py_version} patches for 2.7.11 and 2.7.12.")
-  endif()
-  if("${PY_VERSION}" VERSION_EQUAL "2.7.13" OR "${PY_VERSION}" VERSION_EQUAL "2.7.14")
-    set(_py_version "2.7.13")
-    message(STATUS "Using ${_py_version} patches for 2.7.13 and 2.7.14")
+    message(STATUS "Using ${_py_version} patches for 2.7.11, 2.7.12, 2.7.13 and 2.7.14")
   endif()
   if("${PY_VERSION}" VERSION_EQUAL "2.7.15" OR "${PY_VERSION}" VERSION_GREATER "2.7.15")
     set(_py_version "2.7.15")


cmake/modules/FindLibUSB.cmake: Use correct FindLibUSB.cmake

--- cmake/modules/FindLibUSB.cmake
+++ cmake/modules/FindLibUSB.cmake
@@ -1,4 +1,4 @@
-# FindLibUSB.cmake - Try to find the Hiredis library
+# FindLibUSB.cmake
 # Once done this will define
 #
 #  LIBUSB_FOUND - System has libusb
@@ -6,42 +6,51 @@
 #  LIBUSB_LIBRARY - The libraries needed to use libusb
 #  LIBUSB_DEFINITIONS - Compiler switches required for using libusb

-if(WIN32 OR MINGW OR MSYS)
-	set(LIBUSB_WIN_VERSION "1.0.20")
+if(WIN32 OR CMAKE_VS_PLATFORM_NAME)
+	set(LIBUSB_WIN_VERSION 1.0.20)
 	set(LIBUSB_WIN_ARCHIVE libusb-${LIBUSB_WIN_VERSION}.7z)
 	set(LIBUSB_WIN_ARCHIVE_PATH ${CMAKE_BINARY_DIR}/${LIBUSB_WIN_ARCHIVE})
-	set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_BINARY_DIR}/libusb-${LIBUSB_WIN_VERSION})
+	set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_BINARY_DIR}/3thparty/libusb-${LIBUSB_WIN_VERSION})

-	if (EXISTS ${LIBUSB_WIN_ARCHIVE_PATH})
+	if(EXISTS ${LIBUSB_WIN_ARCHIVE_PATH})
 		message(STATUS "libusb archive already in build folder")
-	else ()
-		message(STATUS "libusb downloading ${LIBUSB_WIN_VERSION}")
+	else()
+		message(STATUS "downloading libusb ${LIBUSB_WIN_VERSION}")
 		file(DOWNLOAD
 			https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-${LIBUSB_WIN_VERSION}/libusb-${LIBUSB_WIN_VERSION}.7z/download
 			${LIBUSB_WIN_ARCHIVE_PATH}
-			SHOW_PROGRESS)
-	endif ()
-
+		)
+	endif()
 	execute_process(COMMAND ${ZIP_LOCATION} x -y ${LIBUSB_WIN_ARCHIVE_PATH} -o${LIBUSB_WIN_OUTPUT_FOLDER})
 endif()

-find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h
+# FreeBSD
+if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+	FIND_PATH(LIBUSB_INCLUDE_DIR NAMES libusb.h
+	HINTS
+	/usr/include
+	)
+else ()
+	FIND_PATH(LIBUSB_INCLUDE_DIR NAMES libusb.h
 	HINTS
 	/usr
 	/usr/local
 	/opt
 	${LIBUSB_WIN_OUTPUT_FOLDER}/include
-#	PATH_SUFFIXES libusb-1.0
-)
+	PATH_SUFFIXES libusb-1.0
+	)
+endif()
+
+message(STATUS "LIBUSB_INCLUDE_DIR: ${LIBUSB_INCLUDE_DIR}")

 if (APPLE)
 	set(LIBUSB_NAME libusb-1.0.a)
-elseif(MSYS OR MINGW)
+elseif(WIN32 OR CMAKE_VS_PLATFORM_NAME)
+	set(LIBUSB_NAME libusb-1.0.lib)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+	set(LIBUSB_NAME usb)
+else()
 	set(LIBUSB_NAME usb-1.0)
-elseif(WIN32)
-	set(LIBUSB_NAME libusb-1.0.lib)
-else()
-	set(LIBUSB_NAME usb)
 endif()

 if (MSYS OR MINGW)
@@ -52,12 +61,20 @@
 		find_library(LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
 			HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MinGW32/static)
 	endif ()
-else ()
+elseif(CMAKE_VS_PLATFORM_NAME)
+	if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+		find_library(LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
+			HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MS64/static)
+	else ()
+		find_library(LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
+			HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MS32/static)
+	endif ()
+else()
 	find_library(LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
-		HINTS
-		/usr
-		/usr/local
-		/opt)
+	HINTS
+	/usr
+	/usr/local
+	/opt)
 endif ()

 include(FindPackageHandleStandardArgs)


[cmake] Intentation (NFC).

[cmake] Intentation (NFC).

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -286,8 +286,8 @@
     set(libprefix "")
   endif()

-   # list of include directories for dictionary generation
-   set(incdirs)
+  # list of include directories for dictionary generation
+  set(incdirs)

   if((CMAKE_PROJECT_NAME STREQUAL ROOT) AND (TARGET ${ARG_MODULE}))
     set(headerdirs)


Force use of local GLM

Force use of local GLM

--- cmake/submoduleGlBinding.cmake
+++ cmake/submoduleGlBinding.cmake
@@ -59,6 +59,7 @@
     -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
     -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
     -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
+    -DGLM_INCLUDE_DIRS=${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/include
     STEP_TARGETS build
     EXCLUDE_FROM_ALL TRUE
     )


fixed: install-prefix detection

fixed: install-prefix detection

--- share/hugh/cmake/SetupInstallPrefix.cmake
+++ share/hugh/cmake/SetupInstallPrefix.cmake
@@ -6,12 +6,8 @@
 #                                                                                #
 ####################################################################################################

-if(NOT CMAKE_INSTALL_PREFIX)
-  set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install")
-
-  if(DEFINED ENV{HUGH_INSTALL_PREFIX})
-    set(CMAKE_INSTALL_PREFIX $ENV{HUGH_INSTALL_PREFIX})
-  endif()
+if(DEFINED ENV{HUGH_INSTALL_PREFIX})
+  set(CMAKE_INSTALL_PREFIX $ENV{HUGH_INSTALL_PREFIX})
 endif()

 if(VERBOSE)


ENH: Depending software have been moved from NITRC (SVN) to Github (git)

External* files have been updated to the new repositories of the software. CMakeLists.txt have also been updated. Some files that were unused have been removed.

--- SuperBuild/FindExternalTools.cmake
+++ SuperBuild/FindExternalTools.cmake
@@ -317,10 +317,8 @@

 # ===== dtiprocessTK ==============================================================
 set( SourceCodeArgs
-  SVN_REPOSITORY "http://www.nitrc.org/svn/dtiprocess/trunk" # /dtiprocess"
-  SVN_USERNAME slicerbot
-  SVN_PASSWORD slicer
-  SVN_REVISION -r 221
+  GIT_REPOSITORY ${git_protocol}://github.com/NIRALUser/DTIProcessToolkit.git
+  GIT_TAG a7c39e485e492bc6b72f72348939d47835cd56cc
   )
 if( MSVC )
   set( INSTALL_CONFIG DTIProcess-build/DTIProcess.sln /Build Release /Project INSTALL.vcproj )
@@ -393,10 +391,6 @@
 set( SourceCodeArgs
   GIT_REPOSITORY "${git_protocol}://github.com/BRAINSia/BRAINSTools.git"
   GIT_TAG "b3f1b53fba2b63f6e568eae95c7f01a9a019bdce" #05-19-2014 - Update to newer version
-#  GIT_TAG "1abcb55fafc1c9b94dabd33f5fcc40e248c326ba" # 01-30-2013 fix bug with ITK4.4 # "dd7ad3926a01fbdd098ea858fb95012ca16fb236" # 12/18/2012
-# "ff94032edafbc46a95f51db4bce894f0120b5992" : Slicer4 version # /devel/linux/Slicer4_linux64/Slicer/SuperBuild/External_BRAINSTools.cmake -> compiles but segfault
-# "31dcba577ee1bac5c4680fc9d7c830d6074020a9" : 12/13/2012
-# "98a46a2b08da882d46f04cbf0d539c2b73348049" # version from http://www.nitrc.org/svn/dtiprep/trunk/SuperBuild/External_BRAINSTools.cmake -> compiles but run error "undefined symbol: ModuleEntryPoint"
   )

 set( CMAKE_ExtraARGS
@@ -528,10 +522,8 @@

 # ===== MriWatcher =====================================================================
 set( SourceCodeArgs
-  SVN_REPOSITORY "http://www.nitrc.org/svn/mriwatcher/branches/mriwatcher_qt4"
-  SVN_USERNAME slicerbot
-  SVN_PASSWORD slicer
-  SVN_REVISION -r 23 # 12/13/2012
+  GIT_REPOSITORY ${git_protocol}://github.com/NIRALUser/MriWatcher.git
+  GIT_TAG b7a4645d881269a97449b0ed9b260fde66f69a4a
   )
 set( CMAKE_ExtraARGS
   -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}
@@ -546,10 +538,8 @@

 # ===== NIRALUtilities ===================================================================
 set( SourceCodeArgs
-  SVN_REPOSITORY "http://www.nitrc.org/svn/niral_utilities/trunk"
-  SVN_USERNAME slicerbot
-  SVN_PASSWORD slicer
-  SVN_REVISION -r 77
+  GIT_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git
+  GIT_TAG dea3323b99be580b6fd2a7214ce60ddb9d7baec2
   )
 set( CMAKE_ExtraARGS
   -DCOMPILE_CONVERTITKFORMATS:BOOL=OFF
@@ -583,10 +573,8 @@
 endif()
 # ===== DTI-Reg =====================================================================
 set( SourceCodeArgs
-  SVN_REPOSITORY "http://www.nitrc.org/svn/dtireg/trunk"
-  SVN_USERNAME slicerbot
-  SVN_PASSWORD slicer
-  SVN_REVISION -r 67
+  GIT_REPOSITORY ${git_protocol}://github.com/NIRALUser/DTI-Reg.git
+  GIT_TAG d28f6fb7de82b964321ebabe9904821ddc5342f4
   )
 set( CMAKE_ExtraARGS
   -DANTSTOOL:PATH=${ANTSPath}


Correctly add superbuild dependency on virtualenv

There was a copy paste error, and now it's only needed with when
wrapping for Python is done.

Change-Id: I159ebb985d02f27c9a3a7ac91465d6c1c4ad3d4c

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -300,7 +300,9 @@
 else()
   include(External_virtualenv)
   list(APPEND SimpleITK_VARS PYTHON_VIRTUALENV_EXECUTABLE)
-  list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES GTest)
+  if ( WRAP_PYTHON )
+    list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES virtualenv)
+  endif()
 endif()

@@ -406,7 +408,7 @@
 #------------------------------------------------------------------------------
 # List of external projects
 #------------------------------------------------------------------------------
-set(external_project_list ITK Swig SimpleITKExamples PCRE Lua GTest ${CMAKE_PROJECT_NAME})
+set(external_project_list ITK Swig SimpleITKExamples PCRE Lua GTest virtualenv ${CMAKE_PROJECT_NAME})

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


PKG: JIRA 1012 comment:6. share/otb not found

--- SuperBuild/CMake/PackageHelper.cmake
+++ SuperBuild/CMake/PackageHelper.cmake
@@ -180,6 +180,9 @@

   if(include_mvd)
     install_monteverdi_files()
+    if(NOT EXISTS "${PKG_SHARE_SOURCE_DIR}/otb/i18n")
+      message(FATAL_ERROR "error ${PKG_SHARE_SOURCE_DIR}/otb not exists")
+    endif()
   endif()

   ####################### install GDAL data ############################


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


daily version number

daily version number

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


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   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


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


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   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 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 03)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -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)


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   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


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   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Fix compilation issues

Fix compilation issues

--- modules/nanomsg.cmake
+++ modules/nanomsg.cmake
@@ -5,6 +5,7 @@

   # Setup new compiler flags
   if(NOT MSVC)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-aliasing=n")
   else()
     # Disable some compile warnings
     # C4100: 'identifier' : unreferenced formal parameter


deps: disable wxWidgets library internal asserts

--- deps/wxWidgets/wxWidgets.cmake
+++ deps/wxWidgets/wxWidgets.cmake
@@ -19,6 +19,7 @@
         -DwxBUILD_PRECOMP=ON
         ${_wx_toolkit}
         "-DCMAKE_DEBUG_POSTFIX:STRING="
+        -DwxBUILD_DEBUG_LEVEL=0
         -DwxUSE_DETECT_SM=OFF
         -DwxUSE_UNICODE=ON
         -DwxUSE_OPENGL=ON


build_system: remove warning for MSVC

build_system: remove warning for MSVC

--- cmake/compiler_flags.cmake
+++ cmake/compiler_flags.cmake
@@ -29,6 +29,9 @@
     elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
         set(warnings "${warnings} -Wno-missing-braces -Wno-unused-parameter")
     endif()
+
+    # Otherwise tinyxml2 complains.
+    set(warnings "${warnings} -Wno-old-style-cast")
 endif()

 if(APPLE)
@@ -42,6 +45,3 @@
 set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} --coverage")
 set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_COVERAGE} --coverage")
 set(CMAKE_LINKER_FLAGS_COVERAGE "${CMAKE_LINKER_FLAGS_COVERAGE} --coverage")
-
-# Otherwise tinyxml2 complains.
-set(warnings "${warnings} -Wno-old-style-cast")


CMake: Fix ninja-based build with the newly added Eigen dependency

--- cmake/external_eigen.cmake
+++ cmake/external_eigen.cmake
@@ -25,9 +25,9 @@
     eigen
     URL http://bitbucket.org/eigen/eigen/get/3.3.3.zip
     # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/eigen
-    INSTALL_COMMAND make install
     UPDATE_COMMAND ""
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
+    BUILD_BYPRODUCTS "${EXTERNAL_INSTALL_LOCATION}/include/eigen3"
     )

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


remove debug message

remove debug message

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -90,7 +90,6 @@
   IF(NOT ARG_DESTINATION)
      MESSAGE(FATAL_ERROR "Need DESTINATION parameter for MYSQL_INSTALL_TARGETS")
   ENDIF()
-  MESSAGE("INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION})")
   INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION})
   SET(INSTALL_LOCATION ${ARG_DESTINATION} )
   INSTALL_DEBUG_SYMBOLS("${TARGETS}")


Space should be prefixed, not suffixed, to CMAKE_CXX_FLAGS

--- standard/SetStandardOutputVariables.cmake
+++ standard/SetStandardOutputVariables.cmake
@@ -71,20 +71,20 @@

     # We want position-independent code for all 64-bit non-windows builds
     if(NOT WIN32)
-      string(APPEND CMAKE_CXX_FLAGS "-fPIC ")
-      string(APPEND CMAKE_C_FLAGS "-fPIC ")
+      string(APPEND CMAKE_CXX_FLAGS " -fPIC")
+      string(APPEND CMAKE_C_FLAGS " -fPIC")
     endif()
   endif()

   # Always use c++11 compiler with hidden visibility
   if(NOT WIN32)
-    string(APPEND CMAKE_CXX_FLAGS "-std=c++11 -fvisibility=hidden ")
+    string(APPEND CMAKE_CXX_FLAGS " -std=c++11 -fvisibility=hidden")
   endif()

   # Clang needs special additional flags to build with C++11
   if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
     message(STATUS "AppleClang C++11")
-    string(APPEND CMAKE_CXX_FLAGS "-stdlib=libc++ ")
+    string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++")
     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     message(STATUS "Clang C++11")


Build: Reformat comment banner

Build: Reformat comment banner

--- cmake/Modules/FindLibGpgme.cmake
+++ cmake/Modules/FindLibGpgme.cmake
@@ -1,12 +1,14 @@
-#
+# ~~~
 # Detect the "GnuPG Made Easy" (GPGME) library on the system.
 #
-# LIBGPGME_FOUND - set if GPGME is detected LIBGPGME_CFLAGS - GPGME compiler flags LIBGPGME_LIBRARIES - GPGME linker flags
+# LIBGPGME_FOUND - set if GPGME is detected
+# LIBGPGME_CFLAGS - GPGME compiler flags
+# LIBGPGME_LIBRARIES - GPGME linker flags
 #
 # Copyright (c) 2018 Peter Nirschl.
 #
 # Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS ile.
-#
+# ~~~

 find_program (GPGME_EXECUTABLE NAMES gpgme-config)


cmake: allow / in placements

cmake: allow / in placements

thank to @Namoshek

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -590,7 +590,7 @@
 	STRING(REGEX REPLACE ";" " " PROVIDES "${PROVIDES}")
 	STRING(REGEX REPLACE "\"- +infos/provides *= *([a-zA-Z0-9/ ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/provides\",\nKEY_VALUE, \"${PROVIDES}\", KEY_END)," contents "${contents}")

-	STRING(REGEX REPLACE "\"- +infos/placements *= *([a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/placements\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
+	STRING(REGEX REPLACE "\"- +infos/placements *= *([a-zA-Z0-9/ ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/placements\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	STRING(REGEX REPLACE "\"- +infos/recommends *= *([a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/recommends\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	STRING(REGEX REPLACE "\"- +infos/ordering *= *([a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/ordering\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	STRING(REGEX REPLACE "\"- +infos/stacking *= *([a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/stacking\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")


Andre's cmake freetype fix (TESTED)

Andre's cmake freetype fix (TESTED)

--- cmake_modules/FindFreetype.cmake
+++ cmake_modules/FindFreetype.cmake
@@ -72,6 +72,23 @@
     PATH_SUFFIXES freetype freetype2
     )

+  IF(NOT FREETYPE_INCLUDE_DIR_freetype2)
+  FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
+    HINTS
+    $ENV{FREETYPE_DIR}/include/freetype2
+    PATHS
+    /usr/local/Cellar/freetype/2.4.10/include/freetype2
+∑    /usr/local/X11R6/include
+    /usr/local/X11/include
+    /usr/X11/include
+    /usr/include/freetype2
+    /sw/include
+    /opt/local/include
+    /usr/freeware/include
+    PATH_SUFFIXES freetype freetype2
+    )
+  ENDIF(NOT FREETYPE_INCLUDE_DIR_freetype2)
+
   FIND_LIBRARY(FREETYPE_LIBRARY
     NAMES freetype libfreetype freetype219
     HINTS


Win32 compatibility

Win32 compatibility

--- adm_local/cmake_files/UsePyQt4.cmake
+++ adm_local/cmake_files/UsePyQt4.cmake
@@ -80,7 +80,7 @@
   _PYQT4_WRAP_GET_UNIQUE_TARGET_NAME(BUILD_UI_PY_FILES _uniqueTargetName)
   ADD_CUSTOM_TARGET(${_uniqueTargetName} ALL DEPENDS ${${outfiles}})

- ELSE(WIN32)
+ ELSEIF(NOT WIN32)
 ####
 # ANA: Workaround for the Microsoft Visual Studio 2010. Seems there is a bug in
 # the Microsoft Visual Studio 2010 or CMake 2.8.10.2: custom target doesn't work
@@ -105,7 +105,7 @@
     ADD_DEPENDENCIES(${_uniqueTargetName} DEPEND ${_TgName})
     SET(${outfiles} ${${outfiles}} ${_output})
   ENDFOREACH()
- ENDIF(WIN32)
+ ENDIF(NOT WIN32)
 ENDMACRO(PYQT4_WRAP_UIC)

 ####################################################################


Tweaking the IREE_SIZE_OPTIMIZED config for MSVC.

--- build_tools/cmake/iree_copts.cmake
+++ build_tools/cmake/iree_copts.cmake
@@ -352,12 +352,18 @@
       "/Gy"
       "/DNDEBUG"
       "/DIREE_STATUS_MODE=0"
-      "/PDB"
+      "/DIREE_FLAGS_ENABLE_CLI=0"
+      "/DIREE_HAL_MODULE_STRING_UTIL_ENABLE=0"
+      "/DIREE_VM_EXT_I64_ENABLE=0"
+      "/DIREE_VM_EXT_F32_ENABLE=0"
       "/Os"
       "/Oy"
+      "/Zi"
+      "/c"
   )
   iree_select_compiler_opts(IREE_SIZE_OPTIMIZED_DEFAULT_LINKOPTS
     MSVC_OR_CLANG_CL
+      "-DEBUG:FULL"
       "-LTCG"
       "-opt:ref,icf"
   )


Prefix `jegp_` to CMake's test targets

Prefix `jegp_` to CMake's test targets

From https://cmake.org/cmake/help/latest/policy/CMP0002.html:
Logical target names must be globally unique.

--- cmake/modules/jegp_add_tests.cmake
+++ cmake/modules/jegp_add_tests.cmake
@@ -3,10 +3,10 @@
 endif()

 function(jegp_add_test name)
-    add_executable(test_${name} test/${name}.cpp)
-    target_compile_options(test_${name} PRIVATE ${ARGN})
-    target_link_libraries(test_${name} PRIVATE jegp::jegp)
-    add_test(jegp_test_${name} test_${name})
+    add_executable(jegp_test_${name} test/${name}.cpp)
+    target_compile_options(jegp_test_${name} PRIVATE ${ARGN})
+    target_link_libraries(jegp_test_${name} PRIVATE jegp::jegp)
+    add_test(jegp_test_${name} jegp_test_${name})
 endfunction()

 jegp_add_test(include_utility)


Fix OpenNI/Sensor MD5

Fix OpenNI/Sensor MD5

Fix OpenNI/Sensor MD5

--- cmake/pcl_all_in_one_installer.cmake
+++ cmake/pcl_all_in_one_installer.cmake
@@ -32,10 +32,10 @@
     else(CMAKE_CL_64)
         set(OPENNI_PACKAGE "OpenNI-Win32-1.5.4-Dev.msi")
         set(OPENNI_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_PACKAGE}")
-        set(OPENNI_MD5 0b7118a0581abef411b58530d4039cf0)
+        set(OPENNI_MD5 996d48f447b41a5501b7d22af27ab251)
         set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource32-5.1.0.msi")
         set(OPENNI_SENSOR_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
-        set(OPENNI_SENSOR_MD5 8bf14b2e813859f868fc316acb2d08fa)
+        set(OPENNI_SENSOR_MD5 55da1f7541d7c9c98772bddf801c7e1c)
     endif(CMAKE_CL_64)

     set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "  IntCmp $OpenNI_selected 0 noinstall_openni_packages\n")


CMake:[4/4] Included Socket library for 64-bit builds.

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

--- 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -106,7 +106,7 @@
   )

 if (WIN32)
-  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} ${CURL_LFLAG})
+  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} ${CURL_LFLAG} ws2_32)
 else (WIN32)
   set(STOUT_TEST_LIBS
     ${STOUT_TEST_LIBS}


BUG: remove dependency to OTBIOGDAL

BUG: remove dependency to OTBIOGDAL

--- Modules/Learning/Sampling/otb-module.cmake
+++ Modules/Learning/Sampling/otb-module.cmake
@@ -6,7 +6,6 @@
     OTBImageManipulation
     OTBITK
     OTBStatistics
-    OTBIOGDAL

   TEST_DEPENDS
     OTBTestKernel


Handle non-library tokens in _LIBRARIES. (#248)

* Handle non-library tokens in _LIBRARIES.

Signed-off-by: Michel Hidalgo <2c7f9fd20fbeb41ce8894ec4653d66fa7f3b6e1a@ekumenlabs.com>

* Drop spaces on  clauses.

Signed-off-by: Michel Hidalgo <2c7f9fd20fbeb41ce8894ec4653d66fa7f3b6e1a@ekumenlabs.com>

--- ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
+++ ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
@@ -76,12 +76,11 @@
         list_append_unique(include_dirs ${${package_name}_INCLUDE_DIRS})
         foreach(library ${${package_name}_LIBRARIES})
           if(NOT "${${package_name}_LIBRARY_DIRS}" STREQUAL "")
-            if (NOT IS_ABSOLUTE ${library} OR NOT EXISTS ${library})
+            if(NOT IS_ABSOLUTE ${library} OR NOT EXISTS ${library})
               find_library(lib NAMES ${library} PATHS ${${package_name}_LIBRARY_DIRS} NO_DEFAULT_PATH)
-              if(NOT lib)
-                message(FATAL_ERROR "ament_target_dependencies() ${library} library not found in ${${package_name}_LIBRARY_DIRS}")
+              if(lib)
+                set(library ${lib})
               endif()
-              set(library ${lib})
             endif()
           endif()
           list(APPEND libraries ${library})


Fix typo in a path of doxygen build.

Fix typo in a path of doxygen build.

--- build-aux/doxygen.cmake
+++ build-aux/doxygen.cmake
@@ -225,7 +225,7 @@

   ## Config forces based on found programs ##

-  if (NOT DOT_PATH)
+  if (NOT DOXYGEN_DOT_PATH)
     file(APPEND ${additions_file} "HAVE_DOT = no\n")
   else()
     file(APPEND ${additions_file} "DOT_PATH = ${DOXYGEN_DOT_PATH}\n")