Search more aggressively for libs needed by SDL_sound

--- cmake/FindSDL_sound.cmake
+++ cmake/FindSDL_sound.cmake
@@ -146,215 +146,264 @@
         # The ;-framework Cocoa seems to be confusing CMake once the OS X
         # framework support was added. I was told that breaking up the list
         # would fix the problem.
-        set(TMP_TRY_LIBS)
+        set(TMP_LIBS "")
         if(SDL2_FOUND)
+            set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY} ${SDL2_LIBRARY})
             foreach(lib ${SDL_SOUND_LIBRARY} ${SDL2_LIBRARY})
-                set(TMP_TRY_LIBS "${TMP_TRY_LIBS} \"${lib}\"")
+                set(TMP_LIBS "${TMP_LIBS} \"${lib}\"")
             endforeach()
             set(TMP_INCLUDE_DIRS ${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
         else()
+            set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
             foreach(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
-                set(TMP_TRY_LIBS "${TMP_TRY_LIBS} \"${lib}\"")
+                set(TMP_LIBS "${TMP_LIBS} \"${lib}\"")
             endforeach()
             set(TMP_INCLUDE_DIRS ${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
         endif()

-        # message("TMP_TRY_LIBS ${TMP_TRY_LIBS}")
-
-        # Write the CMakeLists.txt and test project
-        # Weird, this is still sketchy. If I don't quote the variables
-        # in the TARGET_LINK_LIBRARIES, I seem to loose everything
-        # in the SDL2_LIBRARY string after the "-framework".
-        # But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
-        file(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
-            "cmake_minimum_required(VERSION 2.8)
-            project(DetermineSoundLibs C)
-            include_directories(${TMP_INCLUDE_DIRS})
-            add_executable(DetermineSoundLibs DetermineSoundLibs.c)
-            target_link_libraries(DetermineSoundLibs ${TMP_TRY_LIBS})"
-        )
-        unset(TMP_INCLUDE_DIRS)
-        unset(TMP_TRY_LIBS)
-
-        try_compile(
-            MY_RESULT
-            ${PROJECT_BINARY_DIR}/CMakeTmp
-            ${PROJECT_BINARY_DIR}/CMakeTmp
-            DetermineSoundLibs
-            OUTPUT_VARIABLE MY_OUTPUT
-        )
-        # message("${MY_RESULT}")
-        # message(${MY_OUTPUT})
-
-        if(NOT MY_RESULT)
-            # I expect that MPGLIB, VOC, WAV, AIFF, and SHN are compiled in statically.
-            # I think Timidity is also compiled in statically.
-            # I've never had to explcitly link against Quicktime, so I'll skip that for now.
-
-            set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY})
-
-            # Find MikMod
-            if("${MY_OUTPUT}" MATCHES "MikMod_")
-                find_library(MIKMOD_LIBRARY
-                    NAMES libmikmod-coreaudio mikmod
-                    PATHS
-                        ENV MIKMODDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(MIKMOD_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY})
-                endif(MIKMOD_LIBRARY)
-            endif("${MY_OUTPUT}" MATCHES "MikMod_")
-
-            # Find ModPlug
-            if("${MY_OUTPUT}" MATCHES "MODPLUG_")
-                find_library(MODPLUG_LIBRARY
-                    NAMES modplug
-                    PATHS
-                        ENV MODPLUGDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(MODPLUG_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY})
+        # Keep trying to build a temp project until we find all missing libs.
+        set(TRY_AGAIN TRUE)
+        WHILE(TRY_AGAIN)
+            set(TRY_AGAIN FALSE)
+            # message("TMP_TRY_LIBS ${TMP_TRY_LIBS}")
+
+            # Write the CMakeLists.txt and test project
+            # Weird, this is still sketchy. If I don't quote the variables
+            # in the TARGET_LINK_LIBRARIES, I seem to loose everything
+            # in the SDL2_LIBRARY string after the "-framework".
+            # But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
+            file(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
+                "cmake_minimum_required(VERSION 2.8)
+                project(DetermineSoundLibs C)
+                include_directories(${TMP_INCLUDE_DIRS})
+                add_executable(DetermineSoundLibs DetermineSoundLibs.c)
+                target_link_libraries(DetermineSoundLibs ${TMP_LIBS})"
+            )
+
+            try_compile(
+                MY_RESULT
+                ${PROJECT_BINARY_DIR}/CMakeTmp
+                ${PROJECT_BINARY_DIR}/CMakeTmp
+                DetermineSoundLibs
+                OUTPUT_VARIABLE MY_OUTPUT
+            )
+            # message("${MY_RESULT}")
+            # message(${MY_OUTPUT})
+
+            if(NOT MY_RESULT)
+                # I expect that MPGLIB, VOC, WAV, AIFF, and SHN are compiled in statically.
+                # I think Timidity is also compiled in statically.
+                # I've never had to explcitly link against Quicktime, so I'll skip that for now.
+
+                # Find libmath
+                if("${MY_OUTPUT}" MATCHES "cos@@GLIBC")
+                    find_library(MATH_LIBRARY NAMES m)
+                    if(MATH_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MATH_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${MATH_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif(MATH_LIBRARY)
+                endif("${MY_OUTPUT}" MATCHES "cos@@GLIBC")
+
+                # Find MikMod
+                if("${MY_OUTPUT}" MATCHES "MikMod_")
+                    find_library(MIKMOD_LIBRARY
+                        NAMES libmikmod-coreaudio mikmod
+                        PATHS
+                            ENV MIKMODDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(MIKMOD_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${MIKMOD_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif(MIKMOD_LIBRARY)
+                endif("${MY_OUTPUT}" MATCHES "MikMod_")
+
+                # Find ModPlug
+                if("${MY_OUTPUT}" MATCHES "MODPLUG_")
+                    find_library(MODPLUG_LIBRARY
+                        NAMES modplug
+                        PATHS
+                            ENV MODPLUGDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(MODPLUG_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${MODPLUG_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+                endif()
+
+                # Find Ogg and Vorbis
+                if("${MY_OUTPUT}" MATCHES "ov_")
+                    find_library(VORBISFILE_LIBRARY
+                        NAMES vorbisfile VorbisFile VORBISFILE
+                        PATHS
+                            ENV VORBISDIR
+                            ENV OGGDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(VORBISFILE_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBISFILE_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${VORBISFILE_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+
+                    find_library(VORBIS_LIBRARY
+                        NAMES vorbis Vorbis VORBIS
+                        PATHS
+                            ENV OGGDIR
+                            ENV VORBISDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(VORBIS_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${VORBIS_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+
+                    find_library(OGG_LIBRARY
+                        NAMES ogg Ogg OGG
+                        PATHS
+                            ENV OGGDIR
+                            ENV VORBISDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(OGG_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${OGG_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+                endif()
+
+                # Find SMPEG
+                if("${MY_OUTPUT}" MATCHES "SMPEG_")
+                    find_library(SMPEG_LIBRARY
+                        NAMES smpeg SMPEG Smpeg SMpeg
+                        PATHS
+                            ENV SMPEGDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(SMPEG_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${SMPEG_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+                endif()
+
+
+                # Find FLAC
+                if("${MY_OUTPUT}" MATCHES "FLAC_")
+                    find_library(FLAC_LIBRARY
+                        NAMES flac FLAC
+                        PATHS
+                            ENV FLACDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(FLAC_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${FLAC_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+                endif()
+
+
+                # Hmmm...Speex seems to depend on Ogg. This might be a problem if
+                # the TRY_COMPILE attempt gets blocked at SPEEX before it can pull
+                # in the Ogg symbols. I'm not sure if I should duplicate the ogg stuff
+                # above for here or if two ogg entries will screw up things.
+                if("${MY_OUTPUT}" MATCHES "speex_")
+                    find_library(SPEEX_LIBRARY
+                        NAMES speex SPEEX
+                        PATHS
+                            ENV SPEEXDIR
+                            ENV SDLSOUNDDIR
+                            ENV SDLDIR
+                            /sw
+                            /opt/local
+                            /opt/csw
+                            /opt
+                        PATH_SUFFIXES lib
+                    )
+                    if(SPEEX_LIBRARY)
+                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY})
+                        set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${SPEEX_LIBRARY}\"")
+                        set(TRY_AGAIN TRUE)
+                    endif()
+
+                    # Find OGG (needed for Speex)
+                    # We might have already found Ogg for Vorbis, so skip it if so.
+                    if(NOT OGG_LIBRARY)
+                        find_library(OGG_LIBRARY
+                            NAMES ogg Ogg OGG
+                            PATHS
+                                ENV OGGDIR
+                                ENV VORBISDIR
+                                ENV SPEEXDIR
+                                ENV SDLSOUNDDIR
+                                ENV SDLDIR
+                                /sw
+                                /opt/local
+                                /opt/csw
+                                /opt
+                            PATH_SUFFIXES lib
+                        )
+                        if(OGG_LIBRARY)
+                            set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
+                            set(TMP_LIBS "${SDL_SOUND_LIBRARIES_TMP} \"${OGG_LIBRARY}\"")
+                            set(TRY_AGAIN TRUE)
+                        endif()
+                    endif()
                 endif()
             endif()
-
-            # Find Ogg and Vorbis
-            if("${MY_OUTPUT}" MATCHES "ov_")
-                find_library(VORBIS_LIBRARY
-                    NAMES vorbis Vorbis VORBIS
-                    PATHS
-                        ENV VORBISDIR
-                        ENV OGGDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(VORBIS_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY})
-                endif()
-                find_library(OGG_LIBRARY
-                    NAMES ogg Ogg OGG
-                    PATHS
-                        ENV OGGDIR
-                        ENV VORBISDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(OGG_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
-                endif()
-            endif()
-
-            # Find SMPEG
-            if("${MY_OUTPUT}" MATCHES "SMPEG_")
-                find_library(SMPEG_LIBRARY
-                    NAMES smpeg SMPEG Smpeg SMpeg
-                    PATHS
-                        ENV SMPEGDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(SMPEG_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY})
-                endif()
-            endif()
-
-
-            # Find FLAC
-            if("${MY_OUTPUT}" MATCHES "FLAC_")
-                find_library(FLAC_LIBRARY
-                    NAMES flac FLAC
-                    PATHS
-                        ENV FLACDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(FLAC_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY})
-                endif()
-            endif()
-
-
-            # Hmmm...Speex seems to depend on Ogg. This might be a problem if
-            # the TRY_COMPILE attempt gets blocked at SPEEX before it can pull
-            # in the Ogg symbols. I'm not sure if I should duplicate the ogg stuff
-            # above for here or if two ogg entries will screw up things.
-            if("${MY_OUTPUT}" MATCHES "speex_")
-                find_library(SPEEX_LIBRARY
-                    NAMES speex SPEEX
-                    PATHS
-                        ENV SPEEXDIR
-                        ENV SDLSOUNDDIR
-                        ENV SDLDIR
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                    PATH_SUFFIXES lib
-                )
-                if(SPEEX_LIBRARY)
-                    set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY})
-                endif()
-
-                # Find OGG (needed for Speex)
-                # We might have already found Ogg for Vorbis, so skip it if so.
-                if(NOT OGG_LIBRARY)
-                    find_library(OGG_LIBRARY
-                        NAMES ogg Ogg OGG
-                        PATHS
-                            ENV OGGDIR
-                            ENV VORBISDIR
-                            ENV SPEEXDIR
-                            ENV SDLSOUNDDIR
-                            ENV SDLDIR
-                            /sw
-                            /opt/local
-                            /opt/csw
-                            /opt
-                        PATH_SUFFIXES lib
-                    )
-                    if(OGG_LIBRARY)
-                        set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
-                    endif()
-                endif()
-            endif()
-
-            set(SDL_SOUND_LIBRARIES ${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP} CACHE INTERNAL "SDL_sound and dependent libraries")
-        else()
-            set(SDL_SOUND_LIBRARIES ${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY} CACHE INTERNAL "SDL_sound and dependent libraries")
-        endif()
+        ENDWHILE()
+        unset(TMP_INCLUDE_DIRS)
+        unset(TMP_LIBS)
+
+        set(SDL_SOUND_LIBRARIES ${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP} CACHE INTERNAL "SDL_sound and dependent libraries")
     endif()
 endif()


Temporarily disable Boost::ASIO on Mac

Temporarily disable Boost::ASIO on Mac

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -142,8 +142,9 @@
 endif ()

 if (APPLE)
-  set(USE_AVFOUNDATION 1)
-  set(USE_METAL 1)
+	set(USE_AVFOUNDATION 1)
+	set(USE_METAL 1)
+	set(USE_ASIO 0)
 endif ()

 # Libs


choose the proper path for the js config directory

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -23,7 +23,7 @@
     set(SBINDIR "@ROOTDIR@/${CMAKE_INSTALL_SBINDIR}")
     set(SYSCONFDIR "@ROOTDIR@/${CMAKE_INSTALL_SYSCONFDIR_ARANGO}")
   else ()
-    set(PKGDATADIR "${CMAKE_INSTALL_DATAROOTDIR_ARANGO}")
+    set(PKGDATADIR "${CMAKE_INSTALL_FULL_DATAROOTDIR_ARANGO}")
     set(LOCALSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}")
   endif()


Add missing build dependency between mora and golang.

--- build/cmake/mora.cmake
+++ build/cmake/mora.cmake
@@ -13,6 +13,7 @@

 ExternalProject_Add(
   mora
+  DEPENDS golang
   URL https://github.com/emicklei/mora/archive/${MORA_VERSION}.tar.gz
   URL_HASH MD5=${MORA_HASH}
   SOURCE_DIR ${WORK_DIR}/gocode/src/github.com/emicklei/mora


CMake: FindGASNet: Fix an error when a compatible make cannot be found

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -68,29 +68,33 @@
 gasnet-libs:
 	@echo $(GASNET_LIBS) $(GASNETTOOLS_LIBS)"
   )
-  find_program(GASNet_MAKE_PROGRAM gmake make smake)
-  mark_as_advanced(GASNet_MAKE_PROGRAM)
-  execute_process(
-    COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-cflags
-    OUTPUT_VARIABLE _GASNet_CFLAGS
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
-  )
-  execute_process(
-    COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-cxxflags
-    OUTPUT_VARIABLE _GASNet_CXXFLAGS
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
-  )
-  execute_process(
-    COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-ldflags
-    OUTPUT_VARIABLE _GASNet_LDFLAGS
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
-  )
-  execute_process(
-    COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-libs
-    OUTPUT_VARIABLE _GASNet_LIBS
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
-  )
-  file(REMOVE ${_TEMP_MAKEFILE})
+  find_program(GASNet_MAKE_PROGRAM NAMES gmake make smake)
+  if(NOT GASNet_MAKE_PROGRAM)
+    message(WARNING "Unable to locate compatible make for parsing GASNet makefile options")
+  else()
+    execute_process(
+      COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-cflags
+      OUTPUT_VARIABLE _GASNet_CFLAGS
+      OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
+    )
+    execute_process(
+      COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-cxxflags
+      OUTPUT_VARIABLE _GASNet_CXXFLAGS
+      OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
+    )
+    execute_process(
+      COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-ldflags
+      OUTPUT_VARIABLE _GASNet_LDFLAGS
+      OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
+    )
+    execute_process(
+      COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-libs
+      OUTPUT_VARIABLE _GASNet_LIBS
+      ERROR_VARIABLE _GASNet_LIBS_ERROR
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    file(REMOVE ${_TEMP_MAKEFILE})
+  endif()
 endmacro()

 macro(_GASNet_parse_flags INVAR FLAG OUTVAR)
@@ -99,7 +103,7 @@
   string(REGEX MATCHALL "(^| +)${FLAG}([^ ]*)" OUTTMP "${INVAR2}")
   foreach(OPT IN LISTS OUTTMP)
     string(REGEX REPLACE "(^| +)${FLAG}([^ ]*)" "\\2" OPT "${OPT}")
-    if(OPT STREQUAL "NDEBUG") # NDEBUG should get propogated
+    if(OPT STREQUAL "NDEBUG") # NDEBUG should not get propogated
       continue()
     endif()
     list(FIND ${OUTVAR} "${OPT}" _I)
@@ -120,6 +124,10 @@
     _GASNet_parse_flags(${V} "-L" LDIRS)
     _GASNet_parse_flags(${V} "-l" LIBS)
   endforeach()
+  if(NOT LIBS)
+    message(WARNING "Unable to find link libraries for gasnet-${COMPONENT_NAME}")
+    return()
+  endif()
   list(REMOVE_ITEM LIBS gasnet-${COMPONENT_NAME})

   foreach(L IN LISTS LIBS)
@@ -203,6 +211,9 @@
       _GASNet_create_component_target("${CMF}" ${_COMPONENT}
         "${GASNet_${_COMPONENT}_LIBRARY}"
       )
+      if(NOT TARGET GASNet::${_COMPONENT})
+        message(WARNING "Unable to create GASNet::${_COMPONENT} target")
+      endif()
     endforeach()

     # Restore the existing prefix options
@@ -244,6 +255,9 @@
     message(FATAL_ERROR "Invalid GASNet_THREADING setting.  Valid options are: ${GASNet_THREADINGS}")
   endif()

+  if(NOT TARGET GASNet::${GASNet_CONDUIT}-${GASNet_THREADING})
+    message(FATAL_ERROR "Unable to use selected CONDUIT-THREADING combination: ${GASNet_CONDUIT}-${GASNet_THREADING}")
+  endif()
   message(STATUS "GASNet: Using ${GASNet_CONDUIT}-${GASNet_THREADING}")
   add_library(GASNet::GASNet INTERFACE IMPORTED)
   set_target_properties(GASNet::GASNet PROPERTIES


[cmake] Matlab: remove old VS generator detection

--- cmake/FindMATLAB.cmake
+++ cmake/FindMATLAB.cmake
@@ -68,26 +68,13 @@
   ENDIF()

   # Folder where the MEX libraries are, depending of the Windows compiler
-  IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
-    SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/msvc60")
-  ELSEIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
-    # Assume people are generally using Visual Studio 7.1,
-    # if using 7.0 need to link to: ../extern/lib/${WINDIR}/microsoft/msvc70
-    SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/msvc71")
-    # SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/msvc70")
-  ELSEIF(${CMAKE_GENERATOR} MATCHES "Borland")
-    # Assume people are generally using Borland 5.4,
-    # if using 7.0 need to link to: ../extern/lib/${WINDIR}/microsoft/msvc70
-    SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/bcc54")
-    # SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/bcc50")
-    # SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/bcc51")
-  ELSEIF(${CMAKE_GENERATOR} MATCHES "Visual Studio*")
+  IF(${CMAKE_GENERATOR} MATCHES "Visual Studio*")
     # If the compiler is Visual Studio, but not any of the specific
     # versions above, we try our luck with the microsoft directory
     SET(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/")
-  ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+  ELSE()
     MESSAGE(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}")
-  ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+  ENDIF()

   # Get paths to the Matlab MEX libraries
   FIND_LIBRARY(MATLAB_MEX_LIBRARY


Tests cannot find tr1/tuple on Max OS X Adding the compiler flag fixes this on 10.10.3 with Apple LLVM version 6.1.0 (clang-602.0.53)

--- cmake/TestHelper.cmake
+++ cmake/TestHelper.cmake
@@ -34,6 +34,7 @@
 macro(add_unit_tests test_name)
     set(src_files ${ARGN})
     add_executable(${test_name} ${src_files} ${COMMON_SOURCES})
+    set_target_properties(${test_name} PROPERTIES COMPILE_FLAGS -DGTEST_USE_OWN_TR1_TUPLE=1)
     target_link_libraries(${test_name} ${TEST_LIBS} gtest gtest_main ${CMAKE_THREAD_LIBS_INIT})
     add_dependencies(${test_name} gtest160)
     if($ENV{BC_UNIT_TEST_VG})
@@ -50,6 +51,7 @@

 macro(def_test testName)
     add_executable(Test${testName} Test${testName}.cpp ${COMMON_SOURCES})
+    set_target_properties(${test_name} PROPERTIES COMPILE_FLAGS -DGTEST_USE_OWN_TR1_TUPLE=1)
     target_link_libraries(Test${testName} ${TEST_LIBS} gtest gtest_main ${CMAKE_THREAD_LIBS_INIT})
     add_dependencies(Test${testName} gtest160)
     if($ENV{BC_UNIT_TEST_VG})


revert check_reqs.cmake

revert check_reqs.cmake

--- cmake/check_reqs.cmake
+++ cmake/check_reqs.cmake
@@ -2,7 +2,7 @@

 get_property(nacl_required GLOBAL PROPERTY NACL_REQUIRED)
 if(${nacl_required})
-  if("${NACL_LIBRARIES}" STREQUAL "" AND "${NACL_LDFLAGS_OTHER}" STREQUAL "")
+  if("${NACL_LIBRARIES}" STREQUAL "")
     if(ENABLE_LIBSODIUM)
       message(FATAL_ERROR "libsodium is not available, but a selected module needs it")
     else(ENABLE_LIBSODIUM)


cmake: fixing toolchain_parse_make_rule to correctly handle `\` files

Fixes: #37637

toolchain_parse_make_rule() parses depfiles and converted `\\` to the
CMake list separator `;`.

However, gcc -M might create depfiles with windows path separator `\`
causing this conversion to fail, as a path like:
c:\...\zephyr\samples\drivers\led_ws2812\nrf52-bindings.h

resulting in a file list as:
c:;...;zephyr;samples;drivers;led_ws2812;nrf52-bindings.h

which results in a CMake configure dependency to be added to `C:`.
As C: is always newer than the build.ninja file, this resulted in
continues CMake re-invocation.

As a small side-note, the `\` in file name did only occur in situations
where a relative past had been used elsewhere in the build system, such
as here:
https://github.com/zephyrproject-rtos/zephyr/blob/\
c3050a5aab1e86d02642eb4c6a027419e6a3a096/samples/drivers/led_ws2812/\
boards/nrf52dk_nrf52832.overlay#L9

To ensure proper handling of files, then all files are converted to
CMake paths, that is with forward slashes: `/`

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -1797,30 +1797,35 @@
 # The argument 'include_files' is an output parameter with the result
 # of parsing the include files.
 function(toolchain_parse_make_rule input_file include_files)
-  file(READ ${input_file} input)
+  file(STRINGS ${input_file} input)

   # The file is formatted like this:
   # empty_file.o: misc/empty_file.c \
   # nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts \
   # nrf52840_qiaa.dtsi

-  # Get rid of the backslashes
-  string(REPLACE "\\" ";" input_as_list ${input})
+  # The dep file will contain `\` for line continuation.
+  # This results in `\;` which is then treated a the char `;` instead of
+  # the element separator, so let's get the pure `;` back.
+  string(REPLACE "\;" ";" input_as_list ${input})

   # Pop the first line and treat it specially
-  list(GET input_as_list 0 first_input_line)
+  list(POP_FRONT input_as_list first_input_line)
   string(FIND ${first_input_line} ": " index)
   math(EXPR j "${index} + 2")
   string(SUBSTRING ${first_input_line} ${j} -1 first_include_file)
-  list(REMOVE_AT input_as_list 0)
-
-  list(APPEND result ${first_include_file})
-
-  # Add the other lines
-  list(APPEND result ${input_as_list})
-
-  # Strip away the newlines and whitespaces
-  list(TRANSFORM result STRIP)
+
+  # Remove whitespace before and after filename and convert to CMake path.
+  string(STRIP "${first_include_file}" first_include_file)
+  file(TO_CMAKE_PATH "${first_include_file}" first_include_file)
+  set(result "${first_include_file}")
+
+  # Remove whitespace before and after filename and convert to CMake path.
+  foreach(file ${input_as_list})
+    string(STRIP "${file}" file)
+    file(TO_CMAKE_PATH "${file}" file)
+    list(APPEND result "${file}")
+  endforeach()

   set(${include_files} ${result} PARENT_SCOPE)
 endfunction()


[Conf] Takes into account CMake version for CMP0093

--- config/FindBoost.cmake
+++ config/FindBoost.cmake
@@ -247,9 +247,7 @@

 # Save project's policies
 cmake_policy(PUSH)
-if (${CMAKE_VERSION} VERSION_GREATER 3.15)
-  cmake_policy(SET CMP0057 NEW) # if IN_LIST
-endif (${CMAKE_VERSION} VERSION_GREATER 3.15)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST

 function(_boost_get_existing_target component target_var)
   set(names "${component}")
@@ -1642,9 +1640,12 @@
   set(Boost_VERSION_STRING "${Boost_VERSION_MAJOR}.${Boost_VERSION_MINOR}.${Boost_VERSION_PATCH}")

   # Define final Boost_VERSION
-  cmake_policy(GET CMP0093 _Boost_CMP0093
-    PARENT_SCOPE # undocumented, do not use outside of CMake
-  )
+  if (${CMAKE_VERSION} VERSION_GREATER 3.15)
+    cmake_policy(GET CMP0093 _Boost_CMP0093
+      PARENT_SCOPE # undocumented, do not use outside of CMake
+    )
+  endif (${CMAKE_VERSION} VERSION_GREATER 3.15)
+
   if("x${_Boost_CMP0093}x" STREQUAL "xNEWx")
     set(Boost_VERSION ${Boost_VERSION_STRING})
   else()


AWI for Hezekiah M. Carty.  Ease linking when using ocamlfind.  This should
allow a user to compile their OCaml program using ocamlfind without having
to specify any extra linking directories.

svn path=/trunk/; revision=8598

--- bindings/ocaml/META.cmake
+++ bindings/ocaml/META.cmake
@@ -3,6 +3,7 @@
 description = "PLplot library bindings"
 version = "@VERSION@"
 browse_interfaces = " Plplot "
+linkopts = "-ccopt \"-L@SHLIB_DIR@\""
 archive(byte) = "plplot.cma"
 archive(native) = "plplot.cmxa"


Make coverage_report reentrant

Make coverage_report reentrant

--- Coverage.cmake
+++ Coverage.cmake
@@ -59,23 +59,31 @@
     # Tweak coverage limits to yellow 40%/green 80%
     set(COVERAGE_LIMITS --rc genhtml_med_limit=40 --rc genhtml_hi_limit=80)
   endif()
-  add_custom_target(${PROJECT_NAME}_lcov-gather
-    COMMAND ${LCOV} -q --capture --directory . --no-external --directory ${PROJECT_SOURCE_DIR} --output-file lcov.info
-    COMMENT "Capturing code coverage counters"
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-    DEPENDS ${ARGV})
-  add_custom_target(${PROJECT_NAME}_lcov-remove
-    COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '*.l' 'CMake/test/*' '*/install/*' '${PROJECT_BINARY_DIR}/*' ${LCOV_EXCLUDE} --output-file lcov2.info
-    COMMENT "Cleaning up code coverage counters"
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-    DEPENDS ${PROJECT_NAME}_lcov-gather)
-  add_custom_target(${PROJECT_NAME}_lcov-html
-    COMMAND ${GENHTML} -q --title ${PROJECT_NAME} ${COVERAGE_LIMITS} -o CoverageReport ${PROJECT_BINARY_DIR}/lcov2.info
-    COMMENT "Creating html coverage report, open ${PROJECT_BINARY_DIR}/doc/html/CoverageReport/index.html "
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/html
-    DEPENDS ${PROJECT_NAME}_lcov-remove)
+  if(NOT TARGET ${PROJECT_NAME}_lcov-gather)
+    add_custom_target(${PROJECT_NAME}_lcov-gather
+      COMMAND ${LCOV} -q --capture --directory . --no-external
+        --directory ${PROJECT_SOURCE_DIR} --output-file lcov.info
+      COMMENT "Capturing code coverage counters"
+      WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
+    add_custom_target(${PROJECT_NAME}_lcov-remove
+      COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '*.l' 'CMake/test/*'
+        '*/install/*' '${PROJECT_BINARY_DIR}/*' ${LCOV_EXCLUDE}
+        --output-file lcov2.info
+      COMMENT "Cleaning up code coverage counters"
+      WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+      DEPENDS ${PROJECT_NAME}_lcov-gather)
+    add_custom_target(${PROJECT_NAME}_lcov-html
+      COMMAND ${GENHTML} -q --title ${PROJECT_NAME} ${COVERAGE_LIMITS}
+        -o CoverageReport ${PROJECT_BINARY_DIR}/lcov2.info
+      COMMENT "Creating html coverage report, open ${PROJECT_BINARY_DIR}/doc/html/CoverageReport/index.html "
+      WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/html
+      DEPENDS ${PROJECT_NAME}_lcov-remove)
+  endif()
   make_directory(${PROJECT_BINARY_DIR}/doc/html)

+  if(ARGV)
+    add_dependencies(${PROJECT_NAME}_lcov-gather ${ARGV})
+  endif()
   if(NOT TARGET coverage)
     add_custom_target(coverage)
   endif()


SK:

SK:

-BUG: something doesn't work

--- src/Testing/Dashboard/elxDashboard_BIGR_winXP32_VS2008.cmake
+++ src/Testing/Dashboard/elxDashboard_BIGR_winXP32_VS2008.cmake
@@ -20,7 +20,8 @@
 #set( CTEST_BUILD_FLAGS "-j2" ) # parallel build for makefiles
 set( CTEST_BUILD_CONFIGURATION Release )
 set( CTEST_CMAKE_GENERATOR "Visual Studio 9 2008" )
-set( CTEST_DASHBOARD_ROOT "D:/tk/mydash/${CTEST_SCRIPT_NAME}" )
+#set( CTEST_DASHBOARD_ROOT "D:/tk/mydash/${CTEST_SCRIPT_NAME}" )
+set( CTEST_DASHBOARD_ROOT "D:/tk/mydash/elastixnightly" )

 # default: automatically determined
 #set(CTEST_UPDATE_COMMAND /path/to/svn)


STYLE: Hide options for unused remote modules.

--- CMake/ITKModuleRemote.cmake
+++ CMake/ITKModuleRemote.cmake
@@ -213,11 +213,18 @@
     endif()
     set(REMOTE_GIT_TAG_${_name} "${REMOTE_GIT_TAG}" CACHE STRING "Override default GIT_TAG value for remote module ${_name}")
     mark_as_advanced(REMOTE_GIT_TAG_${_name})
+    # Show remote module options if building.
+    set_property(CACHE REMOTE_GIT_TAG_${_name} PROPERTY TYPE STRING)

     _fetch_with_git("${GIT_EXECUTABLE}"
       "${_fetch_options_GIT_REPOSITORY}"
       "${REMOTE_GIT_TAG}"
       "${ITK_SOURCE_DIR}/Modules/Remote/${_name}"
       )
-  endif()
-endfunction()
+  else()
+    # Hide remote module options if not building.
+    if(REMOTE_GIT_TAG_${_name})
+      set_property(CACHE REMOTE_GIT_TAG_${_name} PROPERTY TYPE INTERNAL)
+    endif()
+  endif()
+endfunction()


fix: Use vc14 TBB libs when generator is Visual Studio 16 2019

--- CMake/Modules/FindTBB.cmake
+++ CMake/Modules/FindTBB.cmake
@@ -230,7 +230,7 @@

 if (WIN32 AND MSVC AND CMAKE_GENERATOR MATCHES "Visual Studio ([0-9]+)")
   set(_TBB_MSVS_VERSION ${CMAKE_MATCH_1})
-  if (_TBB_MSVS_VERSION EQUAL 15)
+  if (_TBB_MSVS_VERSION EQUAL 15 OR _TBB_MSVS_VERSION EQUAL 16)
     set(_TBB_MSVS_VERSION 14)
   endif ()
   if (CMAKE_CL_64)


Pass CUDA_NVCC_EXECUTABLE to NCCL build

Pass CUDA_NVCC_EXECUTABLE to NCCL build

Summary:
If this variable is set to a ccache symlink then the NCCL build will
also use the cache. The NCCL build is the slowest component of a cached
build without this change
Closes https://github.com/caffe2/caffe2/pull/1416

Reviewed By: Yangqing

Differential Revision: D6214008

Pulled By: pietern

fbshipit-source-id: e0a90e27de9b1c5a1fdc0e5bad5fb61f9fa924c3

--- cmake/External/nccl.cmake
+++ cmake/External/nccl.cmake
@@ -23,7 +23,10 @@
       BUILD_IN_SOURCE 1
       CONFIGURE_COMMAND ""
       BUILD_COMMAND
-          make "CXX=${CMAKE_CXX_COMPILER}" "CUDA_HOME=${CUDA_TOOLKIT_ROOT_DIR}"
+        make
+        "CXX=${CMAKE_CXX_COMPILER}"
+        "CUDA_HOME=${CUDA_TOOLKIT_ROOT_DIR}"
+        "NVCC=${CUDA_NVCC_EXECUTABLE}"
       INSTALL_COMMAND ""
       )


Fix build on Gentoo with recent GStreamer 1.0.

Partially fixed by RR 125690, this also fixes for Gentoo in my testing,
and should for other distros where gstreamer places its gst-config under
gstreamer-1.0/include.

REVIEW:126554

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -44,7 +44,7 @@
 FIND_PATH(GSTREAMER_CONF_INCLUDE_DIR gst/gstconfig.h
    PATHS
    ${PKG_GSTREAMER_INCLUDE_DIRS}
-   PATH_SUFFIXES gstreamer-1.0
+   PATH_SUFFIXES gstreamer-1.0 gstreamer-1.0/include
    )

 IF (NOT GSTREAMER_CONF_INCLUDE_DIR)


Add comment of  grpc.tar.xz (#11153)

Add comment of  grpc.tar.xz (#11153)

--- cmake/external/grpc.cmake
+++ cmake/external/grpc.cmake
@@ -45,6 +45,7 @@
     #    checkout and clean other dirs under third_party
     # 4. remove .git, and package the directory.
     URL "http://paddlepaddledeps.bj.bcebos.com/grpc-v1.8.x.tar.gz"
+    URL_MD5  "c9c58ee7d0e8929a63155af6a2ecdbd0"
     PREFIX          ${GRPC_SOURCES_DIR}
     UPDATE_COMMAND  ""
     CONFIGURE_COMMAND ""


fix the bug that PYTHON_EXECUTABLE not exists (#19225)

* test=develop,fix the inference library compilation bug on windows

* test=develop,Fix the inference library compilation bug on windows

* test=develop,fix the bug that PYTHON_EXECUTABLE not exists

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -13,6 +13,12 @@
 # limitations under the License.

 # make package for paddle fluid shared and static library
+
+if(WIN32)
+    if(NOT PYTHON_EXECUTABLE)
+	FIND_PACKAGE(PythonInterp REQUIRED)
+    endif()
+endif()

 set(COPY_SCRIPT_DIR ${PADDLE_SOURCE_DIR}/cmake)
 function(copy TARGET)


fixup test.cmake

fixup test.cmake

Change-Id: Ie7057d47cf82c7750d4fdb974a41b3075f58d7a6

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -208,8 +208,6 @@

   set(_qi_add_test_args ${_qi_add_test_args} ${_cmd})

-  message(STATUS "_qi_add_test_args: ${_qi_add_test_args}")
-
   qi_run_py_script("${qibuild_DIR}/qi_add_test.py"
     ARGUMENTS ${_qi_add_test_args}
   )


Split off 7.12.102

Split off 7.12.102

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 12 )
-set ( HPCC_POINT 101 )
+set ( HPCC_POINT 103 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.6.42

Split off 7.6.42

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 6 )
-set ( HPCC_POINT 41 )
+set ( HPCC_POINT 43 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.60

Split off 8.0.60

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 59 )
+set ( HPCC_POINT 61 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Small adjustemnt in XSDKDefaults.cmake

Small adjustemnt in XSDKDefaults.cmake

--- config/XSDKDefaults.cmake
+++ config/XSDKDefaults.cmake
@@ -166,14 +166,14 @@
     ENDIF()
     XSDK_HANDLE_LANG_DEFAULTS(Fortran  FC  "FFLAGS;FCFLAGS")
   ENDIF()
-
+
   # Set XSDK defaults for other CMake variables
-
+
   IF ("${BUILD_SHARED_LIBS}"  STREQUAL  "")
     MESSAGE("-- " "XSDK: Setting default BUILD_SHARED_LIBS=TRUE")
     SET(BUILD_SHARED_LIBS  TRUE  CACHE  BOOL  "Set by default in XSDK mode")
   ENDIF()
-
+
   IF ("${CMAKE_BUILD_TYPE}"  STREQUAL  "")
     MESSAGE("-- " "XSDK: Setting default CMAKE_BUILD_TYPE=DEBUG")
     SET(CMAKE_BUILD_TYPE  DEBUG  CACHE  STRING  "Set by default in XSDK mode")
@@ -181,9 +181,12 @@

 ENDIF()

-#
-# Set TPL MFEM_USE_* Defaults
-#
+
+##################################################################################
+#
+#               MFEM-specific additions: set TPL MFEM_USE_* defaults
+#
+##################################################################################

 IF (DEFINED TPL_ENABLE_MPI)
   SET(MFEM_USE_MPI ${TPL_ENABLE_MPI} CACHE BOOL "Enable MPI parallel build" FORCE)


r9980/sofa : Quick and dirty fix for some mac users using macports (libGLEW not found bug)

Former-commit-id: 8cbcfa4641e6179f2a8c389550fe6606db97d6fb

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -11,7 +11,12 @@

 if(UNIX)
         find_path(GLEW_INCLUDE_DIR GL/glew.h)
-        find_library(GLEW_LIBRARIES NAMES glew64 GLEW glew glew32)
+        # quick and dirty fix fore some macs using macports
+        find_library(GLEW_LIBRARIES NAMES glew64 GLEW glew glew32 PATHS "/opt/local/lib" NO_DEFAULT_PATH)
+	if(NOT EXISTS ${GLEW_LIBRARIES})
+		find_library(GLEW_LIBRARIES NAMES glew64 GLEW glew glew32)
+	endif()
+	#message(STATUS "GLEW Lib found: GLEW_LIBRARIES=${GLEW_LIBRARIES} GLEW_INCLUDE_DIR=${GLEW_INCLUDE_DIR}")

 	if(EXISTS "${GLEW_INCLUDE_DIR}/GL/glew.h" AND EXISTS ${GLEW_LIBRARIES})
 		if (NOT DEFINED GLEW_FOUND)


CMake: export ROOT's C++ flags, libc++ and C++11

--- cmake/FindROOT.cmake
+++ cmake/FindROOT.cmake
@@ -29,6 +29,9 @@
 # - ROOT_LIBRARIES - libraries needed for the package to be used
 # - ROOT_GLIBRARIES - regular + GUI ROOT libraries + path to be used during linking
 # - ROOT_INCLUDE_DIR - full path to ROOT include folder
+# - ROOT_CXX_FLAGS - flags used by the C++ compiler for building ROOT
+# - ROOT_HAS_LIBCXX - TRUE if ROOT was built against libc++ (as opposed to libstdc++)
+# - ROOT_HAS_CXX11 - TRUE if ROOT was built with C++11 support
 # - ROOT_HASALIEN - ROOT was built with AliEn support
 # - ROOT_HASOPENGL - ROOT was built with OpenGL support
 # - ROOT_HASXML - ROOT was built with XML support
@@ -128,6 +131,28 @@
     string(STRIP "${ROOT_INCDIR}" ROOT_INCDIR)
     set(ROOT_INCLUDE_DIR ${ROOT_INCDIR})

+    # Setting ROOT compiler flags (except the -I parts) to a variable
+    execute_process(COMMAND ${ROOT_CONFIG} --auxcflags OUTPUT_VARIABLE _ROOT_CXX_FLAGS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(error)
+        message(FATAL_ERROR "Error retrieving ROOT compiler flags: ${error}")
+    endif(error)
+    string(STRIP "${_ROOT_CXX_FLAGS}" ROOT_CXX_FLAGS)
+
+    # Check if ROOT was built with libc++ (as opposed to stdlibc++)
+    if(ROOT_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+")
+        set(ROOT_HAS_LIBCXX TRUE)
+    else()
+        set(ROOT_HAS_LIBCXX FALSE)
+    endif()
+
+    # Check if ROOT was built with C++11 support
+    if(ROOT_CXX_FLAGS MATCHES "-std=c\\+\\+11")
+        message(STATUS "ROOT was built with C++11 support")
+        set(ROOT_HAS_CXX11 TRUE)
+    else()
+        set(ROOT_HAS_CXX11 FALSE)
+    endif()
+
     # Checking for glibs
     execute_process(COMMAND ${ROOT_CONFIG} --noldflags --glibs OUTPUT_VARIABLE ROOT_GLIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
@@ -219,7 +244,6 @@
             set(ROOT_HASOPENGL FALSE)
         endif()
     endif()
-

     # Checking for fortran compiler
     execute_process(COMMAND ${ROOT_CONFIG} --f77 OUTPUT_VARIABLE ROOT_FORTRAN ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )


Make {A,UB,T}San optional when building.

--- cmake/SetFlags.cmake
+++ cmake/SetFlags.cmake
@@ -1,3 +1,7 @@
+option(USE_ASAN "Enable AddressSanitizer for debug builds" ON)
+option(USE_UBSAN "Enable UndefinedBehaviorSanitizer for debug builds" ON)
+option(USE_TSAN "Enable ThreadSanitizer for debug builds" OFF)
+
 function(cmuSetCompileFlags)
 	if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
 		set(F_WARN "-pedantic -Wall -Wextra -Wcast-align -Wcast-qual")
@@ -12,8 +16,17 @@
 		set(F_WARN "${F_WARN} -Wstrict-overflow=5")

 		set(F_DBG "${F_WARN} -std=c++1y -g -O0 -fno-omit-frame-pointer")
-		set(F_DBG "${F_DBG} -fsanitize=address -fsanitize=undefined")
 		set(F_DBG "${F_DBG} -fstack-protector-strong")
+
+		if(USE_ASAN)
+			set(F_DBG "${F_DBG} -fsanitize=address")
+		endif()
+		if(USE_UBSAN)
+			set(F_DBG "${F_DBG} -fsanitize=undefined")
+		endif()
+		if(USE_TSAN)
+			set(F_DBG "${F_DBG} -fsanitize=thread")
+		endif()

 		set(F_REL "${F_WARN} -std=c++1y -O2 -fomit-frame-pointer")
 		set(F_REL "${F_REL} -fstack-protector-strong")
@@ -27,8 +40,17 @@
 		set(F_WARN "${F_WARN} -Wno-disabled-macro-expansion")

 		set(F_DBG "${F_WARN} -std=c++1y -g -O0 -fno-omit-frame-pointer")
-		set(F_DBG "${F_DBG} -fsanitize=address -fsanitize=undefined")
 		set(F_DBG "${F_DBG} -fstack-protector-strong")
+
+		if(USE_ASAN)
+			set(F_DBG "${F_DBG} -fsanitize=address")
+		endif()
+		if(USE_UBSAN)
+			set(F_DBG "${F_DBG} -fsanitize=undefined")
+		endif()
+		if(USE_TSAN)
+			set(F_DBG "${F_DBG} -fsanitize=thread")
+		endif()

 		set(F_REL "${F_WARN} -std=c++1y -O2 -fomit-frame-pointer")
 		set(F_REL "${F_REL} -fstack-protector-strong")


cmake: drop one -W flag & drop old-style-cast for C

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -235,8 +235,11 @@
       #                                              GCC                                               #
       ##################################################################################################
       if(_add_warning_flags)
-         foreach(_f -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -Wno-variadic-macros)
+         foreach(_f -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef)
             AddCompilerFlag("${_f}")
+         endforeach()
+         foreach(_f -Wold-style-cast)
+            AddCompilerFlag("${_f}" CXX_FLAGS CMAKE_CXX_FLAGS)
          endforeach()
       endif()
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wabi")


Mingw32 needs leading underscore on object names

(also copy BUNDERSCORE settings for FORTRAN from the corresponding Makefile)

--- cmake/prebuild.cmake
+++ cmake/prebuild.cmake
@@ -59,6 +59,9 @@
 if (APPLE OR (MSVC AND NOT ${CMAKE_C_COMPILER_ID} MATCHES "Clang"))
   set(FU "_")
 endif()
+if(MINGW AND NOT MINGW64)
+  set(FU "_")
+endif()

 set(COMPILER_ID ${CMAKE_C_COMPILER_ID})
 if (${COMPILER_ID} STREQUAL "GNU")
@@ -82,6 +85,11 @@
 # f_check
 if (NOT NOFORTRAN)
   include("${PROJECT_SOURCE_DIR}/cmake/f_check.cmake")
+else ()
+ file(APPEND ${TARGET_CONF_TEMP}
+   "#define BUNDERSCORE _\n"
+   "#define NEEDBUNDERSCORE 1\n")
+ set(BU "_")
 endif ()

 # Cannot run getarch on target if we are cross-compiling


Let's go with the cmake version, not the ubuntu distro.  More general.

--- cmake/tools/rt.cmake
+++ cmake/tools/rt.cmake
@@ -29,7 +29,8 @@
 # message("CMAKE_LIBRARY_PATH: ${CMAKE_LIBRARY_PATH}")
 # message("CMAKE_LIBRARY_ARCHITECTURE: ${CMAKE_LIBRARY_ARCHITECTURE}")
 # message("CMAKE_SYSTEM_LIBRARY_PATH: ${CMAKE_SYSTEM_LIBRARY_PATH}")
-if (UBUNTU_LUCID)
+message("CMAKE_VERSION=${CMAKE_VERSION}")
+if (${CMAKE_VERSION} VERSION_LESS 2.8.1)
   # cmake later than 2.8.0 appears to have a better find_library
   # that knows about the ABI of the compiler.  For lucid we just
   # depend on the linker to find it for us.
@@ -40,6 +41,3 @@
 endif()
 message(STATUS "RT_LIBRARY: ${RT_LIBRARY}")

-
-
-message(FATAL_ERROR "stop")


avoid using list(REMOVE_DUPLICATES) where order must be stable

--- cmake/toplevel.cmake
+++ cmake/toplevel.cmake
@@ -20,9 +20,11 @@
   set(catkin_search_path "")
   foreach(workspace $ENV{CATKIN_WORKSPACES})
     string(REGEX REPLACE ":.*" "" workspace ${workspace})
-    list(APPEND catkin_search_path ${workspace})
+    list(FIND catkin_search_path ${workspace} _index)
+    if(_index EQUAL -1)
+      list(APPEND catkin_search_path ${workspace})
+    endif()
   endforeach()
-  list(REMOVE_DUPLICATES catkin_search_path)

   # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
   # or CMAKE_PREFIX_PATH from the environment


Enabled -ffast-math

Enabled -ffast-math

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -1,4 +1,3 @@
-

 macro (add_flags_lnk FLAGS)
 	set(CMAKE_EXE_LINKER_FLAGS            "${CMAKE_EXE_LINKER_FLAGS}            ${FLAGS}")
@@ -50,6 +49,9 @@
 		else()
 			add_flags_cxx("-pthread")
 		endif()
+
+		#we support non-IEEE 754 fpus so can make no guarentees about error
+		add_flags_cxx("-ffast-math")

 	else()
 		# Let gcc / clang know that we're compiling a multi-threaded app:
@@ -62,6 +64,9 @@

 		# We use a signed char (fixes #640 on RasPi)
 		add_flags_cxx("-fsigned-char")
+
+		#we support non-IEEE 754 fpus so can make no guarentees about error
+		add_flags_cxx("-ffast-math")
 	endif()


Bugfix: Run numdiff without -q and actually show the diffs...

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30754 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/cmake/setup_testsuite.cmake
+++ tests/cmake/setup_testsuite.cmake
@@ -95,7 +95,7 @@

 IF("${TEST_DIFF}" STREQUAL "")
   IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND")
-      SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -q -s ' \\t\\n')
+      SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -s ' \\t\\n')
   ELSE()
       SET(TEST_DIFF ${DIFF_EXECUTABLE})
   ENDIF()


removed unnecessary status message

removed unnecessary status message

--- CMake/PackageDepends/MITK_videoInput_Config.cmake
+++ CMake/PackageDepends/MITK_videoInput_Config.cmake
@@ -1,7 +1,7 @@
 SET( VIDEOINPUT_LIB "" CACHE FILEPATH "Search for the videoInput.lib file" )
 SET( VIDEOINPUT_HEADER_DIR "" CACHE PATH "The path containing VideoInput.h" )

-message(STATUS "now in videoinput")
+#message(STATUS "now in videoinput")

 IF(CMAKE_CL_64)
   SET( STRMBASD_LIB "" CACHE FILEPATH "Search for the strmbasd.lib file. Provided by DirectShow, if not found, download Microsoft Platform SDK and go to the Samples_Multimedia_DirectShow_BaseClasses folder and compile the BaseClasses solution to generate the strmbasd.lib. Place it in the same folder as the videoInput.lib")


bump version number

bump version number

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 3)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 7)
+set (VV_VERSION_PATCH 10)


Use $(MAKE) as a build command to propagate parallel make option.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -257,6 +257,12 @@
   DEPENDS
     ${CTK_DEPENDS}
   )
+
+IF(CMAKE_GENERATOR MATCHES ".*Makefiles.*")
+  SET(ctk_build_cmd "$(MAKE)")
+ELSE()
+  SET(ctk_build_cmd ${CMAKE_COMMAND} --build ${CTK_BINARY_DIR}/CTK-build --config ${CMAKE_CFG_INTDIR})
+ENDIF()

 #-----------------------------------------------------------------------------
 # CTK
@@ -269,7 +275,7 @@
 ENDIF()

 ADD_CUSTOM_TARGET(CTK-build ${CTKBUILD_TARGET_ALL_OPTION}
-  COMMAND ${CMAKE_COMMAND} --build ${CTK_BINARY_DIR}/CTK-build --config ${CMAKE_CFG_INTDIR}
+  COMMAND ${ctk_build_cmd}
   WORKING_DIRECTORY ${CTK_BINARY_DIR}/CTK-build
   )
 ADD_DEPENDENCIES(CTK-build CTK-Configure)
@@ -278,6 +284,6 @@
 # Custom target allowing to drive the build of CTK project itself
 #
 ADD_CUSTOM_TARGET(CTK
-  COMMAND ${CMAKE_COMMAND} --build ${CTK_BINARY_DIR}/CTK-build --config ${CMAKE_CFG_INTDIR}
+  COMMAND ${ctk_build_cmd}
   WORKING_DIRECTORY ${CTK_BINARY_DIR}/CTK-build
   )


Bumped hardcoded version

Bumped hardcoded version

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set (hardcoded_tomviz_version "0.5.0")
+set (hardcoded_tomviz_version "0.5.1")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


Return directly if the compiler doesn't support making coverage data.

--- GCovUtilities.cmake
+++ GCovUtilities.cmake
@@ -23,6 +23,7 @@

     message (STATUS "Compiler is not gcc or g++, coverage reports will not be "
                     "enabled")
+    return ()

 endif (NOT CMAKE_COMPILER_IS_GNUCXX OR NOT CMAKE_COMPILER_IS_GNUCC)


Look for the OS X SDK version of libapr before the system version, to allow building on Lion (10.7) for a Leopard (10.5) target.

--- indra/cmake/FindAPR.cmake
+++ indra/cmake/FindAPR.cmake
@@ -11,7 +11,15 @@

 # APR first.

+# This version has been modified to search the OS X SDKs first. This file
+#  is included for both STANDALONE builds and OS X anything builds. We
+#  need to find the OS X SDK first, if it's present, to avoid conflicts
+#  between building on one release and pulling in a library that's
+#  incompatible with the target release. -- TS, 22 Nov 2011
+
 FIND_PATH(APR_INCLUDE_DIR apr.h
+/Developer/SDKs/MacOSX10.5.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.6.sdk/usr/include/apr-1
 /usr/local/include/apr-1
 /usr/local/include/apr-1.0
 /usr/include/apr-1
@@ -19,10 +27,23 @@
 )

 SET(APR_NAMES ${APR_NAMES} apr-1)
+# Gah, what a grody hack. We do this twice, the first time ignoring any system
+#  libraries to let the OS X SDK be found first, the second in case the first
+#  didn't turn up the libraries. The second search is not expected to be
+#  needed; it's a belt-and-suspenders check. -- TS, 22 Nov 2011
 FIND_LIBRARY(APR_LIBRARY
   NAMES ${APR_NAMES}
-  PATHS /usr/lib /usr/local/lib
+  PATHS /Developer/SDKs/MacOSX10.5.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.6.sdk/usr/lib
+        /usr/lib /usr/local/lib
+  NO_DEFAULT_PATH
   )
+IF (NOT APR_LIBRARY)
+  FIND_LIBRARY(APR_LIBRARY
+    NAMES ${APR_NAMES}
+    PATHS /usr/lib /usr/local/lib
+  )
+ENDIF (NOT APR_LIBRARY)

 IF (APR_LIBRARY AND APR_INCLUDE_DIR)
     SET(APR_LIBRARIES ${APR_LIBRARY})
@@ -54,6 +75,8 @@
 # Next, APRUTIL.

 FIND_PATH(APRUTIL_INCLUDE_DIR apu.h
+/Developer/SDKs/MacOSX10.5.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.6.sdk/usr/include/apr-1
 /usr/local/include/apr-1
 /usr/local/include/apr-1.0
 /usr/include/apr-1
@@ -63,8 +86,17 @@
 SET(APRUTIL_NAMES ${APRUTIL_NAMES} aprutil-1)
 FIND_LIBRARY(APRUTIL_LIBRARY
   NAMES ${APRUTIL_NAMES}
-  PATHS /usr/lib /usr/local/lib
+  PATHS /Developer/SDKs/MacOSX10.5.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.6.sdk/usr/lib
+        /usr/lib /usr/local/lib
+  NO_DEFAULT_PATH
   )
+IF (NOT APRUTIL_LIBRARY)
+  FIND_LIBRARY(APRUTIL_LIBRARY
+    NAMES ${APRUTIL_NAMES}
+    PATHS /usr/lib /usr/local/lib
+  )
+ENDIF (NOT APRUTIL_LIBRARY)

 IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
     SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY})


Add find mpfr

Add find mpfr


Fix for building from a chroot where the host may be e.g. 64 bit and the target is 32 bit, we can't use CMAKE_SYSTEM_PROCESSOR and need to ask the compiler.

--- src/cmake/platform.cmake
+++ src/cmake/platform.cmake
@@ -1,16 +1,25 @@
 ###########################################################################
 # Figure out what platform we're on, and set some variables appropriately

+# CMAKE_SYSTEM_PROCESSOR should not be used because it indicates the platform
+# we are building on, but when cross compiling or using a chroot this is not
+# what we want to use
+if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set (SYSTEM_PROCESSOR "x86_64")
+else()
+    set (SYSTEM_PROCESSOR "i686")
+endif()
+
 message (STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}")
 message (STATUS "CMAKE_SYSTEM_VERSION = ${CMAKE_SYSTEM_VERSION}")
-message (STATUS "CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
+message (STATUS "SYSTEM_PROCESSOR = ${SYSTEM_PROCESSOR}")

 if (UNIX)
     message (STATUS "Unix! ${CMAKE_SYSTEM_NAME}")
     if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
         set (platform "linux")
         set (CXXFLAGS "${CXXFLAGS} -DLINUX")
-        if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+        if (${SYSTEM_PROCESSOR} STREQUAL "x86_64")
             set (platform "linux64")
             set (CXXFLAGS "${CXXFLAGS} -DLINUX64")
         endif ()
@@ -31,3 +40,5 @@
 else ()
     message (FATAL_ERROR "'platform' not defined")
 endif ()
+
+unset(SYSTEM_PROCESSOR)


remove find glbinding from config

remove find glbinding from config

--- globjects-config.cmake
+++ globjects-config.cmake
@@ -86,11 +86,6 @@

 find(globjects globjects/globjects_api.h ${LIB_PATHS})

-# add dependencies
-find_package(glbinding REQUIRED)
-list(APPEND GLOBJECTS_INCLUDES ${GLBINDING_INCLUDES})
-list(APPEND GLOBJECTS_LIBRARIES ${GLBINDING_LIBRARIES})
-
 # DEBUG
 # message("GLOBJECTS_INCLUDES  = ${GLOBJECTS_INCLUDES}")
 # message("GLOBJECTS_LIBRARIES = ${GLOBJECTS_LIBRARIES}")


Improve error messages

Improve error messages

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -82,10 +82,10 @@
   endwhile()

   if("${_libs} " STREQUAL " ")
-    message(FATAL_ERROR "NDDSHOME set to '$ENV{NDDSHOME}' but could not find 'libnddscpp.so' under '${_lib_path}'")
+    message(FATAL_ERROR "NDDSHOME set to '$ENV{NDDSHOME}' but could not find 'libnddscpp.so' and 'librticonnextmsgcpp.so' under '${_lib_path}'")
   endif()
   if(_length GREATER 2)
-    message(FATAL_ERROR "NDDSHOME set to '$ENV{NDDSHOME}' but found multiple files named 'libnddscpp.so' under '${_lib_path}': ${_libs}")
+    message(FATAL_ERROR "NDDSHOME set to '$ENV{NDDSHOME}' but found multiple files named 'libnddscpp.so' or 'librticonnextmsgcpp.so' under '${_lib_path}': ${_libs}")
   endif()

   list(GET _libs 0 _libndds)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


getting rid of special windows code for dlls. This is not needed anymore, we can use the target location property instead.

--- WkBuild.cmake
+++ WkBuild.cmake
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009-2011, Asmodehn's Corp.
+# Copyright (c) 2009-2014, Asmodehn's Corp.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -160,20 +160,6 @@
 set(${PROJECT_NAME}_LIBRARIES \"\${${PROJECT_NAME}_LIBRARY}\")
 	" )

-	get_target_property(${PROJECT_NAME}_LOCATION ${PROJECT_NAME} LOCATION)
-	get_target_property(${PROJECT_NAME}_TYPE ${PROJECT_NAME} TYPE)
-	if ( ${${PROJECT_NAME}_TYPE} STREQUAL "SHARED_LIBRARY" OR ${${PROJECT_NAME}_TYPE} STREQUAL "MODULE_LIBRARY")
-		file( APPEND ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "
-
-#On windows we need to copy the dlls as running dependencies along with the project's executable(s)
-#as a complement to the cmake mechanism...
-if ( WIN32 )
-		set(${PROJECT_NAME}_RUN_LIBRARIES \"${${PROJECT_NAME}_RUN_LIBRARIES}\" )
-endif ( WIN32)
-
-		")
-	endif ( ${${PROJECT_NAME}_TYPE} STREQUAL "SHARED_LIBRARY" OR ${${PROJECT_NAME}_TYPE} STREQUAL "MODULE_LIBRARY")
-
 	file( APPEND ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "
 set(${PROJECT_NAME}_FOUND TRUE)
 	")
@@ -196,9 +182,6 @@
 #Displaying detected dependencies in interface, and storing in cache
 set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIRS}\" CACHE PATH \"${PROJECT_NAME} Headers\" )
 set(${PROJECT_NAME}_LIBRARIES \"\${${PROJECT_NAME}_LIBRARIES}\" CACHE FILEPATH \"${PROJECT_NAME} Libraries\")
-if ( WIN32 )
-	set(${PROJECT_NAME}_RUN_LIBRARIES \"\${${PROJECT_NAME}_RUN_LIBRARIES}\" CACHE FILEPATH \"${PROJECT_NAME} DLLs\" )
-endif ( WIN32 )

 CMAKE_POLICY(POP)

@@ -363,12 +346,6 @@
 		set(${PROJECT_NAME}_LIBRARY ${PROJECT_NAME} CACHE FILEPATH "${PROJECT_NAME} Library")
 		if ( ${${PROJECT_NAME}_load_type} STREQUAL "SHARED" )
 			set_target_properties(${PROJECT_NAME} PROPERTIES DEFINE_SYMBOL "WK_${PROJECT_NAME}_SHAREDLIB_BUILD")
-			#if on windows we need to care about run libraries ( Dlls )
-			if ( WIN32 )
-				get_target_property(${PROJECT_NAME}_LOCATION ${PROJECT_NAME} LOCATION)
-				set(${PROJECT_NAME}_RUN_LIBRARIES "${${PROJECT_NAME}_LOCATION}" CACHE FILEPATH "${PROJECT_NAME} DLLs" )
-				#message( "Project run lib WkBuild : ${${PROJECT_NAME}_RUN_LIBRARIES} " )
-			endif( WIN32 )
 		endif ( ${${PROJECT_NAME}_load_type} STREQUAL "SHARED" )
 	elseif (${project_type} STREQUAL "EXECUTABLE")
 		add_executable(${PROJECT_NAME} ${SOURCES})


fix(config): Change i3 label colors

fix(config): Change i3 label colors

--- examples/config.cmake
+++ examples/config.cmake
@@ -113,7 +113,7 @@
 label-occupied = %index%
 label-occupied-padding = 2

-label-urgent = %index%
+label-urgent = %index%!
 label-urgent-background = ${colors.alert}
 label-urgent-padding = 2

@@ -127,7 +127,6 @@
 index-sort = true
 wrapping-scroll = false

-label-mode = %mode%
 label-mode-padding = 2
 label-mode-foreground = #000
 label-mode-background = ${colors.primary}
@@ -141,12 +140,13 @@
 label-unfocused-padding = ${module/bspwm.label-occupied-padding}

 label-urgent = %index%!
-label-urgent-background = ${colors.alert}
+label-urgent-background = ${module/bspwm.label-urgent-background}
 label-urgent-padding = ${module/bspwm.label-urgent-padding}

 label-visible = %index%
-label-visible-foreground = ${module/bspwm.label-empty-padding}
-label-visible-padding = ${module/bspwm.label-empty-padding}
+label-visible-background = ${self.label-focused-background}
+label-visible-underline = ${self.label-focused-underline}
+label-visible-padding = ${self.label-focused-padding}

 [module/mpd]
 type = internal/mpd


Adding debug symbols even in optimized builds for gcc and clang.

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -55,7 +55,9 @@
 			endif()
 		endif()

-		target_compile_options(${_project_name} PRIVATE -Wall -Wextra)				# Enable all warnings
+		target_compile_options(${_project_name} PRIVATE -Wall -Wextra)		# Enable all warnings
 		target_compile_options(${_project_name} PRIVATE -Werror)			# Treat warnings as errors
+
+		target_compile_options(${_project_name} PRIVATE -g)					# Enable debug symbols
 	endif()
 endmacro()


Made it possible to override value of AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_IN6_IS_ADDR_V4MAPPED on the command line

--- cmake/PosixFeatures.cmake
+++ cmake/PosixFeatures.cmake
@@ -37,13 +37,15 @@
 # _GNU_SOURCE, some toolchains (e.g. default GCC on Ubuntu 16.04 or CentOS 7)
 # define IN6_IS_ADDR_V4MAPPED using s6_addr32 symbol that is undefined.
 # That makes simple check_symbol_exists() succeed despite it being unusable.
-message(STATUS "Checking if IN6_IS_ADDR_V4MAPPED is usable")
-file(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/in6_is_addr_v4mapped.c
-     "#include <netinet/in.h>\nint main() { struct in6_addr addr = {0}; IN6_IS_ADDR_V4MAPPED(&addr); return 0; }\n")
-try_compile(AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_IN6_IS_ADDR_V4MAPPED
-            ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp
-            ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/in6_is_addr_v4mapped.c
-            COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
+if(NOT DEFINED AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_IN6_IS_ADDR_V4MAPPED)
+    message(STATUS "Checking if IN6_IS_ADDR_V4MAPPED is usable")
+    file(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/in6_is_addr_v4mapped.c
+         "#include <netinet/in.h>\nint main() { struct in6_addr addr = {0}; IN6_IS_ADDR_V4MAPPED(&addr); return 0; }\n")
+    try_compile(AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_IN6_IS_ADDR_V4MAPPED
+                ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp
+                ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/in6_is_addr_v4mapped.c
+                COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
+endif()
 if(AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_IN6_IS_ADDR_V4MAPPED)
     message(STATUS "Checking if IN6_IS_ADDR_V4MAPPED is usable - yes")
 else()


To get _wfopen on MinGW.

To get _wfopen on MinGW.

--- cmake/ToyBuildTools.cmake
+++ cmake/ToyBuildTools.cmake
@@ -11,7 +11,11 @@
 			add_definitions(-O2 -g -Werror -Wall -Wextra)
 		endif()

-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+		if(WIN32)
+			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+		else()
+			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+		endif()

 		if(APPLE)
 			add_definitions(-Qunused-arguments)


fix(boost): cannot find shared system boost libraries

--- cmake/consort/boost.cmake
+++ cmake/consort/boost.cmake
@@ -111,21 +111,21 @@
 		endif()
 	endforeach()

-	# Prefer static libraries - you probably want to develop against a version
-	# of boost specific to your compiler, platform and application - statically
-	# linking it in is the best way to avoid DLL hell and related issues.
-	set(Boost_USE_STATIC_LIBS   ON)
-
 	# The default layout type on Linux doesn't include the multi-threaded suffix
 	if( UNIX AND NOT APPLE )
 		set(Boost_USE_MULTITHREADED OFF)
 	endif()

-	# Avoid finding the system version of boost
 	if(CONSORT_PERMIT_SYSTEM_BOOST)
 		set(Boost_NO_SYSTEM_PATHS OFF)
 	else()
+		# Avoid finding the system version of boost
 		set(Boost_NO_SYSTEM_PATHS ON)
+
+		# Prefer static libraries - you probably want to develop against a version
+		# of boost specific to your compiler, platform and application - statically
+		# linking it in is the best way to avoid DLL hell and related issues.
+		set(Boost_USE_STATIC_LIBS   ON)
 	endif()

 	find_package(Boost ${version} REQUIRED COMPONENTS ${ARGN})


snap-icon for snapcraft.yaml

snap-icon for snapcraft.yaml

--- cmake/packages/snap.cmake
+++ cmake/packages/snap.cmake
@@ -29,6 +29,12 @@
     NEWLINE_STYLE UNIX
     @ONLY
   )
+
+  file(
+    COPY        "${SNAPCRAFT_TEMPLATE_DIR}/arangodb.png"
+    DESTINATION "${SNAPCRAFT_SOURCE_DIR}/"
+  )
+
   add_custom_target(snap_TGZ
     COMMENT "create TGZ-package"
     COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ


added reflag to the cake build

added reflag to the cake build

--- cmp/cmake/FileLists.cmake
+++ cmp/cmake/FileLists.cmake
@@ -30,6 +30,7 @@

    ${SRC_DIR}/refdb.c
    ${SRC_DIR}/reference.c
+   ${SRC_DIR}/reflog.c
    ${SRC_DIR}/remote.c
    ${SRC_DIR}/repository.c
    ${SRC_DIR}/reset.c


BUG: Pass the Sphinx output components in the superbuild.

Change-Id: I1f2f728cd5c5c2b5080c69e42de348cce7e814b6

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -46,21 +46,34 @@
   list( APPEND ITKExamples_DEPENDENCIES ITK )
 endif()

-option( BUILD_DOCUMENTATION "Build documentation" OFF )
-set( _build_doc_args )
-if( BUILD_DOCUMENTATION )
-  if( ITKDoxygen_DIR )
-    set( _build_doc_args "${_build_doc_args} -DITKDoxygen_DIR:PATH=${ITKDoxygen_DIR}" )
+option(BUILD_DOCUMENTATION "Build documentation" OFF)
+set(_build_doc_args)
+if(BUILD_DOCUMENTATION)
+  if(ITKDoxygen_DIR)
+    list(APPEND _build_doc_args "-DITKDoxygen_DIR:PATH=${ITKDoxygen_DIR}")
   endif()
-  if( ITKDoxygenXML_DIR )
-    set( _build_doc_args "${_build_doc_args} -DITKDoxygenXML_DIR:PATH=${ITKDoxygenXML_DIR}" )
+  if(ITKDoxygenXML_DIR)
+    list(APPEND _build_doc_args "-DITKDoxygenXML_DIR:PATH=${ITKDoxygenXML_DIR}")
   endif()
-  if( ITKDoxygenTAG_DIR )
-    set( _build_doc_args "${_build_doc_args} -DITKDoxygenTAG_DIR:PATH=${ITKDoxygenTAG_DIR}" )
+  if(ITKDoxygenTAG_DIR)
+    list(APPEND _build_doc_args "-DITKDoxygenTAG_DIR:PATH=${ITKDoxygenTAG_DIR}")
   endif()
-  if( DOC_WITH_LOCAL_DOXYGEN )
-    set( _build_doc_args "${_build_doc_args} -DDOC_WITH_LOCAL_DOXYGEN:PATH=${DOC_WITH_LOCAL_DOXYGEN}" )
+  if(DOC_WITH_LOCAL_DOXYGEN)
+    list(APPEND _build_doc_args "-DDOC_WITH_LOCAL_DOXYGEN:PATH=${DOC_WITH_LOCAL_DOXYGEN}")
   endif()
+  find_package(Sphinx REQUIRED)
+  list(APPEND _build_doc_args
+    "-DSPHINX_EXECUTABLE:PATH=${SPHINX_EXECUTABLE}"
+    "-DSPHINX_DEVHELP_OUTPUT:PATH=${SPHINX_DEVHELP_OUTPUT}"
+    "-DSPHINX_DIRHTML_OUTPUT:PATH=${SPHINX_DIRHTML_OUTPUT}"
+    "-DSPHINX_EPUB_OUTPUT:PATH=${SPHINX_EPUB_OUTPUT}"
+    "-DSPHINX_HTMLHELP_OUTPUT:PATH=${SPHINX_HTMLHELP_OUTPUT}"
+    "-DSPHINX_HTML_OUTPUT:PATH=${SPHINX_HTML_OUTPUT}"
+    "-DSPHINX_LATEX_OUTPUT:PATH=${SPHINX_LATEX_OUTPUT}"
+    "-DSPHINX_MAN_OUTPUT:PATH=${SPHINX_MAN_OUTPUT}"
+    "-DSPHINX_QTHELP_OUTPUT:PATH=${SPHINX_QTHELP_OUTPUT}"
+    "-DSPHINX_TEXT_OUTPUT:PATH=${SPHINX_TEXT_OUTPUT}"
+    )
 endif()

 include( CTest )


portfile target name tweak

portfile target name tweak

--- MacPorts.cmake
+++ MacPorts.cmake
@@ -55,6 +55,6 @@
     "execute_process(COMMAND /opt/local/bin/portindex ${PORTFILE_GH_DIR}/ports)"
   )

-add_custom_target(Portfile
+add_custom_target(portfile
   COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/MacPortfile.cmake
   COMMENT "Updating ${MACPORTS_DIR}")


halide_add_generator_dependency() is broken

It does ‘ar q’ every build, so multiple builds with clean produce an
archive with multiple object files embedded, making for suboptimal
debugging.

Hack fix is to just rm it each time. (There’s probably a better flag to
ar.)

Former-commit-id: fb004653834ee0ea05787d2d0320d5ab8ec0c924

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -47,6 +47,7 @@
     add_custom_command(OUTPUT "${FILTER_LIB}" "${FILTER_HDR}"
       DEPENDS "${gen_target}"
       COMMAND "${CMAKE_BINARY_DIR}/bin/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" ${ARGN}
+      COMMAND rm "${FILTER_LIB}"
       COMMAND "${CMAKE_AR}" q "${FILTER_LIB}" "${SCRATCH_DIR}/${func_name}.o"
       WORKING_DIRECTORY "${SCRATCH_DIR}"
       )


Improve error message

Improve error message

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -223,8 +223,8 @@
 		add_flags_cxx("-ffast-math")

 		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-			if (CLANG_VERSION_STRING VERSION_LESS 3.0)
-				message(FATAL_ERROR "MCServer requires clang version 3.0 or higher")
+			if ("${CLANG_VERSION_STRING}" VERSION_LESS 3.0)
+				message(FATAL_ERROR "MCServer requires clang version 3.0 or higher, version is ${CLANG_VERSION_STRING}")
 			endif()
 			# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
 			add_flags_cxx("-D__extern_always_inline=inline")


list boost-python versions

list boost-python versions

--- src/package_details.cmake
+++ src/package_details.cmake
@@ -10,7 +10,15 @@
 set(CPACK_DEBIAN_PACKAGE_SECTION "science" CACHE STRING "sect")

 set(DEBSRC_BUILD_DEPENDS debhelper python git cmake libboost-dev libboost-python-dev libgomp1 CACHE STRINGS "build-dep")
-set(DEBSRC_PACKAGE_DEPENDS python git cmake libboost-python libgomp1 CACHE STRING "pack-dep")
+
+# we need to explicitly list the libboost-python versions here. why??
+# precise has 1.48.0
+# oneiric has 1.46.1
+# natty/maverick has 1.42.0
+# lucid has 1.40.0
+set(DEBSRC_PACKAGE_DEPENDS python git cmake
+                "libboost-python1.48.0 | libboost-python1.46.1 | libboost-python1.42.0 | libboost-python1.40.0"
+                libgomp1 CACHE STRING "name")

 # however CPack wants dependencies as a single comma separated string!
 set(CPACK_DEBIAN_PACKAGE_DEPENDS)


Refactor lcov for travis

Refactor lcov for travis

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -111,7 +111,7 @@

 		# Capturing lcov counters and generating report
 		COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --capture --output-file ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'lib/xml/*' 'build/*' 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'lib/xml/*' 'gtest-src/*' 'src/tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
 		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned

@@ -125,4 +125,4 @@
 		COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
 	)

-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE+ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE


Update leveldb include variable name to match FindLevelDB.cmake

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -35,7 +35,7 @@

 # ---[ LevelDB
 find_package(LevelDB REQUIRED)
-include_directories(SYSTEM ${LEVELDB_INCLUDE})
+include_directories(SYSTEM ${LevelDB_INCLUDE})
 list(APPEND Caffe_LINKER_LIBS ${LevelDB_LIBRARIES})

 # ---[ Snappy


add optional compile flags to enable coverage testing

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -153,11 +153,17 @@
 endmacro(ei_init_testing)

 if(CMAKE_COMPILER_IS_GNUCXX)
+  option(EIGEN_COVERAGE_TESTING "Enable/disable gcov" OFF)
+  if(EIGEN_COVERAGE_TESTING)
+    set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage")
+  else(EIGEN_COVERAGE_TESTING)
+    set(COVERAGE_FLAGS "")
+  endif(EIGEN_ENABLE_COVERAGE_TESTING)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g2")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g2")
-    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-inline-functions")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g2")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COVERAGE_FLAGS} -fno-inline-functions")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COVERAGE_FLAGS} -O0 -g2")
   endif(CMAKE_SYSTEM_NAME MATCHES Linux)
   set(EI_OFLAG "-O2")
 elseif(MSVC)


[CMake] do not install FindHarfbuzz.cmake

--- cmake/MapnikExport.cmake
+++ cmake/MapnikExport.cmake
@@ -27,7 +27,6 @@
     FILES
         "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindCairo.cmake"
         "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindWebP.cmake"
-        "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindHarfBuzz.cmake"
     DESTINATION ${MAPNIK_CMAKE_DIR}/Modules
 )


cmake::target_link_options..:-fopenmp-version=40: Rm ""

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -276,7 +276,7 @@

         # Clang versions starting from 3.9 support OpenMP 4.0 only when given the corresponding flag
         if(ALPAKA_ACC_CPU_BT_OMP4_ENABLE)
-            target_link_options(alpaka INTERFACE $<$<CXX_COMPILER_ID:AppleClang,Clang>:"-fopenmp-version=40">)
+            target_link_options(alpaka INTERFACE $<$<CXX_COMPILER_ID:AppleClang,Clang>:-fopenmp-version=40>)
         endif()
     else()
         message(STATUS "Optional alpaka dependency OpenMP could not be found! OpenMP back-ends disabled!")


fix(asm): configure fails if yasm is not installed

--- cmake/consort/yasm.cmake
+++ cmake/consort/yasm.cmake
@@ -1,5 +1,16 @@
 if(CONSORT_ENABLE_ASM)
-	enable_language(ASM_YASM)
+	# enable_language generates an error if yasm is not found, but we want it to
+	# be optional in some circumstances
+	if(NOT CMAKE_ASM_YASM_COMPILER)
+		find_program(CMAKE_ASM_YASM_COMPILER yasm
+			HINTS $ENV{YASM_ROOT} "$ENV{ProgramFiles}/YASM" ${YASM_ROOT}
+			PATH_SUFFIXES bin
+		)
+	endif()
+
+	if(CMAKE_ASM_YASM_COMPILER)
+		enable_language(ASM_YASM)
+	endif()

 	if(CONSORT_REQUIRE_ASM AND NOT CMAKE_ASM_YASM_COMPILER_WORKS)
 		message(SEND_ERROR "Assembler not found, but CONSORT_REQUIRE_ASM is set.")


ctest script (#254)

ctest script (#254)

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -22,12 +22,20 @@
 ## or even -VV.
 ##
 ## Options can be passed by arguments (default options are displayed here):
-##
-## ctest -S ctest_script.cmake -D CTEST_TEST_MODEL=Experimental -D CTEST_CONFIGURATION_TYPE=Release -D CTEST_BUILD_JOBS=8 -D CTEST_CMAKE_GENERATOR="Unix Makefiles" -D CNAME=gcc -D CXXNAME=g++ -D CTEST_TEST_TIMEOUT=100 -D CTEST_MEMORYCHECK_TYPE=Valgrind -D test_coverage=TRUE
+## NOTE: Line wrap can be done under Linux/macOS with \, under Windows with ^
+##
+## ctest -S ctest_script.cmake -D CTEST_TEST_MODEL=Experimental \
+##   -D CTEST_CONFIGURATION_TYPE=Release -D CTEST_BUILD_JOBS=8 \
+##   -D CTEST_CMAKE_GENERATOR="Unix Makefiles" -D CNAME=gcc -D CXXNAME=g++ \
+##   -D CTEST_TEST_TIMEOUT=100 -D CTEST_MEMORYCHECK_TYPE=Valgrind \
+##   -D test_coverage=TRUE
 ##
 ## Different dashboard projects and subprojects are possible:
 ##
-## ctest -S /path/to/ctest_script.cmake -D PROJECT_NAME=myGismo -D CTEST_BUILD_JOBS=2 -D CTEST_CMAKE_GENERATOR="Unix Makefiles" -D CTEST_TEST_TIMEOUT=100 -D LABELS_FOR_SUBPROJECTS='gismo;examples;unittests' -D CTEST_SOURCE_DIRECTORY=./gismo_src -D CTEST_BINARY_DIRECTORY=./build
+## ctest -S /path/to/ctest_script.cmake -D PROJECT_NAME=myGismo \
+##   -D CTEST_BUILD_JOBS=2 -D CTEST_CMAKE_GENERATOR="Unix Makefiles" \
+##   -D CTEST_TEST_TIMEOUT=100 -D LABELS_FOR_SUBPROJECTS='gismo;examples;unittests' \
+##   -D CTEST_SOURCE_DIRECTORY=./gismo_src -D CTEST_BINARY_DIRECTORY=./build
 ##
 ## On linux this script can be invoked in a cronjob. e.g.:
 ##    $ crontab -e
@@ -40,6 +48,44 @@
 ##
 ######################################################################

+######################################################################
+##
+## Complete Options List:
+##
+## ctest parameters: (ctest -D ...)
+##   CMAKE_ARGS
+##   CNAME
+##   CTEST_BINARY_DIRECTORY
+##   CTEST_BUILD_JOBS
+##   CTEST_BUILD_NAME
+##   CTEST_CMAKE_GENERATOR
+##   CTEST_CONFIGURATION_TYPE
+##   CTEST_COVERAGE_COMMAND
+##   CTEST_MEMORYCHECK_TYPE
+##   CTEST_SITE
+##   CTEST_SOURCE_DIRECTORY
+##   CTEST_TEST_JOBS
+##   CTEST_TEST_MODEL
+##   CTEST_TEST_TIMEOUT
+##   CXXNAME
+##   DO_COVERAGE
+##   DROP_LOCATION
+##   DROP_METHOD
+##   DROP_SITE
+##   EMPTY_BINARY_DIRECTORY
+##   GISMO_BRANCH
+##   LABELS_FOR_SUBPROJECTS
+##   PROJECT_NAME
+##   UPDATE_MODULES
+##   UPDATE_TYPE
+##
+## Environment
+##   CFLAGS
+##   CXXFLAGS
+##   LDFLAGS
+##
+######################################################################
+
 ## #################################################################
 ## Configuration
 ## #################################################################
@@ -83,7 +129,9 @@
   set(CTEST_MEMORYCHECK_TYPE "None")
 endif()

-# Coverage analysis
+# Coverage analysis - only GCC
+# if GCC was changed with CNAME/CXXNAME, CTEST_COVERAGE_COMMAND needs
+# also to be changed
 if (NOT DEFINED DO_COVERAGE)
   set(DO_COVERAGE FALSE)
 endif()
@@ -183,8 +231,10 @@
 file(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/Testing)

 if (DO_COVERAGE)
-  find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
-  set(CTEST_CUSTOM_COVERAGE_EXCLUDE "${CTEST_SOURCE_DIRECTORY}/external/")
+  if(NOT DEFINED CTEST_COVERAGE_COMMAND)
+    find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+  endif()
+    set(CTEST_CUSTOM_COVERAGE_EXCLUDE "${CTEST_SOURCE_DIRECTORY}/external/")
   set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
   set(ENV{CFLAGS} "$ENV{CFLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
 endif()
@@ -269,7 +319,11 @@
       set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} clone --depth 1 --branch ${GISMO_BRANCH} git@github.com:gismo/gismo.git ${CTEST_SOURCE_DIRECTORY}")
     endif()
   elseif("x${UPDATE_TYPE}" STREQUAL "xsvn")
-    set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} checkout https://github.com/gismo/gismo.git/trunk ${CTEST_SOURCE_DIRECTORY}")
+    if("x${GISMO_BRANCH}" STREQUAL "xstable") # stable
+      set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} checkout https://github.com/gismo/gismo.git/trunk ${CTEST_SOURCE_DIRECTORY}")
+    else() # branch
+      set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} checkout https://github.com/gismo/gismo.git/branches/${GISMO_BRANCH} ${CTEST_SOURCE_DIRECTORY}")
+    endif()
   elseif("x${UPDATE_TYPE}" STREQUAL "xwget")
     execute_process(COMMAND /bin/bash "-c" "wget --no-check-certificate -qO - https://github.com/gismo/gismo/archive/${GISMO_BRANCH}.tar.gz | tar -zxf -")
     execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink gismo-${GISMO_BRANCH} ${CTEST_SOURCE_DIRECTORY})


CMake: added option for setting iterator debug level for Visual Studio

* 0: disable iterator checks and debugging

* 1: checked iterators, no debugging

* 2: no checks, no debugging

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -220,6 +220,15 @@
 option(IVW_PROFILING "Enable profiling" OFF)

 #--------------------------------------------------------------------
+# Iterator debug level in Visual Studio
+# https://msdn.microsoft.com/en-us/library/hh697468.aspx
+# This does unfortunately _NOT_ work without recompiling Qt every time you change this flag
+#if(WIN32 AND MSVC)
+#    set(IVW_ITERATOR_DEBUG_LEVEL "2" CACHE STRING "Iterator debug level (IDL, default=2). IDL=0: Disables checked iterators and disables iterator debugging. IDL=1: Enables checked iterators and disables iterator debugging. IDL=2: Enables iterator debugging.")
+#    set_property(CACHE IVW_ITERATOR_DEBUG_LEVEL PROPERTY STRINGS 0 1 2)
+#endif()
+
+#--------------------------------------------------------------------
 # Build unittest for all modules
 include(${CMAKE_CURRENT_LIST_DIR}/unittests.cmake)

@@ -264,6 +273,12 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm1000")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
+
+    # set iterator debug level (default=2)
+    # https://msdn.microsoft.com/en-us/library/hh697468.aspx
+    ## This does unfortunately _NOT_ work without recompiling Qt every time you change this flag
+    #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_ITERATOR_DEBUG_LEVEL=${IVW_ITERATOR_DEBUG_LEVEL}")
+

     # MSVC Variable checks and include redist in packs
     if(CMAKE_SIZEOF_VOID_P EQUAL 8)


Fix the pybin11_state_gpu.so linking issue (#2087)

--- cmake/public/utils.cmake
+++ cmake/public/utils.cmake
@@ -20,7 +20,7 @@
       # Assume everything else is like gcc
       target_link_libraries(
           ${DST} INTERFACE
-          -Wl,--whole-archive $<TARGET_FILE:${SRC}> -Wl,--no-whole-archive)
+          "-Wl,--whole-archive $<TARGET_FILE:${SRC}> -Wl,--no-whole-archive")
     endif()
     # Link all interface link libraries of the src target as well.
     # For static library, we need to explicitly depend on all the libraries


Clean up the valgrind options

Clean up the valgrind options

--- cmake/support/test.cmake
+++ cmake/support/test.cmake
@@ -27,13 +27,13 @@
 cmake_dependent_option(VISTK_ENABLE_CDASH "Enable CDash integration" OFF
   VISTK_ENABLE_TESTING OFF)

-find_program(VALGRIND_EXECUTABLE valgrind)
-
 option(VISTK_ADD_TEST_TARGETS "Add targets for tests to the build system" OFF)
 mark_as_advanced(VISTK_ADD_TEST_TARGETS)
 if (VISTK_ADD_TEST_TARGETS)
   add_custom_target(tests)
 endif ()
+
+find_program(VALGRIND_EXECUTABLE valgrind)

 cmake_dependent_option(VISTK_VALGRIND_GENERATE_SUPPRESSIONS "Output suppression rules for valgrind leak detections" OFF
   VALGRIND_EXECUTABLE OFF)
@@ -44,16 +44,19 @@

 if (VALGRIND_EXECUTABLE)
   set(vistk_valgrind_arguments)
+
   if (VISTK_VALGRIND_GENERATE_SUPPRESSIONS)
     set(vistk_valgrind_arguments
         ${vistk_valgrind_arguments}
         "--gen-suppressions=all")
   endif ()
+
   if (VISTK_VALGRIND_VERBOSE)
     set(vistk_valgrind_arguments
       ${vistk_valgrind_arguments}
       "--verbose")
   endif ()
+
   if (VISTK_VALGRIND_USE_SUPPRESSIONS)
     file(GLOB
       valgrind_suppressions


sysbuild: support loading of CMakeCache from Zephyr projects

This commit loads the CMakeCache of Zephyr projects.

This allows sysbuild to fetch information from Zephyr projects into
sysbuild itself.

This commit is a first step in the process of sharing more knowledge
between images and sysbuild, and pave the way for closer sharing of
settings between images.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- share/sysbuild/cmake/modules/sysbuild_extensions.cmake
+++ share/sysbuild/cmake/modules/sysbuild_extensions.cmake
@@ -1,6 +1,91 @@
 # Copyright (c) 2021 Nordic Semiconductor
 #
 # SPDX-License-Identifier: Apache-2.0
+
+# Usage:
+#   load_cache(IMAGE <image> BINARY_DIR <dir>)
+#
+# This function will load the CMakeCache.txt file from the binary directory
+# given by the BINARY_DIR argument.
+#
+# All CMake cache variables are stored in a custom target which is identified by
+# the name given as value to the IMAGE argument.
+#
+# IMAGE:      image name identifying the cache for later sysbuild_get() lookup calls.
+# BINARY_DIR: binary directory (build dir) containing the CMakeCache.txt file to load.
+function(load_cache)
+  set(single_args IMAGE BINARY_DIR)
+  cmake_parse_arguments(LOAD_CACHE "" "${single_args}" "" ${ARGN})
+
+  if(NOT TARGET ${LOAD_CACHE_IMAGE}_cache)
+    add_custom_target(${LOAD_CACHE_IMAGE}_cache)
+  endif()
+  file(STRINGS "${LOAD_CACHE_BINARY_DIR}/CMakeCache.txt" cache_strings)
+  foreach(str ${cache_strings})
+    # Using a regex for matching whole 'VAR_NAME:TYPE=VALUE' will strip semi-colons
+    # thus resulting in lists to become strings.
+    # Therefore we first fetch VAR_NAME and TYPE, and afterwards extract
+    # remaining of string into a value that populates the property.
+    # This method ensures that both quoted values and ;-separated list stays intact.
+    string(REGEX MATCH "([^:]*):([^=]*)=" variable_identifier ${str})
+    if(NOT "${variable_identifier}" STREQUAL "")
+      string(LENGTH ${variable_identifier} variable_identifier_length)
+      string(SUBSTRING "${str}" ${variable_identifier_length} -1 variable_value)
+      set_property(TARGET ${LOAD_CACHE_IMAGE}_cache APPEND PROPERTY "CACHE:VARIABLES" "${CMAKE_MATCH_1}")
+      set_property(TARGET ${LOAD_CACHE_IMAGE}_cache PROPERTY "${CMAKE_MATCH_1}:TYPE" "${CMAKE_MATCH_2}")
+      set_property(TARGET ${LOAD_CACHE_IMAGE}_cache PROPERTY "${CMAKE_MATCH_1}" "${variable_value}")
+    endif()
+  endforeach()
+endfunction()
+
+# Usage:
+#   sysbuild_get(<variable> IMAGE <image> [VAR <image-variable>])
+#
+# This function will return the variable found in the CMakeCache.txt file
+# identified by image.
+# If `VAR` is provided, the name given as parameter will be looked up, but if
+# `VAR` is not given, the `<variable>` name provided will be used both for
+# lookup and value return.
+#
+# The result will be returned in `<variable>`.
+#
+# Example use:
+#   sysbuild_get(PROJECT_NAME IMAGE my_sample)
+#     will lookup PROJECT_NAME from the CMakeCache identified by `my_sample` and
+#     and return the value in the local variable `PROJECT_NAME`.
+#
+#   sysbuild_get(my_sample_PROJECT_NAME IMAGE my_sample VAR PROJECT_NAME)
+#     will lookup PROJECT_NAME from the CMakeCache identified by `my_sample` and
+#     and return the value in the local variable `my_sample_PROJECT_NAME`.
+#
+# <variable>: variable used for returning CMake cache value. Also used as lookup
+#             variable if `VAR` is not provided.
+# IMAGE:      image name identifying the cache to use for variable lookup.
+# VAR:        name of the CMake cache variable name to lookup.
+function(sysbuild_get variable)
+  cmake_parse_arguments(GET_VAR "" "IMAGE;VAR" "" ${ARGN})
+
+  if(NOT DEFINED GET_VAR_IMAGE)
+    message(FATAL_ERROR "sysbuild_get(...) requires IMAGE.")
+  endif()
+
+  if(DEFINED ${variable})
+    message(WARNING "Return variable ${variable} already defined with a value. "
+                    "sysbuild_get(${variable} ...) may overwrite existing value. "
+		    "Please use sysbuild_get(<variable> ... VAR <image-variable>) "
+		    "where <variable> is undefined."
+    )
+  endif()
+
+  if(NOT DEFINED GET_VAR_VAR)
+    set(GET_VAR_VAR ${variable})
+  endif()
+
+  get_property(${GET_VAR_IMAGE}_${GET_VAR_VAR} TARGET ${GET_VAR_IMAGE}_cache PROPERTY ${GET_VAR_VAR})
+  if(DEFINED ${GET_VAR_IMAGE}_${GET_VAR_VAR})
+    set(${variable} ${${GET_VAR_IMAGE}_${GET_VAR_VAR}} PARENT_SCOPE)
+  endif()
+endfunction()

 # Usage:
 #   ExternalZephyrProject_Add(APPLICATION <name>
@@ -112,6 +197,7 @@
             "Location: ${ZBUILD_SOURCE_DIR}"
     )
   endif()
+  load_cache(IMAGE ${ZBUILD_APPLICATION} BINARY_DIR ${CMAKE_BINARY_DIR}/${ZBUILD_APPLICATION})

   foreach(kconfig_target
       menuconfig


added documentation for new variables

added documentation for new variables

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -61,6 +61,13 @@
 #                      and shared libraries (DLLs) with optimizations that are
 #                      compatible with INTERNAL_CXX_FLAGS_OPTIMIZED
 #
+# COMMON_STATICLIB_CMAKE_DEFINITIONS_OPTIMIZED: list of DMAKE_AR and DMAKE_RANLIB flags required for gcc >= 4.9
+#                      in combination with Link Time Optimization (-flto)
+#
+# COMMON_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED_STR: string containing environment variables required for
+#                      gcc >= 4.9 in combination with Link Time Optimization (-flto). Used for non-cmake
+#                      builds only.
+#
 # CMAKE_LINKER: updated, if needed; use ld.gold if available. See cmake
 #               documentation
 #


Change potential #define value from nothing to 1 to be consistent with
top-level config.h.cmake.

svn path=/trunk/; revision=6831

--- include/plConfig.h.cmake
+++ include/plConfig.h.cmake
@@ -66,10 +66,10 @@
 #cmakedefine HAVE_CXX_STDINT_H

 /* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H
+#cmakedefine HAVE_STDINT_H 1

 /* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_UNISTD_H 1

 /* Define if usleep is available */
 #cmakedefine HAVE_USLEEP
@@ -80,8 +80,8 @@
 /* Define if C++ compiler accepts using namespace */
 #cmakedefine USE_NAMESPACE

-/* Define if <cmath> header file is available */
-#cmakedefine HAVE_CMATH
+/* Define to 1 if <cmath> header file is available */
+#cmakedefine HAVE_CMATH 1

 /* Define if isnan is present in <math.h> but not in <cmath>
  * - broken Mac OSX systems */


Split off candidate-4.2.6 branch

Split off candidate-4.2.6 branch

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 4 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 5 )
+set ( HPCC_POINT 7 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 1 )
 ###


CMake: Update patch level

CMake: Update patch level

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


BUG: Name of C test file ends in .c not .cxx.

--- kwsysPlatformTests.cmake
+++ kwsysPlatformTests.cmake
@@ -1,4 +1,4 @@
-SET(KWSYS_PLATFORM_TEST_FILE_C kwsysPlatformTestsC.cxx)
+SET(KWSYS_PLATFORM_TEST_FILE_C kwsysPlatformTestsC.c)
 SET(KWSYS_PLATFORM_TEST_FILE_CXX kwsysPlatformTestsCXX.cxx)

 MACRO(KWSYS_PLATFORM_TEST lang var description invert)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Hmm, the automated backout missed a bit (SNOW-606 fallout).  Hopefully this is the magic sauce.

--- indra/cmake/APR.cmake
+++ indra/cmake/APR.cmake
@@ -56,7 +56,7 @@

   if (LINUX)
     if (VIEWER)
-      list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
+      list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
     endif (VIEWER)
     list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt)
   endif (LINUX)


VWR-22769 : libPNG linking: fixed the non standalone case so that we can keep things unchanged for those folks (libpng wise) while taking in changes making things easier for standalone builders

--- indra/cmake/PNG.cmake
+++ indra/cmake/PNG.cmake
@@ -6,6 +6,6 @@
 if (STANDALONE)
   include(FindPNG)
 else (STANDALONE)
-  set(PNG_LIBRARIES png)
-  set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+  set(PNG_LIBRARIES png12)
+  set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng12)
 endif (STANDALONE)


forcing PackageTest to be run in serial

forcing PackageTest to be run in serial

--- CMake/mitkPackageTest.cmake
+++ CMake/mitkPackageTest.cmake
@@ -17,7 +17,8 @@

       set_tests_properties( mitkPackageTest PROPERTIES
                           TIMEOUT 3600
-                          LABELS "MITK;MITK-Plugins")
+                          LABELS "MITK;MITK-Plugins"
+                          RUN_SERIAL TRUE)
     endif()

   endif() # NOT MITK_FAST_TESTING


fix name of libMini to search for with cmake, on windows we search for "libMini", on linux we search for "Mini" because the lib prefix is added automatically

--- CMakeModules/FindMINI.cmake
+++ CMakeModules/FindMINI.cmake
@@ -17,7 +17,7 @@

 find_path(MINI_INCLUDE_DIR mini/mini.h PATHS .. ../deps DOC "Directory containing mini/mini.h")

-find_library(MINI_LIBRARY NAMES libMini PATHS .. ../mini ../deps/mini DOC "Path to Mini library")
+find_library(MINI_LIBRARY NAMES Mini libMini PATHS .. ../mini ../deps/mini DOC "Path to Mini library")
 if(MINI_FIND_DEBUG)
 	find_library(MINI_LIBRARY_DEBUG NAMES libMinid PATHS .. ../mini ../deps/mini DOC "Path to Mini debug library")
 endif(MINI_FIND_DEBUG)


debug/release plugins handling

debug/release plugins handling

on windows debug versions of the plugin names end in d4.dll. This patch
tries to figure out if a plugin is debug or release version - handing the
edge case where plugin name ends with d (debug version name will end in
dd4.dll)

--- CMakeModules/TakeAway.cmake
+++ CMakeModules/TakeAway.cmake
@@ -57,10 +57,29 @@
   SET(PLUGIN_DIRS ${${_PLUGIN_DIRS}})
   IF(WIN32)
     FOREACH(DIR ${PLUGIN_DIRS})
-      FILE(GLOB DLLS "${QT_PLUGINS_DIR}/${DIR}/*.dll")
+      IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+        FILE(GLOB DLLS "${QT_PLUGINS_DIR}/${DIR}/*d4.dll")
+      ELSE(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+        FILE(GLOB ALL_DLLS "${QT_PLUGINS_DIR}/${DIR}/*.dll")
+        # filter out debug versions heuristically
+        FOREACH(DLL ${ALL_DLLS})
+          IF(DLL MATCHES "d4\\.dll$")
+            STRING(REGEX REPLACE "d4\\.dll$" "4.dll" DLL_NO_D ${DLL})
+            LIST(FIND ALL_DLLS ${DLL_NO_D} IDX_NO_D)
+            IF(IDX_NO_D LESS 0)
+              # assume this is a non-debug library with a name ending in d
+              LIST(APPEND DLLS ${DLL})
+            ENDIF(IDX_NO_D LESS 0)
+          ELSE(DLL MATCHES "d4\\.dll$")
+            LIST(APPEND DLLS ${DLL})
+          ENDIF(DLL MATCHES "d4\\.dll$")
+        ENDFOREACH(DLL ${ALL_DLLS})
+      ENDIF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
       INSTALL(
         FILES ${DLLS}
         DESTINATION bin/plugins/${DIR})
+      LIST(APPEND TAKEAWAY_PLUGINS ${DLLS})
     ENDFOREACH(DIR ${PLUGIN_DIRS})
+    MESSAGE(STATUS "Take away plugins: ${TAKEAWAY_PLUGINS}")
   ENDIF(WIN32)
 ENDMACRO(COLLECT_TAKEAWAY_QT_PLUGINS PLUGIN_DIRS)


CMake: Windows: Fixed path to protoc.

CMake: Windows: Fixed path to protoc.

This variable is used in a custom_command which accepts generator
expressions.

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

--- 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -138,7 +138,7 @@
 if (NOT WIN32)
   set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
 else (NOT WIN32)
-  set(PROTOC ${PROTOBUF_ROOT}-build/${CMAKE_BUILD_TYPE}/protoc.exe)
+  set(PROTOC ${PROTOBUF_ROOT}-build/$<CONFIG>/protoc.exe)
 endif (NOT WIN32)

 # Configure the process library, the last of our third-party libraries.