matching find hdf5.cmakes with cyclus

matching find hdf5.cmakes with cyclus

--- cmake/FindHDF5.cmake
+++ cmake/FindHDF5.cmake
@@ -26,7 +26,7 @@
 # In addition to finding the includes and libraries required to compile an HDF5
 # client application, this module also makes an effort to find tools that come
 # with the HDF5 distribution that may be useful for regression testing.
-#
+#
 # This module will define the following variables:
 #  HDF5_INCLUDE_DIRS - Location of the hdf5 includes
 #  HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated)
@@ -60,268 +60,270 @@
 include(FindPackageHandleStandardArgs)

 # List of the valid HDF5 components
-set(HDF5_VALID_COMPONENTS
+set( HDF5_VALID_COMPONENTS
     C
     CXX
-    )
+)

 # try to find the HDF5 wrapper compilers
-find_program(HDF5_C_COMPILER_EXECUTABLE
+find_program( HDF5_C_COMPILER_EXECUTABLE
     NAMES h5cc h5pcc
     HINTS ENV HDF5_ROOT
     PATH_SUFFIXES bin Bin
-    DOC "HDF5 Wrapper compiler.  Used only to detect HDF5 compile flags.")
-mark_as_advanced(HDF5_C_COMPILER_EXECUTABLE)
-
-find_program(HDF5_CXX_COMPILER_EXECUTABLE
+    DOC "HDF5 Wrapper compiler.  Used only to detect HDF5 compile flags." )
+mark_as_advanced( HDF5_C_COMPILER_EXECUTABLE )
+
+find_program( HDF5_CXX_COMPILER_EXECUTABLE
     NAMES h5c++ h5pc++
     HINTS ENV HDF5_ROOT
     PATH_SUFFIXES bin Bin
-    DOC "HDF5 C++ Wrapper compiler.  Used only to detect HDF5 compile flags.")
-mark_as_advanced(HDF5_CXX_COMPILER_EXECUTABLE)
-
-find_program(HDF5_DIFF_EXECUTABLE
+    DOC "HDF5 C++ Wrapper compiler.  Used only to detect HDF5 compile flags." )
+mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE )
+
+find_program( HDF5_DIFF_EXECUTABLE
     NAMES h5diff
     HINTS ENV HDF5_ROOT
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 file differencing tool.")
-mark_as_advanced(HDF5_DIFF_EXECUTABLE)
+    PATH_SUFFIXES bin Bin
+    DOC "HDF5 file differencing tool." )
+mark_as_advanced( HDF5_DIFF_EXECUTABLE )

 # Invoke the HDF5 wrapper compiler.  The compiler return value is stored to the
 # return_value argument, the text output is stored to the output variable.
-macro(_HDF5_invoke_compiler language output return_value)
-    if(HDF5_${language}_COMPILER_EXECUTABLE)
-        exec_program(${HDF5_${language}_COMPILER_EXECUTABLE}
+macro( _HDF5_invoke_compiler language output return_value )
+    if( HDF5_${language}_COMPILER_EXECUTABLE )
+        exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE}
             ARGS -show
             OUTPUT_VARIABLE ${output}
             RETURN_VALUE ${return_value}
-            )
-        if(${${return_value}} EQUAL 0)
+        )
+        if( ${${return_value}} EQUAL 0 )
             # do nothing
         else()
-            message(STATUS
-                "Unable to determine HDF5 ${language} flags from HDF5 wrapper.")
+            message( STATUS
+              "Unable to determine HDF5 ${language} flags from HDF5 wrapper." )
         endif()
     endif()
 endmacro()

 # Parse a compile line for definitions, includes, library paths, and libraries.
-macro(_HDF5_parse_compile_line
-        compile_line_var
-        include_paths
-        definitions
-        library_paths
-        libraries)
+macro( _HDF5_parse_compile_line
+    compile_line_var
+    include_paths
+    definitions
+    library_paths
+    libraries )

     # Match the include paths
-    string(REGEX MATCHALL "-I([^\" ]+)" include_path_flags
+    string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags
         "${${compile_line_var}}"
-        )
-    foreach(IPATH ${include_path_flags})
-        string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
-        string(REGEX REPLACE "//" "/" IPATH ${IPATH})
-        list(APPEND ${include_paths} ${IPATH})
+    )
+    foreach( IPATH ${include_path_flags} )
+        string( REGEX REPLACE "^-I" "" IPATH ${IPATH} )
+        string( REGEX REPLACE "//" "/" IPATH ${IPATH} )
+        list( APPEND ${include_paths} ${IPATH} )
     endforeach()

     # Match the definitions
-    string(REGEX MATCHALL "-D[^ ]*" definition_flags "${${compile_line_var}}")
-    foreach(DEF ${definition_flags})
-        list(APPEND ${definitions} ${DEF})
+    string( REGEX MATCHALL "-D[^ ]*" definition_flags "${${compile_line_var}}" )
+    foreach( DEF ${definition_flags} )
+        list( APPEND ${definitions} ${DEF} )
     endforeach()

     # Match the library paths
-    string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
+    string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
         "${${compile_line_var}}"
-        )
-
-    foreach(LPATH ${library_path_flags})
-        string(REGEX REPLACE "^-L" "" LPATH ${LPATH})
-        string(REGEX REPLACE "//" "/" LPATH ${LPATH})
-        list(APPEND ${library_paths} ${LPATH})
+    )
+
+    foreach( LPATH ${library_path_flags} )
+        string( REGEX REPLACE "^-L" "" LPATH ${LPATH} )
+        string( REGEX REPLACE "//" "/" LPATH ${LPATH} )
+        list( APPEND ${library_paths} ${LPATH} )
     endforeach()

     # now search for the library names specified in the compile line (match -l...)
     # match only -l's preceded by a space or comma
     # this is to exclude directory names like xxx-linux/
-    string(REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
-        "${${compile_line_var}}")
+    string( REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
+        "${${compile_line_var}}" )
     # strip the -l from all of the library flags and add to the search list
-    foreach(LIB ${library_name_flags})
-        string(REGEX REPLACE "^[, ]-l" "" LIB ${LIB})
-        list(APPEND ${libraries} ${LIB})
+    foreach( LIB ${library_name_flags} )
+        string( REGEX REPLACE "^[, ]-l" "" LIB ${LIB} )
+        list( APPEND ${libraries} ${LIB} )
     endforeach()
 endmacro()

-if(HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES)
+if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES )
     # Do nothing: we already have HDF5_INCLUDE_PATH and HDF5_LIBRARIES in the
     # cache, it would be a shame to override them
 else()
-    _HDF5_invoke_compiler(C HDF5_C_COMPILE_LINE HDF5_C_RETURN_VALUE)
-    _HDF5_invoke_compiler(CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE)
-
-    if(NOT HDF5_FIND_COMPONENTS)
-        set(HDF5_LANGUAGE_BINDINGS "C")
+    _HDF5_invoke_compiler( C HDF5_C_COMPILE_LINE HDF5_C_RETURN_VALUE )
+    _HDF5_invoke_compiler( CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE )
+
+    if( NOT HDF5_FIND_COMPONENTS )
+        set( HDF5_LANGUAGE_BINDINGS "C" )
     else()
         # add the extra specified components, ensuring that they are valid.
-        foreach(component ${HDF5_FIND_COMPONENTS})
-            list(FIND HDF5_VALID_COMPONENTS ${component} component_location)
-            if(${component_location} EQUAL -1)
-                message(FATAL_ERROR
-                    "\"${component}\" is not a valid HDF5 component.")
+        foreach( component ${HDF5_FIND_COMPONENTS} )
+            list( FIND HDF5_VALID_COMPONENTS ${component} component_location )
+            if( ${component_location} EQUAL -1 )
+                message( FATAL_ERROR
+                    "\"${component}\" is not a valid HDF5 component." )
             else()
-                list(APPEND HDF5_LANGUAGE_BINDINGS ${component})
+                list( APPEND HDF5_LANGUAGE_BINDINGS ${component} )
             endif()
         endforeach()
     endif()
-
+
     # seed the initial lists of libraries to find with items we know we need
-    set(HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5)
-    set(HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT})
-
-    foreach(LANGUAGE ${HDF5_LANGUAGE_BINDINGS})
-        if(HDF5_${LANGUAGE}_COMPILE_LINE)
-            _HDF5_parse_compile_line(HDF5_${LANGUAGE}_COMPILE_LINE
-            HDF5_${LANGUAGE}_INCLUDE_FLAGS
-            HDF5_${LANGUAGE}_DEFINITIONS
-            HDF5_${LANGUAGE}_LIBRARY_DIRS
-            HDF5_${LANGUAGE}_LIBRARY_NAMES
+    set( HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5 )
+    set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} )
+
+    foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
+        if( HDF5_${LANGUAGE}_COMPILE_LINE )
+            _HDF5_parse_compile_line( HDF5_${LANGUAGE}_COMPILE_LINE
+                HDF5_${LANGUAGE}_INCLUDE_FLAGS
+                HDF5_${LANGUAGE}_DEFINITIONS
+                HDF5_${LANGUAGE}_LIBRARY_DIRS
+                HDF5_${LANGUAGE}_LIBRARY_NAMES
             )
-
-        # take a guess that the includes may be in the 'include' sibling directory
-        # of a library directory.
-        foreach(dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS})
-            list(APPEND HDF5_${LANGUAGE}_INCLUDE_FLAGS ${dir}/../include)
+
+            # take a guess that the includes may be in the 'include' sibling directory
+            # of a library directory.
+            foreach( dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
+                list( APPEND HDF5_${LANGUAGE}_INCLUDE_FLAGS ${dir}/../include )
+            endforeach()
+        endif()
+
+        # set the definitions for the language bindings.
+        list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} )
+
+        # find the HDF5 include directories
+        find_path( HDF5_${LANGUAGE}_INCLUDE_DIR hdf5.h
+            HINTS
+                ${HDF5_${LANGUAGE}_INCLUDE_FLAGS}
+                ENV
+                    HDF5_ROOT
+            PATHS
+                $ENV{HOME}/.local/include
+            PATH_SUFFIXES
+                include
+                Include
+        )
+        mark_as_advanced( HDF5_${LANGUAGE}_INCLUDE_DIR )
+        list( APPEND HDF5_INCLUDE_DIRS ${HDF5_${LANGUAGE}_INCLUDE_DIR} )
+
+        set( HDF5_${LANGUAGE}_LIBRARY_NAMES
+            ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT}
+            ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
+
+        # find the HDF5 libraries
+        foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
+            if( UNIX AND HDF5_USE_STATIC_LIBRARIES )
+                # According to bug 1643 on the CMake bug tracker, this is the
+                # preferred method for searching for a static library.
+                # See http://www.cmake.org/Bug/view.php?id=1643.  We search
+                # first for the full static library name, but fall back to a
+                # generic search on the name if the static search fails.
+                set( THIS_LIBRARY_SEARCH_DEBUG lib${LIB}d.a ${LIB}d )
+                set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} )
+            else()
+                set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d )
+                set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} )
+            endif()
+            find_library( HDF5_${LIB}_LIBRARY_DEBUG
+                NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
+                HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS}
+                ENV HDF5_ROOT
+                PATH_SUFFIXES lib Lib )
+            find_library( HDF5_${LIB}_LIBRARY_RELEASE
+                NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
+                HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS}
+                ENV HDF5_ROOT
+                PATH_SUFFIXES lib Lib )
+            select_library_configurations( HDF5_${LIB} )
+            # even though we adjusted the individual library names in
+            # select_library_configurations, we still need to distinguish
+            # between debug and release variants because HDF5_LIBRARIES will
+            # need to specify different lists for debug and optimized builds.
+            # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
+            # up by the selection macro above) because it may specify debug and
+            # optimized variants for a particular library, but a list of
+            # libraries is allowed to specify debug and optimized only once.
+            list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
+                ${HDF5_${LIB}_LIBRARY_DEBUG} )
+            list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
+                ${HDF5_${LIB}_LIBRARY_RELEASE} )
         endforeach()
-    endif()
-
-    # set the definitions for the language bindings.
-    list(APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS})
-
-    # find the HDF5 include directories
-    find_path(HDF5_${LANGUAGE}_INCLUDE_DIR hdf5.h
-        HINTS
-        ${HDF5_${LANGUAGE}_INCLUDE_FLAGS}
-        ENV
-        HDF5_ROOT
-        PATHS
-        $ENV{HOME}/.local/include
-        PATH_SUFFIXES
-        include
-        Include
-        )
-    mark_as_advanced(HDF5_${LANGUAGE}_INCLUDE_DIR)
-    list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${LANGUAGE}_INCLUDE_DIR})
-
-    set(HDF5_${LANGUAGE}_LIBRARY_NAMES
-        ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT}
-        ${HDF5_${LANGUAGE}_LIBRARY_NAMES})
-
-    # find the HDF5 libraries
-    foreach(LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES})
-        if(UNIX AND HDF5_USE_STATIC_LIBRARIES)
-            # According to bug 1643 on the CMake bug tracker, this is the
-            # preferred method for searching for a static library.
-            # See http://www.cmake.org/Bug/view.php?id=1643.  We search
-            # first for the full static library name, but fall back to a
-            # generic search on the name if the static search fails.
-            set(THIS_LIBRARY_SEARCH_DEBUG lib${LIB}d.a ${LIB}d)
-            set(THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB})
-        else()
-            set(THIS_LIBRARY_SEARCH_DEBUG ${LIB}d)
-            set(THIS_LIBRARY_SEARCH_RELEASE ${LIB})
+        list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
+
+        # Append the libraries for this language binding to the list of all
+        # required libraries.
+        list( APPEND HDF5_LIBRARIES_DEBUG
+            ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} )
+        list( APPEND HDF5_LIBRARIES_RELEASE
+            ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} )
+    endforeach()
+
+    # We may have picked up some duplicates in various lists during the above
+    # process for the language bindings (both the C and C++ bindings depend on
+    # libz for example).  Remove the duplicates.
+    if( HDF5_INCLUDE_DIRS )
+        list( REMOVE_DUPLICATES HDF5_INCLUDE_DIRS )
+    endif()
+    if( HDF5_LIBRARIES_DEBUG )
+        list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG )
+    endif()
+    if( HDF5_LIBRARIES_RELEASE )
+        list( REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE )
+    endif()
+    if( HDF5_LIBRARY_DIRS )
+        list( REMOVE_DUPLICATES HDF5_LIBRARY_DIRS )
+    endif()
+
+    # Construct the complete list of HDF5 libraries with debug and optimized
+    # variants when the generator supports them.
+    if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
+        set( HDF5_LIBRARIES
+            debug ${HDF5_LIBRARIES_DEBUG}
+            optimized ${HDF5_LIBRARIES_RELEASE} )
+    else()
+        set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} )
+    endif()
+
+    # If the HDF5 include directory was found, open H5pubconf.h to determine if
+    # HDF5 was compiled with parallel IO support
+    set( HDF5_IS_PARALLEL FALSE )
+    foreach( _dir HDF5_INCLUDE_DIRS )
+        if( EXISTS "${_dir}/H5pubconf.h" )
+            file( STRINGS "${_dir}/H5pubconf.h"
+                HDF5_HAVE_PARALLEL_DEFINE
+                REGEX "HAVE_PARALLEL 1" )
+            if( HDF5_HAVE_PARALLEL_DEFINE )
+                set( HDF5_IS_PARALLEL TRUE )
+            endif()
         endif()
-        find_library(HDF5_${LIB}_LIBRARY_DEBUG
-            NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
-            HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS}
-            ENV HDF5_ROOT
-            PATH_SUFFIXES lib Lib)
-        find_library(HDF5_${LIB}_LIBRARY_RELEASE
-            NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
-            HINTS ${HDF5_${LANGUAGE}_LIBRARY_DIRS}
-            ENV HDF5_ROOT
-            PATH_SUFFIXES lib Lib)
-        select_library_configurations(HDF5_${LIB})
-        # even though we adjusted the individual library names in
-        # select_library_configurations, we still need to distinguish
-        # between debug and release variants because HDF5_LIBRARIES will
-        # need to specify different lists for debug and optimized builds.
-        # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
-        # up by the selection macro above) because it may specify debug and
-        # optimized variants for a particular library, but a list of
-        # libraries is allowed to specify debug and optimized only once.
-        list(APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
-            ${HDF5_${LIB}_LIBRARY_DEBUG})
-        list(APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
-            ${HDF5_${LIB}_LIBRARY_RELEASE})
-    endforeach()
-    list(APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS})
-
-    # Append the libraries for this language binding to the list of all
-    # required libraries.
-    list(APPEND HDF5_LIBRARIES_DEBUG
-        ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG})
-    list(APPEND HDF5_LIBRARIES_RELEASE
-        ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE})
-endforeach()
-
-# We may have picked up some duplicates in various lists during the above
-# process for the language bindings (both the C and C++ bindings depend on
-# libz for example).  Remove the duplicates.
-if(HDF5_INCLUDE_DIRS)
-    list(REMOVE_DUPLICATES HDF5_INCLUDE_DIRS)
+    endforeach()
+    set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
+        "HDF5 library compiled with parallel IO support" )
+    mark_as_advanced( HDF5_IS_PARALLEL )
+
 endif()
-if(HDF5_LIBRARIES_DEBUG)
-    list(REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG)
-endif()
-if(HDF5_LIBRARIES_RELEASE)
-    list(REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE)
-endif()
-if(HDF5_LIBRARY_DIRS)
-    list(REMOVE_DUPLICATES HDF5_LIBRARY_DIRS)
-endif()
-
-# Construct the complete list of HDF5 libraries with debug and optimized
-# variants when the generator supports them.
-if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-    set(HDF5_LIBRARIES
-        debug ${HDF5_LIBRARIES_DEBUG}
-        optimized ${HDF5_LIBRARIES_RELEASE})
-else()
-    set(HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE})
-endif()
-
-# If the HDF5 include directory was found, open H5pubconf.h to determine if
-# HDF5 was compiled with parallel IO support
-set(HDF5_IS_PARALLEL FALSE)
-foreach(_dir HDF5_INCLUDE_DIRS)
-    if(EXISTS "${_dir}/H5pubconf.h")
-        file(STRINGS "${_dir}/H5pubconf.h"
-            HDF5_HAVE_PARALLEL_DEFINE
-            REGEX "HAVE_PARALLEL 1")
-        if(HDF5_HAVE_PARALLEL_DEFINE)
-            set(HDF5_IS_PARALLEL TRUE)
-        endif()
-    endif()
-endforeach()
-set(HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
-    "HDF5 library compiled with parallel IO support")
-mark_as_advanced(HDF5_IS_PARALLEL)
-
-endif()
-
-find_package_handle_standard_args(HDF5 DEFAULT_MSG
-    HDF5_LIBRARIES
+
+find_package_handle_standard_args( HDF5 DEFAULT_MSG
+    HDF5_LIBRARIES
     HDF5_INCLUDE_DIRS
-    )
-
-mark_as_advanced(
-    HDF5_INCLUDE_DIRS
-    HDF5_LIBRARIES
+)
+
+mark_as_advanced(
+    HDF5_INCLUDE_DIRS
+    HDF5_LIBRARIES
     HDF5_DEFINTIONS
     HDF5_LIBRARY_DIRS
     HDF5_C_COMPILER_EXECUTABLE
-    HDF5_CXX_COMPILER_EXECUTABLE)
+    HDF5_CXX_COMPILER_EXECUTABLE )

 # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
 # HDF5_INCLUDE_DIRS
-set(HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}")
+set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
+
+


matching find hdf5.cmakes with cyclus

matching find hdf5.cmakes with cyclus


cmake

cmake

--- cmake/LNCommon.cmake
+++ cmake/LNCommon.cmake
@@ -142,35 +142,9 @@
 #------------------------------------------------------------------------------
 function(ln_make_postfix outPostfix)
 	if (WIN32)
-		#------------------------------------------------------
-		# Make static lib name.
-		#	{ProjectName}_{msvcVer}{Arch}_static_{Runtime}
-		#	e.g)	LuminoMath_msvc120x86_static_MTd.lib
-		if (MSVC_VERSION EQUAL 1400)
-			set(postfix "${postfix}_msvc80")
-		elseif (MSVC_VERSION EQUAL 1500)
-			set(postfix "${postfix}_msvc90")
-		elseif (MSVC_VERSION EQUAL 1600)
-			set(postfix "${postfix}_msvc100")
-		elseif (MSVC_VERSION EQUAL 1700)
-			set(postfix "${postfix}_msvc110")
-		elseif (MSVC_VERSION EQUAL 1800)
-			set(postfix "${postfix}_msvc120")
-		elseif (MSVC_VERSION EQUAL 1900)
-			set(postfix "${postfix}_msvc140")
-		endif()
-
-		# Architecture.
-		# http://stackoverflow.com/questions/5334095/cmake-multiarchitecture-compilation
-		if (${CMAKE_EXE_LINKER_FLAGS} MATCHES "/machine:x64")	# /machine:x64
-			set(postfix "${postfix}x64")
-		else()
-			set(postfix "${postfix}x86")
-		endif()
-
-		# Unicode.
-		if (${LN_USE_UNICODE_CHAR_SET})
-			set(postfix "${postfix}u")
+		# Unicode.
+		if (${LN_USE_UNICODE_CHAR_SET})
+			set(postfix "${postfix}U")
 		endif()

 		set(postfix "${postfix}_static")


dts: add support for application level dts.fixup

We allow the application to have its own dts.fixup.  The main use for
this right now is for the build all test to define dummy values for
defines we expect to be generated.

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

--- dts/dts.cmake
+++ dts/dts.cmake
@@ -93,10 +93,13 @@
   if(EXISTS ${DTS_SOC_FIXUP_FILE})
     set(DTS_SOC_FIXUP -f ${DTS_SOC_FIXUP_FILE})
   endif()
+  if(EXISTS ${APPLICATION_SOURCE_DIR}/dts.fixup)
+    set(DTS_APP_FIXUP -f ${APPLICATION_SOURCE_DIR}/dts.fixup)
+  endif()
   set(CMD_EXTRACT_DTS_INCLUDES ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/dts/extract_dts_includes.py
     --dts ${BOARD_FAMILY}.dts_compiled
     --yaml ${PROJECT_SOURCE_DIR}/dts/bindings
-    ${DTS_SOC_FIXUP} ${DTS_BOARD_FIXUP}
+    ${DTS_SOC_FIXUP} ${DTS_BOARD_FIXUP} ${DTS_APP_FIXUP}
     )
   execute_process(
     COMMAND ${CMD_EXTRACT_DTS_INCLUDES}


fix description

fix description

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -13,7 +13,7 @@
 set(ATBUS_MACRO_DATA_SMALL_SIZE 3072 CACHE STRING "small message buffer for io_stream channel(used to reduce memory copy when there are many small messages)")

 set(ATBUS_MACRO_HUGETLB_SIZE 4194304 CACHE STRING "huge page size in shared memory channel(unused now)")
-set(ATBUS_MACRO_MSG_LIMIT 65536 CACHE STRING "message size limie")
+set(ATBUS_MACRO_MSG_LIMIT 65536 CACHE STRING "message size limit")
 set(ATBUS_MACRO_CONNECTION_CONFIRM_TIMEOUT 30 CACHE STRING "connection confirm timeout")
 set(ATBUS_MACRO_CONNECTION_BACKLOG 128 CACHE STRING "tcp backlog")


add shared library support to add_fbthrift_cpp_library

Summary:
`add_fbthrift_cpp_library` should honor `BUILD_SHARED_LIBS`, and call
`add_library` with the right setting (`SHARED` if enabled, `STATIC` otherwise)

Reviewed By: yns88

Differential Revision: D24911124

fbshipit-source-id: 79df7640a758a592a3df3e9e79bb129dd57f2d47

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -127,8 +127,14 @@
   )

   # Now emit the library rule to compile the sources
+  if (BUILD_SHARED_LIBS)
+    set(LIB_TYPE SHARED)
+  else ()
+    set(LIB_TYPE STATIC)
+  endif ()
+
   add_library(
-    "${LIB_NAME}" STATIC
+    "${LIB_NAME}" ${LIB_TYPE}
     ${generated_sources}
   )


fbcode_builder: fix a minor bug in THRIFT_INCLUDE_DIR argument parsing

Summary:
Fix a minor bug in the argument parsing for `add_fbthrift_cpp_library()`:
only a single value should be supplied for the `THRIFT_INCLUDE_DIR` argument.
This parameter should not accept a list of arguments.

Reviewed By: strager

Differential Revision: D17125810

fbshipit-source-id: 31f354e4d6299d3626a94f3b4b5ff8c58bb0cf7b

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -22,8 +22,8 @@
 #   desired.
 function(add_fbthrift_cpp_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
-  set(one_value_args INCLUDE_DIR)
-  set(multi_value_args SERVICES DEPENDS OPTIONS THRIFT_INCLUDE_DIR)
+  set(one_value_args INCLUDE_DIR THRIFT_INCLUDE_DIR)
+  set(multi_value_args SERVICES DEPENDS OPTIONS)
   fb_cmake_parse_args(
     ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
   )


CMake: fix compiler feature detection

CMake: fix compiler feature detection

add_flag_if_supported() and add_flag_or_print_warning() were effectively
no-ops, just returning the value of the first result (usually
'-fno-omit-frame-pointer') for all subsequent checks for different flags.

Due to the way CMake caches feature detection results, we need to provide
symbolic variable names which will persist the cached results. This commit
fixes feature detection using these two macros.

The feature checks now run and get stored correctly, and the correct output can
be observed in configure logs:

  -- Performing Test C_SUPPORTS_FPIC
  -- Performing Test C_SUPPORTS_FPIC - Success
  -- Performing Test CXX_SUPPORTS_FPIC
  -- Performing Test CXX_SUPPORTS_FPIC - Success

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -107,10 +107,31 @@
   set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
 endif()

-function(add_flag_or_print_warning flag)
-  check_c_compiler_flag(${flag} C_SUPPORTS_FLAG)
-  check_cxx_compiler_flag(${flag} CXX_SUPPORTS_FLAG)
-  if (C_SUPPORTS_FLAG AND CXX_SUPPORTS_FLAG)
+function(append value)
+  foreach(variable ${ARGN})
+    set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+  endforeach(variable)
+endfunction()
+
+function(append_if condition value)
+  if (${condition})
+    foreach(variable ${ARGN})
+      set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+    endforeach(variable)
+  endif()
+endfunction()
+
+macro(add_flag_if_supported flag name)
+  check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")
+  append_if("C_SUPPORTS_${name}" "${flag}" CMAKE_C_FLAGS)
+  check_cxx_compiler_flag("-Werror ${flag}" "CXX_SUPPORTS_${name}")
+  append_if("CXX_SUPPORTS_${name}" "${flag}" CMAKE_CXX_FLAGS)
+endmacro()
+
+function(add_flag_or_print_warning flag name)
+  check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")
+  check_cxx_compiler_flag("-Werror ${flag}" "CXX_SUPPORTS_${name}")
+  if ("C_SUPPORTS_${name}" AND "CXX_SUPPORTS_${name}")
     message(STATUS "Building with ${flag}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
@@ -118,27 +139,6 @@
     message(WARNING "${flag} is not supported.")
   endif()
 endfunction()
-
-function(append value)
-  foreach(variable ${ARGN})
-    set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
-  endforeach(variable)
-endfunction()
-
-function(append_if condition value)
-  if (${condition})
-    foreach(variable ${ARGN})
-      set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
-    endforeach(variable)
-  endif()
-endfunction()
-
-macro(add_flag_if_supported flag)
-  check_c_compiler_flag(${flag} C_SUPPORTS_FLAG)
-  append_if(C_SUPPORTS_FLAG "${flag}" CMAKE_C_FLAGS)
-  check_cxx_compiler_flag(${flag} CXX_SUPPORTS_FLAG)
-  append_if(CXX_SUPPORTS_FLAG "${flag}" CMAKE_CXX_FLAGS)
-endmacro()

 if( LLVM_ENABLE_PIC )
   if( XCODE )
@@ -148,7 +148,7 @@
   elseif( WIN32 OR CYGWIN)
     # On Windows all code is PIC. MinGW warns if -fPIC is used.
   else()
-    add_flag_or_print_warning("-fPIC")
+    add_flag_or_print_warning("-fPIC" FPIC)

     if( WIN32 OR CYGWIN)
       # MinGW warns if -fvisibility-inlines-hidden is used.
@@ -284,10 +284,7 @@
     endif()

     append_if(LLVM_ENABLE_PEDANTIC "-pedantic -Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    check_cxx_compiler_flag("-Werror -Wcovered-switch-default" CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    append_if(CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG "-Wcovered-switch-default" CMAKE_CXX_FLAGS)
-    check_c_compiler_flag("-Werror -Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
-    append_if(C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG "-Wcovered-switch-default" CMAKE_C_FLAGS)
+    add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
     append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
     append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)
     check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
@@ -327,14 +324,14 @@
 macro(append_common_sanitizer_flags)
   # Append -fno-omit-frame-pointer and turn on debug info to get better
   # stack traces.
-  add_flag_if_supported("-fno-omit-frame-pointer")
+  add_flag_if_supported("-fno-omit-frame-pointer" FNO_OMIT_FRAME_POINTER)
   if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND
       NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
-    add_flag_if_supported("-gline-tables-only")
+    add_flag_if_supported("-gline-tables-only" GLINE_TABLES_ONLY)
   endif()
   # Use -O1 even in debug mode, otherwise sanitizers slowdown is too large.
   if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
-    add_flag_if_supported("-O1")
+    add_flag_if_supported("-O1" O1)
   endif()
 endmacro()

@@ -343,12 +340,12 @@
   if (LLVM_ON_UNIX)
     if (LLVM_USE_SANITIZER STREQUAL "Address")
       append_common_sanitizer_flags()
-      add_flag_or_print_warning("-fsanitize=address")
+      add_flag_or_print_warning("-fsanitize=address" FSANITIZE_ADDRESS)
     elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
       append_common_sanitizer_flags()
-      add_flag_or_print_warning("-fsanitize=memory")
+      add_flag_or_print_warning("-fsanitize=memory" FSANITIZE_MEMORY)
       if(LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")
-        add_flag_or_print_warning("-fsanitize-memory-track-origins")
+        add_flag_or_print_warning("-fsanitize-memory-track-origins" FSANITIZE_MEMORY_TRACK_ORIGINS)
       endif()
     else()
       message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
@@ -384,15 +381,9 @@
     if (C_SUPPORTS_FNO_FUNCTION_SECTIONS)
       # Don't add -ffunction-section if it can be disabled with -fno-function-sections.
       # Doing so will break sanitizers.
-      check_c_compiler_flag("-Werror -ffunction-sections" C_SUPPORTS_FFUNCTION_SECTIONS)
-      check_cxx_compiler_flag("-Werror -ffunction-sections" CXX_SUPPORTS_FFUNCTION_SECTIONS)
-      append_if(C_SUPPORTS_FFUNCTION_SECTIONS "-ffunction-sections" CMAKE_C_FLAGS)
-      append_if(CXX_SUPPORTS_FFUNCTION_SECTIONS "-ffunction-sections" CMAKE_CXX_FLAGS)
-    endif()
-    check_c_compiler_flag("-Werror -fdata-sections" C_SUPPORTS_FDATA_SECTIONS)
-    check_cxx_compiler_flag("-Werror -fdata-sections" CXX_SUPPORTS_FDATA_SECTIONS)
-    append_if(C_SUPPORTS_FDATA_SECTIONS "-fdata-sections" CMAKE_C_FLAGS)
-    append_if(CXX_SUPPORTS_FDATA_SECTIONS "-fdata-sections" CMAKE_CXX_FLAGS)
+      add_flag_if_supported("-ffunction-sections" FFUNCTION_SECTIONS)
+    endif()
+    add_flag_if_supported("-fdata-sections" FDATA_SECTIONS)
   endif()
 endif()


[CMake] Change `LLVM_DISABLE_INDEX_STORE` to be an option and remove 'FORCE' from `INDEX_DATA_STORE_PATH`

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -642,9 +642,9 @@
 endif()

 # Enable '-index-store-path' on a Debug build, if the compiler supports it and for non-IDE generators.
-set(LLVM_DISABLE_INDEX_STORE OFF CACHE BOOL "Disable '-index-store-path' flag" FORCE)
+option(LLVM_DISABLE_INDEX_STORE "Disable '-index-store-path' flag" Off)
 if (NOT LLVM_DISABLE_INDEX_STORE AND NOT XCODE AND NOT MSVC_IDE AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
-  set(INDEX_DATA_STORE_PATH "${PROJECT_BINARY_DIR}/IndexStore" CACHE STRING "Index store path" FORCE)
+  set(INDEX_DATA_STORE_PATH "${PROJECT_BINARY_DIR}/IndexStore" CACHE STRING "Index store path")

   check_c_compiler_flag("-Werror -index-store-path \"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/IndexStore\"" "C_SUPPORTS_INDEX_STORE")
   append_if("C_SUPPORTS_INDEX_STORE" "-index-store-path \"${INDEX_DATA_STORE_PATH}\"" CMAKE_C_FLAGS)


[doc] j'aime l'intégration continue

[doc] j'aime l'intégration continue

--- CI/siconos_docs.cmake
+++ CI/siconos_docs.cmake
@@ -19,7 +19,7 @@
 # mechanisms is "off" by default.
 # Check https://nonsmooth.gricad-pages.univ-grenoble-alpes.fr/siconos/install_guide/install_guide.html#id6
 # for details about components.
-set(COMPONENTS externals numerics kernel control mechanics io CACHE INTERNAL "List of siconos components to build and install")
+set(COMPONENTS externals numerics kernel CACHE INTERNAL "List of siconos components to build and install")

 option(WITH_PYTHON_WRAPPER "Build and install python bindings using swig. Default = ON" ON)
 option(WITH_SERIALIZATION "Compilation of serialization functions. Default = OFF" OFF)


build core before sync

build core before sync

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -175,6 +175,7 @@
         find_library(SECURITY Security)
     endif()
     ExternalProject_Add(realm-sync-lib
+        DEPENDS realm-core
         URL ""
         PREFIX ${CMAKE_CURRENT_SOURCE_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync
         SOURCE_DIR ${sync_directory}


ispc target list already considers the multi-isa issue

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -90,12 +90,7 @@

 MACRO (OSPRAY_ISPC_COMPILE)
   SET(ISPC_ADDITIONAL_ARGS "")
-  # iw: adding 'sse2' here forces ispc to generate multi-isa binaries
-  # even if we "want" only a single one - this is required because
-  # embree is compiled with multi-isa, and if we use a single-isa
-  # we'll get function symbols that are differently mangled than the
-  # one in embree, so will get link errors...
-  SET(ISPC_TARGETS sse2;${OSPRAY_ISPC_TARGET_LIST})
+  SET(ISPC_TARGETS ${OSPRAY_ISPC_TARGET_LIST})

   SET(ISPC_TARGET_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})
   STRING(REPLACE ";" "," ISPC_TARGET_ARGS "${ISPC_TARGETS}")
@@ -188,7 +183,7 @@
       DEPENDS ${input} ${deps}
       COMMENT "Building ISPC object ${outdir}/${fname}.dev${ISPC_TARGET_EXT}"
     )
-
-  SET(ISPC_OBJECTS ${ISPC_OBJECTS} ${results})
+
+    SET(ISPC_OBJECTS ${ISPC_OBJECTS} ${results})
   ENDFOREACH()
 ENDMACRO()


bump version number

bump version number

git-svn-id: 647c2dfdf120d9af8205d960f30c8711574448cd@1400 6778bc44-b910-0410-a7a0-be141de4315d

--- src/libprojectM/cmake/CPack-projectM.cmake
+++ src/libprojectM/cmake/CPack-projectM.cmake
@@ -17,8 +17,8 @@
 #SET(CPACK_BINARY_TGZ ON)
 #SET(CPACK_SOURCE_Z OFF)
 SET(CPACK_PACKAGE_VERSION_MAJOR "2")
-SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "1")
+SET(CPACK_PACKAGE_VERSION_MINOR "1")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")

 IF(CPACK_PROJECTM_INCLUDED)
 	INCLUDE(CPack)


respect the install prefix for the systemd unit file anyways.

--- cmake/ArangoDBInstall.cmake
+++ cmake/ArangoDBInstall.cmake
@@ -157,6 +157,9 @@
       ${ARANGODB_SOURCE_DIR}/Installation/systemd/arangodb3.service.in
       ${PROJECT_BINARY_DIR}/arangodb3.service
       NEWLINE_STYLE UNIX)
+    if (CMAKE_INSTALL_PREFIX AND NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/")
+      set(SYSTEMD_UNIT_DIR "${CMAKE_INSTALL_PREFIX}/${SYSTEMD_UNIT_DIR}/")
+    endif()
     install(FILES ${PROJECT_BINARY_DIR}/arangodb3.service
       DESTINATION ${SYSTEMD_UNIT_DIR}/
       RENAME ${SERVICE_NAME}.service)


Update FindOSCISystemC.cmake

Update FindOSCISystemC.cmake

--- cmake/FindOSCISystemC.cmake
+++ cmake/FindOSCISystemC.cmake
@@ -170,7 +170,7 @@
   set(SystemC_VERSION ${SC_VERSION_MAJOR}.${SC_VERSION_MINOR}.${SC_VERSION_PATCH} CACHE STRING "SystemC Version")
 endif()

-
+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(OSCISystemC
   REQUIRED_VARS
     SystemC_LIBRARY


fix default include dirs for TBB

fix default include dirs for TBB

--- cmake/OpenCVDetectTBB.cmake
+++ cmake/OpenCVDetectTBB.cmake
@@ -22,7 +22,7 @@

 if(NOT HAVE_TBB)
   set(TBB_DEFAULT_INCLUDE_DIRS
-    "/opt/intel/tbb" "/usr/local/include" "/usr/include"
+    "/opt/intel/tbb/include" "/usr/local/include" "/usr/include"
     "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB"
     "C:/Program Files (x86)/tbb/include"
     "C:/Program Files (x86)/tbb/include"


Several fixes for lintian varnings

Several fixes for lintian varnings

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -1,3 +1,6 @@
+# Use patched version of CPACK to build accurate set of Debian packages
+# https://github.com/asmorkalov/CMake/tree/deb_generator_improvement
+
 if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
 set(CPACK_set_DESTDIR "on")

@@ -17,6 +20,8 @@
   set(CPACK_PACKAGE_VERSION_PATCH "${OPENCV_VERSION_PATCH}")
   set(CPACK_PACKAGE_VERSION "${OPENCV_VCSVERSION}")
 endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
+
+set(CPACK_STRIP_FILES 1)

 #arch
 if(X86)
@@ -90,24 +95,31 @@
 if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
   set(CPACK_COMPONENT_libs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}")
   set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library")
+  set(CPACK_COMPONENT_libs_SECTION "libs")

   set(CPACK_COMPONENT_python_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-python")
   set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_python_SECTION "python")

   set(CPACK_COMPONENT_java_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-java")
   set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_java_SECTION "java")

   set(CPACK_COMPONENT_dev_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-dev")
   set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_dev_SECTION "libdevel")

   set(CPACK_COMPONENT_docs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-docs")
   set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_docs_SECTION "doc")

   set(CPACK_COMPONENT_samples_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-samples")
   set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_samples_SECTION "devel")

   set(CPACK_COMPONENT_tests_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-tests")
   set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_tests_SECTION "misc")
 endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)

 if(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT)


Updated modmetis MD5 due to Windows fix.

--- cmake/ThirdPartyMetis.cmake
+++ cmake/ThirdPartyMetis.cmake
@@ -7,7 +7,7 @@
         modmetis-5.0.2
         PREFIX ${TPSRC}
         URL ${TPURL}/modmetis-5.0.2.tar.bz2
-        URL_MD5 "f3b79d6bf41930419988e0fa04643c5e"
+        URL_MD5 "ffbdc6a50283934389a0b3b0c32b62c0"
         DOWNLOAD_DIR ${TPSRC}
         CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist -DCMAKE_C_FLAGS:STRING=-fPIC -DGKLIB_PATH:PATH=${TPSRC}/src/modmetis-5.0.2/GKlib ${TPSRC}/src/modmetis-5.0.2
     )


Fix build when px4 is a submodule (#7006)

* Fix build when px4 is a submodule

* Check if submodule directory exists.

* Fix submodule directory reading

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -986,10 +986,34 @@

 	set(px4_git_ver_header ${PX4_BINARY_DIR}/build_git_version.h)

+	# check if px4 source is a git repo
+	if(EXISTS ${PX4_SOURCE_DIR}/.git)
+		if (IS_DIRECTORY ${PX4_SOURCE_DIR}/.git)
+			# standard git repo
+			set(git_dir_path ${PX4_SOURCE_DIR}/.git)
+		else()
+			# git submodule
+			file(READ ${PX4_SOURCE_DIR}/.git git_dir_path)
+			string(STRIP ${git_dir_path} git_dir_path)
+			string(REPLACE "gitdir: " "" git_dir_path ${git_dir_path})
+			get_filename_component(git_dir_path ${git_dir_path} ABSOLUTE)
+		endif()
+	else()
+		message(FATAL_ERROR "is not a git repository")
+	endif()
+	if(NOT IS_DIRECTORY "${git_dir_path}")
+		message(FATAL_ERROR "${git_dir_path} is not a directory")
+	endif()
+
+	set(deps
+		${PX4_SOURCE_DIR}/Tools/px_update_git_header.py
+		${git_dir_path}/index
+		${git_dir_path}/HEAD)
+
 	add_custom_command(
 		OUTPUT ${px4_git_ver_header}
 		COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_update_git_header.py ${px4_git_ver_header} > ${PX4_BINARY_DIR}/git_header.log
-		DEPENDS ${PX4_SOURCE_DIR}/Tools/px_update_git_header.py ${PX4_SOURCE_DIR}/.git/index ${PX4_SOURCE_DIR}/.git/HEAD
+		DEPENDS ${deps}
 		WORKING_DIRECTORY ${PX4_SOURCE_DIR}
 		COMMENT "Generating git hash header"
 		)


CMake / Clang: Increase warning level

CMake / Clang: Increase warning level

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -350,6 +350,8 @@
 				-Wno-varargs
 				-Wno-address-of-packed-member
 				-Wno-unknown-warning-option
+				-Wunused-but-set-variable
+				#-Wdouble-promotion # needs work first
 			)
 		endif()
 	else()


Force DCMTK to build as static libs on Windows

--- cmake/externals/DCMTK.cmake
+++ cmake/externals/DCMTK.cmake
@@ -26,6 +26,12 @@
         endif()
     endif()

+    if (WIN32)
+        set(shared_libs_option "-DBUILD_SHARED_LIBS:BOOL=OFF")
+    else()
+        set(shared_libs_option "-DBUILD_SHARED_LIBS:BOOL=ON")
+    endif()
+
     ExternalProject_Add(DCMTK
         PREFIX dcmtk
         ${location}
@@ -37,7 +43,7 @@
         CMAKE_CACHE_ARGS
             ${ep_common_cache_args}
             ${ep_project_include_arg}
-            -DBUILD_SHARED_LIBS:BOOL=ON
+            ${shared_libs_option}
             -DDCMTK_WITH_DOXYGEN:BOOL=OFF
             -DDCMTK_WITH_ZLIB:BOOL=OFF # see github issue #25
             -DDCMTK_WITH_OPENSSL:BOOL=OFF # see github issue #25


Whitespace changes from emacs cmake mode.

svn path=/trunk/; revision=9222

--- cmake/modules/drivers.cmake
+++ cmake/modules/drivers.cmake
@@ -38,10 +38,10 @@
 option(ENABLE_DYNDRIVERS "Enable dynamic loading of device drivers" ON)
 if(ENABLE_DYNDRIVERS AND NOT BUILD_SHARED_LIBS)
   message(STATUS
-  "WARNING: Shared libraries not built. Setting ENABLE_DYNDRIVERS OFF."
-  )
+    "WARNING: Shared libraries not built. Setting ENABLE_DYNDRIVERS OFF."
+    )
   set(ENABLE_DYNDRIVERS OFF CACHE BOOL
-  "Enable dynamic loading of device drivers" FORCE)
+    "Enable dynamic loading of device drivers" FORCE)
 endif(ENABLE_DYNDRIVERS AND NOT BUILD_SHARED_LIBS)
 if(ENABLE_DYNDRIVERS AND WIN32)
   if(NOT CYGWIN AND NOT MSYS)
@@ -55,12 +55,12 @@
     set(libplplot${LIB_TAG}_RPATH ${LTDL_LIBRARY_DIR})
   else(LTDL_FOUND)
     message(STATUS
-       "WARNING: libltdl library not found. Setting ENABLE_DYNDRIVERS OFF.\n"
-    "   Please install that library and/or set the environment variables\n"
-    "   CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH appropriately."
-    )
+      "WARNING: libltdl library not found. Setting ENABLE_DYNDRIVERS OFF.\n"
+      "   Please install that library and/or set the environment variables\n"
+      "   CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH appropriately."
+      )
     set(ENABLE_DYNDRIVERS OFF CACHE BOOL
-    "Enable dynamic loading of device drivers" FORCE)
+      "Enable dynamic loading of device drivers" FORCE)
   endif(LTDL_FOUND)
 endif(ENABLE_DYNDRIVERS AND NOT LTDL_WIN32)


Added cmake flats for selecting bta library: BTA_ETH or BTA_P100

--- cmake_modules/Findbta.cmake
+++ cmake_modules/Findbta.cmake
@@ -1,6 +1,9 @@
 # - Try to find btatofapi headers and binaries
 # Once done this will define
 #
+set(BTA_ETH OFF)
+set(BTA_P100 OFF)
+
 FIND_PATH(bta_INCLUDE_DIR NAMES bta.h
  	PATHS
   		/usr/include/libbta/
@@ -27,8 +30,22 @@
 	DOC "Library binary"
 )

-#Not needed by now as we have just 1 include and lib
-set(bta_LIBRARIES ${bta_eth_LIBRARY} )
+find_library(bta_p100_LIBRARY NAMES bta_p100
+        PATHS
+  		/usr/lib/
+		/usr/local/lib/
+		../windows/lib/${ARCH_DIR}/
+	NO_DEFAULT_PATH
+	DOC "Library binary"
+)
+
+if (BTA_ETH)
+	set(bta_LIBRARIES ${bta_eth_LIBRARY})
+elseif (BTA_P100)
+	set(bta_LIBRARIES ${bta_eth_LIBRARY})
+else ()
+set(bta_LIBRARIES ${bta_p100_LIBRARY} ${bta_eth_LIBRARY})
+endif()
 #set(m100_INCLUDE_DIRS ${m100_INCLUDE_DIR} )

 include(FindPackageHandleStandardArgs)


modules: this made no sense.

modules: this made no sense.

    if(SOMETHING)
        # ...
    else()
        # SOMETHING is not set, this statement does nothing
        unset(SOMETING)
    endif()

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -508,7 +508,7 @@
             list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCY_LIBRARIES ${MAGNUM_${_DEPENDENCY}_LIBRARY} ${_MAGNUM_${_DEPENDENCY}_LIBRARIES})
             list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCY_INCLUDE_DIRS ${MAGNUM_${_DEPENDENCY}_INCLUDE_DIRS})
         else()
-            unset(MAGNUM_${_DEPENDENCY}_LIBRARY)
+            unset(MAGNUM_${_COMPONENT}_LIBRARY)
         endif()
     endforeach()


Add style testing to "histomicstk" algorithms directory

--- plugin.cmake
+++ plugin.cmake
@@ -15,8 +15,13 @@
 ###############################################################################

 add_python_style_test(
-  python_static_analysis_HistomicsTK
+  python_static_analysis_HistomicsTK_api
   "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/server"
 )

+add_python_style_test(
+  python_static_analysis_HistomicsTK_algorithms
+  "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/histomicstk"
+)
+
 add_python_test(example PLUGIN HistomicsTK)


Automated merge with ssh://palmer@hg.lindenlab.com/viewer/render-pipeline

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -208,7 +208,7 @@
     set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
   endif (NOT GCC_DISABLE_FATAL_WARNINGS)

-  set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual")
+  set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor")

   set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
   set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")


More GCC 4.7.2 happiness.

More GCC 4.7.2 happiness.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -158,6 +158,10 @@
       OUTPUT_VARIABLE CXX_VERSION
       OUTPUT_STRIP_TRAILING_WHITESPACE)

+  #<FS:ND> Gentoo defines _FORTIFY_SOURCE by default
+  if (NOT ${GXX_VERSION} MATCHES "Gentoo 4.7.*")
+  #</FS:ND>
+
   if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
     add_definitions(-D_FORTIFY_SOURCE=2)
   else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
@@ -166,6 +170,10 @@
     endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
   endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})

+  #<FS:ND> Gentoo defines _FORTIFY_SOURCE by default
+  endif (NOT ${GXX_VERSION} MATCHES "Gentoo 4.7.*")
+  #</FS:ND>
+
   # Let's actually get a numerical version of gxx's version
   STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})

@@ -180,6 +188,11 @@
   if(${CXX_VERSION_NUMBER} GREATER 460)
     set(CMAKE_CXX_FLAGS "-Wno-unused-but-set-variable ${CMAKE_CXX_FLAGS}")
   endif (${CXX_VERSION_NUMBER} GREATER 460)
+  #</FS:ND>
+  #<FS:ND> Disable attribute warnings for GCC >= 4.7. It causes a lot of warning/errors in boost.
+  if(${CXX_VERSION_NUMBER} GREATER 470)
+    set(CMAKE_CXX_FLAGS "-Wno-attributes ${CMAKE_CXX_FLAGS}")
+  endif (${CXX_VERSION_NUMBER} GREATER 470)
   #</FS:ND>

   # End of hacks.


Adding multi-arch hints to CMake, allowing it to correctly find libraries on multi-arch debian-based systems.

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -73,18 +73,35 @@
   # If someone has specified a word size, use that to determine the
   # architecture.  Otherwise, let the architecture specify the word size.
   if (WORD_SIZE EQUAL 32)
+    #message(STATUS "WORD_SIZE is 32")
     set(ARCH i686)
   elseif (WORD_SIZE EQUAL 64)
+    #message(STATUS "WORD_SIZE is 64")
     set(ARCH x86_64)
   else (WORD_SIZE EQUAL 32)
+    #message(STATUS "WORD_SIZE is UNDEFINED")
     execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
                     OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
     if (ARCH STREQUAL x86_64)
+      #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}")
       set(WORD_SIZE 64)
     else (ARCH STREQUAL x86_64)
+      #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}")
       set(WORD_SIZE 32)
     endif (ARCH STREQUAL x86_64)
   endif (WORD_SIZE EQUAL 32)
+
+  if (WORD_SIZE EQUAL 32)
+    set(DEB_ARCHITECTURE i386)
+  else (WORD_SIZE EQUAL 32)
+    set(DEB_ARCHITECTURE amd64)
+  endif (WORD_SIZE EQUAL 32)
+
+  execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT OUTPUT_VARIABLE DPKG_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+  #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}")
+  if (DPKG_RESULT EQUAL 0)
+    set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH})
+  endif (DPKG_RESULT EQUAL 0)

   set(LL_ARCH ${ARCH}_linux)
   set(LL_ARCH_DIR ${ARCH}-linux)


CMake: throw on OgreAssert in Release builds by default

we need this for asserts to work in RelWithDebinfo configuration.
Also this gives us a backtrace in python instead of just instantly
crashing the interpreter.

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -75,7 +75,7 @@

 endif()

-set(OGRE_ASSERT_MODE 0 CACHE STRING
+set(OGRE_ASSERT_MODE 1 CACHE STRING
 	"Enable Ogre asserts and exceptions. Possible values:
 	0 - Standard asserts in debug builds, nothing in release builds.
 	1 - Standard asserts in debug builds, exceptions in release builds.


ENH: use dylib output for ossim on MacOS

--- CMake/External_ossim.cmake
+++ CMake/External_ossim.cmake
@@ -81,6 +81,7 @@
       -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
       -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
       -DBUILD_OSSIM_APPS:BOOL=OFF
+      -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
       -DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
     DEPENDS ${${proj}_DEPENDENCIES}
     CMAKE_COMMAND ${SB_CMAKE_COMMAND}


Updated boost version to 1.56

Updated boost version to 1.56

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -91,8 +91,8 @@
       # Boost needs in-source builds
       BINARY_DIR ${proj}-src
       PREFIX ${proj}-cmake
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_55_0.tar.bz2
-      URL_MD5 d6eef4b4cacb2183f2bf265a5a03a354
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_56_0.tar.bz2
+      URL_MD5 a744cf167b05d72335f27c88115f211d
       INSTALL_DIR ${proj}-install
       CONFIGURE_COMMAND "${_boost_cfg_cmd}"
       BUILD_COMMAND "${_boost_build_cmd}"


Cleanup: Just search for support for the deprecated  attribute, don't check whether it is silently ignored

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@28131 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/checks/check_01_compiler_features.cmake
+++ deal.II/cmake/checks/check_01_compiler_features.cmake
@@ -358,29 +358,12 @@

 	  int main () {}
   "
-  DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED)
-
-# ...and then verify whether it actually errors out if
-# -Werror is given
-PUSH_TEST_FLAG("-Werror")
-CHECK_CXX_SOURCE_COMPILES(
-  "
-          int old_fn () __attribute__((deprecated));
-          int old_fn () { return 0; }
-          int (*fn_ptr)() = old_fn;
-
-	  int main () {}
-  "
-  DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED_WARNING)
-POP_TEST_FLAG()
-
-IF(DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED
-   AND
-   (NOT DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED_WARNING))
-  MESSAGE(STATUS "Compiler supports the deprecated attribute")
+  DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED
+  )
+
+IF(DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED)
   SET(DEAL_II_DEPRECATED "__attribute__((deprecated))")
 ELSE()
-  MESSAGE(STATUS "Compiler does not support the deprecated attribute")
   SET(DEAL_II_DEPRECATED " ")
 ENDIF()


ARROW-4159: [C++] Build with -Wdocumentation when using clang and BUILD_WARNING_LEVEL=CHECKIN

This will help prevent Doxygen-related build failures

Author: Wes McKinney <wesm+git@apache.org>

Closes #4441 from wesm/ARROW-4159 and squashes the following commits:

a019c1484 <Wes McKinney> Build with -Wdocumentation on clang

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -137,14 +137,14 @@
     # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warnings-by-compiler-version
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /W3 /wd4365 /wd4267 /wd4838")
   elseif("${COMPILER_FAMILY}" STREQUAL "clang")
-    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Weverything -Wno-c++98-compat \
+    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Weverything -Wdocumentation \
+-Wno-c++98-compat \
 -Wno-c++98-compat-pedantic -Wno-deprecated -Wno-weak-vtables -Wno-padded \
 -Wno-comma -Wno-unused-macros -Wno-unused-parameter -Wno-unused-template -Wno-undef \
 -Wno-shadow -Wno-switch-enum -Wno-exit-time-destructors \
 -Wno-global-constructors -Wno-weak-template-vtables -Wno-undefined-reinterpret-cast \
 -Wno-implicit-fallthrough -Wno-unreachable-code-return \
 -Wno-float-equal -Wno-missing-prototypes -Wno-documentation-unknown-command \
--Wno-documentation \
 -Wno-old-style-cast -Wno-covered-switch-default \
 -Wno-cast-align -Wno-vla-extension -Wno-shift-sign-overflow \
 -Wno-used-but-marked-unused -Wno-missing-variable-declarations \


Remove temp directory on init

Remove temp directory on init

Remove the temporary directory on init if it exists. This ensures that
temp is in a pristine state between runs (just in case).

--- NodeJS.cmake
+++ NodeJS.cmake
@@ -227,6 +227,9 @@

     # Create a temporary download directory
     set(TEMP ${CMAKE_CURRENT_BINARY_DIR}/temp)
+    if(EXISTS ${TEMP})
+        file(REMOVE_RECURSE ${TEMP})
+    endif()
     file(MAKE_DIRECTORY ${TEMP})

     # Unless the target is special version "latest", the parameters


ENH: Update qmake on Krull

ENH: Update qmake on Krull

--- Krull_Kitware_TubeTK.cmake
+++ Krull_Kitware_TubeTK.cmake
@@ -60,7 +60,7 @@
 set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" )
 set( SITE_CTEST_COMMAND "/usr/local/bin/ctest -j5" )

-set( SITE_QMAKE_COMMAND "/usr/local/Trolltech/Qt-4.7.4/bin/qmake" )
+set( SITE_QMAKE_COMMAND "/usr/bin/qmake" )

 set( SITE_COVERAGE_COMMAND "/usr/bin/gcov" )
 set( SITE_MEMORYCHECK_COMMAND "/usr/bin/valgrind" )


Fixing the matlab issues (5)

Fixing the matlab issues (5)

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

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -918,7 +918,7 @@
       PROPERTIES
         CXX_VISIBILITY_PRESET "hidden"
         C_VISIBILITY_PRESET "hidden"
-        VISIBILITY_INLINES_HIDDEN "hidden"
+        VISIBILITY_INLINES_HIDDEN ON
     )

     #  get_target_property(


Flush cache: OpenCV patterns

Flush cache: OpenCV patterns

[skip ci]

--- cmake/modules/hunter_flush_cache_variables.cmake
+++ cmake/modules/hunter_flush_cache_variables.cmake
@@ -35,6 +35,16 @@
     endif()

     if(x MATCHES "^_Boost_LIBRARY_DIR_.*_LAST$")
+      set(cleanup TRUE)
+    endif()
+    # }
+
+    # From OpenCV Android {
+    if(x MATCHES "^OpenCV_3RDPARTY_LIB_DIR_(OPT|DBG)$")
+      set(cleanup TRUE)
+    endif()
+
+    if(x MATCHES "^OpenCV_CONFIG_PATH$")
       set(cleanup TRUE)
     endif()
     # }


added rosbash to cakin

added rosbash to cakin

--- catkin.cmake
+++ catkin.cmake
@@ -4,6 +4,7 @@

 foreach(subdir
     core/roslib
+    tools/rosbash
     )
   add_subdirectory(${subdir})
 endforeach()


Coverage: use -O0 instead of -Og

Coverage: use -O0 instead of -Og

--- extras/CompileOptions.cmake
+++ extras/CompileOptions.cmake
@@ -36,7 +36,7 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID STREQUAL  "GNU")
-	if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8)
+	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND (NOT ${COVERAGE}))
 		add_compile_options(-g -Og)
 	else()
 		add_compile_options(-g -O0)
@@ -70,7 +70,7 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-	if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0)
+	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0) AND (NOT ${COVERAGE}))
 		add_compile_options(-g -Og)
 	else()
 		add_compile_options(-g -O0)
@@ -78,7 +78,7 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
-	if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)
+	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0) AND (NOT ${COVERAGE}))
 		add_compile_options(-g -Og)
 	else()
 		add_compile_options(-g -O0)


Squashed '3rdparty/github/lua534/' changes from eb865633..27169a29

27169a29 Merge commit '180783ce52a82ba244c2d4723cbb20b89c66ef3e' [ci skip]
180783ce Squashed '3rdparty/github/cmake-utils/' changes from ee0bf6c..f20c24c

git-subtree-dir: 3rdparty/github/lua534
git-subtree-split: 27169a2998f281dbfb61fba5d123e66bbfe6d6e9

--- 3rdparty/github/cmake-utils/cmake/MyPackageDependency.cmake
+++ 3rdparty/github/cmake-utils/cmake/MyPackageDependency.cmake
@@ -160,9 +160,9 @@
       #
       IF (_STATIC)
         IF (MYPACKAGE_DEBUG)
-          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding -D${packageDepend}_static compile definition to target ${_target}")
-        ENDIF ()
-        TARGET_COMPILE_DEFINITIONS(${_target} PUBLIC -D${packageDepend}_static)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding -D${packageDepend}_STATIC compile definition to target ${_target}")
+        ENDIF ()
+        TARGET_COMPILE_DEFINITIONS(${_target} PUBLIC -D${packageDepend}_STATIC)
         IF (MYPACKAGE_DEBUG)
           MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} dependency becomes ${packageDepend}_static for target ${_target}")
         ENDIF ()


Removed SettingsPath to fix AppVeyor builds

- We didn't need it anyways ¯\_(ツ)_/¯

--- native/cmake/copyQt-common.cmake
+++ native/cmake/copyQt-common.cmake
@@ -13,7 +13,7 @@
 set(Qt_Paths "PrefixPath" "DocumentationPath" "HeadersPath" "LibrariesPath"
         "LibraryExecutablesPath" "BinariesPath" "PluginsPath" "ImportsPath"
         "Qml2ImportsPath" "ArchDataPath" "DataPath" "TranslationsPath" "ExamplesPath"
-        "TestsPath" "SettingsPath")
+        "TestsPath")

 foreach (_STRING ${QTDIAG_OUT})
     string(STRIP ${_STRING} _STRIPPED)


Removed header guard and marked package as cacheable.

--- cmake/projects/SDL2/hunter.cmake
+++ cmake/projects/SDL2/hunter.cmake
@@ -1,8 +1,4 @@
-if(DEFINED HUNTER_CMAKE_PROJECTS_SDL2_HUNTER_CMAKE_)
-  return()
-else()
-  set(HUNTER_CMAKE_PROJECTS_SDL2_HUNTER_CMAKE_ 1)
-endif()
+# !!! DO NOT PLACE HEADER GUARDS HERE !!!

 # Load used modules
 include(hunter_add_version)
@@ -21,4 +17,5 @@
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_cacheable(SDL2)
 hunter_download(PACKAGE_NAME SDL2)


Update FindMyPackage.cmake

Update FindMyPackage.cmake

--- events/cmake/FindLB/events.cmake
+++ events/cmake/FindLB/events.cmake
@@ -34,6 +34,7 @@
 	elseif(NOT ${_package}_FIND_QUIETLY)
 		message(STATUS "Find ${_package_name}: ${_msg}")
 	endif()
+	set(${_package}_NOT_FOUND_MESSAGE "${_msg}")
 endmacro()

 # Info reporting macro
@@ -63,16 +64,20 @@
 endforeach()
 _fmp_report_debug("########")

+# For CMake GUI
+option(${_package}_PREFER_HIGHEST
+	"Prefer the highest available version even if a lower version has more requested optional components"
+)
+
 # Find where all versions are installed
-if(NOT ${_package}_ROOT)
-	find_path(${_package}_ROOT
-		NAMES
-			${_package}
-	)
-endif()
+find_path(${_package}_ROOT
+	NAMES
+		${_package}
+	DOC "This should be the directory that contains ${_package}"
+)

 # Error out if we could not find the package directory
-if(${${_package}_ROOT} STREQUAL "${_package}_ROOT-NOTFOUND")
+if("${${_package}_ROOT}" STREQUAL "${_package}_ROOT-NOTFOUND")
 	_fmp_report_error("Could not find where versions are stored - please set ${_package}_ROOT")
 	return()
 endif()
@@ -172,35 +177,39 @@
 	return()
 endif()

-# Prefer versions with the most requested optional components
-set(_preferred_versions "")
-set(_preferred_versions_compnum 0)
-foreach(_version ${_candidate_versions})
-	set(_compnum 0)
-	# Count present requested optional components
-	foreach(_component ${${_package}_FIND_COMPONENTS})
-		if(NOT ${_package}_FIND_REQUIRED_${_component})
-			if(EXISTS "${${_package}_VERSIONS_DIRECTORY}/${_version}/cmake/${_package}/${_component}.cmake")
-				math(EXPR _compnum "${_compnum} + 1")
+if(${_package}_PREFER_HIGHEST)
+	set(_preferred_versions "${_candidate_versions}")
+else()
+	# Prefer versions with the most requested optional components
+	set(_preferred_versions "")
+	set(_preferred_versions_compnum 0)
+	foreach(_version ${_candidate_versions})
+		set(_compnum 0)
+		# Count present requested optional components
+		foreach(_component ${${_package}_FIND_COMPONENTS})
+			if(NOT ${_package}_FIND_REQUIRED_${_component})
+				if(EXISTS "${${_package}_VERSIONS_DIRECTORY}/${_version}/cmake/${_package}/${_component}.cmake")
+					math(EXPR _compnum "${_compnum} + 1")
+				endif()
 			endif()
+		endforeach()
+		# Update preferred versions
+		if(_compnum GREATER _preferred_versions_compnum)
+			set(_preferred_versions ${_version})
+			set(_preferred_versions_compnum ${_compnum})
+		elseif(_compnum EQUAL _preferred_versions_compnum)
+			list(APPEND _preferred_versions ${_version})
 		endif()
 	endforeach()
-	# Update preferred versions
-	if(_compnum GREATER _preferred_versions_compnum)
-		set(_preferred_versions ${_version})
-		set(_preferred_versions_compnum ${_compnum})
-	elseif(_compnum EQUAL _preferred_versions_compnum)
-		list(APPEND _preferred_versions ${_version})
-	endif()
-endforeach()
-_fmp_report_debug("_preferred_versions=${_preferred_versions}")
-
-# Error out if we made a mistake in our logic above
-# (worst case should be that _preferred_versions is the same as _candidate_versions)
-list(LENGTH _preferred_versions _num_preferred)
-if(_num_preferred EQUAL 0)
-	message(FATAL_ERROR "Something has gone wrong the code in Find${_package}.cmake")
-	return()
+	_fmp_report_debug("_preferred_versions=${_preferred_versions}")
+
+	# Error out if we made a mistake in our logic above
+	# (worst case should be that _preferred_versions is the same as _candidate_versions)
+	list(LENGTH _preferred_versions _num_preferred)
+	if(_num_preferred EQUAL 0)
+		message(FATAL_ERROR "Something has gone wrong the code in Find${_package}.cmake")
+		return()
+	endif()
 endif()

 # Finally, select the highest version
@@ -211,18 +220,41 @@
 	endif()
 endforeach()
 _fmp_report_debug("_preferred_version=${_preferred_version}")
+set(_ver_path "${${_package}_VERSIONS_DIRECTORY}/${_preferred_version}/cmake")
+
+# Make sure all requirements are met
+include("${_ver_path}/${_package}-requirements.cmake" OPTIONAL)
+foreach(_component ${${_package}_FIND_COMPONENTS})
+	include("${_ver_path}/${_package}/${_component}-requirements.cmake" OPTIONAL)
+endforeach()

 # Load the version and report findings
-include("${${_package}_VERSIONS_DIRECTORY}/${_preferred_version}/cmake/${_package}.cmake")
+include("${_ver_path}/${_package}.cmake")
 set(_components "")
 foreach(_component ${${_package}_FIND_COMPONENTS})
-	set(_comp_path "${${_package}_VERSIONS_DIRECTORY}/${_preferred_version}/cmake/${_package}/${_component}.cmake")
+	set(_comp_path "${_ver_path}/${_package}/${_component}.cmake")
 	if(EXISTS "${_comp_path}")
 		include("${_comp_path}")
 		list(APPEND _components ${_component})
+		set(${_package}_${_component}_FOUND 1)
 	endif()
 endforeach()
 set(${_package}_FOUND 1)
+set(${_package}_VERSION "${_preferred_version}")
+set(${_package}_VERSION_STRING "${_preferred_version}")
+string(REPLACE "." ";" _preferred_version_list "${_preferred_version}")
+list(LENGTH _preferred_version_list _preferred_version_depth)
+list(GET _preferred_version_list 0 ${_package}_VERSION_MAJOR)
+if(_preferred_version_depth GREATER 1)
+	list(GET _preferred_version_list 1 ${_package}_VERSION_MINOR)
+	if(_preferred_version_depth GREATER 2)
+		list(GET _preferred_version_list 2 ${_package}_VERSION_PATCH)
+		if(_preferred_version_depth GREATER 3)
+			list(GET _preferred_version_list 3 ${_package}_VERSION_TWEAK)
+		endif()
+	endif()
+endif()
+set(${_package}_ROOT_DIR "${${_package}_VERSIONS_DIRECTORY}/${_preferred_version}")
 string(REPLACE ";" ", " _components "${_components}")
 if(_components STREQUAL "")
 	_fmp_report_info("Found version ${_preferred_version} with no components")


Make thrift metadata available across fbcode oss builds.

Summary: There are downstream oss builds showing build failure caused by introduction of metadata. We want to make them proceed to build so we won't get errors in CI.

Reviewed By: iahs

Differential Revision: D19900007

fbshipit-source-id: 4201448f7980b53e407fd2bc1c74ed4ffa8e18c1

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -62,12 +62,14 @@
     "${output_dir}/gen-cpp2/${base}_types.h"
     "${output_dir}/gen-cpp2/${base}_types.tcc"
     "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
+    "${output_dir}/gen-cpp2/${base}_metadata.h"
   )
   list(APPEND generated_sources
     "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_data.h"
     "${output_dir}/gen-cpp2/${base}_data.cpp"
     "${output_dir}/gen-cpp2/${base}_types.cpp"
+    "${output_dir}/gen-cpp2/${base}_metadata.cpp"
   )
   foreach(service IN LISTS ARG_SERVICES)
     list(APPEND generated_headers


Avoiding ScaLAPACK in Stampede intel+mkl toolchain due to MPI linking problems

--- cmake/toolchains/Stampede-intel-mvapich2-mkl.cmake
+++ cmake/toolchains/Stampede-intel-mvapich2-mkl.cmake
@@ -31,4 +31,4 @@

 set(OpenMP_CXX_FLAGS "-openmp")

-set(MATH_LIBS "-L/opt/apps/intel/13/composer_xe_2013_sp1.1.106/mkl/lib/intel64 -L/opt/apps/intel/13/composer_xe_2013_sp1.1.106/compiler/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_rt")
+set(MATH_LIBS "-L/opt/apps/intel/13/composer_xe_2013_sp1.1.106/mkl/lib/intel64 -L/opt/apps/intel/13/composer_xe_2013_sp1.1.106/compiler/lib/intel64 -lmkl_rt")


remove cmake modules

remove cmake modules

--- src/NeuralNetwork/tests/CMakeModules/CodeCoverage.cmake
+++ src/NeuralNetwork/tests/CMakeModules/CodeCoverage.cmake
@@ -1,238 +0,0 @@
-# Copyright (c) 2012 - 2017, Lars Bilke
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this
-#    list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors
-#    may be used to endorse or promote products derived from this software without
-#    specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# CHANGES:
-#
-# 2012-01-31, Lars Bilke
-# - Enable Code Coverage
-#
-# 2013-09-17, Joakim Söderberg
-# - Added support for Clang.
-# - Some additional usage instructions.
-#
-# 2016-02-03, Lars Bilke
-# - Refactored functions to use named parameters
-#
-# 2017-06-02, Lars Bilke
-# - Merged with modified version from github.com/ufz/ogs
-#
-#
-# USAGE:
-#
-# 1. Copy this file into your cmake modules path.
-#
-# 2. Add the following line to your CMakeLists.txt:
-#      include(CodeCoverage)
-#
-# 3. Append necessary compiler flags:
-#      APPEND_COVERAGE_COMPILER_FLAGS()
-#
-# 4. If you need to exclude additional directories from the report, specify them
-#    using the COVERAGE_EXCLUDES variable before calling SETUP_TARGET_FOR_COVERAGE.
-#    Example:
-#      set(COVERAGE_EXCLUDES 'dir1/*' 'dir2/*')
-#
-# 5. Use the functions described below to create a custom make target which
-#    runs your test executable and produces a code coverage report.
-#
-# 6. Build a Debug build:
-#      cmake -DCMAKE_BUILD_TYPE=Debug ..
-#      make
-#      make my_coverage_target
-#
-
-include(CMakeParseArguments)
-
-# Check prereqs
-find_program( GCOV_PATH gcov )
-find_program( LCOV_PATH  NAMES lcov lcov.bat lcov.exe lcov.perl)
-find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )
-find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
-find_program( SIMPLE_PYTHON_EXECUTABLE python )
-
-if(NOT GCOV_PATH)
-    message(FATAL_ERROR "gcov not found! Aborting...")
-endif() # NOT GCOV_PATH
-
-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
-    if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3)
-        message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
-    endif()
-elseif(NOT CMAKE_COMPILER_IS_GNUCXX)
-    message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-endif()
-
-set(COVERAGE_COMPILER_FLAGS "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-    CACHE INTERNAL "")
-
-set(CMAKE_CXX_FLAGS_COVERAGE
-    ${COVERAGE_COMPILER_FLAGS}
-    CACHE STRING "Flags used by the C++ compiler during coverage builds."
-    FORCE )
-set(CMAKE_C_FLAGS_COVERAGE
-    ${COVERAGE_COMPILER_FLAGS}
-    CACHE STRING "Flags used by the C compiler during coverage builds."
-    FORCE )
-set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used for linking binaries during coverage builds."
-    FORCE )
-set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used by the shared libraries linker during coverage builds."
-    FORCE )
-mark_as_advanced(
-    CMAKE_CXX_FLAGS_COVERAGE
-    CMAKE_C_FLAGS_COVERAGE
-    CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
-
-if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-    message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading")
-endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
-
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
-    link_libraries(gcov)
-else()
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
-endif()
-
-# Defines a target for running and collection code coverage information
-# Builds dependencies, runs the given executable and outputs reports.
-# NOTE! The executable should always have a ZERO as exit code otherwise
-# the coverage generation will not complete.
-#
-# SETUP_TARGET_FOR_COVERAGE(
-#     NAME testrunner_coverage                    # New target name
-#     EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
-#     DEPENDENCIES testrunner                     # Dependencies to build first
-# )
-function(SETUP_TARGET_FOR_COVERAGE)
-
-    set(options NONE)
-    set(oneValueArgs NAME)
-    set(multiValueArgs EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
-    cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-    if(NOT LCOV_PATH)
-        message(FATAL_ERROR "lcov not found! Aborting...")
-    endif() # NOT LCOV_PATH
-
-    if(NOT GENHTML_PATH)
-        message(FATAL_ERROR "genhtml not found! Aborting...")
-    endif() # NOT GENHTML_PATH
-
-    # Setup target
-    add_custom_target(${Coverage_NAME}
-
-        # Cleanup lcov
-        COMMAND ${LCOV_PATH} --directory . --zerocounters
-        # Create baseline to make sure untouched files show up in the report
-        COMMAND ${LCOV_PATH} -c -i -d . -o ${Coverage_NAME}.base
-
-        # Run tests
-        COMMAND ${Coverage_EXECUTABLE}
-
-        # Capturing lcov counters and generating report
-        COMMAND ${LCOV_PATH} --directory . --capture --output-file ${Coverage_NAME}.info
-        # add baseline counters
-        COMMAND ${LCOV_PATH} -a ${Coverage_NAME}.base -a ${Coverage_NAME}.info --output-file ${Coverage_NAME}.total
-        COMMAND ${LCOV_PATH} --remove ${Coverage_NAME}.total ${COVERAGE_EXCLUDES} --output-file ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
-        COMMAND ${GENHTML_PATH} -o ${Coverage_NAME} ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
-        COMMAND ${CMAKE_COMMAND} -E remove ${Coverage_NAME}.base ${Coverage_NAME}.info ${Coverage_NAME}.total ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
-
-        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-        DEPENDS ${Coverage_DEPENDENCIES}
-        COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
-    )
-
-    # Show info where to find the report
-    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
-        COMMAND ;
-        COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report."
-    )
-
-endfunction() # SETUP_TARGET_FOR_COVERAGE
-
-# Defines a target for running and collection code coverage information
-# Builds dependencies, runs the given executable and outputs reports.
-# NOTE! The executable should always have a ZERO as exit code otherwise
-# the coverage generation will not complete.
-#
-# SETUP_TARGET_FOR_COVERAGE_COBERTURA(
-#     NAME ctest_coverage                    # New target name
-#     EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
-#     DEPENDENCIES executable_target         # Dependencies to build first
-# )
-function(SETUP_TARGET_FOR_COVERAGE_COBERTURA)
-
-    set(options NONE)
-    set(oneValueArgs NAME)
-    set(multiValueArgs EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
-    cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-    if(NOT SIMPLE_PYTHON_EXECUTABLE)
-        message(FATAL_ERROR "python not found! Aborting...")
-    endif() # NOT SIMPLE_PYTHON_EXECUTABLE
-
-    if(NOT GCOVR_PATH)
-        message(FATAL_ERROR "gcovr not found! Aborting...")
-    endif() # NOT GCOVR_PATH
-
-    # Combine excludes to several -e arguments
-    set(COBERTURA_EXCLUDES "")
-    foreach(EXCLUDE ${COVERAGE_EXCLUDES})
-        set(COBERTURA_EXCLUDES "-e ${EXCLUDE} ${COBERTURA_EXCLUDES}")
-    endforeach()
-
-    add_custom_target(${Coverage_NAME}
-
-        # Run tests
-        ${Coverage_EXECUTABLE}
-
-        # Running gcovr
-        COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} ${COBERTURA_EXCLUDES}
-            -o ${Coverage_NAME}.xml
-        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-        DEPENDS ${Coverage_DEPENDENCIES}
-        COMMENT "Running gcovr to produce Cobertura code coverage report."
-    )
-
-    # Show info where to find the report
-    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
-        COMMAND ;
-        COMMENT "Cobertura code coverage report saved in ${Coverage_NAME}.xml."
-    )
-
-endfunction() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
-
-function(APPEND_COVERAGE_COMPILER_FLAGS)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
-    message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}")
-endfunction() # APPEND_COVERAGE_COMPILER_FLAGS


fix path to roslaunch-check.py, #3865

fix path to roslaunch-check.py, #3865

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -271,7 +271,7 @@
   rosbuild_get_stack_version(ros_comm_version "ros_comm")
   if(ros_comm_version VERSION_LESS "1.6.3")
     add_custom_target(${targetname}
-                      COMMAND ${rostest_path}/bin/roslaunch-check.py ${file} ${ARGN}
+                      COMMAND ${rostest_path}/scripts/roslaunch-check.py ${file} ${ARGN}
                       DEPENDS ${file}
                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                       VERBATIM)
@@ -279,7 +279,7 @@
     # It's the newer roslaunch-check.py, so we can pass the full path to
     # the test result file.
     add_custom_target(${targetname}
-                      COMMAND ${rostest_path}/bin/roslaunch-check.py -o ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${targetname}.xml ${file} ${ARGN}
+                      COMMAND ${rostest_path}/scripts/roslaunch-check.py -o ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${targetname}.xml ${file} ${ARGN}
                       DEPENDS ${file}
                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                       VERBATIM)


COMP: make AppClassification depends on the new Supervised module

--- Modules/Applications/AppClassification/otb-module.cmake
+++ Modules/Applications/AppClassification/otb-module.cmake
@@ -11,7 +11,7 @@
     OTBMajorityVoting
     OTBVectorDataIO
     OTBSOM
-    OTBSVMLearning
+    OTBSupervised
     OTBLearningBase
     OTBApplicationEngine
     OTBIndices


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


BUG: 3326. ITK_USE_SYSTEM_GDCM was not working.      With new fixes, it is now necessary to include the /src directory      inside the gdcm tree.

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -67,6 +67,7 @@
 IF(NOT ITK_USE_SYSTEM_GDCM)
   SET(ITK_INCLUDE_DIRS_BUILD_TREE ${ITK_INCLUDE_DIRS_BUILD_TREE}
     ${ITK_BINARY_DIR}/Utilities/gdcm
+    ${ITK_SOURCE_DIR}/Utilities/gdcm/src
     )
 ENDIF(NOT ITK_USE_SYSTEM_GDCM)


ENH: Do not add GDCM to the build tree if its ITK_USE_SYSTEM_GDCM is on

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -36,7 +36,6 @@
   ${ITK_SOURCE_DIR}/Utilities/expat
   ${ITK_SOURCE_DIR}/Utilities/nifti/niftilib
   ${ITK_SOURCE_DIR}/Utilities/nifti/znzlib
-  ${ITK_BINARY_DIR}/Utilities/gdcm
   ${ITK_BINARY_DIR}/Utilities
   ${ITK_SOURCE_DIR}/Utilities
 )


BUG: Binary include directory added only if enabled shared

If module is built with ENABLE_SHARED set to ON, an export header is generated
and written in the include folder in the binary directory. If module is not
built with ENABLE_SHARED ON, this include directory does not exist. When using
this module, an error will be generated because this include directory cannot
be found.

Change-Id: I53d7a2e6c64571936ec3b799e5bba96b8915ac3b

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -166,9 +166,9 @@
     list(APPEND ${itk-module}_INCLUDE_DIRS ${${itk-module}_SOURCE_DIR}/include)
     install(DIRECTORY include/ DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR} COMPONENT Development)
   endif()
-  if(NOT ITK_SOURCE_DIR)
-    # When building a module outside the ITK source tree, find the export
-    # header.
+  if(NOT ITK_SOURCE_DIR AND ${itk-module}_ENABLE_SHARED)
+    # When building a module outside the ITK source tree, if ENABLE_SHARED is enabled,
+    # find the export header.
     list(APPEND ${itk-module}_INCLUDE_DIRS ${${itk-module}_BINARY_DIR}/include)
   endif()

@@ -433,7 +433,7 @@
 #
 macro(itk_module_add_library _name)
   set(_LIBRARY_BUILD_TYPE "${ITK_LIBRARY_BUILD_TYPE}")
-  # If ENABLED_SHARED is not specified in the itk_module macro, then
+  # If ENABLE_SHARED is not specified in the itk_module macro, then
   # there is no export specification generated for the library. In
   # such a case we fall back to the CMake default, instead of the ITK
   # type.


Use 10.5 sdk for now

Use 10.5 sdk for now

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -88,7 +88,7 @@
   if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
     # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html
     # see http://public.kitware.com/Bug/view.php?id=9959 + poppy
-    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
+    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
     set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4)
   endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET)


Update the atom-types generator file

Update the atom-types generator file

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -42,7 +42,8 @@
 FILE(WRITE "${HEADER_FILE}" "/* File automatically generated by the macro OPENCOG_ADD_ATOM_TYPES. Do not edit */\n")
 FILE(APPEND "${HEADER_FILE}"  "#include <opencog/atoms/base/types.h>\nnamespace opencog\n{\n")
 FILE(WRITE "${DEFINITIONS_FILE}"  "/* File automatically generated by the macro OPENCOG_ADD_ATOM_TYPES. Do not edit */\n#include <opencog/atoms/base/ClassServer.h>\n#include <opencog/atoms/base/atom_types.h>\n#include <opencog/atoms/base/types.h>\n#include \"atom_types.h\"\n")
-FILE(WRITE "${INHERITANCE_FILE}"  "/* File automatically generated by the macro OPENCOG_ADD_ATOM_TYPES. Do not edit */\n")
+FILE(WRITE "${INHERITANCE_FILE}"  "/* File automatically generated by the macro OPENCOG_ADD_ATOM_TYPES. Do not edit */\n\n")
+FILE(WRITE "${INHERITANCE_FILE}"  "${CLASSSERVER_REFERENCE}beginTypeDecls();\n")

 # We need to touch the class-server before doing anything.
 # This is in order to guarantee that the main atomspace types
@@ -135,17 +136,26 @@
         MESSAGE(STATUS "Atom type name: ${TYPE_NAME} ${SHORT_NAME}")

         # Try to guess if the thing is a node or link based on its name
+        STRING(REGEX MATCH "VALUE$" ISVALUE ${TYPE})
         STRING(REGEX MATCH "NODE$" ISNODE ${TYPE})
         STRING(REGEX MATCH "LINK$" ISLINK ${TYPE})

-        # If not named as a node or a link, assume its a link
-        # This is kind of hacky, but I don't know what else to do ...
-        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
+        # If not explicitly named, assume its a link. This is kind of
+        # hacky, but is needed for e.g. "VariableList" ...
+        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISVALUE STREQUAL "VALUE")
             SET(ISLINK "LINK")
-        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
+        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISVALUE STREQUAL "VALUE")
+
+        IF (${TYPE} STREQUAL "VALUATION")
+            SET(ISLINK "")
+        ENDIF (${TYPE} STREQUAL "VALUATION")

         # Print out the scheme definitions
         FILE(APPEND "${SCM_FILE}" "(define-public ${TYPE_NAME}Type (cog-type->int '${TYPE_NAME}))\n")
+        IF (ISVALUE STREQUAL "VALUE")
+            FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
+            FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-value (append (list ${TYPE_NAME}Type) x)))\n")
+        ENDIF (ISVALUE STREQUAL "VALUE")
         IF (ISNODE STREQUAL "NODE")
             FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
             FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-node (append (list ${TYPE_NAME}Type) x)))\n")
@@ -163,9 +173,15 @@
             ENDIF (NOT SHORT_NAME STREQUAL "")
         ENDIF (ISLINK STREQUAL "LINK")

-        # Print out the python definitions. Note: We special-case Atom since we don't want
-        # to create a function with the same identifier as the Python Atom object.
+        # Print out the python definitions. Note: We special-case Atom
+        # since we don't want to create a function with the same
+        # identifier as the Python Atom object.
         IF (NOT TYPE_NAME STREQUAL "Atom")
+            IF (ISVALUE STREQUAL "VALUE")
+                # XXX FIXME -- invent something for python
+                # FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(node_name, tv=None):\n")
+                # FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_node(types.${TYPE_NAME}, node_name, tv)\n")
+            ENDIF (ISVALUE STREQUAL "VALUE")
             IF (ISNODE STREQUAL "NODE")
                 FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(node_name, tv=None):\n")
                 FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_node(types.${TYPE_NAME}, node_name, tv)\n")
@@ -176,18 +192,29 @@
             ENDIF (ISLINK STREQUAL "LINK")
         ENDIF (NOT TYPE_NAME STREQUAL "Atom")

+        # If not named as a node or a link, assume its a link
+        # This is kind of hacky, but I don't know what else to do ...
+        IF (NOT ISNODE STREQUAL "NODE" AND
+            NOT ISLINK STREQUAL "LINK" AND
+            NOT ISVALUE STREQUAL "VALUE")
+            FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(*args):\n")
+            FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_link(types.${TYPE_NAME}, args)\n")
+        ENDIF (NOT ISNODE STREQUAL "NODE" AND
+            NOT ISLINK STREQUAL "LINK" AND
+            NOT ISVALUE STREQUAL "VALUE")
+
         IF (PARENT_TYPES)
             STRING(REGEX REPLACE "[ 	]*,[ 	]*" ";" PARENT_TYPES "${PARENT_TYPES}")
             FOREACH (PARENT_TYPE ${PARENT_TYPES})
                 # skip inheritance of the special "notype" class; we could move
                 # this test up but it was left here for simplicity's sake
                 IF (NOT "${TYPE}" STREQUAL "NOTYPE")
-                    FILE(APPEND "${INHERITANCE_FILE}" "opencog::${TYPE} = ${CLASSSERVER_REFERENCE}addType(opencog::${PARENT_TYPE}, \"${TYPE_NAME}\");\n")
+                    FILE(APPEND "${INHERITANCE_FILE}" "opencog::${TYPE} = ${CLASSSERVER_REFERENCE}declType(opencog::${PARENT_TYPE}, \"${TYPE_NAME}\");\n")
                 ENDIF (NOT "${TYPE}" STREQUAL "NOTYPE")
             ENDFOREACH (PARENT_TYPE)
         ELSE (PARENT_TYPES)
             IF (NOT "${TYPE}" STREQUAL "NOTYPE")
-                FILE(APPEND "${INHERITANCE_FILE}" "opencog::${TYPE} = ${CLASSSERVER_REFERENCE}addType(opencog::${TYPE}, \"${TYPE_NAME}\");\n")
+                FILE(APPEND "${INHERITANCE_FILE}" "opencog::${TYPE} = ${CLASSSERVER_REFERENCE}declType(opencog::${TYPE}, \"${TYPE_NAME}\");\n")
             ENDIF (NOT "${TYPE}" STREQUAL "NOTYPE")
         ENDIF (PARENT_TYPES)
     ELSE (MATCHED AND CMAKE_MATCH_1)
@@ -199,4 +226,5 @@
         ENDIF (NOT MATCHED)
     ENDIF (MATCHED AND CMAKE_MATCH_1)
 ENDFOREACH (LINE)
+FILE(APPEND "${INHERITANCE_FILE}"  "${CLASSSERVER_REFERENCE}endTypeDecls();\n")
 FILE(APPEND "${HEADER_FILE}" "} // namespace opencog\n")


#266 #243 #231

#266 #243 #231

--- scripts/cmake/common.cmake
+++ scripts/cmake/common.cmake
@@ -160,7 +160,8 @@

 if(CMAKE_VERSION VERSION_LESS 3.8)
     # necessary for some older compilers which don't default to C++11
-    add_compiler_flags(-std=c++11)
+    set(CMAKE_CXX_STANDARD 11)
+    set(CXX_STANDARD_REQUIRED ON)
 endif()

 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")


STYLE: Bump minor version

STYLE: Bump minor version

DTIFiberTractStatistics now uses QT5

--- DTIAtlasFiberAnalyzer.cmake
+++ DTIAtlasFiberAnalyzer.cmake
@@ -67,7 +67,7 @@
     set(OS_BUNDLE WIN32)
   endif()

-  set(version 1.7.1)
+  set(version 1.8.0)
   set(bundle_name DTIAtlasFiberAnalyzer)

   #--------------------------------------------------------------------------------
@@ -211,4 +211,4 @@
     message(STATUS "Install: ${tool}")
     install(PROGRAMS ${tool} DESTINATION ${INSTALL_RUNTIME_DESTINATION})
   endforeach()
-endif()+endif()


modules: once more.

modules: once more.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -158,7 +158,7 @@
 endif()

 # Configuration
-file(READ ${CORRADE_INCLUDE_DIR}/Corrade/configure.h _corradeConfigure)
+file(READ ${_CORRADE_INCLUDE_DIR}/Corrade/configure.h _corradeConfigure)

 # Compatibility?
 string(FIND "${_corradeConfigure}" "#define CORRADE_GCC47_COMPATIBILITY" _GCC47_COMPATIBILITY)


Default linking Arpack dynamic library

Default linking Arpack dynamic library

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@2983 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/FindArpack.cmake
+++ library/FindArpack.cmake
@@ -1,7 +1,7 @@

 SET(ARPACK_SEARCH_PATHS ${CMAKE_SOURCE_DIR} /opt/local/lib/  /../ThirdParty/ARPACK)

-FIND_LIBRARY(ARPACK_LIB NAMES arpack PATHS ${ARPACK_SEARCH_PATHS})
+FIND_LIBRARY(ARPACK_LIB NAMES arpack.1 PATHS ${ARPACK_SEARCH_PATHS})

 SET(ARPACK_FOUND FALSE)
 IF (ARPACK_LIB)


Fix for CMake problem in FindBoost

Fix for CMake problem in FindBoost

--- Common.cmake
+++ Common.cmake
@@ -69,6 +69,7 @@
   set(Boost_NO_SYSTEM_PATHS TRUE)
 endif()
 add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
+add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost

 include(TestBigEndian)
 test_big_endian(BIGENDIAN)


BUG: When a try-run fails to compile create the run result cache entry with a bogus non-zero return value to avoid running the test again.

--- kwsysPlatformCxxTests.cmake
+++ kwsysPlatformCxxTests.cmake
@@ -68,6 +68,7 @@
       FILE(APPEND
         ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+      SET(${var} -1 CACHE INTERNAL "${description} failed to compile.")
     ENDIF(${var}_COMPILED)

     IF(${invert} MATCHES INVERT)


cmake: Add C++11 move ctor and member initializer tests.

Change-Id: I747a206db03fcb8f13265e0c56c86dd5a9f6eff8

--- build/cxx11_tests.cmake
+++ build/cxx11_tests.cmake
@@ -86,6 +86,39 @@
         return 0;
       }"
       HAVE_RANGED_FOR)
+
+  # move constructors
+  check_cxx_source_compiles("
+      struct Foo {
+        Foo() {}
+        Foo(Foo&&) = default;
+        Foo(const Foo&) = delete;
+      };
+      int main() {
+        Foo bar;
+        (void)bar;
+        return 0;
+      }"
+      HAVE_MOVE_CONSTRUCTORS)
+
+  # member initializers
+  check_cxx_source_compiles("
+      struct Foo {
+        Foo() {}
+        Foo(int a_val, int b_val) : a(a_val), b(b_val) {}
+        int a;
+        int b;
+      };
+      struct Bar {
+        Bar() {}
+        Foo f = Foo(1, 2);
+      };
+      int main() {
+        Bar bar;
+        (void)bar;
+        return 0;
+      }"
+      HAVE_MEMBER_INITIALIZERS)
 endif ()

 if (NOT HAVE_UNIQUE_PTR
@@ -93,7 +126,9 @@
     OR NOT HAVE_DEFAULTED_MEMBER_FUNCTIONS
     OR NOT HAVE_DELETED_MEMBER_FUNCTIONS
     OR NOT HAVE_AUTO_REF
-    OR NOT HAVE_RANGED_FOR)
+    OR NOT HAVE_RANGED_FOR
+    OR NOT HAVE_MOVE_CONSTRUCTORS
+    OR NOT HAVE_MEMBER_INITIALIZERS)
   # TODO(tomfinegan): Update settings at the include site instead of in here.
   set(ENABLE_TESTS OFF)
   set(ENABLE_WEBMTS OFF)


adding RISCV to cmake helper functions

adding RISCV to cmake helper functions

--- riscv/riscv-omp/runtime/cmake/HelperFunctions.cmake
+++ riscv/riscv-omp/runtime/cmake/HelperFunctions.cmake
@@ -69,6 +69,8 @@
         set(${return_arch_string} "ARM" PARENT_SCOPE)
 	elseif(${PPC64})
 	    set(${return_arch_string} "PPC64" PARENT_SCOPE)
+    elseif(${RISCV})
+        set(${return_arch_string} "RISCV" PARENT_SCOPE)
     else()
         warning_say("set_legal_arch(): Warning: Unknown architecture...")
     endif()


update common.cmake

update common.cmake

--- common.cmake
+++ common.cmake
@@ -16,8 +16,8 @@

 if(CMAKE_USE_PTHREADS_INIT)
     if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
-        set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-pthread")
-        set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} "-pthread")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif()
 endif()
@@ -25,11 +25,11 @@
 if (${CXX11} MATCHES "ON")
     # Compiler-specific C++11 activation.
     if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-        set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-        set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-        set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+        set(CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
+        set(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+        set(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} -O4 -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")

         execute_process(
             COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
@@ -38,15 +38,15 @@
         endif ()
     elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")

-        set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-        set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-        set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+        set(CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
+        set(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+        set(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} -O4 -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")

         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
     elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
-        add_definitions("/W2")
+        add_definitions("/W3")
     else ()
         message(FATAL_ERROR "Your C++ compiler does not support C++11.")
     endif ()
@@ -64,7 +64,6 @@
 include_directories( include  )

 set(PROJECT_INCLUDES_GLOBS ${PROJECT_INCLUDES_GLOBS} "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
-
 set(PROJECT_SRC_GLOBS ${PROJECT_SRC_GLOBS} "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")

 file(GLOB PROJECT_INCLUDES ${PROJECT_INCLUDES_GLOBS} )


c++11 fix

c++11 fix

--- libmrio.cmake
+++ libmrio.cmake
@@ -6,6 +6,7 @@

 add_library(libmrio STATIC ${CMAKE_CURRENT_LIST_DIR}/src/Disaggregation.cpp ${CMAKE_CURRENT_LIST_DIR}/src/MRIOIndexSet.cpp ${CMAKE_CURRENT_LIST_DIR}/src/MRIOTable.cpp)
 target_include_directories(libmrio PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/lib/cpp-library)
+target_compile_options(libmrio PRIVATE "-std=c++11")

 option(LIBMRIO_WITH_NETCDF "NetCDF" ON)
 if(LIBMRIO_WITH_NETCDF)


Add special -drvopt smooth=0 option to turn off antialiasing for gif.  That
option is required for example 2 because that example already consumes 116
colours directly without antialising and with antialiasing sufficient
additional colours are consumed to exceed the gif 256 colour limit.

svn path=/trunk/; revision=9121

--- plplot_test/plplot-test.sh.cmake
+++ plplot_test/plplot-test.sh.cmake
@@ -259,10 +259,16 @@
 exit 1
 fi

-# Some devices require familying others do not.
+# Some devices require special options others do not.
 case "$device" in
-   png|pngcairo|gif|jpeg|xfig|svg|svgcairo)
+   png|pngcairo|jpeg|xfig|svg|svgcairo)
       options="-fam -fflen 2"
+      ;;
+   gif)
+   # gif standard is limited to 256 colours so cannot have aliasing turned
+   # on (which uses additional colours) for examples which already have
+   # a substantial number of colours (such as example 2 with its 116 colours).
+      options="-fam -fflen 2 -drvopt smooth=0"
       ;;
    *)
       options=


cmake, config: uint32_t instead of size_t for extraObjectSize

--- src/bootstrap/libnanyc/cmake/configure-config.h.cmake
+++ src/bootstrap/libnanyc/cmake/configure-config.h.cmake
@@ -35,7 +35,7 @@

 	//! Size that should be added to any Nany objects
 	// (reference counter)
-	constexpr static const size_t extraObjectSize = sizeof(uint64_t);
+	constexpr static const uint32_t extraObjectSize = (uint32_t) sizeof(uint64_t);

 	//! Import the NSL


#1303 - Updated the OpenIGTLink version tag to the latest

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8427 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 3d9ec950d1)
+    SET(revision_tag 896305347a)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


ENH: Bump version of Slicer for Vessel View

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -80,7 +80,7 @@
     set(${proj}_SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj})
     list(APPEND ${proj}_EP_ARGS
       GIT_REPOSITORY "${git_protocol}://github.com/KitwareMedical/Slicer.git"
-      GIT_TAG "d7d61e876cd178817daf36c41df1ea60ba8824bd"
+      GIT_TAG "4f28c60a20a314d9ae725c8853c527182c6832aa"
       )
   endif()


ENH: fix missing wrappers

ENH: fix missing wrappers

Change-Id: Ia00a73bf09315b1afd5dbffff15d6c818e241b0e

--- Wrapping/WrapITK/Libraries/FFTW/wrap_itkFFTWGlobalConfiguration.cmake
+++ Wrapping/WrapITK/Libraries/FFTW/wrap_itkFFTWGlobalConfiguration.cmake
@@ -1 +1,8 @@
 WRAP_NON_TEMPLATE_CLASS("itk::FFTWGlobalConfiguration")
+
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+WRAP_NON_TEMPLATE_CLASS("itk::WisdomFilenameGeneratorBase")
+WRAP_NON_TEMPLATE_CLASS("itk::ManualWisdomFilenameGenerator")
+WRAP_NON_TEMPLATE_CLASS("itk::SimpleWisdomFilenameGenerator")
+WRAP_NON_TEMPLATE_CLASS("itk::HostnameWisdomFilenameGenerator")
+WRAP_NON_TEMPLATE_CLASS("itk::HardwareWisdomFilenameGenerator")


cmake: DESTDIR can't be used on external projects because it breaks windows

--- .cmake/Modules/Subprojects.cmake
+++ .cmake/Modules/Subprojects.cmake
@@ -58,7 +58,7 @@
         "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
     endif ()
     set (build_cmds
-      CONFIGURE_COMMAND DESTDIR= ${CMAKE_COMMAND} <SOURCE_DIR>
+      CONFIGURE_COMMAND ${CMAKE_COMMAND} <SOURCE_DIR>
       -DCMAKE_INSTALL_PREFIX=${install_prefix}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
         -G "${ARGS_GENERATOR}"
@@ -67,7 +67,7 @@
       INSTALL_COMMAND cmake -E echo "Skipping install step."
     )
     set (install_cmds
-      DESTDIR= ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}/${_NAME}" --target install
+      ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}/${_NAME}" --target install
     )
   elseif (ARGS_AUTOTOOLS)
     set (make_opts "")
@@ -81,7 +81,7 @@
       INSTALL_COMMAND cmake -E echo "Skipping install step."
     )
     set (install_cmds
-      make DESTDIR= install
+      make install
     )
   endif ()


modules: properly handle implicit required inter-module dependencies.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -314,6 +314,13 @@
         list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCIES Text TextureTools)
     endif()

+    # Mark the dependencies as required if the component is also required
+    if(Magnum_FIND_REQUIRED_${_component})
+        foreach(_dependency ${_MAGNUM_${_COMPONENT}_DEPENDENCIES})
+            set(Magnum_FIND_REQUIRED_${_dependency} TRUE)
+        endforeach()
+    endif()
+
     list(APPEND _MAGNUM_ADDITIONAL_COMPONENTS ${_MAGNUM_${_COMPONENT}_DEPENDENCIES})
 endforeach()