Fix "FindGLFW3.cmake" to work with MinGW.

--HG--
branch : mingw

--- cmake/FindGLFW3.cmake
+++ cmake/FindGLFW3.cmake
@@ -4,8 +4,12 @@
 include(FindPackageHandleStandardArgs)

 find_path(GLFW3_H_PATH NAMES GLFW/glfw3.h)
-find_library(GLFW3_LIB NAMES glfw3 glfw PATH_SUFFIXES dynamic)
-find_library(GLFW3_LIB_DBG NAMES glfw3_d glfw_d PATH_SUFFIXES dynamic)
+find_library(GLFW3_LIB NAMES glfw3 glfw3dll.a PATH_SUFFIXES dynamic)
+find_library(GLFW3_LIB_DBG NAMES glfw3_d glfw3_ddll.a PATH_SUFFIXES dynamic)
+if (NOT (GLFW3_LIB OR GLFW3_LIB_DBG))
+    find_library(GLFW3_LIB NAMES glfw glfwdll.a PATH_SUFFIXES dynamic)
+    find_library(GLFW3_LIB_DBG NAMES glfw_d glfw_ddll.a PATH_SUFFIXES dynamic)
+endif ()
 mark_as_advanced(GLFW3_H_PATH GLFW3_LIB GLFW3_LIB_DBG)

 if (WIN32)


Fix "FindGLFW3.cmake" to work with MinGW.


Skip Iconv version info on older CMake versions

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -39,20 +39,22 @@
 	endif()
 endif()

-if(Iconv_INCLUDE_DIRS AND EXISTS "${Iconv_INCLUDE_DIRS}/iconv.h")
-	file(STRINGS "${Iconv_INCLUDE_DIRS}/iconv.h" _Iconv_VERSION_DEFINE REGEX "#define[\t ]+_LIBICONV_VERSION[\t ]+0x[0-9A-F][0-9A-F][0-9A-F][0-9A-F].*")
-	string(REGEX REPLACE "#define[\t ]+_LIBICONV_VERSION[\t ]+0x([0-9A-F][0-9A-F])[0-9A-F][0-9A-F].*" "\\1" _Iconv_VERSION_MAJOR_HEXADECIMAL "${_Iconv_VERSION_DEFINE}")
-	string(REGEX REPLACE "#define[\t ]+_LIBICONV_VERSION[\t ]+0x[0-9A-F][0-9A-F]([0-9A-F][0-9A-F]).*" "\\1" _Iconv_VERSION_MINOR_HEXADECIMAL "${_Iconv_VERSION_DEFINE}")
-
-	if(NOT _Iconv_VERSION_MAJOR_HEXADECIMAL STREQUAL "" AND NOT _Iconv_VERSION_MINOR_HEXADECIMAL STREQUAL "")
-		math(EXPR Iconv_VERSION_MAJOR "0x${_Iconv_VERSION_MAJOR_HEXADECIMAL}" OUTPUT_FORMAT DECIMAL)
-		math(EXPR Iconv_VERSION_MINOR "0x${_Iconv_VERSION_MINOR_HEXADECIMAL}" OUTPUT_FORMAT DECIMAL)
-		set(Iconv_VERSION "${Iconv_VERSION_MAJOR}.${Iconv_VERSION_MINOR}")
+if(NOT CMAKE_VERSION VERSION_LESS 3.13)
+	if(Iconv_INCLUDE_DIRS AND EXISTS "${Iconv_INCLUDE_DIRS}/iconv.h")
+		file(STRINGS "${Iconv_INCLUDE_DIRS}/iconv.h" _Iconv_VERSION_DEFINE REGEX "#define[\t ]+_LIBICONV_VERSION[\t ]+0x[0-9A-F][0-9A-F][0-9A-F][0-9A-F].*")
+		string(REGEX REPLACE "#define[\t ]+_LIBICONV_VERSION[\t ]+0x([0-9A-F][0-9A-F])[0-9A-F][0-9A-F].*" "\\1" _Iconv_VERSION_MAJOR_HEXADECIMAL "${_Iconv_VERSION_DEFINE}")
+		string(REGEX REPLACE "#define[\t ]+_LIBICONV_VERSION[\t ]+0x[0-9A-F][0-9A-F]([0-9A-F][0-9A-F]).*" "\\1" _Iconv_VERSION_MINOR_HEXADECIMAL "${_Iconv_VERSION_DEFINE}")
+
+		if(NOT _Iconv_VERSION_MAJOR_HEXADECIMAL STREQUAL "" AND NOT _Iconv_VERSION_MINOR_HEXADECIMAL STREQUAL "")
+			math(EXPR Iconv_VERSION_MAJOR "0x${_Iconv_VERSION_MAJOR_HEXADECIMAL}" OUTPUT_FORMAT DECIMAL)
+			math(EXPR Iconv_VERSION_MINOR "0x${_Iconv_VERSION_MINOR_HEXADECIMAL}" OUTPUT_FORMAT DECIMAL)
+			set(Iconv_VERSION "${Iconv_VERSION_MAJOR}.${Iconv_VERSION_MINOR}")
+		endif()
+
+		unset(_Iconv_VERSION_DEFINE)
+		unset(_Iconv_VERSION_MAJOR_HEXADECIMAL)
+		unset(_Iconv_VERSION_MINOR_HEXADECIMAL)
 	endif()
-
-	unset(_Iconv_VERSION_DEFINE)
-	unset(_Iconv_VERSION_MAJOR_HEXADECIMAL)
-	unset(_Iconv_VERSION_MINOR_HEXADECIMAL)
 endif()

 if(Iconv_IS_BUILT_IN)


removing png++cmake png++INCLUDE_DIRS rewrite to nullstr

--- cmake/Findpng++.cmake
+++ cmake/Findpng++.cmake
@@ -54,10 +54,8 @@
 set(png++_INCLUDE_DIRS ${png++_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
 set(png++_LIBRARIES ${PNG_LIBRARIES})

+MESSAGE(STATUS "pngpp libs: ${png++_LIBRARIES}")
+
 find_package_handle_standard_args(png++ DEFAULT_MSG
     png++_INCLUDE_DIR)

-if(png++_FOUND)
-    set(png++_INCLUDE_DIRS ${png++_INCLUDE_DIR})
-    set(png++_LIBRARIES ${png++_LIBRARY})
-endif()


Create a local copy of the legacy MSI, then upload

rclone cannot copy one file to a different remote name

--- cmake/WinUpload.cmake
+++ cmake/WinUpload.cmake
@@ -2,7 +2,8 @@
   add_custom_target(packageupload
     COMMAND rclone --transfers=1 --checkers=2 mkdir ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
     COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
-    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}/${MSI_OUTPUT_LEGACY}
+    COMMAND copy ${MSI_OUTPUT} ${MSI_OUTPUT_LEGACY}
+    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT_LEGACY} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
   )
 else(MSI_OUTPUT_LEGACY)
   add_custom_target(packageupload


build: profile is not a sanitizer

build: profile is not a sanitizer

There was an invalid entry in the sanitizer list, remove it.  This has no effect
on the building, just removes the definition of a cached variable.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -408,7 +408,7 @@
   set(OS_NAME "${CMAKE_SYSTEM_NAME}")
 endif()

-set(ALL_SANITIZERS asan;dfsan;msan;profile;tsan;safestack;cfi;esan;scudo)
+set(ALL_SANITIZERS asan;dfsan;msan;tsan;safestack;cfi;esan;scudo)
 set(COMPILER_RT_SANITIZERS_TO_BUILD ${ALL_SANITIZERS} CACHE STRING
     "sanitizers to build if supported on the target (all;${ALL_SANITIZERS})")
 list_replace(COMPILER_RT_SANITIZERS_TO_BUILD all "${ALL_SANITIZERS}")


specify group, display name and description of the documentation component

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@3110 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -69,6 +69,9 @@
     # add documentation
     if(BUILD_documentation)
         set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} doc")
+        set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_DOC_GROUP \"PCL\")\n")
+        set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_DOC_DISPLAY_NAME \"Documentation\")\n")
+        set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_DOC_DESCRIPTION \"API documentation and tutorials\")\n")
     endif(BUILD_documentation)
     # add PCLConfig
     set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} pclconfig")


CMake: Report an error if there is an unknown .cpp file in a source
directory.

This is useful in case someone who works with the config&make build
system forgot to add a file to its CMakeLists.txt. Instead of
obtaining undefined references at link time, cmake will complain at
configure time on the first build after a svn update.

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

--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -22,6 +22,7 @@

 function(llvm_process_sources OUT_VAR)
   set( sources ${ARGN} )
+  llvm_check_source_file_list( ${sources} )
   # Create file dependencies on the tablegenned files, if any.  Seems
   # that this is not strictly needed, as dependencies of the .cpp
   # sources on the tablegenned .inc files are detected and handled,
@@ -37,3 +38,17 @@
   endif()
   set( ${OUT_VAR} ${sources} PARENT_SCOPE )
 endfunction(llvm_process_sources)
+
+
+function(llvm_check_source_file_list)
+  set(listed ${ARGN})
+  file(GLOB globbed *.cpp)
+  foreach(g ${globbed})
+    get_filename_component(fn ${g} NAME)
+    list(FIND listed ${fn} idx)
+    if( idx LESS 0 )
+      message(SEND_ERROR "Found unknown source file ${g}
+Please update ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt\n")
+    endif()
+  endforeach()
+endfunction(llvm_check_source_file_list)


cmake tweak for linux

cmake tweak for linux

--- lib/cython/cmake/Modules/UseCython.cmake
+++ lib/cython/cmake/Modules/UseCython.cmake
@@ -244,7 +244,11 @@
   python_add_module( ${_name} ${generated_file} ${other_module_sources} )
   if( ${_dynamic_lookup} )
     message( STATUS "Not linking target ${_name} against libpython" )
-    set_target_properties( ${_name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+    if(APPLE)
+      set_target_properties( ${_name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+    elseif(UNIX)
+      set_target_properties( ${_name} PROPERTIES LINK_FLAGS "-undefined,dynamic_lookup")
+    endif()
   else()
     target_link_libraries( ${_name} ${PYTHON_LIBRARIES} )
   endif()


pkgconfig doesn't exist for Windows, no need to look for it in this case.

svn path=/trunk/kdesupport/strigi/; revision=1139523

--- libstreamanalyzer/cmake/FindFFMPEG.cmake
+++ libstreamanalyzer/cmake/FindFFMPEG.cmake
@@ -19,11 +19,10 @@
   set(FFMPEG_FOUND TRUE)
 else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIRS)

-  include(FindPkgConfig)
-
   # use pkg-config to get the directories and then use these values
   # in the FIND_PATH() and FIND_LIBRARY() calls
   if (NOT WIN32)
+    include(FindPkgConfig)
     pkg_check_modules(_AVCODEC libavcodec)
     pkg_check_modules(_AVFORMAT libavformat)
     pkg_check_modules(_AVUTIL libavutil)


Fix linux tests cmake config

Fix linux tests cmake config

--- toolchains/linux.tests.cmake
+++ toolchains/linux.tests.cmake
@@ -3,8 +3,8 @@

 add_definitions(-DPLATFORM_LINUX)

-# include headers for homebrew-installed libraries
-include_directories(/usr/local/include)
+# load glfw
+include(${PROJECT_SOURCE_DIR}/toolchains/add_glfw.cmake)

 # load core library
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)
@@ -15,9 +15,6 @@
   ${PROJECT_SOURCE_DIR}/linux/src/platform_linux.cpp
   ${PROJECT_SOURCE_DIR}/linux/src/urlWorker.cpp
 )
-
-find_package(PkgConfig REQUIRED)
-pkg_search_module(GLFW REQUIRED glfw3)

 file(GLOB TEST_SOURCES tests/unit/*.cpp)

@@ -30,8 +27,7 @@

     add_executable(${EXECUTABLE_NAME} ${_src_file_path} ${LINUX_PLATFORM_SRC})

-    target_link_libraries(${EXECUTABLE_NAME} -lcurl)
-    target_link_libraries(${EXECUTABLE_NAME} core ${GLFW_STATIC_LIBRARIES})
+    target_link_libraries(${EXECUTABLE_NAME} core -lcurl ${GLFW_LIBRARIES})
 endforeach(_src_file_path ${TEST_SOURCES})

 # copy resources in order to make tests with resources dependency


apply warning flags only to Connext generated code

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -43,6 +43,7 @@

 set(_output_path "${CMAKE_CURRENT_BINARY_DIR}/rosidl_typesupport_connext_cpp/${PROJECT_NAME}")
 set(_generated_msg_files "")
+set(_generated_external_msg_files "")
 set(_generated_srv_files "")
 foreach(_idl_file ${rosidl_generate_interfaces_IDL_FILES})
   get_filename_component(_extension "${_idl_file}" EXT)
@@ -51,12 +52,12 @@
   if("${_extension} " STREQUAL ".msg ")
     get_filename_component(_parent_folder "${_idl_file}" DIRECTORY)
     get_filename_component(_parent_folder "${_parent_folder}" NAME)
-    list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_.h")
-    list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_.cxx")
-    list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Plugin.h")
-    list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Plugin.cxx")
-    list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Support.h")
-    list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Support.cxx")
+    list(APPEND _generated_external_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_.h")
+    list(APPEND _generated_external_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_.cxx")
+    list(APPEND _generated_external_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Plugin.h")
+    list(APPEND _generated_external_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Plugin.cxx")
+    list(APPEND _generated_external_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Support.h")
+    list(APPEND _generated_external_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_msg_name}_Support.cxx")
     list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_header_name}__type_support.hpp")
     list(APPEND _generated_msg_files "${_output_path}/${_parent_folder}/dds_connext/${_header_name}__type_support.cpp")
   elseif("${_extension} " STREQUAL ".srv ")
@@ -86,7 +87,7 @@
   endif()
   if(NOT "${_opensplice_compile_flags} " STREQUAL " ")
     string(REPLACE ";" " " _connext_compile_flags "${_connext_compile_flags}")
-    foreach(_gen_file ${_generated_msg_files} ${_generated_srv_files})
+    foreach(_gen_file ${_generated_external_msg_files})
       set_source_files_properties("${_gen_file}"
         PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     endforeach()
@@ -113,7 +114,7 @@
 endforeach()

 add_custom_command(
-  OUTPUT ${_generated_msg_files} ${_generated_srv_files}
+  OUTPUT ${_generated_msg_files} ${_generated_external_msg_files} ${_generated_srv_files}
   COMMAND ${PYTHON_EXECUTABLE} ${rosidl_typesupport_connext_cpp_BIN}
   --pkg-name ${PROJECT_NAME}
   --ros-interface-files ${rosidl_generate_interfaces_IDL_FILES}
@@ -143,7 +144,7 @@

 link_directories(${Connext_LIBRARY_DIRS})
 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED
-  ${_generated_msg_files} ${_generated_srv_files})
+  ${_generated_msg_files} ${_generated_external_msg_files} ${_generated_srv_files})
 if(WIN32)
   target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PRIVATE "ROSIDL_BUILDING_DLL")
@@ -188,9 +189,9 @@
   ${rosidl_generate_interfaces_TARGET}${_target_suffix}
 )

-if(NOT "${_generated_msg_files} " STREQUAL " ")
+if(NOT "${_generated_msg_files}${_generated_external_msg_files} " STREQUAL " ")
   install(
-    FILES ${_generated_msg_files}
+    FILES ${_generated_msg_files} ${_generated_external_msg_files}
     DESTINATION "include/${PROJECT_NAME}/msg/dds_connext"
   )
 endif()


Fix copy-paste error in template_test.cmake

--- template/template_test.cmake
+++ template/template_test.cmake
@@ -31,7 +31,7 @@
 set_ifndef(CTEST_WITH_LCOV              FALSE)

 if(CTEST_MODEL MATCHES "Nightly")
-    if(CTEST_GCOVR_EXECUTABLE AND EXISTS "${CTEST_MEMORYCHECK_COMMAND}")
+    if(CTEST_GCOVR_EXECUTABLE AND EXISTS "${CTEST_GCOVR_EXECUTABLE}")
         set_ifndef(CTEST_WITH_GCOVR     TRUE)
     endif()
     if(CTEST_MEMORYCHECK_COMMAND AND EXISTS "${CTEST_MEMORYCHECK_COMMAND}")


Add yosemite world as SITL target for gazebo

This commit adds yosemite world as a SITL target for gazebo

--- platforms/posix/cmake/sitl_target.cmake
+++ platforms/posix/cmake/sitl_target.cmake
@@ -97,7 +97,7 @@
 	standard_vtol tailsitter tiltrotor
 	rover r1_rover boat cloudship
 	uuv_hippocampus uuv_bluerov2_heavy)
-set(worlds none empty baylands ksql_airport mcmillan_airfield sonoma_raceway warehouse windy)
+set(worlds none empty baylands ksql_airport mcmillan_airfield sonoma_raceway warehouse windy yosemite)
 set(all_posix_vmd_make_targets)
 foreach(viewer ${viewers})
 	foreach(debugger ${debuggers})


Bump to bring in updated toolbar icons

Bump to bring in updated toolbar icons

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "992e4cf60f52254989952ff86d9e8366127f615e")
+  set(_paraview_revision "faf73d45cd343ac57ea39d847c11c194bdcbc68b")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


:lipstick: better status message for looked up packages

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -143,11 +143,15 @@
             message(STATUS ${msg})
         endif()
     else()
-        if(NOT ${package}_QUIET AND NOT ${package}_DOWNLOAD_BY_DEFAULT)
-            message(STATUS "Will attempt to download and install ${package}")
-        elseif(NOT ${package}_QUIET)
-            message(STATUS "Will download, build,"
-               " and install a local version of ${package}")
+        if(NOT ${package}_QUIET)
+            if(${package}_FOUND)
+                message(STATUS "${package} is built locally as an external project")
+            elseif(NOT ${package}_DOWNLOAD_BY_DEFAULT)
+                message(STATUS "Will attempt to download and install ${package}")
+            else()
+                message(STATUS "Will download, build,"
+                   " and install a local version of ${package}")
+            endif()
         endif()
         set(CURRENT_LOOKUP_DIRECTORY "${${package}_LOOKUP_RECIPE_DIR}")
         include(${${package}_LOOKUP_RECIPE_FILE})


FindIWYU: Also search for iwyu too

FindIWYU: Also search for iwyu too

--- FindIWYU.cmake
+++ FindIWYU.cmake
@@ -26,7 +26,22 @@

     # Set-up the directory tree of the include-what-you-use installation
     set (BIN_SUBDIR bin)
-    set (IWYU_EXECUTABLE_NAME include-what-you-use)
+    set (IWYU_EXECUTABLE_NAMES include-what-you-use iwyu)
+
+    foreach (IWYU_EXECUTABLE_NAME ${IWYU_EXECUTABLE_NAMES})
+
+        psq_find_tool_executable (${IWYU_EXECUTABLE_NAME}
+                                  IWYU_EXECUTABLE
+                                  PATHS ${IWYU_SEARCH_PATHS}
+                                  PATH_SUFFIXES "${BIN_SUBDIR}")
+
+        if (IWYU_EXECUTABLE)
+
+            break ()
+
+        endif ()
+
+    endforeach ()

     psq_find_tool_executable (${IWYU_EXECUTABLE_NAME}
                               IWYU_EXECUTABLE


fix windows/cmake bug where env variables may yield escape sequences

--- glow-config.cmake
+++ glow-config.cmake
@@ -16,10 +16,13 @@
 	get_filename_component(GLOW_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
 endif()

+file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ENVPROGRAMFILES)
+file(TO_CMAKE_PATH "$ENV{GLOW_DIR}" ENVGLOW_DIR)
+
 find_path(GLOW_INCLUDE_DIR glow/glow.h
-	$ENV{GLOW_DIR}/include
+	${ENVGLOW_DIR}/include
 	${GLOW_DIR}/include
-	$ENV{PROGRAMFILES}/GLOW/include
+	${ENVPROGRAMFILES}/glow/include
 	/usr/include
 	/usr/local/include
 	/sw/include
@@ -32,8 +35,9 @@
 	${GLOW_DIR}/build/Debug
 	${GLOW_DIR}/build-release
 	${GLOW_DIR}/build-debug
-	$ENV{GLOW_DIR}/lib
+	${ENVGLOW_DIR}/lib
 	${GLOW_DIR}/lib
+	${ENVPROGRAMFILES}/glow/lib
 	/usr/lib
 	/usr/local/lib
 	/sw/lib


Fix handling of multi-value options.

Fix handling of multi-value options.

Don't pass variables to represent lists when we can use multi-value
options to do that and fix handling of the COMMENT option, which was
in the wrong section and never got parsed.

--- CPPCheck.cmake
+++ CPPCheck.cmake
@@ -30,29 +30,33 @@

 endfunction (_validate_cppcheck)

-function (_cppcheck_add_checks_to_target SOURCES_VAR
-                                         TARGET
-                                         WHEN
-                                         OPTIONS_VAR)
-
-    set (ADD_CHECKS_OPTIONS COMMENT)
-    cmake_parse_arguments (ADD_CHECKS_TO_TARGET "${COMMENT}" "" "")
+function (_cppcheck_add_checks_to_target TARGET
+                                         WHEN)
+
+    set (ADD_CHECKS_SINGLEVAR_OPTIONS COMMENT)
+    set (ADD_CHECKS_MULTIVAR_OPTIONS SOURCES OPTIONS)
+
+    cmake_parse_arguments (ADD_CHECKS_TO_TARGET
+                           ""
+                           "${ADD_CHECKS_SINGLEVAR_OPTIONS}"
+                           "${ADD_CHECKS_MULTIVAR_OPTIONS}"
+                           ${ARGN})

     set (EXTRA_ARGUMENTS_TO_ADD_CUSTOM_COMMAND)
-    if (ADD_CHECKS_OPTIONS_COMMENT)
+    if (ADD_CHECKS_TO_TARGET_COMMENT)

         set (EXTRA_ARGUMENTS_TO_ADD_CUSTOM_COMMAND
-             COMMENT ${ADD_CHECKS_OPTIONS})
-
-    endif (ADD_CHECKS_OPTIONS_COMMENT)
+             COMMENT ${ADD_CHECKS_TO_TARGET_COMMENT})
+
+    endif (ADD_CHECKS_TO_TARGET_COMMENT)

     add_custom_command (TARGET ${TARGET}
                         ${WHEN}
                         COMMAND
                         ${CPPCHECK_EXECUTABLE}
                         ARGS
-                        ${${OPTIONS_VAR}}
-                        ${${SOURCES_VAR}}
+                        ${ADD_CHECKS_TO_TARGET_OPTIONS}
+                        ${ADD_CHECKS_TO_TARGET_SOURCES}
                         ${EXTRA_ARGUMENTS_TO_ADD_CUSTOM_COMMAND})

 endfunction (_cppcheck_add_checks_to_target)
@@ -175,10 +179,10 @@

     endif (ADD_GLOBAL_UNUSED_FUNCTION_CHECK_INCLUDES)

-    _cppcheck_add_checks_to_target (_cppcheck_unused_function_sources
-                                    ${TARGET}
+    _cppcheck_add_checks_to_target (${TARGET}
                                     PRE_BUILD
-                                    OPTIONS
+                                    SOURCES ${_cppcheck_unused_function_sources}
+                                    OPTIONS ${OPTIONS}
                                     COMMENT "Checking for unused functions")

 endfunction (cppcheck_add_global_unused_function_check_to_target)
@@ -188,14 +192,14 @@
 # Run CPPCheck on the sources as specified in SOURCES, reporting any
 # warnings or errors on stderr.
 #
-# SOURCES_VAR : A variable containing a list of sources
 # TARGET : Target to attach checks to
+# [Mandatory] SOURCES : A list of sources to scan.
 # [Optional] COMMENT : Text to print when checking sources
 # [Optional] WARN_ONLY : Don't error out, just warn on potential problems.
 # [Optional] NO_CHECK_STYLE : Don't check for style issues
 # [Optional] CHECK_UNUSED : Check for unused functions
 # [Optional] INCLUDES : Include directories to search.
-function (cppcheck_sources SOURCES_VAR TARGET)
+function (cppcheck_sources TARGET)

     _validate_cppcheck (CPPCHECK_AVAILABLE)

@@ -205,12 +209,20 @@

     endif (NOT CPPCHECK_AVAILABLE)

-    set (OPTIONAL_OPTIONS WARN_ONLY NO_CHECK_STYLE NO_CHECK_UNUSED COMMENT)
-    set (MULTIVALUE_OPTIONS INCLUDES)
+    set (OPTIONAL_OPTIONS WARN_ONLY NO_CHECK_STYLE NO_CHECK_UNUSED)
+    set (SINGLEVALUE_OPTIONS COMMENT)
+    set (MULTIVALUE_OPTIONS INCLUDES SOURCES)
     cmake_parse_arguments (CPPCHECK
                            "${OPTIONAL_OPTIONS}"
-                           ""
-                           "${MULTIVALUE_OPTIONS}" ${ARGN})
+                           "${SINGLEVALUE_OPTIONS}"
+                           "${MULTIVALUE_OPTIONS}"
+                           ${ARGN})
+
+    if (NOT CPPCHECK_SOURCES)
+
+        message (FATAL_ERROR "SOURCES must be set when using cppcheck_sources")
+
+    endif (NOT CPPCHECK_SOURCES)

     set (CPPCHECK_OPTIONS
          ${CPPCHECK_COMMON_OPTIONS}
@@ -253,16 +265,14 @@

     endif (CPPCHECK_COMMENT)

-    _cppcheck_add_checks_to_target (${SOURCES_VAR}
-                                    ${TARGET}
+    _cppcheck_add_checks_to_target (${TARGET}
                                     PRE_LINK
-                                    CPPCHECK_OPTIONS
+                                    SOURCES ${CPPCHECK_SOURCES}
+                                    OPTIONS ${CPPCHECK_OPTIONS}
                                     ${EXTRA_ARGS})

-    cppcheck_add_to_global_unused_function_check (SOURCES
-                                                  ${${SOURCES_VAR}}
-                                                  INCLUDES
-                                                  ${CPPCHECK_INCLUDES})
+    cppcheck_add_to_global_unused_function_check (SOURCES ${CPPCHECK_SOURCES}
+                                                  INCLUDES ${CPPCHECK_INCLUDES})

 endfunction (cppcheck_sources)

@@ -302,10 +312,9 @@
                            "${MULTIVALUE_OPTIONS}"
                            ${ARGN})

-    cppcheck_sources (_files_to_check
-                      ${TARGET}
-                      INCLUDES
-                      ${CPPCHECK_INCLUDES}
+    cppcheck_sources (${TARGET}
+                      INCLUDES ${CPPCHECK_INCLUDES}
+                      SOURCES ${_files_to_check}
                       ${ARGN})

 endfunction (cppcheck_target_sources)


cflags

cflags

--- cmake/CFlags.cmake
+++ cmake/CFlags.cmake
@@ -1,6 +1,9 @@
 set(CMAKE_CXX_FLAGS "-std=c++0x -ftemplate-depth=500 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -pedantic ${CMAKE_CXX_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS "-lprotobuf ${CMAKE_EXE_LINKER_FLAGS}")
+set(CMAKE_C_FLAGS "-std=c11 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -pedantic ${CMAKE_C_FLAGS}")

+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lprotobuf -lz -lpthread")
+
+set(CMAKE_C_FLAGS_DEBUG "-g -fsanitize=address -fsanitize=memory -Qunused-arguments ${CMAKE_CXX_FLAGS_DEBUG}")
 set(CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=address -fsanitize=memory -Qunused-arguments ${CMAKE_CXX_FLAGS_DEBUG}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fsanitize=address -fsanitize=memory ${CMAKE_EXE_LINKER_FLAGS_DEBUG}")


Set compiler warning level to 4 and set warnings as errors flag for Visual Studio.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -20,7 +20,7 @@
   if(${_INDEX} GREATER -1)
     set(_COMPILER_WAE -Wall -W -Werror)
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    set(_COMPILER_WAE /W3)
+    set(_COMPILER_WAE /W4 /WX)
   endif()

   if(_COMPILER_WAE)


Update common.cmake

Update common.cmake

Fixing indentation.

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

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

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

     set_target_properties(${_TARGET} PROPERTIES
       COMPILE_OPTIONS "${_COMPILE_OPTIONS}"


updated if condition to match latest gflags changes

--- cmake/gflags.cmake
+++ cmake/gflags.cmake
@@ -26,7 +26,7 @@
 elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package")
   # Use "CONFIG" as there is no built-in cmake module for gflags.
   find_package(gflags REQUIRED CONFIG)
-  if(TARGET gflags)
+  if(TARGET gflags::gflags)
     set(_gRPC_GFLAGS_LIBRARIES gflags::gflags)
     set(_gRPC_GFLAGS_INCLUDE_DIR ${GFLAGS_INCLUDE_DIR})
   endif()


Sort defines alphabetically in littlefs-sources.cmake

--- source/FileSystem/littlefs/external/littlefs-sources.cmake
+++ source/FileSystem/littlefs/external/littlefs-sources.cmake
@@ -1,7 +1,7 @@
 #
 # file: littlefs-sources.cmake
 #
-# author: Copyright (C) 2018 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
+# author: Copyright (C) 2018-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
 #
 # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 # distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -15,7 +15,7 @@
 		C_STANDARD_REQUIRED ON)
 target_compile_definitions(littlefs PUBLIC
 		LFS_NO_DEBUG
-		LFS_NO_WARN
-		LFS_NO_ERROR)
+		LFS_NO_ERROR
+		LFS_NO_WARN)
 target_include_directories(littlefs INTERFACE
 		${CMAKE_CURRENT_LIST_DIR}/littlefs)


Turned on Werror

Turned on Werror

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -182,7 +182,7 @@
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE   "${CMAKE_C_FLAGS_RELEASE}")
 		string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}")
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS_DEBUG}")
-		add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter")
+		add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter -Wno-error=switch")

 		# we support non-IEEE 754 fpus so can make no guarentees about error
 		add_flags_cxx("-ffast-math")


And one more

And one more

--- Superbuild/TnyExternal.cmake
+++ Superbuild/TnyExternal.cmake
@@ -36,6 +36,7 @@
   INSTALL_COMMAND ""
   CMAKE_CACHE_ARGS
     -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
+	-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
 )

 ExternalProject_Get_Property(Tny_external BINARY_DIR)


Fix path name.

Fix path name.

--- template-config.cmake
+++ template-config.cmake
@@ -41,7 +41,7 @@
         ${ENV_TEMPLATE_DIR}/source/${LIB_NAME}/include
         ${TEMPLATE_DIR}/include
         ${TEMPLATE_DIR}/source/${LIB_NAME}/include
-        ${ENV_PROGRAMFILES}/digvis/include
+        ${ENV_PROGRAMFILES}/template/include
         /usr/include
         /usr/local/include
         /sw/include


littlefs: set_target_properties() -> target_compile_features()

--- source/FileSystem/littlefs/external/littlefs-sources.cmake
+++ source/FileSystem/littlefs/external/littlefs-sources.cmake
@@ -10,9 +10,14 @@
 add_library(littlefs STATIC
 		${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs_util.c
 		${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs.c)
-set_target_properties(littlefs PROPERTIES
-		C_STANDARD 99
-		C_STANDARD_REQUIRED ON)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.8)
+	target_compile_features(littlefs PUBLIC
+			c_std_99)
+else()
+	# equivalent of C99 for earlier versions of CMake
+	target_compile_features(littlefs PUBLIC
+			c_restrict)
+endif()
 target_compile_definitions(littlefs PUBLIC
 		LFS_NO_DEBUG
 		LFS_NO_ERROR


Fix for systems with partial installs of MLK?? not sure why I see this on MacOS

--- hoomd/extern/dfftlib/FindLocalFFT.cmake
+++ hoomd/extern/dfftlib/FindLocalFFT.cmake
@@ -2,7 +2,7 @@
 find_package(ACML)

 option(ENABLE_HOST "CPU FFT support" ON)
-if (MKL_LIBRARIES)
+if (MKL_LIBRARIES AND MKL_INCLUDE_DIR)
     set(LOCAL_FFT_LIB LOCAL_LIB_MKL)
     set(LOCAL_FFT_LIBRARIES "${MKL_LIBRARIES}")
     include_directories(${MKL_INCLUDE_DIR})
@@ -18,4 +18,3 @@
     set(LOCAL_FFT_LIB LOCAL_LIB_BARE)
     message(STATUS "No CPU FFT library found, falling back on SLOW internal radix-2 FFT")
 endif()
-


Do not import .assbin.

Do not import .assbin.

--- sigma_setup.cmake
+++ sigma_setup.cmake
@@ -90,7 +90,7 @@
             ".dxf" ".hmp" ".md2" ".md3" ".md5" ".mdc" ".mdl" ".nff" ".ply"
             ".stl" ".x" ".obj" ".opengex" ".smd" ".lwo" ".lxo" ".lws" ".ter"
             ".ac3d" ".ms3d" ".cob" ".q3bsp" ".xgl" ".csm" ".bvh" ".b3d" ".ndo"
-            ".q3d" ".assbin" ".gltf" ".3mf")
+            ".q3d" ".gltf" ".3mf")
        set(RESOURCE_EXTENSIONS ${TEXTURE_EXTENSIONS} ${CUBEMAP_EXTENSIONS}
            ${SHADER_EXTENSIONS} ${EFFECT_EXTENSIONS} ${MATERIAL_EXTENSIONS}
            ${MODEL_EXTENSIONS})


Enable C++11

Enable C++11

--- ros_middleware_interface/cmake/configure_ros_middleware_library.cmake
+++ ros_middleware_interface/cmake/configure_ros_middleware_library.cmake
@@ -25,7 +25,7 @@
       # (this is already the default on Windows)
       set_target_properties(ros_middleware_opensplice_cpp
         PROPERTIES
-          COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden"
+          COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden -std=c++11"
       )
     endif()
     if(WIN32)
@@ -34,4 +34,4 @@
       set_target_properties(ros_middleware_opensplice_cpp
         PROPERTIES COMPILE_FLAGS "-DRMW_BUILDING_DLL")
     endif()
-endmacro()+endmacro()


Fix HSA build.

Fix HSA build.

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -91,7 +91,7 @@

-#ifdef ENABLE_HSA
+#ifdef BUILD_HSA

 #cmakedefine HAVE_HSA_EXT_AMD_H


Nagios Monitoring 6.0.0-rc6 Release Candidate 6

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_SEQUENCE 6 )
 ###


Split off 8.0.54

Split off 8.0.54

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 53 )
+set ( HPCC_POINT 55 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.8.36

Split off 7.8.36

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 35 )
+set ( HPCC_POINT 37 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Fixed cap'n-proto compile error in MSVC.

--- external/External.cmake
+++ external/External.cmake
@@ -88,6 +88,7 @@
             CMAKE_ARGS "-DCMAKE_MACOSX_RPATH=${CMAKE_MACOSX_RPATH}"
                        "-DBUILD_SHARED_LIBS=OFF"
                        "-DBUILD_TESTING=OFF"
+                       "-DCAPNP_LITE=ON"
                        "-DCMAKE_C_FLAGS=${EXT_C_FLAGS}"
                        "-DCMAKE_CXX_FLAGS=${EXT_CXX_FLAGS}"
                        "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"


tools: Add UF2 identificator for ESP32-C2 and ESP32-H2

The IDs were submitted in https://github.com/microsoft/uf2/pull/59.

--- tools/cmake/uf2.cmake
+++ tools/cmake/uf2.cmake
@@ -11,9 +11,9 @@
     elseif("${target}" STREQUAL "esp32s3")
         set(uf2_family_id "0xc47e5767")
     elseif("${target}" STREQUAL "esp32h2")
-        set(uf2_family_id "0xd42ba06c") # ESP32H2-TODO: IDF-3487
+        set(uf2_family_id "0x332726f6")
     elseif("${target}" STREQUAL "esp8684")
-        set(uf2_family_id "0xd42ba06c") # TODO: IDF-4257
+        set(uf2_family_id "0x2b88d29c")
     elseif("${target}" STREQUAL "linux")
         return()
     else()


Allow more recent Boost.  We don't really use boost::program_options, so
remove it.

git-svn-id: 93cebb81a0f5cc00f31a7ad40d16024532691b70@233 a3683778-fedd-11de-87c3-653bb6514e15

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -120,14 +120,14 @@

 message (STATUS "BOOST_ROOT ${BOOST_ROOT}")

-set(Boost_ADDITIONAL_VERSIONS "1.38" "1.38.0" "1.37" "1.37.0" "1.34.1" "1_34_1")
+set (Boost_ADDITIONAL_VERSIONS "1.40" "1.39" "1.38" "1.38.0" "1.37" "1.37.0" "1.34.1" "1_34_1")
 #set (Boost_USE_STATIC_LIBS   ON)
 set (Boost_USE_MULTITHREADED ON)
 if (BOOST_CUSTOM)
     set (Boost_FOUND true)
 else ()
     find_package (Boost 1.34 REQUIRED
-                  COMPONENTS filesystem program_options regex system thread
+                  COMPONENTS filesystem regex system thread
                  )
 endif ()


devenv: Add -lpthread flag when builing getstacksize.c

--- cmake/fw.cmake
+++ cmake/fw.cmake
@@ -79,6 +79,7 @@
     compile_result_unused
     "${CMAKE_BINARY_DIR}"
     "${CMAKE_BINARY_DIR}/getstacksize.c"
+    CMAKE_FLAGS -DCMAKE_EXE_LINKER_FLAGS=-lpthread
     RUN_OUTPUT_VARIABLE stack_size)
   set(${out} ${stack_size} PARENT_SCOPE)
 endfunction()


removed FindCLHEP.cmake (LCIO no longer (optionally) depends on CLHEP)

--- FindCLHEP.cmake
+++ FindCLHEP.cmake
@@ -1,182 +0,0 @@
-###########################################
-# cmake module for finding CLHEP
-#
-# to use CLHEP versions > 2.0.3.0/1.9.3.0
-# you also have to define HepPDT_HOME
-#
-# @author Jan Engels, DESY
-###########################################
-
-SET( CLHEP_FOUND FALSE )
-MARK_AS_ADVANCED( CLHEP_FOUND )
-# is HepPDT a part of CLHEP? (CLHEP versions < 2.0.3.0/1.9.3.0)
-SET( CLHEP_includes_HepPDT TRUE )
-MARK_AS_ADVANCED( CLHEP_includes_HepPDT )
-
-# CLHEP include dir
-SET( CLHEP_INCLUDE_DIR CLHEP_INCLUDE_DIR-NOTFOUND )
-MARK_AS_ADVANCED( CLHEP_INCLUDE_DIR )
-
-FIND_PATH( CLHEP_INCLUDE_DIR
-    NAMES CLHEP/Vector/ThreeVector.h
-    PATHS ${CLHEP_HOME}
-    PATH_SUFFIXES include
-    NO_DEFAULT_PATH )
-
-IF( NOT CLHEP_INCLUDE_DIR AND NOT CLHEP_FIND_QUIETLY )
-    MESSAGE( STATUS "Check for CLHEP: ${CLHEP_HOME}"
-            " -- failed to find CLHEP include directory!!" )
-ENDIF()
-
-# HepPDT - include dir
-SET( HepPDT_INCLUDE_DIR HepPDT_INCLUDE_DIR-NOTFOUND )
-MARK_AS_ADVANCED( HepPDT_INCLUDE_DIR )
-
-# first look if it is available under CLHEP_HOME
-FIND_PATH( HepPDT_INCLUDE_DIR
-    NAMES CLHEP/HepPDT/ParticleID.hh
-    PATHS ${CLHEP_HOME}
-    PATH_SUFFIXES include
-    NO_DEFAULT_PATH )
-
-# if not, look in HepPDT_HOME
-IF( NOT HepPDT_INCLUDE_DIR )
-    # HepPDT was not found in CLHEP
-    SET( CLHEP_includes_HepPDT FALSE )
-
-    IF( DEFINED HepPDT_HOME OR DEFINED ENV{HEPPDT} )
-
-        # write HepPDT_HOME to cache
-        IF( NOT DEFINED HepPDT_HOME )
-            SET( HepPDT_HOME "$ENV{HEPPDT}" )
-        ENDIF()
-        SET( HepPDT_HOME "${HepPDT_HOME}" CACHE PATH "Path to HepPDT" FORCE )
-
-        # find include dir
-        FIND_PATH( HepPDT_INCLUDE_DIR
-            NAMES HepPDT/ParticleID.hh
-            PATHS ${HepPDT_HOME}
-            PATH_SUFFIXES include
-            NO_DEFAULT_PATH )
-
-        # create symlink in CLHEP for HepPDT include dir
-        #IF( HepPDT_INCLUDE_DIR )
-        #    IF( NOT CLHEP_FIND_QUIETLY )
-        #        MESSAGE( STATUS "Creating symlink for HepPDT include directory in ${CLHEP_HOME}/include/CLHEP..." )
-        #    ENDIF()
-        #    EXEC_PROGRAM( "${CMAKE_COMMAND}" "${CLHEP_HOME}/include/CLHEP"
-        #        ARGS -E create_symlink "${HepPDT_HOME}/include/HepPDT" "HepPDT"
-        #        OUTPUT_VARIABLE out_tmp
-        #        RETURN_VALUE out_ret )
-        #    # check if everything went ok
-        #    IF( NOT out_ret )
-        #        IF( NOT CLHEP_FIND_QUIETLY )
-        #            MESSAGE( STATUS "Link created successfully..." )
-        #        ENDIF()
-        #    ELSE()
-        #        IF( NOT CLHEP_FIND_QUIETLY )
-        #            MESSAGE( STATUS "Error creating HepPDT symlink in ${CLHEP_HOME}/include/CLHEP!!" )
-        #            MESSAGE( STATUS "${out_tmp}" )
-        #        ENDIF()
-        #        # ensure that detection fails
-        #        SET( HepPDT_INCLUDE_DIR HepPDT_INCLUDE_DIR-NOTFOUND )
-        #    ENDIF()
-        #ELSE()
-        #    IF( NOT CLHEP_FIND_QUIETLY )
-        #        MESSAGE( STATUS "Check for HepPDT: failed to find include dir!!" )
-        #    ENDIF()
-        #    # ensure that detection fails
-        #    SET( HepPDT_INCLUDE_DIR HepPDT_INCLUDE_DIR-NOTFOUND )
-        #ENDIF()
-    ELSE()
-        IF( NOT CLHEP_FIND_QUIETLY )
-            MESSAGE( STATUS "Check for HepPDT: HepPDT_HOME not set!!" )
-            MESSAGE( STATUS "Please define it with cmake -DHepPDT_HOME=<Path_to_HepPDT>" )
-        ENDIF()
-    ENDIF()
-ENDIF()
-
-# HepPDT - libraries
-SET( HepPDT_FINDLIB_FAILED FALSE )
-MARK_AS_ADVANCED( HepPDT_FINDLIB_FAILED )
-
-IF( NOT CLHEP_includes_HepPDT )
-    SET( HepPDT_LIB_NAMES HepPDT HepPID )
-    MARK_AS_ADVANCED( HepPDT_LIB_NAMES )
-
-    FOREACH( libname ${HepPDT_LIB_NAMES} )
-
-        SET( HepPDT_LIB_${libname} HepPDT_LIB_${libname}-NOTFOUND )
-        MARK_AS_ADVANCED( HepPDT_LIB_${libname} )
-
-        #SET( CLHEP_libname )
-        #SET( CLHEP_libfile )
-        #FILE( GLOB CLHEP_liblist "${CLHEP_HOME}/lib/libCLHEP-${libname}*" )
-        #LIST( LENGTH CLHEP_liblist CLHEP_liblist_len )
-        #IF( NOT CLHEP_liblist_len EQUAL 0 )
-        #    LIST( GET CLHEP_liblist 0 CLHEP_libfile )
-        #    # extract libname from path+libfile
-        #    STRING( REGEX REPLACE ".*\\/lib(CLHEP-.*)\\..*$" "\\1" CLHEP_libname "${CLHEP_libfile}")
-        #ENDIF()
-        #
-        #FIND_LIBRARY( HepPDT_LIB_${libname}
-        #    NAMES ${CLHEP_libname} ${libname}
-        #    PATHS ${CLHEP_HOME} ${HepPDT_HOME}
-        #    PATH_SUFFIXES lib
-        #    NO_DEFAULT_PATH )
-
-        FIND_LIBRARY( HepPDT_LIB_${libname}
-            NAMES ${libname}
-            PATHS ${HepPDT_HOME}
-            PATH_SUFFIXES lib
-            NO_DEFAULT_PATH )
-
-        IF( NOT HepPDT_LIB_${libname} )
-            SET( HepPDT_FINDLIB_FAILED TRUE )
-            IF( NOT CLHEP_FIND_QUIETLY )
-                MESSAGE( STATUS "Check for HepPDT -- failed to find ${libname} library!!" )
-            ENDIF()
-        ELSE()
-            LIST( APPEND HepPDT_LIBS ${HepPDT_LIB_${libname}} )
-        ENDIF()
-    ENDFOREACH()
-ENDIF()
-
-# CLHEP library
-SET( CLHEP_LIB CLHEP_LIB-NOTFOUND )
-MARK_AS_ADVANCED( CLHEP_LIB )
-
-FIND_LIBRARY( CLHEP_LIB
-    NAMES CLHEP
-    PATHS ${CLHEP_HOME}
-    PATH_SUFFIXES lib
-    NO_DEFAULT_PATH )
-
-IF( NOT CLHEP_LIB AND NOT CLHEP_FIND_QUIETLY )
-    MESSAGE( STATUS "Check for CLHEP: ${CLHEP_HOME}"
-            " -- failed to find CLHEP library!!" )
-ENDIF()
-
-# set variables and display results
-IF( CLHEP_INCLUDE_DIR AND CLHEP_LIB AND HepPDT_INCLUDE_DIR AND NOT
-        HepPDT_FINDLIB_FAILED )
-
-    SET( CLHEP_FOUND TRUE )
-    IF( CLHEP_includes_HepPDT )
-        SET( CLHEP_LIBRARIES ${CLHEP_LIB} )
-        SET( CLHEP_INCLUDE_DIRS ${CLHEP_INCLUDE_DIR} )
-        SET( CLHEP_DEFINITIONS "-DUSE_CLHEP" )
-    ELSE()
-        SET( CLHEP_LIBRARIES ${CLHEP_LIB} ${HepPDT_LIBS} )
-        SET( CLHEP_INCLUDE_DIRS ${CLHEP_INCLUDE_DIR} ${HepPDT_INCLUDE_DIR} )
-        SET( CLHEP_DEFINITIONS "-DUSE_CLHEP -DUSE_SEPARATE_HEPPDT" )
-    ENDIF()
-    MARK_AS_ADVANCED( CLHEP_INCLUDE_DIRS CLHEP_LIBRARIES CLHEP_DEFINITIONS )
-    MESSAGE( STATUS "Check for CLHEP: ${CLHEP_HOME} -- works" )
-ELSE()
-    IF( CLHEP_FIND_REQUIRED )
-        MESSAGE( FATAL_ERROR "Check for CLHEP: ${CLHEP_HOME} -- failed!!" )
-    ENDIF()
-    MESSAGE( STATUS "Check for CLHEP: ${CLHEP_HOME}"
-            " -- failed!! will skip this package..." )
-ENDIF()


CMake: Cortex-A: Use MBED_CPU_CORE to set -mcpu

As we're moving away from the use of CMAKE_SYSTEM_PROCESSOR, use
MBED_CPU_CORE instead. They differ in cases, but both GCC and Arm
toolchains support case-insensitive CPU names.

--- tools/cmake/cores/Cortex-A.cmake
+++ tools/cmake/cores/Cortex-A.cmake
@@ -8,13 +8,13 @@
         "-mfpu=vfpv3"
         "-mfloat-abi=softfp"
         "-mno-unaligned-access"
-        "-mcpu=${CMAKE_SYSTEM_PROCESSOR}"
+        "-mcpu=${MBED_CPU_CORE}"
     )
 elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
     list(APPEND common_options
         "-mfpu=vfpv3"
         "-mfloat-abi=hard"
-        "-mcpu=${CMAKE_SYSTEM_PROCESSOR}"
+        "-mcpu=${MBED_CPU_CORE}"
     )
 endif()


Use more robust git-archive for PPA upload

--- UploadPPA.cmake
+++ UploadPPA.cmake
@@ -16,9 +16,7 @@
   message(STATUS "dput not found")
   return()
 endif()
-if(CMAKE_BINARY_DIR MATCHES "${CMAKE_SOURCE_DIR}/")
-  message(STATUS "Build directory ${CMAKE_BINARY_DIR} is a sub-directory of "
-    "source directory ${CMAKE_SOURCE_DIR}, no PPA upload")
+if(NOT GIT_EXECUTABLE)
   return()
 endif()

@@ -59,9 +57,14 @@
   file(REMOVE_RECURSE ${DEBIAN_BASE_DIR})
   set(DEBIAN_SOURCE_DIR
     ${DEBIAN_BASE_DIR}/${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-source)
-  execute_process(COMMAND ${CMAKE_COMMAND} -E
-    copy_directory ${CMAKE_SOURCE_DIR} ${DEBIAN_SOURCE_DIR}
-    )
+  execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DEBIAN_BASE_DIR})
+  execute_process(
+    COMMAND ${GIT_EXECUTABLE} archive --worktree-attributes
+    --prefix ${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-source/
+    -o ${DEBIAN_BASE_DIR}.tar HEAD
+    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+  execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${DEBIAN_BASE_DIR}.tar
+    WORKING_DIRECTORY ${DEBIAN_BASE_DIR})

   file(MAKE_DIRECTORY ${DEBIAN_SOURCE_DIR}/debian)
   file(REMOVE_RECURSE ${DEBIAN_SOURCE_DIR}/.git)


fix XP_CMAKE_REPO_INSYNC issue with partial submodules

* some projects only use certain libraries from a submodule - so they're in the repo, but parsed by cmake
* provide new xpSourceDirIgnore cmake function that takes a list of subdirectories to ignore
* global XP_SOURCE_DIR_IGNORE list - all files in these directories are removed from repoFiles list

see issue https://github.com/smanders/externpro/issues/177

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -988,6 +988,7 @@
   endif()
   if(NOT ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
     set(masterSrcList "${masterSrcList}" PARENT_SCOPE)
+    set(XP_SOURCE_DIR_IGNORE ${XP_SOURCE_DIR_IGNORE} PARENT_SCOPE)
   else()
     list(REMOVE_DUPLICATES masterSrcList)
     if(EXISTS ${CMAKE_SOURCE_DIR}/.git)
@@ -1001,7 +1002,10 @@
         xpGlobFiles(repoFiles ${item} *)
         xpGlobFiles(fmtFiles ${item} *.c *.h *.cpp *.hpp *.cu *.cuh *.proto)
       endforeach()
-      list(REMOVE_ITEM repoFiles ${masterSrcList})
+      foreach(item ${XP_SOURCE_DIR_IGNORE})
+        xpGlobFiles(ignoreFiles ${item} *)
+      endforeach()
+      list(REMOVE_ITEM repoFiles ${masterSrcList} ${ignoreFiles})
       if(DEFINED XP_CMAKE_REPO_INSYNC)
         option(XP_CMAKE_REPO_INSYNC "cmake error if repo and cmake are not in sync" ${XP_CMAKE_REPO_INSYNC})
       else()
@@ -1062,6 +1066,12 @@
     endif()
   endif()
 endmacro()
+
+function(xpSourceDirIgnore)
+  xpListPrependToAll(ignoredDirs ${CMAKE_CURRENT_SOURCE_DIR} ${ARGN})
+  list(APPEND XP_SOURCE_DIR_IGNORE ${ignoredDirs})
+  set(XP_SOURCE_DIR_IGNORE ${XP_SOURCE_DIR_IGNORE} PARENT_SCOPE)
+endfunction()

 function(xpTouchFiles fileList)
   option(XP_TOUCH_FILES "touch files with known warnings" OFF)


[CMake] Move PUGIXML_LIBRARY outside PUGIXML_INCLUDE_DIR check. (#1216)

(CMake seems to cache PUGIXML_INCLUDE_DIR and so on a reconfigure PUGIXML_LIBRARY may never be set).

Co-authored-by: rzulak <d27ddfa63b70969f9fff7cfc6cd7cac81ea247a4@imageworks.com>

--- src/cmake/modules/FindPugiXML.cmake
+++ src/cmake/modules/FindPugiXML.cmake
@@ -24,11 +24,10 @@
                PATHS ${OpenImageIO_ROOT}/include/OpenImageIO
                      ${OPENIMAGEIO_INCLUDES}
                PATH_SUFFIXES OpenImageIO)
-    if (PUGIXML_INCLUDE_DIR)
-        set (PUGIXML_LIBRARY ${OPENIMAGEIO_LIBRARIES})
-    endif ()
 endif ()
-
+if (NOT PUGIXML_LIBRARY AND (OPENIMAGEIO_INCLUDES OR OpenImageIO_ROOT) AND PUGIXML_INCLUDE_DIR)
+    set (PUGIXML_LIBRARY ${OPENIMAGEIO_LIBRARIES})
+endif ()

 # Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
 include (FindPackageHandleStandardArgs)


SVN_SILENT made messages (.desktop file)

--- vlc/vlc.desktop.cmake
+++ vlc/vlc.desktop.cmake
@@ -10,6 +10,7 @@
 InitialPreference=10

 Name=VLC
+Name[bs]=VLC
 Name[ca]=VLC
 Name[ca@valencia]=VLC
 Name[cs]=VLC


Update "add_python_extension" function adding "ALWAYS_BUILTIN" option.

If this is set the module will always be compiled statically into
libpython.

--- cmake/Extensions.cmake
+++ cmake/Extensions.cmake
@@ -25,6 +25,8 @@
 # BUILTIN:     if this is set the module will be compiled statically into
 #              libpython by default.  The user can still override by setting
 #              BUILTIN_[extension_name]=OFF.
+# ALWAYS_BUILTIN: if this is set the module will always be compiled statically into
+#                 libpython.
 #
 # Two user-settable options are created for each extension added:
 # ENABLE_[extension_name]   defaults to ON.  If set to OFF the extension will
@@ -40,7 +42,7 @@
 # options ENABLE_FOO and BUILTIN_FOO.

 function(add_python_extension name)
-    set(options BUILTIN)
+    set(options BUILTIN ALWAYS_BUILTIN)
     set(oneValueArgs)
     set(multiValueArgs REQUIRES SOURCES DEFINITIONS LIBRARIES INCLUDEDIRS)
     cmake_parse_arguments(ADD_PYTHON_EXTENSION
@@ -81,32 +83,36 @@
         endif(NOT (${list_dep}))
     endforeach(dep)

-    # Add options that the extention is either external to libpython or
-    # builtin.  These will be marked as advanced unless different from default
-    # values
-    if(NOT ADD_PYTHON_EXTENSION_BUILTIN)
-        set(ADD_PYTHON_EXTENSION_BUILTIN ${BUILD_EXTENSIONS_AS_BUILTIN})
-    endif()
-    cmake_dependent_option(
-        BUILTIN_${upper_name}
-        "If this is set the \"${name}\" extension will be compiled in to libpython"
-        ${ADD_PYTHON_EXTENSION_BUILTIN}
-        "NOT missing_deps"
-        OFF
-    )
-    if(NOT missing_deps)
-        if((BUILTIN_${upper_name} AND BUILD_EXTENSIONS_AS_BUILTIN)
-            OR (NOT BUILTIN_${upper_name} AND NOT BUILD_EXTENSIONS_AS_BUILTIN))
-            mark_as_advanced(FORCE BUILTIN_${upper_name})
-        else()
-            mark_as_advanced(CLEAR BUILTIN_${upper_name})
-        endif()
-    endif()
-
-    # XXX _ctypes_test and _testcapi should always be shared
-    if(${name} STREQUAL "_ctypes_test" OR ${name} STREQUAL "_testcapi")
-        unset(BUILTIN_${upper_name} CACHE)
-        set(BUILTIN_${upper_name} 0)
+    if(NOT ADD_PYTHON_EXTENSION_ALWAYS_BUILTIN)
+        # Add options that the extention is either external to libpython or
+        # builtin.  These will be marked as advanced unless different from default
+        # values
+        if(NOT ADD_PYTHON_EXTENSION_BUILTIN)
+            set(ADD_PYTHON_EXTENSION_BUILTIN ${BUILD_EXTENSIONS_AS_BUILTIN})
+        endif()
+        cmake_dependent_option(
+            BUILTIN_${upper_name}
+            "If this is set the \"${name}\" extension will be compiled in to libpython"
+            ${ADD_PYTHON_EXTENSION_BUILTIN}
+            "NOT missing_deps"
+            OFF
+        )
+        if(NOT missing_deps)
+            if((BUILTIN_${upper_name} AND BUILD_EXTENSIONS_AS_BUILTIN)
+                OR (NOT BUILTIN_${upper_name} AND NOT BUILD_EXTENSIONS_AS_BUILTIN))
+                mark_as_advanced(FORCE BUILTIN_${upper_name})
+            else()
+                mark_as_advanced(CLEAR BUILTIN_${upper_name})
+            endif()
+        endif()
+
+        # XXX _ctypes_test and _testcapi should always be shared
+        if(${name} STREQUAL "_ctypes_test" OR ${name} STREQUAL "_testcapi")
+            unset(BUILTIN_${upper_name} CACHE)
+            set(BUILTIN_${upper_name} 0)
+        endif()
+    else()
+        set(BUILTIN_${upper_name} 1)
     endif()

     # If any dependencies were missing don't include this extension.


cmake: Link MPI when GASNet was itself linked to MPI. Fixes #251.

When GASNet is compiled with --enable-mpi-compat any dependent
applications must also be compiled with MPI. Currently it is
impossible to determine this so work around the issue by checking if
GASNet was itself linked via an MPI compiler wrapper.

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -154,7 +154,7 @@
     endif()
     mark_as_advanced(GASNet_${L}_LIBRARY)
   endforeach()
-  if(COMPONENT_NAME MATCHES "^mpi-.*" AND NOT (_GASNet_LD STREQUAL CMAKE_C_COMPILER))
+  if(_GASNet_LD MATCHES "^(/.*/)?mpi[^/]*" AND NOT (_GASNet_LD STREQUAL CMAKE_C_COMPILER))
     set(MPI_C_COMPILER ${_GASNet_LD})
     find_package(MPI REQUIRED COMPONENTS C)
     list(APPEND COMPONENT_DEPS ${MPI_C_LIBRARIES})


FindOpenCL cmake update, maybe fix for jenkins compile as a linking error remain.

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -1,67 +1,144 @@
-# FindOpenCL - attempts to locate the OpenCL library.
+#.rst:
+# FindOpenCL
+# ----------
 #
-# This module defines the following variables:
-#   OPENCL_FOUND        - Module was found
-#   OPENCL_INCLUDE_DIR - Directory where cl.h is located
-#   OPENCL_LIBRARIES    - Libraries necessary to compile
+# Try to find OpenCL
 #
-# Note: Untested with Linux and AMD combinations
+# Once done this will define::
+#
+#   OPENCL_FOUND          - True if OpenCL was found
+#   OPENCL_INCLUDE_DIRS   - include directories for OpenCL
+#   OPENCL_LIBRARIES      - link against this library to use OpenCL
+#   OPENCL_VERSION_STRING - Highest supported OpenCL version (eg. 1.2)
+#   OPENCL_VERSION_MAJOR  - The major version of the OpenCL implementation
+#   OPENCL_VERSION_MINOR  - The minor version of the OpenCL implementation
+#
+# The module will also define two cache variables::
+#
+#   OPENCL_INCLUDE_DIR    - the OpenCL include directory
+#   OPENCL_LIBRARY        - the path to the OpenCL library
+#
+
 #=============================================================================
-FIND_PACKAGE( PackageHandleStandardArgs )
+# Copyright 2014 Matthaeus G. Chajdas
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)

+function(_FIND_OPENCL_VERSION)
+  include(CheckSymbolExists)
+  include(CMakePushCheckState)
+  set(CMAKE_REQUIRED_QUIET ${OPENCL_FIND_QUIETLY})

-# NVIDIA uses environment variable CUDA_PATH
-# AMD uses AMDAPPSDKROOT according to http://developer.amd.com/download/AMD_APP_SDK_Installation_Notes.pdf
-# INTEL uses environment variable INTELOCLSDKROOT
+  CMAKE_PUSH_CHECK_STATE()
+  foreach(VERSION "2_0" "1_2" "1_1" "1_0")
+    set(CMAKE_REQUIRED_INCLUDES "${OPENCL_INCLUDE_DIR}")

-SET(OPENCL_LIB_SEARCH_DIR ${OPENCL_LIB_SEARCH_DIR}
-    "$ENV{LD_LIBRARY_PATH}") # Linux
+    if(APPLE)
+      # prefer the header from the Framework
+      set(OSX_OPENCL_HEADER "${OPENCL_INCLUDE_DIR}/Headers/cl.h")
+      if(EXISTS "${OPENCL_INCLUDE_DIR}/OpenCL/cl.h")
+        set(OSX_OPENCL_HEADER "${OPENCL_INCLUDE_DIR}/OpenCL/cl.h")
+      endif()

-# Find out build target
-IF(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32-bit
-    SET(OPENCL_LIB_SEARCH_DIR ${OPENCL_LIB_SEARCH_DIR}
-        "$ENV{AMDAPPSDKROOT}/lib/x86"      # AMD
-        "$ENV{CUDA_PATH}/lib/Win32"      # NVIDIA
-        "$ENV{INTELOCLSDKROOT}/lib/x86") # INTEL
-ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4) # 64-bit
-    SET(OPENCL_LIB_SEARCH_DIR ${OPENCL_LIB_SEARCH_DIR}
-        "$ENV{AMDAPPSDKROOT}/lib/x86_64" # AMD
-        "$ENV{CUDA_PATH}/lib/x64"        # NVIDIA
-        "$ENV{INTELOCLSDKROOT}/lib/x64") # INTEL
-ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      CHECK_SYMBOL_EXISTS(
+        CL_VERSION_${VERSION}
+        ${OSX_OPENCL_HEADER}
+        OPENCL_VERSION_${VERSION})
+    else()
+      CHECK_SYMBOL_EXISTS(
+        CL_VERSION_${VERSION}
+        "${OPENCL_INCLUDE_DIR}/CL/cl.h"
+        OPENCL_VERSION_${VERSION})
+    endif()

-FIND_LIBRARY(OPENCL_LIBRARIES
-             NAMES OpenCL
-             PATHS ${OPENCL_LIB_SEARCH_DIR}
-             DOC "OpenCL library")
-
-# Take care of custom install locations
-GET_FILENAME_COMPONENT(OPENCL_LIB_SEARCH_DIR ${OPENCL_LIBRARIES} PATH)
-# Optional search path
-GET_FILENAME_COMPONENT(OPENCL_INCLUDE_SEARCH_DIR ${OPENCL_LIB_SEARCH_DIR}/../../include ABSOLUTE)
+    if(OPENCL_VERSION_${VERSION})
+      string(REPLACE "_" "." VERSION "${VERSION}")
+      set(OPENCL_VERSION_STRING ${VERSION} PARENT_SCOPE)
+      string(REGEX MATCHALL "[0-9]+" version_components "${VERSION}")
+      list(GET version_components 0 major_version)
+      list(GET version_components 1 minor_version)
+      set(OPENCL_VERSION_MAJOR ${major_version} PARENT_SCOPE)
+      set(OPENCL_VERSION_MINOR ${minor_version} PARENT_SCOPE)
+      break()
+    endif()
+  endforeach()
+  CMAKE_POP_CHECK_STATE()
+endfunction()

-FIND_PATH(OPENCL_INCLUDE_DIR
-          NAMES CL/cl.h OpenCL/cl.h
-          PATHS
-                ${OPENCL_INCLUDE_SEARCH_DIR}
-                "$ENV{AMDAPPSDKROOT}/include"   # AMD
-                "$ENV{CUDA_PATH}/include"       # NVIDIA
-                "$ENV{INTELOCLSDKROOT}/include" # INTEL
-                "/usr/local/cuda/include"       # Linux NVIDIA
-                "/opt/AMDAPP/include"           # Linux AMD
-          DOC "Include directory for OpenCL")
-
-
-# Add quotes to paths to make sure it works on windows (at least Visual Studio complains)
-#string(REPLACE " " "\\ " OPENCL_LIBRARIES ${OPENCL_LIBRARIES})
-
+find_path(OPENCL_INCLUDE_DIR
+  NAMES
+    CL/cl.h OpenCL/cl.h
+  PATHS
+    ENV "PROGRAMFILES(X86)"
+    ENV AMDAPPSDKROOT
+    ENV INTELOCLSDKROOT
+    ENV NVSDKCOMPUTE_ROOT
+    ENV CUDA_PATH
+    ENV ATISTREAMSDKROOT
+  PATH_SUFFIXES
+    include
+    OpenCL/common/inc
+    "AMD APP/include")

+_FIND_OPENCL_VERSION()

-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS( OpenCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIR )
+if(WIN32)
+  if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+    find_library(OPENCL_LIBRARY
+      NAMES OpenCL
+      PATHS
+        ENV "PROGRAMFILES(X86)"
+        ENV AMDAPPSDKROOT
+        ENV INTELOCLSDKROOT
+        ENV CUDA_PATH
+        ENV NVSDKCOMPUTE_ROOT
+        ENV ATISTREAMSDKROOT
+      PATH_SUFFIXES
+        "AMD APP/lib/x86"
+        lib/x86
+        lib/Win32
+        OpenCL/common/lib/Win32)
+  elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+    find_library(OPENCL_LIBRARY
+      NAMES OpenCL
+      PATHS
+        ENV "PROGRAMFILES(X86)"
+        ENV AMDAPPSDKROOT
+        ENV INTELOCLSDKROOT
+        ENV CUDA_PATH
+        ENV NVSDKCOMPUTE_ROOT
+        ENV ATISTREAMSDKROOT
+      PATH_SUFFIXES
+        "AMD APP/lib/x86_64"
+        lib/x86_64
+        lib/x64
+        OpenCL/common/lib/x64)
+  endif()
+else()
+  find_library(OPENCL_LIBRARY
+    NAMES OpenCL)
+endif()

-MARK_AS_ADVANCED(CLEAR
+set(OPENCL_LIBRARIES ${OPENCL_LIBRARY})
+set(OPENCL_INCLUDE_DIRS ${OPENCL_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+# Ubuntu 12.04 / Travis CI have an old version of CMake that doesn't
+# support "FOUND_VAR OPENCL_FOUND". This could, in principle, be added
+# at a later date.
+find_package_handle_standard_args(
+  OpenCL
+  REQUIRED_VARS OPENCL_LIBRARY OPENCL_INCLUDE_DIR
+  VERSION_VAR OPENCL_VERSION_STRING)
+
+mark_as_advanced(
   OPENCL_INCLUDE_DIR
-  OPENCL_LIBRARIES
-)
-
+  OPENCL_LIBRARY)


r10575/sofa : ADD: Windows compilation time greatly decreased using /MP flag

Former-commit-id: 8adb4e18b78c8b9047c9d86bba484e934a26d1f2

--- cmake/buildFlags.cmake
+++ cmake/buildFlags.cmake
@@ -42,8 +42,12 @@
 endif()

 set(compilerDefines ${GLOBAL_COMPILER_DEFINES})
+
+# windows specific
 if(WIN32)
     list(APPEND compilerDefines "UNICODE")
+
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
 endif()

 # NDEBUG preprocessor macro


Windows compile : make compilation fail on "uninitialized variable used" warning C4700

This is a genuine error, and will crash debug buildd in runtime checks if not fixed.
it is better to fail during compile.

--- cmake/os/Windows.cmake
+++ cmake/os/Windows.cmake
@@ -115,8 +115,8 @@
   ENDIF()

   #TODO: update the code and remove the disabled warnings
-  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099")
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700")

   IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
     # _WIN64 is defined by the compiler itself.


cmake: Increment my commit count :/ (oops).

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -41,7 +41,7 @@

 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(DEBUG ON)
-    add_declarations(-DDEBUG=1)
+    add_definitions(-DDEBUG=1)
     set(NDEBUG OFF)
 endif(CMAKE_BUILD_TYPE STREQUAL "Debug")


apparently case sensitive

apparently case sensitive

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -2,8 +2,8 @@
 ## Then modify the CMakeLists.txt file in the root directory of your
 ## project to incorporate the testing dashboard.
 ## # The following are required to uses Dart and the Cdash dashboard
-ENABLE_TESTING()
-INCLUDE(CTest)
+enable_testing()
+include(CTest)
 set(CTEST_PROJECT_NAME "phonon")
 set(CTEST_NIGHTLY_START_TIME "20:00:00 CET")


Fixed resource recompiling.

Fixed resource recompiling.

--- sigma_setup.cmake
+++ sigma_setup.cmake
@@ -39,7 +39,7 @@
         add_custom_target(${target}-resources ALL DEPENDS  ${resource_files})

         add_custom_command(
-            OUTPUT ${resource_files}
+            TARGET ${target}-resources
             COMMAND ${SCOMPILER} ARGS --output="${CMAKE_BINARY_DIR}/data" ${include_args} ${resource_files}
             WORKING_DIRECTORY ${package_PACKAGE_ROOT}
             DEPENDS always_rebuild


iOS: Guard a media dir variable update since we want to preserve the relative paths on iOS

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -21,7 +21,7 @@
   set(OGRE_SAMPLES_DIR_DBG ".")
   set(OGRE_CFG_INSTALL_PATH "bin")
 elseif (APPLE)
-  set(OGRE_MEDIA_PATH "media")
+  set(OGRE_MEDIA_PATH "Media")
   if(OGRE_BUILD_PLATFORM_IPHONE)
     set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
     set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
@@ -142,8 +142,11 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
-set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
-set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
+if (NOT OGRE_BUILD_PLATFORM_IPHONE)
+  set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
+  set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
+endif ()
+
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


Don't set OCE's RPATHs if it isn't required.

--- adm/cmake/BuildToolkit.cmake
+++ adm/cmake/BuildToolkit.cmake
@@ -273,10 +273,14 @@

 if(TOOLKIT_IS_PRIVATE)
 	set(TOOLKIT_INSTALL_LIB_DIR ${OCE_INSTALL_PACKAGE_LIB_DIR})
-	set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_PACKAGE_LIB_DIR_RPATH};${OCE_INSTALL_LIB_DIR_RPATH}")
+	if(TOOLKIT_DEPENDS)
+		set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_PACKAGE_LIB_DIR_RPATH};${OCE_INSTALL_LIB_DIR_RPATH}")
+	endif(TOOLKIT_DEPENDS)
 else(TOOLKIT_IS_PRIVATE)
 	set(TOOLKIT_INSTALL_LIB_DIR ${OCE_INSTALL_LIB_DIR})
-	set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_LIB_DIR_RPATH}")
+	if(TOOLKIT_DEPENDS)
+		set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_LIB_DIR_RPATH}")
+	endif(TOOLKIT_DEPENDS)
 endif(TOOLKIT_IS_PRIVATE)

 install(FILES ${TOOLKIT_HEADER_FILES}


fixed: missing targets

fixed: missing targets

--- CMake/ExternalProjectHelper.cmake
+++ CMake/ExternalProjectHelper.cmake
@@ -177,6 +177,15 @@
   SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
   SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

+  ADD_CUSTOM_TARGET(OSGAll)
+
+  # optional pass for test programs
+#  IF(OSGBUILD_TESTS)
+    ADD_CUSTOM_TARGET(OSGAllTests)
+    ADD_DEPENDENCIES(OSGAll OSGAllTests)
+#  ENDIF(OSGBUILD_TESTS)
+
+
 IF(WIN32)
   OSG_OPTION(OSG_USE_SEPARATE_LIBDIRS "" ON)
 ENDIF(WIN32)


build flycapture2 backend on 32-bit and 64-bit windows

--- CMakeModules/FindFlyCapture.cmake
+++ CMakeModules/FindFlyCapture.cmake
@@ -1,7 +1,17 @@
 # Get default values for FLYCAPTURE_ROOT and FLYCAPTURE_LAYOUT

 IF(WIN32)
-  SET(FLYCAPTURE_ROOT "C:\\Program Files\\Point Grey Research\\FlyCapture2")
+  IF(EXISTS "C:\\Program Files\\Point Grey Research\\FlyCapture2")
+    SET(FLYCAPTURE_ROOT "C:\\Program Files\\Point Grey Research\\FlyCapture2")
+  ELSE(EXISTS "C:\\Program Files\\Point Grey Research\\FlyCapture2")
+    IF(EXISTS "C:\\Program Files (x86)\\Point Grey Research\\FlyCapture2")
+      # Maybe we're on 64bit but have 32bit SDK installed.
+      SET(FLYCAPTURE_ROOT "C:\\Program Files (x86)\\Point Grey Research\\FlyCapture2")
+    ELSE(EXISTS "C:\\Program Files (x86)\\Point Grey Research\\FlyCapture2")
+      # If not, default to "C:\Program Files".
+      SET(FLYCAPTURE_ROOT "C:\\Program Files\\Point Grey Research\\FlyCapture2")
+    ENDIF(EXISTS "C:\\Program Files (x86)\\Point Grey Research\\FlyCapture2")
+  ENDIF(EXISTS "C:\\Program Files\\Point Grey Research\\FlyCapture2")
 ELSE(WIN32)
   # Assume headers and libraries are installed in FHS locations
   SET(FLYCAPTURE_ROOT "/usr")
@@ -28,7 +38,13 @@
 IF(FLYCAPTURE_TEST_LIB_PATHS STREQUAL "")
   # not set with env var, use defaults
   IF(FLYCAPTURE_LAYOUT STREQUAL "flycapture")
-    SET(FLYCAPTURE_TEST_LIB_PATHS ${FLYCAPTURE_ROOT}/lib64)
+    IF(EXISTS ${FLYCAPTURE_ROOT}/lib64)
+      SET(FLYCAPTURE_TEST_LIB_PATHS ${FLYCAPTURE_ROOT}/lib64)
+      MESSAGE("building FlyCapture2 64-bit backend")
+    ELSE(EXISTS ${FLYCAPTURE_ROOT}/lib64)
+      SET(FLYCAPTURE_TEST_LIB_PATHS ${FLYCAPTURE_ROOT}/lib)
+      MESSAGE("building FlyCapture2 32-bit backend")
+    ENDIF(EXISTS ${FLYCAPTURE_ROOT}/lib64)
   ELSE(FLYCAPTURE_LAYOUT STREQUAL "flycapture")
     IF(NOT FLYCAPTURE_LAYOUT STREQUAL "FHS")
       MESSAGE(FATAL_ERROR "unknown FLYCAPTURE_LAYOUT " ${FLYCAPTURE_LAYOUT})


BUG: Do not run Python comparison tests without ITK_WRAP_PYTHON.

We associate ITK_WRAP_PYTHON with ITK's Python wrapping being available in the
PYTHON_EXECUTABLE.

Change-Id: I0315f31e06f0f486a22114fa1f2306f3ac3a0cfa

--- CMake/ITKExamplesMacros.cmake
+++ CMake/ITKExamplesMacros.cmake
@@ -140,7 +140,7 @@
     PROPERTIES DEPENDS ${depends}
     )

-  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/Code.py")
+  if(ITK_WRAP_PYTHON AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/Code.py")
     set(python_test_name ${test_name}Python)
     string(REPLACE . "Python." test_image "${test_image}")


FindOGRE script: Fixed static linking order for ZZip and ZLIB, added Xrandr lib for Linux

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

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -215,9 +215,9 @@
   endif ()

-  set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZLIB_LIBRARIES} ${ZZip_LIBRARIES}
+  set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES}
     ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES}
-    ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY}
+    ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB}
     ${Cocoa_LIBRARIES} ${Carbon_LIBRARIES})

   if (NOT ZLIB_FOUND OR NOT ZZip_FOUND)
@@ -229,8 +229,10 @@
   if (NOT FREETYPE_FOUND)
     set(OGRE_DEPS_FOUND FALSE)
   endif ()
-  if (UNIX AND NOT X11_FOUND)
-    set(OGRE_DEPS_FOUND FALSE)
+  if (UNIX AND NOT APPLE)
+	if (NOT X11_FOUND)
+      set(OGRE_DEPS_FOUND FALSE)
+	endif ()
   endif ()

   if (OGRE_CONFIG_THREADS)


Path is short now. Also added outcommented code to set up the MITK initial cache.

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -61,12 +61,37 @@
 #
 # Project specific properties
 #
+# In order to shorten the global path length, the build directory for each DartClient
+# uses the following abrevation sceme:
+# For build configuration:
+# Debug -> d
+# Release -> r
+# For scripte mode:
+# continuous -> c
+# nightly -> n
+# experimental -> e
+# Example directory: /MITK-sb-d-n/ for a nightly MITK superbuild in debug mode.
+set(short_of_ctest_build_configuration "")
+set(short_of_script_mode "")
+string(SUBSTRING ${CTEST_BUILD_CONFIGURATION} 0 1 short_of_ctest_build_configuration)
+string(SUBSTRING ${SCRIPT_MODE} 0 1 short_of_script_mode)
 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK")
-set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK-Superbuild-${CTEST_BUILD_CONFIGURATION}-${SCRIPT_MODE}")
+set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK-sb-${short_of_ctest_build_configuration}-${short_of_script_mode}")
+
+# Create an initial cache file for MITK. This file is used to configure the MITK-Build. Use ADDITIONAL_CMAKECACHE_OPTION
+# to configure the MITK-Superbuild. The
+set(MITK_INITIAL_CACHE "
+# Example how to set a boolean variable in the MITK-Build via this script:
+#SET(MITK_ENABLE_TOF_HARDWARE \"TRUE\" CACHE INTERNAL \"Enable ToF Hardware\")
+# Example how to set a path variable in the MITK-Build via this script:
+#SET(MITK_PMD_LIB \"/home/kilgus/thomas/PMDSDK2/Linux_x86_64/bin/libpmdaccess2.so\" CACHE INTERNAL \"PMD lib\")
+")

 set(ADDITIONAL_CMAKECACHE_OPTION "
+# Superbuild variables are not passed through to the MITK-Build (or any other build like ITK, VTK, ...)
+# Use the MITK_INITIAL_CACHE the pass variables to the MITK-Build.
 # add entries like this
-# MITK_USE_OpenCV:BOOL=OFF
+#MITK_USE_OpenCV:BOOL=OFF
 ")

 # List of test that should be explicitly disabled on this machine


General: Also remove Gaussian filter from ITK config

--- CMake/Superbuild/External_ITK.cmake
+++ CMake/Superbuild/External_ITK.cmake
@@ -94,7 +94,6 @@
       -DITK_WRAP_PYTHON:BOOL=${TubeTK_USE_PYTHON}
       -DModule_BridgeNumPy:BOOL=${TubeTK_USE_NUMPY_STACK}
       -DModule_MinimalPathExtraction:BOOL=ON
-      -DModule_SmoothingRecursiveYvvGaussianFilter:BOOL=ON # I want ITK to have this module
       -DKWSYS_USE_MD5:BOOL=ON
       -DModule_ITKReview:BOOL=ON
       ${TubeTK_ITKHDF5_VALGRIND_ARGS}


Remove debug messages

Remove debug messages

--- CMakeModules/FlusspferdPlugin.cmake
+++ CMakeModules/FlusspferdPlugin.cmake
@@ -46,11 +46,11 @@
   #  Creates variabvles PLUGIN_SOURCE etc.
   PARSE_ARGUMENTS("PLUGIN" "SOURCES;JS;LIBRARIES;DEFINITIONS" "" ${ARGN})

-  MESSAGE("*** Arguments for ${PLUGIN}")
+  #MESSAGE("*** Arguments for ${PLUGIN}")
   #MESSAGE("Sources: ${PLUGIN_SOURCES}")
   #MESSAGE("JS files: ${PLUGIN_JS}")
   #MESSAGE("Defintions: ${PLUGIN_DEFINITIONS}")
-  MESSAGE("Link libraries: ${PLUGIN_LIBRARIES}")
+  #MESSAGE("Link libraries: ${PLUGIN_LIBRARIES}")

   if("${PLUGIN_SOURCES}" STREQUAL "")
     message(FATAL_ERROR "flusspferd_plugin called for ${PLUGIN} with no SOURCES argument")


Find flex and bison on *nix.

Find flex and bison on *nix.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -1223,8 +1223,10 @@
     set(bdir ${BDIR_PRIVATE}/fb)

     if (NOT WIN32)
-        set(flex flex)
-        set(bison bison)
+        find_package(FLEX REQUIRED)
+        find_package(BISON REQUIRED 3.0)
+        set(bison ${BISON_EXECUTABLE})
+        set(flex ${FLEX_EXECUTABLE})
     endif()

     # parsers


:alembic: fix coverage

:alembic: fix coverage

--- cmake/ci.cmake
+++ cmake/ci.cmake
@@ -467,7 +467,7 @@
 ###############################################################################

 add_custom_target(ci_test_coverage
-    COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND}
+    COMMAND CXX=g++ ${CMAKE_COMMAND}
         -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_FLAGS="--coverage;-fprofile-arcs;-ftest-coverage"
         -DJSON_BuildTests=ON -DJSON_MultipleHeaders=ON
         -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_coverage
@@ -475,7 +475,7 @@
     COMMAND cd ${PROJECT_BINARY_DIR}/build_coverage && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure

     COMMAND ${LCOV_TOOL} --directory . --capture --output-file json.info --rc lcov_branch_coverage=1
-    COMMAND ${LCOV_TOOL} -e json.info ${SRC_FILES} --output-file json.info.filtered --gcov-tool ${GCOV_TOOL} --rc lcov_branch_coverage=1
+    COMMAND ${LCOV_TOOL} -e json.info ${SRC_FILES} --output-file json.info.filtered --rc lcov_branch_coverage=1
     COMMAND ${CMAKE_SOURCE_DIR}/test/thirdparty/imapdl/filterbr.py json.info.filtered > json.info.filtered.noexcept
     COMMAND genhtml --title "JSON for Modern C++" --legend --demangle-cpp --output-directory html --show-details --branch-coverage json.info.filtered.noexcept


Cmake: Option to add additional ssl certificates

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -330,16 +330,23 @@
   os_build_memdisk(${TARGET} ${FOLD})
 endfunction()

+# Add both standard certificate bundle and any specific certs provided as parameters
 function(os_add_ssl_certificates TARGET)
+  set(CERTS_DIR ${CMAKE_CURRENT_BINARY_DIR}/certs)
+  file(MAKE_DIRECTORY ${CERTS_DIR})
+  foreach(CERTIFICATE ${ARGN})
+    get_filename_component(CERT ${CERTIFICATE} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
+    message(STATUS "Adding certificate: ${CERT}")
+    file(COPY ${CERT} DESTINATION ${CERTS_DIR})
+  endforeach()
+  message(STATUS "Downloading ssl certificates")
   file(DOWNLOAD https://github.com/fwsGonzo/s2n_bundle/releases/download/v1/ca_bundle.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/certs.tgz)
-  file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/certs)
   execute_process(
-    COMMAND tar -xvf  ${CMAKE_CURRENT_BINARY_DIR}/certs.tgz --strip-components=1 -C ${CMAKE_CURRENT_BINARY_DIR}/certs
+    COMMAND tar -xf  ${CMAKE_CURRENT_BINARY_DIR}/certs.tgz --strip-components=1 -C ${CERTS_DIR}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
   )
   os_build_memdisk(${TARGET} ${CMAKE_CURRENT_BINARY_DIR}/certs)
 endfunction()
-

 function(internal_os_add_config TARGET CONFIG_JSON)
   get_filename_component(FILENAME "${CONFIG_JSON}" NAME)


Turn off -Weff-c++

Turn off -Weff-c++

--- dependencies.cmake
+++ dependencies.cmake
@@ -82,8 +82,10 @@
     set(CMAKE_BUILD_TYPE Debug)
 endif(NOT CMAKE_BUILD_TYPE)

-# Was going to pass in -Weffc++ but RakNet code doesn't comply with its rules.
-SET(COMMON_FLAGS "-std=c++14 -Wall -Wpedantic -Wextra -Werror -fno-builtin -Wno-error=effc++ -Weffc++")
+# Was going to pass in -Weffc++ but it blindly tells you to initialise fields in an
+# initialiser list, even when it's more readable to initialise it in the constructor
+# body.
+SET(COMMON_FLAGS "-std=c++14 -Wall -Wpedantic -Wextra -Werror -fno-builtin")
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_FLAGS} -O0 -g")
 #SET(CMAKE_C_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -ffat-lto-objects -flto")
 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_FLAGS} -O3 -ffat-lto-objects -flto")


fix AMD compile with cmake >3.14.0

fix AMD compile with cmake >3.14.0

--- CMake/hoomd/hipcc.cmake
+++ CMake/hoomd/hipcc.cmake
@@ -23,7 +23,7 @@
 if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
   set(CMAKE_CUDA_STANDARD_DEFAULT "")
 else()
-  set(CMAKE_CUDA_STANDARD_DEFAULT 98)
+  set(CMAKE_CUDA_STANDARD_DEFAULT 11)
   set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "")
   set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "")


Testsuite: Fix a warning when configuring with cmake-3.1

--- tests/setup_testsubproject.cmake
+++ tests/setup_testsubproject.cmake
@@ -63,11 +63,10 @@
   TEST_TIME_LIMIT
   TEST_PICKUP_REGEX
   )
-  # Environment wins:
   IF(DEFINED ENV{${_var}})
     SET(${_var} $ENV{${_var}})
   ENDIF()
-  IF(NOT "${_var}" STREQUAL "")
+  IF(NOT "${${_var}}" STREQUAL "")
     SET(${_var} "${${_var}}" CACHE STRING "" FORCE)
   ENDIF()
 ENDFOREACH()


EHN: VP9 version is fixed at 1.6.1 instead of the master branch.

--- SuperBuild/External_VP9.cmake
+++ SuperBuild/External_VP9.cmake
@@ -21,7 +21,7 @@
     ExternalProject_Add(VP9
     	PREFIX "${CMAKE_BINARY_DIR}/Deps/VP9-prefix"
       GIT_REPOSITORY https://github.com/webmproject/libvpx/
-      GIT_TAG master
+      GIT_TAG v1.6.1
       SOURCE_DIR        "${VP9_INCLUDE_DIR}"
       CONFIGURE_COMMAND "${VP9_INCLUDE_DIR}/configure" --disable-examples --as=yasm --disable-tools --disable-docs --disable-vp8 --disable-libyuv --disable-unit_tests --disable-postproc WORKING_DIRECTORY "${VP9_LIBRARY_DIR}"
       BUILD_ALWAYS 1


COMP Merge branch 'bug-5919-CorrespondingPointSetsWidget'

--- Modules/QmitkExt/files.cmake
+++ Modules/QmitkExt/files.cmake
@@ -97,9 +97,9 @@
  QmitkPointListView.cpp
  QmitkPointListWidget.cpp
  QmitkPointListViewWidget.cpp
- QmitkCorrespondingPointSetsView.cpp
- QmitkCorrespondingPointSetsModel.cpp
- QmitkCorrespondingPointSetsWidget.cpp
+ #QmitkCorrespondingPointSetsView.cpp
+ #QmitkCorrespondingPointSetsModel.cpp
+ #QmitkCorrespondingPointSetsWidget.cpp
  QmitkVideoBackground.cpp
  QmitkHotkeyLineEdit.cpp
  QmitkErodeToolGUI.cpp
@@ -195,9 +195,9 @@
  QmitkPointListView.h
  QmitkPointListWidget.h
  QmitkPointListViewWidget.h
- QmitkCorrespondingPointSetsView.h
- QmitkCorrespondingPointSetsModel.h
- QmitkCorrespondingPointSetsWidget.h
+ #QmitkCorrespondingPointSetsView.h
+ #QmitkCorrespondingPointSetsModel.h
+ #QmitkCorrespondingPointSetsWidget.h
  QmitkHistogramWidget.h
  QmitkVideoBackground.h
  QmitkFileChooser.h


deal with frameworks in Gch.cmake

deal with frameworks in Gch.cmake

--- CMakeModules/Gch.cmake
+++ CMakeModules/Gch.cmake
@@ -4,10 +4,11 @@
   SET(PRECOMPILED_HEADER "${HEADER}.gch")
   LIST(APPEND ${SOURCES} ${PRECOMPILED_HEADER})

-  SET(INCLUDE_FLAGS)
+  SET(CURRENT_INC_FLAGS)
   GET_DIRECTORY_PROPERTY(_dirs INCLUDE_DIRECTORIES)
   FOREACH (_dir ${_dirs})
-    LIST(APPEND INCLUDE_FLAGS "-I${_dir}")
+    STRING(REGEX REPLACE ".framework$" ".framework/Headers" _dir ${_dir})
+    LIST(APPEND CURRENT_INC_FLAGS "-I${_dir}")
   ENDFOREACH(_dir ${_dirs})

   GET_DIRECTORY_PROPERTY(DEFS DEFINITIONS)
@@ -20,11 +21,9 @@
   ENDIF(QT4_FOUND AND ${BUILD_TYPE} STREQUAL "DEBUG")

   SET(PCH_FLAGS
-    ${DEFS} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${INCLUDE_FLAGS})
+    ${DEFS} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CURRENT_INC_FLAGS})
   SEPARATE_ARGUMENTS(PCH_FLAGS)
   STRING(REPLACE ";" " " PRETTY_PCH_FLAGS "${PCH_FLAGS}")
-
-  MESSAGE(STATUS "PCH compilation flags:\n${PRETTY_PCH_FLAGS}\n")

   ADD_CUSTOM_COMMAND(OUTPUT ${PRECOMPILED_HEADER}
     COMMAND rm -f ${PRECOMPILED_HEADER}


All: Bump version

All: Bump version

--- version.cmake
+++ version.cmake
@@ -3,7 +3,7 @@
 endif()
 set(LIB_VERSION_MAJOR 0)
 set(LIB_VERSION_MINOR 7)
-set(LIB_VERSION_PATCH 1)
+set(LIB_VERSION_PATCH 2)
 set(LIB_VERSION_ABI 0.7)
 set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})
 set(SUMMARY "${PROJECT_NAME} Game Boy Advance Emulator")


[doxyrest] release 1.0.0

[doxyrest] release 1.0.0

--- version.cmake
+++ version.cmake
@@ -9,8 +9,8 @@
 #
 #...............................................................................

-set (DOXYREST_VERSION_MAJOR     0)
-set (DOXYREST_VERSION_MINOR     9)
+set (DOXYREST_VERSION_MAJOR     1)
+set (DOXYREST_VERSION_MINOR     0)
 set (DOXYREST_VERSION_REVISION  0)
 set (DOXYREST_VERSION_TAG)


[axl] release 6.0.2

[axl] release 6.0.2

version bump prior releasing ioninja-3.8.4

--- version.cmake
+++ version.cmake
@@ -11,7 +11,7 @@

 set (AXL_VERSION_MAJOR     6)
 set (AXL_VERSION_MINOR     0)
-set (AXL_VERSION_REVISION  1)
+set (AXL_VERSION_REVISION  2)
 set (AXL_VERSION_TAG)

 set (AXL_VERSION_FULL      "${AXL_VERSION_MAJOR}.${AXL_VERSION_MINOR}.${AXL_VERSION_REVISION}")


Bump version to 0.1.3

Bump version to 0.1.3

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapIPC_VERSION 0.1.2)
+set(LeapIPC_VERSION 0.1.3)


Enable ITK remote modules to be enables in Superbuild

Update the regular expression used to propagate CMake flags from the
superbuild to the ITK project. Remote the ITK prefix in the module
name enables ITK remote modules to be enabled through the SimpleITK
superbuild process.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -26,7 +26,7 @@
   if(_varName MATCHES "^ITK_"
       OR _varName MATCHES "^ITKV3"
       OR _varName MATCHES "FFTW"
-      OR _varName MATCHES "^Module_ITK")
+      OR _varName MATCHES "^Module_")
     message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to ITK external project.")
     list(APPEND ITK_VARS ${_varName})
   endif()


Denoise PackageConfig

Denoise PackageConfig

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -57,6 +57,7 @@
   "set(_req)\n"
   "set(_quiet)\n"
   "set(_fail)\n"
+  "set(${UPPER_PROJECT_NAME}_COMPONENTS)\n"
   "\n"
 # add dependent library finding
   "@DEPENDENTS@"
@@ -152,8 +153,10 @@
   "  set(${UPPER_PROJECT_NAME}_FOUND TRUE)\n"
   "  set(${CMAKE_PROJECT_NAME}_FOUND TRUE)\n"
   "  set(${UPPER_PROJECT_NAME}_MODULE_FILENAME ${MODULE_FILENAME})\n"
+  "  list(SORT ${UPPER_PROJECT_NAME}_INCLUDE_DIRS)\n"
+  "  list(REMOVE_DUPLICATES ${UPPER_PROJECT_NAME}_INCLUDE_DIRS)\n"
   "  if(_out)\n"
-  "    message(STATUS \"Found ${CMAKE_PROJECT_NAME} ${VERSION} \${${UPPER_PROJECT_NAME}_COMPONENTS} in \"\n"
+  "    message(STATUS \"Found ${CMAKE_PROJECT_NAME} ${VERSION} [\${${UPPER_PROJECT_NAME}_COMPONENTS}] in \"\n"
   "      \"\${${UPPER_PROJECT_NAME}_INCLUDE_DIRS}:\${${UPPER_PROJECT_NAME}_LIBRARY}\")\n"
   "  endif()\n"
   "endif()\n"


Fix InfiniBand build

Fix InfiniBand build

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
[ ] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation

--- FindOFED.cmake
+++ FindOFED.cmake
@@ -1,6 +1,6 @@
 # Copyright (c) 2011-2012 Stefan Eilemann <eile@eyescale.ch>

-find_path(_ofed_INCLUDE_DIR rdma/rdma_cma.h
+find_path(_ofed_INCLUDE_DIR rdma/rdma_verbs.h
   HINTS ${OFED_ROOT}/include
   PATHS /usr/include /usr/local/include /opt/local/include)
 find_library(_rdma_LIBRARY NAMES rdmacm
@@ -21,4 +21,3 @@
 if(OFED_FOUND)
   message(STATUS "Found OFED in ${OFED_INCLUDE_DIRS};${OFED_LIBRARIES}")
 endif()
-


modules: updated FindImGui.cmake.

modules: updated FindImGui.cmake.

--- modules/FindImGui.cmake
+++ modules/FindImGui.cmake
@@ -6,7 +6,8 @@
 #
 #  ImGui_FOUND                - True if ImGui is found
 #  ImGui::ImGui               - ImGui interface target
-#  ImGui::Sources             - ImGui source target
+#  ImGui::Sources             - ImGui source target for core functionality
+#  ImGui::SourcesMiscCpp      - ImGui source target for misc/cpp
 #
 # Additionally these variables are defined for internal usage:
 #
@@ -21,6 +22,9 @@
 # You can supply their location via an ``IMGUI_DIR`` variable. Once found, the
 # ``ImGui::ImGui`` target contains just the header file, while
 # ``ImGui::Sources`` contains the source files in ``INTERFACE_SOURCES``.
+#
+# The ``ImGui::SourcesMiscCpp`` component, if requested, is always searched for
+# in the form of C++ sources. Vcpkg doesn't distribute these.
 #
 # The desired usage that covers both cases is to link ``ImGui::Sources``
 # ``PRIVATE``\ ly to a *single* target, which will then contain either the
@@ -92,58 +96,85 @@
     endif()
 endif()

+macro(_imgui_setup_source_file source)
+    # Handle export and import of imgui symbols via IMGUI_API
+    # definition in visibility.h of Magnum ImGuiIntegration.
+    set_property(SOURCE ${source} APPEND PROPERTY COMPILE_DEFINITIONS
+        "IMGUI_USER_CONFIG=\"Magnum/ImGuiIntegration/visibility.h\"")
+
+    # Hide warnings from imgui source files
+
+    # GCC- and Clang-specific flags
+    if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang"
+        AND NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") OR CORRADE_TARGET_EMSCRIPTEN)
+        set_property(SOURCE ${source} APPEND_STRING PROPERTY COMPILE_FLAGS
+            " -Wno-old-style-cast -Wno-zero-as-null-pointer-constant")
+    endif()
+
+    # GCC-specific flags
+    if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+        set_property(SOURCE ${source} APPEND_STRING PROPERTY COMPILE_FLAGS
+            " -Wno-double-promotion")
+    endif()
+endmacro()
+
 # Find components
 foreach(_component IN LISTS ImGui_FIND_COMPONENTS)
     if(_component STREQUAL "Sources")
-        set(ImGui_Sources_FOUND TRUE)
-        set(ImGui_SOURCES )
+        if(NOT TARGET ImGui::Sources)
+            set(ImGui_Sources_FOUND TRUE)
+            set(ImGui_SOURCES )

-        foreach(_file imgui imgui_widgets imgui_draw imgui_demo)
-            # Disable the find root path here, it overrides the
-            # CMAKE_FIND_ROOT_PATH_MODE_INCLUDE setting potentially set in
-            # toolchains.
-            find_file(ImGui_${_file}_SOURCE NAMES ${_file}.cpp
-                HINTS ${IMGUI_DIR} NO_CMAKE_FIND_ROOT_PATH)
-            list(APPEND ImGui_SOURCES ${ImGui_${_file}_SOURCE})
+            foreach(_file imgui imgui_widgets imgui_draw imgui_demo)
+                # Disable the find root path here, it overrides the
+                # CMAKE_FIND_ROOT_PATH_MODE_INCLUDE setting potentially set in
+                # toolchains.
+                find_file(ImGui_${_file}_SOURCE NAMES ${_file}.cpp
+                    HINTS ${IMGUI_DIR} NO_CMAKE_FIND_ROOT_PATH)
+                list(APPEND ImGui_SOURCES ${ImGui_${_file}_SOURCE})

-            if(NOT ImGui_${_file}_SOURCE)
-                set(ImGui_Sources_FOUND FALSE)
-                break()
-            endif()
+                if(NOT ImGui_${_file}_SOURCE)
+                    set(ImGui_Sources_FOUND FALSE)
+                    break()
+                endif()

-            # Hide warnings from imgui source files
+                _imgui_setup_source_file(${ImGui_${_file}_SOURCE})
+            endforeach()

-            # Handle export and import of imgui symbols via IMGUI_API definition
-            # in visibility.h of Magnum ImGuiIntegration.
-            set_property(SOURCE ${ImGui_${_file}_SOURCE} APPEND PROPERTY COMPILE_DEFINITIONS
-                "IMGUI_USER_CONFIG=\"Magnum/ImGuiIntegration/visibility.h\"")
-
-            # GCC- and Clang-specific flags
-            if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang"
-                AND NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") OR CORRADE_TARGET_EMSCRIPTEN)
-                set_property(SOURCE ${ImGui_${_file}_SOURCE} APPEND_STRING PROPERTY COMPILE_FLAGS
-                    " -Wno-old-style-cast -Wno-zero-as-null-pointer-constant")
-                set_property(SOURCE ${ImGui_${_file}_SOURCE} PROPERTY CORRADE_USE_PEDANTIC_FLAGS OFF)
-                set_property(SOURCE ${ImGui_${_file}_SOURCE} PROPERTY CORRADE_USE_PEDANTIC_DEFINITIONS OFF)
-            endif()
-
-            # GCC-specific flags
-            if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-                 set_property(SOURCE ${ImGui_${_file}_SOURCE} APPEND_STRING PROPERTY COMPILE_FLAGS
-                     " -Wno-double-promotion")
-            endif()
-        endforeach()
-
-        if(NOT TARGET ImGui::Sources)
             add_library(ImGui::Sources INTERFACE IMPORTED)
             set_property(TARGET ImGui::Sources APPEND PROPERTY
                 INTERFACE_SOURCES "${ImGui_SOURCES}")
             set_property(TARGET ImGui::Sources APPEND PROPERTY
                 INTERFACE_LINK_LIBRARIES ImGui::ImGui)
-
-            set(ImGui_Sources_FOUND ${ImGui_SOURCES})
         else()
             set(ImGui_Sources_FOUND TRUE)
+        endif()
+    elseif(_component STREQUAL "SourcesMiscCpp")
+        set(ImGui_SourcesMiscCpp_FOUND TRUE)
+        set(ImGui_SOURCES )
+
+        foreach(_file imgui_stdlib)
+            # Disable the find root path here, it overrides the
+            # CMAKE_FIND_ROOT_PATH_MODE_INCLUDE setting potentially set in
+            # toolchains.
+            find_file(ImGui_${_file}_MISC_CPP_SOURCE NAMES ${_file}.cpp
+                HINTS ${IMGUI_DIR}/misc/cpp NO_CMAKE_FIND_ROOT_PATH)
+            list(APPEND ImGui_MISC_CPP_SOURCES ${ImGui_${_file}_MISC_CPP_SOURCE})
+
+            if(NOT ImGui_${_file}_MISC_CPP_SOURCE)
+                set(ImGui_SourcesMiscCpp_FOUND FALSE)
+                break()
+            endif()
+
+            _imgui_setup_source_file(${ImGui_${_file}_MISC_CPP_SOURCE})
+        endforeach()
+
+        if(NOT TARGET ImGui::SourcesMiscCpp)
+            add_library(ImGui::SourcesMiscCpp INTERFACE IMPORTED)
+            set_property(TARGET ImGui::SourcesMiscCpp APPEND PROPERTY
+                INTERFACE_SOURCES "${ImGui_MISC_CPP_SOURCES}")
+            set_property(TARGET ImGui::SourcesMiscCpp APPEND PROPERTY
+                INTERFACE_LINK_LIBRARIES ImGui::ImGui)
         endif()
     endif()
 endforeach()


Use pkg-config for json-c

Use pkg-config for json-c

--- modules/FindJSONC.cmake
+++ modules/FindJSONC.cmake
@@ -1,16 +1,24 @@
 # Find json-c

-find_library(JSONC_LIBRARIES
-    NAMES json-c json
-    HINTS /lib /lib64 /usr/lib /usr/lib64
-    DOC "json-c library"
-)
+find_package (PkgConfig)
+pkg_check_modules(JSONC_PKG json-c)

-find_path(JSONC_INCLUDE_DIRS
-     NAMES json.h
-    HINTS /usr/include/json /usr/include/json-c
-    DOC "json-c headers"
-)
+if (JSONC_PKG_FOUND)
+    set (JSONC_LIBRARIES ${JSONC_PKG_LIBRARIES})
+    set (JSONC_INCLUDE_DIRS ${JSONC_PKG_INCLUDE_DIRS})
+else (JSONC_PKG)
+    find_library(JSONC_LIBRARIES
+        NAMES json-c json
+        HINTS /lib /lib64 /usr/lib /usr/lib64
+        DOC "json-c library"
+    )
+
+    find_path(JSONC_INCLUDE_DIRS
+        NAMES json.h
+        HINTS /usr/include/json /usr/include/json-c
+        DOC "json-c headers"
+    )
+endif (JSONC_PKG_FOUND)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(json-c


COMP: handle missing argument to check_for_errors

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -208,9 +208,9 @@

 endmacro()

-macro(check_for_errors target)
-
-  set(_curr_target ${target})
+macro(check_for_errors)
+
+  set(_curr_target ${ARGV0})
   if(build_errors AND _curr_target)
     # try to remove the stamp file for external projects
     set(_stamp_file "${CTEST_BINARY_DIRECTORY}/ep/src/${_curr_target}-stamp/${_curr_target}-configure")


prefer newer llvm versions over 3.3

prefer newer llvm versions over 3.3

v2:
LLVM 3.3 is better than 3.4, switch the order of 3.4 and 3.3.

Signed-off-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@intel.com>
Reviewed-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -8,12 +8,12 @@
 # LLVM_FOUND       - True if llvm found.
 if (LLVM_INSTALL_DIR)
   find_program(LLVM_CONFIG_EXECUTABLE
-               NAMES llvm-config-33 llvm-config-3.3 llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4 llvm-config
+               NAMES llvm-config-35 llvm-config-3.5 llvm-config-33 llvm-config-3.3 llvm-config-34 llvm-config-3.4 llvm-config
                DOC "llvm-config executable"
                PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
 else (LLVM_INSTALL_DIR)
   find_program(LLVM_CONFIG_EXECUTABLE
-               NAMES llvm-config-33 llvm-config-3.3 llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4 llvm-config
+               NAMES llvm-config-35 llvm-config-3.5 llvm-config-33 llvm-config-3.3 llvm-config-34 llvm-config-3.4 llvm-config
                DOC "llvm-config executable")
 endif (LLVM_INSTALL_DIR)


Fixed bug: BST didn't work with gcc -O3 optimizations. The evil optimization was tree-vectorize, DO NOT use it with Sedna.

--- CMakeCompilers.cmake
+++ CMakeCompilers.cmake
@@ -41,6 +41,8 @@

     # first, add "-ggdb -g3" flag to generate more debug info
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -ggdb")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-tree-vectorize")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_DEBUG} -fno-tree-vectorize")
     set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -ggdb")

     # add some -f declarations


Ignoring test tutorial-roofit-rf509_wsinteractive for windoes

--- tutorials/CTestCustom.cmake
+++ tutorials/CTestCustom.cmake
@@ -1,5 +1,4 @@
 #---Custom CTest settings---------------------------------------------------
-
-#set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} tutorial-pyroot-zdemo)
-
-
+if(WIN32)
+  list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-roofit-rf509_wsinteractive)   #  workspaces as namespace does not work on windows
+endif()


Win: cmake script cosmetics

Win: cmake script cosmetics

--- src/Win/projectDef.cmake
+++ src/Win/projectDef.cmake
@@ -7,7 +7,7 @@
 # Included from ../CMakeLists.txt

 # remember that the current source dir is the project root; this file is in Win/
-file (GLOB PLATFORM RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+file( GLOB PLATFORM RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     Win/[^.]*.cpp
     Win/[^.]*.h
     Win/[^.]*.rc
@@ -18,52 +18,52 @@
 add_definitions(
     /D "_ATL_STATIC_REGISTRY"
     /D "_WIN32_WINNT=0x0501"
-)
+    )

 # get PCH related files
-file (GLOB PCH RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+file( GLOB PCH RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     StdAfx.*
-)
+    )

 # make sure that PCH-related files is NOT part of ${SOURCES}
-LIST(REMOVE_ITEM SOURCES ${PCH})
+LIST( REMOVE_ITEM SOURCES ${PCH} )

-SOURCE_GROUP("PCH files" FILES ${PCH})
-SOURCE_GROUP(Win FILES ${PLATFORM})
+SOURCE_GROUP( "PCH files" FILES ${PCH} )
+SOURCE_GROUP( Win FILES ${PLATFORM} )

-set (SOURCES
+set( SOURCES
     ${SOURCES}
     ${PLATFORM}
     )

 # set PCH
-MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
- GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
- SET(__PrecompiledBinary "$(IntDir)\\$(TargetName).pch")
+MACRO( ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar )
+    GET_FILENAME_COMPONENT( PrecompiledBasename ${PrecompiledHeader} NAME_WE )
+    SET( __PrecompiledBinary "$(IntDir)\\$(TargetName).pch" )

- SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
-   PROPERTIES COMPILE_FLAGS "/Yc -Zm160")
-   #OBJECT_OUTPUTS "${__PrecompiledBinary}"
+    SET_SOURCE_FILES_PROPERTIES( ${PrecompiledSource}
+        PROPERTIES COMPILE_FLAGS "/Yc -Zm160" )
+    #OBJECT_OUTPUTS "${__PrecompiledBinary}"

- foreach(CURFILE ${${SourcesVar}})
-   GET_FILENAME_COMPONENT(CURFILE_EXT ${CURFILE} EXT)
-   GET_FILENAME_COMPONENT(CURFILE_NAME ${CURFILE} NAME)
-   if (CURFILE_EXT STREQUAL ".cpp" AND NOT CURFILE_NAME STREQUAL PrecompiledBasename)
-     SET_SOURCE_FILES_PROPERTIES(${CURFILE}
-       PROPERTIES COMPILE_FLAGS "/Yu /FI\"${PrecompiledHeader}\" -Zm160")
-       #OBJECT_DEPENDS "${__PrecompiledBinary}"
-   endif()
- endforeach()
+    foreach( CURFILE ${${SourcesVar}} )
+        GET_FILENAME_COMPONENT( CURFILE_EXT ${CURFILE} EXT )
+        GET_FILENAME_COMPONENT( CURFILE_NAME ${CURFILE} NAME )
+        if( CURFILE_EXT STREQUAL ".cpp" AND NOT CURFILE_NAME STREQUAL PrecompiledBasename )
+            SET_SOURCE_FILES_PROPERTIES( ${CURFILE}
+                PROPERTIES COMPILE_FLAGS "/Yu /FI\"${PrecompiledHeader}\" -Zm160" )
+            #OBJECT_DEPENDS "${__PrecompiledBinary}"
+        endif()
+    endforeach()

  # Add precompiled header to SourcesVar
- LIST(APPEND ${SourcesVar} ${PrecompiledSource})
- LIST(APPEND ${SourcesVar} ${PrecompiledHeader})
+    list( APPEND ${SourcesVar} ${PrecompiledSource} )
+    list( APPEND ${SourcesVar} ${PrecompiledHeader} )
 ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER)

 # activate PCH
-ADD_MSVC_PRECOMPILED_HEADER("stdafx.h" "stdafx.cpp" SOURCES)
+ADD_MSVC_PRECOMPILED_HEADER( "stdafx.h" "stdafx.cpp" SOURCES )

-add_windows_plugin(${PROJECT_NAME} SOURCES)
+add_windows_plugin( ${PROJECT_NAME} SOURCES )

 # This is an example of how to add a build step to sign the plugin DLL before
 # the WiX installer builds.  The first filename (certificate.pfx) should be
@@ -77,16 +77,16 @@
 # still work. Your cert should only be on the build machine and shouldn't be in
 # source control!
 # -- uncomment lines below this to enable signing --
-#firebreath_sign_plugin(${PROJECT_NAME}
+#firebreath_sign_plugin( ${PROJECT_NAME}
 #    "${CMAKE_CURRENT_SOURCE_DIR}/sign/certificate.pfx"
 #    "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt"
-#    "http://timestamp.verisign.com/scripts/timestamp.dll")
+#    "http://timestamp.verisign.com/scripts/timestamp.dll" )

 include_directories( ${DEPS_DIR}/libvlc-sdk/include )

-get_property(LINK_FLAGS TARGET ${PROJECT_NAME} PROPERTY LINK_FLAGS)
-set(LINK_FLAGS "${LINK_FLAGS} /INCLUDE:__imp__D3DCompile@44")
-set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS ${LINK_FLAGS})
+get_property( LINK_FLAGS TARGET ${PROJECT_NAME} PROPERTY LINK_FLAGS )
+set( LINK_FLAGS "${LINK_FLAGS} /INCLUDE:__imp__D3DCompile@44" )
+set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS ${LINK_FLAGS} )

 # add library dependencies here; leave ${PLUGIN_INTERNAL_DEPS} there unless you know what you're doing!
 target_link_libraries( ${PROJECT_NAME}
@@ -113,7 +113,7 @@
         strmiids.lib
         ${OPENSSL_LIBRARIES}
         Crypt32.lib
-    )
+        )

     target_link_libraries( ${PROJECT_NAME} debug "$ENV{QTDIR}/lib/qtharfbuzzngd.lib" )
     target_link_libraries( ${PROJECT_NAME} debug "$ENV{QTDIR}/lib/translatord.lib" )
@@ -130,14 +130,14 @@
     target_link_libraries( ${PROJECT_NAME} optimized "$ENV{QTDIR}/qml/QtQuick/Layouts/qquicklayoutsplugin.lib" )
 endif( QT_STATIC )

-set(WIX_HEAT_FLAGS
+set( WIX_HEAT_FLAGS
     -gg                 # Generate GUIDs
     -srd                # Suppress Root Dir
     -cg PluginDLLGroup  # Set the Component group name
     -dr INSTALLDIR      # Set the directory ID to put the files in
     )

-set(VLC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/vlc-${VLC_VERSION})
+set( VLC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/vlc-${VLC_VERSION} )

 #generate vlc.wxs
 execute_process(
@@ -145,14 +145,14 @@
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix
     )

-set (WIX_SOURCES_WITH_VLC
+set( WIX_SOURCES_WITH_VLC
     ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/ChimeraInstaller.wxs
     ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/vlc.wxs
     ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/qt.wxs
     )

-set(WIX_LINK_FLAGS ${WIX_LINK_FLAGS} -dVLC=${VLC_PATH} -dQTDIR=$ENV{QTDIR})
-set(FB_WIX_DEST ${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/${PLUGIN_NAME}_${FBSTRING_PLUGIN_VERSION}_vlc_${VLC_VERSION}.msi)
+set( WIX_LINK_FLAGS ${WIX_LINK_FLAGS} -dVLC=${VLC_PATH} -dQTDIR=$ENV{QTDIR} )
+set( FB_WIX_DEST ${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/${PLUGIN_NAME}_${FBSTRING_PLUGIN_VERSION}_vlc_${VLC_VERSION}.msi )

 add_wix_installer( ${PLUGIN_NAME}
     "${WIX_SOURCES_WITH_VLC}"


CMake fix from Dan Wexler: WIN32, not WINDOWS

git-svn-id: c3edda122e248ef33995da003806c930f62b9468@691 31904243-a364-42ac-a3db-9305396518ba

--- src/cmake/platform.cmake
+++ src/cmake/platform.cmake
@@ -21,7 +21,7 @@
     ENDIF ()
 ENDIF ()

-IF ( WINDOWS )
+IF ( WIN32 )
     MESSAGE (STATUS "Windows!")
     SET ( platform "windows" )
 ENDIF ()


Add check for nvhpc stdpar numeric header.

--- test/cmake/check_source_files.cmake
+++ test/cmake/check_source_files.cmake
@@ -67,6 +67,7 @@

 set(algorithm_regex "#[ \t]*include[ \t]+<algorithm>")
 set(memory_regex    "#[ \t]*include[ \t]+<memory>")
+set(numeric_regex   "#[ \t]*include[ \t]+<numeric>")

 # Validation check for the above regex pattern:
 count_substrings([=[
@@ -120,6 +121,7 @@
   if (NOT ${src} IN_LIST stdpar_header_exclusions)
     count_substrings("${src_contents}" "${algorithm_regex}" algorithm_count)
     count_substrings("${src_contents}" "${memory_regex}" memory_count)
+    count_substrings("${src_contents}" "${numeric_regex}" numeric_count)

     if (NOT algorithm_count EQUAL 0)
       message("'${src}' includes the <algorithm> header. Replace with <thrust/detail/algorithm_wrapper.h>.")
@@ -130,6 +132,11 @@
       message("'${src}' includes the <memory> header. Replace with <thrust/detail/memory_wrapper.h>.")
       set(found_errors 1)
     endif()
+
+    if (NOT numeric_count EQUAL 0)
+      message("'${src}' includes the <numeric> header. Replace with <thrust/detail/numeric_wrapper.h>.")
+      set(found_errors 1)
+    endif()
   endif()
 endforeach()


Made glob-expression for finding removeable folders prettier

--- src/cmake/boost-download.cmake
+++ src/cmake/boost-download.cmake
@@ -109,12 +109,8 @@

     file(GLOB NON_SOURCE_DIRS
         ABSOLUTE "${args_BOOST_DIR}/"
-            "${args_BOOST_DIR}/libs/*/doc/"
-            "${args_BOOST_DIR}/libs/*/example/"
-            "${args_BOOST_DIR}/libs/*/test/"
-            "${args_BOOST_DIR}/tools/*/doc/"
-            "${args_BOOST_DIR}/tools/*/example/"
-            "${args_BOOST_DIR}/tools/*/test/"
+            "${args_BOOST_DIR}/libs/*/{doc,test,example}/"
+            "${args_BOOST_DIR}/tools/*/{doc,test,example}/"
     )

     foreach(DIR ${NON_SOURCE_DIRS})