Installed version of samples.cfg should reference samples plugins in ./

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401661

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -17,16 +17,16 @@
   set(OGRE_MEDIA_DIR_DBG "../../${OGRE_MEDIA_PATH}")
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")
-  set(OGRE_SAMPLES_DIR_REL "Samples")
-  set(OGRE_SAMPLES_DIR_DBG "Samples")
+  set(OGRE_SAMPLES_DIR_REL ".")
+  set(OGRE_SAMPLES_DIR_DBG ".")
 elseif (UNIX)
   set(OGRE_MEDIA_PATH "share/OGRE/media")
   set(OGRE_MEDIA_DIR_REL "../${OGRE_MEDIA_PATH}")
   set(OGRE_MEDIA_DIR_DBG "../../${OGRE_MEDIA_PATH}")
   set(OGRE_PLUGIN_DIR_REL "../lib/OGRE")
   set(OGRE_PLUGIN_DIR_DBG "../../lib/OGRE")
-  set(OGRE_SAMPLES_DIR_REL "../lib/OGRE/Samples")
-  set(OGRE_SAMPLES_DIR_DBG "../lib/OGRE/Samples")
+  set(OGRE_SAMPLES_DIR_REL "../lib/OGRE")
+  set(OGRE_SAMPLES_DIR_DBG "../lib/OGRE")
 endif ()

 # configure plugins.cfg


Specify data root as SimpleITK root project

This allows sub-project to be built as standalone projects and to
reuse the same data directory about their source root directory.

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -19,10 +19,12 @@
 endif()
 list(APPEND ExternalData_OBJECT_STORES
   # Local data store populated by the ITK pre-commit hook
-  "${CMAKE_CURRENT_SOURCE_DIR}/../.ExternalData"
+  "${SimpleITK_SOURCE_DIR}/../.ExternalData"
   )

 set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/ExternalData)
+
+set(ExternalData_SOURCE_ROOT ${SimpleITK_SOURCE_DIR})

 set(ExternalData_URL_TEMPLATES "" CACHE STRING
   "Additional URL templates for the ExternalData CMake script to look for testing data. E.g.


Use diakstra for place delay expansion calculation.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- xc/common/cmake/device_define.cmake
+++ xc/common/cmake/device_define.cmake
@@ -357,6 +357,7 @@
         --constant_net_method route
         --clock_modeling route
         --place_delay_model delta_override
+        --place_delta_delay_matrix_calculation_method dijkstra
         --router_lookahead connection_box_map
         --disable_errors check_unbuffered_edges:check_route:check_place
         --suppress_warnings sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R


ENH: updating LKEB linux dashboard

ENH: updating LKEB linux dashboard

Changing to a local VM.

--- Testing/Dashboard/elxDashboard_LKEB_linux64_gcc_Release.cmake
+++ Testing/Dashboard/elxDashboard_LKEB_linux64_gcc_Release.cmake
@@ -11,19 +11,19 @@
 # and defaults to Nightly.
 # NOTE that Model should directly follow the comma: no space allowed!
 #
-# Setup: Linux 64bit, Ubuntu 14.04 LTS, 3.13.0-24-generic
-# gcc 4.8.2
-# Release mode, ITK 4.x (git)
-# PC: LKEB (MS), goliath
+# Setup: Linux 64bit, Ubuntu 16.04.3 LTS
+# gcc 5.4.0
+# Release mode, ITK 4.13.0
+# PC: LKEB (MS), LKEB-ELDB91

 # Client maintainer: m.staring@lumc.nl
-set( CTEST_SITE "LKEB.goliath" )
-set( CTEST_BUILD_NAME "Linux-64bit-gcc4.8.2-Release" )
-set( CTEST_BUILD_FLAGS "-j6" ) # parallel build for makefiles
-set( CTEST_TEST_ARGS PARALLEL_LEVEL 6 ) # parallel testing
+set( CTEST_SITE "LKEB-ELDB91" )
+set( CTEST_BUILD_NAME "Linux-64bit-gcc5.4.0-Release" )
+set( CTEST_BUILD_FLAGS "-j2" ) # parallel build for makefiles
+set( CTEST_TEST_ARGS PARALLEL_LEVEL 2 ) # parallel testing
 set( CTEST_BUILD_CONFIGURATION Release )
 set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
-set( CTEST_DASHBOARD_ROOT "/home/marius/nightly-builds/elastix" )
+set( CTEST_DASHBOARD_ROOT "/home/mstaring/nightly/elastix" )
 set( CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}/bin_release )

 # Specify the kind of dashboard to submit
@@ -38,12 +38,12 @@
 # Dashboard settings
 set( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/srv/lkeb-goliath/toolkits/ITK/git/bin_release
+ITK_DIR:PATH=/home/mstaring/nightly/ITK/bin_release

 // Some elastix settings, defining the configuration
 ELASTIX_BUILD_TESTING:BOOL=ON
 ELASTIX_ENABLE_PACKAGER:BOOL=ON
-ELASTIX_USE_EIGEN:BOOL=ON
+ELASTIX_USE_EIGEN:BOOL=OFF
 ELASTIX_USE_OPENCL:BOOL=OFF
 ELASTIX_USE_MEVISDICOMTIFF:BOOL=OFF
 ELASTIX_IMAGE_DIMENSIONS:STRING=2;3;4


Fixing typos in test configuration for WIN32

--- CMake/mitkPackageTest.cmake
+++ CMake/mitkPackageTest.cmake
@@ -6,7 +6,7 @@
     # package testing in windows only for release
     if(WIN32)
       add_test(NAME mitkPackageTest CONFIGURATIONS Release
-               COMMAND ${CMAKE_COMMANDS} --build ${MITK_BINARY_DIR} --config Release --target package)
+               COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config Release --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
                           TIMEOUT 3600


Added GDAL_FIND_DEBUG option

Added GDAL_FIND_DEBUG option

--- CMakeModules/FindGDAL.cmake
+++ CMakeModules/FindGDAL.cmake
@@ -18,6 +18,18 @@

 # This makes the presumption that you are include gdal.h like
 # #include "gdal.h"
+
+set(GDAL_FIND_DEBUG TRUE CACHE BOOL "Also search for the debug version of the GDAL library")
+
+if(GDAL_FIND_DEBUG)
+	if(GDAL_INCLUDE_DIR AND GDAL_LIBRARY AND GDAL_LIBRARY_DEBUG)
+		set(GDAL_FIND_QUIETLY TRUE)
+	endif(GDAL_INCLUDE_DIR AND GDAL_LIBRARY AND GDAL_LIBRARY_DEBUG)
+else(GDAL_FIND_DEBUG)
+	if(GDAL_INCLUDE_DIR AND GDAL_LIBRARY)
+		set(GDAL_FIND_QUIETLY TRUE)
+	endif(GDAL_INCLUDE_DIR AND GDAL_LIBRARY)
+endif(GDAL_FIND_DEBUG)

 FIND_PATH(GDAL_INCLUDE_DIR gdal.h
   HINTS
@@ -83,8 +95,17 @@
 )

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GDAL DEFAULT_MSG GDAL_INCLUDE_DIR GDAL_LIBRARY GDAL_LIBRARY_DEBUG)
+find_package_handle_standard_args(GDAL DEFAULT_MSG GDAL_INCLUDE_DIR GDAL_LIBRARY)

 if(GDAL_FOUND)
-	set(GDAL_LIBRARIES debug ${GDAL_LIBRARY_DEBUG} optimized ${GDAL_LIBRARY})
-endif(GDAL_FOUND)+	if(GDAL_FIND_DEBUG)
+		if(NOT GDAL_LIBRARY_DEBUG)
+			set(GDAL_LIBRARY_DEBUG ${GDAL_LIBRARY})
+		endif(NOT GDAL_LIBRARY_DEBUG)
+		set(GDAL_LIBRARIES debug ${GDAL_LIBRARY_DEBUG} optimized ${GDAL_LIBRARY})
+	else(GDAL_FIND_DEBUG)
+		set(GDAL_LIBRARIES ${GDAL_LIBRARY})
+	endif(GDAL_FIND_DEBUG)
+else(GDAL_FOUND)
+	SET(GDAL_LIBRARIES )
+endif(GDAL_FOUND)


Changed the Win32 defined for each module. Each file in a DLL must have all the other "__[Module]__DLL" defined, since they reside in the same DLL. Else the variable/function is both exported and imported inside the DLL (this triggers just a warning but it is not 100% correct)

--- adm/cmake/OccBuildKit.cmake
+++ adm/cmake/OccBuildKit.cmake
@@ -61,7 +61,7 @@

 	IF (WIN32)
 		# For compilers under Windows a define must be set per file to correctly set the export macro
-		SET_SOURCE_FILES_PROPERTIES(${source_files} PROPERTIES COMPILE_FLAGS "-D__${MODULE}_DLL")
+		ADD_DEFINITIONS("-D__${MODULE}_DLL")
 	ENDIF(WIN32)

 	SOURCE_GROUP (${MODULE} FILES ${source_files})


ctkFunctionGetGccVersion - Make sure trailing spaces are stripped

--- CMake/ctkFunctionGetGccVersion.cmake
+++ CMake/ctkFunctionGetGccVersion.cmake
@@ -25,6 +25,8 @@
       RESULT_VARIABLE result
       OUTPUT_VARIABLE output
       ERROR_VARIABLE error
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_STRIP_TRAILING_WHITESPACE
       )
     IF(result)
       MESSAGE(FATAL_ERROR "Failed to obtain compiler version running [${path_to_gcc} -dumpversion]: ${error}")


More debugging.

More debugging.

I don't know why, when calling add_subdirectory from a function, the
function's scope is not being updated by set(... PARENT_SCOPE).

--- CPM.cmake
+++ CPM.cmake
@@ -407,6 +407,7 @@
   set(CPM_LAST_MODULE_NAME ${name})
   set(CPM_LAST_MODULE_NAME ${CPM_LAST_MODULE_NAME} PARENT_SCOPE)
   message("Initializing macro: ${name}")
+  message("Initializing macro 2: ${CPM_LAST_MODULE_NAME }")

   # Build the appropriate definition for the module. We stored the unique ID
   _cpm_build_preproc_name(name __CPM_TMP_VAR)


STYLE: Update main cmake to build with qt5

--- DTIAtlasFiberAnalyzer.cmake
+++ DTIAtlasFiberAnalyzer.cmake
@@ -1,30 +1,30 @@
 project( DTIAtlasFiberAnalyzerProject )

-#-----------------------------------------------------------------------------
-
-if(BUILD_TESTING)
-  include( CTest )
-endif(BUILD_TESTING)
+#-----------------------------------------------------------------------------

-SETIFEMPTY( ARCHIVE_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib/static )
-SETIFEMPTY( LIBRARY_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib )
+if(BUILD_TESTING)
+  include( CTest )
+endif(BUILD_TESTING)
+
+SETIFEMPTY( ARCHIVE_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib/static )
+SETIFEMPTY( LIBRARY_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib )
 SETIFEMPTY( RUNTIME_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/bin )

 SETIFEMPTY(INSTALL_RUNTIME_DESTINATION bin)
 SETIFEMPTY(INSTALL_LIBRARY_DESTINATION lib)
 SETIFEMPTY(INSTALL_ARCHIVE_DESTINATION lib)
 set( install_dir ${INSTALL_RUNTIME_DESTINATION} )
-
-find_package(SlicerExecutionModel REQUIRED)
-include(${SlicerExecutionModel_USE_FILE})

-FIND_PACKAGE(ITK REQUIRED)
-include(${ITK_USE_FILE})
+find_package(SlicerExecutionModel REQUIRED)
+include(${SlicerExecutionModel_USE_FILE})
+
+FIND_PACKAGE(ITK REQUIRED)
+include(${ITK_USE_FILE})

 find_package(VTK REQUIRED)
-include(${VTK_USE_FILE})
-if( VTK_MAJOR_VERSION VERSION_LESS 6 AND NOT VTK_USE_QT )
-  message( FATAL_ERROR "DTIAtlasFiberAnalyzer needs VTK to be built with Qt" )
+include(${VTK_USE_FILE})
+if( VTK_MAJOR_VERSION VERSION_LESS 6 AND NOT VTK_USE_QT )
+  message( FATAL_ERROR "DTIAtlasFiberAnalyzer needs VTK to be built with Qt" )
 endif()
 if( VTK_MAJOR_VERSION VERSION_GREATER 5 )
   list( FIND VTK_MODULES_ENABLED "vtkGUISupportQt" vtkQtpos )
@@ -33,15 +33,12 @@
   endif()
 endif()

-find_package(Qt4 REQUIRED)
-if(QT_USE_FILE)
-  include_directories(${QT_INCLUDE_DIR})
-  include(${QT_USE_FILE})
-else(QT_USE_FILE)
-  message(FATAL_ERROR, "QT not found. Please set QT_DIR.")
-endif(QT_USE_FILE)
+find_package(Qt5 COMPONENTS Core Gui Network Xml REQUIRED)

-option(EXECUTABLES_ONLY "Build only executables (CLI)" ON)
+add_definitions(${Qt5Widgets_DEFINITIONS})
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
+
+option(EXECUTABLES_ONLY "Build only executables (CLI)" ON)
 if( ${EXECUTABLES_ONLY} )
   set( STATIC "EXECUTABLE_ONLY" )
   set( STATIC_LIB "STATIC" )
@@ -49,17 +46,18 @@
   set( STATIC_LIB "SHARED" )
 endif()

-add_subdirectory( Applications )
+add_subdirectory( Applications )

-if( COMPILE_EXTERNAL_DTIPROCESS )
-  set( ToolsList
-    ${CMAKE_BINARY_DIR}/DTIProcess-install/bin/fiberprocess${fileextension}
-  )
-endif()
+find_package(DTIProcess REQUIRED)

-if( EXECUTABLES_ONLY )
-  foreach( tool ${ToolsList})
-    install(PROGRAMS ${tool} DESTINATION ${INSTALL_RUNTIME_DESTINATION})
+set( ToolsList
+  ${DTIProcess_BINARY_DIR}fiberprocess${fileextension}
+)
+
+
+if( EXECUTABLES_ONLY )
+  foreach( tool ${ToolsList})
+    install(PROGRAMS ${tool} DESTINATION ${INSTALL_RUNTIME_DESTINATION})
   endforeach()
 endif()


avoid updating unchanged files

avoid updating unchanged files

--- cmake/megamol_build_info/megamol_build_info_script.cmake
+++ cmake/megamol_build_info/megamol_build_info_script.cmake
@@ -3,6 +3,18 @@
 # All rights reserved.
 #
 cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
+
+# Functions
+function(write_file_if_changed filename content)
+  if (EXISTS "${filename}")
+    file(READ ${filename} content_old)
+    if ("${content}" STREQUAL "${content_old}")
+      # File exists already with same content. Do not write, to not trigger unnecessary rebuild.
+      return()
+    endif ()
+  endif ()
+  file(WRITE ${filename} "${content}")
+endfunction()

 # Directory of the current script
 get_filename_component(INFO_SRC_DIR ${CMAKE_SCRIPT_MODE_FILE} DIRECTORY)
@@ -22,7 +34,7 @@
   WORKING_DIRECTORY "${PROJECT_DIR}"
   OUTPUT_VARIABLE GIT_HASH
   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_HASH "${GIT_HASH}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_HASH "${GIT_HASH}")

 # Branch name
 execute_process(COMMAND
@@ -30,7 +42,7 @@
   WORKING_DIRECTORY "${PROJECT_DIR}"
   OUTPUT_VARIABLE GIT_BRANCH_NAME
   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_BRANCH_NAME "${GIT_BRANCH_NAME}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_BRANCH_NAME "${GIT_BRANCH_NAME}")

 # Full branch name
 execute_process(COMMAND
@@ -38,7 +50,7 @@
   WORKING_DIRECTORY "${PROJECT_DIR}"
   OUTPUT_VARIABLE GIT_BRANCH_NAME_FULL
   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_BRANCH_NAME_FULL "${GIT_BRANCH_NAME_FULL}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_BRANCH_NAME_FULL "${GIT_BRANCH_NAME_FULL}")

 # Get remote name
 if (GIT_BRANCH_NAME_FULL STREQUAL "")
@@ -47,7 +59,7 @@
   string(REPLACE "/" ";" GIT_REMOTE_NAME "${GIT_BRANCH_NAME_FULL}")
   list(GET GIT_REMOTE_NAME 0 GIT_REMOTE_NAME)
 endif ()
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_REMOTE_NAME "${GIT_REMOTE_NAME}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_REMOTE_NAME "${GIT_REMOTE_NAME}")

 # Origin URL
 execute_process(COMMAND
@@ -55,7 +67,7 @@
   WORKING_DIRECTORY "${PROJECT_DIR}"
   OUTPUT_VARIABLE GIT_REMOTE_URL
   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_REMOTE_URL "${GIT_REMOTE_URL}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_REMOTE_URL "${GIT_REMOTE_URL}")

 # Git diff / is dirty
 execute_process(COMMAND
@@ -64,14 +76,14 @@
   OUTPUT_VARIABLE GIT_DIFF
   RESULTS_VARIABLE GIT_IS_DIRTY
   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_DIFF "${GIT_DIFF}")
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_GIT_IS_DIRTY "${GIT_IS_DIRTY}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_DIFF "${GIT_DIFF}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_GIT_IS_DIRTY "${GIT_IS_DIRTY}")

 # Time
 string(TIMESTAMP BUILD_TIMESTAMP "%s" UTC)
 string(TIMESTAMP BUILD_TIME "" UTC)
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_BUILD_TIMESTAMP "${BUILD_TIMESTAMP}")
-file(WRITE ${INFO_RESOURCES_DIR}/MEGAMOL_BUILD_TIME "${BUILD_TIME}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_BUILD_TIMESTAMP "${BUILD_TIMESTAMP}")
+write_file_if_changed(${INFO_RESOURCES_DIR}/MEGAMOL_BUILD_TIME "${BUILD_TIME}")

 # License
 configure_file(${PROJECT_DIR}/LICENSE ${INFO_RESOURCES_DIR}/MEGAMOL_LICENSE COPYONLY)


Stupid typo in Boost Cmake file

Stupid typo in Boost Cmake file

--- indra/cmake/Boost.cmake
+++ indra/cmake/Boost.cmake
@@ -40,13 +40,13 @@
           optimized libboost_program_options-mt
           debug libboost_program_options-mt-gd)
       set(BOOST_REGEX_LIBRARY
-          optimized libboost_regex-mt}
+          optimized libboost_regex-mt
           debug libboost_regex-mt-gd)
       set(BOOST_SYSTEM_LIBRARY
-          optimized libboost_system-mt}
+          optimized libboost_system-mt
           debug libboost_system-mt-gd)
       set(BOOST_FILESYSTEM_LIBRARY
-          optimized libboost_filesystem-mt}
+          optimized libboost_filesystem-mt
           debug libboost_filesystem-mt-gd)
     endif (MSVC80)
   elseif (DARWIN OR LINUX)


Update FindARM.cmake

Update FindARM.cmake

Fix typos

--- lib/TH/cmake/FindARM.cmake
+++ lib/TH/cmake/FindARM.cmake
@@ -68,9 +68,9 @@
       MESSAGE(STATUS "Could not find hardware support for NEON on this machine.")
 endif(NOT NEON_FOUND)
 if(NOT CORTEXA8_FOUND)
-      MESSAGE(STATUS "No OMAP3 processor on this on this machine.")
+      MESSAGE(STATUS "No OMAP3 processor on this machine.")
 endif(NOT CORTEXA8_FOUND)
 if(NOT CORTEXA9_FOUND)
-      MESSAGE(STATUS "No OMAP4 processor on this on this machine.")
+      MESSAGE(STATUS "No OMAP4 processor on this machine.")
 endif(NOT CORTEXA9_FOUND)
 mark_as_advanced(NEON_FOUND)


corrected header file in files.cmake

corrected header file in files.cmake

--- Modules/DiffusionImaging/files.cmake
+++ Modules/DiffusionImaging/files.cmake
@@ -93,7 +93,7 @@
   Rendering/mitkDiffusionImageMapper.h
   Rendering/mitkOdfVtkMapper2D.h
   Rendering/mitkFiberBundleMapper3D.h
-  Rendering/mitkFiberBundleXMapper3D.cpp
+  Rendering/mitkFiberBundleXMapper3D.h

   # Reconstruction
   Reconstruction/itkDiffusionQballReconstructionImageFilter.h


cycluscore->LIBS

cycluscore->LIBS

--- src/CMake/UseCyclus.cmake
+++ src/CMake/UseCyclus.cmake
@@ -90,7 +90,7 @@

   # add library
   ADD_LIBRARY(${lib_root} ${CCOUT})
-  TARGET_LINK_LIBRARIES(${lib_root} dl cycluscore)
+  TARGET_LINK_LIBRARIES(${lib_root} dl ${LIBS})
   SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${lib_root})
   ADD_DEPENDENCIES(${lib_root} ${HIN} ${HOUT} ${CCIN} ${CCOUT})


PKG: ignore .settings files from hdf and netcdf

--- Packaging/install_rule.cmake
+++ Packaging/install_rule.cmake
@@ -78,6 +78,8 @@
       continue()
     elseif("${sfile_ABS_LOWER}" MATCHES "\\.la$")
       continue()
+    elseif("${sfile_ABS_LOWER}" MATCHES "\\.settings$")
+      continue()
     else()
       if(UNIX)
         #the last else() loop where we run a 'file' command to find file type and directory


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 10)

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


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 04)

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


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   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   27)
+SET(KWSYS_DATE_STAMP_DAY   28)


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   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


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   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


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 10)

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


Fix typo

Fix typo

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

--- deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake
+++ deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake
@@ -48,4 +48,5 @@
     ENDIF()

   ENDFOREACH()
+ENDMACRO()


Fix race condition when building with OCE_USE_PCH=ON OCE_COPY_HEADERS_BUILD=ON

See for instance travis build failure for job 257.5.

--- adm/cmake/BuildToolkit.cmake
+++ adm/cmake/BuildToolkit.cmake
@@ -334,6 +334,14 @@

 endif()

+if(TARGET ${TOOLKIT}_gch)
+	foreach(tkit ${TOOLKIT_DEPENDS})
+		if(TARGET copy_${tkit}_headers)
+			add_dependencies(${TOOLKIT}_gch copy_${tkit}_headers)
+		endif()
+	endforeach(tkit ${TOOLKIT_DEPENDS})
+endif(TARGET ${TOOLKIT}_gch)
+
 ###########
 # INSTALL #
 ###########


Enable arm64

Enable arm64

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -119,7 +119,7 @@
 ENDMACRO()

-FOREACH(arch X64 X86 ARM PPC PPCSPE MIPS)
+FOREACH(arch X64 X86 ARM ARM64 PPC PPCSPE MIPS)
   LJ_TEST_ARCH(LJ_TARGET_${arch})
   if(LJ_TARGET_${arch})
     STRING(TOLOWER ${arch} TARGET_LJARCH)


CMake: Added support for MySQL Server 5.7 (#187)

--- modules/worldengine/nucleus/src/cmake/macros/FindMySQL.cmake
+++ modules/worldengine/nucleus/src/cmake/macros/FindMySQL.cmake
@@ -72,16 +72,19 @@
     /usr/local/include
     /usr/local/include/mysql
     /usr/local/mysql/include
+    "C:/Program Files/MySQL/MySQL Server 5.7/include"
     "C:/Program Files/MySQL/MySQL Server 5.6/include"
     "C:/Program Files/MySQL/MySQL Server 5.5/include"
     "C:/Program Files/MySQL/MySQL Server 5.1/include"
     "C:/Program Files/MySQL/MySQL Server 5.0/include"
     "C:/Program Files/MySQL/include"
     "C:/MySQL/include"
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include"
@@ -116,12 +119,15 @@
       libmysql
     PATHS
       ${MYSQL_ADD_LIBRARIES_PATH}
+      "C:/Program Files/MySQL/MySQL Server 5.7/lib/opt"
       "C:/Program Files/MySQL/MySQL Server 5.6/lib/opt"
       "C:/Program Files/MySQL/MySQL Server 5.5/lib/opt"
       "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt"
       "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt"
       "C:/Program Files/MySQL/lib"
       "C:/MySQL/lib/debug"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib"
@@ -130,6 +136,8 @@
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib"


add a compilation test in FindGoogleHash.cmake to catch configuration issues when multiple compilers are used on the same system.

--- cmake/FindGoogleHash.cmake
+++ cmake/FindGoogleHash.cmake
@@ -10,7 +10,14 @@
   ${INCLUDE_INSTALL_DIR}
 )

+if(GOOGLEHASH_INCLUDES)
+  # let's make sure it compiles with the current compiler
+  file(WRITE ${CMAKE_BINARY_DIR}/googlehash_test.cpp
+  "#include <google/sparse_hash_map>\n#include <google/dense_hash_map>\nint main(int argc, char** argv) { google::dense_hash_map<int,float> a; google::sparse_hash_map<int,float> b; return 0;}\n")
+  try_compile(GOOGLEHASH_COMPILE ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/googlehash_test.cpp OUTPUT_VARIABLE GOOGLEHASH_COMPILE_RESULT)
+endif(GOOGLEHASH_INCLUDES)
+
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GOOGLEHASH DEFAULT_MSG GOOGLEHASH_INCLUDES)
+find_package_handle_standard_args(GOOGLEHASH DEFAULT_MSG GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE)

 mark_as_advanced(GOOGLEHASH_INCLUDES)


added APPLE section

added APPLE section

--- cmake/FindOpenALSoft.cmake
+++ cmake/FindOpenALSoft.cmake
@@ -12,8 +12,6 @@
     /opt/local # DarwinPorts
     /opt/csw # Blastwave
     /opt
-    # Travis CI - MAC OSX
-    /usr/local/opt/openal-soft/include/
     # Linux Include PATH
     /usr/include/AL/
     # Windows SDK Include PATH
@@ -22,7 +20,6 @@

 find_library(OPENALSOFT_LIBRARY
   NAMES libopenal openal libOpenAL32 OpenAL32 OpenAL32.dll soft_oal.dll
-  PATH_SUFFIXES lib64 lib libs64 libs
   PATHS
     ${OPENALSOFT_INCLUDE_DIR}/../lib
     /usr/local/opt/openal-soft/lib
@@ -30,6 +27,20 @@
     /usr/lib
 )

+IF (APPLE)
+  find_path(OPENALSOFT_INCLUDE_DIR
+  NAMES al.h
+  PATHS
+    /usr/local/opt/openal-soft/include/
+  )
+  find_library(OPENALSOFT_LIBRARY
+  NAMES libopenal openal libOpenAL32 OpenAL32
+  PATHS
+    ${OPENALSOFT_INCLUDE_DIR}/../lib
+    /usr/local/opt/openal-soft/lib
+  )
+ENDIF (APPLE)
+
 include(FindPackageHandleStandardArgs)

 find_package_handle_standard_args(OPENALSOFT DEFAULT_MSG OPENALSOFT_LIBRARY OPENALSOFT_INCLUDE_DIR)


added local to the root dir

added local to the root dir

--- cmake/Findcycluscore.cmake
+++ cmake/Findcycluscore.cmake
@@ -12,14 +12,12 @@
     MESSAGE(STATUS "\t\tThe defined cmake variable CYCLUS_ROOT_DIR: ${CYCLUS_ROOT_DIR}")
     MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
   ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
+ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
+  SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
 ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

 # Let the user know if we're using a hint
-IF(DEFINED CYCLUS_ROOT_DIR)
-  MESSAGE(STATUS "CYCLUS_ROOT_DIR hint is : ${CYCLUS_ROOT_DIR}")
-ELSE(DEFINED CYCLUS_ROOT_DIR)
-  MESSAGE(STATUS "No hint is used for CYCLUS_ROOT_DIR")
-ENDIF(DEFINED CYCLUS_ROOT_DIR)
+MESSAGE(STATUS "Using ${CYCLUS_ROOT_DIR} as CYCLUS_ROOT_DIR.")

 # Set the include dir, this will be the future basis for other
 # defined dirs
@@ -27,7 +25,7 @@
   HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   "${CYCLUS_ROOT_DIR}/include"
   "${CYCLUS_ROOT_DIR}/include/cyclus"
-  /usr/local/cyclus /opt/local/cyclus
+  /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/include include include/cyclus)

 # Add the root dir to the hints


Change the logic to find isnan, ising and finite so that Visual C++ also works: First it tries to find the symbol isnan. Then the function isnan. Then symbol _isnan. Then function _isnan. Same for isinf and finite. Still fast for GCC compilers, since the functions are found with the first check, while Visual C++ goes through all checks. Note, that I had to use HAVE_FINITE2 and similar since you are not allowed to change e.g. HAVE_FINITE if this variable was used in the IF clause.
Adding else some DevPack packaging stuff, which is Win32 only.

svn path=/trunk/; revision=9607

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -87,6 +87,18 @@
   "Pre-build all components required for distribution"
   )
 endif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
+
+# create a devpackage file
+option(DEVPAK "Create DevPackage" NO)
+if(DEVPAK AND NOT WIN32)
+  message( STATUS "DevPackage only available for Win32. Set DEVPAK to OFF." )
+  set(DEVPAK OFF)
+endif(DEVPAK AND NOT WIN32)
+if(DEVPAK AND BUILD_TEST)
+  message( STATUS "Examples are not build for DevPackage. Set BUILD_TEST to OFF." )
+  set(BUILD_TEST OFF)
+endif(DEVPAK AND BUILD_TEST)
+

 # =======================================================================
 # Headers
@@ -191,17 +203,43 @@
 # are sometimes all that is available on windows
 check_symbol_exists(finite "math.h" HAVE_FINITE)
 if(NOT HAVE_FINITE)
+  check_function_exists(finite HAVE_FINITE2)
+endif(NOT HAVE_FINITE)
+set(HAVE_FINITE ${HAVE_FINITE2})
+if(NOT HAVE_FINITE)
   check_symbol_exists(_finite "math.h" _HAVE_FINITE)
+  if(NOT _HAVE_FINITE)
+    check_function_exists(_finite _HAVE_FINITE2)
+  endif(NOT _HAVE_FINITE)
+  set(_HAVE_FINITE ${_HAVE_FINITE2})
   set(HAVE_FINITE ${_HAVE_FINITE} CACHE INTERNAL "Have function _finite")
 endif(NOT HAVE_FINITE)
+
 check_symbol_exists(isnan "math.h" HAVE_ISNAN)
 if(NOT HAVE_ISNAN)
+  check_function_exists(isnan HAVE_ISNAN2)
+endif(NOT HAVE_ISNAN)
+set(HAVE_ISNAN ${HAVE_ISNAN2})
+if(NOT HAVE_ISNAN)
   check_symbol_exists(_isnan "math.h" _HAVE_ISNAN)
+  if(NOT _HAVE_ISNAN)
+    check_function_exists(_isnan _HAVE_ISNAN2)
+  endif(NOT _HAVE_ISNAN)
+  set(_HAVE_ISNAN ${_HAVE_ISNAN2})
   set(HAVE_ISNAN ${_HAVE_ISNAN} CACHE INTERNAL "Have function _isnan")
 endif(NOT HAVE_ISNAN)
+
 check_symbol_exists(isinf "math.h" HAVE_ISINF)
 if(NOT HAVE_ISINF)
+  check_function_exists(isinf HAVE_ISINF2)
+endif(NOT HAVE_ISINF)
+set(HAVE_ISINF ${HAVE_ISINF2})
+if(NOT HAVE_ISINF)
   check_symbol_exists(_isinf "math.h" _HAVE_ISINF)
+  if(NOT _HAVE_ISINF)
+    check_function_exists(_isinf _HAVE_ISINF2)
+  endif(NOT _HAVE_ISINF)
+  set(_HAVE_ISINF ${_HAVE_ISINF2})
   set(HAVE_ISINF ${_HAVE_ISINF} CACHE INTERNAL "Have function _isinf")
 endif(NOT HAVE_ISINF)


bump version

bump version

--- cmake/ospray_version.cmake
+++ cmake/ospray_version.cmake
@@ -3,7 +3,7 @@

 set(OSPRAY_VERSION_MAJOR 2)
 set(OSPRAY_VERSION_MINOR 0)
-set(OSPRAY_VERSION_PATCH 0)
+set(OSPRAY_VERSION_PATCH 1)
 set(OSPRAY_SOVERSION 2)
 set(OSPRAY_VERSION_GITHASH 0)
 set(OSPRAY_VERSION_NOTE "")


Allow disable trying async

Allow disable trying async

--- cmake/vSMCFindSTDTBB.cmake
+++ cmake/vSMCFindSTDTBB.cmake
@@ -21,9 +21,11 @@
     SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_RQUIRED_DEFINITIONS}
         -DVSMC_HAS_CXX11LIB_FUTURE=1)
     CHECK_CXX_SOURCE_RUNS ("${VSMC_STDTBB_TEST_SOURCE}" VSMC_FUTURE_FOUND)
-    SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_RQUIRED_DEFINITIONS}
-        -DVSMC_HAS_CXX11LIB_FUTURE=0)
-    CHECK_CXX_SOURCE_RUNS ("${VSMC_STDTBB_TEST_SOURCE}" VSMC_THREAD_FOUND)
+    IF (NOT VSMC_DO_FUTURE)
+        SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_RQUIRED_DEFINITIONS}
+            -DVSMC_HAS_CXX11LIB_FUTURE=0)
+        CHECK_CXX_SOURCE_RUNS ("${VSMC_STDTBB_TEST_SOURCE}" VSMC_THREAD_FOUND)
+    ENDIF (NOT VSMC_DO_FUTURE)
     IF (VSMC_THREAD_FOUND OR VSMC_FUTURE_FOUND)
         SET (VSMC_THREAD_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}
             CACHE STRING "Link to thread")


Disable (pointless) array initialization warning on Windows

--- Compiler.cmake
+++ Compiler.cmake
@@ -134,6 +134,7 @@
     /wd4068 # disable unknown pragma warnings
     /wd4244 # conversion from X to Y, possible loss of data
     /wd4800 # forcing value to bool 'true' or 'false' (performance warning)
+    /wd4351 # new behavior: elements of array 'array' will be default initialized
     )

   # By default, do not warn when built on machines using only VS Express


Coverage limits set to 40% and 80% to follow BBP software metrics.

--- Coverage.cmake
+++ Coverage.cmake
@@ -53,6 +53,11 @@
 # Add custom targets to generate an html coverate report produced by running
 # the tests that make part of the given targets
 macro(COVERAGE_REPORT)
+  if(NOT COVERAGE_LIMITS)
+    # Use the coverage limits corresponding to the BBP Software Metrics
+    # https://bbpteam.epfl.ch/project/spaces/display/REL/Software+Metrics
+    set(COVERAGE_LIMITS --rc genhtml_med_limit=40 --rc genhtml_hi_limit=80)
+  endif()
   add_custom_target(lcov-gather
     COMMAND ${LCOV} -q --directory . --capture --output-file lcov.info
     COMMENT "Capturing code coverage counters"
@@ -64,7 +69,7 @@
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     DEPENDS lcov-gather)
   add_custom_target(lcov-html
-    COMMAND ${GENHTML} -q -o CoverageReport ${CMAKE_BINARY_DIR}/lcov2.info
+    COMMAND ${GENHTML} -q ${COVERAGE_LIMITS} -o CoverageReport ${CMAKE_BINARY_DIR}/lcov2.info
     COMMENT "Creating html coverage report, open ${CMAKE_BINARY_DIR}/doc/html/CoverageReport/index.html "
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
     DEPENDS lcov-remove)


minor fix

minor fix

--- SM/SM.cmake
+++ SM/SM.cmake
@@ -25,12 +25,12 @@
 endif(WITH_GRID_TRACKERS)
 if(WITH_FEAT)
 	message(STATUS "OpenCV_VERSION: ${OpenCV_VERSION}")
-	if(NOT "${OpenCV_VERSION}" STREQUAL "3")̀
-	# message(STATUS "OpenCV_LIBRARIES: ${OpenCV_LIBRARIES}")
-		findSubPart("${OpenCV_LIBRARIES}" "opencv_nonfree" CV_NONFREE_FOUND)
-	else()
-		findSubPart("${OpenCV_LIBRARIES}" "opencv_xfeatures2d" CV_NONFREE_FOUND)
-	endif()
+	# if(NOT "${OpenCV_VERSION}" STREQUAL "3")̀
+		# findSubPart("${OpenCV_LIBRARIES}" "opencv_nonfree" CV_NONFREE_FOUND)
+	# else()
+		# findSubPart("${OpenCV_LIBRARIES}" "opencv_xfeatures2d" CV_NONFREE_FOUND)
+	# endif()
+	findSubPart("${OpenCV_LIBRARIES}" "opencv_xfeatures2d" CV_NONFREE_FOUND)
 	if(CV_NONFREE_FOUND)
 		message(STATUS "Feature based grid tracker is enabled")
 		set(COMPOSITE_SEARCH_METHODS ${COMPOSITE_SEARCH_METHODS} FeatureTracker)


reviewed indentation

reviewed indentation

--- SuperBuild/External_astra-toolbox.cmake
+++ SuperBuild/External_astra-toolbox.cmake
@@ -84,42 +84,39 @@
     set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA)

-set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure")
-list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
-if (CUDA_FOUND)
-    list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
-
-    ExternalProject_Add(${proj}
-      ${${proj}_EP_ARGS}
-      GIT_REPOSITORY ${${proj}_URL}
-      GIT_TAG ${${proj}_TAG}
-      #GIT_TAG origin/cmaking
-      SOURCE_DIR ${${proj}_SOURCE_DIR}
-      BINARY_DIR ${${proj}_BINARY_DIR}
-      DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
-      STAMP_DIR ${${proj}_STAMP_DIR}
-      TMP_DIR ${${proj}_TMP_DIR}
-      INSTALL_DIR ${libastra_Install_Dir}
-      # apparently this is the only way to pass environment variables to
-      # external projects
-      CONFIGURE_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh
-        #${CMAKE_COMMAND} -E env ./autogen.sh
-
-      # This build is Unix specific
-      BUILD_COMMAND
-      ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-python=${PYTHON_EXECUTABLE} --with-install-type=prefix
-      INSTALL_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j2 install-libraries
-        #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h
-      DEPENDS
-        ${${proj}_DEPENDENCIES}
-    )
-
-    set(python_wrapper "astra-python-wrapper")
+    set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure")
+    list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
+    if (CUDA_FOUND)
+      list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
+
+      ExternalProject_Add(${proj}
+        ${${proj}_EP_ARGS}
+        GIT_REPOSITORY ${${proj}_URL}
+        GIT_TAG ${${proj}_TAG}
+        SOURCE_DIR ${${proj}_SOURCE_DIR}
+        BINARY_DIR ${${proj}_BINARY_DIR}
+        DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
+        STAMP_DIR ${${proj}_STAMP_DIR}
+        TMP_DIR ${${proj}_TMP_DIR}
+        INSTALL_DIR ${libastra_Install_Dir}
+        # apparently this is the only way to pass environment variables to
+        # external projects
+        CONFIGURE_COMMAND
+          ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh
+
+        # This build is Unix specific
+        BUILD_COMMAND
+        ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-python=${PYTHON_EXECUTABLE} --with-install-type=prefix
+        INSTALL_COMMAND
+          ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j2 install-libraries
+        DEPENDS
+          ${${proj}_DEPENDENCIES}
+      )
+
+      set(python_wrapper "astra-python-wrapper")

-    #create a configure script
-    file(WRITE ${${proj}_SOURCE_DIR}/python_build
+      #create a configure script
+      file(WRITE ${${proj}_SOURCE_DIR}/python_build
 "
 #! /bin/bash
 set -ex
@@ -127,40 +124,36 @@
 CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include\" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build
 ")

-else()
-# No CUDA
-    message (WARNING "No CUDA found on host, skipping GPU")
-    ExternalProject_Add(${proj}
-      ${${proj}_EP_ARGS}
-      GIT_REPOSITORY ${${proj}_URL}
-      GIT_TAG ${${proj}_TAG}
-      #GIT_TAG origin/cmaking
-      SOURCE_DIR ${${proj}_SOURCE_DIR}
-      BINARY_DIR ${${proj}_BINARY_DIR}
-      DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
-      STAMP_DIR ${${proj}_STAMP_DIR}
-      TMP_DIR ${${proj}_TMP_DIR}
-      INSTALL_DIR ${libastra_Install_Dir}
-      # apparently this is the only way to pass environment variables to
-      # external projects
-      CONFIGURE_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh
-        #${CMAKE_COMMAND} -E env ./autogen.sh
-
-      # This build is Unix specific
-      BUILD_COMMAND
-      ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python=${PYTHON_EXECUTABLE}
-      INSTALL_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries
-        #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h
-      DEPENDS
-        ${${proj}_DEPENDENCIES}
-    )
-
-    set(python_wrapper "astra-python-wrapper")
+    else()
+      # No CUDA
+      message (WARNING "No CUDA found on host, skipping GPU")
+      ExternalProject_Add(${proj}
+        ${${proj}_EP_ARGS}
+        GIT_REPOSITORY ${${proj}_URL}
+        GIT_TAG ${${proj}_TAG}
+        SOURCE_DIR ${${proj}_SOURCE_DIR}
+        BINARY_DIR ${${proj}_BINARY_DIR}
+        DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
+        STAMP_DIR ${${proj}_STAMP_DIR}
+        TMP_DIR ${${proj}_TMP_DIR}
+        INSTALL_DIR ${libastra_Install_Dir}
+        # apparently this is the only way to pass environment variables to
+        # external projects
+        CONFIGURE_COMMAND
+          ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh
+        # This build is Unix specific
+        BUILD_COMMAND
+        ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python=${PYTHON_EXECUTABLE}
+        INSTALL_COMMAND
+          ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries
+        DEPENDS
+          ${${proj}_DEPENDENCIES}
+      )
+
+      set(python_wrapper "astra-python-wrapper")

-    #create a configure script
-    file(WRITE ${${proj}_SOURCE_DIR}/python_build
+      #create a configure script
+      file(WRITE ${${proj}_SOURCE_DIR}/python_build
 "
 #! /bin/bash
 set -ex
@@ -169,11 +162,11 @@
 ")

-endif()
-
-   file(COPY ${${proj}_SOURCE_DIR}/python_build
-	   DESTINATION ${${proj}_BINARY_DIR}/python
-     FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
+    endif()
+
+    file(COPY ${${proj}_SOURCE_DIR}/python_build
+         DESTINATION ${${proj}_BINARY_DIR}/python
+         FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)

     #create an install script
     file(WRITE ${${proj}_SOURCE_DIR}/python_install
@@ -185,57 +178,55 @@

 ")

-   file(COPY ${${proj}_SOURCE_DIR}/python_install
-	   DESTINATION ${${proj}_BINARY_DIR}/python
-     FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
+    file(COPY ${${proj}_SOURCE_DIR}/python_install
+ 	   DESTINATION ${${proj}_BINARY_DIR}/python
+           FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)

     ExternalProject_Add(${python_wrapper}
-      ${${proj}_EP_ARGS}
-      SOURCE_DIR ${${proj}_SOURCE_DIR}
-      BINARY_DIR ${${proj}_BINARY_DIR}
-      DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
-      STAMP_DIR ${${proj}_STAMP_DIR}
-      TMP_DIR ${${proj}_TMP_DIR}
-      INSTALL_DIR ${libastra_Install_Dir}
-      # apparently this is the only way to pass environment variables to
-      # external projects
-      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_build ${${proj}_SOURCE_DIR}/python/ && ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_install ${${proj}_SOURCE_DIR}/python/
-
-      # This build is Unix specific
-      BUILD_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build
-      INSTALL_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_install
-      DEPENDS
-        ${proj}
-    )
-
-    else()
-      # if SETUP_PY one can launch the conda build.sh script setting
-      # the appropriate variables.
-      message(FATAL_ERROR "Only PYTHONPATH install method is currently supported")
-    endif()
-
-
-    set(${proj}_ROOT        ${${proj}_SOURCE_DIR})
-    set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})
-    add_test(NAME ASTRA_BASIC_TEST
-             #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py
-             COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_noCUDA()"
-    WORKING_DIRECTORY ${${proj}_SOURCE_DIR})
-    if (CUDA_FOUND)
-      add_test(NAME ASTRA_BASIC_GPU_TEST
-             #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py
+        ${${proj}_EP_ARGS}
+        SOURCE_DIR ${${proj}_SOURCE_DIR}
+        BINARY_DIR ${${proj}_BINARY_DIR}
+        DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
+        STAMP_DIR ${${proj}_STAMP_DIR}
+        TMP_DIR ${${proj}_TMP_DIR}
+        INSTALL_DIR ${libastra_Install_Dir}
+        # apparently this is the only way to pass environment variables to
+        # external projects
+        CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_build ${${proj}_SOURCE_DIR}/python/ && ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_install ${${proj}_SOURCE_DIR}/python/
+
+        # This build is Unix specific
+        BUILD_COMMAND
+          ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build
+        INSTALL_COMMAND
+          ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_install
+        DEPENDS
+          ${proj}
+      )
+
+  else()
+    # if SETUP_PY one can launch the conda build.sh script setting
+    # the appropriate variables.
+    message(FATAL_ERROR "Only PYTHONPATH install method is currently supported")
+  endif()
+
+
+  set(${proj}_ROOT        ${${proj}_SOURCE_DIR})
+  set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})
+  add_test(NAME ASTRA_BASIC_TEST
+           COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_noCUDA()"
+           WORKING_DIRECTORY ${${proj}_SOURCE_DIR})
+  if (CUDA_FOUND)
+    add_test(NAME ASTRA_BASIC_GPU_TEST
              COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_CUDA()"
              WORKING_DIRECTORY ${${proj}_SOURCE_DIR})
-     endif()
-
-  else()
-    ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}"
+  endif()
+
+else()
+  ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}"
       SOURCE_DIR ${${proj}_SOURCE_DIR}
       BINARY_DIR ${${proj}_BINARY_DIR}
       DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
       STAMP_DIR ${${proj}_STAMP_DIR}
       TMP_DIR ${${proj}_TMP_DIR}
     )
-  endif()
+endif()


CR #130

CR #130

--- Coverage.cmake
+++ Coverage.cmake
@@ -54,8 +54,7 @@
 # the tests that make part of the given targets
 macro(COVERAGE_REPORT)
   if(NOT COVERAGE_LIMITS)
-    # Use the coverage limits corresponding to the BBP Software Metrics
-    # https://bbpteam.epfl.ch/project/spaces/display/REL/Software+Metrics
+    # Tweak coverage limits to yellow 40%/green 80%
     set(COVERAGE_LIMITS --rc genhtml_med_limit=40 --rc genhtml_hi_limit=80)
   endif()
   add_custom_target(lcov-gather
@@ -74,4 +73,4 @@
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
     DEPENDS lcov-remove)
   make_directory(${CMAKE_BINARY_DIR}/doc/html)
-endmacro()+endmacro()


Update CMake Doxygen output location.

Update CMake Doxygen output location.

--- Doxyfile.cmake
+++ Doxyfile.cmake
@@ -38,7 +38,7 @@
 # If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.

-OUTPUT_DIRECTORY       =
+OUTPUT_DIRECTORY       = doxygen

 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output


[cmake] Refactor out cmark related config from swift_common_standalone_build_config to swift_common_standalone_build_config_cmark.

This is apart of a series of patches that separates configuration of
llvm/clang/cmark in swift_common_standalone_build_config. Right now each project
has configuration occurring in a mixed up way. By refactoring it becomes much
easier to read the code.

rdar://26154980

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -12,70 +12,9 @@
   set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
 endif()

-# Common cmake project config for standalone builds.
-#
-# Parameters:
-#   product
-#     The product name, e.g. Swift or SourceKit. Used as prefix for some
-#     cmake variables.
-#
-#   is_cross_compiling
-#     Whether this is cross-compiling host tools.
-macro(swift_common_standalone_build_config product is_cross_compiling)
-  option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
-
-  precondition_translate_flag(${product}_PATH_TO_LLVM_SOURCE PATH_TO_LLVM_SOURCE)
-  precondition_translate_flag(${product}_PATH_TO_LLVM_BUILD PATH_TO_LLVM_BUILD)
-
-  set(SWIFT_LLVM_CMAKE_PATHS
-      "${PATH_TO_LLVM_BUILD}/share/llvm/cmake"
-      "${PATH_TO_LLVM_BUILD}/lib/cmake/llvm")
-
-  # Add all LLVM CMake paths to our cmake module path.
-  foreach(path ${SWIFT_LLVM_CMAKE_PATHS})
-    list(APPEND CMAKE_MODULE_PATH ${path})
-  endforeach()
-
-  # If we already have a cached value for LLVM_ENABLE_ASSERTIONS, save the value.
-  if (DEFINED LLVM_ENABLE_ASSERTIONS)
-    set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
-  endif()
-
-  # Then we import LLVMConfig. This is going to override whatever cached value
-  # we have for LLVM_ENABLE_ASSERTIONS.
-  include(LLVMConfig)
-
-  # If we did not have a cached value for LLVM_ENABLE_ASSERTIONS, set
-  # LLVM_ENABLE_ASSERTIONS_saved to be the ENABLE_ASSERTIONS value from LLVM so
-  # we follow LLVMConfig.cmake's value by default if nothing is provided.
-  if (NOT DEFINED LLVM_ENABLE_ASSERTIONS_saved)
-    set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
-  endif()
-
-  # Then set LLVM_ENABLE_ASSERTIONS with a default value of
-  # LLVM_ENABLE_ASSERTIONS_saved.
-  #
-  # The effect of this is that if LLVM_ENABLE_ASSERTION did not have a cached
-  # value, then LLVM_ENABLE_ASSERTIONS_saved is set to LLVM's value, so we get a
-  # default value from LLVM.
-  set(LLVM_ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS_saved}"
-    CACHE BOOL "Enable assertions")
-  mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
-
-  precondition(LLVM_TOOLS_BINARY_DIR)
-  precondition_translate_flag(LLVM_BUILD_LIBRARY_DIR LLVM_LIBRARY_DIR)
-  precondition_translate_flag(LLVM_BUILD_MAIN_INCLUDE_DIR LLVM_MAIN_INCLUDE_DIR)
-  precondition_translate_flag(LLVM_BUILD_BINARY_DIR LLVM_BINARY_DIR)
-  precondition_translate_flag(LLVM_BUILD_MAIN_SRC_DIR LLVM_MAIN_SRC_DIR)
-
-  # Clang
-  set(${product}_PATH_TO_CLANG_SOURCE "${PATH_TO_LLVM_SOURCE}/tools/clang"
-      CACHE PATH "Path to Clang source code.")
-  set(${product}_PATH_TO_CLANG_BUILD "${PATH_TO_LLVM_BUILD}" CACHE PATH
-    "Path to the directory where Clang was built or installed.")
-
+macro(swift_common_standalone_build_config_cmark product)
   set(${product}_PATH_TO_CMARK_SOURCE "${${product}_PATH_TO_CMARK_SOURCE}"
-      CACHE PATH "Path to CMark source code.")
+    CACHE PATH "Path to CMark source code.")
   set(${product}_PATH_TO_CMARK_BUILD "${${product}_PATH_TO_CMARK_BUILD}"
     CACHE PATH "Path to the directory where CMark was built.")
   set(${product}_CMARK_LIBRARY_DIR "${${product}_CMARK_LIBRARY_DIR}" CACHE PATH
@@ -86,6 +25,73 @@
     ABSOLUTE)
   get_filename_component(CMARK_LIBRARY_DIR "${${product}_CMARK_LIBRARY_DIR}"
     ABSOLUTE)
+  set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src")
+  set(CMARK_BUILD_INCLUDE_DIR "${PATH_TO_CMARK_BUILD}/src")
+  include_directories("${CMARK_MAIN_INCLUDE_DIR}"
+                      "${CMARK_BUILD_INCLUDE_DIR}")
+endmacro()
+
+# Common cmake project config for standalone builds.
+#
+# Parameters:
+#   product
+#     The product name, e.g. Swift or SourceKit. Used as prefix for some
+#     cmake variables.
+#
+#   is_cross_compiling
+#     Whether this is cross-compiling host tools.
+macro(swift_common_standalone_build_config product is_cross_compiling)
+  option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
+
+  precondition_translate_flag(${product}_PATH_TO_LLVM_SOURCE PATH_TO_LLVM_SOURCE)
+  precondition_translate_flag(${product}_PATH_TO_LLVM_BUILD PATH_TO_LLVM_BUILD)
+
+  set(SWIFT_LLVM_CMAKE_PATHS
+      "${PATH_TO_LLVM_BUILD}/share/llvm/cmake"
+      "${PATH_TO_LLVM_BUILD}/lib/cmake/llvm")
+
+  # Add all LLVM CMake paths to our cmake module path.
+  foreach(path ${SWIFT_LLVM_CMAKE_PATHS})
+    list(APPEND CMAKE_MODULE_PATH ${path})
+  endforeach()
+
+  # If we already have a cached value for LLVM_ENABLE_ASSERTIONS, save the value.
+  if (DEFINED LLVM_ENABLE_ASSERTIONS)
+    set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
+  endif()
+
+  # Then we import LLVMConfig. This is going to override whatever cached value
+  # we have for LLVM_ENABLE_ASSERTIONS.
+  include(LLVMConfig)
+
+  # If we did not have a cached value for LLVM_ENABLE_ASSERTIONS, set
+  # LLVM_ENABLE_ASSERTIONS_saved to be the ENABLE_ASSERTIONS value from LLVM so
+  # we follow LLVMConfig.cmake's value by default if nothing is provided.
+  if (NOT DEFINED LLVM_ENABLE_ASSERTIONS_saved)
+    set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
+  endif()
+
+  # Then set LLVM_ENABLE_ASSERTIONS with a default value of
+  # LLVM_ENABLE_ASSERTIONS_saved.
+  #
+  # The effect of this is that if LLVM_ENABLE_ASSERTION did not have a cached
+  # value, then LLVM_ENABLE_ASSERTIONS_saved is set to LLVM's value, so we get a
+  # default value from LLVM.
+  set(LLVM_ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS_saved}"
+    CACHE BOOL "Enable assertions")
+  mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
+
+  precondition(LLVM_TOOLS_BINARY_DIR)
+  precondition_translate_flag(LLVM_BUILD_LIBRARY_DIR LLVM_LIBRARY_DIR)
+  precondition_translate_flag(LLVM_BUILD_MAIN_INCLUDE_DIR LLVM_MAIN_INCLUDE_DIR)
+  precondition_translate_flag(LLVM_BUILD_BINARY_DIR LLVM_BINARY_DIR)
+  precondition_translate_flag(LLVM_BUILD_MAIN_SRC_DIR LLVM_MAIN_SRC_DIR)
+
+  # Clang
+  set(${product}_PATH_TO_CLANG_SOURCE "${PATH_TO_LLVM_SOURCE}/tools/clang"
+      CACHE PATH "Path to Clang source code.")
+  set(${product}_PATH_TO_CLANG_BUILD "${PATH_TO_LLVM_BUILD}" CACHE PATH
+    "Path to the directory where Clang was built or installed.")

   if(NOT EXISTS "${${product}_PATH_TO_CLANG_SOURCE}/include/clang/AST/Decl.h")
     message(FATAL_ERROR "Please set ${product}_PATH_TO_CLANG_SOURCE to the root directory of Clang's source code.")
@@ -133,16 +139,12 @@
     "Version number that will be placed into the libclang library , in the form XX.YY")

   set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
-  set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src")
-  set(CMARK_BUILD_INCLUDE_DIR "${PATH_TO_CMARK_BUILD}/src")

   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${PATH_TO_LLVM_BUILD}/include"
                       "${LLVM_MAIN_INCLUDE_DIR}"
                       "${CLANG_BUILD_INCLUDE_DIR}"
-                      "${CLANG_MAIN_INCLUDE_DIR}"
-                      "${CMARK_MAIN_INCLUDE_DIR}"
-                      "${CMARK_BUILD_INCLUDE_DIR}")
+                      "${CLANG_MAIN_INCLUDE_DIR}")
   foreach (INCLUDE_DIR ${LLVM_INCLUDE_DIRS})
     include_directories(${INCLUDE_DIR})
   endforeach ()
@@ -168,6 +170,8 @@
   if (LLVM_ENABLE_DOXYGEN)
     find_package(Doxygen REQUIRED)
   endif()
+
+  swift_common_standalone_build_config_cmark(${product})
 endmacro()

 # Common cmake project config for unified builds.


Some modification for Windows

Some modification for Windows

--- cmake/CheckEnvironment.cmake
+++ cmake/CheckEnvironment.cmake
@@ -11,13 +11,13 @@
 	endif()

 	# Check for DirectX SDK (for VTK)
-	if ( NOT EXISTS "C:/Program Files (x86)/Microsoft DirectX SDK*" AND
-		 NOT EXISTS "C:/Program Files/Microsoft DirectX SDK*")
+	file(GLOB DIRECTX_SDK "C:/Program Files*/Microsoft DirectX SDK*")
+	if ( NOT DIRECTX_SDK)
 		message( SEND_ERROR "You need to install Microsoft DirectX SDK : http://www.microsoft.com/en-us/download/details.aspx?id=6812" )
 	endif()

 	# GitBash
-	find_program(BASH_BIN NAMES bash bash.exe)
+	find_program(BASH_BIN NAMES bash)
 	if (NOT BASH_BIN)
 		message( SEND_ERROR "You need to install GitBash and add it to the PATH environment variable." )
 	endif()
@@ -26,31 +26,32 @@
 endif()

 # Git
-find_program(GIT_BIN NAMES git git.exe)
+find_program(GIT_BIN NAMES git)
 if (NOT GIT_BIN)
 	message( SEND_ERROR "You need to install Git and add it to the PATH environment variable." )
 endif()

 # Subversion
-find_program(SVN_BIN NAMES svn svn.exe)
+find_program(SVN_BIN NAMES svn)
 if (NOT SVN_BIN)
 	message( SEND_ERROR "You need to install Subversion and add it to the PATH environment variable." )
 endif()

 # Python
-find_program(PYTHON_BIN NAMES python python.exe)
+find_program(PYTHON_BIN NAMES python)
 if (NOT PYTHON_BIN)
-	message( SEND_ERROR "You need to install Python and add it to the PATH environment variable." )
+	message( SEND_WARNING "You need to install Python and add it to the PATH environment variable if you want to be able to generate packages." )
 endif()

 # Perl
-find_program(PERL_BIN NAMES perl perl.exe)
+find_program(PERL_BIN NAMES perl)
 if (NOT PERL_BIN)
-	message( SEND_ERROR "You need to install Perl and add it to the PATH environment variable." )
+	message( SEND_WARNING "You need to install Perl and add it to the PATH environment variable if you want to be able to generate packages." )
 endif()

 # Add github.com's SSH signature to the .ssh/known_hosts file
 set(GITHUB_SIGN "github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==")
+file(TO_CMAKE_PATH ${HOME_PATH} HOME_PATH)
 set(SSH_KNOWN_HOSTS_PATH ${HOME_PATH}/.ssh/known_hosts)
 file(STRINGS ${SSH_KNOWN_HOSTS_PATH} KNOWN_HOSTS REGEX github\\.com)
 list(LENGTH KNOWN_HOSTS N)


add a dependency on terminfo library if llvm uses it

Ncurses related symbols can either all be found in libnurses or split
between libncurses and libtinfo. The main LLVM cmake scripts look for the
setupterm symbol and stores the library that has it in TERMINFO_LIBS. This
covers the split and unified ncurses case. LLDB uses symbols that can end
up in libtinfo so this library should be pulled in if it is found.

There is still an exotic case left where LLDB is configured with
-DLLDB_DISABLE_CURSES=NO and LLVM with -DLLVM_ENABLE_TERMINFO=NO but
misconfigurations will always be possible. Possibly a diagnostic could be
added for that.

This fixes bug 24693.

Differential Revision: http://reviews.llvm.org/D12672
Patch by Jeremi Piotrowski

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@247842 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -141,6 +141,9 @@
   endif()
   if (NOT LLDB_DISABLE_CURSES)
     list(APPEND LLDB_SYSTEM_LIBS panel ncurses)
+    if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
+      list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
+    endif()
   endif()
 endif()
 # On FreeBSD backtrace() is provided by libexecinfo, not libc.


Added missing license to FindXGen.cmake

Added missing license to FindXGen.cmake

--- cmake/Modules/FindXGen.cmake
+++ cmake/Modules/FindXGen.cmake
@@ -1,5 +1,32 @@
-# Copyright (c) 2016 Esteban Tovagliari
-# Copyright (c) 2016 Luis Barrancos
+
+#
+# This source file is part of appleseed.
+# Visit http://appleseedhq.net/ for additional information and resources.
+#
+# This software is released under the MIT license.
+#
+# Copyright (c) 2016 Esteban Tovagliari, The appleseedhq Organization
+# Copyright (c) 2016 Luis Barrancos, The appleseedhq Organization
+#
+# 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.
+#
+

 # Find XGen headers and libraries.
 #
@@ -103,4 +130,3 @@
 endif()

 mark_as_advanced(XGEN_LIBRARY XGEN_INCLUDE_DIR)
-


build: inline some variables in `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -880,19 +880,13 @@
       list(APPEND library_search_directories "$ENV{SDKROOT}/usr/lib/swift")
   endif()

-  # Add variant-specific flags.
-  set(build_type "${CMAKE_BUILD_TYPE}")
-  set(enable_assertions "${LLVM_ENABLE_ASSERTIONS}")
-  set(analyze_code_coverage "${SWIFT_ANALYZE_CODE_COVERAGE}")
-  set(lto_type "${SWIFT_TOOLS_ENABLE_LTO}")
-
   _add_variant_c_compile_flags(
     SDK "${SWIFTLIB_SINGLE_SDK}"
     ARCH "${SWIFTLIB_SINGLE_ARCHITECTURE}"
-    BUILD_TYPE "${build_type}"
-    ENABLE_ASSERTIONS "${enable_assertions}"
-    ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
-    ENABLE_LTO "${lto_type}"
+    BUILD_TYPE ${CMAKE_BUILD_TYPE}
+    ENABLE_ASSERTIONS ${LLVM_ENABLE_ASSERTIONS}
+    ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
+    ENABLE_LTO ${SWIFT_TOOLS_ENABLE_LTO}
     RESULT_VAR_NAME c_compile_flags
     )

@@ -904,10 +898,10 @@
   _add_variant_link_flags(
     SDK "${SWIFTLIB_SINGLE_SDK}"
     ARCH "${SWIFTLIB_SINGLE_ARCHITECTURE}"
-    BUILD_TYPE "${build_type}"
-    ENABLE_ASSERTIONS "${enable_assertions}"
-    ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
-    ENABLE_LTO "${lto_type}"
+    BUILD_TYPE ${CMAKE_BUILD_TYPE}
+    ENABLE_ASSERTIONS ${LLVM_ENABLE_ASSERTIONS}
+    ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
+    ENABLE_LTO ${SWIFT_TOOLS_ENABLE_LTO}
     LTO_OBJECT_NAME "${target}-${SWIFTLIB_SINGLE_SDK}-${SWIFTLIB_SINGLE_ARCHITECTURE}"
     RESULT_VAR_NAME link_flags
     LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories


(temporary fix) disabled collada support to make OSX build work

NOTE: enable OMEGA_OSG_ENABLE_COLLADA_DOM in cmake gui or script to re-enable collada support in omegaOsg and omegaOsgEarth

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -1,4 +1,4 @@
-set(OMEGA_OSG_ENABLE_COLLADA_DOM true CACHE BOOL "")
+set(OMEGA_OSG_ENABLE_COLLADA_DOM false CACHE BOOL "")

 set(OSGEARTH_ARGS
 	 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}


[Build System: CMake] Cleanup the install_name_dir special-casing for XCTest in add_swift_target_library.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1026,14 +1026,12 @@
     endforeach()
   endif()

-  if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
+  if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
     set(install_name_dir "@rpath")

-    if(SWIFTLIB_SINGLE_IS_STDLIB)
-      # Always use @rpath for XCTest.
-      if(NOT "${module_name}" STREQUAL "XCTest")
-        set(install_name_dir "${SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR}")
-      endif()
+    # Always use @rpath for XCTest
+    if(module_name STREQUAL "XCTest")
+      set(install_name_dir "@rpath")
     endif()

     set_target_properties("${target}"


cmake: Updated FindNode cmake module

cmake: Updated FindNode cmake module

Signed-off-by: Henry Bruce <57ea958cad66de244404958c9a01f7a4ad51b29e@intel.com>

--- cmake/modules/FindNode.cmake
+++ cmake/modules/FindNode.cmake
@@ -1,4 +1,12 @@
-find_program (NODE_EXECUTABLE NAMES node
+ # Macro to add directory to NODE_INCLUDE_DIRS if it exists and is not /usr/include
+ macro(add_include_dir dir)
+    if (IS_DIRECTORY ${dir})
+      set(NODE_INCLUDE_DIRS ${NODE_INCLUDE_DIRS} ${dir})
+    endif()
+endmacro()
+
+
+find_program (NODE_EXECUTABLE NAMES node nodejs
     HINTS
     $ENV{NODE_DIR}
     PATH_SUFFIXES bin
@@ -7,17 +15,41 @@

 include (FindPackageHandleStandardArgs)

+# If compat-libuv package exists, it must be at start of include path
+find_path (UV_ROOT_DIR "uv.h" PATHS /usr/include/compat-libuv010 NO_DEFAULT_PATH)
+if (UV_ROOT_DIR)
+  # set (NODE_INCLUDE_DIRS ${UV_ROOT_DIR})
+  add_include_dir(${UV_ROOT_DIR})
+endif()
+
+# Now look for node. Flag an error if not found
 find_path (NODE_ROOT_DIR "node/node.h" "src/node.h"
-  PATHS /usr/include/nodejs /usr/local/include/nodejs)
+  PATHS /usr/include/nodejs /usr/local/include/nodejs /usr/local/include)
+if (NODE_ROOT_DIR)
+  add_include_dir(${NODE_ROOT_DIR}/src)
+  add_include_dir(${NODE_ROOT_DIR}/node)
+  add_include_dir(${NODE_ROOT_DIR}/deps/v8/include)
+  add_include_dir(${NODE_ROOT_DIR}/deps/uv/include)
+else()
+  unset(NODE_INCLUDE_DIRS)
+  message(ERROR " - node.h not found")
+endif()

-set (NODE_INCLUDE_DIRS
-  ${NODE_ROOT_DIR}/src
-  ${NODE_ROOT_DIR}/node
-  ${NODE_ROOT_DIR}/deps/v8/include
-  ${NODE_ROOT_DIR}/deps/uv/include
-)
+# Check that v8.h is in NODE_INCLUDE_DIRS
+find_path (V8_ROOT_DIR "v8.h" PATHS ${NODE_INCLUDE_DIRS})
+if (NOT V8_ROOT_DIR)
+  unset(NODE_INCLUDE_DIRS)
+  message(ERROR " - v8.h not found")
+endif()

-find_package_handle_standard_args (Node DEFAULT_MSG
+# Check that uv.h is in NODE_INCLUDE_DIRS
+find_path (UV_ROOT_DIR "uv.h" PATHS ${NODE_INCLUDE_DIRS})
+if (NOT UV_ROOT_DIR)
+  unset(NODE_INCLUDE_DIRS)
+  message(ERROR " - uv.h not found")
+endif()
+
+find_package_handle_standard_args (Nodejs DEFAULT_MSG
     NODE_EXECUTABLE
     NODE_INCLUDE_DIRS
 )
@@ -37,8 +69,6 @@
         list (GET _VERSION_LIST 2 NODE_VERSION_PATCH)
         set (V8_VERSION_STRING ${_V8_VERSION})
         string (REPLACE "." ";" _V8_VERSION_LIST "${_V8_VERSION}")
-        string (REPLACE "." "" V8_DEFINE_STRING "${_V8_VERSION}")
-        string (STRIP ${V8_DEFINE_STRING} V8_DEFINE_STRING)
         list (GET _V8_VERSION_LIST 0 V8_VERSION_MAJOR)
         list (GET _V8_VERSION_LIST 1 V8_VERSION_MINOR)
         list (GET _V8_VERSION_LIST 2 V8_VERSION_PATCH)
@@ -50,12 +80,16 @@
         set (NODE_VERSION_MINOR "10")
         set (NODE_VERSION_PATCH "30")
         set (V8_VERSION_MAJOR "3")
-        set (V8_VERSION_MINOR "28")
-        set (V8_VERSION_PATCH "72")
+        set (V8_VERSION_MINOR"14")
+        set (V8_VERSION_PATCH "5")
         set (V8_VERSION_STRING "3.28.72")
         message ("defaulted to node 0.10.30")
     endif ()
-    message ("INFO - Node version is " ${NODE_VERSION_STRING} "INFO - Node using v8 " ${V8_VERSION_STRING})
+    string (REGEX REPLACE "\n" "" NODE_VERSION_STRING ${NODE_VERSION_STRING})
+    string (REGEX REPLACE "\n" "" V8_VERSION_STRING ${V8_VERSION_STRING})
+    message ("INFO - Node version is " ${NODE_VERSION_STRING})
+    message ("INFO - Node using v8 " ${V8_VERSION_STRING})
+    mark_as_advanced (NODE_EXECUTABLE)
 endif ()

-mark_as_advanced (NODE_EXECUTABLE)
+


CMake: Don't install llvm-tblgen twice

CMake: Don't install llvm-tblgen twice

Summary:
The add_tablegen macros defines its own install target, and it was also calling
add_llvm_utility which adds another install target.

Configuring with -DLLVM_TOOLS_INSTALL_DIR set to something other than
'bin' along with -DLLVM_INSTALL_UTILS=ON was causing llvm-tablgen
to be installed to two separate directories.

Reviewers: beanz, hans

Reviewed By: beanz

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D30656

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -99,7 +99,7 @@
     set(LLVM_ENABLE_OBJLIB ON)
   endif()

-  add_llvm_utility(${target} ${ARGN})
+  add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
   set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS})

   set(${project}_TABLEGEN "${target}" CACHE


Fixing a serial cmake typo

Fixing a serial cmake typo

--- cmake/segwayrmp_serial.cmake
+++ cmake/segwayrmp_serial.cmake
@@ -5,7 +5,7 @@
     message("-- Building with serial support")
     include_directories(serial_INCLUDE_DIRS)
     list(APPEND SEGWAYRMP_SRCS src/impl/rmp_serial.cc)
-    list(APPEND SEGWAYRMP_LINK_LIBS ${serial_INCLUDE_DIRS})
+    list(APPEND SEGWAYRMP_LINK_LIBS ${serial_LIBRARIES})
     add_definitions(-DSEGWAYRMP_USE_SERIAL)
   else(serial_FOUND)
     message("--")


conda: fix conda build failure because CMAKE_SYSTEM_PROCESSOR is not defined

--- cMake/FreeCAD_Helpers/SetGlobalCompilerAndLinkerSettings.cmake
+++ cMake/FreeCAD_Helpers/SetGlobalCompilerAndLinkerSettings.cmake
@@ -14,7 +14,7 @@
     endif(CMAKE_SIZEOF_VOID_P EQUAL 8)

     # check for mips64 platform
-    if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips64")
+    if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "mips64")
         message(STATUS "Architecture: mips64")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mxgot")
     endif()


Fix CXX_STANDARD

Fix CXX_STANDARD

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -19,7 +19,7 @@

 set(DEFAULT_PROJECT_OPTIONS
     DEBUG_POSTFIX             "d"
-    CXX_STANDARD              11
+    CXX_STANDARD              14
     LINKER_LANGUAGE           "CXX"
     POSITION_INDEPENDENT_CODE ON
     CXX_VISIBILITY_PRESET     "hidden"


cmake: add download helper scripts

cmake: add download helper scripts

--- cmake/OpenCVDownload.cmake
+++ cmake/OpenCVDownload.cmake
@@ -20,16 +20,19 @@
 endif()
 set(OPENCV_DOWNLOAD_PATH "${OpenCV_SOURCE_DIR}/.cache" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}")
 set(OPENCV_DOWNLOAD_LOG "${OpenCV_BINARY_DIR}/CMakeDownloadLog.txt")
-
-# Init download cache directory and log file
+set(OPENCV_DOWNLOAD_WITH_CURL "${OpenCV_BINARY_DIR}/download_with_curl.sh")
+set(OPENCV_DOWNLOAD_WITH_WGET "${OpenCV_BINARY_DIR}/download_with_wget.sh")
+
+# Init download cache directory and log file and helper scripts
 if(NOT EXISTS "${OPENCV_DOWNLOAD_PATH}")
   file(MAKE_DIRECTORY ${OPENCV_DOWNLOAD_PATH})
 endif()
 if(NOT EXISTS "${OPENCV_DOWNLOAD_PATH}/.gitignore")
   file(WRITE "${OPENCV_DOWNLOAD_PATH}/.gitignore" "*\n")
 endif()
-file(WRITE "${OPENCV_DOWNLOAD_LOG}" "use_cache \"${OPENCV_DOWNLOAD_PATH}\"\n")
-
+file(WRITE "${OPENCV_DOWNLOAD_LOG}" "#use_cache \"${OPENCV_DOWNLOAD_PATH}\"\n")
+file(REMOVE "${OPENCV_DOWNLOAD_WITH_CURL}")
+file(REMOVE "${OPENCV_DOWNLOAD_WITH_WGET}")

 function(ocv_download)
   cmake_parse_arguments(DL "UNPACK;RELATIVE_URL" "FILENAME;HASH;DESTINATION_DIR;ID;STATUS" "URL" ${ARGN})
@@ -103,7 +106,7 @@
   endif()

   # Log all calls to file
-  ocv_download_log("do_${mode} \"${DL_FILENAME}\" \"${DL_HASH}\" \"${DL_URL}\" \"${DL_DESTINATION_DIR}\"")
+  ocv_download_log("#do_${mode} \"${DL_FILENAME}\" \"${DL_HASH}\" \"${DL_URL}\" \"${DL_DESTINATION_DIR}\"")
   # ... and to console
   set(__msg_prefix "")
   if(DL_ID)
@@ -191,6 +194,9 @@
 For details please refer to the download log file:
 ${OPENCV_DOWNLOAD_LOG}
 ")
+      # write helper scripts for failed downloads
+      file(APPEND "${OPENCV_DOWNLOAD_WITH_CURL}" "curl --output \"${CACHE_CANDIDATE}\" \"${DL_URL}\"\n")
+      file(APPEND "${OPENCV_DOWNLOAD_WITH_WGET}" "wget -O \"${CACHE_CANDIDATE}\" \"${DL_URL}\"\n")
       return()
     endif()


[cmake] SiconosVersion: 4.2.0

[cmake] SiconosVersion: 4.2.0

--- cmake/SiconosVersion.cmake
+++ cmake/SiconosVersion.cmake
@@ -1,7 +1,7 @@
 # --- set siconos current version ---
 # This file is also required for examples.
 set(MAJOR_VERSION 4)
-set(MINOR_VERSION 1)
+set(MINOR_VERSION 2)
 set(PATCH_VERSION 0)
 set(SICONOS_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")


Fixed compatibility with TensorFlow

Fixed compatibility with TensorFlow

--- cmake/TaichiCXXFlags.cmake
+++ cmake/TaichiCXXFlags.cmake
@@ -56,6 +56,11 @@
     message("Using float64 precision")
 endif()

+if ($ENV{TC_WITH_TF})
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
+    message("Using -D_GLIBCXX_USE_CXX11_ABI=0")
+endif()
+
 if (TC_USE_MPI)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTC_USE_MPI")
     message("Using MPI")


Added informational message when zlib build is requested.

--- cmake/ThirdPartyZlib.cmake
+++ cmake/ThirdPartyZlib.cmake
@@ -27,6 +27,7 @@

 # If we or the user
 IF (THIRDPARTY_BUILD_ZLIB)
+    MESSAGE(STATUS "Will build Zlib 1.2.7")
     # Build the Zlib library separately
     EXTERNALPROJECT_ADD(
         zlib-1.2.7


boost (#12929)

boost (#12929)

* "fix ci"

* "windows tab"

* "fix ci"

--- cmake/external/boost.cmake
+++ cmake/external/boost.cmake
@@ -28,7 +28,12 @@
     set(BOOST_TAR "boost_1_41_0" CACHE STRING "" FORCE)
     set(BOOST_URL "http://paddlepaddledeps.cdn.bcebos.com/${BOOST_TAR}.tar.gz" CACHE STRING "" FORCE)
 endif()
-MESSAGE(STATUS "BOOST_TAR: ${BOOST_TAR}, BOOST_URL: ${BOOST_URL}")
+IF (WIN32)
+    MESSAGE(WARNING, "In windows, boost can not be downloaded automaticlly, please build it manually and put it at " ${THIRD_PARTY_PATH}install/boost)
+else()
+    MESSAGE(STATUS "BOOST_TAR: ${BOOST_TAR}, BOOST_URL: ${BOOST_URL}")
+ENDIF(WIN32)
+
 set(BOOST_SOURCES_DIR ${THIRD_PARTY_PATH}/boost)
 set(BOOST_DOWNLOAD_DIR  "${BOOST_SOURCES_DIR}/src/${BOOST_PROJECT}")
 set(BOOST_INCLUDE_DIR "${BOOST_DOWNLOAD_DIR}/${BOOST_TAR}" CACHE PATH "boost include directory." FORCE)
@@ -36,12 +41,13 @@

 include_directories(${BOOST_INCLUDE_DIR})

+if (NOT WIN32)
 ExternalProject_Add(
     ${BOOST_PROJECT}
     ${EXTERNAL_PROJECT_LOG_ARGS}
     DOWNLOAD_DIR          ${BOOST_DOWNLOAD_DIR}
     DOWNLOAD_COMMAND      wget --no-check-certificate ${BOOST_URL} -c -q -O ${BOOST_TAR}.tar.gz
-                          && tar zxf ${BOOST_TAR}.tar.gz
+    && tar zxf ${BOOST_TAR}.tar.gz
     DOWNLOAD_NO_PROGRESS  1
     PREFIX                ${BOOST_SOURCES_DIR}
     CONFIGURE_COMMAND     ""
@@ -49,8 +55,9 @@
     INSTALL_COMMAND       ""
     UPDATE_COMMAND        ""
 )
+endif(NOT WIN32)

-if (${CMAKE_VERSION} VERSION_LESS "3.3.0")
+if (${CMAKE_VERSION} VERSION_LESS "3.3.0" OR NOT WIN32)
     set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/boost_dummy.c)
     file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";")
     add_library(boost STATIC ${dummyfile})


Fix workaround path.

Fix workaround path.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -216,9 +216,9 @@
       endif()

       # Also copy the built files into OPENSSL_ROOT_DIR to handle misconfigured
-      # subprojects (which expect the lib*.a file pattern).
-      file(INSTALL "${OPENSSL_CRYPTO_LIBRARY}" DESTINATION "${OPENSSL_ROOT_DIR}/libcrypto.a")
-      file(INSTALL "${OPENSSL_SSL_LIBRARY}" DESTINATION "${OPENSSL_ROOT_DIR}/libssl.a")
+      # subprojects.
+      file(INSTALL "${OPENSSL_CRYPTO_LIBRARY}" DESTINATION "${OPENSSL_ROOT_DIR}")
+      file(INSTALL "${OPENSSL_SSL_LIBRARY}" DESTINATION "${OPENSSL_ROOT_DIR}")
     else()
       message("Skipping BoringSSL build during configure step, libraries already exist.")
     endif()


Reinstate Werner's change whose original commit message was

"It's now possible to set LIB_TAG at the cmake configuration stage to insert
a tag after the library name and before the "d" (for double)."

svn path=/trunk/; revision=8244

--- cmake/modules/double.cmake
+++ cmake/modules/double.cmake
@@ -26,6 +26,6 @@
 "Compile the library with double precision floating point" ON)

 if(PL_DOUBLE)
-  set(LIB_TAG "d")
+  set(LIB_TAG "${LIB_TAG}d")
 endif(PL_DOUBLE)


Fix RPATHS for area-native and area libs on Linux.

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -236,8 +236,8 @@
     if(WIN32)
         set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d)
     else(WIN32)
-        # FreeCADBase, SMDS, Driver, MEFISTO2 and area libs don't depend on parts from CMAKE_INSTALL_LIBDIR
-        if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area)$")
+        # FreeCADBase, SMDS, Driver, MEFISTO2 and area-native libs don't depend on parts from CMAKE_INSTALL_LIBDIR
+        if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area-native)$")
             if(${ARGC} STREQUAL 4)
                 set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
             else(${ARGC} STREQUAL 4)


cmake: remove unreachable Zephyr-SDK lookup code

Removing Zephyr-SDK code for searching and printing messages when Zephyr
SDK is not found in the system.

After Zephyr SDK has been made available on all platforms, including
MacOS and Windows, then `find_package(Zephyr-sdk)` is always invoked
and thus either `find_package(Zephyr-sdk)` will fail or
ZEPHYR_TOOLCHAIN_VARIANT will be defined.

Meaning the removed code block in this commit can no longer be reached.

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

--- cmake/modules/verify-toolchain.cmake
+++ cmake/modules/verify-toolchain.cmake
@@ -95,36 +95,6 @@
   SET(CMAKE_FIND_PACKAGE_SORT_ORDER ${CMAKE_FIND_PACKAGE_SORT_ORDER_CURRENT})
 endif()

-if(NOT DEFINED ZEPHYR_TOOLCHAIN_VARIANT)
-  if (NOT Zephyr-sdk_CONSIDERED_VERSIONS)
-    set(error_msg "ZEPHYR_TOOLCHAIN_VARIANT not specified and no Zephyr SDK is installed.\n")
-    string(APPEND error_msg "Please set ZEPHYR_TOOLCHAIN_VARIANT to the toolchain to use or install the Zephyr SDK.")
-  else()
-    #  Note: When CMake minimum version becomes >= 3.17, change this loop into:
-    #    foreach(version config IN ZIP_LISTS Zephyr-sdk_CONSIDERED_VERSIONS Zephyr-sdk_CONSIDERED_CONFIGS)
-    set(error_msg "The Zephyr SDK version you are using is not supported, please update your SDK.\n")
-    set(missing_version "You need SDK version ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} or newer.")
-    foreach (version ${Zephyr-sdk_CONSIDERED_VERSIONS})
-      if(${version} VERSION_GREATER ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION})
-        set(missing_version "You need SDK version ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} or compatible version.")
-      endif()
-      list(GET Zephyr-sdk_CONSIDERED_CONFIGS 0 zephyr-sdk-candidate)
-      list(REMOVE_AT Zephyr-sdk_CONSIDERED_CONFIGS 0)
-      get_filename_component(zephyr-sdk-path ${zephyr-sdk-candidate}/../.. ABSOLUTE)
-      string(APPEND version_path "  ${version} (${zephyr-sdk-path})")
-    endforeach()
-    string(APPEND error_msg "${missing_version}")
-    string(APPEND error_msg "You have version(s):")
-    string(APPEND error_msg "${version_path}")
-  endif()
-
-  message(FATAL_ERROR "${error_msg}
-The Zephyr SDK can be downloaded from:
-https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION}
-")
-
-endif()
-
 if(DEFINED ZEPHYR_SDK_INSTALL_DIR)
   # Cache the Zephyr SDK install dir.
   set(ZEPHYR_SDK_INSTALL_DIR ${ZEPHYR_SDK_INSTALL_DIR} CACHE PATH "Zephyr SDK install directory")


Using accepted pull request

Using accepted pull request

--- cmake/projects/Protobuf/hunter.cmake
+++ cmake/projects/Protobuf/hunter.cmake
@@ -12,9 +12,9 @@
   VERSION
   "3.0.0"
   URL
-  "https://github.com/fwinnen/protobuf/archive/v3.0.0-hunter-2.tar.gz"
+  "https://github.com/hunter-packages/protobuf/archive/v3.0.0-hunter-2.tar.gz"
   SHA1
-  c03e1549e43617f06a4d2021e7e88720e332bf40
+  6fb368b171aa10f612d777f079d6896f37b85c55
 )

 hunter_add_version(


Fix unstable downstream build issues (#1586)

Co-authored-by: mergify[bot] <b09a6ee808b67e98a221404e7aaa52e0398a4954@users.noreply.github.com>

--- cmake/third_party/llvm-project.cmake
+++ cmake/third_party/llvm-project.cmake
@@ -1,6 +1,7 @@
+set(BUILD_SHARED_LIBS OFF)
 set(LLVM_APPEND_VC_REV OFF CACHE BOOL "" FORCE)
 set(LLVM_ENABLE_IDE OFF CACHE BOOL "" FORCE)
-set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "" FORCE)
+set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" FORCE)
 set(LLVM_ENABLE_BINDINGS OFF CACHE BOOL "" FORCE)
 set(LLVM_ENABLE_PROJECTS "mlir;openmp" CACHE STRING "" FORCE)
 set(LLVM_ENABLE_RTTI ON CACHE BOOL "" FORCE)


Silence redundant Intel compiler warning

Turn off warning about unused template parameter, when the
parameter is used for SFINAE tests inside the template
parameter list in the json library.

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -12,3 +12,11 @@

     set(CXXOPT_WALL "${CXXOPT_WALL} -Wno-missing-braces")
 endif()
+
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
+    # Disable warning for unused template parameter
+    # this is raised by a templated function in the json library
+
+    set(CXXOPT_WALL "${CXXOPT_WALL} -wd488")
+endif()
+


Fix compilation in case of no pkg-config

--- cmake/Modules/FindZNC.cmake
+++ cmake/Modules/FindZNC.cmake
@@ -32,7 +32,7 @@
 	endif()

 	if(NOT ZNC_PKG_CFLAGS_OTHER)
-		set(ZNC_PKG_CFLAGS_OTHER "-Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -pthread -fvisibility=hidden -fPIC -include znc/zncconfig.h")
+		set(ZNC_PKG_CFLAGS_OTHER -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -pthread -fvisibility=hidden -fPIC -include znc/zncconfig.h)
 	endif()

 	set(ZNC_DEFINITIONS ${ZNC_PKG_CFLAGS_OTHER} CACHE STRING "ZNC module compile options")


Add export documentation

Add export documentation

--- cmake/includes/Export.cmake
+++ cmake/includes/Export.cmake
@@ -1,5 +1,26 @@
 include(CMakeParseArguments)

+###############################################################################
+# Function to install a projects contents, export its artifacts to be used by
+# other downstream CMake projects.
+#
+# Listed contents are installed to CMAKE_INSTALL_PREFIX/{lib|bin|include}
+# Generated <name>Config.cmake installed to CMAKE_PREFIX_PATH/lib/cmake
+#
+# Usage:
+# function(NAME VERSION INCLUDES LIBS ARCHIVES BINS)
+# NAME: single string value indicating the project name, should match the value
+#       given to the project() command in the CMakeLists.txt
+# VERSION: single string value in x.y.z format
+# INCLUDES: list of absolute paths to include directories
+# LIBS: list of target names, same values as the target named in
+#       add_library(name SHARED)
+# ARCHIVES: list of target names, same values as the target named in
+#       add_library(name STATIC)
+# BINS: list of target names, same values as the target named in
+#       add_executable
+#
+###############################################################################
 function(export_project)
     set(options )
     set(oneValueArgs NAME VERSION)


CMake's current behaviour on Windows systems is that all possible
drive letters are searched for PATHS values (e.g., /usr/bin) which do
not have a drive letter specified.  The result is that with /usr/bin
in the PATHS variable, the LUA_EXECUTABLE was found corresponding to
z:/usr/bin/lua, where z: happens to be the drive letter containing a
mount of the Linux OS files on a Windows system.  This unexpected
result for find, happened, for example, on Wine (which does mount all
Linux files on z:).

To work around this issue, remove all specific PATHS values when
searching for lua.  The result is that lua will only be found
(both on Unix and Windows) if it is in the PATH, which is generally
the desired result.

svn path=/trunk/; revision=12598

--- cmake/modules/FindLua.cmake
+++ cmake/modules/FindLua.cmake
@@ -73,19 +73,9 @@
 #
 #  * Kitware, Inc.

+# No PATHS or anything else to make sure to not find Linux version
+# on Wine.
 find_program(LUA_EXECUTABLE lua
-  HINTS
-  $ENV{LUA_DIR}
-  PATH_SUFFIXES bin
-  PATHS
-  ~/Library/Frameworks
-  /Library/Frameworks
-  /usr/local
-  /usr
-  /sw # Fink
-  /opt/local # DarwinPorts
-  /opt/csw # Blastwave
-  /opt
   )

 if(LUA_EXECUTABLE)


adds program_options build to boost

adds program_options build to boost

--- boost.cmake
+++ boost.cmake
@@ -34,7 +34,7 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ./bootstrap.sh
-        --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread
+        --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options
         --with-python=${PYTHON_EXE}
         --prefix=${BUILDEM_DIR}
         LDFLAGS=${BUILDEM_LDFLAGS}


updates

updates

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -234,7 +234,7 @@
     #SET(CPACK_RPM_CHANGELOG_FILE "") # ChangeLog of the RPM; also CHANGELOG.md is not in the required format
     SET(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
     SET(CPACK_RPM_PACKAGE_URL http://embree.github.io/)
-    SET(CPACK_RPM_DEFAULT_DIR_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+    SET(CPACK_RPM_DEFAULT_DIR_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # otherwise cmake directory has wrong 775 permissions

     # post install and uninstall scripts
     SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -5,6 +5,7 @@
 Comment[da]=Brugerflade til brugertilpasset kontokonfiguration til konti der bruger forbindelseshåndteringen sipe.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
 Comment[fi]=Sipe-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
+Comment[hu]=Egyedi beállítófelület a sipe kapcsolatkezelőt használó azonosítókhoz.
 Comment[ia]=Interfacie de usator pro configuration de conto personalisate pro contos usante le gerente de connexion Sipe.
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Sipe.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
@@ -26,6 +27,7 @@
 Name[da]=Brugerflade til konfiguration af sipe-konto
 Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen
 Name[fi]=Sipe-tilinmäärityksen käyttöliittymä
+Name[hu]=Sipe azonosítóbeállító felület
 Name[ia]=Interfacie de usator de configuration de conto de Sipe
 Name[it]=Interfaccia utente di configurazione account Sipe
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie


Build: Fix compilation with GCC on macOS

Before this change building Elektra would fail with the error message:

> ld: unknown option: --as-needed

.

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -106,7 +106,7 @@
 		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer")
 	endif ()

-	if (CMAKE_COMPILER_IS_GNUCXX)
+	if (CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
 		set (CMAKE_SHARED_LINKER_FLAGS "-fsanitize=address ${CMAKE_SHARED_LINKER_FLAGS}")
 		# this is needed because of wrong pthread detection https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69443
 		find_package(Threads)


testing locating nvidia opencl.so

testing locating nvidia opencl.so

--- cmake/FindOpenCLCustom.cmake
+++ cmake/FindOpenCLCustom.cmake
@@ -117,16 +117,21 @@
 		"/usr/local/cuda"
 		"/opt/AMDAPP"
       PATH_SUFFIXES
+		nvidia
         "AMD APP/lib/x86_64"
-        lib/x86_64
-        lib/x64
-		lib64
-		lib
         OpenCL/common/lib/x64)
   endif()
 else()
-  find_library(OpenCL_LIBRARY
-    NAMES OpenCL)
+	find_library(OpenCL_LIBRARY
+		NAMES
+			OpenCL
+		PATHS
+			ENV LD_LIBRARY_PATH
+			ENV OpenCL_LIBPATH
+			/usr
+		PATH_SUFFIXES
+			nvidia
+	)
 endif()

 set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})


Do not crash when the GLFW lib is not found.

--- cmake/Modules/FindGLFW.cmake
+++ cmake/Modules/FindGLFW.cmake
@@ -138,28 +138,28 @@
     else ()
         # (*)NIX

-        find_package(Threads REQUIRED)
-
-        find_package(X11 REQUIRED)
+        find_package(Threads)
+
+        find_package(X11)

         if(NOT X11_Xrandr_FOUND)
-            message(FATAL_ERROR "Xrandr library not found - required for GLFW")
+            message(STATUS "Xrandr library not found - required for GLFW")
         endif()

         if(NOT X11_xf86vmode_FOUND)
-            message(FATAL_ERROR "xf86vmode library not found - required for GLFW")
+            message(STATUS "xf86vmode library not found - required for GLFW")
         endif()

         if(NOT X11_Xcursor_FOUND)
-            message(FATAL_ERROR "Xcursor library not found - required for GLFW")
+            message(STATUS "Xcursor library not found - required for GLFW")
         endif()

         if(NOT X11_Xinerama_FOUND)
-            message(FATAL_ERROR "Xinerama library not found - required for GLFW")
+            message(STATUS "Xinerama library not found - required for GLFW")
         endif()

         if(NOT X11_Xi_FOUND)
-            message(FATAL_ERROR "Xi library not found - required for GLFW")
+            message(STATUS "Xi library not found - required for GLFW")
         endif()

         list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}" "${X11_Xcursor_LIB}" "${X11_Xinerama_LIB}" "${X11_Xi_LIB}" "${X11_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}" -lrt -ldl)


cmake: fix -fPIC/-fPIE handling in precompiled headers (PCH)

--- cmake/OpenCVPCHSupport.cmake
+++ cmake/OpenCVPCHSupport.cmake
@@ -259,6 +259,24 @@
         if(NOT __DEFINES MATCHES __DEFINES-NOTFOUND)
             list(APPEND _compile_FLAGS "${_PCH_define_prefix}${__DEFINES}")
         endif()
+    endif()
+
+    if(type STREQUAL "SHARED_LIBRARY" OR type STREQUAL "STATIC_LIBRARY")
+      get_target_property(__pic ${_targetName} POSITION_INDEPENDENT_CODE)
+      if(__pic AND CMAKE_CXX_COMPILE_OPTIONS_PIC
+          AND NOT OPENCV_SKIP_PCH_PIC_HANDLING
+          AND NOT OPENCV_SKIP_PCH_PIC_HANDLING_${_targetName}
+      )
+        list(APPEND _compile_FLAGS "${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
+      endif()
+    elseif(type STREQUAL "EXECUTABLE")
+      get_target_property(__pie ${_targetName} POSITION_INDEPENDENT_CODE)
+      if(__pie AND CMAKE_CXX_COMPILE_OPTIONS_PIE
+          AND NOT OPENCV_SKIP_PCH_PIE_HANDLING
+          AND NOT OPENCV_SKIP_PCH_PIE_HANDLING_${_targetName}
+      )
+        list(APPEND _compile_FLAGS "${CMAKE_CXX_COMPILE_OPTIONS_PIE}")
+      endif()
     endif()

     get_target_property(DIRINC ${_targetName} INCLUDE_DIRECTORIES)


Update BuildLua.cmake

Update BuildLua.cmake

--- cmake/modules/BuildLua.cmake
+++ cmake/modules/BuildLua.cmake
@@ -2,14 +2,14 @@

 if(WIN32)
   set(_byproducts
-    ${LUA_INSTALL_DIR}/lib/liblua.lib
+    ${LUA_INSTALL_DIR}/lib/lua.lib
   )

   ExternalProject_Add(
     lua
     GIT_REPOSITORY https://github.com/RavenX8/lua.git
     GIT_TAG e3f46c3bee3d6b62f9ea9a36c86249978504e404
-    CMAKE_ARGS -G ${CMAKE_GENERATOR} -Dlua_MSVC_STATIC_RUNTIME=ON
+    CMAKE_ARGS -G ${CMAKE_GENERATOR} -Dlua_MSVC_STATIC_RUNTIME=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     INSTALL_DIR ${LUA_INSTALL_DIR}
     BUILD_BYPRODUCTS ${_byproducts}
   )
@@ -20,7 +20,6 @@
     DEPENDEES download
     COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src" "<INSTALL_DIR>/include/" "*.h"
     COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src" "<INSTALL_DIR>/include/" "*.hpp"
-    COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<BUILD_DIR>" "<INSTALL_DIR>/lib/" "*.lib"
   )
 else()
   find_library(LUA_DL_LIBRARY dl)
@@ -48,7 +47,7 @@
 )

 if(WIN32)
-  set(LUA_LIBRARY "${install_dir}/lib/liblua.lib")
+  set(LUA_LIBRARY "${install_dir}/lib/lua.lib")
   set(LUA_LIBRARIES "${LUA_LIBRARY}")
   set(LUA_INSTALL_LIBS "${install_dir}/lib/liblua.dll")
 else()


Add elseif statement for arm64e

Add elseif statement for arm64e

--- cmake/onnxruntime_mlas.cmake
+++ cmake/onnxruntime_mlas.cmake
@@ -131,6 +131,8 @@
 else()
   if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
     set(ARM64 TRUE)
+  elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64e")
+    set(ARM64 TRUE)
   elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "arm")
     set(ARM TRUE)
   elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")


Update boost to 1.72.

Update boost to 1.72.

--- CMake/AddBoost.cmake
+++ CMake/AddBoost.cmake
@@ -1,7 +1,15 @@
+set(Boost_DEBUG 1)
+
+message(STATUS "Looking for boost")
+
+#set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/Boost/include")
+#set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/Boost/lib")
+
 set(Boost_USE_STATIC_LIBS ON)
 set(Boost_USE_DEBUG_LIBS ON)
 set(Boost_USE_MULTITHREADED ON)
 set(Boost_USE_STATIC_RUNTIME OFF)
+
 find_package(Boost REQUIRED COMPONENTS
     program_options chrono filesystem system date_time)


FindLLVM: allow LLVM/Clang 3.8 and reorder the llvm-config priority.

Beignet support 3 released llvm version, now is 3.6, 3.7, 3.8. For
LLVM 3.4, 3.5, beignet may still support them, but full test don't cover
them.

Signed-off-by: Yang Rong <78759e37dc7114caed18f74e7515c5cb519dbf6d@intel.com>
Reviewed-by: Ruiling Song <286a174c1339c6eff91abc41c3a1012c95030c95@intel.com>

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


Disable another test that uses matrix_set_diag on windows.

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -184,6 +184,7 @@
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/clip_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/tensor_array_ops_test.py"  # Needs portpicker.
       # Matrix_set_diag failing on GPU on windows.
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cholesky_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/diag_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/linalg_ops_test.py"
       # misc


path fix

path fix

--- configure/cmake/FindR.cmake
+++ configure/cmake/FindR.cmake
@@ -18,7 +18,7 @@
   set(R_FOUND TRUE)

   EXECUTE_PROCESS(
-  COMMAND ${R_EXEC} "--slave" "--no-save" "-e" "cat(R.home())"
+  COMMAND "${R_EXEC}" "--slave" "--no-save" "-e" "cat(R.home())"
   OUTPUT_VARIABLE R_ROOT_DIR)


Use GetMSVCVersion for cpack.

Use GetMSVCVersion for cpack.

--- cmake-local/Version.cmake
+++ cmake-local/Version.cmake
@@ -22,12 +22,13 @@
 if(WIN32)
     set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_CXX_COMPILER_ID}")
     if(MSVC)
-        math(EXPR _vs_ver "${MSVC_VERSION} / 100 - 6")
-        set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}${_vs_ver}")
+        include(GetMSVCVersion)
+        get_msvc_major_minor_version(_vs_major _vs_minor)
+        set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}${_vs_major}${_vs_minor}")
     endif()
     if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
         set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-64bit")
     else()
         set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-32bit")
     endif()
-endif()+endif()


Workaround for protobuf not respecting our C++ standard

PiperOrigin-RevId: 470690387
Change-Id: I1a7260176a10f0979154eb079543ea7449b4355b

--- cmake/BinExportDeps.cmake
+++ cmake/BinExportDeps.cmake
@@ -37,22 +37,16 @@
   GIT_REPOSITORY https://github.com/abseil/abseil-cpp
   GIT_TAG        f7474d4961b769c34a08475110ba391e5926e893 # 2022-08-18
 )
-FetchContent_GetProperties(absl)
-if(NOT absl_POPULATED)
-  set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
-  set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
-  set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
-  FetchContent_Populate(absl)
-  set(absl_DIR "${absl_BINARY_DIR}")
-  file(WRITE "${absl_BINARY_DIR}/absl-config.cmake" "")
-  add_subdirectory("${absl_SOURCE_DIR}" "${absl_BINARY_DIR}")
-endif()
+set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
+set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
+set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
+FetchContent_MakeAvailable(absl)
 binexport_check_target(absl::core_headers)

 # Protocol Buffers
 FetchContent_Declare(protobuf
   GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
-  GIT_TAG        d8421bd49c1328dc5bcaea2e60dd6577ac235336 # 2022-08-21
+  GIT_TAG        66ed6dd75b0b5f0d62a9bf90509638f380cbcd7f # 2022-08-27
 )
 set(protobuf_ABSL_PROVIDER "package" CACHE STRING "" FORCE)
 set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
@@ -62,6 +56,9 @@
 FetchContent_MakeAvailable(protobuf)
 binexport_check_target(protobuf::libprotobuf)
 binexport_check_target(protobuf::protoc)
+# Workaround for protobuf not respecting our C++ standard
+set_target_properties(libprotobuf libprotoc protoc
+                      PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD})
 set(Protobuf_INCLUDE_DIR "${protobuf_SOURCE_DIR}/src" CACHE INTERNAL "")
 set(Protobuf_LIBRARIES protobuf::libprotobuf CACHE INTERNAL "")
 find_package(Protobuf 3.14 REQUIRED) # Make protobuf_generate_cpp available


Cycles: * Auto detection of CUDA toolkit, using FIND_PACKAGE(CUDA). (Requires at least CMAKE 2.8)

--- cmake/external_libs.cmake
+++ cmake/external_libs.cmake
@@ -89,10 +89,15 @@
 # CUDA

 if(WITH_CYCLES_CUDA)
-	if(WIN32)
-		set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
+	FIND_PACKAGE(CUDA) # Try to auto locate CUDA toolkit
+	if(CUDA_FOUND)
+		set(CYCLES_CUDA ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Path to CUDA installation")
 	else()
-		set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
+		if(WIN32)
+			set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
+		else()
+			set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
+		endif()
 	endif()
 	set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
 	set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")


Also copy zip packages to the output directory.

--- cmake/packages/nsis.cmake
+++ cmake/packages/nsis.cmake
@@ -116,6 +116,11 @@

 list(APPEND COPY_PACKAGES_LIST copy_nsis_packages)

+add_custom_target(copy_zip_packages
+  COMMAND cp *.zip ${PACKAGE_TARGET_DIR})
+
+list(APPEND COPY_PACKAGES_LIST copy_zip_packages)
+
 add_custom_target(remove_packages
   COMMAND rm -f *.zip
   COMMAND rm -f *.exe


i#1551 port to ARM: update toolchain file for hf target

We primarily support the linux-gnueabihf target now, not linux-gnueabi.

Review-URL: https://codereview.appspot.com/242810043

--- make/toolchain-arm32.cmake
+++ make/toolchain-arm32.cmake
@@ -1,5 +1,5 @@
 # **********************************************************
-# Copyright (c) 2014 Google, Inc.    All rights reserved.
+# Copyright (c) 2014-2015 Google, Inc.    All rights reserved.
 # **********************************************************

 # Redistribution and use in source and binary forms, with or without
@@ -28,16 +28,17 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.

-# For cross compiling on 32-bit arm Linux using arm-linux-gnueabi-gcc package:
+# For cross compiling on 32-bit arm Linux using gcc-arm-linux-gnueabihf package:
 # - install arm-linux-gnueabi-gcc package:
-#   $ sudo apt-get install g*arm-linux-gnueabi
+#   $ sudo apt-get install gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf g++-arm-linux-gnueabihf
 # - cross-compiling config
 #   $ cmake -DCMAKE_TOOLCHAIN_FILE=../dynamorio/make/toolchain-arm32.cmake ../dynamorio
 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_PROCESSOR arm)
 # If using a different target, set -DTARGET_ABI=<abi> on the command line.
+# However, some of our pre-built libraries (such as libelftc) assume gnueabihf.
 if (NOT DEFINED TARGET_ABI)
-  set(TARGET_ABI "linux-gnueabi")
+  set(TARGET_ABI "linux-gnueabihf")
 endif ()
 # specify the cross compiler
 SET(CMAKE_C_COMPILER   arm-${TARGET_ABI}-gcc)


Just a typo in a comment

Just a typo in a comment

--- modules/LookUpEigen3.cmake
+++ modules/LookUpEigen3.cmake
@@ -8,7 +8,7 @@
 endif()

 if(NOT Eigen3_HG_REPOSITORY AND NOT Eigen3_URL)
-  # Can't trust cmake to download file. It will fail bizarely if not compiled
+  # Can't trust cmake to download file. It will fail if not compiled
   # with SSL
   set(file_found FALSE)
   set(Eigen3_URL "${EXTERNAL_ROOT}/eigen.tgz")