MacOS build fix

MacOS build fix

--- cmake_modules/ExternalProject_TCLTK.cmake
+++ cmake_modules/ExternalProject_TCLTK.cmake
@@ -1,16 +1,17 @@
 if(APPLE)
   set(HOME $ENV{HOME})
+  set(tcl_prefix ${CMAKE_INSTALL_PREFIX}/../../)
   ExternalProject_Add(tcl
     URL "http://sourceforge.net/projects/tcl/files/Tcl/8.6.4/tcl8.6.4-src.tar.gz"
     URL_MD5 d7cbb91f1ded1919370a30edd1534304
     DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
     UPDATE_COMMAND "" # Disable update
-    BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=/ INSTALL_PATH=${CMAKE_INSTALL_PREFIX}/../Frameworks
-    INSTALL_COMMAND ""
+    CONFIGURE_COMMAND ../tcl/macosx/configure --enable-threads --enable-framework --prefix=${tcl_prefix} --libdir=${tcl_prefix}/Contents/Frameworks --bindir=${tcl_prefix}/Contents/Frameworks/Tcl.framework/bin
+    BUILD_COMMAND make -j4
+    INSTALL_COMMAND make install-binaries install-headers install-libraries install-private-headers
     LOG_DOWNLOAD 1
     LOG_BUILD 1
+    LOG_CONFIGURE 1
     LOG_INSTALL 1
     )

@@ -20,34 +21,33 @@
     URL_MD5 261754d7dc2a582f00e35547777e1fea
     DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
     UPDATE_COMMAND "" # Disable update
-    PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tk_macosx.patch
-    BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=/ INSTALL_PATH=${CMAKE_INSTALL_PREFIX}/../Frameworks TCL_FRAMEWORK_DIR=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework
-    INSTALL_COMMAND ""#make -C macosx install
+    CONFIGURE_COMMAND ../tk/macosx/configure --enable-aqua=yes --enable-threads --enable-framework --prefix=${tcl_prefix} --libdir=${tcl_prefix}/Contents/Frameworks --bindir=${tcl_prefix}/Contents/Frameworks/Tcl.framework/bin --with-tcl=${tcl_prefix}/Contents/Frameworks/Tcl.framework
+    BUILD_COMMAND make -j4
+    INSTALL_COMMAND make install-binaries install-headers install-libraries install-private-headers
     LOG_DOWNLOAD 1
     LOG_BUILD 1
+    LOG_CONFIGURE 1
     LOG_INSTALL 1
     )

-  ExternalProject_Add(tkdnd
-    DEPENDS tcl tk
-    URL "http://sourceforge.net/projects/tkdnd/files/TkDND/TkDND%202.8/tkdnd2.8-src.tar.gz"
-    URL_MD5 a6d47a996ea957416469b12965d4db91
-    DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
-    PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
-    UPDATE_COMMAND "" # Disable update
-    BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ./configure --with-tcl=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework --with-tk=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
-    BUILD_COMMAND make
-    INSTALL_COMMAND make install
-    LOG_DOWNLOAD 1
-    LOG_CONFIGURE 1
-    LOG_BUILD 1
-    LOG_INSTALL 1
-    )
-
-  list(APPEND NETGEN_DEPENDENCIES tcl tk tkdnd)
+  #ExternalProject_Add(tkdnd
+    #DEPENDS tcl tk
+    #URL "http://sourceforge.net/projects/tkdnd/files/TkDND/TkDND%202.8/tkdnd2.8-src.tar.gz"
+    #URL_MD5 a6d47a996ea957416469b12965d4db91
+    #DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
+    #PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
+    #UPDATE_COMMAND "" # Disable update
+    #BUILD_IN_SOURCE 1
+    #CONFIGURE_COMMAND ./configure --with-tcl=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework --with-tk=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
+    #BUILD_COMMAND make
+    #INSTALL_COMMAND make install
+    #LOG_DOWNLOAD 1
+    #LOG_CONFIGURE 1
+    #LOG_BUILD 1
+    #LOG_INSTALL 1
+    #)
+
+  list(APPEND NETGEN_DEPENDENCIES tcl tk)
   list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}../Frameworks)
   set(TCL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework/Headers)
   set(TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework)


Minor dependency change that MAY help dependency tracking on Windows.

--- cmake_modules/ZorbaRuntimeGenerator.cmake
+++ cmake_modules/ZorbaRuntimeGenerator.cmake
@@ -59,7 +59,8 @@
     -D "extvars:STRING=\"${EXTVARS}\""
     -D "files:STRING=\"${SPEC_FILES}\""
     -P "${GEN_SCRIPT}"
-    DEPENDS ${GEN_QUERY} ${ABSOLUTE_SPEC_FILES} ${EXTRA_DEPS}
+    MAIN_DEPENDENCY ${GEN_QUERY}
+    DEPENDS ${ABSOLUTE_SPEC_FILES} ${EXTRA_DEPS}
     ${GEN_SCRIPT} ${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaRuntimeGenerator.cmake)
   ADD_TEST("RuntimeGeneratorTest-${TEST_NAME}" "${CMAKE_COMMAND}"
     -D "source_dir=${CMAKE_SOURCE_DIR}"


Enable the override warning.

Enable the override warning.

--- build_settings.cmake
+++ build_settings.cmake
@@ -17,7 +17,7 @@
 set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately after linking the test executable")

 # Warnings
-set(WARN_OPTS "-Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+set(WARN_OPTS "-Wsuggest-override -Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")


Enable the -Wall flags if the compiler supports it

--- CMakeModules/InternalUtils.cmake
+++ CMakeModules/InternalUtils.cmake
@@ -70,6 +70,12 @@
     if(has_ignored_attributes_flag)
         target_compile_options(${target}
           PRIVATE -Wno-ignored-attributes)
+    endif()
+
+    check_cxx_compiler_flag(-Wall has_all_warnings_flag)
+    if(has_all_warnings_flag)
+      target_compile_options(${target}
+        PRIVATE -Wall)
     endif()
   endif()
 endfunction()


- Add placement of logos and splashscreens for UWP packaging script

--- cmake/Packaging/WindowsImageBuild.cmake
+++ cmake/Packaging/WindowsImageBuild.cmake
@@ -5,18 +5,18 @@
         SOURCES RESOURCES
         ICON_ASSET )

-	if(COFFEE_BUILD_ANGLE)
-		find_package ( ANGLE REQUIRED )
-	endif()
-
-	set ( INCLUDED_LIBS "" )
-	# Locate necessary binary files
-	foreach(lib ${ANGLE_LIBRARIES};${SDL2_LIBRARY})
-		get_filename_component ( LIB_BASE "${lib}" NAME_WE )
-		get_filename_component ( LIB_DIR "${lib}" DIRECTORY )
-
-		set ( INCLUDED_LIBS "${INCLUDED_LIBS};${LIB_DIR}/${LIB_BASE}.dll" )
-	endforeach()
+    if(COFFEE_BUILD_ANGLE)
+        find_package ( ANGLE REQUIRED )
+    endif()
+
+    set ( INCLUDED_LIBS "" )
+    # Locate necessary binary files
+    foreach(lib ${ANGLE_LIBRARIES};${SDL2_LIBRARY})
+        get_filename_component ( LIB_BASE "${lib}" NAME_WE )
+        get_filename_component ( LIB_DIR "${lib}" DIRECTORY )
+
+        set ( INCLUDED_LIBS "${INCLUDED_LIBS};${LIB_DIR}/${LIB_BASE}.dll" )
+    endforeach()

     set ( WINDOWS_DIST_COMPANY "${COMPANY}" )

@@ -64,13 +64,13 @@
                         APPEND "${RESOURCE_HEADER}"
                         "{${RESC_NUM},\"${file_dir}${file_name}\"},"
                         )
-					# If there is a directory path, append a "_" for it to be correct
+                    # If there is a directory path, append a "_" for it to be correct
                     # This is disgusting.
-					if(file_dir)
+                    if(file_dir)
                         set( file_dir "${file_dir}/" )
                     endif()
-					# Set virtual filename
-					set ( virt_fname "${file_dir}${file_name}" )
+                    # Set virtual filename
+                    set ( virt_fname "${file_dir}${file_name}" )
                     string ( REPLACE "_" "___" virt_fname "${virt_fname}" )
                     string ( REPLACE "/" "_" virt_fname "${virt_fname}" )
                     string ( REPLACE "\\" "_" virt_fname "${virt_fname}" )
@@ -114,122 +114,129 @@

     # Finally we stir the smelly gak into PE

-	if(WIN_UWP)
+    if(WIN_UWP)
         include_directories( ${SDL2_INCLUDE_DIR} )
-		include_directories( ${ANGLE_INCLUDE_DIR} )
-	endif()
-
-
-	if(MSVC AND WIN_UWP)
-		set ( OPTIONS WIN32 )
-	endif()
+        include_directories( ${ANGLE_INCLUDE_DIR} )
+    endif()
+
+
+    if(MSVC AND WIN_UWP)
+        set ( OPTIONS WIN32 )
+    endif()

     add_executable(${TARGET}
-		${OPTIONS}
-		${SDL2_MAIN_C_FILE}
-		${SOURCES}
+        ${OPTIONS}
+        ${SDL2_MAIN_C_FILE}
+        ${SOURCES}
         ${WINDOWS_BASE_RESOURCE}
         ${RESOURCE_DESCRIPTOR}
         ${MANIFEST_FILE}
-		${INCLUDED_LIBS}
-        )
-
-	if(WIN_UWP)
-		# I need these seeds for mye research, Morty, gotta stuff it waaay up there, Morty.
-		target_link_libraries ( ${TARGET} ${SDL2_LIBRARY} )
-		set_source_files_properties ( ${SDL2_MAIN_C_FILE}
-			PROPERTIES COMPILE_FLAGS /ZW
-			)
-		#set_target_properties ( ${TARGET}
-		#	PROPERTIES
-		#	RESOURCE "${SDL2_LIBRARY_BIN};${ANGLE_LIBRARIES_BIN}"
-		#	)
-		set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/AppX" )
-		execute_process ( COMMAND cmake -E make_directory ${APPX_DIR} )
-		set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/AppX" )
-		execute_process ( COMMAND cmake -E make_directory ${APPX_DIR} )
-
-		foreach(var ${INCLUDED_LIBS})
-			set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/AppX" )
-			configure_file(
-				"${var}"
-				${APPX_DIR}/
-				COPYONLY
-				)
-			set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/AppX" )
-			configure_file(
-				"${var}"
-				${APPX_DIR}/
-				COPYONLY
-				)
-		endforeach()
-
-		execute_process ( COMMAND cmake -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir )
-
-		configure_file (
-			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
-			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/Logo.png
-			COPYONLY
-			)
-		configure_file (
-			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
-			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SmallLogo.png
-			COPYONLY
-			)
-		configure_file (
-			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
-			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SmallLogo44x44.png
-			COPYONLY
-			)
-		configure_file (
-			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
-			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/StoreLogo.png
-			COPYONLY
-			)
-
-		configure_file (
-			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
-			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SplashScreen.png
-			COPYONLY
-			)
-	endif()
+        ${INCLUDED_LIBS}
+        )
+
+    if(WIN_UWP)
+        # I need these seeds for mye research, Morty, gotta stuff it waaay up there, Morty.
+        target_link_libraries ( ${TARGET} ${SDL2_LIBRARY} )
+        set_source_files_properties ( ${SDL2_MAIN_C_FILE}
+            PROPERTIES COMPILE_FLAGS /ZW
+            )
+        #set_target_properties ( ${TARGET}
+        #	PROPERTIES
+        #	RESOURCE "${SDL2_LIBRARY_BIN};${ANGLE_LIBRARIES_BIN}"
+        #	)
+        set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/AppX" )
+        execute_process ( COMMAND cmake -E make_directory ${APPX_DIR} )
+        set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/AppX" )
+        execute_process ( COMMAND cmake -E make_directory ${APPX_DIR} )
+
+        foreach(var ${INCLUDED_LIBS})
+            set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/AppX" )
+            configure_file(
+                "${var}"
+                ${APPX_DIR}/
+                COPYONLY
+                )
+            set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/AppX" )
+            configure_file(
+                "${var}"
+                ${APPX_DIR}/
+                COPYONLY
+                )
+        endforeach()
+
+        execute_process (
+            COMMAND cmake -E make_directory
+            ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir )
+
+        add_custom_command ( TARGET ${TARGET}
+            PRE_LINK
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different
+            ${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+            ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/Logo.png
+            )
+        add_custom_command ( TARGET ${TARGET}
+            PRE_LINK
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different
+            ${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+            ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SmallLogo.png
+            )
+        add_custom_command ( TARGET ${TARGET}
+            PRE_LINK
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different
+            ${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+            ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SmallLogo44x44.png
+            )
+        add_custom_command ( TARGET ${TARGET}
+            PRE_LINK
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different
+            ${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+            ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/StoreLogo.png
+            )
+
+        add_custom_command ( TARGET ${TARGET}
+            PRE_LINK
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different
+            ${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+            ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SplashScreen.png
+            )
+    endif()

     set_target_properties ( ${TARGET}
         PROPERTIES
         VERSION ${COFFEE_BUILD_STRING}
         SOVERSION 1
         )
-	if(NOT WIN_UWP)
-		target_link_libraries ( ${TARGET}
-			user32
-			gdi32
-			winmm
-			imm32
-			ole32
-			oleaut32
-			version
-			uuid
-			dinput8
-			)
-	endif()
-	if(NOT WIN_UWP)
-		install(
-			TARGETS
-			${TARGET}
-
-			DESTINATION
-			bin
-			)
-		install(
-			FILES ${BUNDLE_LIBS}
-			DESTINATION bin
-			)
-	else()
-		install (
-			DIRECTORY
-			${CMAKE_CURRENT_BINARY_DIR}/AppPackages/${TARGET}
-
-			DESTINATION "${CMAKE_PACKAGED_OUTPUT_PREFIX}/windows-universal"
-			)
-	endif()
+    if(NOT WIN_UWP)
+        target_link_libraries ( ${TARGET}
+            user32
+            gdi32
+            winmm
+            imm32
+            ole32
+            oleaut32
+            version
+            uuid
+            dinput8
+            )
+    endif()
+    if(NOT WIN_UWP)
+        install(
+            TARGETS
+            ${TARGET}
+
+            DESTINATION
+            bin
+            )
+        install(
+            FILES ${BUNDLE_LIBS}
+            DESTINATION bin
+            )
+    else()
+        install (
+            DIRECTORY
+            ${CMAKE_CURRENT_BINARY_DIR}/AppPackages/${TARGET}
+
+            DESTINATION "${CMAKE_PACKAGED_OUTPUT_PREFIX}/windows-universal"
+            )
+    endif()
 endmacro()


Qt 5.9 Windows: Link qtlibpng.lib

Qt 5.9 Windows: Link qtlibpng.lib

--- cmake/Qt5Widgets_HunterPlugin_5_9.cmake
+++ cmake/Qt5Widgets_HunterPlugin_5_9.cmake
@@ -328,6 +328,13 @@
       "${_qt_install_prefix}/lib/Qt5AccessibilitySupport.lib"
       "${_qt_install_prefix}/lib/Qt5AccessibilitySupportd.lib"
   )
+
+  # defined: _png_set_sig_bytes
+  _qt_cmake_extra_helpers_add_interface_release_debug(
+      Qt5::Widgets
+      "${_qt_install_prefix}/lib/qtlibpng.lib"
+      "${_qt_install_prefix}/lib/qtlibpngd.lib"
+  )
 elseif(MINGW)
   _qt_cmake_extra_helpers_add_source(
       Qt5::Widgets


Fix the ARM linux native build for RPi2

Fix the ARM linux native build for RPi2

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com

--- build/configs/toolchain_linux_armv7l-hf.cmake
+++ build/configs/toolchain_linux_armv7l-hf.cmake
@@ -23,4 +23,4 @@
 #
 # If this is changed, setjmp / longjmp for ARMv7 should be updated accordingly
 #
-set(FLAGS_COMMON_ARCH -mlittle-endian -mthumb -mfpu=vfpv3-d16)
+set(FLAGS_COMMON_ARCH -mthumb -mfpu=vfp -march=armv7)


Push ParaView SHA forward

Push ParaView SHA forward

To include GIL threading fix in VTK

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


Split off 7.8.64

Split off 7.8.64

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

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


Graph Control 5.2.8-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 2 )
-set ( HPCC_MATURITY "release" )
+set ( HPCC_POINT 8 )
+set ( HPCC_MATURITY "rc" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


Split off 8.2.48

Split off 8.2.48

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 2 )
-set ( HPCC_POINT 47 )
+set ( HPCC_POINT 49 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Cache ITK use file variable for Dataflow build in case it doesn't get propagated by the build.

--- itk/itkGenerateITKConfig.cmake
+++ itk/itkGenerateITKConfig.cmake
@@ -38,6 +38,7 @@

 # The "use" file.
 SET(ITK_USE_FILE ${ITK_BINARY_DIR}/UseITK.cmake)
+SET(SCI_ITK_USE_FILE ${ITK_USE_FILE} CACHE INTERNAL "Path to generated ITK CMake use file" FORCE)

 # The build settings file.
 SET(ITK_BUILD_SETTINGS_FILE ${ITK_BINARY_DIR}/ITKBuildSettings.cmake)


timeout of loop waiting for app to start

SVN-Revision: 101

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -85,6 +85,7 @@
 # use perl since /bin/sleep not on all platforms
 set(SLEEP_SHORT ${PERL} -e "sleep(0.2)")
 set(SLEEP_LONG ${PERL} -e "sleep(2)")
+set(TIMEOUT_SHORT "50")

 # intra-arg space=@@ and inter-arg space=@
 set(cmd_with_at ${cmd})
@@ -122,18 +123,34 @@
     execute_process(COMMAND ${SLEEP_LONG})
   endif (VMKERNEL)

+  set(iters 0)
   while (NOT EXISTS "${out}")
     execute_process(COMMAND ${SLEEP_SHORT})
+    math(EXPR iters "${iters} + 1")
+    if ("${iters}" STREQUAL "${TIMEOUT_SHORT}")
+      message(FATAL_ERROR "Timed out waiting for run_in_bg")
+    endif ()
   endwhile ()
+
   file(READ "${out}" output)
+  set(iters 0)
   while (NOT "${output}" MATCHES "starting\n")
     execute_process(COMMAND ${SLEEP_SHORT})
     file(READ "${out}" output)
+    math(EXPR iters "${iters} + 1")
+    if ("${iters}" STREQUAL "${TIMEOUT_SHORT}")
+      message(FATAL_ERROR "Timed out waiting for app to start")
+    endif ()
   endwhile()

   if (WIN32)
+    set(iters 0)
     while (NOT EXISTS "${out}pid")
       execute_process(COMMAND ${SLEEP_SHORT})
+      math(EXPR iters "${iters} + 1")
+      if ("${iters}" STREQUAL "${TIMEOUT_SHORT}")
+        message(FATAL_ERROR "Timed out waiting for ${out}pid: app failed to start!")
+      endif ()
     endwhile ()
     file(READ "${out}pid" pid)
     string(REGEX REPLACE "\r?\n" "" pid "${pid}")


fixed: consider freeglut when looking for glut

Also adds (user settable) variables that allow customizing the
library names to consider.

Patch by Johannes Zarl, many thanks!

--- CMake/FindGLUT_OpenSG.cmake
+++ CMake/FindGLUT_OpenSG.cmake
@@ -13,13 +13,15 @@
   FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
     PATHS  ${GLUT_ROOT_PATH}/include )

-  FIND_LIBRARY( GLUT_glut_LIBRARY_RELEASE NAMES glut glut32
+  SET( GLUT_NAMES_RELEASE ${GLUT_NAMES_RELEASE} freeglut glut glut32 )
+  FIND_LIBRARY( GLUT_glut_LIBRARY_RELEASE NAMES ${GLUT_NAMES_RELEASE}
     PATHS
     ${OPENGL_LIBRARY_DIR}
     ${GLUT_ROOT_PATH}/Release
     )

-  FIND_LIBRARY( GLUT_glut_LIBRARY_DEBUG NAMES glutd glut32d
+  SET( GLUT_NAMES_DEBUG ${GLUT_NAMES_DEBUG} freeglutd glutd glut32d )
+  FIND_LIBRARY( GLUT_glut_LIBRARY_DEBUG NAMES ${GLUT_NAMES_DEBUG}
     PATHS
     ${OPENGL_LIBRARY_DIR}
     ${GLUT_ROOT_PATH}/Debug


vigra.cmake: Provide custom package name to external_git_repo() macro.

--- vigra.cmake
+++ vigra.cmake
@@ -32,9 +32,8 @@

 external_git_repo (vigra
     ${VIGRA_VERSION}
-    http://github.com/ukoethe/vigra)
-
-set(vigra_NAME vigra)
+    http://github.com/ukoethe/vigra
+    vigra) # Override vigra_NAME and vigra_SRC_DIR variables by providing this extra arg

 if("${VIGRA_VERSION}" STREQUAL "master")
     set(VIGRA_UPDATE_COMMAND git checkout master && git pull)


CopyDlls.cmake: work in progress on making it nicer and work on targets

--- cmake/CopyDlls.cmake
+++ cmake/CopyDlls.cmake
@@ -17,67 +17,63 @@
 	set(_destination $<TARGET_FILE_DIR:${TARGET}>)
 	foreach(_arg ${ARGN})
 		if (_next_arg_destination)
-			set(_destination $_arg)
+			set(_destination ${_arg})
 			set(_next_arg_destination 0)
-		else()
-			if(${_arg} MATCHES ".*\\${CMAKE_IMPORT_LIBRARY_SUFFIX}$"
-					AND EXISTS ${_arg})
+		elseif (${_arg} MATCHES "destination")
+			set(_next_arg_destination 1)
+		elseif (${_arg} MATCHES "debug|general|optimized")
+			set(_copy_dll_next ${_arg})
+		elseif (TARGET ${_arg})
+			# TODO read LOCATION or LOCATION_$<CONFIG> property
+			set(_location_config $<TARGET_PROPERTY:${_arg},LOCATION_$<CONFIG>>)
+			set(_location $<TARGET_PROPERTY:${_arg},LOCATION>)
+			message(WARNING "copy_dlls(): linked targets not supported yet")
+		elseif (${_arg} MATCHES ".*\\${CMAKE_IMPORT_LIBRARY_SUFFIX}$" AND
+			   EXISTS ${_arg})

-				string(REGEX REPLACE "\\${CMAKE_IMPORT_LIBRARY_SUFFIX}$"
-					"${CMAKE_SHARED_LIBRARY_SUFFIX}" _dll_name "${_arg}")
+			string(REGEX REPLACE "\\${CMAKE_IMPORT_LIBRARY_SUFFIX}$"
+				${CMAKE_SHARED_LIBRARY_SUFFIX} _dll_name ${_arg})

-				if (NOT EXISTS ${_dll_name})
-					get_filename_component(_dir ${_dll_name} DIRECTORY)
-					get_filename_component(_file ${_dll_name} NAME)
-					if (EXISTS "${_dir}/../${_file}")
-						set(_dll_name "${_dir}/../${_file}")
-					elseif (EXISTS "${_dir}/../bin/${_file}")
-						set(_dll_name "${_dir}/../bin/${_file}")
-					endif()
+			if (NOT EXISTS ${_dll_name})
+				get_filename_component(_dir ${_dll_name} DIRECTORY)
+				get_filename_component(_file ${_dll_name} NAME)
+				if (EXISTS "${_dir}/../${_file}")
+					set(_dll_name "${_dir}/../${_file}")
+				elseif (EXISTS "${_dir}/../bin/${_file}")
+					set(_dll_name "${_dir}/../bin/${_file}")
 				endif()
+			endif()

-				if (EXISTS ${_dll_name})
-					file(TO_NATIVE_PATH ${_dll_name} _dll_name)
-					if (${_copy_dll_next} MATCHES "optimized|general")
-						set(_opt_dlls "${_opt_dlls}\n${_dll_name}")
-					endif()
-					if (${_copy_dll_next} MATCHES "debug|general")
-						set(_deb_dlls "${_deb_dlls}\n${_dll_name}")
-					endif()
+			if (EXISTS ${_dll_name})
+				file(TO_NATIVE_PATH ${_dll_name} _dll_name)
+				if (${_copy_dll_next} MATCHES "optimized|general")
+					set(_opt_dlls "${_opt_dlls}\n${_dll_name}")
 				endif()
-
+				if (${_copy_dll_next} MATCHES "debug|general")
+					set(_deb_dlls "${_deb_dlls}\n${_dll_name}")
+				endif()
+			else ()
+				message(WARNING "copy_dlls(): can't find .dll for import library: ${arg}")
 			endif()
-		endif()
-
-		if(${_arg} MATCHES "debug|general|optimized")
-			set(_copy_dll_next ${_arg})
-		else()
 			set(_copy_dll_next "general")
-		endif()
-
-		if (${_arg} MATCHES "destination")
-			set(_next_arg_destination 1)
 		endif()
 	endforeach()

-	set(_copy_dlls_name "copy_dlls-${TARGET}-$<CONFIG>")
-	set(_list_file ${_copy_dlls_name}.list)
-	set(_cmd_file ${_copy_dlls_name}.cmd)
-	file(GENERATE OUTPUT ${_list_file}
-		CONTENT "${_deb_dlls}" CONDITION $<CONFIG:Debug>)
-	file(GENERATE OUTPUT ${_list_file}
-		CONTENT "${_opt_dlls}" CONDITION $<NOT:$<CONFIG:Debug>>)
-	file(GENERATE OUTPUT ${_cmd_file}
-		CONTENT "for /f \"tokens=*\" %%i in (${_list_file}) do (xcopy /Y /D \"%%i\" \"${_destination}\")")
+
+	set(_copy_dlls_name "copy_dlls-$<CONFIG>")
+	set(_list_file "${_copy_dlls_name}.list")
+	file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_list_file}"
+		CONTENT ${_deb_dlls} CONDITION $<CONFIG:Debug>)
+	file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_list_file}"
+		CONTENT ${_opt_dlls} CONDITION $<NOT:$<CONFIG:Debug>>)

 	add_custom_command(
 		TARGET ${TARGET}
 		POST_BUILD
-		COMMAND ${_cmd_file}
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		DEPENDS "${CMAKE_BINARY_DIR}/${_cmd_file}"
-			"${CMAKE_BINARY_DIR}/${_list_file}"
-		VERBATIM)
+		COMMAND $ENV{COMSPEC} /c for /f \"delims-;\" %f in
+			\( ${_list_file} \) do
+			\(xcopy /y /d \"%f\" \"${_destination}\"\)
+		WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

 endif(WIN32)
 endfunction()


another try

another try

--- cmake/FindCOIN.cmake
+++ cmake/FindCOIN.cmake
@@ -151,7 +151,8 @@
     ENDIF(COIN_BZ2_LIBRARY)
     # Not required by cbc v2.5, but required by later versions in which case,
     # the lower line should be commented out and this line used
-    SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
+    #SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
+    SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES};${COIN_OSI_CBC_LIBRARY}")
     #SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
     SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
 ENDIF(COIN_FOUND)


fix(FindJose): fix ugly copy paste...

fix(FindJose): fix ugly copy paste...

--- cmake/FindJose.cmake
+++ cmake/FindJose.cmake
@@ -33,7 +33,7 @@
 	NAMES jose/jose.h
 	HINTS ${PC_JOSE_INCLUDE_DIRS}
 )
-find_library(JANSSON_LIBRARIES
+find_library(JOSE_LIBRARIES
 	NAMES jose
 	HINTS ${PC_JOSE_LIBRARY_DIRS}
 )


mineure, correction d'une faute de frappe

--- cmake/Function.cmake
+++ cmake/Function.cmake
@@ -145,6 +145,6 @@
 	file(APPEND ${FILE_DEST} "FileSystem=${CMAKE_SOURCE_DIR}/cegui/looknfeel\n")
     file(APPEND ${FILE_DEST} "[Schemes]\n")
 	file(APPEND ${FILE_DEST} "FileSystem=${CMAKE_SOURCE_DIR}/cegui/schemes\n")
-	file(APPEND ${FILE_DEST} "[Layout]\n")
+	file(APPEND ${FILE_DEST} "[Layouts]\n")
 	file(APPEND ${FILE_DEST} "FileSystem=${CMAKE_SOURCE_DIR}/cegui/layouts\n")
 endmacro(writeResourceFile)


Improve detection of Git.

Improve detection of Git.

--- cmake/GitUtils.cmake
+++ cmake/GitUtils.cmake
@@ -1,9 +1,9 @@
 function(git_shorttag rev_id)
-    find_program(GIT git)
-    if(GIT AND EXISTS "${CMAKE_SOURCE_DIR}/.git" AND IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
+    find_package(Git)
+    if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git" AND IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
         execute_process(
             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-            COMMAND ${GIT} rev-parse --short HEAD
+            COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
             OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
         )
         set(${rev_id} "${GIT_OUT}" PARENT_SCOPE)


Release v0.4.0

Release v0.4.0

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -23,7 +23,7 @@
 endif ()

 set (PACKAGE_NAME        "${CMAKE_PROJECT_NAME}")
-set (PACKAGE_VERSION     "0.3.2.${GIT_CHECKIN_COUNT}")
+set (PACKAGE_VERSION     "0.4.0.${GIT_CHECKIN_COUNT}")
 set (PACKAGE_STRING      "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set (PACKAGE_TARNAME     "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 set (PACKAGE_BUGREPORT   "https://github.com/Qihoo360/evpp/issues")


Add HUNTER_TOOLCHAIN_UNDETECTABLE_ID to flags/fpic

--- flags/fpic.cmake
+++ flags/fpic.cmake
@@ -30,3 +30,15 @@
     "Position independent code"
     FORCE
 )
+
+# Linux, GCC 7.3.0 same results with and without '-fPIC' flag for code:
+#
+#  #include <iostream>
+#  int main() {
+#  #if defined(__PIC__)
+#    std::cout << "PIC: " << __PIC__ << std::endl;
+#  #else
+#    std::cout << "PIC not defined" << std::endl;
+#  #endif
+#  }
+list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "pic")


boost use script exclude prg_exec_monitor library

issue https://github.com/smanders/externpro/issues/202#issuecomment-410048157

--- projects/use/usexp-boost-config.cmake
+++ projects/use/usexp-boost-config.cmake
@@ -33,11 +33,13 @@
     container
     date_time
     exception
-    prg_exec_monitor program_options
+    #prg_exec_monitor # excluded because of link errors
+    program_options
     regex
     signals
     system
-    test_exec_monitor unit_test_framework
+    test_exec_monitor
+    unit_test_framework
     )
   # NOTE: determined boost library dependency order by building boost on linux
   # with link=shared and runtime-link=shared and using ldd


fixed: relative -> absolute path for (HUGH_INSTALL_PREFIX)

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

 if(DEFINED ENV{HUGH_INSTALL_PREFIX})
-  set(HUGH_INSTALL_PREFIX $ENV{HUGH_INSTALL_PREFIX} CACHE INTERNAL "HUGH Installation Root" FORCE)
+  get_filename_component(dir $ENV{HUGH_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
+  set(HUGH_INSTALL_PREFIX ${dir} CACHE INTERNAL "HUGH Installation Root" FORCE)
 endif()

 if(NOT HUGH_INSTALL_PREFIX)


Android: Disable experimental compilers (NDK 0.8c)

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -471,6 +471,8 @@
  string( REPLACE "android-" "" ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_SUPPORTED_NATIVE_API_LEVELS}" )
  file( GLOB __availableToolchains RELATIVE "${ANDROID_NDK}/toolchains" "${ANDROID_NDK}/toolchains/*" )
  __LIST_FILTER( __availableToolchains "^[.]" )
+ __LIST_FILTER( __availableToolchains ".*clang.*") # ignore experimental compilers
+ __LIST_FILTER( __availableToolchains ".*llvm.*")
  set( __availableToolchainMachines "" )
  set( __availableToolchainArchs "" )
  set( __availableToolchainCompilerVersions "" )


COMP: Fix warnings: class declared with greater visibility than the type of its field

This commit fixes warnings like the following:

```
In file included from /tmp/DTIPrep/src/GMainWindow.h:6:0,
                 from /tmp/DTIPrep/src/main.cxx:11:
/tmp/DTIPrep/src/IntensityMotionCheckPanel.h:21:7: warning: ‘IntensityMotionCheckPanel’ declared with greater visibility than the type of its field ‘IntensityMotionCheckPanel::QCedDwiReader’ [-Wattributes]
 class IntensityMotionCheckPanel : public QDockWidget,
       ^
In file included from /tmp/DTIPrep/src/main.cxx:11:0:
/tmp/DTIPrep/src/GMainWindow.h:57:7: warning: ‘GMainWindow’ declared with greater visibility than the type of its field ‘GMainWindow::DwiReader’ [-Wattributes]
 class GMainWindow : public QMainWindow, private Ui_MainWindow
       ^
/tmp/DTIPrep/src/GMainWindow.h:57:7: warning: ‘GMainWindow’ declared with greater visibility than the type of its field ‘GMainWindow::QCedDwiReader’ [-Wattributes]
In file included from /tmp/DTIPrep/src/GMainWindow.h:6:0,
                 from /tmp/DTIPrep/src/GMainWindow.cxx:3:
/tmp/DTIPrep/src/IntensityMotionCheckPanel.h:21:7: warning: ‘IntensityMotionCheckPanel’ declared with greater visibility than the type of its field ‘IntensityMotionCheckPanel::QCedDwiReader’ [-Wattributes]
 class IntensityMotionCheckPanel : public QDockWidget,
       ^
```

--- Common.cmake
+++ Common.cmake
@@ -126,4 +126,6 @@
 endif()

 set(CMAKE_POSITION_INDEPENDENT_CODE 1)
+set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)


changed: MESSAGE -> OSG_MSG

changed: MESSAGE -> OSG_MSG

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@1675 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -212,9 +212,9 @@
         LIST(REMOVE_DUPLICATES DEPINCDIRS)
     ENDIF(DEPINCDIRS)

-    MESSAGE("   DEPLIBS: ${DEPLIBS}")
-    MESSAGE("   DEPLIBDIRS: ${DEPLIBDIRS}")
-    MESSAGE("   DEPINCDIRS: ${DEPINCDIRS}")
+    OSG_MSG("   DEPLIBS: ${DEPLIBS}")
+    OSG_MSG("   DEPLIBDIRS: ${DEPLIBDIRS}")
+    OSG_MSG("   DEPINCDIRS: ${DEPINCDIRS}")

     FILE(APPEND ${${PROJECT_NAME}_CONFIG_FILE}
         "    \"dep_lib\"  :  [")


Fix #148: "make test" does not run all cppcheck tests

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -52,8 +52,8 @@

 add_custom_target(run_cpp_tests
   COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_CPP_TESTS}
+  WORKING_DIRECTORY ${${CMAKE_PROJECT_NAME}_BINARY_DIR}
   COMMENT "Running all cpp unit tests")
 if(COVERAGE)
   add_dependencies(run_cpp_tests lcov-clean)
 endif()
-


ENH: remove useless verbose message in configuration

--- CMake/FindLibLAS.cmake
+++ CMake/FindLibLAS.cmake
@@ -8,7 +8,6 @@

 IF( LIBLAS_INCLUDE_DIR )
     # Already in cache, be silent
-    message("silent")
     SET( LIBLAS_FIND_QUIETLY TRUE )
 ENDIF( LIBLAS_INCLUDE_DIR )


[FindHIP] Remove rdynamic from CMAKE_SHARED_LIBRARY_LINK_HIP_FLAGS

CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS contains -rdynamic which does not go
well with nvcc

Change-Id: I10e6d21553de0e43c6a7ae5fb3ec2418087959ff

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -33,7 +33,7 @@
 set(CMAKE_SHARED_LIBRARY_SONAME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG})
 set(CMAKE_SHARED_LIBRARY_CREATE_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS})
 set(CMAKE_SHARED_LIBRARY_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
-set(CMAKE_SHARED_LIBRARY_LINK_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS})
+#set(CMAKE_SHARED_LIBRARY_LINK_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS})
 set(CMAKE_SHARED_LIBRARY_RUNTIME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
 set(CMAKE_SHARED_LIBRARY_RUNTIME_HIP_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
 set(CMAKE_SHARED_LIBRARY_LINK_STATIC_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS})


Bumped version to 0.1.6

Bumped version to 0.1.6

--- cmake/Version.cmake
+++ cmake/Version.cmake
@@ -13,7 +13,7 @@
 # The PATCH version can be incremented whenever it is necessary.  The patch version should be
 # incremented whenever there is a "release" in any form, but can also be incremented periodically
 # for testing purposes.
-set(CGUL_VERSION_PATCH 5)
+set(CGUL_VERSION_PATCH 6)

 # Combined version
 set(CGUL_VERSION ${CGUL_VERSION_MAJOR}.${CGUL_VERSION_MINOR}.${CGUL_VERSION_PATCH})


minor correction to doxygen.make.'s use of add_custom_target().

i modified the way doxygen.cmake invokes add_custom_target() to better conform to how the documentation describes it should be used.

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -27,7 +27,7 @@
 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 find_package(Doxygen)

@@ -71,21 +71,23 @@
 			return()
 		endif()
 	endif()
-
+
 	foreach(i ${ARGN})
 		set(DOXYGEN_INPUT
 			"${DOXYGEN_INPUT} \"${CMAKE_CURRENT_SOURCE_DIR}/${i}\""
 			)
 	endforeach()
 	configure_file(${DOXYGEN_CONFIG_TEMPLATE} ${DOXYGEN_CONFIG})
+	# the ALL keyword indicates that the custom target should be built as
+	# part of the default make target.
+	if(WANT_DOCS)
+		set(ALL ALL)
+	endif()
 	add_custom_target(
-		doxygen
+		doxygen ${ALL}
 		COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_FLAGS}
 		DEPENDS ${ARGN} ${DOXYGEN_CONFIG}
 		)
-	if(WANT_DOCS)
-		add_dependencies(${TARGET} doxygen)
-	endif()

 endfunction()


Fix a typo.

Fix a typo.

--- cmake/libobjc.cmake
+++ cmake/libobjc.cmake
@@ -10,7 +10,7 @@
         if (CC_HAS_WNO_UNUSED_RESULT)
             set (extra_cflags "${extra_cflags} -Wno-unused-result")
         endif()
-        if (CMAKE_C_COMPILER_IS_GNUSS)
+        if (CMAKE_COMPILER_IS_GNUCC)
                 set (extra_cflags "${extra_cflags} -fgnu89-inline")
         endif()
         set (extra_ldflags "-s")


Add the subdir to runtime installs as well

--- cmake/targets.cmake
+++ cmake/targets.cmake
@@ -96,7 +96,7 @@
     LIBRARY
       DESTINATION "lib${LIB_SUFFIX}${library_subdir}"
     RUNTIME
-      DESTINATION bin
+      DESTINATION "bin${library_subdir}"
     COMPONENT     ${component})
 endfunction (vistk_add_library)


Fix extraneous newline at end of version string

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -6,7 +6,7 @@
         )
 endif()

-execute_process(COMMAND sh -c "cat version.txt"
+execute_process(COMMAND sh -c "cat version.txt | tr -d '\n'"
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     OUTPUT_VARIABLE PROJECT_VERSION
     )


STYLE: Removed blank line at eof and spaces at eols

--- DashboardScripts/tubetk_run_nightly.cmake
+++ DashboardScripts/tubetk_run_nightly.cmake
@@ -1,24 +1,24 @@
 ##############################################################################
-#
+#
 # Library:   TubeTK
-#
+#
 # Copyright 2010 Kitware Inc. 28 Corporate Drive,
 # Clifton Park, NY, 12065, USA.
-#
-# All rights reserved.
-#
+#
+# All rights reserved.
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-#
+#
 #       http://www.apache.org/licenses/LICENSE-2.0
-#
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
+#
 ##############################################################################

 include( ${CTEST_SCRIPT_DIRECTORY}/../../tubetk_config.cmake )
@@ -32,25 +32,24 @@
   set( ENV{TUBETK_RUN_MODEL} "Nightly" )
   set( ENV{TUBETK_FORCE_BUILD} "1" )

-  ctest_run_script(
+  ctest_run_script(
     "${SITE_SCRIPT_DIR}/tubetk_build_test.cmake" )
-
+
   if( SITE_NIGHTLY_STYLE )
-    ctest_run_script(
+    ctest_run_script(
       "${SITE_SCRIPT_DIR}/tubetk_style.cmake" )
   endif( SITE_NIGHTLY_STYLE )
-
+
   if( SITE_NIGHTLY_COVERAGE )
-    ctest_run_script(
+    ctest_run_script(
       "${SITE_SCRIPT_DIR}/tubetk_coverage.cmake" )
   endif( SITE_NIGHTLY_COVERAGE )
-
+
   if( SITE_NIGHTLY_MEMORY )
-    ctest_run_script(
+    ctest_run_script(
       "${SITE_SCRIPT_DIR}/tubetk_memory.cmake" )
   endif( SITE_NIGHTLY_MEMORY )

 endif( SITE_NIGHTLY_BUILD_TEST )

 set(CTEST_RUN_CURRENT_SCRIPT 0)
-


cmake: Use prebuilt mconf on Windows

cmake: Use prebuilt mconf on Windows

Closes https://github.com/espressif/esp-idf/issues/1905

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -1,8 +1,6 @@
 include(ExternalProject)

 macro(kconfig_set_variables)
-    set(MCONF kconfig_bin/mconf)
-
     set_default(SDKCONFIG ${PROJECT_PATH}/sdkconfig)
     set(SDKCONFIG_HEADER ${CMAKE_BINARY_DIR}/sdkconfig.h)
     set(SDKCONFIG_CMAKE ${CMAKE_BINARY_DIR}/sdkconfig.cmake)
@@ -13,19 +11,37 @@
     set_default(SDKCONFIG_DEFAULTS "${SDKCONFIG}.defaults")
 endmacro()

-# Use the existing Makefile to build mconf (out of tree) when needed
-#
-# TODO: Download(?) a prebuilt mingw mconf on Windows
-externalproject_add(mconf
-    SOURCE_DIR ${IDF_PATH}/tools/kconfig
-    CONFIGURE_COMMAND ""
-    BINARY_DIR "kconfig_bin"
-    BUILD_COMMAND make -f ${IDF_PATH}/tools/kconfig/Makefile mconf
-    BUILD_BYPRODUCTS ${MCONF}
-    INSTALL_COMMAND ""
-    EXCLUDE_FROM_ALL 1
-    )
+if(CMAKE_HOST_WIN32)
+    # Prefer a prebuilt mconf on Windows
+    find_program(MCONF mconf)

+    if(NOT MCONF)
+        find_program(NATIVE_GCC gcc)
+        if(NOT NATIVE_GCC)
+            message(FATAL_ERROR
+                "Windows requires a prebuilt ESP-IDF-specific mconf for your platform "
+                "on the PATH, or an MSYS2 version of gcc on the PATH to build mconf. "
+                "Consult the setup docs for ESP-IDF on Windows.")
+        endif()
+    endif()
+endif()
+
+if(NOT MCONF)
+    # Use the existing Makefile to build mconf (out of tree) when needed
+    #
+    set(MCONF kconfig_bin/mconf)
+
+    externalproject_add(mconf
+        SOURCE_DIR ${IDF_PATH}/tools/kconfig
+        CONFIGURE_COMMAND ""
+        BINARY_DIR "kconfig_bin"
+        BUILD_COMMAND make -f ${IDF_PATH}/tools/kconfig/Makefile mconf
+        BUILD_BYPRODUCTS ${MCONF}
+        INSTALL_COMMAND ""
+        EXCLUDE_FROM_ALL 1
+        )
+    set(menuconfig_depends DEPENDS mconf)
+endif()

 # Find all Kconfig files for all components
 function(kconfig_process_config)
@@ -66,9 +82,9 @@
         --env "COMPONENT_KCONFIGS=${kconfigs}"
         --env "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}")

-    # Generate the menuconfig target (uses C-based mconf tool)
+    # Generate the menuconfig target (uses C-based mconf tool, either prebuilt or via mconf target above)
     add_custom_target(menuconfig
-        DEPENDS mconf
+        ${menuconfig_depends}
         # create any missing config file, with defaults if necessary
         COMMAND ${confgen_basecommand} --output config ${SDKCONFIG}
         COMMAND ${CMAKE_COMMAND} -E env


bug fix in CMake summary NUMERICAL_TESTS is now the build flag

--- tools/cmake/summary.cmake
+++ tools/cmake/summary.cmake
@@ -113,7 +113,7 @@
     universal_status("  BUILD_CMD_LINE_TOOLS         :   ${BUILD_CMD_LINE_TOOLS}")
     universal_status("  BUILD_EDUCATION              :   ${BUILD_EDUCATION}")
     universal_status("  BUILD_APPLICATIONS           :   ${BUILD_APPLICATIONS}")
-    universal_status("  BUILD_NUMERICAL              :   ${BUILD_NUMERICAL}")
+    universal_status("  BUILD_NUMERICAL_TESTS        :   ${BUILD_NUMERICAL_TESTS}")
     universal_status("  BUILD_FUNCTIONS              :   ${BUILD_FUNCTIONS}")
     universal_status("  BUILD_PLAYGROUND             :   ${BUILD_PLAYGROUND}")
     universal_status("")


RELEASE-NOTES.txt should be in CMAKE_SOURCE_DIR instea of current dir

--- Modules/ManageVersion.cmake
+++ Modules/ManageVersion.cmake
@@ -92,7 +92,7 @@
     ENDFOREACH(_arg ${ARGN})

     IF(NOT RELEASE_NOTES_FILE)
-	SET(RELEASE_NOTES_FILE "RELEASE-NOTES.txt" CACHE FILEPATH "Release Notes")
+	SET(RELEASE_NOTES_FILE "${CMAKE_SOURCE_DIR}/RELEASE-NOTES.txt" CACHE FILEPATH "Release Notes")
     ENDIF(NOT RELEASE_NOTES_FILE)

     FILE(STRINGS "${RELEASE_NOTES_FILE}" _release_lines)


test: Fixed cram tests not working without PYTHON_BIN defined

--- .cmake/Modules/Cram.cmake
+++ .cmake/Modules/Cram.cmake
@@ -53,8 +53,8 @@
 if ("$ENV{TRAVIS}" STREQUAL "true")
   execute_process (COMMAND cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
 else ()
-  if (ENV{PYTHON_BIN} STREQUAL "")
-    set (PYTHON "python")
+  if ("$ENV{PYTHON_BIN}" STREQUAL "")
+    set (PYTHON "python3")
   else ()
     set (PYTHON "$ENV{PYTHON_BIN}")
   endif ()


Fix LibJpegTurbo finder to ignore static library, needed on Ubuntu 13.10

--- FindLibJpegTurbo.cmake
+++ FindLibJpegTurbo.cmake
@@ -20,7 +20,7 @@

 # Finally the library itself
 find_library(LibJpegTurbo_LIBRARY
-  NAMES turbojpeg.so
+  NAMES libturbojpeg.so turbojpeg.dll libturbojpeg.dylib
   PATHS ${LibJpegTurbo_PKGCONF_LIBRARY_DIRS} /opt/libjpeg-turbo/lib
 )


Prevent that the cmake variable BACKWARD_INCLUDE_DIRS be infinitely appended on successive cmake runs

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -68,13 +68,13 @@
 		LIBDL_INCLUDE_DIR LIBDL_LIBRARY)

 	if (LIBDW_FOUND)
-		LIST(APPEND BACKWARD_INCLUDE_DIRS ${LIBDW_INCLUDE_DIRS})
+		LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBDW_INCLUDE_DIRS})
 		LIST(APPEND BACKWARD_LIBRARIES ${LIBDW_LIBRARIES})
 		set(STACK_DETAILS_DW TRUE)
 		set(STACK_DETAILS_BFD FALSE)
 		set(STACK_DETAILS_BACKTRACE_SYMBOL FALSE)
 	elseif(LIBBFD_FOUND)
-		LIST(APPEND BACKWARD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIRS})
+		LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIRS})
 		LIST(APPEND BACKWARD_LIBRARIES ${LIBBFD_LIBRARIES})
 		set(STACK_DETAILS_DW FALSE)
 		set(STACK_DETAILS_BFD TRUE)
@@ -114,7 +114,6 @@
 endforeach()

 find_path(BACKWARD_INCLUDE_DIR backward.hpp PATHS ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND BACKWARD_INCLUDE_DIRS ${BACKWARD_INCLUDE_DIR})

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Backward
@@ -122,20 +121,22 @@
         BACKWARD_INCLUDE_DIR
         BACKWARD_LIBRARIES
 )
+list(APPEND _BACKWARD_INCLUDE_DIRS ${BACKWARD_INCLUDE_DIR})

 macro(add_backward target)
-	target_include_directories(${target} PRIVATE ${BACKWARD_INCLUDE_DIRS})
+	target_include_directories(${target} PRIVATE ${_BACKWARD_INCLUDE_DIRS})
 	set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${BACKWARD_DEFINITIONS})
 	set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${BACKWARD_LIBRARIES})
 endmacro()
+set(BACKWARD_INCLUDE_DIRS ${_BACKWARD_INCLUDE_DIRS} CACHE INTERNAL "_BACKWARD_INCLUDE_DIRS")
 set(BACKWARD_DEFINITIONS ${BACKWARD_DEFINITIONS} CACHE INTERNAL "BACKWARD_DEFINITIONS")
 set(BACKWARD_LIBRARIES ${BACKWARD_LIBRARIES} CACHE INTERNAL "BACKWARD_LIBRARIES")
-mark_as_advanced(BACKWARD_INCLUDE_DIRS BACKWARD_DEFINITIONS BACKWARD_LIBRARIES)
+mark_as_advanced(_BACKWARD_INCLUDE_DIRS BACKWARD_DEFINITIONS BACKWARD_LIBRARIES)

 if (NOT TARGET Backward::Backward)
 	add_library(Backward::Backward INTERFACE IMPORTED)
 	set_target_properties(Backward::Backward PROPERTIES
-        INTERFACE_INCLUDE_DIRECTORIES "${BACKWARD_INCLUDE_DIRS}"
+        INTERFACE_INCLUDE_DIRECTORIES "${_BACKWARD_INCLUDE_DIRS}"
         INTERFACE_LINK_LIBRARIES "${BACKWARD_LIBRARIES}"
         INTERFACE_COMPILE_DEFINITIONS "${BACKWARD_DEFINITIONS}"
     )


FindLLVM: Accept LLVM 3.9

FindLLVM: Accept LLVM 3.9

Signed-off-by: Rebecca N. Palmer <2decb937e7eca5e941ec22bc308fd452fe4ab2bb@zoho.com>
Reviewed-by: Yang Rong <78759e37dc7114caed18f74e7515c5cb519dbf6d@intel.com>

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -8,12 +8,12 @@
 # LLVM_FOUND       - True if llvm found.
 if (LLVM_INSTALL_DIR)
   find_program(LLVM_CONFIG_EXECUTABLE
-               NAMES llvm-config-37 llvm-config-3.7 llvm-config-36 llvm-config-3.6 llvm-config-38 llvm-config-3.8 llvm-config llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4
+               NAMES llvm-config-37 llvm-config-3.7 llvm-config-36 llvm-config-3.6 llvm-config-38 llvm-config-3.8 llvm-config-39 llvm-config-3.9 llvm-config llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4
                DOC "llvm-config executable"
                PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
 else (LLVM_INSTALL_DIR)
   find_program(LLVM_CONFIG_EXECUTABLE
-               NAMES llvm-config-37 llvm-config-3.7 llvm-config-36 llvm-config-3.6 llvm-config-38 llvm-config-3.8 llvm-config llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4
+               NAMES llvm-config-37 llvm-config-3.7 llvm-config-36 llvm-config-3.6 llvm-config-38 llvm-config-3.8 llvm-config-39 llvm-config-3.9 llvm-config llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4
                DOC "llvm-config executable")
 endif (LLVM_INSTALL_DIR)


Disable -Werror for missing-field-initializers.

--- FindGoogleMock.cmake
+++ FindGoogleMock.cmake
@@ -79,6 +79,8 @@
 if (CMAKE_CXX_COMPILER MATCHES "(^.*clang.*$)")

     set (GMOCK_CXX_FLAGS "-Wno-error=unused-private-field")
+    set (GMOCK_CXX_FLAGS
+        "-Wno-error=missing-field-initializers ${GMOCK_CXX_FLAGS}")

 endif (CMAKE_CXX_COMPILER MATCHES "(^.*clang.*$)")


Revert "[build] Don't reset 'swiftlib_link_flags_all' unnecessarily"

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -1430,6 +1430,7 @@

       # Add PrivateFrameworks, rdar://28466433
       set(swiftlib_c_compile_flags_all ${SWIFTLIB_C_COMPILE_FLAGS})
+      set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})

       # Add flags to prepend framework search paths for the parallel framework
       # hierarchy rooted at /System/iOSSupport/...


Fix behaviour of psq_assert_set.

Fix behaviour of psq_assert_set.

Check for ${VARIABLE} instead of VARIABLE (the former will merely
check if the variable named VARIABLE instead of the actual variable
name is set).

Also strip semicolons from error message.

--- PolysquareToolingUtil.cmake
+++ PolysquareToolingUtil.cmake
@@ -102,11 +102,12 @@

 function (psq_assert_set VARIABLE)

-    if (NOT VARIABLE)
-
-        message (FATAL_ERROR "${ARGN}")
-
-    endif (NOT VARIABLE)
+    if (NOT ${VARIABLE})
+
+        string (REPLACE ";" "" MSG "${ARGN}")
+        message (FATAL_ERROR "${MSG}")
+
+    endif (NOT ${VARIABLE})

 endfunction (psq_assert_set)


Align code on hugepage size

Align code on hugepage size

--- build_settings.cmake
+++ build_settings.cmake
@@ -88,13 +88,14 @@
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -latomic -ldl")
   endif()
 else()
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id -Wl,-E -Wl,-zcommon-page-size=0x200000 -Wl,-zmax-page-size=0x200000")
   if(VESPA_ATOMIC_LIB STREQUAL "")
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id -ldl -Wl,-E")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ldl")
   else()
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id -latomic -ldl -Wl,-E")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -latomic -ldl")
   endif()
 endif()
-SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -rdynamic" )
+SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -rdynamic -Wl,-zcommon-page-size=0x200000 -Wl,-zmax-page-size=0x200000" )

 message("-- CMAKE_SHARED_LINKER_FLAGS is ${CMAKE_SHARED_LINKER_FLAGS}")


enhanced pedantic flag

enhanced pedantic flag

--- cmake_compiler_settings/cmake/gcc_flags.cmake
+++ cmake_compiler_settings/cmake/gcc_flags.cmake
@@ -10,7 +10,7 @@
 # unlike msvc, -Wall does not enable all warnings

 # generic warnings
-add_compile_options(-Wall -Wextra -pedantic -Wmain -Wunreachable-code -Wunused -Wunknown-pragmas -Werror=return-type)
+add_compile_options(-Wall -Wextra -pedantic-errors -Wmain -Wunreachable-code -Wunused -Wunknown-pragmas -Werror=return-type)

 # multiple declaration, shadowing, eval undefined identifier
 add_compile_options(-Wshadow -Wundef -Wredundant-decls)
@@ -62,7 +62,8 @@
 add_compile_options(-Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override)

 # memory
-add_compile_options(-Werror=vla -Werror=array-bounds)
+# write-strings seems to get overritten by pedantic
+add_compile_options(-Werror=vla -Werror=array-bounds -Werror=write-strings)
 if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 7)
 	add_compile_options(-Walloc-zero -Walloca)
 endif()
@@ -72,7 +73,6 @@
 	message(" ===== Adding Effective C++ Warnings")
 	add_compile_options(-Weffc++)
 endif()
-

 ##################################################################
 # project structure


typo

typo

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@9027 e128ff1e-fa79-4151-a8cb-522299a2c450


CI: build doxygen at the end

CI: build doxygen at the end

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -109,15 +109,6 @@
   message( SEND_ERROR "An error occurs during ctest_build.")
 endif()

-if(ENABLE_DOXYGEN)
-  # compile doxygen
-  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
-              TARGET Documentation
-              RETURN_VALUE _doxy_rv
-              CAPTURE_CMAKE_ERROR _doxy_error
-              )
-endif()
-
 ctest_test(PARALLEL_LEVEL 8
            RETURN_VALUE _test_rv
            CAPTURE_CMAKE_ERROR _test_error
@@ -128,3 +119,12 @@
 endif()

 ctest_submit()
+
+if(ENABLE_DOXYGEN)
+  # compile doxygen
+  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
+              TARGET Documentation
+              RETURN_VALUE _doxy_rv
+              CAPTURE_CMAKE_ERROR _doxy_error
+              )
+endif()


CMakeLists: Generate code during compilation process

Change-Id: I6e556ef687d874092daf4e343a2f2562034f927c

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -29,6 +29,17 @@
   "Destination (relative to CMAKE_INSTALL_PREFIX) for cmake modules files"
 )

+set (MODULE_EVENTS "")
+set (MODULE_REMOTE_CLASSES "")
+set (MODULE_COMPLEX_TYPES "")
+set (MODULE_DIGEST "")
+set (MODULE_NAME "")
+
+set (EVENTS_PREFIX "Event:")
+set (REMOTE_CLASSES_PREFIX "RemoteClass:")
+set (COMPLEX_TYPES_PREFIX "ComplexType:")
+set (DIGEST_PREFIX "Digest:")
+
 include (CMakeParseArguments)

 set (PROCESSED_PREFIX "Processed file:\t")
@@ -79,7 +90,6 @@
 #  GEN_FILES_DIR directory to generate files
 #  SOURCE_FILES_OUTPUT variable to output generated sources
 #  HEADER_FILES_OUTPUT variable to output generated headers
-#  [TEMPLATES_DIR] templates directory
 #  [INTERNAL_TEMPLATES_DIR] internal templates directory,
 #                       only used if TEMPLATES_DIR is not set
 #
@@ -94,7 +104,6 @@
     GEN_FILES_DIR
     SOURCE_FILES_OUTPUT
     HEADER_FILES_OUTPUT
-    TEMPLATES_DIR
     INTERNAL_TEMPLATES_DIR
   )
   set (MULTI_VALUE_PARAMS
@@ -106,6 +115,7 @@
     GEN_FILES_DIR
     SOURCE_FILES_OUTPUT
     HEADER_FILES_OUTPUT
+    INTERNAL_TEMPLATES_DIR
   )

   cmake_parse_arguments("PARAM" "${OPTION_PARAMS}" "${ONE_VALUE_PARAMS}" "${MULTI_VALUE_PARAMS}" ${ARGN})
@@ -116,61 +126,93 @@
     endif()
   endforeach()

-  set (COMMAND_LINE -c ${PARAM_GEN_FILES_DIR} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -lf)
-
-  if (DEFINED PARAM_TEMPLATES_DIR)
-    set (COMMAND_LINE ${COMMAND_LINE} -t ${PARAM_TEMPLATES_DIR})
-  elseif (DEFINED PARAM_INTERNAL_TEMPLATES_DIR)
-    set (COMMAND_LINE ${COMMAND_LINE} -it ${PARAM_INTERNAL_TEMPLATES_DIR})
-  else()
-    message (FATAL_ERROR "Missing templates you have to set TEMPLATES_DIR INTERNAL_TEMPLATES_DIR")
-  endif()
+  set (COMMAND_LINE -c ${PARAM_GEN_FILES_DIR} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -it ${PARAM_INTERNAL_TEMPLATES_DIR})

   if (PARAM_NO_OVERWRITE)
     set (COMMAND_LINE ${COMMAND_LINE} -n)
   endif()

+  set (MODEL_FILES "")
   foreach (MODEL ${PARAM_MODELS})
     if (IS_DIRECTORY ${MODEL})
       file (GLOB_RECURSE MODELS ${MODEL}/*kmd.json)
       list (APPEND MODEL_FILES ${MODELS})
-    elseif (EXISTS ${MODEL})
+    elseif (EXISTS ${MODEL} AND ${MODEL} MATCHES ".*kmd.json")
       list (APPEND MODEL_FILES ${MODEL})
     endif()
   endforeach()

-  if (NOT DEFINED MODEL_FILES)
-    message (FATAL_ERROR "No model files found")
-  endif ()
-
-  execute_code_generator (
-    OUTPUT_VARIABLE PROCESSOR_OUTPUT
-    EXEC_PARAMS ${COMMAND_LINE}
-  )
-
-  if ("${PROCESSOR_OUTPUT}" STREQUAL "")
-    message (FATAL_ERROR "No code generated")
-  else()
-    string(REPLACE "\n" ";" PROCESSOR_OUTPUT ${PROCESSOR_OUTPUT})
-  endif()
-
-  foreach (_FILE ${PROCESSOR_OUTPUT})
-    if (${_FILE} MATCHES "${PROCESSED_PREFIX}.*")
-      string(REPLACE ${PROCESSED_PREFIX} "" _FILE ${_FILE})
-      string(REGEX REPLACE "\t.*" "" _FILE ${_FILE})
-      if (${_FILE} MATCHES ".*cpp")
-        list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${_FILE})
-        message (STATUS "Generated: ${_FILE}")
-      elseif(${_FILE} MATCHES ".*hpp")
-        list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${_FILE})
-        message (STATUS "Generated: ${_FILE}")
-      endif ()
-      if (ENABLE_CODE_GENERATION_FORMAT_CHECK)
-        if (EXISTS ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
-          file (REMOVE ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
-        endif()
-        execute_process (
-          COMMAND astyle
+  if ("cpp_interface" STREQUAL ${PARAM_INTERNAL_TEMPLATES_DIR})
+    foreach (REMOTE_CLASS ${MODULE_REMOTE_CLASSES})
+      list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${REMOTE_CLASS}.cpp)
+      list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${REMOTE_CLASS}.hpp)
+    endforeach()
+    foreach (EVENT ${MODULE_EVENTS})
+      list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${EVENT}.cpp)
+      list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${EVENT}.hpp)
+    endforeach()
+    foreach (COMPLEX_TYPE ${MODULE_COMPLEX_TYPES})
+      list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${COMPLEX_TYPE}.cpp)
+      list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${COMPLEX_TYPE}.hpp)
+    endforeach()
+  elseif ("cpp_interface_internal" STREQUAL ${PARAM_INTERNAL_TEMPLATES_DIR})
+    foreach (REMOTE_CLASS ${MODULE_REMOTE_CLASSES})
+      list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${REMOTE_CLASS}Internal.cpp)
+      list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${REMOTE_CLASS}Internal.hpp)
+    endforeach()
+  elseif ("cpp_server_internal" STREQUAL ${PARAM_INTERNAL_TEMPLATES_DIR})
+    #Module name to camel case
+    string(SUBSTRING ${MODULE_NAME} 0 1 FIRST_LETTER)
+    string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
+    string(REGEX REPLACE "^.(.*)" "${FIRST_LETTER}\\1" CAMEL_CASE_MODULE_NAME "${MODULE_NAME}")
+
+    list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/SerializerExpander${CAMEL_CASE_MODULE_NAME}.cpp)
+
+    foreach (REMOTE_CLASS ${MODULE_REMOTE_CLASSES})
+      list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${REMOTE_CLASS}ImplInternal.cpp)
+      list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${REMOTE_CLASS}ImplFactory.hpp)
+    endforeach()
+  elseif ("cpp_server" STREQUAL ${PARAM_INTERNAL_TEMPLATES_DIR})
+    # Generated directly
+  elseif ("cpp_module" STREQUAL ${PARAM_INTERNAL_TEMPLATES_DIR})
+    list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/Module.cpp)
+  else ()
+    message (FATAL_ERROR "Templates ${PARAM_INTERNAL_TEMPLATES_DIR} not managed")
+  endif()
+
+  if ("cpp_server" STREQUAL ${PARAM_INTERNAL_TEMPLATES_DIR})
+    if (NOT DEFINED MODEL_FILES)
+      message (FATAL_ERROR "No model files found")
+    endif ()
+
+    execute_code_generator (
+      OUTPUT_VARIABLE PROCESSOR_OUTPUT
+      EXEC_PARAMS ${COMMAND_LINE} -lf
+    )
+
+    if ("${PROCESSOR_OUTPUT}" STREQUAL "")
+      message (FATAL_ERROR "No code generated")
+    else()
+      string(REPLACE "\n" ";" PROCESSOR_OUTPUT ${PROCESSOR_OUTPUT})
+    endif()
+
+    foreach (_FILE ${PROCESSOR_OUTPUT})
+      if (${_FILE} MATCHES "${PROCESSED_PREFIX}.*")
+        string(REPLACE ${PROCESSED_PREFIX} "" _FILE ${_FILE})
+        string(REGEX REPLACE "\t.*" "" _FILE ${_FILE})
+        if (${_FILE} MATCHES ".*cpp")
+          list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${_FILE})
+          message (STATUS "Generated: ${_FILE}")
+        elseif(${_FILE} MATCHES ".*hpp")
+          list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${_FILE})
+          message (STATUS "Generated: ${_FILE}")
+        endif ()
+        if (ENABLE_CODE_GENERATION_FORMAT_CHECK)
+          if (EXISTS ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
+            file (REMOVE ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
+          endif()
+          execute_process (
+            COMMAND astyle
             --style=linux
             --indent=spaces=2
             --indent-preprocessor
@@ -184,17 +226,26 @@
             --break-blocks
             -q
             ${PARAM_GEN_FILES_DIR}/${_FILE}
-        )
-        if (EXISTS ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
-          message (WARNING "Style incorrect for file: ${PARAM_GEN_FILES_DIR}/${_FILE}")
+          )
+          if (EXISTS ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
+            message (WARNING "Style incorrect for file: ${PARAM_GEN_FILES_DIR}/${_FILE}")
+          endif()
         endif()
       endif()
-    endif()
-  endforeach()
+    endforeach()
+  else ()
+
+    add_custom_command(
+      OUTPUT  ${PARAM_INTERNAL_TEMPLATES_DIR}.generated ${GENERATED_SOURCE_FILES} ${GENERATED_HEADER_FILES}
+      COMMAND ${CMAKE_COMMAND} -E touch ${PARAM_INTERNAL_TEMPLATES_DIR}.generated
+      COMMAND ${KurentoModuleCreator_EXECUTABLE} ${COMMAND_LINE}
+      DEPENDS ${MODEL_FILES}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    )
+  endif()

   set (${PARAM_SOURCE_FILES_OUTPUT} ${${PARAM_SOURCE_FILES_OUTPUT}} ${GENERATED_SOURCE_FILES} PARENT_SCOPE)
   set (${PARAM_HEADER_FILES_OUTPUT} ${${PARAM_HEADER_FILES_OUTPUT}} ${GENERATED_HEADER_FILES} PARENT_SCOPE)
-
 endfunction()

 function (generate_code)
@@ -281,6 +332,51 @@
   set(CUSTOM_PREFIX "kurento")

   set (KTOOL_PROCESSOR_LINE -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR})
+
+  ###############################################################
+  # Get reduced kmd
+  ###############################################################
+
+  execute_code_generator (OUTPUT_VARIABLE PROCESSOR_OUTPUT
+    EXEC_PARAMS ${KTOOL_PROCESSOR_LINE} -p)
+
+  if ("${PROCESSOR_OUTPUT}" STREQUAL "")
+    message (FATAL_ERROR "No cmake dependencies generated")
+  else()
+    string(REPLACE "\n" ";" PROCESSOR_OUTPUT ${PROCESSOR_OUTPUT})
+  endif()
+
+  foreach (_FILE ${PROCESSOR_OUTPUT})
+    if (${_FILE} MATCHES "${EVENTS_PREFIX}.*")
+      string(REPLACE ${EVENTS_PREFIX} "" _FILE ${_FILE})
+      string(REGEX REPLACE "\t+" "" _FILE ${_FILE})
+      string(REGEX REPLACE " +" "" _FILE ${_FILE})
+      list (APPEND MODULE_EVENTS ${_FILE})
+    elseif (${_FILE} MATCHES "${REMOTE_CLASSES_PREFIX}.*")
+      string(REPLACE ${REMOTE_CLASSES_PREFIX} "" _FILE ${_FILE})
+      string(REGEX REPLACE "\t+" "" _FILE ${_FILE})
+      string(REGEX REPLACE " +" "" _FILE ${_FILE})
+      list (APPEND MODULE_REMOTE_CLASSES ${_FILE})
+    elseif (${_FILE} MATCHES "${COMPLEX_TYPES_PREFIX}.*")
+      string(REPLACE ${COMPLEX_TYPES_PREFIX} "" _FILE ${_FILE})
+      string(REGEX REPLACE "\t+" "" _FILE ${_FILE})
+      string(REGEX REPLACE " +" "" _FILE ${_FILE})
+      list (APPEND MODULE_COMPLEX_TYPES ${_FILE})
+    elseif (${_FILE} MATCHES "${DIGEST_PREFIX}.*")
+      string(REPLACE ${DIGEST_PREFIX} "" _FILE ${_FILE})
+      string(REGEX REPLACE "\t+" "" _FILE ${_FILE})
+      string(REGEX REPLACE " +" "" _FILE ${_FILE})
+      set (MODULE_DIGEST ${_FILE})
+    endif()
+  endforeach()
+
+  set (MODULE_NAME ${VALUE_NAME})
+
+  ###############################################################
+  # Relaunch cmake if digest changes
+  ###############################################################
+
+

   if (NOT ${DISABLE_LIBRARIES_GENERATION})
   ###############################################################


PKG: use install PROGRAMS instead of FILES for execute perms

--- CMake/PackageHelper.cmake
+++ CMake/PackageHelper.cmake
@@ -290,7 +290,7 @@
     endif()
     if(DEFINED Monteverdi_SOURCE_DIR)
       if(EXISTS ${Monteverdi_SOURCE_DIR}/Packaging/${EXE_FILE}${SCR_EXT})
-        install(FILES
+        install(PROGRAMS
           ${Monteverdi_SOURCE_DIR}/Packaging/${EXE_FILE}${SCR_EXT}
           DESTINATION
           "${PKG_STAGE_DIR}")


ENH: Do not rebuild ITK, VTK, or SlicerExecutionModel

When compiling niralUtilities, it is using the Superbuild system and therefore makes sure that all libraries are available, otherwise it rebuilds them. ITK, VTK, and SlicerExecutionModel are already included in DTIProcess. Therefore there is no need to recompile them. To avoid recompiling them, we set the corresponding USE_SYSTEM_ variables to ON that the superbuild system recognizes.

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -157,6 +157,10 @@
   )
 _expand_external_project_vars()
 set(COMMON_EXTERNAL_PROJECT_ARGS ${${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_ARGS})
+set( USE_SYSTEM_ITK ON)
+set( USE_SYSTEM_VTK ON)
+set( USE_SYSTEM_SlicerExecutionModel ON)
+
 set(extProjName ${PRIMARY_PROJECT_NAME})
 set(proj        ${PRIMARY_PROJECT_NAME})
 List( LENGTH ${PRIMARY_PROJECT_NAME}_DEPENDENCIES dependencies_size )


[t:4814] remove --run-libc-freeres=no because I fixed how things were getting linked, apparently, and don't need that anymore (it was generating false valgrind failures)

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

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,4 +1,4 @@
 if(BUILD_TESTING)
-  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --num-callers=20 --leak-check=full --show-reachable=yes --run-libc-freeres=no --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown" CACHE INTERNAL "options for valgrind")
+  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown" CACHE INTERNAL "options for valgrind")
   set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
 endif()


refs #5368 fix dartconfig stuff for darwin

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

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,9 +1,10 @@
 if(BUILD_TESTING)
-  if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
+  if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
     # Valgrind on OSX 10.8 generally works but outputs some warning junk
     # that is hard to parse out, so we'll just let it run alone
     set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind")
   endif ()
   set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind")
   set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
+  set(UPDATE_COMMAND "svn")
 endif()


ENH: Added a UseDoxygen setting

ENH: Added a UseDoxygen setting

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -9,7 +9,8 @@
 # Dart server configuration
 SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/VTK/")
 SET (CVS_WEB_CVSROOT "VTK")
-SET (DOXYGEN_URL "http://${DROP_SITE}/" )
+SET (USE_DOXYGEN "On")
+SET (DOXYGEN_URL "http://${DROP_SITE}/VTK/doc/nightly/html/" )
 SET (GNATS_WEB_URL "http://${DROP_SITE}/")

 # copy over the testing logo


Add default mkl dir in cmake

Add default mkl dir in cmake

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -16,7 +16,8 @@
 set(CBLAS_FOUND OFF)

 ## Find MKL First.
-set(MKL_ROOT $ENV{MKLROOT} CACHE PATH "Folder contains MKL")
+set(INTEL_ROOT "/opt/intel" CACHE PATH "Folder contains intel libs")
+set(MKL_ROOT ${INTEL_ROOT}/mkl CACHE PATH "Folder contains MKL")

 find_path(MKL_INCLUDE_DIR mkl.h PATHS
   ${MKL_ROOT}/include)


Windows compatibility.

Windows compatibility.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -944,7 +944,11 @@
   FOREACH(_prereq IN LISTS _tmp_prereq)
     IF(${_prereq}_DIR)
       SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
-      SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${${_prereq}_DIR}\"")
+      SET(CURR_DIR ${${_prereq}_DIR})
+      IF(WIN32)
+        STRING(REGEX REPLACE "\\\\" "/" CURR_DIR ${CURR_DIR})
+      ENDIF()
+      SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")
       SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
     ENDIF()
   ENDFOREACH()


[cmake] Called cram through python and not a shell script

--- .cmake/Modules/Cram.cmake
+++ .cmake/Modules/Cram.cmake
@@ -30,7 +30,7 @@
 set(ENV{CRITERION_JOBS} "1")
 set(ENV{CRITERION_DISABLE_TIME_MEASUREMENTS} "1")

-execute_process (COMMAND cram -v "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
+execute_process (COMMAND python -m cram -v "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)

 if (NOT RES STREQUAL "0")
   message (FATAL_ERROR "Cram tests failed")


Changed if(WIN32 AND MSVC) to if(MSVC)

Changed if(WIN32 AND MSVC) to if(MSVC)

--- adm/cmake/OccBuildKit.cmake
+++ adm/cmake/OccBuildKit.cmake
@@ -27,9 +27,9 @@
 ENDFOREACH(MODULE ${TOOLKIT_MODULES})

 # Version info
-IF(WIN32 AND MSVC)
+IF(MSVC)
    SET(TOOLKIT_RESOURCES ${CMAKE_BINARY_DIR}/Version.rc)
-ENDIF(WIN32 AND MSVC)
+ENDIF(MSVC)

 ADD_LIBRARY(${TOOLKIT} ${${PROJECT_NAME}_LIBRARY_TYPE} ${TOOLKIT_SOURCE_FILES} ${TOOLKIT_RESOURCES} )


Simplify setup of backward include dirs. Fixes #77

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -122,7 +122,7 @@
 	message(STATUS "${def}")
 endforeach()

-find_path(BACKWARD_INCLUDE_DIR backward.hpp PATHS ${CMAKE_CURRENT_LIST_DIR})
+set(BACKWARD_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}")

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Backward


Remove not useful log

Remove not useful log

Change-Id: Ib15d135516a0a53509e5b8f95b6805955d5c3f78

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -500,10 +500,6 @@
     OUTPUT_VARIABLE PROCESSOR_OUTPUT
   )

-  message (Generating final rom model\n
-    ${PROCESSOR_OUTPUT}
-  )
-
   file (GLOB_RECURSE FINAL_MODELS ${CMAKE_CURRENT_BINARY_DIR}/kmd/*kmd.json)

   install(FILES


testing building as extension

testing building as extension


java: remove screamake and quote paths

java: remove screamake and quote paths

--- Wrapping/Java/MakeJavacResponseFile.cmake
+++ Wrapping/Java/MakeJavacResponseFile.cmake
@@ -3,10 +3,10 @@
 # Clear the contents of the file
 file(WRITE "${RSP_FILENAME}.tmp" "")

-FILE(GLOB vtk_java_files ${VTK_BINARY_DIR}/java/vtk/*.java)
-FILE(GLOB vtk_java_rendering_files ${VTK_BINARY_DIR}/java/vtk/rendering/*.java)
-FILE(GLOB vtk_java_rendering_awt_files ${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java)
-FILE(GLOB vtk_java_sample_files ${VTK_BINARY_DIR}/java/vtk/sample/*.java)
+file(GLOB vtk_java_files "${VTK_BINARY_DIR}/java/vtk/*.java")
+file(GLOB vtk_java_rendering_files "${VTK_BINARY_DIR}/java/vtk/rendering/*.java")
+file(GLOB vtk_java_rendering_awt_files "${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java")
+file(GLOB vtk_java_sample_files "${VTK_BINARY_DIR}/java/vtk/sample/*.java")

 foreach( java_file IN LISTS vtk_java_files vtk_java_rendering_files
                             vtk_java_rendering_awt_files vtk_java_sample_files)
@@ -14,14 +14,14 @@
 endforeach()

 if(VTK_JAVA_SWT_COMPONENT)
-  FILE(GLOB vtk_java_swt_files "${VTK_BINARY_DIR}/java/vtk/rendering/swt/*.java")
+  file(GLOB vtk_java_swt_files "${VTK_BINARY_DIR}/java/vtk/rendering/swt/*.java")
   foreach( java_file IN LISTS vtk_java_swt_files )
     file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
   endforeach()
 endif()

 if(VTK_JAVA_JOGL_COMPONENT)
-  FILE(GLOB vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/rendering/jogl/*.java")
+  file(GLOB vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/rendering/jogl/*.java")
   list(APPEND vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/sample/rendering/JoglConeRendering.java")
   foreach( java_file IN LISTS vtk_java_jogl_files )
     file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")


Port FindCODASH to FLP, resolves missing transient dependencies

--- FindCODASH.cmake
+++ FindCODASH.cmake
@@ -63,113 +63,14 @@
 #==================================
 # Naming convention:
 #  Local variables of the form _codash_foo
-#  Input variables of the form Dash_FOO
+#  Input variables of the form Codash_FOO
 #  Output variables of the form CODASH_FOO
 #

-#
-# find and parse codash/version.h
-find_path(_codash_INCLUDE_DIR codash/version.h
-  HINTS ${CMAKE_SOURCE_DIR}/../../.. $ENV{CODASH_ROOT} ${CODASH_ROOT} }
-  PATH_SUFFIXES include
-  PATHS /usr /usr/local /opt/local /opt
-  )
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/FindCODASH)
+include(FindLibraryPackage)
+include(FindPackageHandleStandardArgs)

-if(CoDash_FIND_REQUIRED)
-  set(_codash_version_output_type FATAL_ERROR)
-else()
-  set(_codash_version_output_type STATUS)
-endif()
-
-# Try to ascertain the version...
-if(_codash_INCLUDE_DIR)
-  set(_codash_Version_file "${_codash_INCLUDE_DIR}/codash/version.h")
-
-  if(EXISTS "${_codash_Version_file}")
-    file(READ "${_codash_Version_file}" _codash_Version_contents)
-  else()
-    set(_codash_Version_contents "unknown")
-  endif()
-
-  if(_codash_Version_contents MATCHES ".*define CODASH_VERSION_MAJOR[ \t]+([0-9]+).*")
-    string(REGEX REPLACE ".*define CODASH_VERSION_MAJOR[ \t]+([0-9]+).*"
-      "\\1" CODASH_VERSION_MAJOR ${_codash_Version_contents})
-    string(REGEX REPLACE ".*define CODASH_VERSION_MINOR[ \t]+([0-9]+).*"
-      "\\1" CODASH_VERSION_MINOR ${_codash_Version_contents})
-    string(REGEX REPLACE ".*define CODASH_VERSION_PATCH[ \t]+([0-9]+).*"
-      "\\1" CODASH_VERSION_PATCH ${_codash_Version_contents})
-    set(CODASH_VERSION "${CODASH_VERSION_MAJOR}.${CODASH_VERSION_MINOR}.${CODASH_VERSION_PATCH}"
-      CACHE INTERNAL "The version of CODASH which was detected")
-  else()
-    set(CODASH_VERSION "0.1.0"
-      CACHE INTERNAL "The version of CODASH which was detected")
-  endif()
-else()
-  set(_codash_EPIC_FAIL TRUE)
-  message(${_codash_version_output_type}
-    "Can't find CODASH header file version.h.")
-endif()
-
-#
-# Version checking
-#
-if(CoDash_FIND_VERSION AND CODASH_VERSION)
-  if(CoDash_FIND_VERSION_EXACT)
-    if(NOT CODASH_VERSION VERSION_EQUAL ${CoDash_FIND_VERSION})
-      set(_codash_version_not_exact TRUE)
-    endif()
-  else()
-    # version is too low
-    if(NOT CODASH_VERSION VERSION_EQUAL ${CoDash_FIND_VERSION} AND
-        NOT CODASH_VERSION VERSION_GREATER ${CoDash_FIND_VERSION})
-      set(_codash_version_not_high_enough TRUE)
-    endif()
-  endif()
-endif()
-
-find_library(_codash_LIBRARY codash
-  HINTS ${CMAKE_SOURCE_DIR}/../../.. $ENV{CODASH_ROOT} ${CODASH_ROOT} }
-  PATH_SUFFIXES lib
-  PATHS /usr /usr/local /opt/local /opt
-)
-
-# Inform the users with an error message based on what version they
-# have vs. what version was required.
-if(_codash_version_not_high_enough)
-  set(_codash_EPIC_FAIL TRUE)
-  message(${_codash_version_output_type}
-    "Version ${CoDash_FIND_VERSION} or higher of CODASH is required. "
-    "Version ${CODASH_VERSION} was found in ${_codash_INCLUDE_DIR}.")
-elseif(_codash_version_not_exact)
-  set(_codash_EPIC_FAIL TRUE)
-  message(${_codash_version_output_type}
-    "Version ${CoDash_FIND_VERSION} of CODASH is required exactly. "
-    "Version ${CODASH_VERSION} was found.")
-else()
-  if(CoDash_FIND_REQUIRED)
-    if(_codash_LIBRARY MATCHES "_codash_LIBRARY-NOTFOUND")
-      message(FATAL_ERROR "Missing the CODASH library.\n"
-        "Consider using CMAKE_PREFIX_PATH or the CODASH_ROOT environment variable. "
-        "See the ${CMAKE_CURRENT_LIST_FILE} for more details.")
-    endif()
-  endif()
-  include(FindPackageHandleStandardArgs)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CoDash DEFAULT_MSG
-                                    _codash_LIBRARY _codash_INCLUDE_DIR)
-endif()
-
-if(_codash_EPIC_FAIL)
-    # Zero out everything, we didn't meet version requirements
-    set(CODASH_FOUND FALSE)
-    set(_codash_LIBRARY)
-    set(_codash_INCLUDE_DIR)
-endif()
-
-set(CODASH_INCLUDE_DIRS ${_codash_INCLUDE_DIR})
-set(CODASH_LIBRARIES ${_codash_LIBRARY})
-get_filename_component(CODASH_LIBRARY_DIR ${_codash_LIBRARY} PATH)
-
-if(CODASH_FOUND)
-  message(STATUS "Found CODASH ${CODASH_VERSION} in "
-    "${CODASH_INCLUDE_DIRS};${CODASH_LIBRARIES}")
-endif()
+find_library_package(codash TRANSIENT Collage DASH)
+find_package_handle_standard_args(CODASH DEFAULT_MSG
+                                  CODASH_LIBRARIES CODASH_INCLUDE_DIRS)


ENH: update default pet-rd-tools version to latest stable.

--- version_config.cmake
+++ version_config.cmake
@@ -200,7 +200,7 @@

   ## pet-rd-tools
   set(DEFAULT_pet_rd_tools_URL https://github.com/UCL/pet-rd-tools )
-  set(DEFAULT_pet_rd_tools_TAG b88281f79e8c4a3781ebda7663f1ce7f5cab6e68)
+  set(DEFAULT_pet_rd_tools_TAG v1.1.0)

   ## glog
   set(DEFAULT_glog_URL https://github.com/google/glog )


refs #5368 revert leif's bad checkin changing CTestConfig.cmake

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

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "23:59:00 EDT")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "localhost:8080")
+set(CTEST_DROP_SITE "192.168.1.114")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=tokudb")
 set(CTEST_DROP_SITE_CDASH TRUE)


updated models hash

updated models hash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,7 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
-set(TEST_MODELS_HASH 3d3c2deab84677efdf061c64fc623ed955068fb4)
+set(TEST_MODELS_HASH cd603634d1038bce1db225f226ac8c6ebcdbaf0e)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


Fix hdfgroup domain for CDash

Fix hdfgroup domain for CDash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -9,7 +9,7 @@
 set(CTEST_NIGHTLY_START_TIME "00:00:00 CST")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
+set(CTEST_DROP_SITE "cdash.hdfgroup.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=MERCURY")
 set(CTEST_DROP_SITE_CDASH TRUE)


ctest: clean up warning exceptions

ctest: clean up warning exceptions

Since GCC 4.8.0 is the minimum requirement there's a lot of warnings
we'll never see again.

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -3,21 +3,13 @@
    " C4756: " # MSVC 2012 can't suppress this warning
    "used uninitialized in this function"
    "Skipping compilation of tests gatherStruct and gather2dim because of clang bug" # Not a helpful warning for the dashboard
-   "GCC < 4.3 does not have full support for SSE2 intrinsics." # Ignore self-made warning, though what I really want is a message when the warning is absent
-   "call to .*Vc::Warnings::_operator_bracket_warning.* declared with attribute warning"
    "warning is a GCC extension"
    "^-- "  # Ignore output from cmake
-   "GCC 4.6.0 is broken.  The following tests are therefore disabled" # This warning is meant for users not the dashboard
-   "Your GCC is older than 4.4.6.  This is known to cause problems/bugs" # This warning is meant for users not the dashboard
-   "GCC 4.4.x shows false positives for -Wparentheses, thus we rather disable" # This warning is meant for users not the dashboard
    "AVX disabled per default because of old/broken compiler" # This warning is meant for users not the dashboard
-   "GCC 4.7.0 miscompiles at -O3, adding -fno-predictive-commoning to the" # This warning is meant for users not the dashboard
    "warning: the mangled name of .*typename Vc::{anonymous}::Decltype.* will change in a future version of GCC"
-   "^\\*\\*\\* WARNING non-zero return value in ctest from: make" # Ignore output from ctest
+   "WARNING non-zero return value in ctest from: make" # Ignore output from ctest
    "ipo: warning #11010:" # Ignore warning about incompatible libraries with ICC -m32 on 64-bit system
    "include/qt4" # -Wuninitialized in QWeakPointer(X *ptr)
-   "implicit_type_conversion.cpp.*(double|float).*argument 1 to.*TestImplicitCast" # ignore GCC 4.1 warning
-   "Vc::Warnings::_operator_bracket_warning" # GCC 4.3 is supposed to throw this warning like crazy
    )

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}


CMake: Bugfix, use BOOST_ROOT instead of Boost_DIR.

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@30324 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_boost.cmake
+++ deal.II/cmake/configure/configure_boost.cmake
@@ -40,7 +40,7 @@

   SET_IF_EMPTY(BOOST_DIR "$ENV{BOOST_DIR}")
   IF(NOT "${BOOST_DIR}" STREQUAL "")
-    SET(Boost_DIR "${BOOST_DIR}")
+    SET(BOOST_ROOT "${BOOST_DIR}")
   ENDIF()

   IF(DEAL_II_WITH_THREADS)


Tweak doxygen scripts

Tweak doxygen scripts

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -4,9 +4,9 @@
   return()
 endif()

-configure_file(DoxygenLayout.xml ${CMAKE_BINARY_DIR}/doc/DoxygenLayout.xml
+configure_file(doc/DoxygenLayout.xml ${CMAKE_BINARY_DIR}/doc/DoxygenLayout.xml
   @ONLY)
-configure_file(Doxyfile ${CMAKE_BINARY_DIR}/doc/Doxyfile @ONLY)
+configure_file(doc/Doxyfile ${CMAKE_BINARY_DIR}/doc/Doxyfile @ONLY)

 get_property(INSTALL_DEPENDS GLOBAL PROPERTY DOXYGEN_DEP_TARGETS)
 add_custom_target(doxygen_install


Fix Findgpusd

Fix Findgpusd

--- Findgpusd.cmake
+++ Findgpusd.cmake
@@ -84,7 +84,7 @@
 find_library_package(gpusd)

 # core
-set(GPUSD_core_LIBRARY GPUSD_LIBRARY)
+set(GPUSD_core_LIBRARY ${GPUSD_LIBRARY})
 set(GPUSD_COMPONENTS core) # reset in !FOUND

 # components
@@ -92,11 +92,12 @@
 foreach(_gpusd_COMPONENT ${_gpusd_COMPONENTS})
   set(_gpusd_lib GPUSD_${_gpusd_COMPONENT}_LIBRARY)
   find_library(${_gpusd_lib} gpusd_${_gpusd_COMPONENT}
-    PATHS ${_gpusd_INCLUDE_DIR}/.. PATH_SUFFIXES lib NO_DEFAULT_PATH)
+    PATHS ${GPUSD_INCLUDE_DIR}/.. PATH_SUFFIXES lib NO_DEFAULT_PATH)

   if(${_gpusd_lib} MATCHES "${_gpusd_lib}-NOTFOUND")
     if(gpusd_FIND_COMPONENTS MATCHES ${_gpusd_COMPONENT} AND _gpusd_output)
-      message(${_gpusd_version_output_type} "${_gpusd_lib} not found")
+      message(${_gpusd_version_output_type}
+        "gpusd_${_gpusd_COMPONENT} not found in ${GPUSD_INCLUDE_DIR}/../lib")
     endif()
   else()
     set(GPUSD_${_gpusd_COMPONENT}_FOUND TRUE)
@@ -109,11 +110,9 @@
                                   GPUSD_core_LIBRARY GPUSD_INCLUDE_DIRS)
 if(GPUSD_FOUND)
   set(GPUSD_DEB_DEPENDENCIES "gpu-sd${GPUSD_VERSION_MAJOR}-runtime")
-  if(_gpusd_output)
-    message(STATUS "Found gpusd ${GPUSD_VERSION} in ${GPUSD_INCLUDE_DIRS}:"
-      "${GPUSD_LIBRARIES}")
+  if(_flp_output)
+    message(STATUS "Found gpusd modules ${GPUSD_COMPONENTS}")
   endif()
 else()
   set(GPUSD_COMPONENTS)
 endif()
-


Don't use a custom CheckCCompilerFlag.cmake

--- cmake/CheckCCompilerFlag.cmake
+++ cmake/CheckCCompilerFlag.cmake
@@ -1,59 +0,0 @@
-# - Check if the C source code provided in the SOURCE argument compiles.
-# CHECK_C_SOURCE_COMPILES(SOURCE VAR)
-#
-#  FLAG   - compiler flag to check
-#  VAR    - variable to store whether the source code compiled
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
-#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-#  CMAKE_REQUIRED_INCLUDES = list of include directories
-#  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-MACRO(CHECK_C_COMPILER_FLAG FLAG VAR)
-  IF("${VAR}" MATCHES "^${VAR}$")
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
-      "${FLAG} ${CMAKE_REQUIRED_FLAGS}")
-    IF(CMAKE_REQUIRED_LIBRARIES)
-      SET(CHECK_C_COMPILER_FLAG_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-    ELSE(CMAKE_REQUIRED_LIBRARIES)
-      SET(CHECK_C_COMPILER_FLAG_ADD_LIBRARIES)
-    ENDIF(CMAKE_REQUIRED_LIBRARIES)
-    IF(CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_C_COMPILER_FLAG_ADD_INCLUDES
-        "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
-    ELSE(CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_C_COMPILER_FLAG_ADD_INCLUDES)
-    ENDIF(CMAKE_REQUIRED_INCLUDES)
-    FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
-      "int main() {return 0;}\n")
-
-    MESSAGE(STATUS "Checking if C compiler supports ${FLAG}")
-    TRY_COMPILE(${VAR}
-      ${CMAKE_BINARY_DIR}
-      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
-      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-      CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-      "${CHECK_C_COMPILER_FLAG_ADD_LIBRARIES}"
-      "${CHECK_C_COMPILER_FLAG_ADD_INCLUDES}"
-      OUTPUT_VARIABLE OUTPUT)
-    IF(${VAR})
-      SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
-      MESSAGE(STATUS "Checking if C compiler supports ${FLAG} - Success")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-        "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
-        "${OUTPUT}\n"
-        "Source file was:\n${SOURCE}\n")
-    ELSE(${VAR})
-      MESSAGE(STATUS "Checking if C compiler supports ${FLAG} - Failed")
-      SET(${VAR} "" CACHE INTERNAL "Test ${VAR}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
-        "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
-        "${OUTPUT}\n"
-        "Source file was:\n${SOURCE}\n")
-    ENDIF(${VAR})
-  ENDIF("${VAR}" MATCHES "^${VAR}$")
-ENDMACRO(CHECK_C_COMPILER_FLAG)


fix patch command

fix patch command

--- cmake/External_uriparser.cmake
+++ cmake/External_uriparser.cmake
@@ -4,7 +4,7 @@
   URL_MD5 c5cf6b3941d887deb7defc2a86c40f1d
   BINARY_DIR ${CMAKE_BINARY_DIR}/URIPARSER/build
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-  PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/cmake/UriParser_cmake_lists_txt ${CMAKE_BINARY_DIR}/URIPARSER/src/URIPARSER
+  PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/cmake/UriParser_cmake_lists_txt ${CMAKE_BINARY_DIR}/URIPARSER/src/URIPARSER/
   CMAKE_CACHE_ARGS
   -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/URIPARSER
   -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}


- Slight correction to FindOpenAL, excluding the AL prefix to headers

--- cmake/Modules/FindOpenAL.cmake
+++ cmake/Modules/FindOpenAL.cmake
@@ -20,12 +20,11 @@
 #set ( OPENAL_EFX_LIBRARY CACHE FILEPATH "OpenAL EFX library file" )

 find_path ( OPENAL_INCLUDE_DIR
-    al.h
-    alc.h
+    AL/al.h
+    AL/alc.h

     PATH_SUFFIXES
     include
-    include/AL

     PATHS
     ${OPENAL_SEARCH_PATHS}


cmake: add nodejs executable name

cmake: add nodejs executable name

The Debian package names the executable nodejs instead of node

Signed-off-by: Justin Brown <5b8a81ebf9a8661a7723d85a1264040bc2a1e8c8@intel.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- cmake/modules/FindNodejs.cmake
+++ cmake/modules/FindNodejs.cmake
@@ -1,4 +1,4 @@
-find_program (NODE_EXECUTABLE NAMES node
+find_program (NODE_EXECUTABLE NAMES node nodejs
     HINTS
     $ENV{NODE_DIR}
     PATH_SUFFIXES bin


cmake/modules/FindPYTHON.cmake: Use `print` with parentheses.

--- cmake/modules/FindPYTHON.cmake
+++ cmake/modules/FindPYTHON.cmake
@@ -13,7 +13,7 @@
 IF(PYTHONINTERP_FOUND)
     IF(NOT PYTHON_ROOT)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import sys; print sys.prefix"
+                            "import sys; print(sys.prefix)"
                             RESULT_VARIABLE PYTHON_ROOT_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_ROOT
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -25,7 +25,7 @@
     ENDIF()
     IF(NOT PYTHON_INCLUDE_DIR)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import distutils; import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"
+                            "import distutils; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())"
                             RESULT_VARIABLE PYTHON_INCLUDE_DIR_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -37,7 +37,7 @@
     ENDIF()
     IF(NOT PYTHON_LIBRARY_DIR)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import distutils; import distutils.sysconfig; print distutils.sysconfig.get_config_var(\"LIBDIR\")"
+                            "import distutils; import distutils.sysconfig; print(distutils.sysconfig.get_config_var(\"LIBDIR\"))"
                             RESULT_VARIABLE PYTHON_LIBRARY_DIR_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_LIBRARY_DIR
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -49,7 +49,7 @@
     ENDIF()
     IF(NOT PYTHON_SITE_PACKAGES)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "from distutils.sysconfig import get_python_lib; print get_python_lib()"
+                            "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
                             RESULT_VARIABLE PYTHON_SITE_PACKAGES_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
                             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -61,7 +61,7 @@
     ENDIF()
     IF(NOT PYTHON_VERSION)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "from distutils.sysconfig import get_python_version; print get_python_version()"
+                            "from distutils.sysconfig import get_python_version; print(get_python_version())"
                             RESULT_VARIABLE PYTHON_VERSION_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_VERSION
                             OUTPUT_STRIP_TRAILING_WHITESPACE)


Fix regression: multiple use of CommonCPPCTest

MGL uses CommonCPPCTest in more than one test sub-directory,
using the functionality introduced in #d081493. Commit #603eeb5
breaks this capability. This patch creates the
${PROJECT_NAME}_run_cpp_tests target only if it does not
already exist.

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -52,7 +52,6 @@
   # Test link libraries
   target_link_libraries(${PROJECT_NAME}_${NAME} ${TEST_LIBRARIES}
     ${${NAME}_LINK_LIBRARIES})
-
   # Per target test command customisation with
   # ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS
   set(RUN_PREFIX ${TEST_PREFIX})
@@ -75,12 +74,16 @@
   endif()
 endforeach()

-add_custom_target(${PROJECT_NAME}_run_cpp_tests
-  COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_CPP_TESTS}
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-  COMMENT "Running all ${PROJECT_NAME} cpp tests")
-if(COVERAGE)
-  add_dependencies(${PROJECT_NAME}_run_cpp_tests ${PROJECT_NAME}_lcov-clean)
+if(TARGET ${PROJECT_NAME}_run_cpp_tests)
+  add_dependencies(${PROJECT_NAME}_run_cpp_tests ${ALL_CPP_TESTS})
+else()
+  add_custom_target(${PROJECT_NAME}_run_cpp_tests
+    COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_CPP_TESTS}
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMENT "Running all ${PROJECT_NAME} cpp tests")
+  if(COVERAGE)
+    add_dependencies(${PROJECT_NAME}_run_cpp_tests ${PROJECT_NAME}_lcov-clean)
+  endif()
 endif()

 if(NOT TARGET run_cpp_tests)


Remove al_keyboard as it is part of the unused SAGGUI utilities.

--- cmake/FileList.cmake
+++ cmake/FileList.cmake
@@ -148,7 +148,6 @@
 )

 set(GUI_SRC
-src/util/gui/al_keyinput.cpp
 src/util/gui/animation.cpp
 src/util/gui/box.cpp
 src/util/gui/container.cpp


Improve Ubuntu support

Improve Ubuntu support

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -106,6 +106,7 @@
             /usr/lib64
             /usr/lib
             /usr/local/lib64
+            /usr/lib/x86_64-linux-gnu
             /usr/local/lib
             /sw/lib
             /opt/local/lib


removed findlmdb.cmake, no longer required

--- cmake/FindLMDB.cmake
+++ cmake/FindLMDB.cmake
@@ -1,57 +0,0 @@
-# Copyright (c) 2014, The Monero Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of
-#    conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list
-#    of conditions and the following disclaimer in the documentation and/or other
-#    materials provided with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors may be
-#    used to endorse or promote products derived from this software without specific
-#    prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-MESSAGE(STATUS "Looking for liblmdb")
-
-FIND_PATH(LMDB_INCLUDE_DIR
-  NAMES lmdb.h
-  PATH_SUFFIXES include/ include/lmdb/
-  PATHS "${PROJECT_SOURCE_DIR}"
-  ${LMDB_ROOT}
-  $ENV{LMDB_ROOT}
-  /usr/local/
-  /usr/
-)
-
-if(STATIC)
-  if(MINGW)
-    find_library(LMDB_LIBRARIES liblmdb.dll.a)
-  else()
-    find_library(LMDB_LIBRARIES liblmdb.a)
-  endif()
-else()
-  find_library(LMDB_LIBRARIES lmdb)
-endif()
-
-IF(LMDB_INCLUDE_DIR)
-  MESSAGE(STATUS "Found liblmdb include (lmdb.h) in ${LMDB_INCLUDE_DIR}")
-  IF(LMDB_LIBRARIES)
-    MESSAGE(STATUS "Found liblmdb library")
-    set(LMDB_INCLUDE ${LMDB_INCLUDE_DIR})
-    set(LMDB_LIBRARY ${LMDB_LIBRARIES})
-  ENDIF()
-ENDIF()


fptu: workaround for MSVC 2017 /Wall bug (use /W4 instead).

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -468,7 +468,15 @@
     add_definitions("-Doverride=")
   endif()

-  if(CC_HAS_WALL)
+  if(MSVC)
+    if(MSVC_VERSION EQUAL 1910)
+      # LY: avoid /Wall for Visual Studio 2017, otherwise due a bug we could lost the control
+      #     and get a lot of junk warnings from compiler's and SDK headers.
+      add_compile_flags("C;CXX" "/W4")
+    else()
+      add_compile_flags("C;CXX" "/Wall")
+    endif()
+  elseif(CC_HAS_WALL)
     add_compile_flags("C;CXX" "-Wall")
   endif()
   if(CC_HAS_WEXTRA)


span: add cmake integration

span: add cmake integration


New version: 0.3.8

New version: 0.3.8

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "7")
+SET(HAWKEY_PATCH "8")