added force_static flag to build static modules with qt

--- CMake/mitkMacroCreateModule.cmake
+++ CMake/mitkMacroCreateModule.cmake
@@ -191,18 +191,18 @@
             list(APPEND CPP_FILES ${module_init_src_file})
           endif()

+          if(MODULE_FORCE_STATIC)
+            set(_STATIC STATIC)
+          else()
+            set(_STATIC )
+          endif(MODULE_FORCE_STATIC)
+
           if(NOT MODULE_QT_MODULE)
             ORGANIZE_SOURCES(SOURCE ${CPP_FILES}
                              HEADER ${H_FILES}
                              TXX ${TXX_FILES}
                              DOC ${DOX_FILES}
                             )
-
-            if(MODULE_FORCE_STATIC)
-              set(_STATIC STATIC)
-            else()
-              set(_STATIC )
-            endif(MODULE_FORCE_STATIC)

             set(coverage_sources ${CPP_FILES} ${H_FILES} ${GLOBBED__H_FILES} ${CORRESPONDING__H_FILES} ${TXX_FILES} ${TOOL_CPPS})
             if(MODULE_SUBPROJECTS)
@@ -274,7 +274,7 @@
                 # LINK_DIRECTORIES applies only to targets which are added after the call to LINK_DIRECTORIES
                 link_directories(${ALL_LIBRARY_DIRS})
               endif(ALL_LIBRARY_DIRS)
-              add_library(${MODULE_PROVIDES} ${coverage_sources} ${CPP_FILES_GENERATED} ${Q${KITNAME}_GENERATED_CPP} ${DOX_FILES} ${UI_FILES} ${QRC_FILES})
+              add_library(${MODULE_PROVIDES} ${_STATIC} ${coverage_sources} ${CPP_FILES_GENERATED} ${Q${KITNAME}_GENERATED_CPP} ${DOX_FILES} ${UI_FILES} ${QRC_FILES})
               target_link_libraries(${MODULE_PROVIDES} ${QT_LIBRARIES} ${ALL_LIBRARIES} QVTK)
               if(MODULE_TARGET_DEPENDS)
                 add_dependencies(${MODULE_PROVIDES} ${MODULE_TARGET_DEPENDS})


FindVOTCA_TOOLS.cmake: fixed a typo

FindVOTCA_TOOLS.cmake: fixed a typo

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -54,7 +54,7 @@
   include(CheckLibraryExists)
   check_library_exists("${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}" VotcaToolsFromC "" FOUND_VOTCA_TOOLS_VERSION)
   if(NOT FOUND_VOTCA_TOOLS_VERSION)
-    message(FATAL_ERROR "Could not find VotcaToolsFromC in ${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set VOTCA_TOOLS_LIBRARY and VOTCA_TOOLS_DEP_LIBRARIES by hand, which set votca_tools lib  it's depencies (i.e. -DVOTCA_TOOLS_LIBRARY='/path/to/libvotca_tools.so" -VOTCA_TOOLS_DEP_LIBRARIES="/path/to/libgsl.so;/path/to/libm.so') !")
+    message(FATAL_ERROR "Could not find VotcaToolsFromC in ${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set VOTCA_TOOLS_LIBRARY and VOTCA_TOOLS_DEP_LIBRARIES by hand, which set votca_tools lib  it's depencies (i.e. -DVOTCA_TOOLS_LIBRARY='/path/to/libvotca_tools.so' -DVOTCA_TOOLS_DEP_LIBRARIES='/path/to/libgsl.so;/path/to/libm.so') !")
   endif(NOT FOUND_VOTCA_TOOLS_VERSION)
 endif (VOTCA_TOOLS_FOUND)


CMAKE_CXX_STANDARD 20 has been introduced in CMake 3.12

--- toolchains/gcc_compatibles.cmake
+++ toolchains/gcc_compatibles.cmake
@@ -42,7 +42,7 @@
 set( CMAKE_CXX_STANDARD 14 )
 if ( CMAKE_VERSION VERSION_GREATER 3.7 )
     set( CMAKE_CXX_STANDARD 17 )
-    if ( CMAKE_VERSION VERSION_GREATER 3.7 )
+    if ( CMAKE_VERSION VERSION_GREATER 3.11 )
         set( CMAKE_CXX_STANDARD 20 )
     endif()
 endif()


disable add_compile_options( -std=gnu++1z ) because it conflicts with CMAKE_CXX_STANDARD

--- toolchains/gcc_compatibles.cmake
+++ toolchains/gcc_compatibles.cmake
@@ -33,8 +33,19 @@
 # "Unknown language" error with CMake 3.5.2 if COMPILE_LANGUAGE:C is used.
 # + 'COMPILE_LANGUAGE' isn't supported by VS generators:
 # https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#logical-expressions
-add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++1z> )
-add_compile_options( $<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-std=gnu11> )
+
+## Implementation note:
+# set( CMAKE_CXX_STANDARD 14 ) appends '-std=gnu++14' option on all targets after all compile flags have been processed.
+# This means that '-std=gnu++14' is given to compiler *after* '-std=gnu++1z', which basically disables C++1z support.
+# Correct way of enabling C++1z would be by uncommenting line below and commenting out line 'set( CMAKE_CXX_STANDARD 14 )'.
+# However, such decision can cause problems with some 3rd party libraries (Qt for instance) which have their own CMake
+# packages which enfore usage of this variable.
+#                                                     ( 04.09.2016. Nenad Miksa )
+
+# add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++1z> )
+# add_compile_options( $<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-std=gnu11> )
+
+
 set( CMAKE_C_STANDARD   11 )
 set( CMAKE_CXX_STANDARD 14 )


Ensure FEATURE_MANAGED_ETW isn't set for TargetUnix 2

The commit 82492f7fe7d91331508cb1bf9b33e2e9725d9898
has disabled FEATURE_MANAGED_ETW for UNIX builds.
However, the commit somehow omitted updating
CMakeList accordingly while updating msbuild scripts.

This patch does the same for CMake scripts.

Fixes #4682 part 1.

Signed-off-by: MyungJoo Ham <84146178f7c201fa3079bfc93fccba71d81dffe3@samsung.com>

--- clrdefinitions.cmake
+++ clrdefinitions.cmake
@@ -126,7 +126,9 @@
 endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
 add_definitions(-DFEATURE_ISYM_READER)
 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
+if (NOT CLR_CMAKE_PLATFORM_UNIX)
 add_definitions(-DFEATURE_MANAGED_ETW)
+endif(NOT CLR_CMAKE_PLATFORM_UNIX)
 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
 add_definitions(-DFEATURE_MAIN_CLR_MODULE_USES_CORE_NAME)
 add_definitions(-DFEATURE_MERGE_CULTURE_SUPPORT_AND_ENGINE)


optional COIN_CLP_SOLVER_LIBRARY

optional COIN_CLP_SOLVER_LIBRARY

--- cmake/FindCOIN.cmake
+++ cmake/FindCOIN.cmake
@@ -161,7 +161,11 @@
 #
 IF(COIN_FOUND)
     SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
-    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_CLP_SOLVER_LIBRARY}")
+    #SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_CLP_SOLVER_LIBRARY}")
+    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY}")
+    IF (COIN_CLP_SOLVER_LIBRARY)
+        SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_CLP_SOLVER_LIBRARY}")
+    ENDIF (COIN_CLP_SOLVER_LIBRARY)
     IF(COIN_ZLIB_LIBRARY)
         SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
     ENDIF(COIN_ZLIB_LIBRARY)


fixed CUDA_TOOLKIT_TARGET_DIR for android:

use targets/armv7-linux-androideabi is exists

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -759,11 +759,15 @@
 set(CUDA_VERSION_STRING "${CUDA_VERSION}")

 # Support for arm cross compilation with CUDA 5.5
-if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
-  set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf" CACHE PATH "Toolkit target location.")
-else()
-  set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "Toolkit target location.")
+set(__cuda_toolkit_target_dir_initial "${CUDA_TOOLKIT_ROOT_DIR}")
+if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
+  if(ANDROID AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-androideabi")
+    set(__cuda_toolkit_target_dir_initial "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-androideabi")
+  elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
+    set(__cuda_toolkit_target_dir_initial "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
+  endif()
 endif()
+set(CUDA_TOOLKIT_TARGET_DIR "${__cuda_toolkit_target_dir_initial}" CACHE PATH "Toolkit target location.")
 mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR)

 # Target CPU architecture


Remove a Clang warning enforcing unneeded backward compatibility.

--- cmake/SetFlags.cmake
+++ cmake/SetFlags.cmake
@@ -21,6 +21,7 @@
 		set(F_WARN "-pedantic -Weverything -Werror")
 		set(F_WARN "${F_WARN} -Wno-c++98-compat -Wno-padded")
 		set(F_WARN "${F_WARN} -Wno-exit-time-destructors")
+		set(F_WARN "${F_WARN} -Wno-c++98-compat-pedantic")

 		set(F_DBG "${F_WARN} -std=c++1y -g -O0 -fno-omit-frame-pointer")
 		set(F_DBG "${F_DBG} -fsanitize=address -fsanitize=undefined")


Don't build the pdf target by default

Don't build the pdf target by default

--- cmake/UseLATEX.cmake
+++ cmake/UseLATEX.cmake
@@ -712,7 +712,7 @@
     ADD_CUSTOM_TARGET(${dvi_target}
       DEPENDS ${output_dir}/${LATEX_TARGET}.dvi)
   ELSE (LATEX_DEFAULT_PDF)
-    ADD_CUSTOM_TARGET(${dvi_target} ALL
+    ADD_CUSTOM_TARGET(${dvi_target}
       DEPENDS ${output_dir}/${LATEX_TARGET}.dvi)
   ENDIF (LATEX_DEFAULT_PDF)

@@ -723,7 +723,7 @@
       DEPENDS ${make_pdf_depends}
       )
     IF (LATEX_DEFAULT_PDF)
-      ADD_CUSTOM_TARGET(${pdf_target} ALL
+      ADD_CUSTOM_TARGET(${pdf_target}
         DEPENDS ${output_dir}/${LATEX_TARGET}.pdf)
     ELSE (LATEX_DEFAULT_PDF)
       ADD_CUSTOM_TARGET(${pdf_target}


"fix dso" (#13407)

"fix dso" (#13407)

--- cmake/tensorrt.cmake
+++ cmake/tensorrt.cmake
@@ -16,7 +16,9 @@
     DOC "Path to TensorRT library.")

 if(TENSORRT_INCLUDE_DIR AND TENSORRT_LIBRARY)
+  if(WITH_DSO)
     set(TENSORRT_FOUND ON)
+  endif(WITH DSO)
 else()
     set(TENSORRT_FOUND OFF)
 endif()


ENH: Change Hippo compiler flags

ENH: Change Hippo compiler flags

--- Hippo_Kitware_TubeTK_Nightly.cmake
+++ Hippo_Kitware_TubeTK_Nightly.cmake
@@ -128,8 +128,12 @@
 set( SITE_EXECUTABLE_DIRS "${SITE_KWSTYLE_DIR}" )
 set( ENV{PATH} "${SITE_EXECUTABLE_DIRS}:$ENV{PATH}" )

-set( SITE_C_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized" )
-set( SITE_CXX_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field" )
+set( CTEST_CUSTOM_WARNING_EXCEPTION "/usr/local/include/boost" ${CTEST_CUSTOM_WARNING_EXCEPTION} )
+
+set( SITE_C_FLAGS "-fdiagnostics-show-option -fPIC -W -Waddress -Warray-bounds -Wc++11-compat -Wchar-subscripts -Wclobbered -Wcomment -Wempty-body -Wenum-compare -Wformat -Wignored-qualifiers -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-field-initializers -Wmissing-parameter-type -Wno-deprecated -Wno-deprecated-declarations -Wnonnull -Wold-style-declaration -Woverride-init -Wparentheses -Wpointer-sign -Wreorder -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused-but-set-parameter -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvolatile-register-var -Wwrite-strings
+" )
+set( SITE_CXX_FLAGS "-fdiagnostics-show-option -fPIC -W -Waddress -Warray-bounds -Wc++11-compat -Wchar-subscripts -Wclobbered -Wcomment -Wempty-body -Wformat -Wignored-qualifiers -Wmaybe-uninitialized -Wmissing-field-initializers -Wno-deprecated -Wno-deprecated-declarations -Wnonnull -Woverride-init -Wparentheses -Wpointer-sign -Wreorder -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused-but-set-parameter -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvolatile-register-var -Wwrite-strings
+" )
 set( SITE_EXE_LINKER_FLAGS "" )
 set( SITE_SHARED_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS}" )


Updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -19,10 +19,10 @@
 # hidden visibility by default.
 #
 # Features of found Corrade library are exposed in these variables:
+#  CORRADE_GCC47_COMPATIBILITY  - Defined if compiled with compatibility
+#   mode for GCC 4.7
 #  CORRADE_GCC46_COMPATIBILITY  - Defined if compiled with compatibility
 #   mode for GCC 4.6
-#  CORRADE_GCC47_COMPATIBILITY  - Defined if compiled with compatibility
-#   mode for GCC 4.7
 #  CORRADE_BUILD_STATIC         - Defined if compiled as static libraries
 #  CORRADE_TARGET_NACL          - Defined if compiled for Google Chrome
 #   Native Client
@@ -116,10 +116,15 @@
 # RC executable
 find_program(CORRADE_RC_EXECUTABLE corrade-rc)

-# Paths
+# Include dir
 find_path(CORRADE_INCLUDE_DIR
     NAMES PluginManager Utility
     PATH_SUFFIXES Corrade)
+
+# CMake module dir
+find_path(_CORRADE_MODULE_DIR
+    NAMES UseCorrade.cmake CorradeLibSuffix.cmake
+    PATH_SUFFIXES share/cmake/Corrade)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Corrade DEFAULT_MSG
@@ -128,7 +133,8 @@
     CORRADE_PLUGINMANAGER_LIBRARY
     CORRADE_TESTSUITE_LIBRARY
     CORRADE_INCLUDE_DIR
-    CORRADE_RC_EXECUTABLE)
+    CORRADE_RC_EXECUTABLE
+    _CORRADE_MODULE_DIR)

 if(NOT CORRADE_FOUND)
     return()
@@ -180,6 +186,9 @@
 mark_as_advanced(CORRADE_UTILITY_LIBRARY
     CORRADE_INTERCONNECT_LIBRARY
     CORRADE_PLUGINMANAGER_LIBRARY
-    CORRADE_TESTSUITE_LIBRARY)
+    CORRADE_TESTSUITE_LIBRARY
+    _CORRADE_MODULE_DIR)

+# Include file with macros from our module dir
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CORRADE_MODULE_DIR}")
 include(UseCorrade)


Fixed dereference of variable

Fixed dereference of variable

--- build/macros.cmake
+++ build/macros.cmake
@@ -460,7 +460,7 @@
 	#Must be tested after project
 	get_compiler_name(COMPILER)
 	if(${COMPILER} MATCHES "vc")
-		if(NOT COMPLILER MATCHES "vc1[2-9]")
+		if(NOT ${COMPLILER} MATCHES "vc1[2-9]")
 			message(FATAL_ERROR "Error: Only Visual Studio 2013 and above are supported")
 		endif()
 	elseif(${COMPILER} MATCHES "gcc|gxx")


COMP: Generate .h and .cxx files in include/src respectively

When doing the code generation, split the .h and .cxx files so that only the .h
files live in the include dir. This keeps the include dir clean so that you're
only seeing the public API there

--- CMake/generate_filter_source.cmake
+++ CMake/generate_filter_source.cmake
@@ -61,8 +61,8 @@
   # Set common variables
   set ( expand_template_script ${SimpleITK_SOURCE_DIR}/Utilities/ExpandTemplate.lua )
   set ( template_include_dir ${SimpleITK_SOURCE_DIR}/TemplateComponents )
-  set ( output_h "${output_dir}/sitk${FILENAME}ImageFilter.h" )
-  set ( output_cxx "${output_dir}/sitk${FILENAME}ImageFilter.cxx" )
+  set ( output_h "${output_dir}/include/sitk${FILENAME}ImageFilter.h" )
+  set ( output_cxx "${output_dir}/src/sitk${FILENAME}ImageFilter.cxx" )

   set ( input_json_file ${input_dir}/json/${FILENAME}.json )
   set ( template_file_h ${input_dir}/templates/sitkImageFilterTemplate.h.in )
@@ -106,7 +106,15 @@

   # Set input and output directories corresponding to this Code directory
   set(generated_code_input_path ${CMAKE_CURRENT_SOURCE_DIR})
-  set(generated_code_output_path ${SimpleITK_BINARY_DIR}/Code/${directory_name}/include)
+  set(generated_code_output_path ${SimpleITK_BINARY_DIR}/Code/${directory_name}/)
+
+  # Make sure include and src directories exist
+  if (NOT EXISTS ${generated_code_output_path}/include)
+    file(MAKE_DIRECTORY ${generated_code_output_path}/include)
+  endif()
+  if (NOT EXISTS ${generated_code_output_path}/src)
+    file(MAKE_DIRECTORY ${generated_code_output_path}/src)
+  endif()

   # Glob all json files in the current directory
   file ( GLOB json_config_files ${generated_code_input_path}/json/*.json)
@@ -137,11 +145,11 @@
   ######

   # clear the include files
-  file ( WRITE ${generated_code_output_path}/SimpleITK${directory_name}GeneratedHeaders.h "" )
-  file ( WRITE ${generated_code_output_path}/SimpleITK${directory_name}GeneratedHeaders.i "" )
+  file ( WRITE ${generated_code_output_path}/include/SimpleITK${directory_name}GeneratedHeaders.h "" )
+  file ( WRITE ${generated_code_output_path}/include/SimpleITK${directory_name}GeneratedHeaders.i "" )

-  set(generated_headers_h ${generated_code_output_path}/SimpleITK${directory_name}GeneratedHeaders.h)
-  set(generated_headers_i ${generated_code_output_path}/SimpleITK${directory_name}GeneratedHeaders.i)
+  set(generated_headers_h ${generated_code_output_path}/include/SimpleITK${directory_name}GeneratedHeaders.h)
+  set(generated_headers_i ${generated_code_output_path}/include/SimpleITK${directory_name}GeneratedHeaders.i)

   # Add ifndefs
   file ( APPEND ${generated_headers_h} "#ifndef __SimpleITK${directory_name}GeneratedHeaders_h\n")


Use CMake's system includes feature

Use CMake's system includes feature

--- CMake/mitkFunctionUseModules.cmake
+++ CMake/mitkFunctionUseModules.cmake
@@ -170,7 +170,13 @@
   endif()

   if(ALL_INCLUDE_DIRECTORIES)
-    include_directories(${ALL_INCLUDE_DIRECTORIES})
+    foreach(_include_dir ${ALL_INCLUDE_DIRECTORIES})
+      if(_include_dir MATCHES ^${PROJECT_SOURCE_DIR} OR _include_dir MATCHES ^${PROJECT_BINARY_DIR})
+        include_directories(${_include_dir})
+      else()
+        include_directories(SYSTEM ${_include_dir})
+      endif()
+    endforeach()
   endif()

   if(ALL_COMPILE_DEFINITIONS)


buzz_make() now keeps the created basm for easier debugging

--- src/utility/UseBuzz.cmake
+++ src/utility/UseBuzz.cmake
@@ -66,14 +66,16 @@
   if(NOT _buzz_make_EXT STREQUAL ".bzz")
     message(FATAL_ERROR "buzz_make('${_SCRIPT}'): script name must end with .bzz")
   endif(NOT _buzz_make_EXT STREQUAL ".bzz")
-  # Make _BYTECODE and _DEBUG name with .bo and .bdb instead of .bzz
+  # Make _BYTECODE, _BASM and _DEBUG names with .bo, .basm, and .bdb instead of .bzz
   get_filename_component(_buzz_make_FNAME "${_SCRIPT}" NAME_WE)
   set(_buzz_make_BYTECODE "${_buzz_make_FNAME}.bo")
   set(_buzz_make_DEBUG "${_buzz_make_FNAME}.bdb")
+  set(_buzz_make_BASM "${_buzz_make_FNAME}.basm")
   get_filename_component(_buzz_make_DIR "${_SCRIPT}" DIRECTORY)
   if(NOT "${_buzz_make_DIR}" STREQUAL "")
     set(_buzz_make_BYTECODE "${_buzz_make_DIR}${_buzz_make_BYTECODE}")
     set(_buzz_make_DEBUG "${_buzz_make_DIR}${_buzz_make_DEBUG}")
+    set(_buzz_make_BASM "${_buzz_make_DIR}${_buzz_make_BASM}")
   endif(NOT "${_buzz_make_DIR}" STREQUAL "")
   # Parse function arguments
   cmake_parse_arguments(_buzz_make
@@ -95,8 +97,8 @@
   endif(NOT _buzz_make_BUZZ_INCLUDE_PATH STREQUAL "")
   # Define compilation command
   add_custom_command(
-    OUTPUT "${_buzz_make_BYTECODE}" "${_buzz_make_DEBUG}"
-    COMMAND "BZZPARSE=${BUZZ_PARSER}" "BZZASM=${BUZZ_ASSEMBLER}" "${BUZZ_COMPILER}" ${_buzz_make_BUZZ_INCLUDE_PATH} -b "${_buzz_make_BYTECODE}" -d "${_buzz_make_DEBUG}" "${CMAKE_CURRENT_SOURCE_DIR}/${_SCRIPT}"
+    OUTPUT "${_buzz_make_BYTECODE}" "${_buzz_make_BASM}" "${_buzz_make_DEBUG}"
+    COMMAND "BZZPARSE=${BUZZ_PARSER}" "BZZASM=${BUZZ_ASSEMBLER}" "${BUZZ_COMPILER}" ${_buzz_make_BUZZ_INCLUDE_PATH} -b "${_buzz_make_BYTECODE}" -d "${_buzz_make_DEBUG}" -a "${_buzz_make_BASM}" "${CMAKE_CURRENT_SOURCE_DIR}/${_SCRIPT}"
     MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${_SCRIPT}"
     DEPENDS ${_buzz_make_INCLUDES}
     COMMENT "Compiling Buzz script ${_SCRIPT}")


Check correct variable when determining if there was an error.

--- test/remote/SvnPackage.cmake
+++ test/remote/SvnPackage.cmake
@@ -195,13 +195,13 @@
     execute_process (COMMAND "${svn}" add "${filepath}"
       OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result)
     file (APPEND "${changeslogfile}" "${output}")
-    if (result_var)
+    if (result)
       set (${result_var} ${result} PARENT_SCOPE)
       return ()
     endif ()
   endforeach (filepath ${addfiles})

   # Remove temporary unpackaged workingset
-  #file (REMOVE_RECURSE "${chgdir}")
+  file (REMOVE_RECURSE "${chgdir}")

 endfunction (svn_unpackage)


fix provisioning of qt dependencies in debug install

--- cmake/Custom.cmake
+++ cmake/Custom.cmake
@@ -51,13 +51,17 @@

 macro(install_qt COMP DEST)

+    if(WIN32)
+
     set(args ${ARGV})
     list(REMOVE_AT args 0)
     list(REMOVE_AT args 0)

     foreach(target ${args})
         get_target_property(qtrelease Qt5::${target} LOCATION_RELEASE)
-        install(FILES ${qtrelease} DESTINATION ${DEST} COMPONENT ${COMP})
+        install(FILES ${qtrelease} DESTINATION ${DEST} CONFIGURATIONS Release COMPONENT ${COMP})
+        get_target_property(qtdebug Qt5::${target} LOCATION_DEBUG)
+        install(FILES ${qtdebug} DESTINATION ${DEST}  CONFIGURATIONS Debug COMPONENT ${COMP})
     endforeach()

     get_target_property(qtrelease Qt5::Core LOCATION_RELEASE)
@@ -70,23 +74,36 @@
         DESTINATION ${DEST}
         COMPONENT ${COMP})

+    endif()
+
 endmacro()

 macro(install_qt_platforms COMP DEST)

+    if(WIN32)
+
     set(args ${ARGV})
     list(REMOVE_AT args 0)
     list(REMOVE_AT args 0)

     get_target_property(qtrelease Qt5::Core LOCATION_RELEASE)
-    get_filename_component(qtdir ${qtrelease} DIRECTORY)
+    get_filename_component(qtrelease_dir ${qtrelease} DIRECTORY)
+
+    # eventhoug it is the same directory, this script should not rely on it
+    get_target_property(qtdebug Qt5::Core LOCATION_DEBUG)
+    get_filename_component(qtdebug_dir ${qtdebug} DIRECTORY)

     foreach(target ${args})
-        install(FILES "${qtdir}/../plugins/platforms/${target}.dll" DESTINATION ${DEST}/plugins/platforms COMPONENT ${COMP})
+        install(FILES "${qtrelease_dir}/../plugins/platforms/${target}.dll" DESTINATION ${DEST}/plugins/platforms
+            CONFIGURATIONS Release COMPONENT ${COMP})
+        install(FILES "${qtdebug_dir}/../plugins/platforms/${target}d.dll" DESTINATION ${DEST}/plugins/platforms
+            CONFIGURATIONS Debug COMPONENT ${COMP})
     endforeach()

     install(FILES ${CMAKE_SOURCE_DIR}/packages/qt.conf DESTINATION ${DEST} COMPONENT ${COMP})

+    endif()
+
 endmacro()


Revert UseODB.cmake

Revert UseODB.cmake

--- cmake/UseODB.cmake
+++ cmake/UseODB.cmake
@@ -9,171 +9,202 @@
 set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

 function(odb_compile outvar)
-	if(NOT ODB_EXECUTABLE)
-		message(FATAL_ERROR "odb compiler executable not found")
-	endif()
-
-	set(options AT_ONCE GENERATE_QUERY GENERATE_SESSION GENERATE_SCHEMA GENERATE_SCHEMA_ONLY GENERATE_PREPARED)
-	set(oneValueParams SCHEMA_FORMAT SCHEMA_NAME TABLE_PREFIX
-		STANDARD SLOC_LIMIT
-		HEADER_PROLOGUE INLINE_PROLOGUE SOURCE_PROLOGUE
-		HEADER_EPILOGUE INLINE_EPILOGUE SOURCE_EPILOGUE
-		MULTI_DATABASE
-		X_CPP_OPTION)
-	set(multiValueParams FILES INCLUDE DB PROFILE)
-
-	cmake_parse_arguments(PARAM "${options}" "${oneValueParams}" "${multiValueParams}" ${ARGN})
-
-	if(PARAM_UNPARSED_ARGUMENTS)
-		message(FATAL_ERROR "invalid arguments passed to odb_wrap_cpp: ${PARAM_UNPARSED_ARGUMENTS}")
-	endif()
-
-	if(NOT PARAM_FILES)
-		message(FATAL_ERROR: "no input files to odb_compile")
-	endif()
-
-	set(ODB_ARGS)
-
-	if(PARAM_MULTI_DATABASE)
-		list(APPEND ODB_ARGS --multi-database "${PARAM_MULTI_DATABASE}")
-		list(APPEND PARAM_DB common)
-	endif()
-
-	foreach(db ${PARAM_DB})
-		list(APPEND ODB_ARGS -d "${db}")
-	endforeach()
-
-	if(PARAM_AT_ONCE)
-		list(APPEND ODB_ARGS --at-once)
-	endif()
-
-	if(PARAM_GENERATE_QUERY)
-		list(APPEND ODB_ARGS --generate-query)
-	endif()
-
-	if(PARAM_GENERATE_SESSION)
-		list(APPEND ODB_ARGS --generate-session)
-	endif()
-
-	if(PARAM_GENERATE_SCHEMA)
-		list(APPEND ODB_ARGS --generate-schema)
-	endif()
-
-	if(PARAM_GENERATE_SCHEMA_ONLY)
-		list(APPEND ODB_ARGS --generate-schema-only)
-	endif()
-
-	if(PARAM_GENERATE_PREPARED)
-		list(APPEND ODB_ARGS --generate-prepared)
-	endif()
-
-	if(PARAM_SCHEMA_FORMAT)
-		list(APPEND ODB_ARGS --schema-format "${PARAM_SCHEMA_FORMAT}")
-	endif()
-
-	if(PARAM_SCHEMA_NAME)
-		list(APPEND ODB_ARGS --schema-name "${PARAM_SCHEMA_NAME}")
-	endif()
-
-	if(PARAM_TABLE_PREFIX)
-		list(APPEND ODB_ARGS --table-prefix "${PARAM_TABLE_PREFIX}")
-	endif()
-
-	if(PARAM_STANDARD)
-		list(APPEND ODB_ARGS --std "${PARAM_STANDARD}")
-	endif()
-
-	if(PARAM_SLOC_LIMIT)
-		list(APPEND ODB_ARGS --sloc-limit "${PARAM_SLOC_LIMIT}")
-	endif()
-
-	if(PARAM_HEADER_PROLOGUE)
-		list(APPEND ODB_ARGS --hxx-prologue-file "${PARAM_HEADER_PROLOGUE}")
-	endif()
-
-	if(PARAM_INLINE_PROLOGUE)
-		list(APPEND ODB_ARGS --ixx-prologue-file "${PARAM_INLINE_PROLOGUE}")
-	endif()
-
-	if(PARAM_SOURCE_PROLOGUE)
-		list(APPEND ODB_ARGS --cxx-prologue-file "${PARAM_SOURCE_PROLOGUE}")
-	endif()
-
-	if(PARAM_HEADER_EPILOGUE)
-		list(APPEND ODB_ARGS --hxx-epilogue-file "${PARAM_HEADER_EPILOGUE}")
-	endif()
-
-	if(PARAM_INLINE_EPILOGUE)
-		list(APPEND ODB_ARGS --ixx-epilogue-file "${PARAM_INLINE_EPILOGUE}")
-	endif()
-
-	if(PARAM_SOURCE_EPILOGUE)
-		list(APPEND ODB_ARGS --cxx-epilogue-file "${PARAM_SOURCE_EPILOGUE}")
-	endif()
-
-	foreach(profile ${PARAM_PROFILE})
-		list(APPEND ODB_ARGS --profile "${profile}")
-	endforeach()
-
-	if(PARAM_X_CPP_OPTION)
-		list(APPEND ODB_ARGS -x "${PARAM_X_CPP_OPTION}")
-	endif()
-
-	list(APPEND ODB_ARGS --output-dir "${ODB_COMPILE_OUTPUT_DIR}")
-	list(APPEND ODB_ARGS --hxx-suffix "${ODB_COMPILE_HEADER_SUFFIX}")
-	list(APPEND ODB_ARGS --ixx-suffix "${ODB_COMPILE_INLINE_SUFFIX}")
-	list(APPEND ODB_ARGS --cxx-suffix "${ODB_COMPILE_SOURCE_SUFFIX}")
-
-	if(PARAM_MULTI_DATABASE AND NOT "${ODB_COMPILE_FILE_SUFFIX}" MATCHES ".+:.+")
-		set(osuffix "${ODB_COMPILE_FILE_SUFFIX}")
-		set(ODB_COMPILE_FILE_SUFFIX)
-		foreach(db ${PARAM_DB})
-			if("${db}" MATCHES "common")
-				list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}")
-			else()
-				list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}_${db}")
-			endif()
-		endforeach()
-	endif()
-
-	foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
-		list(APPEND ODB_ARGS --odb-file-suffix "${sfx}")
-	endforeach()
-
-	foreach(dir ${PARAM_INCLUDE} ${ODB_INCLUDE_DIRS})
-		list(APPEND ODB_ARGS "-I${dir}")
-	endforeach()
-
-	file(REMOVE_RECURSE "${ODB_COMPILE_OUTPUT_DIR}")
-	file(MAKE_DIRECTORY "${ODB_COMPILE_OUTPUT_DIR}")
-
-	foreach(input ${PARAM_FILES})
-		get_filename_component(fname "${input}" NAME_WE)
-		set(outputs)
-
-		foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
-			string(REGEX REPLACE ":.*$" "" pfx "${sfx}")
-			string(REGEX REPLACE "^.*:" "" sfx "${sfx}")
-
-			if(NOT "${PARAM_MULTI_DATABASE}" MATCHES "static" OR NOT "${pfx}" MATCHES "common")
-				set(output "${ODB_COMPILE_OUTPUT_DIR}/${fname}${sfx}${ODB_COMPILE_SOURCE_SUFFIX}")
-				list(APPEND ${outvar} "${output}")
-				list(APPEND outputs "${output}")
-			endif()
-		endforeach()
-
-		if(ODB_COMPILE_DEBUG)
-			set(_msg "${ODB_EXECUTABLE} ${ODB_ARGS} ${input}")
-			string(REPLACE ";" " " _msg "${_msg}")
-			message(STATUS "${_msg}")
-		endif()
-
-		add_custom_command(OUTPUT ${outputs}
-			COMMAND ${ODB_EXECUTABLE} ${ODB_ARGS} "${input}"
-			DEPENDS "${input}"
-			WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-			VERBATIM)
-	endforeach()
-
-	set(${outvar} ${${outvar}} PARENT_SCOPE)
-endfunction()
+  if(NOT ODB_EXECUTABLE)
+    message(FATAL_ERROR "odb compiler executable not found")
+  endif()
+
+  set(options GENERATE_QUERY GENERATE_SESSION GENERATE_SCHEMA GENERATE_PREPARED
+          GENERATE_SCHEMA_ONLY AT_ONCE)
+  set(oneValueParams SCHEMA_FORMAT SCHEMA_NAME TABLE_PREFIX
+    STANDARD SLOC_LIMIT
+    HXX_PROLOGUE HEADER_PROLOGUE INLINE_PROLOGUE SOURCE_PROLOGUE
+    HEADER_EPILOGUE INLINE_EPILOGUE SOURCE_EPILOGUE ODB_EPILOGUE
+    MULTI_DATABASE
+    INCLUDE_PREFIX
+    DEFAULT_POINTER
+    PGSQL_SERVER_VERSION
+          OUTPUT_DIR
+          )
+  set(multiValueParams FILES INCLUDE DB INCLUDE_REGEX PROFILE)
+
+  cmake_parse_arguments(PARAM "${options}" "${oneValueParams}" "${multiValueParams}" ${ARGN})
+
+  if(PARAM_UNPARSED_ARGUMENTS)
+    message(FATAL_ERROR "invalid arguments passed to odb_wrap_cpp: ${PARAM_UNPARSED_ARGUMENTS}")
+  endif()
+
+  if(NOT PARAM_FILES)
+    message(FATAL_ERROR: "no input files to odb_compile")
+  endif()
+
+  set(ODB_ARGS)
+
+  if(PARAM_MULTI_DATABASE)
+    list(APPEND ODB_ARGS --multi-database "${PARAM_MULTI_DATABASE}")
+    list(APPEND PARAM_DB common)
+  endif()
+
+  foreach(db ${PARAM_DB})
+    list(APPEND ODB_ARGS -d "${db}")
+  endforeach()
+
+  if(PARAM_GENERATE_QUERY)
+    list(APPEND ODB_ARGS --generate-query)
+  endif()
+
+  if(PARAM_GENERATE_SESSION)
+    list(APPEND ODB_ARGS --generate-session)
+  endif()
+
+  if(PARAM_GENERATE_SCHEMA)
+    list(APPEND ODB_ARGS --generate-schema)
+  endif()
+
+  if(PARAM_GENERATE_PREPARED)
+    list(APPEND ODB_ARGS --generate-prepared)
+  endif()
+
+  if (PARAM_GENERATE_SCHEMA_ONLY)
+      list(APPEND ODB_ARGS --generate-schema-only)
+  endif()
+
+  if (PARAM_AT_ONCE)
+      list(APPEND ODB_ARGS --at-once)
+  endif()
+
+  if(PARAM_SCHEMA_FORMAT)
+    list(APPEND ODB_ARGS --schema-format "${PARAM_SCHEMA_FORMAT}")
+  endif()
+
+  if(PARAM_SCHEMA_NAME)
+    list(APPEND ODB_ARGS --schema-name "${PARAM_SCHEMA_NAME}")
+  endif()
+
+  if(PARAM_TABLE_PREFIX)
+    list(APPEND ODB_ARGS --table-prefix "${PARAM_TABLE_PREFIX}")
+  endif()
+
+  if(PARAM_STANDARD)
+    list(APPEND ODB_ARGS --std "${PARAM_STANDARD}")
+  endif()
+
+  if(PARAM_SLOC_LIMIT)
+    list(APPEND ODB_ARGS --sloc-limit "${PARAM_SLOC_LIMIT}")
+  endif()
+
+  if(PARAM_HXX_PROLOGUE)
+    list(APPEND ODB_ARGS --hxx-prologue "${PARAM_HXX_PROLOGUE}")
+  endif()
+
+  if(PARAM_HEADER_PROLOGUE)
+    list(APPEND ODB_ARGS --hxx-prologue-file "${PARAM_HEADER_PROLOGUE}")
+  endif()
+
+  if(PARAM_INLINE_PROLOGUE)
+    list(APPEND ODB_ARGS --ixx-prologue-file "${PARAM_INLINE_PROLOGUE}")
+  endif()
+
+  if(PARAM_SOURCE_PROLOGUE)
+    list(APPEND ODB_ARGS --cxx-prologue-file "${PARAM_SOURCE_PROLOGUE}")
+  endif()
+
+  if(PARAM_HEADER_EPILOGUE)
+    list(APPEND ODB_ARGS --hxx-epilogue-file "${PARAM_HEADER_EPILOGUE}")
+  endif()
+
+  if(PARAM_INLINE_EPILOGUE)
+    list(APPEND ODB_ARGS --ixx-epilogue-file "${PARAM_INLINE_EPILOGUE}")
+  endif()
+
+  if(PARAM_SOURCE_EPILOGUE)
+    list(APPEND ODB_ARGS --cxx-epilogue-file "${PARAM_SOURCE_EPILOGUE}")
+  endif()
+
+  if(PARAM_ODB_EPILOGUE)
+    list(APPEND ODB_ARGS --odb-epilogue "${PARAM_ODB_EPILOGUE}")
+  endif()
+
+  if(PARAM_OUTPUT_DIR)
+    set(ODB_COMPILE_OUTPUT_DIR "${PARAM_OUTPUT_DIR}")
+  endif()
+
+  if(PARAM_PROFILE)
+    foreach(p ${PARAM_PROFILE})
+      list(APPEND ODB_ARGS --profile "${p}")
+    endforeach()
+  endif()
+
+  if(PARAM_INCLUDE_PREFIX)
+    list(APPEND ODB_ARGS --include-prefix "${PARAM_INCLUDE_PREFIX}")
+  endif()
+
+  if (PARAM_DEFAULT_POINTER)
+      list(APPEND ODB_ARGS --default-pointer "${PARAM_DEFAULT_POINTER}")
+  endif()
+
+  if (PARAM_PGSQL_SERVER_VERSION)
+      list(APPEND ODB_ARGS --pgsql-server-version "${PARAM_PGSQL_SERVER_VERSION}")
+  endif()
+
+  list(APPEND ODB_ARGS --output-dir "${ODB_COMPILE_OUTPUT_DIR}")
+  list(APPEND ODB_ARGS --hxx-suffix "${ODB_COMPILE_HEADER_SUFFIX}")
+  list(APPEND ODB_ARGS --ixx-suffix "${ODB_COMPILE_INLINE_SUFFIX}")
+  list(APPEND ODB_ARGS --cxx-suffix "${ODB_COMPILE_SOURCE_SUFFIX}")
+
+  if(PARAM_MULTI_DATABASE AND NOT "${ODB_COMPILE_FILE_SUFFIX}" MATCHES ".+:.+")
+    set(osuffix "${ODB_COMPILE_FILE_SUFFIX}")
+    set(ODB_COMPILE_FILE_SUFFIX)
+    foreach(db ${PARAM_DB})
+      if("${db}" MATCHES "common")
+        list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}")
+      else()
+        list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}_${db}")
+      endif()
+    endforeach()
+  endif()
+
+  foreach(reg ${PARAM_INCLUDE_REGEX})
+      list(APPEND ODB_ARGS --include-regex "${reg}")
+  endforeach()
+
+  foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
+    list(APPEND ODB_ARGS --odb-file-suffix "${sfx}")
+  endforeach()
+
+  foreach(dir ${PARAM_INCLUDE} ${ODB_INCLUDE_DIRS})
+    list(APPEND ODB_ARGS "-I${dir}")
+  endforeach()
+
+  file(REMOVE_RECURSE "${ODB_COMPILE_OUTPUT_DIR}")
+  file(MAKE_DIRECTORY "${ODB_COMPILE_OUTPUT_DIR}")
+
+  foreach(input ${PARAM_FILES})
+    get_filename_component(fname "${input}" NAME_WE)
+    set(outputs)
+
+    foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
+      string(REGEX REPLACE ":.*$" "" pfx "${sfx}")
+      string(REGEX REPLACE "^.*:" "" sfx "${sfx}")
+
+      if(NOT "${PARAM_MULTI_DATABASE}" MATCHES "static" OR NOT "${pfx}" MATCHES "common")
+        set(output "${ODB_COMPILE_OUTPUT_DIR}/${fname}${sfx}${ODB_COMPILE_SOURCE_SUFFIX}")
+        list(APPEND ${outvar} "${output}")
+        list(APPEND outputs "${output}")
+      endif()
+    endforeach()
+
+    if(ODB_COMPILE_DEBUG)
+      set(_msg "${ODB_EXECUTABLE} ${ODB_ARGS} ${input}")
+      string(REPLACE ";" " " _msg "${_msg}")
+      message(STATUS "${_msg}")
+    endif()
+
+    add_custom_command(OUTPUT ${outputs}
+      COMMAND ${ODB_EXECUTABLE} ${ODB_ARGS} "${input}"
+      DEPENDS "${input}"
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+      VERBATIM)
+  endforeach()
+
+  set(${outvar} ${${outvar}} PARENT_SCOPE)
+  endfunction()


Trying to use C++11 [ci skip].

Trying to use C++11 [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -95,8 +95,12 @@

         SET(LINK_FLAGS_PROPERTIES "/STACK:10000000 /MACHINE:X86")
     ELSE()
-        SET(CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ -Wall -W -Werror")
+        SET(CMAKE_CXX_FLAGS "-Wall -W -Werror -std=c++0x")
         SET(LINK_FLAGS_PROPERTIES)
+
+        IF(APPLE)
+            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+        ENDIF()
     ENDIF()

     # Some build settings that depend on whether we want a debug or release


cmake: find format

cmake: find format


build: luajit: macos: implement more stable MACOSX_DEPLOYMENT_TARGET
detecting mechanism

1. Refer the MACOSX_DEPLOYMENT_TARGET environment variable first.
2. If it is not available, MACOSX_DEPLOYMENT_TARGET should be
   caluculated from sw_vers command results.

This patch should be followed up
https://github.com/fluent/fluent-bit/pull/4832.

Signed-off-by: Hiroshi Hatake <a476a6e5b5893650242fbf0b2961500a9bd9032e@calyptia.com>

--- cmake/luajit.cmake
+++ cmake/luajit.cmake
@@ -13,11 +13,19 @@

 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} -fno-stack-check")
-  if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20
-      AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 22)
-    set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=11.0")
+
+  if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET})
+    # Refer MACOSX_DEPLOYMENT_TARGET if available.
+    set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=$ENV{MACOSX_DEPLOYMENT_TARGET}")
   else()
-    set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.15")
+    # Calculate MACOSX_DEPLOYMENT_TARGET from sw_vers command result.
+    execute_process(COMMAND sw_vers -productVersion OUTPUT_VARIABLE MACOSX_DEPLOYMENT_TARGET)
+    string(REGEX REPLACE "\n$" "" MACOSX_DEPLOYMENT_TARGET ${MACOSX_DEPLOYMENT_TARGET})
+    string(REPLACE "." ";" DEPLOYMENT_VERSION_LIST ${MACOSX_DEPLOYMENT_TARGET})
+    list(GET DEPLOYMENT_VERSION_LIST 0 MACOSX_DEPLOYMENT_TARGET_MAJOR)
+    list(GET DEPLOYMENT_VERSION_LIST 1 MACOSX_DEPLOYMENT_TARGET_MINOR)
+    list(GET DEPLOYMENT_VERSION_LIST 2 MACOSX_DEPLOYMENT_TARGET_PATCH)
+    set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET_MAJOR}.${MACOSX_DEPLOYMENT_TARGET_MINOR}")
   endif()
 else()
   set(DEPLOYMENT_TARGET "")


Use virgil-crypto lib v1.3.2

Use virgil-crypto lib v1.3.2

--- cmake/virgil.cmake
+++ cmake/virgil.cmake
@@ -86,7 +86,7 @@
         if (NOT TARGET ${VIRGIL}_project)
             ExternalProject_Add (${VIRGIL}_project
                 GIT_REPOSITORY "https://github.com/VirgilSecurity/virgil-crypto.git"
-                GIT_TAG "v1.3.1"
+                GIT_TAG "v1.3.2"
                 PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ext/virgil-crypto"
                 CMAKE_ARGS ${CMAKE_ARGS}
             )


Minor comment.

Minor comment.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -768,6 +768,9 @@

 MACRO(OS_X_QT_DEPENDENCIES FILENAME QT_DEPENDENCIES)
     # Retrieve the file's full-path Qt dependencies as a list
+    # Note: some people may be using grep with coloring (e.g. they have
+    #       export GREP_OPTIONS='--color=always' in their profile), hence we ask
+    #       for coloring never to be used...

     SET(QT_LIBRARY_DIR_FOR_GREP "\t${QT_LIBRARY_DIR}/")


Fixed an issue with our test framework on Linux and Mac OS X.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -396,6 +396,8 @@

     IF(ENABLE_TESTING)
         FOREACH(TEST ${TESTS})
+            SET(TEST_NAME ${PLUGIN_NAME}_${TEST})
+
             SET(TEST_SOURCE_FILE test/${TEST}.cpp)
             SET(TEST_HEADER_MOC_FILE test/${TEST}.h)

@@ -404,9 +406,9 @@
                 # The test exists, so build it

                 QT4_WRAP_CPP(TEST_SOURCES_MOC ${TEST_HEADER_MOC_FILE})
-                ADD_EXECUTABLE(${TEST} ${TEST_SOURCE_FILE} ${TEST_SOURCES_MOC})
-
-                TARGET_LINK_LIBRARIES(${TEST}
+                ADD_EXECUTABLE(${TEST_NAME} ${TEST_SOURCE_FILE} ${TEST_SOURCES_MOC})
+
+                TARGET_LINK_LIBRARIES(${TEST_NAME}
                     ${QT_QTCORE_LIBRARY}
                     ${QT_QTTEST_LIBRARY}
                     ${QT_QTGUI_LIBRARY}
@@ -414,14 +416,19 @@

                 # Copy the test to our tests directory which we create if
                 # needed
+MESSAGE("01")

                 IF(NOT EXISTS ${DEST_TESTS_DIR})
-                    ADD_CUSTOM_COMMAND(TARGET ${TEST} POST_BUILD
+                    ADD_CUSTOM_COMMAND(TARGET ${TEST_NAME} POST_BUILD
                                        COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_TESTS_DIR})
                 ENDIF()
-
-                ADD_CUSTOM_COMMAND(TARGET ${TEST} POST_BUILD
-                                   COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/${TEST}${CMAKE_EXECUTABLE_SUFFIX} ${DEST_TESTS_DIR}/${PLUGIN_NAME}_${TEST}${CMAKE_EXECUTABLE_SUFFIX})
+MESSAGE("21")
+
+                SET(TEST_NAME_FILEPATH ${TEST_NAME}${CMAKE_EXECUTABLE_SUFFIX})
+
+                ADD_CUSTOM_COMMAND(TARGET ${TEST_NAME} POST_BUILD
+                                   COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/${TEST_NAME_FILEPATH} ${DEST_TESTS_DIR}/${TEST_NAME_FILEPATH})
+MESSAGE("03")
             ELSE()
                 MESSAGE(AUTHOR_WARNING "The '${TEST}' test for the '${PLUGIN_NAME}' plugin doesn't exist")
             ENDIF()


ENH: GDAL configure error

ENH: GDAL configure error

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -95,6 +95,7 @@
       BUILD_COMMAND make
       INSTALL_COMMAND make install
       DEPENDS ${${proj}_DEPENDENCIES}
+      PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
       )

     ExternalProject_Add_Step(${proj} copy_source


removed the debug message

removed the debug message

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -22,7 +22,6 @@
 set(CMAKE_CXX_STANDARD_REQUIRED true)

 include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
-message(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})

 #####################################
 if(ENSEMBLE_GPU_NVT)


Use VTK_DIR of MITK superbuild.

Use VTK_DIR of MITK superbuild.

--- CMakeExternals/ACVD.cmake
+++ CMakeExternals/ACVD.cmake
@@ -14,6 +14,7 @@

   set(additional_cmake_args
     -DUSE_MULTITHREADING:BOOL=ON
+    -DVTK_DIR:PATH=${VTK_DIR}
   )

   set(ACVD_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchACVD.cmake)


Fix error in append_property_string from r2777 for strings with spaces

SVN-Revision: 2782

--- make/utils.cmake
+++ make/utils.cmake
@@ -42,7 +42,7 @@
 endfunction (identify_clang)

 function (append_property_string type target name value)
-  _DR_append_property_string(${type} ${target} ${name} ${value})
+  _DR_append_property_string(${type} ${target} ${name} "${value}")
 endfunction (append_property_string)

 function (append_property_list type target name value)


Add update target for doc repos to default targets

--- CommonDocumentation.cmake
+++ CommonDocumentation.cmake
@@ -21,7 +21,7 @@
 #   regular release build using Buildyard, which can be very time consuming.

 function(COMMON_DOCUMENTATION)
-  add_custom_target(${PROJECT_NAME}_doxygit
+  add_custom_target(${PROJECT_NAME}_doxygit ALL
     COMMAND ${CMAKE_COMMAND}
     -DPROJECT_NAME="${PROJECT_NAME}"
     -DDOXYGIT_TOC_POST:STRING="${DOXYGIT_TOC_POST}"
@@ -32,7 +32,7 @@

   # For meta project, separate doxygit and ${PROJECT_NAME}_doxygit
   if(NOT TARGET doxygit)
-    add_custom_target(doxygit)
+    add_custom_target(doxygit ALL)
   endif()
   add_dependencies(doxygit ${PROJECT_NAME}_doxygit)


ENH: Update qmake on eden

ENH: Update qmake on eden

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

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

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


Update CompileOptions.cmake - Disable treat warnings as errors, fix experimental::filesystem link error in Ubuntu Linux and macOS (#41)

--- Builds/CMake/CompileOptions.cmake
+++ Builds/CMake/CompileOptions.cmake
@@ -8,7 +8,7 @@
 # Determine architecture (32/64 bit)
 set(X64 OFF)
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    set(X64 ON)
+	set(X64 ON)
 endif()

 #
@@ -16,9 +16,9 @@
 #

 set(DEFAULT_PROJECT_OPTIONS
-    CXX_STANDARD              17 # Not available before CMake 3.8.2; see below for manual command line argument addition
-    LINKER_LANGUAGE           "CXX"
-    POSITION_INDEPENDENT_CODE ON
+	CXX_STANDARD              17 # Not available before CMake 3.8.2; see below for manual command line argument addition
+	LINKER_LANGUAGE           "CXX"
+	POSITION_INDEPENDENT_CODE ON
 )

 #
@@ -38,15 +38,15 @@
 #

 set(DEFAULT_COMPILE_DEFINITIONS
-    SYSTEM_${SYSTEM_NAME_UPPER}
+	SYSTEM_${SYSTEM_NAME_UPPER}
 )

 # MSVC compiler options
 if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    set(DEFAULT_COMPILE_DEFINITIONS ${DEFAULT_COMPILE_DEFINITIONS}
-        _SCL_SECURE_NO_WARNINGS  # Calling any one of the potentially unsafe methods in the Standard C++ Library
-        _CRT_SECURE_NO_WARNINGS  # Calling any one of the potentially unsafe methods in the CRT Library
-    )
+	set(DEFAULT_COMPILE_DEFINITIONS ${DEFAULT_COMPILE_DEFINITIONS}
+		_SCL_SECURE_NO_WARNINGS  # Calling any one of the potentially unsafe methods in the Standard C++ Library
+		_CRT_SECURE_NO_WARNINGS  # Calling any one of the potentially unsafe methods in the CRT Library
+	)
 endif ()

 #
@@ -57,45 +57,45 @@

 # MSVC compiler options
 if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    # remove default warning level from CMAKE_CXX_FLAGS
-    string (REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+	# remove default warning level from CMAKE_CXX_FLAGS
+	string (REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 endif()

 # MSVC compiler options
 if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
-        /MP           # -> build with multiple processes
-        /W3           # -> warning level 3
-        # /WX         # -> treat warnings as errors
+	set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
+		/MP           # -> build with multiple processes
+		/W4           # -> warning level 3
+		# /WX         # -> treat warnings as errors

-        # /wd4251     # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
-        # /wd4592     # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
-        # /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
-        # /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)
-        /wd4717       # -> disable warning: recursive on all control paths, function will cause runtime stack overflow (wrong warning)
+		# /wd4251     # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
+		# /wd4592     # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
+		# /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
+		# /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)
+		/wd4717       # -> disable warning: recursive on all control paths, function will cause runtime stack overflow (wrong warning)

-        #$<$<CONFIG:Debug>:
-        #/RTCc        # -> value is assigned to a smaller data type and results in a data loss
-        #>
+		#$<$<CONFIG:Debug>:
+		#/RTCc        # -> value is assigned to a smaller data type and results in a data loss
+		#>

-        $<$<CONFIG:Release>:
-        /Gw           # -> whole program global optimization
-        /GS-          # -> buffer security check: no
-        /GL           # -> whole program optimization: enable link-time code generation (disables Zi)
-        /GF           # -> enable string pooling
-        >
+		$<$<CONFIG:Release>:
+		/Gw           # -> whole program global optimization
+		/GS-          # -> buffer security check: no
+		/GL           # -> whole program optimization: enable link-time code generation (disables Zi)
+		/GF           # -> enable string pooling
+		>

-        # No manual c++11 enable for MSVC as all supported MSVC versions for cmake-init have C++11 implicitly enabled (MSVC >=2013)
-    )
+		# No manual c++11 enable for MSVC as all supported MSVC versions for cmake-init have C++11 implicitly enabled (MSVC >=2013)
+	)
 endif ()

 # GCC and Clang compiler options
 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
-        -Wall
-        -Werror
-        -std=c++1z
-    )
+	set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
+		-Wall
+		# -Werror
+		-std=c++1z
+	)
 endif ()

 #
@@ -106,7 +106,8 @@

 # Use pthreads on mingw and linux
 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_SYSTEM_NAME MATCHES "Linux")
-    set(DEFAULT_LINKER_OPTIONS
-        -pthread
-    )
+	set(DEFAULT_LINKER_OPTIONS
+		-pthread
+		-lstdc++fs
+	)
 endif()


CMake: Recognize FreeType version 2.3.11

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239)
+set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239 freetype2311)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Link SL static

Link SL static

--- cmake/Config.cmake
+++ cmake/Config.cmake
@@ -1,5 +1,5 @@
 set(CMAKE_CXX_STANDART 14)
-
+set(CMAKE_CXX_FLAGS "-static")
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "bin/${CMAKE_BUILD_TYPE}")

 set(BULL_ROOT ${CMAKE_CURRENT_SOURCE_DIR})


Update common.cmake

Update common.cmake

Make -Wno-reserved-id-macro compiler flag dependent on compiler version.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -103,8 +103,7 @@
       -Wno-padded
     )

-    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" AND
-        ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 7.0.0)
+    if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 7.0.0)
       list(APPEND _COMPILE_OPTIONS
         -Wno-reserved-id-macro
       )


Travis-CI: trying to understand why the tests don't pass on OS X while they do locally.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -984,6 +984,10 @@
     FOREACH(DEPENDENCY ${ARGN})
         SET(DEPENDENCY_FILENAME ${DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${DEPENDENCY})

+MESSAGE("=========")
+MESSAGE("REPLACING: ${QT_LIBRARY_DIR}/${DEPENDENCY_FILENAME}")
+MESSAGE("WITH:      @rpath/${DEPENDENCY_FILENAME}")
+MESSAGE("=========")
         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                            COMMAND install_name_tool -change ${QT_LIBRARY_DIR}/${DEPENDENCY_FILENAME}
                                                              @rpath/${DEPENDENCY_FILENAME}


Python unix wrapper only depend on ortools soname

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -107,7 +107,7 @@
 	COMMAND ${CMAKE_COMMAND} -E echo "  distclass=BinaryDistribution," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  packages=find_packages()," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  package_data={" >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools':['$<TARGET_FILE_NAME:ortools>'$<$<NOT:$<PLATFORM_ID:Windows>>:,'$<TARGET_SONAME_FILE:ortools>'>]," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools':[$<$<NOT:$<PLATFORM_ID:Windows>>:'../$<TARGET_SONAME_FILE_NAME:ortools>'>]," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.constraint_solver':['$<TARGET_FILE_NAME:_pywrapcp>']," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.linear_solver':['$<TARGET_FILE_NAME:_pywraplp>']," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.sat':['$<TARGET_FILE_NAME:_pywrapsat>']," >> setup.py


Add USE_TLS option to switch between old and new memory.c

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -212,6 +212,10 @@

 if (CONSISTENT_FPCSR)
   set(CCOMMON_OPT "${CCOMMON_OPT} -DCONSISTENT_FPCSR")
+endif ()
+
+if (USE_TLS)
+  set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_TLS")
 endif ()

 # Only for development


temporarily set libbot to my fork

temporarily set libbot to my fork

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -11,8 +11,8 @@
     )
 endif()

-set(bot_core_lcmtypes_url https://github.com/openhumanoids/bot_core_lcmtypes.git)
-set(bot_core_lcmtypes_revision 02a41c0a0b017d09c410d87343652c7e2cadf4c6)
+set(bot_core_lcmtypes_url https://github.com/iamwolf/bot_core_lcmtypes.git)
+set(bot_core_lcmtypes_revision 023387b1dc071155f898cca5730cad9b88ec6925)
 set(bot_core_lcmtypes_depends ${lcm_proj})

 set(libbot_url https://github.com/openhumanoids/libbot.git)


use new lcmtype repo

use new lcmtype repo

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -11,10 +11,13 @@
     )
 endif()

+set(bot_core_lcmtypes_url https://github.com/openhumanoids/bot_core_lcmtypes.git)
+set(bot_core_lcmtypes_revision d2617b85674fa83b371a5c57fabdbe468844f15e)
+set(bot_core_lcmtypes_depends ${lcm_proj})
+
 set(libbot_url https://github.com/openhumanoids/libbot.git)
-#set(libbot_revision 92cf3eaef17659990104da40866c5d466a453b17) # this revision needs a few more fixes
-set(libbot_revision eb61f9bed5df654ffb0ce47ce44ca3d379a6e6e8)
-set(libbot_depends ${lcm_proj})
+set(libbot_revision ed4a76423f2a21594436490341f907710d3f78dd)
+set(libbot_depends bot_core_lcmtypes ${lcm_proj})

 set(Eigen_pod_url https://github.com/RobotLocomotion/eigen-pod.git)
 set(Eigen_pod_revision ceba39500b89a77a8649b3e8b421b10a3d74d42b)


linking static libs

linking static libs

--- build/toolchains/rasperrypi.cmake
+++ build/toolchains/rasperrypi.cmake
@@ -27,9 +27,9 @@
 # link and build functions
 function(link_libraries)

-    target_link_libraries(${EXECUTABLE_NAME} -lEGL)
-    target_link_libraries(${EXECUTABLE_NAME} -lGLESv2)
-    target_link_libraries(${EXECUTABLE_NAME} -lbcm_host)
+    target_link_libraries(${EXECUTABLE_NAME} /opt/vc/lib/libGLESv2_static.a)
+    target_link_libraries(${EXECUTABLE_NAME} /opt/vc/lib/libEGL_static.a)
+    #target_link_libraries(${EXECUTABLE_NAME} -lbcm_host)
     target_link_libraries(${EXECUTABLE_NAME} -lcurl) #use system libcurl
     target_link_libraries(${EXECUTABLE_NAME} ${PROJECT_SOURCE_DIR}/rpi/precompiled/libtess2/libtess2.a)
     target_link_libraries(${EXECUTABLE_NAME} core)


ENH: application macro support external projects

--- CMake/OTBApplicationMacros.cmake
+++ CMake/OTBApplicationMacros.cmake
@@ -7,13 +7,17 @@
    include_directories(${APPLICATION_INCLUDE_DIRS})
    add_library(${APPLICATION_TARGET_NAME} MODULE ${APPLICATION_SOURCES})
    target_link_libraries(${APPLICATION_TARGET_NAME} OTBApplicationEngine ${APPLICATION_LINK_LIBRARIES})
-   otb_module_target_label(${APPLICATION_TARGET_NAME})
+   if(otb-module)
+     otb_module_target_label(${APPLICATION_TARGET_NAME})
+   endif()

    # Setup build output location
    # Do not output in the standard lib folder where all shared libs goes.
    # This is to avoid the application factory to look into each and every shared lib
    # for itkLoad symbol
-   set_property(TARGET ${APPLICATION_TARGET_NAME} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/otb/applications)
+   if(otb-module)
+     set_property(TARGET ${APPLICATION_TARGET_NAME} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/otb/applications)
+   endif()

    # Remove the usual 'lib' prefix to make it clear it is a plugin
    # and not a shared library to link against
@@ -31,9 +35,20 @@
    endif()

    if (APPLICATION_INSTALL_PATH)
+     if(otb-module)
+       install(TARGETS ${APPLICATION_TARGET_NAME}
+               EXPORT ${${otb-module}-targets}
+               LIBRARY DESTINATION ${APPLICATION_INSTALL_PATH}
+               COMPONENT RuntimeLibraries)
+     else()
+       install(TARGETS ${APPLICATION_TARGET_NAME}
+               LIBRARY DESTINATION ${APPLICATION_INSTALL_PATH}
+               COMPONENT RuntimeLibraries)
+     endif()
+   else()
      install(TARGETS ${APPLICATION_TARGET_NAME}
-             EXPORT ${${otb-module}-targets}
-             LIBRARY DESTINATION ${APPLICATION_INSTALL_PATH} COMPONENT RuntimeLibraries)
+             LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+             COMPONENT RuntimeLibraries)
    endif()

    # Generate a quickstart script in the build dir


BUG: ctkMacroWrapPythonQt: Fix handling of absolute input file paths

--- CMake/ctkMacroWrapPythonQt.cmake
+++ CMake/ctkMacroWrapPythonQt.cmake
@@ -112,7 +112,7 @@
     if(NOT skip_wrapping)

       # compute the input filename
-      if(IS_ABSOLUTE FILE)
+      if(IS_ABSOLUTE ${FILE})
         set(TMP_INPUT ${FILE})
       else()
         set(TMP_INPUT ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})


Fixed OgreJNIDummy dependencies (since Android.mk needs those libraries, they have to be compiled before OgreJNIDummy)

--HG--
branch : v1-9

--- CMake/toolchain/AndroidJNI.cmake
+++ CMake/toolchain/AndroidJNI.cmake
@@ -16,6 +16,8 @@
 	else()
 		add_dependencies(OgreJNIDummy OgreMain RenderSystem_GLES)
 	endif()
+
+	add_dependencies(OgreJNIDummy OgreTerrain OgreRTShaderSystem OgreOverlay OgrePaging OgreVolume Plugin_ParticleFX Plugin_OctreeSceneManager)

     if(APPLE OR WIN32)
       SET(ANDROID_EXECUTABLE "android")


make paths overridable

make paths overridable

--- CMakeModules/AFInstallDirs.cmake
+++ CMakeModules/AFInstallDirs.cmake
@@ -2,11 +2,39 @@
 # Sets ArrayFire installation paths.
 #

-# These paths are all relative to the project installation prefix.
-set(AF_INSTALL_BIN_DIR bin CACHE PATH "Installation path for executables")
-set(AF_INSTALL_LIB_DIR lib CACHE PATH "Installation path for libraries")
-set(AF_INSTALL_INC_DIR include CACHE PATH "Installation path for headers")
-set(AF_INSTALL_DATA_DIR share/ArrayFire CACHE PATH "Installation path for data files")
-set(AF_INSTALL_DOC_DIR ${AF_INSTALL_DATA_DIR}/doc CACHE PATH "Installation path for documentation")
-set(AF_INSTALL_MAN_DIR ${AF_INSTALL_DATA_DIR}/man CACHE PATH "Installation path for man pages")
-set(AF_INSTALL_CMAKE_DIR ${AF_INSTALL_DATA_DIR}/cmake CACHE PATH "Installation path for CMake modules")
+# NOTE: These paths are all relative to the project installation prefix.
+
+# Executables
+if(NOT DEFINED AF_INSTALL_BIN_DIR)
+  set(AF_INSTALL_BIN_DIR "bin" CACHE PATH "Installation path for executables")
+endif()
+
+# Libraries
+if(NOT DEFINED AF_INSTALL_LIB_DIR)
+  set(AF_INSTALL_LIB_DIR "lib" CACHE PATH "Installation path for libraries")
+endif()
+
+# Header files
+if(NOT DEFINED AF_INSTALL_INC_DIR)
+  set(AF_INSTALL_INC_DIR "include" CACHE PATH "Installation path for headers")
+endif()
+
+# Data files
+if(NOT DEFINED AF_INSTALL_DATA_DIR)
+  set(AF_INSTALL_DATA_DIR "share/ArrayFire" CACHE PATH "Installation path for data files")
+endif()
+
+# Documentation
+if(NOT DEFINED AF_INSTALL_DOC_DIR)
+  set(AF_INSTALL_DOC_DIR "${AF_INSTALL_DATA_DIR}/doc" CACHE PATH "Installation path for documentation")
+endif()
+
+# Man pages
+if(NOT DEFINED AF_INSTALL_MAN_DIR)
+  set(AF_INSTALL_MAN_DIR "${AF_INSTALL_DATA_DIR}/man" CACHE PATH "Installation path for man pages")
+endif()
+
+# CMake files
+if(NOT DEFINED AF_INSTALL_CMAKE_DIR)
+  set(AF_INSTALL_CMAKE_DIR "${AF_INSTALL_DATA_DIR}/cmake" CACHE PATH "Installation path for CMake files")
+endif()


Add --debug flag to keep intermediate files

--- test/base_test.cmake
+++ test/base_test.cmake
@@ -21,7 +21,7 @@
 # Create intermediate representation in XcodeML Fortran format
 add_custom_command(
   OUTPUT  ${OUTPUT_FILE}
-  COMMAND ${CLAWFC} -J ${XMOD_DIR} --Wx-d -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
+  COMMAND ${CLAWFC} --debug -J ${XMOD_DIR} --Wx-d -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
   DEPENDS ${ORIGINAL_FILE}
   COMMENT "Translating CLAW directive with ${CLAWFC}"
 )


ENH: Update SCIFIO to latest version on 10/25/2016

https://github.com/scifio/scifio-imageio/compare/eb391a74e77b161e0f070539237193528c628f7b...0af019131839807d963c41641df86702b091816a

Change-Id: Iffb9b393292018ad749aa81dfa916d8862e8b24a

--- Modules/Remote/SCIFIO.remote.cmake
+++ Modules/Remote/SCIFIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(SCIFIO
   "SCIFIO (Bioformats) ImageIO plugin for ITK"
   GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git
-  GIT_TAG eb391a74e77b161e0f070539237193528c628f7b
+  GIT_TAG 0af019131839807d963c41641df86702b091816a
   )


[cmake] FindSiconosIO : find MechanicsIO.hpp which is supposed to be always there

--- Numerics/cmake/FindSiconosIO.cmake
+++ Numerics/cmake/FindSiconosIO.cmake
@@ -30,7 +30,7 @@
   SET(SiconosIO_LIBRARIES ${SiconosIO_LIBRARY})
   GET_FILENAME_COMPONENT(SiconosIO_LIBRARY_DIRS_DIR ${SiconosIO_LIBRARY_DIRS} PATH)

-   FIND_PATH(SiconosIO_INCLUDE_DIRS SiconosRestart.hpp
+   FIND_PATH(SiconosIO_INCLUDE_DIRS MechanicsIO.hpp
     HINTS ${SiconosIO_LIBRARY_DIRS_DIR} ${SiconosIO_LIBRARY_DIRS_DIR_DIR}
     ENV PATH
     PATH_SUFFIXES include/Siconos/IO)


make the testsuite works on windows with nmake

--HG--
extra : convert_revision : svn%3A283d02a7-25f6-0310-bc7c-ecb5cbfe19da/trunk/kdesupport/eigen2%40909891

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -82,11 +82,7 @@
 endif(NOT EIGEN_SITE)

 if(NOT EIGEN_CMAKE_DIR)
-  if(WIN32)
-    SET(EIGEN_CMAKE_DIR "C:/Program Files/CMake/bin/")
-  else(WIN32)
-    SET(EIGEN_CMAKE_DIR "")
-  endif(WIN32)
+  SET(EIGEN_CMAKE_DIR "")
 endif(NOT EIGEN_CMAKE_DIR)

 if(NOT EIGEN_BUILD_STRING)
@@ -163,6 +159,8 @@
 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
 if(WIN32)
+  #message(SEND_ERROR "win32")
+  set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
   SET (CTEST_INITIAL_CACHE "
     MAKECOMMAND:STRING=nmake -i
     CMAKE_MAKE_PROGRAM:FILEPATH=nmake


HAVE_DIA_SDK is directly checked by value, so define it as 0/1.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -42,7 +42,7 @@
 #cmakedefine01 HAVE_DECL_STRERROR_S

 /* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
-#cmakedefine HAVE_DIA_SDK ${HAVE_DIA_SDK}
+#cmakedefine01 HAVE_DIA_SDK

 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
    */


make testsuite aware of EIGEN_CTEST_ARGS

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -147,6 +147,9 @@

 # which ctest command to use for running the dashboard
 SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}")
+if($ENV{EIGEN_CTEST_ARGS})
+SET (CTEST_COMMAND "${CTEST_COMMAND} $ENV{EIGEN_CTEST_ARGS}")
+endif($ENV{EIGEN_CTEST_ARGS})
 # what cmake command to use for configuring this dashboard
 SET (CTEST_CMAKE_COMMAND "${EIGEN_CMAKE_DIR}cmake -DEIGEN_LEAVE_TEST_IN_ALL_TARGET=ON")


Don't search for OpenMP flags for Clang

Don't search for OpenMP flags for Clang

--- tests/find_mkl.cmake
+++ tests/find_mkl.cmake
@@ -5,7 +5,12 @@
 initialize_cookoff()

 find_package(MKL REQUIRED)
-find_package(OpenMP REQUIRED)
+
+# AppleClang does not yet support OpenMP
+# Mainline Clang does, but not on Legion
+if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
+  find_package(OpenMP REQUIRED)
+endif()

 add_definitions(${MKL_DEFINITIONS})
 include_directories(${MKL_INCLUDE_DIRS})


ICONV_IS_NOT_TRUSTABLE revival - observed on FreeBSD -; [ci skip]

--- cmake/FindIconvCapabilities.cmake
+++ cmake/FindIconvCapabilities.cmake
@@ -2,6 +2,7 @@
 #
 # ICONV_CAN_TRANSLIT      - iconv supports //TRANSLIT option
 # ICONV_CAN_IGNORE        - iconv supports //IGNORE option
+# ICONV_IS_NOT_TRUSTABLE  - Some bad iconv's that dup blindly IMHO
 #
 # Just to be sure, we do not limit the calls to iconv_open, but do the full thing
 # Input is FORCED with a valid ASCII and UTF-8 compliant thingy.


VersionCheck.h should be only included by TObject. Do not build a module for it.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -411,7 +411,7 @@
   endforeach()

   set(excluded_headers "RConversionRuleParser.h TSchemaRuleProcessor.h
-                        RConfig.h RVersion.h RtypesImp.h
+                        RConfig.h RVersion.h RtypesImp.h TVersionCheck.h
 			Rtypes.h RtypesCore.h TClassEdit.h TMetaUtils.h
 			TSchemaType.h DllImport.h TGenericClassInfo.h
 			TSchemaHelper.h ESTLType.h RStringView.h Varargs.h


Fix CI build (not matching bootloader-shared commits)

--- cmake/Depthai/DepthaiBootloaderConfig.cmake
+++ cmake/Depthai/DepthaiBootloaderConfig.cmake
@@ -1,7 +1,7 @@
 # Maturity level "snapshot" / "release"
-set(DEPTHAI_BOOTLOADER_MATURITY "release")
-#set(DEPTHAI_BOOTLOADER_MATURITY "snapshot")
+#set(DEPTHAI_BOOTLOADER_MATURITY "release")
+set(DEPTHAI_BOOTLOADER_MATURITY "snapshot")

 # "version if applicable"
-set(DEPTHAI_BOOTLOADER_VERSION "0.0.17")
-#set(DEPTHAI_BOOTLOADER_VERSION "870bec4ca0ef026ddb9c490a38dfe9d097614554")
+#set(DEPTHAI_BOOTLOADER_VERSION "0.0.15")
+set(DEPTHAI_BOOTLOADER_VERSION "bb9e4c86ce3c22da0aeb92dc18c8b28458bed4af")


Fix for ROOT-6546 (ctest: generate a rootmap with a library name compatible with roottest)

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -170,6 +170,9 @@
   if(CMAKE_ROOTTEST_NOROOTMAP)
     set(rootmapname )
     set(rootmapopts )
+  elseif(DEFINED CMAKE_ROOTTEST_NOROOTMAP)  # Follow the roottest dictionary library naming
+    set(rootmapname ${dictionary}.rootmap)
+    set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}_dictrflx)
   else()
     set(rootmapname ${dictionary}Dict.rootmap)
     set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)


Swap ACCELEROMETER_RAW x and y axis to match ACCELEROMETER

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "c429e4118c1b806c00440398cea96ae27603abc4")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "1d6fe578d91ff098c30f35a2f6663b55b9b845db")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW with latest improvements

Update FW with latest improvements

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "b95b1375ccdccdb233ed4463a74abe3ad62241a3")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "3bb469fa08b7b0abc4353cd27219521dfd763a9d")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


cmake configs: don't build wind estimator for fmu-v2 due to lack of flash space

Signed-off-by: Roman <019237760eff64d50a7eec108f84e3d8840aac17@gmail.com>

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -119,7 +119,7 @@
 	#modules/local_position_estimator
 	#modules/position_estimator_inav
 	#modules/landing_target_estimator
-	modules/wind_estimator
+	#modules/wind_estimator

 	#
 	# Vehicle Control


Print instructive error message if builtin_llvm=off (fixes bug ROOT-9186)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -988,7 +988,10 @@
                           ${CMAKE_BINARY_DIR}/interpreter/llvm/src/tools/clang/include)
     set(LLVM_LIBRARIES clangDriver clangFrontend)
   else()
-    find_package(LLVM REQUIRED)  # should define the same variables LLVM_XXXX
+# Temporarily comment out the following line (see https://root-forum.cern.ch/t/build-root6-without-builtin-llvm/18950/2)
+# and replace it by an instructive error message
+#    find_package(LLVM REQUIRED)  # should define the same variables LLVM_XXXX
+     message(FATAL_ERROR "Due to ROOT-specific patches not yet in upstream LLVM, builtin_llvm=on is currently required to build ROOT")
   endif()

   set(CLING_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/interpreter/cling/include)


Download boost sources from GitHub

Download boost sources from GitHub

--- cmake/projects/Boost/hunter.cmake
+++ cmake/projects/Boost/hunter.cmake
@@ -18,7 +18,10 @@
     VERSION
     "1.61.0"
     URL
-    "https://downloads.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2"
+    # Use same archive but from GitHub releases for better reachability. This is a same archive with same SHA1.
+    # Example, download stuck 4 times at one build: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.633
+    # "https://downloads.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2"
+    "https://github.com/hunter-packages/boost/releases/download/v1.61.0/boost_1_61_0.tar.bz2"
     SHA1
     f84b1a1ce764108ec3c2b7bd7704cf8dfd3c9d01
 )


Add pegtl 3.0.0 beta version

Add pegtl 3.0.0 beta version

--- cmake/projects/pegtl/hunter.cmake
+++ cmake/projects/pegtl/hunter.cmake
@@ -6,6 +6,18 @@
 include(hunter_download)
 include(hunter_pick_scheme)

+
+# master branch will be the next 3.x.x release in pegtl
+hunter_add_version(
+    PACKAGE_NAME
+    pegtl
+    VERSION
+    3.0.0-697aaa06
+    URL
+    "https://github.com/taocpp/PEGTL/archive/697aaa06564c6ea9d13f95de081a2d2d46b39160.zip"
+    SHA1
+    3b441aee41d1932809807ba27f30ca95602e322c
+)

 hunter_add_version(
     PACKAGE_NAME


CMake: fix link dependencies with clang compiler

Suggested by: https://github.com/jlblancoc/mrpt/issues/6

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -155,14 +155,16 @@
 				# Include dir:
 				INCLUDE_DIRECTORIES("${MRPT_SOURCE_DIR}/libs/${DEP_MRPT_NAME}/include")

-				# Link "-lmrpt-name", only for GCC and if both THIS and the dependence are non-header-only:
-				IF(CMAKE_COMPILER_IS_GNUCXX AND NOT ${headers_only})
-					get_property(_LIB_HDRONLY GLOBAL PROPERTY "${DEP}_LIB_IS_HEADERS_ONLY")
-					IF(NOT _LIB_HDRONLY)
-						#MESSAGE(STATUS "adding link dep: mrpt-${name} -> ${DEP}")
-						LIST(APPEND AUX_EXTRA_LINK_LIBS ${DEP}${MRPT_LINKER_LIBS_POSTFIX})
-					ENDIF(NOT _LIB_HDRONLY)
-				ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT ${headers_only})
+				# Link "-lmrpt-name", only for GCC/CLang and if both THIS and the dependence are non-header-only:
+				IF(NOT ${headers_only})
+					IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+						get_property(_LIB_HDRONLY GLOBAL PROPERTY "${DEP}_LIB_IS_HEADERS_ONLY")
+						IF(NOT _LIB_HDRONLY)
+							#MESSAGE(STATUS "adding link dep: mrpt-${name} -> ${DEP}")
+							LIST(APPEND AUX_EXTRA_LINK_LIBS ${DEP}${MRPT_LINKER_LIBS_POSTFIX})
+						ENDIF(NOT _LIB_HDRONLY)
+					ENDIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+				ENDIF(NOT ${headers_only})

 				# Append to list of mrpt-* lib dependences:
 				LIST(APPEND AUX_DEPS_LIST ${DEP})


Use append for properties as generator expressions sometimes evaluate to empty

--- cmake/Sqlpp-connector-postgresqlConfig.cmake
+++ cmake/Sqlpp-connector-postgresqlConfig.cmake
@@ -30,11 +30,13 @@

 include("${CMAKE_CURRENT_LIST_DIR}/Sqlpp-connector-postgresqlTargets.cmake")

-set_target_properties(Sqlpp::sqlpp11-connector-postgresql PROPERTIES
-  INTERFACE_INCLUDE_DIRECTORIES "${Sqlpp11_INCLUDE_DIRS};${PostgreSQL_INCLUDE_DIRS};$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>"
+set_property(TARGET Sqlpp::sqlpp11-connector-postgresql APPEND PROPERTY
+  INTERFACE_INCLUDE_DIRECTORIES "${Sqlpp11_INCLUDE_DIRS};${PostgreSQL_INCLUDE_DIRS}"
 )

-set_target_properties(Sqlpp::sqlpp11-connector-postgresql-dynamic PROPERTIES
-  INTERFACE_INCLUDE_DIRECTORIES "${Sqlpp11_INCLUDE_DIRS};${PostgreSQL_INCLUDE_DIRS};$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>"
-  INTERFACE_LINK_LIBRARIES "${PostgreSQL_LIBRARIES};$<TARGET_PROPERTY:INTERFACE_LINK_LIBRARIES>"
+set_property(TARGET Sqlpp::sqlpp11-connector-postgresql-dynamic APPEND PROPERTY
+  INTERFACE_INCLUDE_DIRECTORIES "${Sqlpp11_INCLUDE_DIRS};${PostgreSQL_INCLUDE_DIRS}"
 )
+set_property(TARGET Sqlpp::sqlpp11-connector-postgresql-dynamic APPEND PROPERTY
+  INTERFACE_LINK_LIBRARIES "${PostgreSQL_LIBRARIES}"
+)


Remove gdwarf-strict from Clang and Intel

Flag not supported by these compilers, so remove to prevent strict
errors. Clang warns, but we promote warnings to errors by default.

--- Modules/CetCompilerSettings.cmake
+++ Modules/CetCompilerSettings.cmake
@@ -354,11 +354,12 @@
 # .. cmake:variable:: CET_COMPILER_DWARF_STRICT
 #
 #   Option to only emit DWARF debugging info at the level set by
-#   ``CET_COMPILER_DWARF_VERSION``. ``ON`` by default.
+#   ``CET_COMPILER_DWARF_VERSION``. ``ON`` by default, but currently
+#   only supported for GCC compiler.
 #
 # .. todo::
 #
-#   Current flags are GCC dependent. Review them for Clang and Intel
+#   Current flags are GCC dependent.
 #
 option(CET_COMPILER_DWARF_STRICT "only emit DWARF debugging info at defined level" ON)

@@ -383,7 +384,7 @@
 # such as tuning output for gdb, lldb, sce.
 # Dwarf version may also not be needed here.
 foreach(_lang "C" "CXX")
-  if(CMAKE_${_lang}_COMPILER_ID MATCHES "GNU|(Apple)+Clang|Intel")
+  if(CMAKE_${_lang}_COMPILER_ID MATCHES "GNU")
     set(CET_COMPILER_${_lang}_DWARF_FLAGS "-gdwarf-${CET_COMPILER_DWARF_VERSION}")
     if(CET_COMPILER_DWARF_STRICT)
       set(CET_COMPILER_${_lang}_DWARF_FLAGS "${CET_COMPILER_${_lang}_DWARF_FLAGS} -gstrict-dwarf")


[cmake] try to add git info in buildname

--- Numerics/cmake/SiconosCTest.cmake
+++ Numerics/cmake/SiconosCTest.cmake
@@ -6,6 +6,30 @@
 IF(CMAKE_BUILD_TYPE)
   SET(BUILDNAME "${BUILDNAME}-${CMAKE_BUILD_TYPE}")
 ENDIF(CMAKE_BUILD_TYPE)
+
+EXECUTE_PROCESS(COMMAND
+      ${GIT_EXECUTABLE} rev-parse --is-inside-work-tree
+      OUTPUT_VARIABLE SOURCE_IS_GIT_REPO
+      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
+IF(SOURCE_IS_GIT_REPO MATCHES "^true$")
+
+  EXECUTE_PROCESS(COMMAND
+      ${GIT_EXECUTABLE} log -n 1 --pretty=format:%h
+      OUTPUT_VARIABLE SOURCE_ABBREV_GIT_SHA1
+      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
+  SET(BUILDNAME "${BUILDNAME}-${SOURCE_ABBREV_GIT_SHA1}")
+
+  EXECUTE_PROCESS(COMMAND
+      ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
+      OUTPUT_VARIABLE SOURCE_GIT_BRANCH
+      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
+    IF(NOT SOURCE_GIT_BRANCH MATCHES "^master$")
+      SET(BUILDNAME "${BUILDNAME}-${SOURCE_GIT_BRANCH}")
+    ENDIF()
+ENDIF()

 IF(PIPOL_IMAGE)
   SET(BUILDNAME "${BUILDNAME}-${PIPOL_IMAGE_NAME}")
@@ -16,6 +40,7 @@
     SET(BUILDNAME "${BUILDNAME}-CrossCompilingFromLinuxToWindows")
   ENDIF()
 ENDIF(PIPOL_IMAGE)
+

 # Tests coverage (taken from ViSp)


Fix ill-formed filename (---NAME-rebase.cmake) if COMMON_SOURCE_DIR is used

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -151,7 +151,11 @@
       OUTPUT_QUIET ERROR_QUIET WORKING_DIRECTORY "${DIR}")
   endif()

-  file(RELATIVE_PATH __dir ${CMAKE_SOURCE_DIR} ${DIR})
+  if(COMMON_SOURCE_DIR)
+    file(RELATIVE_PATH __dir ${COMMON_SOURCE_DIR} ${DIR})
+  else()
+    file(RELATIVE_PATH __dir ${CMAKE_SOURCE_DIR} ${DIR})
+  endif()
   string(REGEX REPLACE "[:/\\.]" "-" __target "${__dir}")
   if(TARGET ${__target}-rebase)
     return()


Fix case sensitivity

Fix case sensitivity

--- Modules/OpenViewCore/files.cmake
+++ Modules/OpenViewCore/files.cmake
@@ -5,7 +5,7 @@
   QVTKMitkInteractorAdapter.cxx
   QVTKQuickItem.cxx
   QVTKFramebufferObjectRenderer.cxx
-  vtkInternalOpenglRenderWindow.cxx
+  vtkInternalOpenGLRenderWindow.cxx
 )

 set(MOC_H_FILES


ARROW-12503: [C++] Ensure using "lib/" for jemalloc's library directory

Some environments may change the default library directory to
"lib64/".

Closes #10139 from kou/cpp-jemalloc-ensure-libdir

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Neal Richardson <beb59f0141269d2d04e73d0dcc1967b64ba87e13@gmail.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1495,14 +1495,16 @@
   set(ARROW_JEMALLOC_USE_SHARED OFF)
   set(JEMALLOC_PREFIX
       "${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src/jemalloc_ep/dist/")
+  set(JEMALLOC_LIB_DIR "${JEMALLOC_PREFIX}/lib")
   set(JEMALLOC_STATIC_LIB
-      "${JEMALLOC_PREFIX}/lib/libjemalloc_pic${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      "${JEMALLOC_LIB_DIR}/libjemalloc_pic${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(JEMALLOC_CONFIGURE_COMMAND ./configure "AR=${CMAKE_AR}" "CC=${CMAKE_C_COMPILER}")
   if(CMAKE_OSX_SYSROOT)
     list(APPEND JEMALLOC_CONFIGURE_COMMAND "SDKROOT=${CMAKE_OSX_SYSROOT}")
   endif()
   list(APPEND JEMALLOC_CONFIGURE_COMMAND
               "--prefix=${JEMALLOC_PREFIX}"
+              "--libdir=${JEMALLOC_LIB_DIR}"
               "--with-jemalloc-prefix=je_arrow_"
               "--with-private-namespace=je_arrow_private_"
               "--without-export"


Fix #7 wrong ldc2 debug flag

Fix #7 wrong ldc2 debug flag

--- cmake-d/Platform/Linux-ldc2.cmake
+++ cmake-d/Platform/Linux-ldc2.cmake
@@ -54,7 +54,7 @@
 SET (CMAKE_D_FLAGS_INIT "")
 # DMD can only produce 32-bit binaries for now
 SET (CMAKE_D_LINK_FLAGS "")
-SET (CMAKE_D_FLAGS_DEBUG_INIT "-g -debug -L--export-dynamic ${DDOC_FLAGS}")
+SET (CMAKE_D_FLAGS_DEBUG_INIT "-g -d-debug -L--export-dynamic ${DDOC_FLAGS}")
 SET (CMAKE_D_FLAGS_MINSIZEREL_INIT "-Os ${DDOC_FLAGS}")
 SET (CMAKE_D_FLAGS_RELEASE_INIT "-O -release -inline ${DDOC_FLAGS}")
 SET (CMAKE_D_FLAGS_RELWITHDEBINFO_INIT "-O -g -L--export-dynamic ${DDOC_FLAGS}")


Use the _list_of_header_dependencies to form dependency tree.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -375,8 +375,8 @@
   add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name}
                      COMMAND ${command} -f  ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
                                         ${ARG_OPTIONS} ${definitions} ${includedirs} ${headerfiles} ${_linkdef}
-                     IMPLICIT_DEPENDS CXX ${_linkdef} ${fullheaderfiles}
-                     DEPENDS ${fullheaderfiles} ${_linkdef} ${ROOTCINTDEP})
+                     IMPLICIT_DEPENDS CXX ${_linkdef} ${_list_of_header_dependencies}
+                     DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP})
   get_filename_component(dictname ${dictionary} NAME)

   #---roottest compability


rootcling needs to find TStreamerInfo.h

rootcling needs to find TStreamerInfo.h

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -215,6 +215,7 @@
   if(CMAKE_PROJECT_NAME STREQUAL ROOT)
     set(includedirs -I${CMAKE_SOURCE_DIR}
                     -I${CMAKE_CURRENT_SOURCE_DIR}/inc
+                    -I${CMAKE_SOURCE_DIR}/io/io/inc
                     -I${CMAKE_BINARY_DIR}/include)
   else()
     set(includedirs -I${CMAKE_CURRENT_SOURCE_DIR}/inc)


Disable DESTDIR when moving the headers in the build area (fixes ROOT-6803)

--- cmake/scripts/local_install.cmake
+++ cmake/scripts/local_install.cmake
@@ -3,6 +3,7 @@
 #  COMPONENTS - Installation component

 set(COMPONENTS ${COMPONENTS})
+set(ENV{DESTDIR} "")
 foreach(component ${COMPONENTS})
   execute_process(
     COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${PREFIX}


Added country infos 3rd-party

Added country infos 3rd-party

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -157,6 +157,7 @@
 add_target(CLDR cldr)
 add_target(CLOSURE_COMPILER closure-compiler)
 add_target(CLOSURE_LIBRARY closure-library)
+add_target(COUNTRY_INFOS country_infos)
 add_target(CURL_ASIO curl-asio)
 add_target(DIFF_MATCH_PATCH diff_match_patch)
 add_target(DLIB dlib)
@@ -1020,6 +1021,18 @@
 set(CLOSURE_LIBRARY ${CLOSURE_LIBRARY_PREFIX}/lib/closure-library)

 ################################################################################
+# Country Infos.
+add_external_project(
+  ${COUNTRY_INFOS_TARGET}
+  PREFIX ${COUNTRY_INFOS_PREFIX}
+  DOWNLOAD_COMMAND
+      mkdir -p <INSTALL_DIR>/data &&
+      wget -O <INSTALL_DIR>/data/country_infos.txt http://download.geonames.org/export/dump/countryInfo.txt
+  CONFIGURE_COMMAND ${NOP}
+  BUILD_COMMAND ${NOP}
+  INSTALL_COMMAND ${NOP})
+
+################################################################################
 # curl-asio, an asynchronous CURL wrapper based on Boost Asio.
 # See https://github.com/mologie/curl-asio.
 set(CURL_ASIO_C_FLAGS "-I${LIBCURL_PREFIX}/include ${CMAKE_C_FLAGS_WITH_ARCHS}")


deployment generation: fixed bug #425 boost library program_options depends on system

The Boost library program_options depends on (boost_)system.
this commit fixed the problem, that if a orogen project only contains
tasks from other tasks the link-dependendencies were not resolved correctly.
The error exposes on Debian testing ( 'jessie' ).

(see: http://rock.opendfki.de/ticket/425)

--- lib/orogen/templates/config/Deployment.cmake
+++ lib/orogen/templates/config/Deployment.cmake
@@ -16,7 +16,7 @@
     link_directories(${service_discovery_LIBRARY_DIRS})
 endif()

-find_package(Boost REQUIRED COMPONENTS program_options)
+find_package(Boost REQUIRED COMPONENTS system program_options)
 include_directories(${Boost_INCLUDE_DIRS})
 link_directories(${Boost_LIBRARY_DIRS})

@@ -33,7 +33,7 @@
     target_link_libraries(<%= deployer.name %> ${service_discovery_LIBRARIES})
 endif()

-target_link_libraries(<%= deployer.name %> ${Boost_PROGRAM_OPTIONS_LIBRARIES})
+target_link_libraries(<%= deployer.name %> ${Boost_PROGRAM_OPTIONS_LIBRARIES} ${Boost_SYSTEM_LIBRARIES})

 list(APPEND CMAKE_PREFIX_PATH ${OrocosRTT_PREFIX})
 find_package(RTTPlugin COMPONENTS rtt-typekit <%= deployer.rtt_transports.map { |transport_name| "rtt-transport-#{transport_name}" }.join(" ") %>)


enh: Reset also _?<PKG>_* variables (prefixed with uppercase PKG name) [BASIS]

--- CMake/Basis/CommonTools.cmake
+++ CMake/Basis/CommonTools.cmake
@@ -515,9 +515,10 @@
         if (NOT "^${_DEPENDS_${PKG}_DIR}$" STREQUAL "^${DEPENDS_${PKG}_DIR}$")
           set (${PKG}_FOUND FALSE) # need to start a new search
           get_cmake_property (_BFP_VARS VARIABLES)
-          basis_sanitize_for_regex (PKG_RE "${PKG}")
+          basis_sanitize_for_regex (PKG_RE   "${PKG}")
+          basis_sanitize_for_regex (PKG_U_RE "${PKG_U}")
           foreach (_BFP_VAR IN LISTS _BFP_VARS)
-            if (_BFP_VAR MATCHES "^${PKG_RE}[_-]")
+            if (_BFP_VAR MATCHES "^(${PKG_RE}|${PKG_U_RE})[_-]")
               basis_is_cached (_BFP_CACHED ${_BFP_VAR})
               if (_BFP_CACHED)
                 set_property (CACHE ${_BFP_VAR} PROPERTY VALUE "${_BFP_VAR}-NOTFOUND")


Don't think we need to be compatible with WinXP anymore

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -118,11 +118,6 @@
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -stdlib=libc++")
 endif()

-# Windows-specific settings
-if(WIN32)
-	add_definitions( -D_WIN32_WINNT=0x0501 )  # request compatibility with WinXP
-endif(WIN32)
-
 # Linux-specific settings
 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
 	add_definitions( -D_POSIX_C_SOURCE=200809L )  # request POSIX APIs


linking: default to not making warnings fatal errors

Toolchains tend to add new warnings as time goes on, so in the spirit of
keeping VTK as future-proof as possible, don't turn them into warnings
by default. Testing machines and developers can certainly enable it
though.

    http://public.kitware.com/pipermail/vtk-developers/2015-July/032233.html

--- CMake/vtkCompilerExtras.cmake
+++ CMake/vtkCompilerExtras.cmake
@@ -14,12 +14,17 @@

   # If we are compiling on Linux then set some extra linker flags too
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
+    option(VTK_LINKER_FATAL_WARNINGS "Specify if linker warnings must be considered as errors." OFF)
+    mark_as_advanced(VTK_LINKER_FATAL_WARNINGS)
+    if(VTK_LINKER_FATAL_WARNINGS)
+      set(VTK_EXTRA_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings")
+    endif()
     set(CMAKE_SHARED_LINKER_FLAGS
-      "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
+      "${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
     set(CMAKE_MODULE_LINKER_FLAGS
-      "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
+      "${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
     set (CMAKE_EXE_LINKER_FLAGS
-      "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
+      "${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
   endif()

   # Now check if we can use visibility to selectively export symbols


set minimum Boost version to 1.64 (#138)

--- version_config.cmake
+++ version_config.cmake
@@ -22,10 +22,10 @@
 #=========================================================================

 ## BOOST
-set(Boost_VERSION 1.63.0)
-set(Boost_REQUIRED_VERSION 1.36.0)
-set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.zip)
-set(Boost_MD5 3c706b3fc749884ea5510c39474fd732)
+set(Boost_VERSION 1.64.0)
+set(Boost_REQUIRED_VERSION 1.64.0)
+set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.64.0/boost_1_64_0.zip)
+set(Boost_MD5 36093e4018aecd5b0e31e80457ac5fc1)

 ## Armadillo
 set(Armadillo_URL   https://downloads.sourceforge.net/project/arma/armadillo-7.800.2.tar.xz)


consider exported interfaces in ament_target_dependencies (#232)

Signed-off-by: Dirk Thomas <19795c8185177e940eedd30ceb2b716a54a3d5dc@users.noreply.github.com>

--- ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
+++ ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
@@ -45,6 +45,7 @@
     endif()
     set(definitions "")
     set(include_dirs "")
+    set(interfaces "")
     set(libraries "")
     set(link_flags "")
     foreach(package_name ${ARG_UNPARSED_ARGUMENTS})
@@ -53,12 +54,15 @@
       endif()
       list_append_unique(definitions ${${package_name}_DEFINITIONS})
       list_append_unique(include_dirs ${${package_name}_INCLUDE_DIRS})
+      list_append_unique(interfaces ${${package_name}_INTERFACES})
       list(APPEND libraries ${${package_name}_LIBRARIES})
       list_append_unique(link_flags ${${package_name}_LINK_FLAGS})
     endforeach()
     target_compile_definitions(${target}
       PUBLIC ${definitions})
     ament_include_directories_order(ordered_include_dirs ${include_dirs})
+    target_link_libraries(${target}
+      ${TARGET_LINK_LIBRARIES_VISIBILITY} ${interfaces})
     target_include_directories(${target}
       PUBLIC ${ordered_include_dirs})
     ament_libraries_deduplicate(unique_libraries ${libraries})


switched order of libname hints

switched order of libname hints

I assume we should be searching for a lib named freeglut before a lib named glut.  In fact, should we ever be searching for a lib named glut?  Won't that pick up the regular glut rather then the freeglut version?  On windows freeglut builds a lib named "freeglut" perhaps it actually names the lib "glut" on other systems???

--- cmake/Modules/FindFreeGLUT.cmake
+++ cmake/Modules/FindFreeGLUT.cmake
@@ -36,12 +36,12 @@
 # Look for the library.
 FIND_LIBRARY(FREEGLUT_LIBRARY
   NAMES
-    glut
-    glutd
     freeglut
     freeglutd
     freeglut_static
     freeglut_staticd
+    glut
+    glutd
   HINTS
     ${CMAKE_INSTALL_PREFIX}/lib
     $ENV{FREEGLUT_ROOT}/lib


Fix include in OpenGL backport

Fix include in OpenGL backport

Signed-off-by: Dan Bailey <39b6ae1dd30d9ab3cd77a2d084b277520f14c203@ilm.com>

--- cmake/backports/FindOpenGL.cmake
+++ cmake/backports/FindOpenGL.cmake
@@ -196,7 +196,7 @@
 # This deprecated setting is for backward compatibility with CMake1.4
 set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})

-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS})
 unset(_OpenGL_REQUIRED_VARS)


Fix GCC5 linker issue

Fix GCC5 linker issue

--- cmake/multiarch_popcnt_bmi.cmake
+++ cmake/multiarch_popcnt_bmi.cmake
@@ -5,14 +5,20 @@
 set(CMAKE_REQUIRED_INCLUDES "${PROJECT_SOURCE_DIR}/include")

 check_cxx_source_compiles("
-    // We need to ensure this code snippet fails on non x64 CPUs
-    // (and not simply print a compiler warning).
     #if !defined(__x86_64__)
-        Error: not x86-64
+        Error: We need to ensure this code snippet fails on non x64
+               CPUs (and not simply print a compiler warning).
     #endif
     #if defined(__POPCNT__) && defined(__BMI__)
-        Error: multiarch_popcnt_bmi not needed
+        Error: multiarch_popcnt_bmi not needed!
     #endif
+    #if defined(__GNUC__)
+        #if __GNUC__ <= 5
+            Error: The linker does not support function multiversioning
+                   for shared libraries.
+        #endif
+    #endif
+
     #include <primesieve/intrinsics.hpp>
     #include <stdint.h>
     class PrimeGenerator {


Pass MinSizeRel and RelWithDebInfo CMAKE_BUILD_TYPE as Release to conan's build_type

--- conan.cmake
+++ conan.cmake
@@ -48,6 +48,9 @@
         set(_SETTINGS -g cmake)
     endif()
     if(CMAKE_BUILD_TYPE)
+        if(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+            set(CMAKE_BUILD_TYPE "Release")
+        endif()
         set(_SETTINGS ${_SETTINGS} -s build_type=${CMAKE_BUILD_TYPE})
     else()
         message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")


cmake-conan version 0.17

cmake-conan version 0.17

--- conan.cmake
+++ conan.cmake
@@ -33,7 +33,7 @@
 # but it is only necessary on the end-user side. It is not necessary to create conan
 # packages, in fact it shouldn't be use for that. Check the project documentation.

-# version: 0.17.0-dev
+# version: 0.17.0

 include(CMakeParseArguments)


Make remote add a function to protect caller's scope

--- conan.cmake
+++ conan.cmake
@@ -380,16 +380,16 @@
     set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_INSTALL_NO_IMPORTS} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER} ${ARGUMENTS_INSTALL_ARGS})

     string (REPLACE ";" " " _conan_args "${conan_args}")
-    message(STATUS "Conan executing: ${conan_command} ${_conan_args}")
+    message(STATUS "Conan executing: ${CONAN_CMD} ${_conan_args}")

     if(ARGUMENTS_OUTPUT_QUIET)
-        execute_process(COMMAND ${conan_command} ${conan_args}
+        execute_process(COMMAND ${CONAN_CMD} ${conan_args}
                         RESULT_VARIABLE return_code
                         OUTPUT_VARIABLE conan_output
                         ERROR_VARIABLE conan_output
                         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     else()
-        execute_process(COMMAND ${conan_command} ${conan_args}
+        execute_process(COMMAND ${CONAN_CMD} ${conan_args}
                         RESULT_VARIABLE return_code
                         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     endif()
@@ -534,7 +534,7 @@
     endif()
 endmacro()

-macro(conan_add_remote)
+function(conan_add_remote)
     # Adds a remote
     # Arguments URL and NAME are required, INDEX is optional
     # Example usage:
@@ -552,4 +552,4 @@
     message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL})")
     execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
       ${CONAN_INDEX_ARG} -f)
-endmacro()
+endfunction()


Removed unnecessary out commented code

Removed unnecessary out commented code

Signed-off-by: Ralf Floca <fec4a647ab34f54e20bea9a9e3e1c74f13aefc78@dkfz-heidelberg.de>

--- Plugins/org.mitk.gui.qt.flowapplication/manifest_headers.cmake
+++ Plugins/org.mitk.gui.qt.flowapplication/manifest_headers.cmake
@@ -2,4 +2,4 @@
 set(Plugin-Version "1.0.0")
 set(Plugin-Vendor "DKFZ, Medical Image Computing")
 set(Plugin-ContactAddress "http://www.mitk.org")
-set(Require-Plugin org.mitk.core.ext org.mitk.gui.qt.application) # org.mitk.gui.qt.flow.segmentation)
+set(Require-Plugin org.mitk.core.ext org.mitk.gui.qt.application)


Update cub/cmake/cub-header-search.cmake

Co-authored-by: Allison Vacanti <c544874c743b81c4f696916cb362b48909b2b79a@gmail.com>

--- cub/cmake/cub-header-search.cmake
+++ cub/cmake/cub-header-search.cmake
@@ -1,5 +1,4 @@
 # Parse version information from version.h in source tree
- # Source tree
 set(_CUB_VERSION_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../..")
 if(EXISTS "${_CUB_VERSION_INCLUDE_DIR}/cub/version.cuh")
   set(_CUB_VERSION_INCLUDE_DIR "${_CUB_VERSION_INCLUDE_DIR}" CACHE FILEPATH "" FORCE) # Clear old result


Build: Only change undefined `PKG_CONFIG_PATH`

We now only set `PKG_CONFIG_PATH` for OpenSSL on macOS if it was not
defined before. This way users can always be sure that the build system
uses exactly the `PKG_CONFIG_PATH` they set.

--- cmake/Modules/FindLibOpenSSL.cmake
+++ cmake/Modules/FindLibOpenSSL.cmake
@@ -15,10 +15,10 @@

 if (NOT OPENSSL_FOUND)
 	include (FindPkgConfig)
-	if (APPLE)
+	if (APPLE AND NOT DEFINED ENV{PKG_CONFIG_PATH})
 		# Add default pkg-config path of Homebrew’s OpenSSL version
-		set (ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/openssl/lib/pkgconfig")
-	endif (APPLE)
+		set (ENV{PKG_CONFIG_PATH} "/usr/local/opt/openssl/lib/pkgconfig")
+	endif (APPLE AND NOT DEFINED ENV{PKG_CONFIG_PATH})
 	pkg_search_module (OPENSSL QUIET openssl)
 endif ()


refs #5368 make conditions for running helgrind/drd more explicit

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

--- cmake_modules/TokuSetupCTest.cmake
+++ cmake_modules/TokuSetupCTest.cmake
@@ -92,13 +92,12 @@

   include(CMakeDependentOption)
   set(helgrind_drd_depend_conditions "")
-  ## helgrind and drd are bad at dealing with freebsd's pthreads
-  ## implementation, see pkg-message at
-  ## http://www.freebsdports.info/ports/devel/valgrind.html
-  list(APPEND helgrind_drd_depend_conditions "NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD")
-  ## supposedly it's bad on darwin too, don't have a link for that, maybe
-  ## worth re-checking
-  list(APPEND helgrind_drd_depend_conditions "NOT CMAKE_SYSTEM_NAME STREQUAL Darwin")
+  ## Helgrind and DRD explicitly state that they only run with the Linux
+  ## glibc-2.3 NPTL threading implementation [1,2].  If this ever changes
+  ## we can enable helgrind and drd on other systems.
+  ## [1]: http://valgrind.org/docs/manual/hg-manual.html#hg-manual.effective-use
+  ## [2]: http://valgrind.org/docs/manual/drd-manual.html#drd-manual.limitations
+  list(APPEND helgrind_drd_depend_conditions "CMAKE_SYSTEM_NAME STREQUAL Linux")
   ## no point doing it with gcov
   list(APPEND helgrind_drd_depend_conditions "NOT USE_GCOV")
   cmake_dependent_option(RUN_DRD_TESTS "Run some tests under drd." ON


refs #5940 update to jemalloc-3.3.0 in the fractal tree

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

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -4,7 +4,7 @@
 include(ExternalProject)

 ## add jemalloc with an external project
-set(JEMALLOC_SOURCE_DIR "${TOKU_SVNROOT}/jemalloc-3.2.0" CACHE FILEPATH "Where to find jemalloc sources.")
+set(JEMALLOC_SOURCE_DIR "${TOKU_SVNROOT}/jemalloc-3.3.0" CACHE FILEPATH "Where to find jemalloc sources.")
 if (NOT EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
   message(FATAL_ERROR "Can't find jemalloc sources.  Please check them out to ${JEMALLOC_SOURCE_DIR} or modify TOKU_SVNROOT (${TOKU_SVNROOT}) or JEMALLOC_SOURCE_DIR.")
 endif ()


Fix missing GTest Project CMake configuration arguments

Due to an incorrect if conditional no variables in ep_common_vars were
being propagated. This was corrected and it was discovered that the
CMAKE_CACHE_ARGS option requires a type, and UNINITIALIZED is now used
if none is available.

--- CMake/External_GTest.cmake
+++ CMake/External_GTest.cmake
@@ -28,11 +28,16 @@
 #
 function( VariableListToArgs var_list args )
   foreach( var IN LISTS ${var_list} )
-    if( NOT ${var} STREQUAL "" AND DEFINED ${VAR} ) # if variable has been set
+    if( DEFINED ${var} AND NOT ${var} STREQUAL "" ) # if variable has been set
       get_property( type CACHE ${var} PROPERTY TYPE )
+      if (NOT "${type}" STREQUAL "")
+        set(type ":${type}")
+      else()
+        set(type ":UNINITIALIZED")
+      endif()
       set(value ${${var}})
       STRING( REPLACE ";" "$<SEMICOLON>" value "${value}" )
-      list( APPEND _args "-D${var}:${type}=${value}" )
+      list( APPEND _args "-D${var}${type}=${value}" )
     endif()
   endforeach()
   set( ${args} "${_args}" PARENT_SCOPE)


ENH: Using the Apple approach to build the VTK-Python modules for all platforms.  In this approach we build a libvtkKITPythonD.so that is installed somewhere in the linker's path and then create a small libvtkKITPython.so extension module that links to libvtkKITPythonD.so.  This makes it much easier to install and manage VTK-Python builds.  This is because the Python extension modules do not need to link to each other. Many thanks to Brad King for all the hard work needed to get this working.

--- CMake/KitCommonBlock.cmake
+++ CMake/KitCommonBlock.cmake
@@ -36,20 +36,15 @@
 #
 IF (VTK_WRAP_PYTHON)
   VTK_WRAP_PYTHON3(vtk${KIT}Python KitPython_SRCS "${Kit_SRCS}")
-  IF (APPLE)
-    ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
-    ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
-    TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
-                          ${VTK_PYTHON_LIBRARIES})
-    TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
-    IF(NOT VTK_INSTALL_NO_LIBRARIES)
-      INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}PythonD)
-    ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
-  ELSE (APPLE)
-    ADD_LIBRARY(vtk${KIT}Python MODULE ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
-    TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
-  ENDIF(APPLE)
-  SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}Python)
+  ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
+  ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
+  TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
+                        ${VTK_PYTHON_LIBRARIES})
+  TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
+  IF(NOT VTK_INSTALL_NO_LIBRARIES)
+    INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}PythonD)
+  ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
+  SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}PythonD)
   IF(WIN32)
     TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
   ENDIF(WIN32)


Cherry picked compilation fix for isnan in DCMTK

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -28,9 +28,10 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      # specific version post-3.6.2 but before an API change which breaks DCMQI
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/dcmtk_065a4b1f.tar.gz
-      URL_MD5 9362231aba67812deed65b35308de8bd
+      # specific version post-3.6.2 without the API change which breaks DCMQI
+      # 065a4b + 525490
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/dcmtk_2ceb446c.tar.gz
+      URL_MD5 a4802436feffdb135d7d1e1e8917d1fa
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS
          ${ep_common_args}


cmake: FindGSL.cmake avoid reappending

cmake: FindGSL.cmake avoid reappending

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -29,7 +29,7 @@
 #added gsl depends
 #BUG in OpenSuse (missing libgslcblas.so link libgsl.so)
 #if (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)
-if (PC_GSL_LIBRARIES)
+if (PC_GSL_LIBRARIES AND NOT GSL_LIBRARY)
   list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
   foreach (LIB ${PC_GSL_LIBRARIES})
     find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
@@ -37,7 +37,7 @@
     unset(GSL_${LIB} CACHE)
   endforeach(LIB)
   set(GSL_LIBRARY "${GSL_LIBRARY}" CACHE FILEPATH "lib GSL and its deps" FORCE)
-endif (PC_GSL_LIBRARIES)
+endif (PC_GSL_LIBRARIES AND NOT GSL_LIBRARY)
 #endif (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)

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


Update the superbuild ITK version along the 4.11 release branch

Change-Id: I16405d42d561af261644268126ee58dd7583df83

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -45,7 +45,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.11.0 )
+set(ITK_TAG_COMMAND GIT_TAG 9d4a9bdc9403f2bc5107cf4c8a3463d62ff7079e ) # v4.11.0+ on release branch

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )