BUG:Use OPENGL_LIBRARIES instead of OPENGL_gl_LIBRARY.

--- CMake/vtkTestGLX.cmake
+++ CMake/vtkTestGLX.cmake
@@ -81,7 +81,10 @@
 set(SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")

 set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR})
-set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_gl_LIBRARY})
+
+# We cannot just use OPENGL_gl_LIBRARY: some platforms required to link
+# with X11, which is available only in OPENGL_LIBRARIES.
+set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})

 if(DEFINED GLX_DEFINES_MACRO_GLX_VERSION_1_1)
  set(REPORT_STATUS 0)


Fix output name of embedded library, honor OUTPUT_NAME in MERGE_LIBRARIES macro

--- cmake/libutils.cmake
+++ cmake/libutils.cmake
@@ -220,7 +220,7 @@
   SET(LIBS ${ARG_DEFAULT_ARGS})
   LIST(REMOVE_AT LIBS 0)
   IF(ARG_STATIC)
-    IF (NOT "${ARG_OUTPUT_NAME}")
+    IF (NOT ARG_OUTPUT_NAME)
       SET(ARG_OUTPUT_NAME ${TARGET})
     ENDIF()
     MERGE_STATIC_LIBS(${TARGET} ${ARG_OUTPUT_NAME} "${LIBS}")


Add parameters for EMAG8180 DYNAMIC_ARCH support with cmake

--- cmake/prebuild.cmake
+++ cmake/prebuild.cmake
@@ -332,6 +332,29 @@
     set(ZGEMM_UNROLL_M 4)
     set(ZGEMM_UNROLL_N 4)
     set(SYMV_P 16)
+  elseif ("${TCORE}" STREQUAL "EMAG8180")
+    file(APPEND ${TARGET_CONF_TEMP}
+      "#define ARMV8\n"
+      "#define L1_CODE_SIZE\t32768\n"
+      "#define L1_CODE_LINESIZE\t64\n"
+      "#define L1_CODE_ASSOCIATIVE\t4\n"
+      "#define L1_DATA_SIZE\t32768\n"
+      "#define L1_DATA_LINESIZE\t64\n"
+      "#define L1_DATA_ASSOCIATIVE\t4\n"
+      "#define L2_SIZE\t5262144\n"
+      "#define L2_LINESIZE\t64\n"
+      "#define L2_ASSOCIATIVE\t8\n"
+      "#define DTB_DEFAULT_ENTRIES\t64\n"
+      "#define DTB_SIZE\t4096\n")
+    set(SGEMM_UNROLL_M 16)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 8)
+    set(DGEMM_UNROLL_N 4)
+    set(CGEMM_UNROLL_M 8)
+    set(CGEMM_UNROLL_N 4)
+    set(ZGEMM_UNROLL_M 4)
+    set(ZGEMM_UNROLL_N 4)
+    set(SYMV_P 16)
   elseif ("${TCORE}" STREQUAL "POWER6")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_DATA_SIZE 32768\n"


remove counter and quote arguments to add_test

--- test/cmake/ATFTestAddTests.cmake
+++ test/cmake/ATFTestAddTests.cmake
@@ -2,7 +2,7 @@
 #
 # See `Copyright.txt` for license details.

-set(script "set(_counter 1)")
+set(script "")

 function(add_test_to_script _name _executable _test _vars)

@@ -19,7 +19,7 @@

   set(_testscript
       "
-add_test(${_name} ${CMAKE_COMMAND}
+add_test(\"${_name}\" \"${CMAKE_COMMAND}\"
           -D \"TEST_FOLDER_NAME=${_name}\"
           -D \"TEST_EXECUTABLE=${_executable}\"
           -D \"TEST_NAME=${_test}\"


build: use -fcommon compiler flag for dpdk

gcc 10 switched its defaults to -fno-common [1], which dpdk is not
prepared for. Use -fcommon explicitly for dpdk builds. This is safe
as it was the default for gcc 9 and previous.

I see that dpdk upstream did some work to make it -fno-common
friendly, but it is better to wait for the work to complete and
then rebase on a new dpdk version.

[1] https://gcc.gnu.org/gcc-10/changes.html

Reviewed-by: Rafael Ávila de Espíndola <1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>
Message-Id: <663b179923f6fc36724cf09ddfbace5dfe2d3b29@scylladb.com>

--- cooking_recipe.cmake
+++ cooking_recipe.cmake
@@ -261,7 +261,8 @@
 endif()

 set (dpdk_args
-  EXTRA_CFLAGS=-Wno-error
+  # gcc 10 defaults to -fno-common, which dpdk is not prepared for
+  "EXTRA_CFLAGS=-Wno-error -fcommon"
   O=<BINARY_DIR>
   DESTDIR=<INSTALL_DIR>
   T=${dpdk_quadruple})


STYLE: Adding a note why this library will not compile with LDFLAGS=-Wl,--no-undefined. Maybe the interface should export dep to python_libraries...

--- CMake/KitCommonPythonWrapBlock.cmake
+++ CMake/KitCommonPythonWrapBlock.cmake
@@ -14,6 +14,8 @@
 ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
 SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}PythonD)

+# Underlinking on purpose. The following library will not compile
+# with LDFLAGS=-Wl,--no-undefined by design:
 # On some UNIX platforms the python library is static and therefore
 # should not be linked into the shared library.  Instead the symbols
 # are exported from the python executable so that they can be used by


CMake options fix

CMake options fix

--- CMake/Utils/MyGUIConfigTargets.cmake
+++ CMake/Utils/MyGUIConfigTargets.cmake
@@ -105,29 +105,29 @@
 		link_directories(${OPENGL_LIB_DIR})
 	endif()

+	# setup MyGUIEngine target
+	add_executable(${DEMONAME} WIN32 ${HEADER_FILES} ${SOURCE_FILES})
+	set_target_properties(${DEMONAME} PROPERTIES SOLUTION_FOLDER "Demos")
+
+	# add dependencies
+	add_dependencies(${DEMONAME} MyGUIEngine )
+
+	mygui_config_sample(${DEMONAME})
+
 	if(MYGUI_SAMPLES_INPUT EQUAL 1)
 		add_definitions("-DMYGUI_SAMPLES_INPUT_DIRECTX")
-	elseif(MYGUI_RENDERSYSTEM EQUAL 2)
+	elseif(MYGUI_SAMPLES_INPUT EQUAL 2)
 		add_definitions("-DMYGUI_SAMPLES_INPUT_OIS")
 		link_directories(${OIS_LIB_DIR})
 		target_link_libraries(${DEMONAME} ${OIS_LIBRARIES})
-	elseif(MYGUI_RENDERSYSTEM EQUAL 3)
+	elseif(MYGUI_SAMPLES_INPUT EQUAL 3)
 		add_definitions("-DMYGUI_SAMPLES_INPUT_WIN32")
-	elseif(MYGUI_RENDERSYSTEM EQUAL 4)
+	elseif(MYGUI_SAMPLES_INPUT EQUAL 4)
 		add_definitions("-DMYGUI_SAMPLES_INPUT_OIS_W32_MIX")
 		link_directories(${OIS_LIB_DIR})
 		target_link_libraries(${DEMONAME} ${OIS_LIBRARIES})
 	endif()

-	# setup MyGUIEngine target
-	add_executable(${DEMONAME} WIN32 ${HEADER_FILES} ${SOURCE_FILES})
-	set_target_properties(${DEMONAME} PROPERTIES SOLUTION_FOLDER "Demos")
-
-	# add dependencies
-	add_dependencies(${DEMONAME} MyGUIEngine )
-
-	mygui_config_sample(${DEMONAME})
-
 	# link libraries against it
 	target_link_libraries(${DEMONAME}
 		MyGUIEngine


ctkDashboardDriverScript - Disable CTEST_USE_LAUNCHERS before building doc

With CTK_USE_LAUNCHER enabled, the warnings associated with the
generation of the documentation weren't sent to cdash.

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -195,12 +195,14 @@

     if (WITH_DOCUMENTATION)
       message("----------- [ Build Documentation ] -----------")
+      set(CTEST_USE_LAUNCHERS 0)
       # Build Documentation target
       set_property(GLOBAL PROPERTY SubProject Documentation)
       set_property(GLOBAL PROPERTY Label Documentation)
       set(CTEST_BUILD_TARGET "doc")
       ctest_build(BUILD "${ctk_build_dir}" APPEND)
       ctest_submit(PARTS Build)
+      set(CTEST_USE_LAUNCHERS 1)
     endif()

     # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...


Adding macro for checking git tag.

Adding macro for checking git tag.

--- macros.cmake
+++ macros.cmake
@@ -1,3 +1,19 @@
+macro(find_gitrep gitdir tag)
+	exec_program(git ${gitdir}
+		ARGS describe --tags
+		OUTPUT_VARIABLE tagname
+		RETURN_VALUE retcode
+	)
+
+	if(NOT retcode EQUAL 0)
+		message(FATAL_ERROR "Cannot get tag for git repository ${gitdir}. Error: ${retcode}.")
+	endif()
+
+	if(NOT tagname EQUAL ${tag})
+		message(FATAL_ERROR "tag ${tag} is not found for git repository ${gitdir}.")
+	endif()
+endmacro(find_gitrep)
+
 macro(gen_version_c)

 	set(hfile ${CMAKE_CURRENT_BINARY_DIR}/version.h)


ENH: upgrading dashboard ITK from 4.0.0 to latest release

--- Testing/Dashboard/pxDashboard_LKEB_linux64_gcc.cmake
+++ Testing/Dashboard/pxDashboard_LKEB_linux64_gcc.cmake
@@ -45,7 +45,7 @@
 # Dashboard settings
 SET( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/usr/local/toolkits/ITK/4.0.0/bin_debug
+ITK_DIR:PATH=/usr/local/toolkits/ITK/latest_release/bin_debug

 // Coverage settings: -fprofile-arcs -ftest-coverage
 CMAKE_CXX_FLAGS_DEBUG:STRING=-g -O0 -fprofile-arcs -ftest-coverage


Bazel/CMake: fix multiple cmake generate targets

--- misc/bazel/cmake/setup.cmake
+++ misc/bazel/cmake/setup.cmake
@@ -16,6 +16,7 @@
 set(BAZEL_EXEC_ROOT ${BAZEL_OUTPUT_BASE}/execroot/${BAZEL_EXEC_ROOT})

 bazel(query "kind(generate_cmake, //...)" OUTPUT_VARIABLE BAZEL_GENERATE_CMAKE_TARGETS)
+string(REPLACE "\n" ";" BAZEL_GENERATE_CMAKE_TARGETS "${BAZEL_GENERATE_CMAKE_TARGETS}")
 bazel(build ${BAZEL_GENERATE_CMAKE_TARGETS})

 string(REPLACE "//" "" BAZEL_GENERATE_CMAKE_TARGETS "${BAZEL_GENERATE_CMAKE_TARGETS}")


switching to new log library instead of cout

--- build/build.cmake
+++ build/build.cmake
@@ -55,6 +55,7 @@

 	add_executable(platform_tests  $<TARGET_OBJECTS:platform>
 						$<TARGET_OBJECTS:core>
+						$<TARGET_OBJECTS:fmt>
 						${PLATFORM_TEST_SRCS})

 	source_group("Source" FILES ${PLATFORM_TEST_SRCS})


fix cmake_args passed to child process (missing project settings)

--- Modules/private/CakePkgInstall.cmake
+++ Modules/private/CakePkgInstall.cmake
@@ -65,8 +65,39 @@
   endif()

   _cake_execute_git_command_in_repo("log;-1;--pretty=format:%H" "${destination}" repo_sha)
+
+  # call cmake configure
+  _cake_get_project_var(EFFECTIVE CMAKE_ARGS)
+  set(cmake_args ${ans})
+
+  _cake_get_project_var(EFFECTIVE CMAKE_GENERATOR)
+  if(ans)
+    list(APPEND cmake_args -G "${ans}")
+  endif()
+
+  _cake_get_project_var(EFFECTIVE CMAKE_GENERATOR_TOOLSET)
+  if(ans)
+    list(APPEND cmake_args -T "${ans}")
+  endif()
+
+  _cake_get_project_var(EFFECTIVE CMAKE_GENERATOR_PLATFORM)
+  if(ans)
+    list(APPEND cmake_args -A "${ans}")
+  endif()
+
+  _cake_get_project_var(EFFECTIVE CMAKE_INSTALL_PREFIX)
+  if(ans)
+    list(APPEND cmake_args "-DCMAKE_INSTALL_PREFIX=${ans}")
+  endif()
+
+  _cake_get_project_var(EFFECTIVE CMAKE_PREFIX_PATH)
+  if(ans)
+    string(REPLACE ";" "\;" ans "${ans}")
+    list(APPEND cmake_args "-DCMAKE_PREFIX_PATH=${ans}")
+  endif()
+
   set(build_pars_now "")
-  foreach(c ${definitions} ${CAKE_PKG_CMAKE_ARGS})
+  foreach(c ${definitions} ${cmake_args})
     if(c MATCHES "^-D[^=]+=.*$")
       string(REPLACE ";" "\;" c "${c}")
       list(APPEND build_pars_now "${c}")
@@ -158,39 +189,7 @@
         endif()
       endforeach()

-      # call cmake configure
-      set(binary_dir ${CAKE_PKG_BUILD_DIR}/${shortcid}_${c})
-      _cake_get_project_var(EFFECTIVE CMAKE_ARGS)
-      set(cmake_args ${ans})
-      cake_save_session_vars()
-      set(command_line "")
-
-      _cake_get_project_var(EFFECTIVE CMAKE_GENERATOR)
-      if(ans)
-        list(APPEND command_line -G "${ans}")
-      endif()
-
-      _cake_get_project_var(EFFECTIVE CMAKE_GENERATOR_TOOLSET)
-      if(ans)
-        list(APPEND command_line -T "${ans}")
-      endif()
-
-      _cake_get_project_var(EFFECTIVE CMAKE_GENERATOR_PLATFORM)
-      if(ans)
-        list(APPEND command_line -A "${ans}")
-      endif()
-
-      _cake_get_project_var(EFFECTIVE CMAKE_INSTALL_PREFIX)
-      if(ans)
-        list(APPEND command_line "-DCMAKE_INSTALL_PREFIX=${ans}")
-      endif()
-
-      _cake_get_project_var(EFFECTIVE CMAKE_PREFIX_PATH)
-      if(ans)
-        list(APPEND command_line "-DCMAKE_PREFIX_PATH=${ans}")
-      endif()
-
-      list(APPEND command_line
+      set(command_line
           "-DCMAKE_BUILD_TYPE=${c}"
           "-DCAKE_ROOT=${CAKE_ROOT}"
           "${cmake_args}"
@@ -200,10 +199,12 @@
           "${destination}"
       )

+      set(binary_dir ${CAKE_PKG_BUILD_DIR}/${shortcid}_${c})
       cake_message(STATUS "cd ${binary_dir}")
       cake_list_to_command_line_like_string(s "${command_line}")
       cake_message(STATUS "cmake ${s}")
       file(MAKE_DIRECTORY "${binary_dir}")
+      cake_save_session_vars()
       execute_process(COMMAND ${CMAKE_COMMAND} ${command_line}
         RESULT_VARIABLE res_var
         WORKING_DIRECTORY "${binary_dir}")


SuperBuild: use <PROJECT>_SB_CONFIG in muparserx

--- SuperBuild/CMake/External_muparserx.cmake
+++ SuperBuild/CMake/External_muparserx.cmake
@@ -22,12 +22,11 @@

 SETUP_SUPERBUILD(MUPARSERX)

-#Don't build muparserx examples
-set(MUPARSERX_FLAGS)
-list(APPEND MUPARSERX_FLAGS -DBUILD_EXAMPLES:BOOL=OFF)
-
+set(MUPARSERX_SB_CONFIG)
 if(MSVC AND BUILD_SHARED_LIBS)
- list(APPEND MUPARSERX_FLAGS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON)
+  list(APPEND
+    MUPARSERX_SB_CONFIG
+    -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=TRUE)
 endif()

 ExternalProject_Add(MUPARSERX
@@ -39,7 +38,8 @@
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS
   ${SB_CMAKE_CACHE_ARGS}
-  ${MUPARSERX_FLAGS}
+  -DBUILD_EXAMPLES:BOOL=OFF
+  ${MUPARSERX_SB_CONFIG}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   DEPENDS ${MUPARSERX_DEPENDENCIES}
   LOG_DOWNLOAD 1


COMP: Update "niral_utilities" to remove dependency on ITKV3Compatibility

--- SuperBuild/External_niral_utilities.cmake
+++ SuperBuild/External_niral_utilities.cmake
@@ -55,6 +55,7 @@

   ### --- Project specific additions here
   set(${proj}_CMAKE_OPTIONS
+    -DBUILD_TESTING:BOOL=OFF
     -DCOMPILE_CONVERTITKFORMATS:BOOL=ON
     -DCOMPILE_CORREVAL:BOOL=OFF
     -DCOMPILE_CROPTOOLS:BOOL=OFF
@@ -78,8 +79,8 @@
     )

   ### --- End Project specific additions
-  set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git )
-  set( ${proj}_GIT_TAG 6924bab40c14705e67da0b0fe6292a0253b241c5)
+  set( ${proj}_REPOSITORY ${git_protocol}://github.com/jcfr/niral_utilities.git )
+  set( ${proj}_GIT_TAG a8635a0a37d29536d3281180a9b39936307419f7)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Remove unused cmake file

Remove unused cmake file

--- Tensile/Source/TensileCreateLibrary.cmake
+++ Tensile/Source/TensileCreateLibrary.cmake
@@ -1,137 +0,0 @@
-################################################################################
-#
-# Copyright (C) 2016-2022 Advanced Micro Devices, Inc. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-################################################################################
-
-include(CMakeParseArguments)
-
-################################################################################
-# Create A Tensile Library from LibraryLogic.yaml files
-################################################################################
-function(TensileCreateLibraryCmake
-    Tensile_LOGIC_PATH
-    Tensile_RUNTIME_LANGUAGE
-    Tensile_COMPILER
-    Tensile_CODE_OBJECT_VERSION
-    Tensile_ARCHITECTURE
-    Tensile_LIBRARY_FORMAT
-    Tensile_MERGE_FILES
-    Tensile_SHORT_FILE_NAMES
-    Tensile_LIBRARY_PRINT_DEBUG
-    Tensile_CPU_THREADS
-    Tensile_SEPARATE_ARCHITECTURES
-    Tensile_LAZY_LIBRARY_LOADING)
-
-# make Tensile_PACKAGE_LIBRARY and optional parameter
-# to avoid breaking applications which us this
-  if (ARGN)
-    list (GET ARGN 0 Tensile_PACKAGE_LIBRARY)
-    # list (GET ARGN 1 Tensile_INCLUDE_LEGACY_CODE)
-  else()
-    set(Tensile_PACKAGE_LIBRARY OFF)
-    # set(Tensile_INCLUDE_LEGACY_CODE ON)
-  endif()
-
-  # set(options PACKAGE_LIBRARY Tensile_INCLUDE_LEGACY_CODE)
-  message(STATUS "Tensile_RUNTIME_LANGUAGE    from TensileCreateLibraryCmake : ${Tensile_RUNTIME_LANGUAGE}")
-  message(STATUS "Tensile_CODE_OBJECT_VERSION from TensileCreateLibraryCmake : ${Tensile_CODE_OBJECT_VERSION}")
-  message(STATUS "Tensile_COMPILER            from TensileCreateLibraryCmake : ${Tensile_COMPILER}")
-  message(STATUS "Tensile_ARCHITECTURE        from TensileCreateLibraryCmake : ${Tensile_ARCHITECTURE}")
-  message(STATUS "Tensile_LIBRARY_FORMAT      from TensileCreateLibraryCmake : ${Tensile_LIBRARY_FORMAT}")
-  message(STATUS "Tensile_CPU_THREADS         from TensileCreateLibraryCmake : ${Tensile_CPU_THREADS}")
-
-  #execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/TensileCreateLibrary)
-  #execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/Tensile)
-  file(COPY ${Tensile_ROOT}/bin/TensileCreateLibrary DESTINATION ${Tensile_ROOT}/bin FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-  file(COPY ${Tensile_ROOT}/bin/Tensile DESTINATION ${Tensile_ROOT}/bin FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-
-  set(Tensile_CREATE_COMMAND "${Tensile_ROOT}/bin/TensileCreateLibrary")
-
-  set(Tensile_SOURCE_PATH "${PROJECT_BINARY_DIR}/Tensile")
-  message(STATUS "Tensile_SOURCE_PATH=${Tensile_SOURCE_PATH}")
-
-  # TensileLibraryWriter optional arguments
-  if(${Tensile_MERGE_FILES})
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--merge-files")
-  else()
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--no-merge-files")
-  endif()
-
-  if(${Tensile_PACKAGE_LIBRARY})
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--package-library")
-  endif()
-
-  if(${Tensile_SEPARATE_ARCHITECTURES})
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--separate-architectures")
-  endif()
-
-  if(${Tensile_LAZY_LIBRARY_LOADING})
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--lazy-library-loading")
-  endif()
-
-  if(${Tensile_SHORT_FILE_NAMES})
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--short-file-names")
-  else()
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--no-short-file-names")
-  endif()
-
-  if(${Tensile_LIBRARY_PRINT_DEBUG})
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--library-print-debug")
-  else()
-    set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--no-library-print-debug")
-  endif()
-
-  set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--architecture=${Tensile_ARCHITECTURE}")
-  set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--code-object-version=${Tensile_CODE_OBJECT_VERSION}")
-  set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--cxx-compiler=${Tensile_COMPILER}")
-  set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--library-format=${Tensile_LIBRARY_FORMAT}")
-  set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--jobs=${Tensile_CPU_THREADS}")
-
-  # TensileLibraryWriter positional arguments
-  set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND}
-    ${Tensile_LOGIC_PATH}
-    ${Tensile_SOURCE_PATH}
-    ${Tensile_RUNTIME_LANGUAGE}
-    )
-
-  #string( REPLACE ";" " " Tensile_CREATE_COMMAND "${Tensile_CREATE_COMMAND}")
-  message(STATUS "Tensile_CREATE_COMMAND: ${Tensile_CREATE_COMMAND}")
-
-  # execute python command
-  if($ENV{TENSILE_SKIP_LIBRARY})
-    message(STATUS "Skipping build of ${Tensile_OUTPUT_PATH}")
-  else()
-    if (WIN32)
-      set(CommandLine ${VIRTUALENV_BIN_DIR}/${VIRTUALENV_PYTHON_EXENAME} ${Tensile_CREATE_COMMAND})
-    else()
-      set(CommandLine ${Tensile_CREATE_COMMAND})
-    endif()
-    execute_process(
-      COMMAND ${CommandLine}
-      RESULT_VARIABLE Tensile_CREATE_RESULT
-    )
-    if(Tensile_CREATE_RESULT)
-      message(FATAL_ERROR "Error generating kernels")
-    endif()
-  endif()
-
-endfunction()


Fix mismatch in the cmake script endif condition (#9859)

This change fixes a mismatch in the cmake script endif condition introduced
by #9809.

--- clrdefinitions.cmake
+++ clrdefinitions.cmake
@@ -118,7 +118,7 @@
 if(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
     add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
     add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
-endif(CLR_CMAKE_PLATFORM_UNIX)
+endif(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
 if(FEATURE_EVENT_TRACE)
     add_definitions(-DFEATURE_EVENT_TRACE=1)
 endif(FEATURE_EVENT_TRACE)


Fixed coverage issue with not ignoring specified paths.

--- cmake/Coverage.cmake
+++ cmake/Coverage.cmake
@@ -32,7 +32,13 @@

             # Capturing lcov counters and generating report
             COMMAND ${LCOV} --directory . --capture --output-file coverage0.info
-            COMMAND ${LCOV} -r coverage0.info 'vendor/*' 'test/*' '/usr/*' 'Token.def' --output-file coverage.info
+            COMMAND ${LCOV}
+                -r coverage0.info
+                '*/vendor/*'
+                '*/test/*'
+                '/usr/*'
+                'Token.def'
+                --output-file coverage.info

             DEPENDS ${NAME}
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}


FindOgre.cmake: fix inclusion of lib/opt.

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -90,7 +90,7 @@
             link_directories(${OGRE_DIR})
         endif()
         message(STATUS "Using Ogre from directory " ${OGRE_DIR})
-    elseif (IS_DIRECTORY ${OGRE_DIR}/OgreMain) # Ogre path points to #1 above.
+    elseif (IS_DIRECTORY ${OGRE_DIR}/OgreMain) # Ogre path points to #1 above.
         include_directories(${OGRE_DIR}/include)
         include_directories(${OGRE_DIR}/OgreMain/include)
         if (WIN32)
@@ -105,7 +105,7 @@
         if (WIN32)
             include_directories(${OGRE_DIR}/include/OGRE/RenderSystems/Direct3D9)
             link_directories(${OGRE_DIR}/lib/opt)
-            link_directories(${OGRE_DIR}/lib/$(OutDir)/opt)
+            link_directories(${OGRE_DIR}/lib/opt/$(OutDir))
         endif()
         message(STATUS "Using Ogre from SDK directory " ${OGRE_DIR})
     else()


Fix for ROOT include paths

Fix for ROOT include paths

--- cmake/FindROOT.cmake
+++ cmake/FindROOT.cmake
@@ -115,6 +115,7 @@
         message(FATAL_ERROR "Error retrieving ROOT incdir: ${error}")
     endif(error)
     string(STRIP ${ROOT_INCDIR} ROOT_INCDIR)
+    set(ROOT_INCLUDE_DIRS ${ROOT_INCDIR})

     # Checking for glibs
     execute_process(COMMAND ${ROOT_CONFIG} --noldflags --glibs OUTPUT_VARIABLE ROOT_GLIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )


Less verbose output when building latex manual

--- cmake/UseLATEX.cmake
+++ cmake/UseLATEX.cmake
@@ -304,7 +304,7 @@
   LATEX_WANTIT(PS2PDF_CONVERTER ps2pdf)
   LATEX_WANTIT(LATEX2HTML_CONVERTER latex2html)

-  SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode"
+  SET(LATEX_COMPILER_FLAGS "-interaction=batchmode"
     CACHE STRING "Flags passed to latex.")
   SET(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS}
     CACHE STRING "Flags passed to pdflatex.")


make VcMacros use the improved AddCompilerFlag macro

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -99,11 +99,7 @@
 endmacro()

 macro(vc_add_compiler_flag VAR _flag)
-   string(REGEX REPLACE "[+/:= ]" "_" _flag_esc "${_flag}")
-   check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc})
-   if(check_cxx_compiler_flag_${_flag_esc})
-      set(${VAR} "${${VAR}} ${_flag}")
-   endif(check_cxx_compiler_flag_${_flag_esc})
+   AddCompilerFlag("${_flag}" CXX_FLAGS ${VAR})
 endmacro()

 macro(vc_check_assembler)


erthink-cmake: fix/reorder dirs list for search CLANG tools for LTO.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -347,30 +347,40 @@
       OUTPUT_VARIABLE clang_search_dirs RESULT_VARIABLE clang_probe_result ERROR_QUIET)

     unset(clang_bindirs)
+    unset(clang_bindirs_x)
     unset(clang_libdirs)
+    unset(clang_libdirs_x)
     if(clang_probe_result EQUAL 0)
-        string(REGEX MATCH "(^|\n.*)(.*programs: =)([^\n]+)((\n.*)|$)" regexp_valid ${clang_search_dirs})
-        if(regexp_valid)
-          string(REGEX REPLACE "(^|\n.*)(.*programs: =)([^\n]+)((\n.*)|$)" "\\3" list ${clang_search_dirs})
-          string(REPLACE ":" ";" list "${list}")
-          #set(clang_bindirs "")
-          foreach(dir IN LISTS list)
-            get_filename_component(dir "${dir}" REALPATH)
+      string(REGEX MATCH "(^|\n.*)(.*programs: =)([^\n]+)((\n.*)|$)" regexp_valid ${clang_search_dirs})
+      if(regexp_valid)
+        string(REGEX REPLACE "(^|\n.*)(.*programs: =)([^\n]+)((\n.*)|$)" "\\3" list ${clang_search_dirs})
+        string(REPLACE ":" ";" list "${list}")
+        foreach(dir IN LISTS list)
+          get_filename_component(dir "${dir}" REALPATH)
+          if(dir MATCHES ".*llvm.*" OR dir MATCHES ".*clang.*")
             list(APPEND clang_bindirs "${dir}")
-          endforeach()
-          list(REMOVE_DUPLICATES clang_bindirs)
-        endif()
-        string(REGEX MATCH "(^|\n.*)(.*libraries: =)([^\n]+)((\n.*)|$)" regexp_valid ${clang_search_dirs})
-        if(regexp_valid)
-          string(REGEX REPLACE "(^|\n.*)(.*libraries: =)([^\n]+)((\n.*)|$)" "\\3" list ${clang_search_dirs})
-          string(REPLACE ":" ";" list "${list}")
-          #set(clang_libdirs "")
-          foreach(dir IN LISTS list)
-            get_filename_component(dir "${dir}" REALPATH)
+          else()
+            list(APPEND clang_bindirs_x "${dir}")
+          endif()
+        endforeach()
+        list(APPEND clang_bindirs "${clang_bindirs_x}")
+        list(REMOVE_DUPLICATES clang_bindirs)
+      endif()
+      string(REGEX MATCH "(^|\n.*)(.*libraries: =)([^\n]+)((\n.*)|$)" regexp_valid ${clang_search_dirs})
+      if(regexp_valid)
+        string(REGEX REPLACE "(^|\n.*)(.*libraries: =)([^\n]+)((\n.*)|$)" "\\3" list ${clang_search_dirs})
+        string(REPLACE ":" ";" list "${list}")
+        foreach(dir IN LISTS list)
+          get_filename_component(dir "${dir}" REALPATH)
+          if(dir MATCHES ".*llvm.*" OR dir MATCHES ".*clang.*")
             list(APPEND clang_libdirs "${dir}")
-          endforeach()
-          list(REMOVE_DUPLICATES clang_libdirs)
-        endif()
+          else()
+            list(APPEND clang_libdirs_x "${dir}")
+          endif()
+        endforeach()
+        list(APPEND clang_libdirs "${clang_libdirs_x}")
+        list(REMOVE_DUPLICATES clang_libdirs)
+      endif()
     else()
       get_filename_component(clang_bindirs ${CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER} DIRECTORY)
       if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")


SuperBuild: FFTW an emtpy target to build fftwf and fftwd

--- SuperBuild/CMake/External_fftw.cmake
+++ SuperBuild/CMake/External_fftw.cmake
@@ -61,6 +61,14 @@
             --disable-dependency-tracking
       )

+    ExternalProject_Add(FFTW
+      PREFIX FFTW
+      DOWNLOAD_COMMAND ""
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      DEPENDS FFTWF FFTWD
+      )

     set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)


SuperBuild: GDAL: deactivate libjson-c

SuperBuild: GDAL: deactivate libjson-c

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -45,10 +45,11 @@

   # PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
   # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
+
+  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL LIBKML_ROOT     --with-libkml)

   set(GDAL_PATCH_COMMAND)
-
-  set(GDAL_CONFIGURE_COMMAND  "${SB_ENV_CONFIGURE_CMD};./configure"
+  set(GDAL_CONFIGURE_COMMAND  "${SB_ENV_CONFIGURE_CMD};${GDAL_SB_SRC}/configure"
     --prefix=${SB_INSTALL_PREFIX}
     --enable-static=no
     --enable-shared=yes
@@ -68,7 +69,6 @@
     --with-jp2mrsid=no
     --with-kakadu=no
     --with-libgrass=no
-    --with-libjson-c=internal
     --with-mrsid=no
     --with-msg=no
     --with-mysql=no
@@ -117,7 +117,6 @@

 endif()

-#message(FATAL_ERROR "GDAL_CONFIGURE_COMMAND=${GDAL_CONFIGURE_COMMAND}")
 ExternalProject_Add(GDAL
   PREFIX GDAL
   URL "http://download.osgeo.org/gdal/2.1.0/gdal-2.1.0.tar.gz"


Remove unused variable value

Remove unused variable value

--- SuperBuild/External_virtualenv.cmake
+++ SuperBuild/External_virtualenv.cmake
@@ -15,7 +15,6 @@
 set(${proj}_binary_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-build)
 set(${proj}_source_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj})
 set(${proj}_install_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj})
-set(${proj}_URL "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=${${proj}_DOWNLOAD_SOURCE_HASH}&name=virtualenv-${${proj}_TARGET_VERSION}.tar.gz")

 sitkSourceDownload(${proj}_URL "virtualenv-${${proj}_TARGET_VERSION}.tar.gz" ${${proj}_DOWNLOAD_SOURCE_HASH})


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


cmake: mark further ADVANCED variables

cmake: mark further ADVANCED variables

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -461,6 +461,8 @@
 	CMAKE_STATIC_FLAGS

 	SWIG_EXECUTABLE
+	MAVEN_EXECUTABLE
+	NPM_EXECUTABLE
 	RONN_LOC

 	Boost_DIR
@@ -475,6 +477,8 @@
 	SWIG_VERSION
 	gtest_build_samples gtest_build_tests gtest_disable_pthreads
 	gtest_force_shared_crt BUILD_SHARED_LIBS
+
+	BOOST_THREAD_LIBRARY

 	ADDED_DIRECTORIES ADDED_PLUGINS REMOVED_PLUGINS

@@ -490,4 +494,6 @@
 	Qt5Test_DIR
 	Qt5Widgets_DIR
 	Qt5_DIR
+	Qt5DBus_DIR
+	Qt5Svg_DIR
 	)


Build: Remove unused Google Test option

Build: Remove unused Google Test option

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -109,8 +109,6 @@
 #
 # Compile options
 #
-
-set (GTEST_ROOT "" CACHE PATH "use external gtest instead of internal")

 set (CMAKE_PIC_FLAGS "-fPIC" CACHE STRING "Which pic flags should be used for cases cmake cannot handle it itself")


cmake: Use find_program on CMAKE_CXX_COMPILER

'find_program' should be used instead of 'set' for determining the
paths of host programs. It resolves #9582 and various other issues.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/compiler/gcc.cmake
+++ cmake/compiler/gcc.cmake
@@ -49,7 +49,7 @@
     set(cplusplus_compiler ${CMAKE_C_COMPILER})
   endif()
 endif()
-set(CMAKE_CXX_COMPILER ${cplusplus_compiler}     CACHE INTERNAL " " FORCE)
+find_program(CMAKE_CXX_COMPILER ${cplusplus_compiler} PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)

 set(NOSTDINC "")


Only configure project_nameDart.cmake and set associated variable if template file present in project or child project.

--- cmake/dtkReporting.cmake
+++ cmake/dtkReporting.cmake
@@ -16,28 +16,28 @@
 ### Change log:
 ##
 ######################################################################
+if (EXISTS ${CMAKE_SOURCE_DIR}/cmake/${PROJECT_NAME}Dart.cmake.in)
+#only create test variables if the project contains a proj_nameDart.cmake.in template file.
+  set(DTK_CTEST_PROJECT_NAME ${PROJECT_NAME} CACHE STRING "Reporting project name.")
+  set(DTK_CTEST_UPDATE_TYPE "git" CACHE STRING "Reporting update type.")
+  set(DTK_CTEST_UPDATE_COMMAND "git" CACHE STRING "Reporting update command.")
+  set(DTK_CTEST_DROP_METHOD "http" CACHE STRING "Reporting drop method.")
+  set(DTK_CTEST_DROP_SITE "cdash.inria.fr" CACHE STRING "Reporting drop site.")
+  set(DTK_CTEST_DROP_LOCATION "/CDash/submit.php?project=${PROJECT_NAME}" CACHE STRING "Reporting drop location.")
+  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/cmake")

-message(project name: ${PROJECT_NAME})
+  configure_file (
+    "${CMAKE_SOURCE_DIR}/cmake/${PROJECT_NAME}Dart.cmake.in"
+    "${CMAKE_BINARY_DIR}/cmake/${PROJECT_NAME}Dart.cmake")

-set(DTK_CTEST_PROJECT_NAME ${PROJECT_NAME} CACHE STRING "Reporting project name.")
-set(DTK_CTEST_UPDATE_TYPE "git" CACHE STRING "Reporting update type.")
-set(DTK_CTEST_UPDATE_COMMAND "git" CACHE STRING "Reporting update command.")
-set(DTK_CTEST_DROP_METHOD "http" CACHE STRING "Reporting drop method.")
-set(DTK_CTEST_DROP_SITE "cdash.inria.fr" CACHE STRING "Reporting drop site.")
-set(DTK_CTEST_DROP_LOCATION "/CDash/submit.php?project=${PROJECT_NAME}" CACHE STRING "Reporting drop location.")
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/cmake")
+  mark_as_advanced(BUILD_TESTING)
+  mark_as_advanced(DART_TESTING_TIMEOUT)
+  mark_as_advanced(DTK_CTEST_PROJECT_NAME)
+  mark_as_advanced(DTK_CTEST_UPDATE_TYPE)
+  mark_as_advanced(DTK_CTEST_UPDATE_COMMAND)
+  mark_as_advanced(DTK_CTEST_DROP_METHOD)
+  mark_as_advanced(DTK_CTEST_DROP_SITE)
+  mark_as_advanced(DTK_CTEST_DROP_LOCATION)

-configure_file (
-  "${CMAKE_SOURCE_DIR}/cmake/${PROJECT_NAME}Dart.cmake.in"
-  "${CMAKE_BINARY_DIR}/cmake/${PROJECT_NAME}Dart.cmake")
-
-mark_as_advanced(BUILD_TESTING)
-mark_as_advanced(DART_TESTING_TIMEOUT)
-mark_as_advanced(DTK_CTEST_PROJECT_NAME)
-mark_as_advanced(DTK_CTEST_UPDATE_TYPE)
-mark_as_advanced(DTK_CTEST_UPDATE_COMMAND)
-mark_as_advanced(DTK_CTEST_DROP_METHOD)
-mark_as_advanced(DTK_CTEST_DROP_SITE)
-mark_as_advanced(DTK_CTEST_DROP_LOCATION)
-
-include(${PROJECT_NAME}Dart)
+  include(${PROJECT_NAME}Dart)
+endif()


CMake: Removed the \Ym for VS2015, seems to work much better without it. https://github.com/inviwo/inviwo-dev/commit/6054985bdd471b209b9d5ef7a8b9a1db66518cfa#commitcomment-16684802

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -268,9 +268,15 @@

     # Disable deprecation warnings for standard C functions
     add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
-    string(REGEX REPLACE "[/\\-]Zm[0-9]+" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ym0x20000000")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm1000")
+
+    if(MSVC_VERSION LESS 1900) # Pre visualstdio 2015
+        # http://www.beta.microsoft.com/VisualStudio/feedbackdetail/view/746718/frequently-get-c1027-from-vc-100-compiler-after-installing-vs-2012-rc
+        # https://github.com/inviwo/inviwo-dev/commit/6054985bdd471b209b9d5ef7a8b9a1db66518cfa#commitcomment-16684802
+        string(REGEX REPLACE "[/\\-]Zm[0-9]+" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ym0x20000000")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm512")
+    endif()
+
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")


cmake: make diskbuilder always recreate disk

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -248,6 +248,10 @@
 set_target_properties(libgcc PROPERTIES LINKER_LANGUAGE C)
 set_target_properties(libgcc PROPERTIES IMPORTED_LOCATION ${INSTALL_LOC}/${ARCH}/lib/libgcc.a)

+# Depending on the output of this command will make it always run. Like magic.
+add_custom_command(OUTPUT fake_news
+      COMMAND cmake -E touch_nocreate alternative_facts)
+
 # add memdisk
 function(add_memdisk DISK)
   get_filename_component(DISK_RELPATH "${DISK}"
@@ -256,7 +260,7 @@
     OUTPUT  memdisk.o
     COMMAND python ${INSTALL_LOC}/memdisk/memdisk.py --file ${INSTALL_LOC}/memdisk/memdisk.asm ${DISK_RELPATH}
     COMMAND nasm -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} ${INSTALL_LOC}/memdisk/memdisk.asm -o memdisk.o
-    DEPENDS ${DISK_RELPATH}
+    DEPENDS ${DISK_RELPATH} fake_news
   )
   add_library(memdisk STATIC memdisk.o)
   set_target_properties(memdisk PROPERTIES LINKER_LANGUAGE CXX)
@@ -269,8 +273,9 @@
   add_custom_command(
       OUTPUT  memdisk.fat
       COMMAND ${INSTALL_LOC}/bin/diskbuilder -o memdisk.fat ${REL_PATH}
-    )
-  add_custom_target(diskbuilder ALL DEPENDS memdisk.fat)
+      DEPENDS fake_news
+      )
+    add_custom_target(diskbuilder ALL DEPENDS memdisk.fat)
   add_dependencies(service diskbuilder)
   add_memdisk("${CMAKE_BINARY_DIR}/memdisk.fat")
 endfunction()


automatically install *.sh files in app folder to bin

--- apps/app.cmake
+++ apps/app.cmake
@@ -28,6 +28,12 @@
       LIBRARY DESTINATION lib
       ARCHIVE DESTINATION lib
       )
+
+      file(GLOB SCRIPT_FILES . ${PROJECT_SOURCE_DIR}/*.sh)
+
+      install(PROGRAMS ${SCRIPT_FILES} DESTINATION bin)
+
+
   endif(MSVC)
 endmacro()


SuperBuild: FFTW: build with --disable-dependency-tracking

dependency tracking if enabled can be an issue later when
loading the dylib. A similar case is seen with sqlite.dylib
custom and installed one. see here:
http://sqlite.1065341.n5.nabble.com/
Mac-OS-Snow-Leopard-32bit-vs-64bit-td53772.html

--- SuperBuild/CMake/External_fftw.cmake
+++ SuperBuild/CMake/External_fftw.cmake
@@ -36,6 +36,7 @@
             --enable-float
             --enable-threads
             --disable-fortran
+            --disable-dependency-tracking
       DEPENDS ${FFTW_DEPENDENCIES}
       )

@@ -57,7 +58,9 @@
             --disable-float
             --enable-threads
             --disable-fortran
+            --disable-dependency-tracking
       )
+

     set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)


SuperBuild: gdal: reorder dependencies

SuperBuild: gdal: reorder dependencies

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -3,7 +3,7 @@
 SETUP_SUPERBUILD(GDAL)

 # declare dependencies
-ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GDAL TIFF CURL GEOTIFF PNG JPEG OPENJPEG SQLITE GEOS ZLIB EXPAT)
+ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GDAL CURL OPENJPEG TIFF GEOTIFF PNG JPEG SQLITE GEOS ZLIB EXPAT)

 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL TIFF_ROOT     --with-libtiff)
 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOTIFF_ROOT  --with-geotiff)


ENH: Upgrade to SWIG 4.0.2

ENH: Upgrade to SWIG 4.0.2

--- SuperBuild/CMake/External_swig.cmake
+++ SuperBuild/CMake/External_swig.cmake
@@ -33,8 +33,8 @@
   # Use pre-built swig executable (no linking is required, no install done)
   ExternalProject_Add(SWIG
     PREFIX SWIG
-    URL "https://downloads.sourceforge.net/project/swig/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip"
-    URL_MD5 a49524dad2c91ae1920974e7062bfc93
+    URL "https://downloads.sourceforge.net/project/swig/swigwin/swigwin-4.0.2/swigwin-4.0.2.zip"
+    URL_MD5 009926b512aee9318546bdd4c7eab6f9
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
     CONFIGURE_COMMAND ""
@@ -52,8 +52,8 @@

   ExternalProject_Add(SWIG
     PREFIX SWIG
-    URL "https://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz"
-    URL_MD5 82133dfa7bba75ff9ad98a7046be687c
+    URL "https://downloads.sourceforge.net/project/swig/swig/swig-4.0.2/swig-4.0.2.tar.gz"
+    URL_MD5 7c3e46cb5af2b469722cafa0d91e127b
     BINARY_DIR ${SWIG_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


set ATLAS_CLAPACK_INC_DIR to CBLAS_INC_DIR in cblas.cmake

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -5,7 +5,7 @@
 # If any cblas implementation found, the following variable will be set.
 #    CBLAS_PROVIDER  # one of MKL, ATLAS, OPENBLAS, REFERENCE
 #    CBLAS_INC_DIR   # the include directory for cblas.
-#    CBLAS_LIBS      # a list of libraries should be linked by paddle.
+#    CBLAS_LIBS      # a list of libraries should be linked by paddle.
 #                    # Each library should be full path to object file.
 #
 # User should set one of MKL_ROOT, ATLAS_ROOT, OPENBLAS_ROOT, REFERENCE_CBLAS_ROOT
@@ -63,11 +63,11 @@
         /usr/lib/atlas
         /usr/lib/atlas-base   # special for ubuntu 14.04.
     )
-find_path(ATLAS_INC_DIR NAMES cblas.h
+find_path(ATLAS_INC_DIR NAMES cblas.h
   PATHS ${ATLAS_INCLUDE_SEARCH_PATHS})
 find_path(ATLAS_CLAPACK_INC_DIR NAMES clapack.h
   PATHS ${ATLAS_INCLUDE_SEARCH_PATHS})
-find_library(ATLAS_CBLAS_LIB NAMES cblas libcblas.so.3
+find_library(ATLAS_CBLAS_LIB NAMES cblas libcblas.so.3
   PATHS ${ATLAS_LIB_SEARCH_PATHS})
 find_library(ATLAS_LIB NAMES lapack_atlas liblapack_atlas.so.3
   PATHS ${ATLAS_LIB_SEARCH_PATHS})
@@ -76,11 +76,12 @@
   set(CBLAS_PROVIDER ATLAS)
   set(CBLAS_INC_DIR ${ATLAS_INC_DIR})
   set(CBLAS_LIBRARIES ${ATLAS_LIB} ${ATLAS_CBLAS_LIB})
-  add_definitions(-DPADDLE_USE_ATLAS)
+  add_definitions(-DPADDLE_USE_ATLAS)
   message(STATUS "Found ATLAS (include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
   set(CBLAS_FOUND ON)
   if(ATLAS_CLAPACK_INC_DIR)
     add_definitions(-DPADDLE_USE_LAPACK)
+    set(CBLAS_INC_DIR ${ATLAS_CLAPACK_INC_DIR})
     message(STATUS "Found lapack in ATLAS (include: ${ATLAS_CLAPACK_INC_DIR})")
   endif()
   return()
@@ -124,7 +125,7 @@
 ## Then find the reference-cblas.  www.netlib.org/blas/

-set(REFERENCE_CBLAS_ROOT $ENV{REFERENCE_CBLAS_ROOT} CACHE PATH
+set(REFERENCE_CBLAS_ROOT $ENV{REFERENCE_CBLAS_ROOT} CACHE PATH
   "Folder contains reference-cblas")
 set(REFERENCE_CBLAS_INCLUDE_SEARCH_PATHS
   ${REFERENCE_CBLAS_ROOT}/include


Compile with -rdynamic for better debugging symbols. (#1123)

* Compile with -rdynamic.

* Only use -rdynamic on Linux.

* Add comment.

--- src/common/cmake/Common.cmake
+++ src/common/cmake/Common.cmake
@@ -4,6 +4,11 @@
 include(CMakeParseArguments)

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -Werror -Wall -Wno-error=unused-function -Wno-error=strict-aliasing")
+
+# The rdynamic flag is needed to produce better backtraces on Linux.
+if(UNIX AND NOT APPLE)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
+endif()

 set(FLATBUFFERS_VERSION "1.7.1")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


Fix C++ compiler flags being passed to C compile, gave problems on macOS.

Differential Revision: https://developer.blender.org/D3091

--- src/cmake/configure_build.cmake
+++ src/cmake/configure_build.cmake
@@ -9,10 +9,10 @@
 # Per-compiler configuration.

 if(CMAKE_COMPILER_IS_GNUCXX)
-	set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
 elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
-	set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
 endif()


Change logic when finding flex to ensure that we get the FlexLexer.h included
from the same place as the flex binary.  This solves problems when users have
multiple incompatible versions of flex on their system.

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

--- src/cmake/flexbison.cmake
+++ src/cmake/flexbison.cmake
@@ -48,6 +48,15 @@
         SET ( ${srclist} ${${srclist}} ${bisonoutputcxx} ${flexoutputcxx} )
         # MESSAGE (STATUS "  src list now ${${srclist}}")
         # MESSAGE (STATUS "  compiler headers = ${${compiler_headers}}")
+
+        # Be really sure that we prefer the FlexLexer.h that comes with
+        # the flex binary we're using, not some other one in the system.
+        GET_FILENAME_COMPONENT ( FLEX_UP ${FLEX_EXECUTABLE} PATH )
+        GET_FILENAME_COMPONENT ( FLEX_UP_UP ${FLEX_UP} PATH )
+        SET ( FLEX_INCLUDE_DIR "${FLEX_UP_UP}/include" )
+        MESSAGE (STATUS "Flex include dir = ${FLEX_INCLUDE_DIR}")
+        INCLUDE_DIRECTORIES ( ${FLEX_INCLUDE_DIR} )
+
         INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_BINARY_DIR} )
         INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_SOURCE_DIR} )
         ADD_CUSTOM_COMMAND ( OUTPUT ${bisonoutputcxx}


rm redundant line

rm redundant line

--- modules/omp.cmake
+++ modules/omp.cmake
@@ -50,8 +50,7 @@
         if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
             if(WIN32)
                 set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Qopenmp")
-            elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" AND
-                   "${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
+            elseif("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
                 set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
             else()
                 set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp")


Added new include define

Added new include define

--- config.h.cmake
+++ config.h.cmake
@@ -10,4 +10,6 @@

 #cmakedefine CPPUTEST_USE_REAL_GMOCK

+#cmakedefine INCLUDE_GTEST_TESTS
+
 #endif


Temporarily remove guards.

Temporarily remove guards.

    * build-aux/cmake/modules/ProjectInfo.cmake: Here.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -12,8 +12,9 @@

 include(CheckCMakeVarsExists)

-if(NOT PROJECT_INFO_CMAKE)
-  set(PROJECT_INFO_CMAKE TRUE)
+#FIXME: Remove guards ASAP
+# if(NOT PROJECT_INFO_CMAKE)
+#   set(PROJECT_INFO_CMAKE TRUE)

   check_cmake_vars_exists(
     PROJECT_VERSION_MAJOR
@@ -42,4 +43,4 @@

   set(PROJECT_TARNAME "${PROJECT_NAME}-${PROJECT_VERSION}")

-endif(NOT PROJECT_INFO_CMAKE)
+# endif(NOT PROJECT_INFO_CMAKE)


[FIX] fixed wrong copy target

[FIX] fixed wrong copy target

--- util/travis/linux-cibuild.cmake
+++ util/travis/linux-cibuild.cmake
@@ -25,16 +25,16 @@
 # we want makefiles
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

-# run the classical ctest suite without update
-# travis-ci handles this for us
-ctest_start     (Continuous)
-
 # Copying the CTestConfig.cmake here is not optimal.  You might have to call
 # ctest twice to get an actual build since ctest expects it to be present
 # at the first time and will fail.
 CONFIGURE_FILE (${CTEST_SOURCE_DIRECTORY}/util/cmake/CTestConfig.cmake
-                ${CTEST_SOURCE_ROOT_DIRECTORY}/CTestConfig.cmake
+                ${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake
                 COPYONLY)
+
+# run the classical ctest suite without update
+# travis-ci handles this for us
+ctest_start     (Continuous)

 ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _configure_ret)
 ctest_build     (BUILD "${CTEST_BINARY_DIRECTORY}" NUMBER_ERRORS _build_errors)


Removed debug printf.

Removed debug printf.

--- src/CombineUnixArchives.cmake
+++ src/CombineUnixArchives.cmake
@@ -101,6 +101,8 @@
       get_filename_component(old_obj_file_name ${old_obj_file_path} NAME)
       set(new_obj_file_path "${working_dir}/${basename}-${old_obj_file_name}")
       file(RENAME ${old_obj_file_path} ${new_obj_file_path})
+      # Use relative paths to work around too-long command failure when building
+      # on Windows in AppVeyor
       file(RELATIVE_PATH new_obj_file_path ${scratch_dir} ${new_obj_file_path})
       list(APPEND all_object_locations ${new_obj_file_path})
     endforeach()
@@ -108,8 +110,6 @@

   # Generate the target static library from all source objects
   file(TO_NATIVE_PATH ${TARGET_LOCATION} TARGET_LOCATION)
-  message(STATUS "ZZZ COMBINE_UNIX_ARCHIVES: TARGET_LOCATION=${TARGET_LOCATION},
-          all_object_locations=${all_object_locations}")
   execute_process(COMMAND ${CMAKE_AR} rcs ${TARGET_LOCATION} ${all_object_locations}
                   WORKING_DIRECTORY ${scratch_dir} RESULT_VARIABLE exe_result)
   if(NOT "${exe_result}" STREQUAL "0")


changed cpack architecture in deploy

changed cpack architecture in deploy

--- deploy/packages/pack-hypha.cmake
+++ deploy/packages/pack-hypha.cmake
@@ -189,7 +189,7 @@

 set(CPACK_DEBIAN_PACKAGE_NAME           "${package_name}")
 set(CPACK_DEBIAN_PACKAGE_VERSION        "${CPACK_PACKAGE_VERSION}")
-set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE   "all")
+#set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE   "all")
 #set(CPACK_DEBIAN_PACKAGE_DEPENDS       "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)")
 set(CPACK_DEBIAN_PACKAGE_MAINTAINER     "${package_maintainer}")
 set(CPACK_DEBIAN_PACKAGE_DESCRIPTION    "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
@@ -208,7 +208,7 @@
 set(CPACK_RPM_PACKAGE_NAME                            "${package_name}")
 set(CPACK_RPM_PACKAGE_VERSION                         "${CPACK_PACKAGE_VERSION}")
 set(CPACK_RPM_PACKAGE_RELEASE                         1)
-set(CPACK_RPM_PACKAGE_ARCHITECTURE                    "x86_64")
+#set(CPACK_RPM_PACKAGE_ARCHITECTURE                    "x86_64")
 set(CPACK_RPM_PACKAGE_REQUIRES                        "")
 set(CPACK_RPM_PACKAGE_PROVIDES                        "")
 set(CPACK_RPM_PACKAGE_VENDOR                          "${package_vendor}")


Fix build error on MacOS due to sed command usage

Non GNU sed on macOS expects suffix after -i option (can be empty str).
However, removing the comments from the pyside generated files is not a necessary
operation (presumably done to avoid a diff when no code changed), so simply skip the operation on macOS

--- cMake/FindPySide2Tools.cmake
+++ cMake/FindPySide2Tools.cmake
@@ -31,12 +31,12 @@
     #ADD_CUSTOM_TARGET(${it} ALL
     #  DEPENDS ${outfile}
     #)
-    if(WIN32)
+    if(WIN32 OR APPLE)
         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
           COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile}
           MAIN_DEPENDENCY ${infile}
         )
-    else(WIN32)
+    else()
         # Especially on Open Build Service we don't want changing date like
         # pyside2-uic generates in comments at beginning., which is why
         # we follow the tool command with in-place sed.
@@ -45,7 +45,7 @@
           COMMAND sed -i "/^# /d" "${outfile}"
           MAIN_DEPENDENCY "${infile}"
         )
-    endif(WIN32)
+    endif()
     list(APPEND ${outfiles} ${outfile})
   ENDFOREACH(it)
 ENDMACRO (PYSIDE_WRAP_UI)
@@ -58,12 +58,12 @@
     #ADD_CUSTOM_TARGET(${it} ALL
     #  DEPENDS ${outfile}
     #)
-    if(WIN32)
+    if(WIN32 OR APPLE)
         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
           COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile}
           MAIN_DEPENDENCY ${infile}
         )
-    else(WIN32)
+    else()
         # Especially on Open Build Service we don't want changing date like
         # pyside-rcc generates in comments at beginning, which is why
         # we follow the tool command with in-place sed.
@@ -72,7 +72,7 @@
           COMMAND sed -i "/^# /d" "${outfile}"
           MAIN_DEPENDENCY "${infile}"
         )
-    endif(WIN32)
+    endif()
     list(APPEND ${outfiles} ${outfile})
   ENDFOREACH(it)
 ENDMACRO (PYSIDE_WRAP_RC)


Move warning option to Clang section

Move warning option to Clang section

--- cmake/PlatformLinuxGCC.cmake
+++ cmake/PlatformLinuxGCC.cmake
@@ -35,7 +35,7 @@
 	set(EXCEPTION_FLAG "-fno-exceptions")
 endif()

-set(LINUX_COMPILE_FLAGS "-fvisibility=hidden -pthread -pipe -fPIC -Wreturn-type -Wall -pedantic -Wextra -Wfloat-equal -Wcast-qual -Wcast-align -Wconversion -Werror -Wno-error=float-equal -Wno-error=conversion -Wno-error=switch -Wno-error=shorten-64-to-32 ${EXCEPTION_FLAG}")
+set(LINUX_COMPILE_FLAGS "-fvisibility=hidden -pthread -pipe -fPIC -Wreturn-type -Wall -pedantic -Wextra -Wfloat-equal -Wcast-qual -Wcast-align -Wconversion -Werror -Wno-error=float-equal -Wno-error=conversion -Wno-error=switch ${EXCEPTION_FLAG}")
 # pthread       -> use pthread library
 # no-rtti       -> disable c++ rtti
 # no-exceptions -> disable exception handling
@@ -50,7 +50,7 @@
 	set(LINUX_COMPILE_FLAGS "${LINUX_COMPILE_FLAGS} -Wtrampolines")
 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 	# clang
-	set(LINUX_COMPILE_FLAGS "${LINUX_COMPILE_FLAGS} -Wno-mismatched-tags -Wno-unsequenced -Wno-sign-conversion -Wno-unused-function -Wno-missing-braces")
+        set(LINUX_COMPILE_FLAGS "${LINUX_COMPILE_FLAGS} -Wno-mismatched-tags -Wno-unsequenced -Wno-sign-conversion -Wno-unused-function -Wno-missing-braces -Wno-error=shorten-64-to-32")
 endif()

 set(LINUX_LINKER_FLAGS "-pthread")


[axl_cmake] added GCC_FLAG_COVERAGE;

[axl_cmake] added GCC_FLAG_COVERAGE;

renamed GCC_FLAG_SANITIZER_DEBUG -> GCC_FLAG_SANITIZE;
fixed typo (AXL_CPU for backward compat)

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -57,7 +57,7 @@
 		message (FATAL_ERROR "Unsupported CPU: ${TARGET_CPU}")
 	endif ()

-	set (TARGET_CPU ${TARGET_CPU}) # for backward compatibility re paths.cmake
+	set (AXL_CPU ${TARGET_CPU}) # for backward compatibility (in paths.cmake)
 endmacro ()

 #...............................................................................
@@ -260,9 +260,15 @@
 		)

 	axl_create_compiler_flag_setting (
-		GCC_FLAG_SANITIZER_DEBUG
-		DESCRIPTION "Sanitizer to use in Debug build"
+		GCC_FLAG_SANITIZE
+		DESCRIPTION "Compile with a specific sanitizer instrumentation"
 		"-fsanitize=address" "-fsanitize=memory" "-fsanitize=thread"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_COVERAGE
+		DESCRIPTION "Compile with code coverage instrumentation"
+		"-coverage"
 		)

 	axl_create_setting (


[cmake] Fix some errors in the cmake code that enables LTO.

When I originally committed the LTO code, I tried to match the coding style of
the code right above it that enabled code coverage. Turns out that the code
coverage code did not have a weird coding style and instead just had a bug.

I fixed both of the issues and also enabled the LTO flag on non-Darwin.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -89,14 +89,14 @@
       "-F" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}/../../../Developer/Library/Frameworks"
       "-m${SWIFT_SDK_${CFLAGS_SDK}_VERSION_MIN_NAME}-version-min=${DEPLOYMENT_VERSION}")

-    if(analyze_code_coverage)
+    if(CFLAGS_ANALYZE_CODE_COVERAGE)
       list(APPEND result "-fprofile-instr-generate"
                          "-fcoverage-mapping")
     endif()
-
-    if(enable_lto)
-      list(APPEND result "-flto")
-    endif()
+  endif()
+
+  if(CFLAGS_ENABLE_LTO)
+    list(APPEND result "-flto")
   endif()

   set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)
@@ -117,7 +117,7 @@
     ARCH "${CFLAGS_ARCH}"
     BUILD_TYPE "${CFLAGS_BUILD_TYPE}"
     ENABLE_ASSERTIONS "${CFLAGS_ENABLE_ASSERTIONS}"
-    SWIFT_ENABLE_LTO "${SWIFT_ENABLE_LTO}"
+    ENABLE_LTO "${SWIFT_ENABLE_LTO}"
     ANALYZE_CODE_COVERAGE FALSE
     DEPLOYMENT_VERSION_IOS "${CFLAGS_DEPLOYMENT_VERSION_IOS}"
     RESULT_VAR_NAME result)


cmake: Don't generate targets for empty sdk/arch combinations.

See rdar://31642132.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1436,6 +1436,11 @@
     endif()

     foreach(sdk ${SWIFTLIB_TARGET_SDKS})
+      if(NOT SWIFT_SDK_${sdk}_ARCHITECTURES)
+        # SWIFT_SDK_${sdk}_ARCHITECTURES is empty, so just continue
+        continue()
+      endif()
+
       set(THIN_INPUT_TARGETS)

       # For each architecture supported by this SDK
@@ -1639,6 +1644,7 @@
         if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
           set(codesign_arg CODESIGN)
         endif()
+        precondition(THIN_INPUT_TARGETS)
         _add_swift_lipo_target(
             SDK ${sdk}
             TARGET ${lipo_target}


CMake: remove dead code for old AddressSanitizer setup

Swift SVN r24244

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1402,15 +1402,6 @@
         "-Xlinker" "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
   endif()

-  if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-    # ASan does not play well with exported_symbol option. This should be fixed soon.
-    if(NOT SWIFT_ASAN_BUILD)
-      if (NOT SWIFTEXE_SINGLE_DONT_STRIP_NON_MAIN_SYMBOLS)
-        list(APPEND link_flags "-Xlinker" "-exported_symbol" "-Xlinker" "_main")
-      endif()
-    endif()
-  endif()
-
   # Find the names of dependency library targets.
   #
   # We don't add the ${ARCH} to the target suffix because we want to link


Use ${opencv_proj} variable for USE_SYSTEM_OPENCV

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -20,15 +20,18 @@
 set(Eigen_pod_revision ceba39500b89a77a8649b3e8b421b10a3d74d42b)
 set(Eigen_pod_depends)

-set(opencv_url https://github.com/Itseez/opencv.git)
-set(opencv_revision 2.4.12.3)
-set(opencv_depends Eigen_pod)
-set(opencv_external_args
-  CMAKE_CACHE_ARGS
-    ${default_cmake_args}
-    ${python_args}
-    -DWITH_CUDA:BOOL=OFF
-  )
+if(NOT USE_SYSTEM_OPENCV)
+  set(opencv_proj opencv)
+  set(opencv_url https://github.com/Itseez/opencv.git)
+  set(opencv_revision 2.4.12.3)
+  set(opencv_depends Eigen_pod)
+  set(opencv_external_args
+    CMAKE_CACHE_ARGS
+      ${default_cmake_args}
+      ${python_args}
+      -DWITH_CUDA:BOOL=OFF
+    )
+endif()

 set(flann_url https://github.com/mariusmuja/flann.git)
 set(flann_revision 4969acc) # master from march 2015
@@ -61,7 +64,7 @@

 set(occ-map_url https://github.com/openhumanoids/occ-map.git)
 set(occ-map_revision 34ab71fa693216d2c0508f0f2680b9a68994f473)
-set(occ-map_depends libbot opencv)
+set(occ-map_depends libbot ${opencv_proj})

 set(common_utils_url https://github.com/openhumanoids/common_utils.git)
 set(common_utils_revision bf0c9223e02a193a3cfef4034ef82a94219f116a)
@@ -162,7 +165,7 @@

 set(libmultisense_url https://bitbucket.org/crl/libmultisense)
 set(libmultisense_hg_tag a57026c)
-set(libmultisense_depends opencv)
+set(libmultisense_depends ${opencv_proj})
 set(libmultisense_external_args
   CMAKE_CACHE_ARGS
     ${default_cmake_args}
@@ -250,7 +253,7 @@
   Eigen_pod
   ${lcm_proj}
   libbot
-  opencv
+  ${opencv_proj}
   flann
   pcl
   octomap
@@ -307,19 +310,6 @@
 endif()

-if(USE_SYSTEM_OPENCV)
-  list(REMOVE_ITEM externals
-    opencv
-  )
-  list(REMOVE_ITEM occ-map_depends
-    opencv
-  )
-  list(REMOVE_ITEM libmultisense_depends
-    opencv
-  )
-endif()
-
-
 if(USE_SYSTEM_PCL)
   list(REMOVE_ITEM externals
     pcl


Doxygen variables cleanup

Doxygen variables cleanup

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -31,9 +31,6 @@
   PROJECT_BUILD_DIR
   SUPERBUILD_TARGETS
   )
-if(WITH_DOCUMENTATION)
-  list(APPEND expected_variables DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY)
-endif()

 foreach(var ${expected_variables})
   if(NOT DEFINED ${var})
@@ -131,8 +128,7 @@
 QT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
 SUPERBUILD_EXCLUDE_MITKBUILD_TARGET:BOOL=TRUE
 WITH_COVERAGE:BOOL=${WITH_COVERAGE}
-#DOCUMENTATION_TARGET_IN_ALL:BOOL=${WITH_DOCUMENTATION}
-DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}
+MITK_DOXYGEN_OUTPUT_DIR:PATH=${MITK_DOXYGEN_OUTPUT_DIR}
 ${ADDITIONNAL_CMAKECACHE_OPTION}
 ")
   endif()


Remove barrier to out-of-tree builds

Remove barrier to out-of-tree builds

With this change, nextpnr can build successfully (and run correctly) using the git tree as a read-only reference.
No change in behavior observed for in-tree builds.

--- ecp5/family.cmake
+++ ecp5/family.cmake
@@ -21,7 +21,6 @@

     set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py)

-    file(MAKE_DIRECTORY ecp5/chipdbs/)
     file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ecp5/chipdbs/)
     add_library(ecp5_chipdb OBJECT ${CMAKE_CURRENT_BINARY_DIR}/ecp5/chipdbs/)
     target_compile_definitions(ecp5_chipdb PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family})
@@ -70,7 +69,7 @@
         set(PREV_DEV_CC_BBA_DB)
         foreach (dev ${devices})
             set(DEV_CC_DB ${CMAKE_CURRENT_BINARY_DIR}/ecp5/chipdbs/chipdb-${dev}.cc)
-            set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.bba)
+            set(DEV_CC_BBA_DB ${CMAKE_CURRENT_BINARY_DIR}/ecp5/chipdbs/chipdb-${dev}.bba)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/constids.inc)
             set(DEV_GFXH ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/gfx.h)
             if (PREGENERATED_BBA_PATH)


cmake: host-gcc: Remove libgcc library path resolution

The host toolchain makes use of the host toolchain libraries (i.e.
`-nostdlib` is not specified), so it is not necessary to detect the
toolchain libgcc path and specify one manually.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/compiler/host-gcc/target.cmake
+++ cmake/compiler/host-gcc/target.cmake
@@ -18,16 +18,6 @@
 endif()
 find_program(CMAKE_CXX_COMPILER ${cplusplus_compiler}     CACHE INTERNAL " " FORCE)

-# Convert to list as cmake Modules/*.cmake do it
-STRING(REGEX REPLACE " +" ";" PRINT_LIBGCC_ARGS "${CMAKE_C_FLAGS}")
-# This libgcc code is partially duplicated in compiler/*/target.cmake
-execute_process(
-  COMMAND ${CMAKE_C_COMPILER} "${PRINT_LIBGCC_ARGS}" --print-libgcc-file-name
-  OUTPUT_VARIABLE LIBGCC_FILE_NAME
-  OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-assert_exists(LIBGCC_FILE_NAME)
-
 set(NOSTDINC "")

 # Note that NOSYSDEF_CFLAG may be an empty string, and


[cmake] make builtin_nlohmannjson default OFF

ROOT will try to find external version first and
only if fail fallback to builtin variant.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -95,7 +95,7 @@
 ROOT_BUILD_OPTION(builtin_llvm ON "Build bundled copy of LLVM")
 ROOT_BUILD_OPTION(builtin_lz4 OFF "Build bundled copy of lz4")
 ROOT_BUILD_OPTION(builtin_lzma OFF "Build bundled copy of lzma")
-ROOT_BUILD_OPTION(builtin_nlohmannjson ON "Use nlohmann/json.hpp file distributed with ROOT")
+ROOT_BUILD_OPTION(builtin_nlohmannjson OFF "Use nlohmann/json.hpp file distributed with ROOT")
 ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally (requires network)")
 ROOT_BUILD_OPTION(builtin_openui5 ON "Use openui5 bundle distributed with ROOT")
 ROOT_BUILD_OPTION(builtin_pcre OFF "Build bundled copy of PCRE")


removed include(fontconfig) - Qt must be compiled with system fontconfig

--- qt4.cmake
+++ qt4.cmake
@@ -16,7 +16,6 @@
 include(libjpeg)
 include(libtiff)
 include(freetype2)
-include(fontconfig)

 external_source (qt4
     4.8.3
@@ -41,7 +40,7 @@
 # (This builds everything that ilastik needs.)

 ExternalProject_Add(${qt4_NAME}
-    DEPENDS             ${freetype2_NAME} ${fontconfig_NAME}
+    DEPENDS             ${freetype2_NAME}
     PREFIX              ${BUILDEM_DIR}
     URL                 ${qt4_URL}
     URL_MD5             ${qt4_MD5}
@@ -83,7 +82,6 @@
         -no-dbus
         -no-cups
         -no-nis
-        -qt-libpng
         -release
         -shared
         -no-accessibility


Bugfix

Bugfix

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

--- deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
+++ deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
@@ -36,7 +36,7 @@

   IF(NOT DEAL_II_TARGET_CONFIG_INCLUDED)
     INCLUDE(${DEAL_II_TARGET_CONFIG})
-    SET(DEAL_II_PROJECT_CONFIG_INCLUDED TRUE)
+    SET(DEAL_II_TARGET_CONFIG_INCLUDED TRUE)
   ENDIF()

   # Necessary for setting INCLUDE_DIRECTORIES via SET_TARGET_PROPERTIES


Fixes bugs when BUILD_SHARED_LIBS was ON.

vtkPythonWrapping was setting dependencies even when BUILD_SHARED_LIBS was ON.
This was resulting in vtkpython dependending on the modules are compile time
acceidentally. Fixed that.

Modules were being added using vtk_add_library() call. That call sets properties
on the target that are not necessarily applicable to "Modules" and was raising
compiler errors when BUILD_SHARED_LIBS was ON. Fixed that. Now vtk_add_library()
is only called when building static (it's needed in that case since the static
module needs to be treated as a regular library and must be added the exports so
that applications can link against it).

Change-Id: Ic0219e7b28d644e9a755fb5f494cbfc6d71dfd09

--- CMake/vtkPythonWrapping.cmake
+++ CMake/vtkPythonWrapping.cmake
@@ -71,14 +71,17 @@
 # that statically initializes the modules after Py_Inititalize() is called.
 function(_vtk_add_python_module name)
   if (BUILD_SHARED_LIBS)
-    vtk_add_library(${name} MODULE ${ARGN})
+    add_library(${name} MODULE ${ARGN})
     if (WIN32 AND NOT CYGWIN)
       # when building shared on Windows, the python module files need to be
       # named as *.pyd
       set_target_properties(${name} PROPERTIES SUFFIX ".pyd")
     endif()
   else ()
-    vtk_add_library(${name} STATIC ${ARGN})
+    # when building statically, the module targets need to be exported since
+    # others can link against them, unlike when building shared, and hence we
+    # use vtk_add_library() call.
+    vtk_add_library(${name} ${ARGN})
   endif()
 endfunction()

@@ -123,8 +126,10 @@
   vtk_write_python_modules_header(
     "${filename}" ${python_wrapped_modules})
   set (dependencies)
-  foreach(mod IN LISTS python_wrapped_modules)
-    list(APPEND dependencies ${mod}Python)
-  endforeach()
+  if (NOT BUILD_SHARED_LIBS)
+    foreach(mod IN LISTS python_wrapped_modules)
+      list(APPEND dependencies ${mod}Python)
+    endforeach()
+  endif()
   set (${out_var} "${dependencies}" PARENT_SCOPE)
 endfunction()


Remove GLEW_BUILD definition

Remove GLEW_BUILD definition

--- CMakeModules/FindGLEWmx.cmake
+++ CMakeModules/FindGLEWmx.cmake
@@ -76,11 +76,9 @@
 IF(USE_GLEWmx_STATIC)
     MESSAGE(STATUS "Using Static GLEWmx Lib")
     ADD_DEFINITIONS(-DGLEW_STATIC)
-    REMOVE_DEFINITIONS(-DGLEW_BUILD)
     SET(GLEWmx_LIBRARY ${GLEWmxs_LIBRARY})
 ELSE(USE_GLEWmx_STATIC)
     MESSAGE(STATUS "Using Dynamic GLEWmx Lib")
-    ADD_DEFINITIONS(-DGLEW_BUILD)
     REMOVE_DEFINITIONS(-DGLEW_STATIC)
     SET(GLEWmx_LIBRARY ${GLEWmxd_LIBRARY})
 ENDIF(USE_GLEWmx_STATIC)


New defaults.cmake.

New defaults.cmake.

--- defaults.cmake
+++ defaults.cmake
@@ -667,8 +667,12 @@
   check_cxx_flag("-fdiagnostics-color=auto" HAS_CXX_FLAG_FDIAGNOSTICS_COLOR)
   check_c_flag("-fdiagnostics-show-option" HAS_C_FLAG_FDIAGNOSTICS_SHOW_OPTION)
   check_cxx_flag("-fdiagnostics-show-option" HAS_CXX_FLAG_FDIAGNOSTICS_SHOW_OPTION)
+  check_c_flag("-flto" HAS_C_FLAG_FLTO)
+  check_cxx_flag("-flto" HAS_CXX_FLAG_FLTO)
   check_c_flag("-ftracer" HAS_C_FLAG_FTRACER)
   check_cxx_flag("-ftracer" HAS_CXX_FLAG_FTRACER)
+  check_c_flag("-fvisibility=hidden" HAS_C_FLAG_FVISIBILITY_HIDDEN)
+  check_cxx_flag("-fvisibility=hidden" HAS_CXX_FLAG_FVISIBILITY_HIDDEN)
   check_c_flag("-fweb" HAS_C_FLAG_FWEB)
   check_cxx_flag("-fweb" HAS_CXX_FLAG_FWEB)
   check_c_flag("-pipe" HAS_C_FLAG_PIPE)


scripts: Use C++17 as default.

scripts: Use C++17 as default.

--- scripts/toolchain.cmake
+++ scripts/toolchain.cmake
@@ -1,5 +1,3 @@
-
-
 macro(set_toolchain ARCH)
     if(${ARCH} STREQUAL "arm")
         # Set toolchain for target.
@@ -24,7 +22,7 @@
         set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Werror")

         # Set C++ compilation flags.
-        set(CMAKE_CXX_FLAGS "${COMMON_FLAGS} -std=c++14")                               # Enable C++14 standard.
+        set(CMAKE_CXX_FLAGS "${COMMON_FLAGS} -std=c++17")                               # Enable C++14 standard.
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-unwind-tables")    # Disable C++ exceptions support, because it requires libc.
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")                             # Disable C++ run time information, because it requires libc.
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")               # Do not produce code to initialize statics in thread-safe way.


doc_fl and doc_fl_and_rsync no longer require a re-run of cmake. The correct library version is generated on the fly

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -22,6 +22,9 @@
 set(TARGET_FAILED_SCRIPT
     ${CMAKE_CURRENT_BINARY_DIR}/cmake/target_failed.cmake)

+set(VERSION_SCRIPT
+    ${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.cmake)
+
 if(DOXYGEN_FOUND)
     execute_process(COMMAND "${DOXYGEN_EXECUTABLE}" "--version"
                     OUTPUT_VARIABLE DOXYGEN_VERSION
@@ -42,27 +45,31 @@
             ${TARGET_FAILED_SCRIPT_TEMPLATE}
             ${TARGET_FAILED_SCRIPT} @ONLY)

-        add_custom_target(doc_${PROJECT_NAME}
+        add_custom_target(doc_fl
             COMMAND ${CMAKE_COMMAND} -P ${TARGET_FAILED_SCRIPT})
-        add_custom_target(doc_${PROJECT_NAME}_and_sync
+        add_custom_target(doc_fl_and_sync
             COMMAND ${CMAKE_COMMAND} -P ${TARGET_FAILED_SCRIPT})
     else(DOXYGEN_VERSION VERSION_LESS MIN_DOXYGEN_VERSION)
         # doc_fl target
-        configure_file(
-            ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in
-            ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-        add_custom_target(doc_${PROJECT_NAME}
-            ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}
+        add_custom_target(doc_fl
+            COMMAND ${CMAKE_COMMAND}
+                -D PROJECT_SOURCE_DIR:string=${PROJECT_SOURCE_DIR}
+                -D PROJECT_BINARY_DIR:string=${PROJECT_BINARY_DIR}
+                -P ${VERSION_SCRIPT}
             COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
             COMMENT "Generating API documentation with Doxygen" VERBATIM)

-        # doc_${PROJECT_NAME}_and_sync target
+        # doc_fl_and_sync target
         configure_file(
             ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sync_doc.cmake.in
             ${CMAKE_CURRENT_BINARY_DIR}/cmake/sync_doc.cmake @ONLY)
-        add_custom_target(doc_${PROJECT_NAME}_and_sync
-            #${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}
+
+        add_custom_target(doc_fl_and_sync
+            COMMAND ${CMAKE_COMMAND}
+                -D PROJECT_SOURCE_DIR:string=${PROJECT_SOURCE_DIR}
+                -D PROJECT_BINARY_DIR:string=${PROJECT_BINARY_DIR}
+                -P ${VERSION_SCRIPT}
             COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
             COMMAND ${CMAKE_COMMAND} -P
                     ${CMAKE_CURRENT_BINARY_DIR}/cmake/sync_doc.cmake


generic cmake (#13145)

generic cmake (#13145)

* generic cmake

* Update generic.cmake

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -109,6 +109,20 @@
     set_property(GLOBAL PROPERTY FLUID_MODULES "${fluid_modules}")
   endif()
 endfunction(find_fluid_modules)
+
+# find all third_party modules is used for paddle static library
+# for reduce the dependency when building the inference libs.
+set_property(GLOBAL PROPERTY FLUID_THIRD_PARTY)
+function(find_fluid_thirdparties TARGET_NAME)
+  get_filename_component(__target_path ${TARGET_NAME} ABSOLUTE)
+  string(REGEX REPLACE "^${PADDLE_SOURCE_DIR}/" "" __target_path ${__target_path})
+  string(FIND "${__target_path}" "third_party" pos)
+  if(pos GREATER 1)
+    get_property(fluid_ GLOBAL PROPERTY FLUID_THIRD_PARTY)
+    set(fluid_third_partys ${fluid_third_partys} ${TARGET_NAME})
+    set_property(GLOBAL PROPERTY FLUID_THIRD_PARTY "${fluid_third_partys}")
+  endif()
+endfunction(find_fluid_thirdparties)

 function(merge_static_libs TARGET_NAME)
   set(libs ${ARGN})
@@ -204,18 +218,13 @@

     foreach(lib ${libs})
       # Get the file names of the libraries to be merged
-      #if(NOT $<TARGET_FILE:${lib}> MATCHES "lib.*\\.lib")
-      #  message("library" ${lib})
-      #  set(libfiles ${libfiles} lib$<TARGET_FILE:${lib}>)
-      #else()
       set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
-      #endif()
     endforeach()
-
-    # windows cmd return error in clean env.
-    # COMMAND del "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${TARGET_NAME}.lib"
+    # msvc will put libarary in directory of "/Release/xxxlib" by default
+    #       COMMAND cmake -E remove "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${TARGET_NAME}.lib"
     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-      COMMAND lib /OUT:${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.lib ${libfiles}
+      COMMAND cmake -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}"
+      COMMAND lib /OUT:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib${TARGET_NAME}.lib ${libfiles}
       )
   endif(WIN32)
 endfunction(merge_static_libs)


Fix dependency download on readthedocs.org

[ci skip]

--- cppcore/cmake/download.cmake
+++ cppcore/cmake/download.cmake
@@ -8,7 +8,7 @@
                         RESULT_VARIABLE error)
     endif()
     if(error)
-        execute_process(COMMAND curl --create-dirs -s -S -o ${DESTINATION} ${URL}
+        execute_process(COMMAND curl --create-dirs -LSs -o ${DESTINATION} ${URL}
                         RESULT_VARIABLE error)
     endif()
     if(error)


Make inclusing of imgui_tables.cpp easier

--- cmake/FindImGui.cmake
+++ cmake/FindImGui.cmake
@@ -26,6 +26,7 @@
 set(IMGUI_SOURCES
   ${IMGUI_INCLUDE_DIR}/imgui.cpp
   ${IMGUI_INCLUDE_DIR}/imgui_draw.cpp
+  ${IMGUI_INCLUDE_DIR}/imgui_tables.cpp
   ${IMGUI_INCLUDE_DIR}/imgui_widgets.cpp
   ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.cpp
 )
@@ -48,10 +49,6 @@
 # Transform '#define IMGUI_VERSION "X.Y"' into 'X.Y'
 string(REGEX REPLACE ".*\"(.*)\".*" "\\1" IMGUI_VERSION "${IMGUI_VERSION}")

-if(${IMGUI_VERSION} VERSION_GREATER_EQUAL "1.80")
-  list(APPEND IMGUI_SOURCES ${IMGUI_INCLUDE_DIR}/imgui_tables.cpp)
-endif()
-
 # Check required version
 if(${IMGUI_VERSION} VERSION_LESS ${ImGui_FIND_VERSION})
   set(IMGUI_FOUND FALSE)


[cmake] enable x86 libfuzzer on Windows

[cmake] enable x86 libfuzzer on Windows

    - recent commit https://reviews.llvm.org/D66433 enabled libfuzzer
    to build on windows, this just enables the option to build as part
    of the the regular build.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -245,6 +245,8 @@

 if(OS_NAME MATCHES "Linux")
   set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64})
+elseif (OS_NAME MATCHES "Windows")
+  set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64})
 elseif(OS_NAME MATCHES "Android")
   set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64})
 else()


[cmake] Try to make cmake happy and fix bots.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -565,7 +565,7 @@
 endif()

 if(CMAKE_GENERATOR STREQUAL "Ninja" AND
-    NINJA_VERSION VERSION_GREATER_EQUAL "1.9.0" AND
+    "${NINJA_VERSION}" VERSION_GREATER_EQUAL "1.9.0" AND
     CMAKE_HOST_APPLE AND CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER "15.6.0")
   set(LLVM_TOUCH_STATIC_LIBRARIES ON)
 endif()


r9539/sofa : CMake: fixed looking for freeglut on linux (I also changed it for windows guessing it would have the same pb but it needs to be checked)

Former-commit-id: 15296f9d03398af1f991b778a7be6d5a7a45162c

--- cmake/externals.cmake
+++ cmake/externals.cmake
@@ -70,7 +70,7 @@
 	if(WIN32)
 		set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} "glu32")
 		if (SOFA-EXTERNAL_HAVE_FREEGLUT)
-			set(GLUT_LIBRARIES "freeglut")
+			find_package(GLUT REQUIRED)
 		else()
 			set(GLUT_LIBRARIES "glut32")
 		endif()
@@ -81,15 +81,15 @@
 		endif()
 	else()
 		if(NOT PS3)
-		if (SOFA-EXTERNAL_HAVE_FREEGLUT)
-			find_library(GLUT_LIBRARIES "freeglut")
-		else()
-			if(APPLE)
-       			find_library(GLUT_LIBRARIES "GLUT")
-            else()
-                find_library(GLUT_LIBRARIES "glut")
-            endif()
-		endif()
+		      if (SOFA-EXTERNAL_HAVE_FREEGLUT)
+			      find_package(GLUT REQUIRED)
+		      else()
+			      if(APPLE)
+				    find_library(GLUT_LIBRARIES "GLUT")
+			      else()
+				      find_library(GLUT_LIBRARIES "glut")
+			      endif()
+		      endif()
 		endif()
 		## GLU
 		if(UNIX)


customize nsis package filename

customize nsis package filename

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@3113 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -45,6 +45,7 @@
   else(MSVC10)
     set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-${win_system_name}")
   endif(MSVC10)
+  set(CPACK_PACKAGE_FILE_NAME ${CPACK_NSIS_PACKAGE_NAME})
   # force CPACK_PACKAGE_INSTALL_REGISTRY_KEY because of a known limitation in cmake/cpack to be fixed in next releases
   # http://public.kitware.com/Bug/view.php?id=9094
   # This is to allow a 32bit and a 64bit of PCL to get installed on one system


Add support for translation.

Add support for translation.

	* build-aux/cmake/modules/Gostai.cmake (gostai_add_executable): Here.
	(gostai_add_library): and here.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -19,11 +19,13 @@
 #  INCLUDE_DIRS - the list of include directories to search in.
 #  LIBRARIES	- the list of libraries to link with.
 #  RESOURCES	- the list of resources files.
+#  TRANSLATIONS - the list of translation files to build. (by default it
+#                 searches a .ts file named _name_.)
 macro(gostai_add_executable name)

   parse_arguments(
     ${name}
-    "SOURCES;MOCS;UIS;CPPFLAGS;INCLUDE_DIRS;LIBRARIES;RESOURCES"
+    "SOURCES;MOCS;UIS;CPPFLAGS;INCLUDE_DIRS;LIBRARIES;RESOURCES;TRANSLATIONS"
     "NO_CONSOLE;INSTALL_NO_DEPS"
     ${ARGN})

@@ -47,12 +49,14 @@
   endif(CMAKE_BUILD_TYPE STREQUAL "Release")
   qt4_wrap_cpp(${name}_MOC_SOURCES ${${name}_MOCS}
     OPTIONS ${${name}_MOC_OPTIONS})
+  gostai_add_translations(${name})

   set(${name}_ALL_SOURCES
     ${${name}_SOURCES}
     ${${name}_MOC_SOURCES}
     ${${name}_RES_SOURCES}
     ${${name}_UI_SOURCES}
+    ${${name}_QM_SOURCES}
     )

   if(NOT ${name}_ALL_SOURCES)
@@ -176,6 +180,7 @@
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qt.conf.install
     DESTINATION ${BINARIES_DIR}
     RENAME qt.conf)
+  install(FILES ${${name}_QM_SOURCES} DESTINATION ${TRANSLATIONS_DIR})

   # ========================== #
   # Deploy dependent libraries #
@@ -473,12 +478,14 @@
   qt4_add_resources(${name}_SOURCES ${${name}_RESOURCES})
   qt4_wrap_cpp(${name}_MOC_SOURCES ${${name}_MOCS}
     OPTIONS ${${name}_MOC_OPTS})
+  gostai_add_translations(${name})

   set(${name}_ALL_SOURCES
     ${${name}_SOURCES}
     ${${name}_MOC_SOURCES}
     ${${name}_RES_SOURCES}
     ${${name}_UI_SOURCES}
+    ${${name}_QM_SOURCES}
     )

   if(NOT ${name}_ALL_SOURCES)
@@ -551,6 +558,7 @@
     else(${name}_QTPLUGIN)
       install(TARGETS ${name} DESTINATION ${LIBRARIES_DIR})
     endif(${name}_QTPLUGIN)
+    install(FILES ${${name}_QM_SOURCES} DESTINATION ${TRANSLATIONS_DIR})
   endif(NOT ${name}_NO_INSTALL)

   # ========================== #
@@ -649,6 +657,17 @@

 endfunction(gostai_add_test)

+# Add translation to the target named _name_. It is intended to be called by
+# gostai_add_executable and gostai_add_library.
+macro(gostai_add_translations name)
+  file(GLOB _ts_files "${name}_*.ts")
+  if(_ts_files)
+    list(APPEND ${name}_TRANSLATIONS ${_ts_files})
+  endif(_ts_files)
+  set(_ts_files)
+  qt4_add_translation(${name}_QM_SOURCES ${${name}_TRANSLATIONS})
+endmacro(gostai_add_translations)
+
 endif(NOT GOSTAI_CMAKE_GUARD)

 # LocalWords:  docbook


tests: unit: do not build with -m32 on macOS

on macOS, i386 is deprecated, so build as 64bit instead.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- subsys/testsuite/unittest.cmake
+++ subsys/testsuite/unittest.cmake
@@ -34,7 +34,10 @@
   .
 )

-set (CMAKE_C_FLAGS "-m32")
+if(CMAKE_HOST_APPLE)
+else()
+set (CMAKE_C_FLAGS "-m32") #deprecated on macOS
+endif()

 target_compile_options(testbinary PRIVATE
   -Wall


Modified OpenCL include paths in FindOpenCL.cmake.

The code includes the file <CL/cl2.hpp>, and this change allows CMake to
find that when using the AMD APP SDK.

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -75,7 +75,7 @@

 find_path(OpenCL_INCLUDE_DIR
   NAMES
-    cl.h
+    cl.h CL/cl.h
   PATHS
     ENV "PROGRAMFILES(X86)"
     ENV AMDAPPSDKROOT
@@ -88,7 +88,6 @@
     /usr/include/OpenCL
   PATH_SUFFIXES
     include
-    include/CL
     OpenCL/common/inc
     OpenCL
     "AMD APP/include")
@@ -98,7 +97,7 @@
 # Once we have a working include directory, try looking specifically for cl2.hpp
 find_path(OpenCL_CL2_INCLUDE_DIR
   NAMES
-    cl2.hpp cl2.hpp
+    cl2.hpp CL/cl2.hpp
   PATHS
     ENV "PROGRAMFILES(X86)"
     ENV AMDAPPSDKROOT
@@ -111,7 +110,6 @@
     ${OpenCL_INCLUDE_DIR}
   PATH_SUFFIXES
     include
-    include/CL
     OpenCL/common/inc
     "AMD APP/include")


cmake: Update FindXPRESS

cmake: Update FindXPRESS

--- cmake/FindXPRESS.cmake
+++ cmake/FindXPRESS.cmake
@@ -37,10 +37,6 @@
   message(FATAL_ERROR "FindXPRESS only works if either C or CXX language is enabled")
 endif()

-if(APPLE)
-  message(FATAL_ERROR "XPRESS not yet supported on macOS")
-endif()
-
 if(NOT XPRESS_ROOT)
   set(XPRESS_ROOT $ENV{XPRESS_ROOT})
 endif()
@@ -54,14 +50,25 @@
 if(XPRESS_FOUND AND NOT TARGET XPRESS::XPRESS)
   add_library(XPRESS::XPRESS UNKNOWN IMPORTED)

-  set_target_properties(XPRESS::XPRESS PROPERTIES
-    INTERFACE_INCLUDE_DIRECTORIES "${XPRESS_INCLUDE_DIRS}")
-
   if(UNIX)
     set_target_properties(XPRESS::XPRESS PROPERTIES
+      INTERFACE_INCLUDE_DIRECTORIES "${XPRESS_ROOT}/include")
+  endif()
+
+  if(APPLE)
+    set_target_properties(XPRESS::XPRESS PROPERTIES
+      #INSTALL_RPATH_USE_LINK_PATH TRUE
+      #BUILD_WITH_INSTALL_RPATH TRUE
+      #INTERFACE_LINK_DIRECTORIES "${XPRESS_ROOT}/lib"
+      #INSTALL_RPATH "${XPRESS_ROOT}/lib;${INSTALL_RPATH}"
+      IMPORTED_LOCATION "${XPRESS_ROOT}/lib/libxprs.dylib")
+  elseif(UNIX)
+    set_target_properties(XPRESS::XPRESS PROPERTIES
+      INTERFACE_LINK_DIRECTORIES "${XPRESS_ROOT}/lib"
       IMPORTED_LOCATION ${XPRESS_ROOT}/lib/libxprs.so)
   elseif(MSVC)
     set_target_properties(XPRESS::XPRESS PROPERTIES
-      IMPORTED_LOCATION ${XPRESS_ROOT}/lib/xprs.lib)
+      INTERFACE_INCLUDE_DIRECTORIES "${XPRESS_ROOT}\\include"
+      IMPORTED_LOCATION "${XPRESS_ROOT}\\lib\\xprs.lib")
   endif()
 endif()


extensions.cmake: don't leak absolute paths in snippets-*.ld comment

Make headers look like this instead:

     /* From ${ZEPHYR_BASE}/arch/common/isr_tables.ld: */

Besides being shorter and more "private", this makes the content of
snippets-*.ld files the same no matter who built them and where.

Signed-off-by: Marc Herbert <77e7c7d746b52c6eb01119b65a031ae1f650246d@intel.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -835,7 +835,9 @@

     # Append the file contents to the relevant destination file.
     file(READ ${path} snippet)
-    file(APPEND ${snippet_path} "\n/* From ${path}: */\n" "${snippet}\n")
+    file(RELATIVE_PATH relpath ${ZEPHYR_BASE} ${path})
+    file(APPEND ${snippet_path}
+             "\n/* From \${ZEPHYR_BASE}/${relpath}: */\n" "${snippet}\n")
   endforeach()
 endfunction(zephyr_linker_sources)


Report the branch & state rather than last tag in dev version string.

--- cmake/gitversion.cmake
+++ cmake/gitversion.cmake
@@ -1,12 +1,12 @@
 if (VERSION MATCHES "-dev$")
     find_package(Git QUIET)
     if (GIT_FOUND)
-        execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags
+        execute_process(COMMAND ${GIT_EXECUTABLE} describe --all --long --dirty
                         WORKING_DIRECTORY ${SRC_DIR}
                         OUTPUT_VARIABLE "GIT_VERSION"
                         OUTPUT_STRIP_TRAILING_WHITESPACE
                         ERROR_QUIET)
-        string(REGEX REPLACE "^geary-([0-9\\.]*)-([0-9]*)-(.*)" "\\1+\\2~\\3" GIT_VERSION "${GIT_VERSION}")
+        string(REGEX REPLACE "^heads\\/(.*)-0-(g.*)$" "\\1~\\2" GIT_VERSION "${GIT_VERSION}")
         set(VERSION ${GIT_VERSION})
     endif()
 endif()


ENH: allog gcc 7 for CUDA versions after 9.2

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -46,7 +46,10 @@
   if((CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC) OR APPLE)
     # Compatible gcc can be checked in host_config.h
     set(GCC_PATH "")
-    if(${CUDA_VERSION} VERSION_GREATER "8.99")
+    if(${CUDA_VERSION} VERSION_GREATER "9.19")
+      FIND_GCC(GCC_PATH "7" "")
+    endif()
+    if(NOT GCC_PATH AND ${CUDA_VERSION} VERSION_GREATER "8.99")
       FIND_GCC(GCC_PATH "6" "4")
     endif()
     if(NOT GCC_PATH )


build OgreActivityJNI.cpp inside the Android project as this is the proper use case

--- CMake/toolchain/AndroidJNI.cmake
+++ CMake/toolchain/AndroidJNI.cmake
@@ -34,6 +34,7 @@
 	file(MAKE_DIRECTORY "${NDKOUT}/src/org/ogre3d/android")
 	file(COPY "${JNI_PATH}/OgreActivityJNI.java" DESTINATION "${NDKOUT}/src/org/ogre3d/android")
 	file(COPY "${JNI_PATH}/MainActivity.java" DESTINATION "${NDKOUT}/src/org/ogre3d/android")
+	file(COPY "${JNI_PATH}/OgreActivityJNI.cpp" DESTINATION "${NDKOUT}/jni")

     configure_file("${OGRE_TEMPLATES_DIR}/Android_resources.cfg.in" "${NDKOUT}/assets/resources.cfg" @ONLY)
     configure_file("${OGRE_TEMPLATES_DIR}/samples.cfg.in" "${NDKOUT}/assets/samples.cfg" @ONLY)
@@ -54,6 +55,7 @@
     file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummyJNI.cpp "int x = 23;")
     ADD_LIBRARY(OgreJNIDummy MODULE ${CMAKE_CURRENT_BINARY_DIR}/dummyJNI.cpp)

+    set(JNI_PATH "${NDKOUT}/jni")
     create_android_proj(OgreJNIDummy)


Revert commit 904619e219b5c045b1c8d9d923f52f80089ee24e as it was causeing build problems

--- CMakeModules/OsgMacroUtils.cmake
+++ CMakeModules/OsgMacroUtils.cmake
@@ -44,7 +44,7 @@
                 TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
             ENDIF(${varname}_RELEASE)
         ELSE(${varname}_DEBUG)
-            TARGET_LINK_LIBRARIES(${TRGTNAME} "${${varname}}" )
+            TARGET_LINK_LIBRARIES(${TRGTNAME} ${${varname}} )
         ENDIF(${varname}_DEBUG)
     ENDFOREACH(varname)
 ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)


Remove obsolete OSX specific patch in CLBlast external project

--- CMakeModules/build_CLBlast.cmake
+++ CMakeModules/build_CLBlast.cmake
@@ -11,31 +11,6 @@

 set(prefix ${PROJECT_BINARY_DIR}/third_party/CLBlast)
 set(CLBlast_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}clblast${CMAKE_STATIC_LIBRARY_SUFFIX})
-
-if(APPLE)
-  # We need this patch on macOS until #PR 356 is merged in the CLBlast repo
-  write_file(clblast.patch
-"diff --git a/src/clpp11.hpp b/src/clpp11.hpp
-index 9446499..786f7db 100644
---- a/src/clpp11.hpp
-+++ b/src/clpp11.hpp
-@@ -358,8 +358,10 @@ class Device {
-
-   // Returns if the Nvidia chip is a Volta or later archicture (sm_70 or higher)
-   bool IsPostNVIDIAVolta() const {
--    assert(HasExtension(\"cl_nv_device_attribute_query\"));
--    return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7;
-+    if(HasExtension(\"cl_nv_device_attribute_query\")) {
-+      return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7;
-+    }
-+    return false;
-   }
-
-   // Retrieves the above extra information (if present)
-")
-
-  set(CLBLAST_PATCH_COMMAND ${GIT} apply ${ArrayFire_BINARY_DIR}/clblast.patch)
-endif()

 if(WIN32 AND CMAKE_GENERATOR_PLATFORM AND NOT CMAKE_GENERATOR MATCHES "Ninja")
   set(extproj_gen_opts "-G${CMAKE_GENERATOR}" "-A${CMAKE_GENERATOR_PLATFORM}")
@@ -56,7 +31,6 @@
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""
-    PATCH_COMMAND ${CLBLAST_PATCH_COMMAND}
     BUILD_BYPRODUCTS ${CLBlast_location}
     CONFIGURE_COMMAND ${CMAKE_COMMAND} ${extproj_gen_opts}
       -Wno-dev <SOURCE_DIR>


ENH: otbknn and otbgalib have been removed from source tree

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -64,7 +64,6 @@
   ${OTB_SOURCE_DIR}/Utilities/otbossimplugins/ossim
   ${OTB_SOURCE_DIR}/Utilities/InsightJournal
   ${OTB_SOURCE_DIR}/Utilities/otb6S
-#  ${OTB_SOURCE_DIR}/Utilities/otbgalib
   ${OTB_SOURCE_DIR}/Utilities/otbkml/src
   ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party
   ${OTB_SOURCE_DIR}/Utilities/otbliblas/include
@@ -72,7 +71,6 @@
   ${OTB_SOURCE_DIR}/Utilities/otbedison/prompt
   ${OTB_SOURCE_DIR}/Utilities/otbedison/edge
   ${OTB_SOURCE_DIR}/Utilities/otbconfigfile
-  ${OTB_SOURCE_DIR}/Utilities/otbknn
 )

 IF(BUILD_APPLICATIONS)
@@ -334,7 +332,6 @@
   Utilities/otbsvm
   Utilities/InsightJournal
   Utilities/otb6S
-#  Utilities/otbgalib
   Utilities/otbkml
   Utilities/otbkml/src
   Utilities/otbkml/third_party
@@ -342,7 +339,6 @@
   Utilities/otbliblas/include
   Utilities/otbedison
   Utilities/otbconfigfile
-  Utilities/otbknn
 )

 # For CommandLine wrappers


BUG: missing RPATH in standalone wrappers

--- Packaging/Files/build_wrapping.cmake
+++ Packaging/Files/build_wrapping.cmake
@@ -38,6 +38,7 @@

 set(CONFIGURE_OPTIONS
   "-DCMAKE_INSTALL_PREFIX=${PKG_PREFIX}"
+  "-DCMAKE_INSTALL_RPATH=${PKG_PREFIX}/lib"
   "-DCMAKE_BUILD_TYPE=Release")
 if(PYTHON_EXECUTABLE)
   list(APPEND CONFIGURE_OPTIONS "-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")


ENH: Update the previous patch to FindPythonLibs with latest.

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -168,12 +168,12 @@

   FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
-    FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n  static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
+    FILE(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n  static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
   ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})

   FILE(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
   FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
-    FILE(APPEND ${_filenameTmp} "  CMakeLoadPythonModule_${_currentModule}();\n")
+    FILE(APPEND ${_filenameTmp} "  ${_name}_${_currentModule}();\n")
   ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
   FILE(APPEND ${_filenameTmp} "}\n\n")
   FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n  ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")


fix: Turn off treat warnings as errors

fix: Turn off treat warnings as errors

--- Builds/CMake/CompileOptions.cmake
+++ Builds/CMake/CompileOptions.cmake
@@ -3,7 +3,7 @@
 #

 # Set warnings as errors flag
-option(ROSETTASTONE_WARNINGS_AS_ERRORS "Treat all warnings as errors" ON)
+option(ROSETTASTONE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF)
 if(ROSETTASTONE_WARNINGS_AS_ERRORS)
 	if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
 		set(WARN_AS_ERROR_FLAGS	"/WX")


FindFreetype needs to look for the header ft2build.h separately; might be in a different directory.

--HG--
branch : v1-7

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -43,11 +43,15 @@
 message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")

 find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
+find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS})
 find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
 find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
 make_library_set(FREETYPE_LIBRARY)

 findpkg_finish(FREETYPE)
+if (NOT FREETYPE_FT2BUILD_INCLUDE_DIR STREQUAL FREETYPE_INCLUDE_DIR)
+  set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_FT2BUILD_INCLUDE_DIR})
+endif ()

 # Reset framework finding
 set(CMAKE_FIND_FRAMEWORK "FIRST")


rm static linking code from cblas.cmake

rm static linking code from cblas.cmake

--- modules/cblas.cmake
+++ modules/cblas.cmake
@@ -1,10 +1,6 @@
 #.rst:
 #
 # Find and link to CBLAS.
-#
-# Variables used::
-#
-#   ENABLE_STATIC_LINKING
 #
 # Variables defined::
 #
@@ -29,10 +25,6 @@
     set(CBLAS_LIBRARIES "undefined")
     set(CBLAS_INCLUDE_DIR "undefined")

-    if(ENABLE_STATIC_LINKING)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
-    endif()
-
     if(APPLE)
         _find_library(Accelerate cblas_dgemm CBLAS_LIBRARIES)
         _find_include_dir(Accelerate.h /usr CBLAS_INCLUDE_DIR)