Newer clang discourages alloca; workaround

--- cmake/compiler/clang.cmake
+++ cmake/compiler/clang.cmake
@@ -1,4 +1,4 @@
-## Copyright 2009-2019 Intel Corporation
+## Copyright 2009-2020 Intel Corporation
 ## SPDX-License-Identifier: Apache-2.0

 set(OSPRAY_CXX_FLAGS "-fno-strict-aliasing -Wno-narrowing")
@@ -44,6 +44,7 @@
   set(OSPRAY_CXX_FLAGS "-Wno-cast-qual ${OSPRAY_CXX_FLAGS}") #Embree v3.x issue
   set(OSPRAY_CXX_FLAGS "-Wno-extra-semi-stmt ${OSPRAY_CXX_FLAGS}")
   set(OSPRAY_CXX_FLAGS "-Wno-shadow-field ${OSPRAY_CXX_FLAGS}")
+  set(OSPRAY_CXX_FLAGS "-Wno-alloca ${OSPRAY_CXX_FLAGS}")

   # Options selected for Clang 5.0+
   set(OSPRAY_CXX_FLAGS "-Weverything ${OSPRAY_CXX_FLAGS}")


Updating cmake file for fakeit to make TravisCI build correctly again

--- cmake_modules/fakeit.cmake
+++ cmake_modules/fakeit.cmake
@@ -13,8 +13,5 @@
     LOG_DOWNLOAD ON
 )

-
 ExternalProject_Get_Property(fakeit source_dir)
-set(FAKEIT_FOLDERS ${source_dir}/include/ ${source_dir}/config/standalone/)
-set(FAKEIT_INCLUDE_DIR ${FAKEIT_FOLDERS} CACHE INTERNAL "Path to include folder for FakeIt")
-
+set(FAKEIT_INCLUDE_DIR ${source_dir}/include/ ${source_dir}/config/standalone/ CACHE INTERNAL "Path to include folder for FakeIt")


fix in release generation for macosx

fix in release generation for macosx

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -204,7 +204,7 @@
     SET(CPACK_PACKAGE_VENDOR "intel") # creates short name com.intel.embree2.xxx in pkgutil
     SET(CPACK_OSX_PACKAGE_VERSION 10.7)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target PACKAGE)
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target package)
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES ${CPACK_PACKAGE_FILE_NAME}.dmg)
     ENDIF()
   ELSE()
@@ -212,7 +212,7 @@
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
     SET(CPACK_MONOLITHIC_INSTALL 1)
     IF (EMBREE_TESTING_PACKAGE)
-      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target PACKAGE)
+      ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target package)
       SET_TESTS_PROPERTIES("BuildPackage" PROPERTIES ATTACHED_FILES ${CPACK_PACKAGE_FILE_NAME}.tgz)
     ENDIF()
   ENDIF()


Generate two xsl files for WiX, one for building inside the solution and the other for the etc folder for do_wix.bat.  Ticket #1657.

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -165,15 +165,19 @@

     set (CPACK_WIX_PRODUCT_GUID "ea9608e1-9a9d-4678-800c-645df677094a")
     set (CPACK_WIX_UPGRADE_GUID "ef96d7c4-29df-403c-8fab-662386a089a4")
-    set (CPACK_WIX_BITMAP_FOLDER ${CONDOR_WIX_LOC}/Bitmaps)
+
     set (CPACK_WIX_WXS_FILES ${CONDOR_WIX_LOC}/xml/CondorCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorPoolCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorExecCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorDomainCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorEmailCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorJavaCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorPermCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorVMCfgDlg.wxs;${CONDOR_WIX_LOC}/xml/CondorHDFSCfgDlg.wxs)

+	set (CPACK_WIX_BITMAP_FOLDER Bitmaps)
+	configure_file(${CONDOR_WIX_LOC}/xml/win.xsl.in ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/condor.xsl @ONLY)
+
+	set (CPACK_WIX_BITMAP_FOLDER ${CONDOR_WIX_LOC}/Bitmaps)
     # the configure file f(n) will replace @CMAKE_XYZ@ with their value
     configure_file(${CONDOR_WIX_LOC}/xml/win.xsl.in ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/win.xsl @ONLY)

 	set (CPACK_GENERATOR "ZIP")

-	install ( FILES ${CPACK_WIX_WXS_FILES} ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/win.xsl
+	install ( FILES ${CPACK_WIX_WXS_FILES} ${CONDOR_BINARY_DIR}/msconfig/WiX/xml/condor.xsl
 			DESTINATION ${C_ETC}/WiX/xml )

 	install ( DIRECTORY ${CPACK_WIX_BITMAP_FOLDER}


amigaos: Enable native IPC model by default

--- platforms/amigaos-gcc/platform.cmake
+++ platforms/amigaos-gcc/platform.cmake
@@ -1,5 +1,5 @@
 set (PLIBSYS_THREAD_MODEL amiga)
-set (PLIBSYS_IPC_MODEL none)
+set (PLIBSYS_IPC_MODEL amiga)
 set (PLIBSYS_TIME_PROFILER_MODEL amiga)
 set (PLIBSYS_DIR_MODEL posix)
 set (PLIBSYS_LIBRARYLOADER_MODEL amiga)


hunter_cache_run: simplify check

hunter_cache_run: simplify check

--- cmake/modules/hunter_cache_run.cmake
+++ cmake/modules/hunter_cache_run.cmake
@@ -23,7 +23,6 @@
     hunter_internal_error("Unparsed: ${x_UNPARSED_ARGUMENTS}")
   endif()

-  list(REMOVE_ITEM HUNTER_PARENT_PACKAGE "")
   string(COMPARE EQUAL "${HUNTER_PARENT_PACKAGE}" "" is_empty)
   if(NOT is_empty)
     hunter_internal_error("HUNTER_PARENT_PACKAGE is not empty")


fix TBB redistribution

fix TBB redistribution

--- cmake/ospray_redistribute_deps.cmake
+++ cmake/ospray_redistribute_deps.cmake
@@ -42,7 +42,7 @@
   endif()
 endmacro()

-if (OSPRAY_TASKING_TBB)
+if (OSPCOMMON_TASKING_TBB)
   if (WIN32)
     set(TBB_DLL_HINTS
       HINTS


Remove tabs

Remove tabs

--- cmake/projects/range-v3/hunter.cmake
+++ cmake/projects/range-v3/hunter.cmake
@@ -46,7 +46,7 @@
     range-v3
     CMAKE_ARGS
     BUILD_DOCS=FALSE
-	  BUILD_TESTS=FALSE
+    BUILD_TESTS=FALSE
     BUILD_TESTING=FALSE
     RANGE_V3_EXAMPLES=FALSE
     RANGE_V3_PERF=FALSE


boards: qemu_cortex_a9: use SUPPORTED_EMU_PLATFORMS

We moved from EMU_PLATFORM to SUPPORTED_EMU_PLATFORMS.

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

--- boards/arm/qemu_cortex_a9/board.cmake
+++ boards/arm/qemu_cortex_a9/board.cmake
@@ -3,7 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0
 #

-set(EMU_PLATFORM qemu)
+set(SUPPORTED_EMU_PLATFORMS qemu)
 set(QEMU_ARCH xilinx-aarch64)

 set(QEMU_CPU_TYPE_${ARCH} cortex-a9)


Squashed '3rdparty/github/cmake-utils/' changes from da88dd07..2c004ca8

2c004ca8 cmake/MyPackageCheckCommonSizes.cmake: Add float, double and long double

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 2c004ca881ba3eba4699af95f257789ddae3ed1d

--- cmake/MyPackageCheckCommonSizes.cmake
+++ cmake/MyPackageCheckCommonSizes.cmake
@@ -4,6 +4,9 @@
   CHECK_TYPE_SIZE("int" SIZEOF_INT)
   CHECK_TYPE_SIZE("long" SIZEOF_LONG)
   CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
+  CHECK_TYPE_SIZE("float" SIZEOF_FLOAT)
+  CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE)
+  CHECK_TYPE_SIZE("long double" SIZEOF_LONG_DOUBLE)
   CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT)
   CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT)
   CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG)


Split -pedantic and -Wno-long-long into two separate flags so libc++ can remove -pedantic

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

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

-    append_if(LLVM_ENABLE_PEDANTIC "-pedantic -Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    append_if(LLVM_ENABLE_PEDANTIC "-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    append_if(LLVM_ENABLE_PEDANTIC "-Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
     append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
     append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)


[cmake] Improve comment describing the C4245 warning. NFCI.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -523,7 +523,7 @@
       -wd4610 # Suppress '<class> can never be instantiated'
       -wd4510 # Suppress 'default constructor could not be generated'
       -wd4702 # Suppress 'unreachable code'
-      -wd4245 # Suppress 'signed/unsigned mismatch'
+      -wd4245 # Suppress ''conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch'
       -wd4706 # Suppress 'assignment within conditional expression'
       -wd4310 # Suppress 'cast truncates constant value'
       -wd4701 # Suppress 'potentially uninitialized local variable'


Turn off fortify, since it doesn't work for -O0. Refs #5926.

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -25,7 +25,9 @@
 ## add TOKU_PTHREAD_DEBUG for debug builds
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1)
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO TOKU_PTHREAD_DEBUG=1)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO _FORTIFY_SOURCE=2)
+## fortify doesn't work with -O0, so we are deprecating it for now.  Sometime we should turn on
+## fortify for -O1 builds, but we don't want it on the release builds.
+## #set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO _FORTIFY_SOURCE=2)

 ## coverage
 option(USE_GCOV "Use gcov for test coverage." OFF)


Support for llvm 3.7.1 added

Support for llvm 3.7.1 added

--- src/cmake/Modules/FindLibClang.cmake
+++ src/cmake/Modules/FindLibClang.cmake
@@ -14,7 +14,8 @@
 #               Known LLVM release numbers.

 # most recent versions come first
-set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.7
+set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.7.1
+  3.7
   3.6.2
   3.6.1
   3.6


Now we can specify min version and max supported version

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

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -11,6 +11,15 @@

 INCLUDE(CheckSymbolExists)
 INCLUDE(FindLibraryWithDebug)
+
+if(NOT CLUCENE_MIN_VERSION)
+  set(CLUCENE_MIN_VERSION "0.9.16")
+endif(NOT CLUCENE_MIN_VERSION)
+
+if(NOT CLUCENE_MAX_SUPPORTED_VERSION)
+  set(CLUCENE_MAX_SUPPORTED_VERSION "0.9.17")
+endif(NOT CLUCENE_MAX_SUPPORTED_VERSION)
+

 IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
   INCLUDE(${PROJECT_CMAKE}/CLuceneConfig.cmake)
@@ -57,12 +66,12 @@
     STRING(REGEX MATCH "_CL_VERSION +\".*\"" CLMATCH ${CLCONTENT})
     IF (CLMATCH)
       STRING(REGEX REPLACE "_CL_VERSION +\"(.*)\"" "\\1" CLUCENE_VERSION ${CLMATCH})
-	  IF (CLUCENE_VERSION STRLESS "0.9.16")
-	    MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum 0.9.16")
-	  ENDIF (CLUCENE_VERSION STRLESS "0.9.16")
-	  IF (CLUCENE_VERSION STREQUAL "0.9.17")
-	    MESSAGE(FATAL_ERROR "CLucene version 0.9.17 is not supported.")
-	  ENDIF (CLUCENE_VERSION STREQUAL "0.9.17")
+	  IF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
+	    MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}")
+	  ENDIF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
+	  IF (CLUCENE_VERSION STREQUAL "${CLUCENE_MAX_SUPPORTED_VERSION}")
+	    MESSAGE(FATAL_ERROR "CLucene version ${CLUCENE_MAX_SUPPORTED_VERSION} is not supported.")
+	  ENDIF (CLUCENE_VERSION STREQUAL "${CLUCENE_MAX_SUPPORTED_VERSION}")
     ENDIF (CLMATCH)
   ENDIF (CLUCENE_LIBRARY_DIR)


CMake: all libpaths in FastJet config

CMake: all libpaths in FastJet config

Fixes a problem with external CGAL accidentally introduced in
4b8c532d6d535da92817af3e2c1ca2179ae8fece (sorry)

--- cmake/FindFASTJET.cmake
+++ cmake/FindFASTJET.cmake
@@ -71,25 +71,24 @@
     # Extracting compilation flags
     execute_process(COMMAND ${FASTJET_CONFIG} --cxxflags OUTPUT_VARIABLE FASTJET_CXXFLAGS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE)
     if(error)
-        message(FATAL_ERROR "Error retrieving FastJet compilation flags : ${error}")
+        message(FATAL_ERROR "Error retrieving FastJet compilation flags: ${error}")
     endif(error)

-    # Extracting the include path from the CXX flags
+    # Extracting the include path(s?) from the CXX flags (LIST)
     set(FASTJET_INCLUDE_DIR)
     if(FASTJET_CXXFLAGS)
         string(REGEX MATCHALL "(^| )-I[^ ]+" incfolders ${FASTJET_CXXFLAGS})
         foreach(incfolder ${incfolders})
             string(STRIP ${incfolder} incfolder)
             string(SUBSTRING ${incfolder} 2 -1 incfolder)
-            set(FASTJET_INCLUDE_DIR ${incfolder})
-            break()
+            list(APPEND FASTJET_INCLUDE_DIR ${incfolder})
         endforeach()
     endif(FASTJET_CXXFLAGS)

     # Extracting libraries and linking options
     execute_process(COMMAND ${FASTJET_CONFIG} --libs OUTPUT_VARIABLE FASTJET_CONFIGLIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE)
     if(error)
-        message(FATAL_ERROR "Error retrieving FastJet libs : ${error}")
+        message(FATAL_ERROR "Error retrieving FastJet libs: ${error}")
     endif(error)

     # Extracting the list of needed libraries during linking and the linking directory
@@ -97,7 +96,7 @@
     set(FASTJET_LIBS_DIR)
     if(FASTJET_CONFIGLIBS)

-        # Extract libraries needed at link time (-l): the output is a LIST
+        # Extract libraries needed at link time (-l) (LIST)
         string(REGEX MATCHALL "(^| )-l[^ ]+" fjlibs ${FASTJET_CONFIGLIBS})
         foreach(fjlib ${fjlibs})
             string(STRIP ${fjlib} fjlib)
@@ -105,13 +104,12 @@
             list(APPEND FASTJET_LIBS ${fjlib})
         endforeach()

-        # Extract library path: only one STRING as output
+        # Extract library paths used by FastJet to find needed libs: (LIST)
         string(REGEX MATCHALL "(^| )-L[^ ]+" fjlibdirs ${FASTJET_CONFIGLIBS})
         foreach(fjlibdir ${fjlibdirs})
             string(STRIP ${fjlibdir} fjlibdir)
             string(SUBSTRING ${fjlibdir} 2 -1 fjlibdir)
-            set(FASTJET_LIBS_DIR ${fjlibdir})
-            break()
+            list(APPEND FASTJET_LIBS_DIR ${fjlibdir})
         endforeach()

     endif(FASTJET_CONFIGLIBS)


Small fix to jsoncpp finder logic to ensure re-configurations work.

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -52,6 +52,8 @@
 		endif()
 	endif()
 endmacro()
+
+include(FindPackageHandleStandardArgs)

 # We will always try first to get a config file.
 if(NOT JSONCPP_IMPORTED_LIBRARY)
@@ -122,12 +124,6 @@
 				json/json.h
 				PATH_SUFFIXES include jsoncpp include/jsoncpp
 				HINTS ${__jsoncpp_hints})
-
-			if(JsonCpp_INCLUDE_DIR)
-				mark_as_advanced(JsonCpp_INCLUDE_DIR)
-				# Note - this does not set it in the cache, in case we find it better at some point in the future!
-				set(JSONCPP_IMPORTED_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR})
-			endif()
 		endif()

 		# As a convenience...
@@ -135,14 +131,22 @@
 			add_library(jsoncpp_lib INTERFACE)
 			target_link_libraries(jsoncpp_lib INTERFACE jsoncpp_lib_static)
 		endif()
-
-		# OK, finish this up.
-		include(FindPackageHandleStandardArgs)
-		find_package_handle_standard_args(JsonCpp
-			DEFAULT_MSG
-			JSONCPP_IMPORTED_LIBRARY
-			JSONCPP_IMPORTED_INCLUDE_DIRS)
-	endif()
+	endif()
+endif()
+
+if(JSONCPP_IMPORTED_LIBRARY)
+	if(NOT JSONCPP_IMPORTED_INCLUDE_DIRS)
+		if(JsonCpp_INCLUDE_DIR)
+			mark_as_advanced(JsonCpp_INCLUDE_DIR)
+			# Note - this does not set it in the cache, in case we find it better at some point in the future!
+			set(JSONCPP_IMPORTED_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR})
+		endif()
+	endif()
+
+	find_package_handle_standard_args(JsonCpp
+		DEFAULT_MSG
+		JSONCPP_IMPORTED_LIBRARY
+		JSONCPP_IMPORTED_INCLUDE_DIRS)
 endif()

 # Create any missing namespaced targets from the config module.


cmake: Moved compiler flags checks to GNU compilers only.

--- cmake/modules/TelepathyDefaults.cmake
+++ cmake/modules/TelepathyDefaults.cmake
@@ -32,6 +32,45 @@
     set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline -DENABLE_DEBUG")
     set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs -DENABLE_DEBUG")

+    set(DISABLE_WERROR 0 CACHE BOOL "compile without -Werror (normally enabled in development builds)")
+
+    include(CompilerWarnings)
+
+    if(${CMAKE_BUILD_TYPE} STREQUAL Release)
+        set(NOT_RELEASE 0)
+    else(${CMAKE_BUILD_TYPE} STREQUAL Release)
+        set(NOT_RELEASE 1)
+    endif(${CMAKE_BUILD_TYPE} STREQUAL Release)
+
+    set(desired
+        all
+        extra
+        sign-compare
+        pointer-arith
+        format-security
+        init-self)
+    set(undesired
+        missing-field-initializers
+        unused-parameter)
+    compiler_warnings(CMAKE_CXX_FLAGS cxx ${NOT_RELEASE} "${desired}" "${undesired}")
+
+    set(desired_c
+        all
+        extra
+        declaration-after-statement
+        shadow
+        strict-prototypes
+        missing-prototypes
+        sign-compare
+        nested-externs
+        pointer-arith
+        format-security
+        init-self)
+    set(undesired_c
+        missing-field-initializers
+        unused-parameter)
+    compiler_warnings(CMAKE_C_FLAGS c ${NOT_RELEASE} "${desired_c}" "${undesired_c}")
+
     if(CMAKE_SYSTEM_NAME MATCHES Linux)
         add_definitions(-D_BSD_SOURCE)
     endif(CMAKE_SYSTEM_NAME MATCHES Linux)
@@ -56,43 +95,5 @@
 set(LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
 set(LIB_INSTALL_DIR     "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"  CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})" FORCE)
 set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include"           CACHE PATH "The subdirectory to the header prefix" FORCE)
-set(DISABLE_WERROR 0 CACHE BOOL "compile without -Werror (normally enabled in development builds)")
-
-include(CompilerWarnings)
-
-if(${CMAKE_BUILD_TYPE} STREQUAL Release)
-    set(NOT_RELEASE 0)
-else(${CMAKE_BUILD_TYPE} STREQUAL Release)
-    set(NOT_RELEASE 1)
-endif(${CMAKE_BUILD_TYPE} STREQUAL Release)
-
-set(desired
-    all
-    extra
-    sign-compare
-    pointer-arith
-    format-security
-    init-self)
-set(undesired
-    missing-field-initializers
-    unused-parameter)
-compiler_warnings(CMAKE_CXX_FLAGS cxx ${NOT_RELEASE} "${desired}" "${undesired}")
-
-set(desired_c
-    all
-    extra
-    declaration-after-statement
-    shadow
-    strict-prototypes
-    missing-prototypes
-    sign-compare
-    nested-externs
-    pointer-arith
-    format-security
-    init-self)
-set(undesired_c
-    missing-field-initializers
-    unused-parameter )
-compiler_warnings(CMAKE_C_FLAGS c ${NOT_RELEASE} "${desired_c}" "${undesired_c}")

 include(TelepathyDist)


remove FindMsgpack.cmake

remove FindMsgpack.cmake

--- cmake/FindMsgpack.cmake
+++ cmake/FindMsgpack.cmake
@@ -1,69 +0,0 @@
-# - Try to find msgpack
-# Once done this will define
-#  MSGPACK_FOUND - System has msgpack
-#  MSGPACK_INCLUDE_DIRS - The msgpack include directories
-#  MSGPACK_LIBRARIES - The libraries needed to use msgpack
-
-if(NOT USE_BUNDLED_MSGPACK)
-  find_package(PkgConfig)
-  if (PKG_CONFIG_FOUND)
-    pkg_search_module(PC_MSGPACK QUIET
-      msgpackc>=${Msgpack_FIND_VERSION}
-      msgpack>=${Msgpack_FIND_VERSION})
-  endif()
-else()
-  set(PC_MSGPACK_INCLUDEDIR)
-  set(PC_MSGPACK_INCLUDE_DIRS)
-  set(PC_MSGPACK_LIBDIR)
-  set(PC_MSGPACK_LIBRARY_DIRS)
-  set(LIMIT_SEARCH NO_DEFAULT_PATH)
-endif()
-
-set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER})
-
-find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h
-  HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS}
-  ${LIMIT_SEARCH})
-
-if(MSGPACK_INCLUDE_DIR)
-  file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h)
-  string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}")
-  string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}")
-  string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}")
-  set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}")
-else()
-  set(MSGPACK_VERSION_STRING)
-endif()
-
-# If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name.
-if(MSGPACK_USE_STATIC)
-  list(APPEND MSGPACK_NAMES
-    "${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}"
-    "${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()
-
-if(MSVC)
-  # The import library for the msgpack DLL has a different name
-  list(APPEND MSGPACK_NAMES msgpack_import)
-else()
-  list(APPEND MSGPACK_NAMES msgpackc msgpack)
-endif()
-
-find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES}
-  # Check each directory for all names to avoid using headers/libraries from
-  # different places.
-  NAMES_PER_DIR
-  HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS}
-  ${LIMIT_SEARCH})
-
-mark_as_advanced(MSGPACK_INCLUDE_DIR MSGPACK_LIBRARY)
-
-set(MSGPACK_LIBRARIES ${MSGPACK_LIBRARY})
-set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set MSGPACK_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(Msgpack
-  REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR
-  VERSION_VAR MSGPACK_VERSION_STRING)


Fixed vcpkg integration

Fixed vcpkg integration

--- cmake/check_vcpkg.cmake
+++ cmake/check_vcpkg.cmake
@@ -1,9 +1,11 @@
-function(obe_check_vcpkg OBE_USE_VCPKG)
+function(obe_check_vcpkg ${OBE_USE_VCPKG})
     option(USE_VCPKG "Use vcpkg to handle some of the dependencies" OFF)
     if(USE_VCPKG AND DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
         set(OBE_USE_VCPKG ON)
         set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
             CACHE STRING "")
+    else()
+        set(CMAKE_TOOLCHAIN_FILE CACHE STRING "" FORCE)
     endif()

     if(${OBE_USE_VCPKG})


no OPT:REF in debug msvc

no OPT:REF in debug msvc

In msvc Debug mode, OPT:REF is not compatible with incremental linking

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@918 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -82,8 +82,8 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS /OPT:REF)
-		else()
+      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+    else()
       SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
     #
@@ -110,8 +110,8 @@
     target_link_libraries(${_name} ${Boost_LIBRARIES})
     #
     # Only link if needed
-		if(WIN32 AND MSVC)
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS /OPT:REF)
+    if(WIN32 AND MSVC)
+      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     else()
       SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
@@ -144,7 +144,7 @@
       # GTest >= 1.5 requires pthread and CMake's 2.8.4 FindGTest is broken
       target_link_libraries(${_exename} pthread)
     elseif(WIN32)
-      SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS /OPT:REF)
+      SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     endif()
     #
     PCL_LINK_OPENMP(${_exename})


does not build CUDA support if not found

--- SuperBuild/External_astra-toolbox.cmake
+++ SuperBuild/External_astra-toolbox.cmake
@@ -33,7 +33,7 @@
 endif()

 set (CUDA_TOOLKIT_ROOT_DIR $ENV{CUDA_BIN_DIR})
-find_package(CUDA REQUIRED)
+find_package(CUDA)
 # as in CCPi RGL
 if (CUDA_FOUND)
    set(CUDA_NVCC_FLAGS "-Xcompiler -fPIC -shared -D_FORCE_INLINES")
@@ -86,7 +86,8 @@

 set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure")
 list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
-list(APPEND cmd "NVCCFLAGS=-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}
@@ -126,6 +127,49 @@
 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
+      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")
+
+    #create a configure script
+    file(WRITE ${${proj}_SOURCE_DIR}/python_build
+"
+#! /bin/bash
+set -ex
+
+CPPFLAGS=\"-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
+")
+
+
+endif()

    file(COPY ${${proj}_SOURCE_DIR}/python_build
      DESTINATION ${${proj}_SOURCE_DIR}/python
@@ -195,8 +239,14 @@
     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
              COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_CUDA()"
-    WORKING_DIRECTORY ${${proj}_SOURCE_DIR})
+             WORKING_DIRECTORY ${${proj}_SOURCE_DIR})
+     endif()

   else()
     if(${USE_SYSTEM_${externalProjName}})


fbcode_builder: cmake: propagate thrift include dependencies correctly

Summary:
Update `add_thrift_cpp2_library()` to pass in the correct `-I` flags when
invoking the thrift compiler so that it can find all of the other thrift files
that this library depends on.

D16062657 was a previous attempt to do this, but suffered from a few problems:
- It required all dependencies to be defined before
  `add_thrift_cpp2_library()` was called.  This requires users to carefully
  order their CMake files and subdirectory include ordering.
- It only handled one level of dependencies, and did not propagate include
  paths for deeper dependencies.
- It set the include path for dependencies to the source directory path where
  the dependency was originally built, rather than the directory where the
  thrift file for that dependency would be installed.

This change does require CMake 3.8+.  Previous versions of CMake do not
support using generator expressions to generate multiple arguments for a
custom command.

Reviewed By: strager

Differential Revision: D17005381

fbshipit-source-id: 31190beba94b4d1010445375a5e2791450230f7d

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -17,13 +17,24 @@
 #   The sub-directory where generated headers will be installed.
 #   Defaults to "include" if not specified.  The caller must still call
 #   install() to install the thrift library if desired.
+# - THRIFT_INCLUDE_DIR <path>
+#   The sub-directory where generated headers will be installed.
+#   Defaults to "${INCLUDE_DIR}/thrift-files" if not specified.
+#   The caller must still call install() to install the thrift library if
+#   desired.
 function(add_thrift_cpp2_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
   set(one_value_args INCLUDE_DIR)
-  set(multi_value_args SERVICES DEPENDS OPTIONS)
+  set(multi_value_args SERVICES DEPENDS OPTIONS THRIFT_INCLUDE_DIR)
   fb_cmake_parse_args(
     ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
   )
+  if(NOT DEFINED ARG_INCLUDE_DIR)
+    set(ARG_INCLUDE_DIR "include")
+  endif()
+  if(NOT DEFINED ARG_THRIFT_INCLUDE_DIR)
+    set(ARG_THRIFT_INCLUDE_DIR "${ARG_INCLUDE_DIR}/thrift-files")
+  endif()

   get_filename_component(base ${THRIFT_FILE} NAME_WE)
   get_filename_component(
@@ -39,9 +50,6 @@
     "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
   )
   get_filename_component(include_prefix ${include_prefix} DIRECTORY)
-  if(NOT DEFINED ARG_INCLUDE_DIR)
-    set(ARG_INCLUDE_DIR "include")
-  endif()

   if (NOT "${include_prefix}" STREQUAL "")
     list(APPEND ARG_OPTIONS "include_prefix=${include_prefix}")
@@ -78,22 +86,21 @@
     )
   endforeach()

-  list(APPEND thrift_include_options -I "${CMAKE_SOURCE_DIR}")
-  foreach(depends IN LISTS ARG_DEPENDS)
-    get_property(thrift_include_directory
-      TARGET ${depends}
-      PROPERTY THRIFT_INCLUDE_DIRECTORY)
-
-    if (thrift_include_directory STREQUAL "")
-      message(STATUS "No thrift dependency found for ${depends}")
-    else()
-      list(
-        APPEND thrift_include_options
-        -I "${thrift_include_directory}"
-      )
-    endif()
-  endforeach()
-
+  # This generator expression gets the list of include directories required
+  # for all of our dependencies.
+  # It requires using COMMAND_EXPAND_LISTS in the add_custom_command() call
+  # below.  COMMAND_EXPAND_LISTS is only available in CMake 3.8+
+  # If we really had to support older versions of CMake we would probably need
+  # to use a wrapper script around the thrift compiler that could take the
+  # include list as a single argument and split it up before invoking the
+  # thrift compiler.
+  if (NOT POLICY CMP0067)
+    message(FATAL_ERROR "add_thrift_cpp2_library() requires CMake 3.8+")
+  endif()
+  set(
+    thrift_include_options
+    "-I;$<JOIN:$<TARGET_PROPERTY:${LIB_NAME}.thrift_includes,INTERFACE_INCLUDE_DIRECTORIES>,;-I;>"
+  )
   file(
     GLOB_RECURSE THRIFT_TEMPLATE_FILES
     FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/cpp2/*.mustache"
@@ -104,6 +111,7 @@
     OUTPUT
       ${generated_headers}
       ${generated_sources}
+    COMMAND_EXPAND_LISTS
     COMMAND
       "${CMAKE_COMMAND}" -E make_directory "${output_dir}"
     COMMAND
@@ -111,7 +119,7 @@
       --strict
       --templates "${FBTHRIFT_TEMPLATES_DIR}"
       --gen "mstch_cpp2:${GEN_ARG_STR}"
-      ${thrift_include_options}
+      "${thrift_include_options}"
       -o "${output_dir}"
       "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
     WORKING_DIRECTORY
@@ -159,11 +167,27 @@
     PROPERTY PUBLIC_HEADER ${generated_headers}
   )

+  # Define a dummy interface library to help propagate the thrift include
+  # directories between dependencies.
+  add_library("${LIB_NAME}.thrift_includes" INTERFACE)
+  target_include_directories(
+    "${LIB_NAME}.thrift_includes"
+    INTERFACE
+      "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>"
+      "$<INSTALL_INTERFACE:${ARG_THRIFT_INCLUDE_DIR}>"
+  )
+  foreach(dep IN LISTS ARG_DEPENDS)
+    target_link_libraries(
+      "${LIB_NAME}.thrift_includes"
+      INTERFACE "${dep}.thrift_includes"
+    )
+  endforeach()
+
   set_target_properties(
     "${LIB_NAME}"
     PROPERTIES
-      EXPORT_PROPERTIES "THRIFT_INCLUDE_DIRECTORY"
-      THRIFT_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}"
+      EXPORT_PROPERTIES "THRIFT_INSTALL_DIR"
+      THRIFT_INSTALL_DIR "${ARG_THRIFT_INCLUDE_DIR}/${include_prefix}"
       HEADER_INSTALL_DIR "${ARG_INCLUDE_DIR}/${include_prefix}/gen-cpp2"
   )
 endfunction()


Delete BUILD.cmake

Delete BUILD.cmake

@Hostilfork converted this to wiki: https://github.com/metaeducation/ren-c/wiki/Building-Ren-C-with-CMake

--- BUILD.cmake
+++ BUILD.cmake
@@ -1,36 +0,0 @@
-Build with CMake
-
-Building with cmake supports building out of tree to clean the source tree intact.
-
-Native build (Unix Makefiles):
-#mkdir build
-#cmake [options] /path-to-ren-c/make
-Options support:
-R3_WITH_TCC: user natives depend on this, When this is enabled, CMAKE_BUILD_TYPE has to be defined as well
-R3_EXTERNAL_FFI: build with libffi provided by the system
-R3_OS_ID: the OS_ID with which Rebol 3 is to build
-#make -j8 r3-core
-
-Cross-compile for Windows from Linux (mingw64)
-Just change the cmake step to include the toolchain file, e.g. for 32-bit windows executable:
-#cmake [options] /path-to-ren-c/make -DCMAKE_TOOLCHAIN_FILE=/path-to-ren-c/make/Toolchain-cross-mingw32-linux.cmake
-
-Cross-compile for Android from Linux
-1. Preparation:
-1.1 install 'android-ndk'
-1.2 install 'android-cmake'
-1.3 checkout the latest ren-c
-
-2. compile a TCC cross-compiler:
-2.1 #mkdir build; cd build
-2.2 #cmake -DTCC_BUILD_ARM_EABIHF=1 -DTCC_ARM_VERSION=7 /path-to-ren-c/external/tcc
-2.3 #make ;it should produce an exe arm-linux-gnueabifh-tcc
-
-3. Compile Rebol 3:
-3.1 #mkdir build; cd build
-3.2 #copy arm-linux-gnueabifh-tcc (from step 2.3) ./cross-tcc
-3.3 #copy your-r3-make ./r3-make
-3.4 #export ANDROID_NDK=/opt/android-ndk
-3.5 #export ANDROID_NATIVE_API_LEVEL=16
-3.6 #cmake -DR3_WITH_TCC=1 -DCMAKE_BUILD_TYPE=RELEASE -DR3_OS_ID=0.13.2 -DCMAKE_TOOLCHAIN_FILE=/opt/android-cmake/android.toolchain.cmake /path-to-ren-c/make
-3.7 #make r3-core


Change ASM compiler from as to gcc

Change ASM compiler from as to gcc

This way you can use gcc switches

--- toolchain-gcc-arm-embedded.cmake
+++ toolchain-gcc-arm-embedded.cmake
@@ -6,7 +6,7 @@

 set(CMAKE_C_COMPILER ${PREFIX}-gcc CACHE INTERNAL "c compiler")
 set(CMAKE_CXX_COMPILER ${PREFIX}-c++ CACHE INTERNAL "cxx compiler")
-set(CMAKE_ASM_COMPILER ${PREFIX}-as CACHE INTERNAL "asm compiler")
+set(CMAKE_ASM_COMPILER ${PREFIX}-gcc CACHE INTERNAL "asm compiler")

 set(CMAKE_OBJCOPY ${PREFIX}-objcopy CACHE INTERNAL "objcopy")
 set(CMAKE_OBJDUMP ${PREFIX}-objdump CACHE INTERNAL "objdump")


No longer creates bin/{Configuration} directory

--- tools/cmake/Win32PostBuild.cmake
+++ tools/cmake/Win32PostBuild.cmake
@@ -5,20 +5,6 @@
 ## create a target that gathers up the necessary dll's from the above
 ## dependencies and places them in the runtime directory for this project
 add_custom_target(DEPS)
-
-add_custom_command(
-    TARGET DEPS
-    POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E make_directory "${WIN_PROJECT_BINARY_DIR}\\bin"
-    VERBATIM
-)
-
-add_custom_command(
-    TARGET DEPS
-    POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E make_directory "${WIN_PROJECT_BINARY_DIR}\\bin\\$\(Configuration\)"
-    VERBATIM
-)

 add_custom_command(
     TARGET DEPS


COMP: use nmake generator rather than VS for OSSIM

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -42,6 +42,7 @@

   if(MSVC)
     set(OSSIM_CXX_FLAGS /EHsc)
+    list(APPEND OSSIM_SB_CONFIG "-GNMake\ Makefiles")
   endif()

   # archive version


Mise a jour : Radar -> SARPolarimetrie

Mise a jour : Radar -> SARPolarimetrie

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -23,7 +23,7 @@
   ${OTB_SOURCE_DIR}/Code/Fusion
   ${OTB_SOURCE_DIR}/Code/Projections
   ${OTB_SOURCE_DIR}/Code/Radiometry
-  ${OTB_SOURCE_DIR}/Code/Radar
+  ${OTB_SOURCE_DIR}/Code/SARPolarimetry
   ${OTB_SOURCE_DIR}/Code/Markov
   ${OTB_SOURCE_DIR}/Utilities/BGL
   ${OTB_SOURCE_DIR}/Utilities/BGL/boost
@@ -176,7 +176,7 @@
   ${OTB_INSTALL_INCLUDE_DIR}/Gui
   ${OTB_INSTALL_INCLUDE_DIR}/Projections
   ${OTB_INSTALL_INCLUDE_DIR}/Radiometry
-  ${OTB_INSTALL_INCLUDE_DIR}/Radar
+  ${OTB_INSTALL_INCLUDE_DIR}/SARPolarimetry
   ${OTB_INSTALL_INCLUDE_DIR}/Markov
   ${OTB_INSTALL_INCLUDE_DIR}/Fusion
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities


Guess directory for mrpt-lib.config files

--- parse-files/mrpt-config.cmake
+++ parse-files/mrpt-config.cmake
@@ -22,6 +22,11 @@

 set(MRPT_LIBRARIES "")
 foreach(_comp ${MRPT_FIND_COMPONENTS})
+  # If not set, use current directory as guess:
+  if (NOT mrpt-${_comp}_DIR)
+    set(mrpt-${_comp}_DIR  ${CMAKE_CURRENT_LIST_DIR})
+  endif()
+
   if (MRPT_FIND_REQUIRED_${_comp})
     find_dependency(mrpt-${_comp})
   else()


SuperBuild: enable GDAL S2 driver

SuperBuild: enable GDAL S2 driver

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -52,7 +52,9 @@
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
       DEPENDS ${${proj}_DEPENDENCIES}
       UPDATE_COMMAND  ${CMAKE_COMMAND} -E copy_directory ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
-      PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
+      PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
+        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/${proj}/S2_patch ${GDAL_SB_SRC}
       CONFIGURE_COMMAND
         # use 'env' because CTest launcher doesn't perform shell interpretation
         ${SB_ENV_CONFIGURE_CMD}
@@ -61,6 +63,7 @@
         --enable-static=no
         --without-ogdi
         --without-jasper
+        --with-sentinel2
         ${GDAL_SB_CONFIG}
         ${GDAL_SB_EXTRA_OPTIONS}
       BUILD_COMMAND $(MAKE)
@@ -86,7 +89,9 @@
        INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
        DEPENDS ${${proj}_DEPENDENCIES}
-       PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory  ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR} COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
+       PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory  ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
+        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/${proj}/S2_patch ${GDAL_SB_SRC}
        CONFIGURE_COMMAND  ${CMAKE_COMMAND} -E copy  ${CMAKE_SOURCE_DIR}/patches/${proj}/ogrsqlitevirtualogr.cpp
       ${GDAL_SB_BUILD_DIR}/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
        BUILD_COMMAND nmake /f ${GDAL_SB_BUILD_DIR}/makefile.vc MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt


SuperBuild: enable hdf4, hdf5 and netcdf in GDAL

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

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

 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL TIFF_ROOT     --with-libtiff)
 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOTIFF_ROOT  --with-geotiff)
@@ -35,6 +35,9 @@
 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL EXPAT_ROOT    --with-expat)
 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL CURL_ROOT     --with-curl "/bin/curl-config")
 ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOS_ROOT     --with-geos "/bin/geos-config")
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL HDF5_ROOT     --with-hdf5)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL NETCDF_ROOT   --with-netcdf)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL HDF4_ROOT     --with-hdf4)

 set(GDAL_CONFIGURE_COMMAND)
 set(GDAL_BUILD_COMMAND)
@@ -71,8 +74,6 @@
     --with-gif=no
     --with-grass=no
     --with-gta=no
-    --with-hdf4=no
-    --with-hdf5=no
     --with-idb=no
     --with-ingres=no
     --with-jp2mrsid=no
@@ -82,7 +83,6 @@
     --with-mrsid=no
     --with-msg=no
     --with-mysql=no
-    --with-netcdf=no
     --with-oci=no
     --with-odbc=no
     --with-ogdi=no


add chinese SM2 and COSM2 support

add chinese SM2 and COSM2 support

--- deps/lua-openssl.cmake
+++ deps/lua-openssl.cmake
@@ -38,6 +38,7 @@
   ${LUA_OPENSSL_DIR}/src/compat.c
   ${LUA_OPENSSL_DIR}/src/crl.c
   ${LUA_OPENSSL_DIR}/src/csr.c
+  ${LUA_OPENSSL_DIR}/src/cosm2.c
   ${LUA_OPENSSL_DIR}/src/dh.c
   ${LUA_OPENSSL_DIR}/src/digest.c
   ${LUA_OPENSSL_DIR}/src/dsa.c
@@ -57,6 +58,7 @@
   ${LUA_OPENSSL_DIR}/src/private.h
   ${LUA_OPENSSL_DIR}/src/rsa.c
   ${LUA_OPENSSL_DIR}/src/sk.h
+  ${LUA_OPENSSL_DIR}/src/sm2.c
   ${LUA_OPENSSL_DIR}/src/ssl.c
   ${LUA_OPENSSL_DIR}/src/th-lock.c
   ${LUA_OPENSSL_DIR}/src/util.c


Compiling on lcgpu with cuDNN 5.0

Compiling on lcgpu with cuDNN 5.0

--- caffe/cmake/Cuda.cmake
+++ caffe/cmake/Cuda.cmake
@@ -172,10 +172,10 @@
 # Usage:
 #   detect_cuDNN()
 function(detect_cuDNN)
-  set(CUDNN_ROOT "" CACHE PATH "CUDNN root folder")
+  set(CUDNN_ROOT "/home.stud/novakli2/software/thirdparty/cudnn" CACHE PATH "CUDNN root folder")

   find_path(CUDNN_INCLUDE cudnn.h
-            PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDA_TOOLKIT_INCLUDE}
+            PATHS ${CUDNN_ROOT}/include $ENV{CUDNN_ROOT} ${CUDA_TOOLKIT_INCLUDE}
             DOC "Path to cuDNN include directory." )

   # dynamic libs have different suffix in mac and linux
@@ -187,7 +187,7 @@

   get_filename_component(__libpath_hist ${CUDA_CUDART_LIBRARY} PATH)
   find_library(CUDNN_LIBRARY NAMES ${CUDNN_LIB_NAME}
-   PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE} ${__libpath_hist} ${__libpath_hist}/../lib
+   PATHS ${CUDNN_ROOT}/lib64 $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE} ${__libpath_hist} ${__libpath_hist}/../lib
    DOC "Path to cuDNN library.")

   if(CUDNN_INCLUDE AND CUDNN_LIBRARY)


hunter_load_from_cache: add cache_done_file variable

--- cmake/modules/hunter_load_from_cache.cmake
+++ cmake/modules/hunter_load_from_cache.cmake
@@ -135,7 +135,10 @@
   file(SHA1 "${temp_deps_info}" deps_sha1)
   hunter_make_directory("${cache_meta_dir}" "${deps_sha1}" cache_meta_dir)

-  if(NOT EXISTS "${cache_meta_dir}/CACHE.DONE")
+  set(cache_sha1_file "${cache_meta_dir}/cache.sha1")
+  set(cache_done_file "${cache_meta_dir}/CACHE.DONE")
+
+  if(NOT EXISTS "${cache_done_file}")
     hunter_status_debug(
         "Cache miss (no entry found: ${cache_meta_dir}/CACHE.DONE)"
     )
@@ -144,7 +147,6 @@

   hunter_status_print("Cache HIT: ${human_readable}")

-  set(cache_sha1_file "${cache_meta_dir}/cache.sha1")
   if(NOT EXISTS "${cache_sha1_file}")
     hunter_internal_error("cache.sha1 not exists")
   endif()


Fix linking with static Qt Embedded builds

Make sure pthreads and dl get linked when building Hyperion
using a static Qt Embedded library instead of Qt X11

Former-commit-id: d1e57e9192dfb6c3c42261a9ee57ebdc85bf03cd

--- cmake/qt4/Qt4ConfigDependentSettings.cmake
+++ cmake/qt4/Qt4ConfigDependentSettings.cmake
@@ -270,6 +270,16 @@

 endif()

+if(Q_WS_QWS)
+  set(CMAKE_THREAD_PREFER_PTHREADS 1)
+  find_package(Threads)
+  if(CMAKE_USE_PTHREADS_INIT)
+    set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_THREAD_LIBS_INIT})
+  endif()
+
+  set (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})
+
+endif()

 if(Q_WS_WIN)
   set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm)


Remove debugging messages from doxygen installer.

--- build-aux/doxygen.cmake
+++ build-aux/doxygen.cmake
@@ -589,41 +589,27 @@
   if ("x${install_docs_from}" STREQUAL "x")
     set(install_from "${DOXYGEN_OUT_DIR}")
     set(rebuild TRUE)
-
-    if (DOXYGEN_CMAKE_VERBOSE)
-      message("Installing from the built docs '${install_from}' -- will be built.")
-    endif()
   else()
     set(install_from "${install_docs_from}")
     set(rebuild FALSE)
-
-    if (DOXYGEN_CMAKE_VERBOSE)
-      message("Installing from given path '${install_from}'")
-    endif()
   endif()

   if (DOXYGEN_CMAKE_VERBOSE)
-    message("* wants: '${wants}'")
-    message("* base target: '${doxygen_target}'")
-    message("* install from: '${install_from}'")
-    message("* install to: '${install_to}'")
+    message(STATUS "Details of doxygen install:")
+    message(STATUS "* wants: '${wants}'")
+    message(STATUS "* base target: '${doxygen_target}'")
+    message(STATUS "* install from: '${install_from}'")
+    message(STATUS "* install to: '${install_to}'")
+    message(STATUS "* rebuild: ${rebuild}")
   endif()

   foreach(iter ${wants})
     if (iter MATCHES "pdf")
       set(file "${install_from}/${DOXYGEN_REL_PDF_FILE}")
       set(inst "${install_to}/${DOXYGEN_REL_LATEX_DIR}")
-      if (DOXYGEN_CMAKE_VERBOSE)
-        message("pdf:\n  from: ${file}\n  to: ${inst}")
-      endif()

       if (rebuild)
         add_custom_target(depend_${doxygen_target}_pdf ALL DEPENDS "${DOXYGEN_PDF_FILE}")
-        if (DOXYGEN_CMAKE_VERBOSE)
-          message("  pdf depend target added (depend_${doxygen_target}_pdf)")
-        endif()
-      elseif(DOXYGEN_CMAKE_VERBOSE)
-        message("  no pdf depend target added")
       endif()

       install(
@@ -634,17 +620,8 @@
       set(file "${install_from}/${DOXYGEN_REL_HTML_DIR}")
       set(inst "${install_to}")

-      if (DOXYGEN_CMAKE_VERBOSE)
-        message("html:\n  from: ${file}\n  to: ${inst}")
-      endif()
-
       if (rebuild)
         add_custom_target(depend_${doxygen_target}_html ALL DEPENDS "${DOXYGEN_HTML_DIR}")
-        if (DOXYGEN_CMAKE_VERBOSE)
-          message("  html depend target added (depend_${doxygen_target}_html)")
-        endif()
-      elseif(DOXYGEN_CMAKE_VERBOSE)
-        message("  no html depend target added")
       endif()

       install(


- Maybe fix Appveyor, please  work

- Maybe fix Appveyor, please  work

--- cmake/Packaging/WindowsImageBuild.cmake
+++ cmake/Packaging/WindowsImageBuild.cmake
@@ -6,16 +6,18 @@
         ICON_ASSET )

     if(COFFEE_BUILD_ANGLE)
-        find_package ( ANGLE REQUIRED )
+
     endif()

     set ( INCLUDED_LIBS "" )
     # Locate necessary binary files
     set ( BASE_LIBS )
     if(COFFEE_BUILD_SDL2)
+        find_package ( SDL2 REQUIRED )
         list ( APPEND BASE_LIBS SDL2 )
     endif()
     if(COFFEE_BUILD_ANGLE)
+        find_package ( ANGLE REQUIRED )
         list ( APPEND BASE_LIBS AngleEGL AngleGLESv2 )
     endif()
     foreach(lib_target ${BASE_LIBS})
@@ -135,10 +137,10 @@
         ${SOURCES}
         ${WINDOWS_BASE_RESOURCE}
         ${RESOURCE_DESCRIPTOR}
-		#${RESOURCE_HEADER}
+        #${RESOURCE_HEADER}
         ${MANIFEST_FILE}
         ${INCLUDED_LIBS}
-		${RESOURCE_FILES}
+        ${RESOURCE_FILES}
         )

     if(WIN_UWP)


update ogles_gpgpu version

update ogles_gpgpu version

--- cmake/projects/ogles_gpgpu/hunter.cmake
+++ cmake/projects/ogles_gpgpu/hunter.cmake
@@ -13,7 +13,7 @@
     PACKAGE_NAME
     ogles_gpgpu
     VERSION
-    0.1.6
+    0.1.6-p1
     URL
     "https://github.com/hunter-packages/ogles_gpgpu/archive/v0.1.6-p1.tar.gz"
     SHA1


Replaced inadvertent capitolization with lower case in two function names.

--- cmake_modules/target_declarations.cmake
+++ cmake_modules/target_declarations.cmake
@@ -85,7 +85,7 @@
 #
 # System level bindings Documentation targets
 #
-function(SheafSystem_add_system_bindings_SHEAFSYSTEM_DOC_TARGETS)
+function(SheafSystem_add_system_bindings_sheafsystem_doc_targets)

    # Preconditions:

@@ -114,7 +114,7 @@
    add_custom_target(alldocs DEPENDS doc java-docs)
    set_target_properties(alldocs PROPERTIES FOLDER "Documentation Targets")

-endfunction(SheafSystem_add_system_bindings_SHEAFSYSTEM_DOC_TARGETS)
+endfunction(SheafSystem_add_system_bindings_sheafsystem_doc_targets)

 #
 # System level bindings targets
@@ -167,7 +167,7 @@
 # Add the documentation targets.
 # Default Doc state is "Dev"
 #
-function(SheafSystem_add_SHEAFSYSTEM_DOC_TARGETS)
+function(SheafSystem_add_sheafsystem_doc_targets)

    if(SHEAFSYSTEM_DOC_TARGETS)
       if(SHEAFSYSTEM_DOC_STATE MATCHES Dev OR SHEAFSYSTEM_DOC_STATE MATCHES dev OR SHEAFSYSTEM_DOC_STATE MATCHES DEV)
@@ -186,7 +186,7 @@
       set_target_properties(doc PROPERTIES FOLDER "Documentation Targets")
    endif()

-endfunction(SheafSystem_add_SHEAFSYSTEM_DOC_TARGETS)
+endfunction(SheafSystem_add_sheafsystem_doc_targets)

 #
@@ -421,10 +421,10 @@
       SheafSystem_add_realclean_target()
    endif()

-   SheafSystem_add_SHEAFSYSTEM_DOC_TARGETS()
+   SheafSystem_add_sheafsystem_doc_targets()

    if(SHEAFSYSTEM_BUILD_BINDINGS)
-      SheafSystem_add_system_bindings_SHEAFSYSTEM_DOC_TARGETS()
+      SheafSystem_add_system_bindings_sheafsystem_doc_targets()
       SheafSystem_add_system_bindings_targets()
    endif()


Oops, left 'ALL' in the uncrustify target.  Should only run on demand.

--- cmake/Uncrustify.cmake
+++ cmake/Uncrustify.cmake
@@ -32,7 +32,6 @@
     COMMENT "Uncrustifying ${THIS_DIR}")
   add_custom_target(
     "uncrustify-${THIS_DIR}"
-    ALL
     DEPENDS "${THIS_TS}")
   add_dependencies(uncrustify "uncrustify-${THIS_DIR}")
 endfunction()


Fix for compiling Cuda on Apple platform with clang

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -39,7 +39,7 @@

 # Main code dealing with each version of cuda
 IF(CUDA_FOUND)
-  IF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+  IF((CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC) OR APPLE)
     # Compatible gcc can be checked in host_config.h
     SET(GCC_PATH "")
     IF(${CUDA_VERSION} VERSION_GREATER "4.1.99")
@@ -54,6 +54,9 @@
     IF(NOT GCC_PATH)
       FIND_GCC(GCC_PATH "4" "3")
     ENDIF()
+    IF(NOT GCC_PATH)
+      FIND_GCC(GCC_PATH "4" "2")
+    ENDIF()

     IF(GCC_PATH)
       MESSAGE(STATUS "nvcc-check: Found adequate gcc (${GCC_PATH})... telling nvcc to use it!")
@@ -61,7 +64,7 @@
     ELSE(GCC_PATH)
       MESSAGE(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda.\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
     ENDIF(GCC_PATH)
-  ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+  ENDIF()

   IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "APPLE")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

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


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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 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 11)

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


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   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Another CMake 3.1 fix

Another CMake 3.1 fix

--- clangcheckTargets.cmake
+++ clangcheckTargets.cmake
@@ -39,6 +39,11 @@
     ${CLANGCHECK_EXTRA_ARGS})
   set(_exclude_pattern ".*moc_.*\\.cxx$") # Qt moc files

+  get_target_property(_imported_target "${_name}" IMPORTED)
+  if(_imported_target)
+    return()
+  endif()
+
   get_target_property(_clangcheck_sources "${_name}" SOURCES)
   set(_files)
   foreach(_source ${_clangcheck_sources})


MOD: Have cmake detect various 'multiple build config' situations a bit better

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -597,31 +597,44 @@
     unset(_FPHSA_LIBS)

     if (WIN32 OR APPLE)
-        if (CMAKE_GENERATOR MATCHES ".*Makefiles")
-            set (_BUILDCFG ${CMAKE_BUILD_TYPE})
+        if (CMAKE_CONFIGURATION_TYPES)
+            if (CMAKE_CONFIGURATION_TYPES MATCHES "Debug")
+                set (_WANT_DBG_LIBS TRUE)
+            else()
+                unset (_WANT_DBG_LIBS)
+            endif()
+            if (CMAKE_CONFIGURATION_TYPES MATCHES "Release" OR CMAKE_CONFIGURATION_TYPES MATCHES "Rel[A-Z]")
+                set (_WANT_REL_LIBS TRUE)
+            else()
+                unset (_WANT_REL_LIBS)
+            endif()
+        elseif (NOT CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE STREQUAL Debug)
+            set (_WANT_REL_LIBS TRUE)
+            unset (_WANT_DBG_LIBS)
         else()
-            unset (_BUILDCFG)
+            set (_WANT_DBG_LIBS TRUE)
+            unset (_WANT_REL_LIBS)
         endif()

         if (CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
-            if (NOT _BUILDCFG OR NOT _BUILDCFG STREQUAL Debug)
+            if (_WANT_REL_LIBS)
                 list(APPEND _FPHSA_LIBS ${_LIBBASENAMEVAR}_STATIC)
             endif()
-            if (NOT _BUILDCFG OR _BUILDCFG STREQUAL Debug)
+            if (_WANT_DBG_LIBS)
                 list(APPEND _FPHSA_LIBS ${_LIBBASENAMEVAR}_STATIC_DBG)
             endif()
         else()
-            if (NOT _BUILDCFG OR NOT _BUILDCFG STREQUAL Debug)
+            if (_WANT_REL_LIBS)
                 list(APPEND _FPHSA_LIBS ${_LIBBASENAMEVAR})
             endif()
-            if (NOT _BUILDCFG OR _BUILDCFG STREQUAL Debug)
+            if (_WANT_DBG_LIBS)
                 list(APPEND _FPHSA_LIBS ${_LIBBASENAMEVAR}_DBG)
             endif()
             if (CEGUI_BUILD_STATIC_CONFIGURATION)
-                if (NOT _BUILDCFG OR NOT _BUILDCFG STREQUAL Debug)
+                if (_WANT_REL_LIBS)
                     list(APPEND _FPHSA_LIBS ${_LIBBASENAMEVAR}_STATIC)
                 endif()
-                if (NOT _BUILDCFG OR _BUILDCFG STREQUAL Debug)
+                if (_WANT_DBG_LIBS)
                     list(APPEND _FPHSA_LIBS ${_LIBBASENAMEVAR}_STATIC_DBG)
                 endif()
             endif()
@@ -633,4 +646,3 @@
     find_package_handle_standard_args(${_PKGNAME} DEFAULT_MSG ${_FPHSA_LIBS} ${ARGN})
 endmacro()

-


CELIX-417: Some cleanup for the CelixConfig.cmake file

--- cmake/CelixConfig.cmake
+++ cmake/CelixConfig.cmake
@@ -22,22 +22,23 @@
 #  CELIX_LIBRARIES         - libraries to link against
 #  CELIX_LAUNCHER          - The Celix launcher

-set(REL_INSTALL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../..") #from lib/Cmake/Celix
+# relative install dir from lib/CMake/Celix.
+get_filename_component(REL_INSTALL_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(REL_INSTALL_DIR "${REL_INSTALL_DIR}" PATH)
+get_filename_component(REL_INSTALL_DIR "${REL_INSTALL_DIR}" PATH)
+get_filename_component(REL_INSTALL_DIR "${REL_INSTALL_DIR}" PATH)

+include("${REL_INSTALL_DIR}/share/celix/cmake/cmake_celix/UseCelix.cmake") #adds celix commands (e.g. add_celix_bundle)
+include("${REL_INSTALL_DIR}/share/celix/cmake/CelixTargets.cmake") #imports lib and exe targets (e.g. Celix::framework)
+include("${REL_INSTALL_DIR}/share/celix/cmake/CelixBundleTargets.cmake") #imports bundle targets (e.g. Celix::shell)
+
+# The rest is added to ensure backwards compatiblity with project using the cmake lib/include var instead of targets.
 set(CELIX_CMAKE_MODULES_DIR ${REL_INSTALL_DIR}/share/celix/cmake/Modules)
+
 set(CELIX_FRAMEWORK_INCLUDE_DIR "${REL_INSTALL_DIR}/include/celix")
 set(CELIX_UTILS_INCLUDE_DIR "${REL_INSTALL_DIR}/include/utils")
 set(CELIX_DFI_INCLUDE_DIR "${REL_INSTALL_DIR}/include/dfi")

-include("${REL_INSTALL_DIR}/share/celix/cmake/cmake_celix/UseCelix.cmake")
-
-if(NOT TARGET Celix::framework)
-  include("${REL_INSTALL_DIR}/share/celix/cmake/CelixTargets.cmake")
-  include("${REL_INSTALL_DIR}/share/celix/cmake/CelixBundleTargets.cmake")
-endif()
-
-
-# The rest is added to ensure backwards compatiblity with project using the cmake lib/include var instead of targets.
 set(CELIX_LIBRARIES Celix::framework Celix::utils Celix::dfi)
 set(CELIX_INCLUDE_DIRS
   $<TARGET_PROPERTY:Celix::framework,INTERFACE_INCLUDE_DIRECTORIES>
@@ -68,4 +69,4 @@

 set(CELIX_BUNDLES_DIR ${REL_INSTALL_DIR}/share/celix/bundles)
 set(CELIX_SHELL_BUNDLE ${CELIX_BUNDLES_DIR}/shell.zip)
-set(CELIX_SHELL_TUI_BUNDLE ${CELIX_BUNDLES_DIR}/shell_tui.zip)+set(CELIX_SHELL_TUI_BUNDLE ${CELIX_BUNDLES_DIR}/shell_tui.zip)


cmake: fix clang-format windows support

cmake: fix clang-format windows support

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -4,14 +4,15 @@

 find_program(CLANG_FORMAT_PROGRAM NAMES ${CLANG_FORMAT_COMMAND})

-execute_process(COMMAND "${CLANG_FORMAT_PROGRAM}" "--version"
-                OUTPUT_VARIABLE CLANG_TIDY_VERSION_FULL_STRING)
-string(REGEX MATCH [=[[0-9]\.[0-9].[0-9]]=] VERSION "${CLANG_TIDY_VERSION_FULL_STRING}")
-if(VERSION VERSION_LESS "7.0.0")
-    message(STATUS "clang-format version ${VERSION} is not greater or equal to 7.0.0")
-    set(CLANG_FORMAT_TERMINATE On)
-endif()
-if(NOT CLANG_FORMAT_PROGRAM)
+if(CLANG_FORMAT_PROGRAM)
+    execute_process(COMMAND "${CLANG_FORMAT_PROGRAM}" "--version"
+                    OUTPUT_VARIABLE CLANG_TIDY_VERSION_FULL_STRING)
+    string(REGEX MATCH [=[[0-9]\.[0-9]\.[0-9]]=] VERSION "${CLANG_TIDY_VERSION_FULL_STRING}")
+    if(VERSION VERSION_LESS "7.0.0")
+        message(STATUS "clang-format version ${VERSION} is not greater or equal to 7.0.0")
+        set(CLANG_FORMAT_TERMINATE On)
+    endif()
+else()
     message(STATUS "clang-format not found")
     set(CLANG_FORMAT_TERMINATE On)
 endif()
@@ -48,7 +49,7 @@
     list(APPEND FULL_SOURCES_LIST ${TARGET_SOURCES} ${ARGV1})
     list(REMOVE_DUPLICATES FULL_SOURCES_LIST)
     foreach(SOURCE_FILE ${FULL_SOURCES_LIST})
-        if(SOURCE_FILE MATCHES [=[^/.*$]=])
+        if(SOURCE_FILE MATCHES [=[^([A-Z]:)?/.*$]=])
             set(FULL_SOURCE_PATH "${SOURCE_FILE}")
         else()
             set(FULL_SOURCE_PATH "${TARGET_DIR}/${SOURCE_FILE}")


Remove DEPS_DIR from Mac rpath

Remove DEPS_DIR from Mac rpath

It is redundant since we have the executable's directory in the rpath
also, and we copy the dependencies to this directory in the build.

Fixes #387.

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -335,7 +335,7 @@
 if (APPLE)
     add_definitions(-DMACOS_X)
     set_linker_flag("-Wl,-no_pie")
-    set(CMAKE_INSTALL_RPATH "@executable_path/;${DEPS_DIR};${DEPS_DIR}/lib")
+    set(CMAKE_INSTALL_RPATH "@executable_path")
     set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
 endif()


MAINT: fix build error.

MAINT: fix build error.

--- cmake/FindDO_Sara.cmake
+++ cmake/FindDO_Sara.cmake
@@ -37,7 +37,9 @@

   # Image and Video I/O.
   sara_append_components(DO_Sara_COMPONENTS ImageIO)
-  sara_append_components(DO_Sara_COMPONENTS VideoIO)
+  if (DO_SARA_BUILD_VIDEOIO)
+    sara_append_components(DO_Sara_COMPONENTS VideoIO)
+  endif ()

   # Image processing.
   sara_append_components(DO_Sara_COMPONENTS ImageProcessing)


Fix library dependence in rootmaps for ROOT6

--- cmake/FindFASTJET.cmake
+++ cmake/FindFASTJET.cmake
@@ -147,7 +147,7 @@
                     message(FATAL_ERROR "GMP not installed: install it or specify a custom one with -DGMP")
                 endif()
             endif(GMP)
-            list(APPEND fjextralibs "GMP")
+            list(APPEND fjextralibs "gmp")
         else()
             message(STATUS "FastJet was compiled witouth GMP")
         endif(fastjetgmp GREATER -1)
@@ -171,7 +171,7 @@
                     message(FATAL_ERROR "MPFR not installed: install it or specify a custom one with -DMPFR")
                 endif()
             endif(MPFR)
-            list(APPEND fjextralibs "MPFR")
+            list(APPEND fjextralibs "mpfr")
         else()
             message(STATUS "FastJet was compiled witouth MPFR")
         endif(fastjetmpfr GREATER -1)
@@ -204,7 +204,7 @@
     if(ROOT_VERSION_MAJOR GREATER 5)
         set(FASTJET_ROOTDICT_OPTS "-I${FASTJET_INCLUDE_DIR}")
         foreach(fjl ${fjlibs};${fjextralibs})
-            set(FASTJET_ROOTDICT_OPTS "${FASTJET_ROOTDICT_OPTS} -rml ${fjl}")
+            set(FASTJET_ROOTDICT_OPTS "${FASTJET_ROOTDICT_OPTS} -rml lib${fjl}")
         endforeach()
     endif(ROOT_VERSION_MAJOR GREATER 5)


better config for pardiso

better config for pardiso

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

--- cmake/FindPardiso.cmake
+++ cmake/FindPardiso.cmake
@@ -1,6 +1,11 @@

-find_library(PARDISO_LIBRARY NAMES pardiso500-INTEL1301-X86-64 pardiso500-GNU481-X86-64 pardiso500-GNU472-X86-64 pardiso500-MACOS-X86-64 libpardiso500-WIN-X86-64
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+   find_library(PARDISO_LIBRARY NAMES pardiso500-INTEL1301-X86-64 pardiso412-INTEL120-X86-64 pardiso411-INTEL101-X86-64 HINTS ${CMAKE_BINARY_DIR}/lib ${Pardiso_DIR} ${Pardiso_DIR}/lib)
+else()
+   find_library(PARDISO_LIBRARY NAMES pardiso500-GNU481-X86-64 pardiso500-GNU472-X86-64 pardiso412-GNU450-X86-64 pardiso412-GNU430-X86-64 pardiso411-GNU443-X86-64 pardiso500-MACOS-X86-64 libpardiso500-WIN-X86-64 libpardiso412-WIN-X86-64 libpardiso412-WIN-X86
              HINTS ${CMAKE_BINARY_DIR}/lib ${Pardiso_DIR} ${Pardiso_DIR}/lib)
+endif()

 if(PARDISO_LIBRARY)
 	get_filename_component(PARDISO_LIBRARY_DIR ${PARDISO_LIBRARY} PATH)


cmake: fix ocv_add_testdata() hardcoded path

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -1116,7 +1116,7 @@
     endif()
     if(INSTALL_TESTS)
       install(DIRECTORY ${basedir}/
-              DESTINATION ${OPENCV_TEST_DATA_INSTALL_PATH}/contrib/text
+              DESTINATION ${OPENCV_TEST_DATA_INSTALL_PATH}/${dest_subdir}
               COMPONENT "tests"
               ${ARGN}
       )


Bump up GStreamer MSDK plugin version to 1.3.0

--- cmake/ProjectInfo.cmake
+++ cmake/ProjectInfo.cmake
@@ -1,6 +1,6 @@
 set(GstMfx_VERSION_MAJOR   1)
-set(GstMfx_VERSION_MINOR   2)
-set(GstMfx_VERSION_PATCH   2)
+set(GstMfx_VERSION_MINOR   3)
+set(GstMfx_VERSION_PATCH   0)
 set(GstMfx_PACKAGE         "gstmfx")
 set(GstMfx_PACKAGE_NAME    "GStreamer Media SDK")
 set(GstMfx_PACKAGE_TARNAME "gstreamer-msdk")


[build] Allow building test when LLVM is off (#6327)

This is not a perfect fix since some of the C++ tests won't run without
an available cpu backend but at least this PR let it pass the building
phase.

Issue: #

### Brief Summary

--- cmake/TaichiTests.cmake
+++ cmake/TaichiTests.cmake
@@ -12,12 +12,10 @@
 # 2. Re-implement the legacy CPP tests using googletest
 file(GLOB_RECURSE TAICHI_TESTS_SOURCE
         "tests/cpp/analysis/*.cpp"
-        "tests/cpp/aot/llvm/*.cpp"
         "tests/cpp/backends/*.cpp"
         "tests/cpp/codegen/*.cpp"
         "tests/cpp/common/*.cpp"
         "tests/cpp/ir/*.cpp"
-        "tests/cpp/llvm/*.cpp"
         "tests/cpp/program/*.cpp"
         "tests/cpp/struct/*.cpp"
         "tests/cpp/transforms/*.cpp"
@@ -27,6 +25,11 @@
     file(GLOB TAICHI_TESTS_GFX_UTILS_SOURCE
         "tests/cpp/aot/gfx_utils.cpp")
     list(APPEND TAICHI_TESTS_SOURCE ${TAICHI_TESTS_GFX_UTILS_SOURCE})
+endif()
+
+if(TI_WITH_LLVM)
+  file(GLOB TAICHI_TESTS_LLVM_SOURCE "tests/cpp/aot/llvm/*.cpp" "tests/cpp/llvm/*.cpp")
+  list(APPEND TAICHI_TESTS_SOURCE ${TAICHI_TESTS_LLVM_SOURCE})
 endif()

 if(TI_WITH_VULKAN)


Correctly handle metadata for misnamed standalones.

--- cmake/bde_package.cmake
+++ cmake/bde_package.cmake
@@ -93,9 +93,11 @@
     string(REGEX MATCH "^([az]_)" packagePrefix "${packageName}")

     if ( packagePrefix STREQUAL "a_" )
-      set(packagePartition "adapters")
+        set(packagePartition "adapters")
     elseif ( packagePrefix STREQUAL "z_" )
-      set(packagePartition "wrappers")
+        set(packagePartition "wrappers")
+    else()
+        return()
     endif()

     # Install meta files


fix FindLLVM to actually fail the build if LLVM is not found.

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -71,6 +71,12 @@
       #CMAKE_FORCE_CXX_COMPILER(${LLVM_GXX_EXECUTABLE} GNU)
   endif(LLVM_GXX_EXECUTABLE)

+  if(LLVM_CONFIG_EXECUTABLE)
+      MESSGAE(STATUS "LLVM llvm-config found at: ${LLVM_CONFIG_EXECUTABLE}")
+  else(LLVM_CONFIG_EXECUTABLE)
+      MESSAGE(FATAL_ERROR "Could NOT find LLVM")
+  endif(LLVM_CONFIG_EXECUTABLE)
+
   MACRO(FIND_LLVM_LIBS LLVM_CONFIG_EXECUTABLE _libname_ LIB_VAR OBJECT_VAR)
     exec_program( ${LLVM_CONFIG_EXECUTABLE} ARGS --libs ${_libname_}  OUTPUT_VARIABLE ${LIB_VAR} )
     STRING(REGEX MATCHALL "[^ ]*[.]o[ $]"  ${OBJECT_VAR} ${${LIB_VAR}})


Add ITK module label for GTest based tests

--- CMake/UseGTest.cmake
+++ CMake/UseGTest.cmake
@@ -45,7 +45,10 @@
 #  License text for the above reference.)
 #
 # Thanks to Daniel Blezek <blezek@gmail.com> for the GTEST_ADD_TESTS code
-
+#
+# ADDITIONS
+# Set test label to itk_module if defined.
+#
 function(GTEST_ADD_TESTS executable extra_args)
     if(NOT ARGN)
         message(FATAL_ERROR "Missing ARGN: Read the documentation for GTEST_ADD_TESTS")
@@ -74,6 +77,16 @@
             continue()
           endif()
           add_test(NAME ${test_name} COMMAND ${executable} --gtest_filter=${test_name} ${extra_args})
+
+#
+# Addition from upstream CMake version.
+#
+          if(itk-module)
+            set_property(TEST ${test_name} PROPERTY LABELS ${itk-module})
+          endif()
+#
+#
+#
         endforeach()
     endforeach()
 endfunction()


Denoise logging

Denoise logging

--- CMake/logtrace.cmake
+++ CMake/logtrace.cmake
@@ -11,8 +11,7 @@
 add_definitions(
 # enable logging in general
  -DPKFXLOG
- -DFXLOG_IT_API_O_VERBS_CONNECT=1
- -DFXLOG_IT_API_O_VERBS=1
+
 # all logging enabled
 # -DSKV_LOGGING_ALL=1


Fixed libpng URL and MD5

Fixed libpng URL and MD5

--- CMake/ExternalPNG.cmake
+++ CMake/ExternalPNG.cmake
@@ -31,8 +31,8 @@
     PREFIX ${libpng_PREFIX}

     DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}
-    URL ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.6.tar.gz
-    URL_MD5 8b0c05ed12637ee1f060ddfbbf526ea3
+    URL ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.7.tar.gz
+    URL_MD5 944b56a84b65d94054cc73d7ff965de8

     INSTALL_DIR ${POLYCODE_DEPS_CORE_PREFIX}
     CMAKE_ARGS ${libpng_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=${install_dir} # to find zlib


ENH: upgrade SuperBuild GDAL to 3.2.2

ENH: upgrade SuperBuild GDAL to 3.2.2

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -149,8 +149,8 @@

 ExternalProject_Add(GDAL
   PREFIX GDAL
-  URL "https://download.osgeo.org/gdal/3.2.1/gdal-3.2.1.tar.xz"
-  URL_MD5 cf7fe042403e73ad991aa5797247b586
+  URL "https://download.osgeo.org/gdal/3.2.2/gdal-3.2.2.tar.xz"
+  URL_MD5 c656be582f7beb528c66486cd1fca7a2
   SOURCE_DIR ${GDAL_SB_SRC}
   BINARY_DIR ${GDAL_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys 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   06)
+SET(KWSYS_DATE_STAMP_DAY   07)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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

 # 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
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 06)
+SET(KWSYS_DATE_STAMP_MONTH 07)

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


Fix #17: Fix compile search order

Fix #17: Fix compile search order

--- cmake-d/CMakeDetermineDCompiler.cmake
+++ cmake-d/CMakeDetermineDCompiler.cmake
@@ -44,7 +44,7 @@
   if(CMAKE_D_COMPILER_INIT)
     set(CMAKE_D_COMPILER_LIST ${CMAKE_D_COMPILER_INIT})
   else()
-    set(CMAKE_D_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gdc ${_CMAKE_TOOLCHAIN_PREFIX}dmd  ${_CMAKE_TOOLCHAIN_PREFIX}ldc2)
+    set(CMAKE_D_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}dmd ${_CMAKE_TOOLCHAIN_PREFIX}ldc2 ${_CMAKE_TOOLCHAIN_PREFIX}gdc)
   endif()

   # Find the compiler.


[cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones.

* Previously part of https://reviews.llvm.org/D41622.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@323171 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CheckLibcxxAtomic.cmake
+++ cmake/Modules/CheckLibcxxAtomic.cmake
@@ -9,7 +9,7 @@

 function(check_cxx_atomics varname)
   set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-  set(CMAKE_REQUIRED_FLAGS "-nodefaultlibs -std=c++11 -nostdinc++ -isystem ${LIBCXX_SOURCE_DIR}/include")
+  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs -std=c++11 -nostdinc++ -isystem ${LIBCXX_SOURCE_DIR}/include")
   if (${LIBCXX_GCC_TOOLCHAIN})
     set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} --gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}")
   endif()


From Pere:
small fix for https://savannah.cern.ch/bugs/?98510

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@47487 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -423,6 +423,8 @@
 configure_file(${CMAKE_SOURCE_DIR}/config/memprobe.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/memprobe @ONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/thisroot.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.sh @ONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/thisroot.csh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.csh @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/config/setxrd.csh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/setxrd.csh COPYONLY)
+configure_file(${CMAKE_SOURCE_DIR}/config/setxrd.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/setxrd.sh COPYONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/genreflex.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/genreflex @ONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/genreflex-rootcint.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/genreflex-rootcint @ONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/proofserv.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/proofserv @ONLY)
@@ -438,7 +440,9 @@
               ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/memprobe
               ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.sh
               ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.csh
-			  ${thisrootbat}
+              ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/setxrd.csh
+              ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/setxrd.sh
+              ${thisrootbat}
               ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root-config
               ${CMAKE_SOURCE_DIR}/cmake/scripts/setenvwrap.csh
               ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/roots


WIP: Hopefully fixed "fatal: Not a git repository (or any of the parent directories): .git" and "Invalid escape sequence \:" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-126-Make-compilation-logs-public/22/console

--- CTest.cmake
+++ CTest.cmake
@@ -22,20 +22,20 @@

 set(CTEST_SITE "lkeb-selx01")

-find_program(CTEST_GIT_COMMAND NAMES git)
+find_package( Git REQUIRED )

 execute_process (
-    COMMAND ${CTEST_GIT_COMMAND} rev-parse --short HEAD
+    COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     OUTPUT_VARIABLE SELX_GIT_COMMIT_SHA
 )
 execute_process (
-    COMMAND ${CTEST_GIT_COMMAND} name-rev --name-only HEAD
+    COMMAND ${GIT_EXECUTABLE} name-rev --name-only HEAD
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     OUTPUT_VARIABLE SELX_GIT_BRANCH_NAME
 )

-set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};commit=SHA\:${SELX_GIT_COMMIT_SHA}")
+set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};commit=SHA\\:${SELX_GIT_COMMIT_SHA}")

 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(CTEST_BUILD_CONFIGURATION Release)
@@ -45,10 +45,10 @@

 if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-  set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone https://github.com/SuperElastix/SuperElastix.git ${CTEST_SOURCE_DIRECTORY}")
+  set(CTEST_CHECKOUT_COMMAND "${GIT_EXECUTABLE} clone https://github.com/SuperElastix/SuperElastix.git ${CTEST_SOURCE_DIRECTORY}")
 endif()

-set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
+set(CTEST_UPDATE_COMMAND "${GIT_EXECUTABLE}")

 set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DWITH_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")


ENH: Bump version of TubeTK

ENH: Bump version of TubeTK

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "8df6fbadfc411aeff8dd2beab7283dc9ed88b352"
+    GIT_TAG "1cd6310caf074e4a69688774897525ab5d05eb73"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Fixed looking for thread

Fixed looking for thread

--- CMakeModules/CheckIncludeFileCXX.cmake
+++ CMakeModules/CheckIncludeFileCXX.cmake
@@ -50,9 +50,10 @@
     endif()
     if(${ARGC} EQUAL 3)
       set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
-      string(APPEND CMAKE_CXX_FLAGS " ${ARGV2}")
+      list(APPEND CMAKE_CXX_FLAGS " ${ARGV2}")
     endif()

+  MESSAGE("COMPILING WITH FLAGS " ${CMAKE_CXX_FLAGS})
 	try_compile(${VARIABLE}
       ${CMAKE_BINARY_DIR}
       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
@@ -63,7 +64,6 @@
       OUTPUT_VARIABLE OUTPUT)

     if(${ARGC} EQUAL 3)
-		message("argc = 3 in checkincludefile-cxx")
       set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE})
     endif()


Remove CLR_CMAKE_TARGET_UBUNTU_LINUX and CLR_CMAKE_PLATFORM_UBUNTU_LINUX (#26663)

They are unused. Nothing ever checks for either of them.

--- configurecompiler.cmake
+++ configurecompiler.cmake
@@ -61,15 +61,10 @@

     # Detect Linux ID
     if(DEFINED CLR_CMAKE_LINUX_ID)
-        if(CLR_CMAKE_LINUX_ID STREQUAL ubuntu)
-            set(CLR_CMAKE_TARGET_UBUNTU_LINUX 1)
-        elseif(CLR_CMAKE_LINUX_ID STREQUAL tizen)
+        if(CLR_CMAKE_LINUX_ID STREQUAL tizen)
             set(CLR_CMAKE_TARGET_TIZEN_LINUX 1)
         elseif(CLR_CMAKE_LINUX_ID STREQUAL alpine)
             set(CLR_CMAKE_PLATFORM_ALPINE_LINUX 1)
-        endif()
-        if(CLR_CMAKE_LINUX_ID STREQUAL ubuntu)
-            set(CLR_CMAKE_PLATFORM_UBUNTU_LINUX 1)
         endif()
     endif(DEFINED CLR_CMAKE_LINUX_ID)
 endif(CMAKE_SYSTEM_NAME STREQUAL Linux)


Added start menu entry for change log PDF file

--- contrib/createDoc.cmake
+++ contrib/createDoc.cmake
@@ -138,6 +138,13 @@
 	      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
 	      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\TIGL-Guide.lnk\\\"
 	    ")
+	    SET(CPACK_NSIS_CREATE_ICONS_EXTRA ${CPACK_NSIS_CREATE_ICONS_EXTRA} "
+          CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\TIGL-ChangeLog.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\tigl\\\\changeLog.pdf\\\"
+	    ")
+	    SET(CPACK_NSIS_DELETE_ICONS_EXTRA ${CPACK_NSIS_DELETE_ICONS_EXTRA} "
+	      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+          Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\TIGL-ChangeLog.lnk\\\"
+	    ")

 	else()


add rich labels to each test function

add rich labels to each test function

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -37,7 +37,8 @@
        ${CMAKE_Fortran_COMPILER_ID}     # [Intel,GNU]
   )
   # limit each test to 45 minutes: 2700s
-  set_tests_properties(${testname} PROPERTIES TIMEOUT 2700 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "regression")
+  set(LABELS openfast regression)
+  set_tests_properties(${testname} PROPERTIES TIMEOUT 2700 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "${LABELS}")
 endfunction(of_regression)

 function(bd_regression testname)
@@ -55,8 +56,9 @@
        ${BUILD_DIRECTORY}               # build directory for test
        ${TOLERANCE}
   )
-  # limit each test to 25 minutes: 1500s
-  set_tests_properties(${testname} PROPERTIES TIMEOUT 1500 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "regression")
+  # limit each test to 45 minutes: 2700s
+  set(LABELS beamdyn regression)
+  set_tests_properties(${testname} PROPERTIES TIMEOUT 2700 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "${LABELS}")
 endfunction(bd_regression)

 #===============================================================================


Fix the CMP0022 policy on CMake 2.8.12+

Fix the CMP0022 policy on CMake 2.8.12+

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -204,9 +204,16 @@
     set_target_properties(${_LIB_NAME} PROPERTIES DEFINE_SYMBOL ${_CEGUI_EXPORT_DEFINE})

     if (NOT CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
-        set_target_properties(${_LIB_NAME} PROPERTIES
-            LINK_INTERFACE_LIBRARIES ""
-        )
+        # Starting with CMake 2.8.12 LINK_INTERFACE_LIBRARIES was renamed to INTERFACE_LINK_LIBRARIES
+        if (${CMAKE_VERSION} VERSION_GREATER 2.8.12 OR ${CMAKE_VERSION} VERSION_EQUAL 2.8.12)
+            set_target_properties(${_LIB_NAME} PROPERTIES
+                INTERFACE_LINK_LIBRARIES ""
+            )
+        else()
+            set_target_properties(${_LIB_NAME} PROPERTIES
+                LINK_INTERFACE_LIBRARIES ""
+            )
+        endif()
     endif()

     if (APPLE)


search for leveldb debug library

search for leveldb debug library

--- cmake/FindLevelDB.cmake
+++ cmake/FindLevelDB.cmake
@@ -25,6 +25,19 @@
 set(LEVELDB_INCLUDE_DIRS ${LEVELDB_INCLUDE_DIR})
 set(LEVELDB_LIBRARIES ${LEVELDB_LIBRARY})

+# debug library on windows
+# same naming convention as in qt (appending debug library with d)
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+	find_library(
+		LEVELDB_LIBRARY_DEBUG
+		NAMES leveldbd
+		DOC "leveldb debug library"
+	)
+
+	set(LEVELDB_LIBRARIES ${LEVELDB_LIBRARIES} ${LEVELDB_LIBRARY_DEBUG})
+
+endif()
+
 # handle the QUIETLY and REQUIRED arguments and set LEVELDB_FOUND to TRUE
 # if all listed variables are TRUE, hide their existence from configuration view
 include(FindPackageHandleStandardArgs)


Fix in only debug-level panda3d

Fix in only debug-level panda3d

--- cmake/Findpanda3d.cmake
+++ cmake/Findpanda3d.cmake
@@ -27,8 +27,12 @@

 cmake_minimum_required(VERSION 3.6)

-if(NOT panda3d_ROOT_RELEASE)
+if(panda3d_ROOT AND NOT panda3d_ROOT_RELEASE)
     set(panda3d_ROOT_RELEASE "${panda3d_ROOT}")
+endif()
+
+if(panda3d_ROOT AND NOT panda3d_ROOT_DEBUG)
+    set(panda3d_ROOT_DEBUG "${panda3d_ROOT}")
 endif()

 set(panda3d_DEFAULT_COMPONENTS p3framework panda pandaexpress p3dtool p3dtoolconfig p3direct p3interrogatedb)


Fix typo

Fix typo

--- cmake/LIEFOptions.cmake
+++ cmake/LIEFOptions.cmake
@@ -73,7 +73,7 @@
 if(LIEF_DISABLE_FROZEN)
   set(_LIEF_USE_FROZEN OFF)
 endif()
-cmake_dependent_option(LIEF_OPT_FROZEN_EXTERNAL "Install LIEF Compiled examples" OFF
+cmake_dependent_option(LIEF_OPT_FROZEN_EXTERNAL "Use an external provided version of Frozen" OFF
                        "_LIEF_USE_FROZEN" OFF)

 set(LIEF_ELF_SUPPORT 0)


Create tbag_modules__copy_file() cmake macro.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -179,6 +179,7 @@

 #/// Write Text to String C++11 header file.
 #///
+#/// @param __target      [in] Target name.
 #/// @param __output_path [in] Output header file path.
 #/// @param __name        [in] Variable name.
 #/// @param __delimiter   [in] Delimiter of C++11 string literal.
@@ -197,6 +198,38 @@
     list (APPEND TBAG_PROJECT_DEPENDENCIES ${__target})
 endmacro ()

+#/// Copy raw files.
+#///
+#/// @param __target             [in] Target name.
+#/// @param __source_prefix      [in] Source prefix.
+#/// @param __destination_prefix [in] Destination prefix.
+#/// @param __glob               [in] File glob pattern.
+macro (tbag_modules__copy_file __target __source_prefix __destination_prefix __glob)
+    set (__copy_files)
+    file (GLOB __glob_files RELATIVE "${__source_prefix}" "${__source_prefix}${__glob}")
+
+    foreach (__cursor ${__glob_files})
+        set (__cursor_src  "${__source_prefix}${__cursor}")
+        set (__cursor_dest "${__destination_prefix}${__cursor}")
+        tbag_debug (tbag_modules__copy_file "Target(${__target}) copy info: ${__cursor_src} -> ${__cursor_dest}")
+        add_custom_command (
+                OUTPUT  "${__cursor_dest}"
+                COMMAND ${CMAKE_COMMAND} -E copy "${__cursor_src}" "${__cursor_dest}"
+                DEPENDS "${__cursor_src}")
+        list (APPEND __copy_files "${__cursor_dest}")
+        unset (__cursor_src)
+        unset (__cursor_dest)
+    endforeach ()
+
+    add_custom_target (${__target} ALL
+            DEPENDS ${__copy_files}
+            COMMENT "Copying assets: ${__source_prefix}${__glob} -> ${__destination_prefix}${__glob}")
+    unset (__glob_files)
+    unset (__copy_files)
+
+    list (APPEND TBAG_PROJECT_DEPENDENCIES ${__target})
+endmacro ()
+
 ## -----
 ## CUDA.
 ## -----


[cmake] add add_nasm_step() to import_nasm.cmake

--- cmake/import_nasm.cmake
+++ cmake/import_nasm.cmake
@@ -24,3 +24,25 @@
 endif()

 #...............................................................................
+
+macro(
+add_nasm_step
+	_OUTPUT_FILE
+	_INPUT_FILE
+)
+
+	if(NOT NASM_FOUND)
+		message(FATAL_ERROR "NASM is required for add_nasm_step() macro")
+	endif()
+
+	axl_make_path(_OUTPUT_PATH ${_OUTPUT_FILE} ${CMAKE_CURRENT_BINARY_DIR})
+	axl_make_path(_INPUT_PATH ${_INPUT_FILE} ${CMAKE_CURRENT_SOURCE_DIR})
+
+	add_custom_command(
+		OUTPUT ${_OUTPUT_PATH}
+		MAIN_DEPENDENCY ${_INPUT_PATH}
+		COMMAND ${NASM_EXE} -o${_OUTPUT_PATH} ${ARGN} ${_INPUT_PATH}
+	)
+endmacro()
+
+#...............................................................................


nm

nm

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@699 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -146,7 +146,7 @@
     #
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     PCL_LINK_OPENMP(${_exename})
-	add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
+  	add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
 endmacro(PCL_ADD_TEST)


cmake: Fix "make usage" regression from the ZEPHYR_BASE change

$ENV{ZEPHYR_BASE} was recently search-replaced with ${ZEPHYR_BASE},
but some CMake code, like usage.cmake, is run by a seperate CMake
build system that does not have access to the CMake variable
ZEPHYR_BASE.

This patch reverts the usage of ${ZEPHYR_BASE} back to use
$ENV{ZEPHYR_BASE} in usage.cmake.

This has been proven to work on both Windows and Linux.

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

--- cmake/usage/usage.cmake
+++ cmake/usage/usage.cmake
@@ -12,7 +12,7 @@
   xtensa
   )

-set(board_dir ${ZEPHYR_BASE}/boards)
+set(board_dir $ENV{ZEPHYR_BASE}/boards)

 foreach(arch ${arch_list})
   set(board_arch_dir ${board_dir}/${arch})


ManageTarget: Refactored

ManageTarget: Refactored

--- Modules/ManageTarget.cmake
+++ Modules/ManageTarget.cmake
@@ -1,11 +1,12 @@
-# - Modules for managing targets and outputs.
+# - Manage targets and output files.
 #
-# Includes:
-#   ManageVariable
+# Included Modules:
+#   - ManageVariable
 #
 # Defines following functions:
-#   ADD_CUSTOM_TARGET_COMMAND(target OUTPUT file1 [file2 ..]
-#     [ALL] [NO_FORCE] COMMAND command1 ...
+#   ADD_CUSTOM_TARGET_COMMAND(<target> OUTPUT <file1> ...
+#     [ALL] [NO_FORCE] COMMAND <command1> ...
+#     [<addCustomTargetOpt> ...]
 #   )
 #   - Combine ADD_CUSTOM_TARGET and ADD_CUSTOM_COMMAND.
 #     This command is handy if you want a target that always refresh
@@ -15,43 +16,44 @@
 #     If you also want a target that run only if output files
 #     do not exist or outdated. Specify "NO_FORCE".
 #     The target for that will be "<target>_no_force".
-#
 #     * Parameters:
 #       + target: target for this command
-#       + OUTPUT file1, file2 ... : Files to be outputted by this command
+#       + OUTPUT file1 ... : Files to be outputted by this command
 #       + ALL: (Optional) The target is built with target 'all'
 #       + NO_FORCE: (Optional) Produce a target that run only if
 #         output files do not exist or outdated.
-#       + command1 ... : Command to be run.
-#         The rest arguments are same with  ADD_CUSTOM_TARGET.
+#       + COMMAND command ... : Command to be run.
+#       + addCustomTargetOpt ...: ADD_CUSTOM_TARGET.options.
+#     * Targets:
+#       + <target>: Target to be invoke.
 #

-IF(NOT DEFINED _MANAGE_TARGET_CMAKE_)
-    SET(_MANAGE_TARGET_CMAKE_ "DEFINED")
-    INCLUDE(ManageVariable)
-    FUNCTION(ADD_CUSTOM_TARGET_COMMAND target)
-	SET(_validOptions "OUTPUT" "ALL" "NO_FORCE" "COMMAND")
-	VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN})
-	IF(DEFINED _opt_ALL)
-	    SET(_all "ALL")
-	ELSE(DEFINED _opt_ALL)
-	    SET(_all "")
-	ENDIF(DEFINED _opt_ALL)
+IF(DEFINED _MANAGE_TARGET_CMAKE_)
+    RETURN()
+ENDIF(DEFINED _MANAGE_TARGET_CMAKE_)
+SET(_MANAGE_TARGET_CMAKE_ "DEFINED")
+INCLUDE(ManageVariable)
+FUNCTION(ADD_CUSTOM_TARGET_COMMAND target)
+    SET(_validOptions "OUTPUT" "ALL" "NO_FORCE" "COMMAND")
+    VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN})
+    IF(DEFINED _opt_ALL)
+	SET(_all "ALL")
+    ELSE(DEFINED _opt_ALL)
+	SET(_all "")
+    ENDIF(DEFINED _opt_ALL)

-	ADD_CUSTOM_TARGET(${target} ${_all}
-	    COMMAND ${_opt_COMMAND}
+    ADD_CUSTOM_TARGET(${target} ${_all}
+	COMMAND ${_opt_COMMAND}
+	)
+
+    ADD_CUSTOM_COMMAND(OUTPUT ${_opt_OUTPUT}
+	COMMAND ${_opt_COMMAND}
+	)
+
+    IF(DEFINED _opt_NO_FORCE)
+	ADD_CUSTOM_TARGET(${target}_no_force
+	    DEPENDS ${_opt_OUTPUT}
 	    )
+    ENDIF(DEFINED _opt_NO_FORCE)
+ENDFUNCTION(ADD_CUSTOM_TARGET_COMMAND)

-	ADD_CUSTOM_COMMAND(OUTPUT ${_opt_OUTPUT}
-	    COMMAND ${_opt_COMMAND}
-	    )
-
-	IF(DEFINED _opt_NO_FORCE)
-	    ADD_CUSTOM_TARGET(${target}_no_force
-		DEPENDS ${_opt_OUTPUT}
-		)
-	ENDIF(DEFINED _opt_NO_FORCE)
-    ENDFUNCTION(ADD_CUSTOM_TARGET_COMMAND)
-
-ENDIF(NOT DEFINED _MANAGE_TARGET_CMAKE_)
-


cmake: move code for reading the build settings to a function

--- bootstrap/cmake/build-settings.cmake
+++ bootstrap/cmake/build-settings.cmake
@@ -1,69 +1,64 @@
-file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../../build-settings.txt" file_settings_data)
+function (read_build_settings)
+	file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../../build-settings.txt" file_settings_data)
+	foreach (line ${file_settings_data})
+		if (NOT "${line}" MATCHES "^//.*$")
+			string(REGEX MATCH "[^:]+:" key "${line}")
+			string(REGEX MATCH ":.*" value "${line}")
+			string(LENGTH "${key}" length)
+			math(EXPR length "${length} - 1")
+			string(SUBSTRING "${key}" 0 ${length} key)
+			string(SUBSTRING "${value}" 1 -1 value)
+			string(STRIP "${key}" key)
+			string(STRIP "${value}" value)

-foreach (line ${file_settings_data})
-	if (NOT "${line}" MATCHES "^//.*$")
-		string(REGEX MATCH "[^:]+:" key "${line}")
-		string(REGEX MATCH ":.*" value "${line}")
-		string(LENGTH "${key}" length)
-		math(EXPR length "${length} - 1")
-		string(SUBSTRING "${key}" 0 ${length} key)
-		string(SUBSTRING "${value}" 1 -1 value)
-		string(STRIP "${key}" key)
-		string(STRIP "${value}" value)
+			set("nany_${key}" "${value}" CACHE INTERNAL "")
+			nmessage("${key}: ${value}")
+		endif()
+	endforeach()
+	if ("${nany_version_metadata}" STREQUAL "")
+		if (NOT "$ENV{TRAVIS_TAG}" STREQUAL "")
+			# do not append a metadata when compiled from a tag
+		else()
+			set(GIT_COMMIT_HASH "")
+			if(NOT "$ENV{TRAVIS_COMMIT_RANGE}" STREQUAL "")
+				string(REPLACE "..." ";" GIT_COMMIT_HASH "$ENV{TRAVIS_COMMIT_RANGE}")
+				list(GET GIT_COMMIT_HASH 0 __start)
+				list(GET GIT_COMMIT_HASH 1 __end)
+				string(SUBSTRING "${__start}" 0 7 __start)
+				string(SUBSTRING "${__end}" 0 7 __end)
+				set(GIT_COMMIT_HASH "${__start}-${__end}")
+			elseif(NOT "$ENV{TRAVIS_COMMIT}" STREQUAL "")
+				string(SUBSTRING "$ENV{TRAVIS_COMMIT}" 0 7 GIT_COMMIT_HASH)
+			else()
+				find_program(bin_git NAMES "git")
+				if (bin_git)
+					execute_process(COMMAND "${bin_git}" log -1 --format=%h
+						WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_COMMIT_HASH
+						OUTPUT_STRIP_TRAILING_WHITESPACE)
+				endif()
+			endif()

-		set("nany_${key}" "${value}" CACHE INTERNAL "")
-		nmessage("${key}: ${value}")
+			if (NOT "${GIT_COMMIT_HASH}" STREQUAL "")
+				if (NOT "$ENV{TRAVIS_PULL_REQUEST}" STREQUAL "" AND NOT "$ENV{TRAVIS_PULL_REQUEST}" STREQUAL "false")
+					set(GIT_COMMIT_HASH "github-$ENV{TRAVIS_PULL_REQUEST}-${GIT_COMMIT_HASH}")
+				endif()
+
+				set(nany_version_metadata "${GIT_COMMIT_HASH}" CACHE INTERNAL "")
+			endif()
+		endif()
 	endif()
-endforeach()
-
-unset(file_settings_data)
+	set(nany_version "${nany_version_major}.${nany_version_minor}.${nany_version_patch}" CACHE INTERNAL "")
+	set(nany_version_string "${nany_version}")
+	if (NOT "${nany_version_prerelease}" STREQUAL "")
+		set(nany_version_string "${nany_version_string}-${nany_version_prerelease}" CACHE INTERNAL "")
+	endif()
+	if (NOT "${nany_version_metadata}" STREQUAL "")
+		set(nany_version_string "${nany_version_string}+${nany_version_metadata}" CACHE INTERNAL "")
+	endif()
+endfunction()

-if ("${nany_version_metadata}" STREQUAL "")
-	if (NOT "$ENV{TRAVIS_TAG}" STREQUAL "")
-		# do not append a metadata when compiled from a tag
-	else()
-		set(GIT_COMMIT_HASH "")
-		if(NOT "$ENV{TRAVIS_COMMIT_RANGE}" STREQUAL "")
-			string(REPLACE "..." ";" GIT_COMMIT_HASH "$ENV{TRAVIS_COMMIT_RANGE}")
-			list(GET GIT_COMMIT_HASH 0 __start)
-			list(GET GIT_COMMIT_HASH 1 __end)
-			string(SUBSTRING "${__start}" 0 7 __start)
-			string(SUBSTRING "${__end}" 0 7 __end)
-			set(GIT_COMMIT_HASH "${__start}-${__end}")
-		elseif(NOT "$ENV{TRAVIS_COMMIT}" STREQUAL "")
-			string(SUBSTRING "$ENV{TRAVIS_COMMIT}" 0 7 GIT_COMMIT_HASH)
-		else()
-			find_program(bin_git NAMES "git")
-			if (bin_git)
-				execute_process(COMMAND "${bin_git}" log -1 --format=%h
-					WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_COMMIT_HASH
-					OUTPUT_STRIP_TRAILING_WHITESPACE)
-			endif()
-		endif()
-
-		if (NOT "${GIT_COMMIT_HASH}" STREQUAL "")
-			if (NOT "$ENV{TRAVIS_PULL_REQUEST}" STREQUAL "" AND NOT "$ENV{TRAVIS_PULL_REQUEST}" STREQUAL "false")
-				set(GIT_COMMIT_HASH "github-$ENV{TRAVIS_PULL_REQUEST}-${GIT_COMMIT_HASH}")
-			endif()
-
-			set(nany_version_metadata "${GIT_COMMIT_HASH}" CACHE INTERNAL "")
-		endif()
-	endif()
-endif()
-
-
-
-
-set(nany_version "${nany_version_major}.${nany_version_minor}.${nany_version_patch}" CACHE INTERNAL "")
-set(nany_version_string "${nany_version}")
-if (NOT "${nany_version_prerelease}" STREQUAL "")
-	set(nany_version_string "${nany_version_string}-${nany_version_prerelease}" CACHE INTERNAL "")
-endif()
-if (NOT "${nany_version_metadata}" STREQUAL "")
-	set(nany_version_string "${nany_version_string}+${nany_version_metadata}" CACHE INTERNAL "")
-endif()
-
+read_build_settings()
 nmessage("") # for beauty (and to find it easily)
 nmessage("version: ${nany_version_string}")


Turns out CMake is one of those goofy designs that returns file extension queries with the dot.

--- generators/android/android-generator.cmake
+++ generators/android/android-generator.cmake
@@ -34,7 +34,8 @@

   foreach (inc ${${target}_sources})
     get_filename_component(extension ${inc} EXT)
-    if ("${extension}" STREQUAL "c" OR "${extension}" STREQUAL "cpp")
+      message("${inc}  ---  ${extension}")
+    if ("${extension}" STREQUAL ".c" OR "${extension}" STREQUAL ".cpp")
       set(target_sources "$target_sources} ${inc}")
     endif ()
   endforeach ()
@@ -55,7 +56,7 @@
   endforeach ()

   #  message("library ${target}  ${${target}_libraries}")
-  message("defines ${target}  ${${target}_defines}")
+#  message("defines ${target}  ${${target}_defines}")

   if (${${target}_is_executable})
     set(template_name front)


Changed URL from http address to ssh for BRDF-SNOptimizer

Change-Id: Ie3df4ae612934a9b6ec146093a249589ab1d12c1

--- VAD_BRDF-SNOptimizer.cmake
+++ VAD_BRDF-SNOptimizer.cmake
@@ -1,5 +1,5 @@
 # FIXME multiple urls? authentication?
-set(GIT_REPO "http://hci-repo.iwr.uni-heidelberg.de/light-field/snoptimizer.git")
+set(GIT_REPO "git@hci-repo.iwr.uni-heidelberg.de:mgutsche/BRDF-SNOptimizer.git")


COMP: Automatic update of modules dependencies

--- Modules/Segmentation/Conversion/otb-module.cmake
+++ Modules/Segmentation/Conversion/otb-module.cmake
@@ -8,21 +8,21 @@
     OTBVectorDataManipulation
     OTBGdalAdapters
     OTBITK
-    OTBVectorDataIO
+    OTBImageBase
     OTBIOGDAL
     OTBStreaming
     OTBLabelMap
-    OTBImageBase
     OTBMetadata
     OTBBoost
     OTBGDAL
     OTBCommon

   TEST_DEPENDS
-    OTBTestKernel
+    OTBVectorDataIO
+    OTBSmoothing
     OTBImageIO
     OTBProjection
-    OTBSmoothing
+    OTBTestKernel

   DESCRIPTION
     "${DOCUMENTATION}"


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -3,6 +3,7 @@
 Name[bs]=Brze poruke
 Name[ca]=Missatgeria instantània
 Name[cs]=Instant Messaging
+Name[da]=Instant messaging
 Name[de]=Instant-Messaging
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
@@ -25,6 +26,7 @@
 Comment[bs]=Počnite ćaskanje s nekim od IM kontakta ili promijenite vaš IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
+Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi