Disallow SPIR AS arg info patched Clangs <3.9

At least 3.8 crashes when building bitselect.cl with the patch.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -691,8 +691,16 @@
   OUTPUT_VARIABLE AS_CHECK_RESULT)

 message("$AS_CHECK_RESULT")
-if(NOT AS_CHECK_RESULT MATCHES "!1 = !{i32 1, i32 2, i32 3}")
-  set(POCL_USE_FAKE_ADDR_SPACE_IDS 1)
+if(LLVM_OLDER_THAN_3_9)
+  if(NOT AS_CHECK_RESULT MATCHES "!1 = !{!\"kernel_arg_addr_space\", i32 1, i32 2, i32 3}")
+    set(POCL_USE_FAKE_ADDR_SPACE_IDS 1)
+  else()
+    message(FATAL_ERROR "Detected a Clang <3.9 patched with the SPIR address space arg metadata. Unsupported mode. ")
+  endif()
 else()
-  set(POCL_USE_FAKE_ADDR_SPACE_IDS 0)
-endif()
+  if(NOT AS_CHECK_RESULT MATCHES "!1 = !{i32 1, i32 2, i32 3}")
+    set(POCL_USE_FAKE_ADDR_SPACE_IDS 1)
+  else()
+    set(POCL_USE_FAKE_ADDR_SPACE_IDS 0)
+  endif()
+endif()


* Adding support for suil RPC and JSON RPC * Also added support for a code generator to generate RPC files and IOD data types from a file

--- cmake/Suil.cmake
+++ cmake/Suil.cmake
@@ -310,7 +310,7 @@
         endif()

         # install targets
-        message(STATUS "target '${name} install target")
+        message(STATUS "target '${name} install target to  ${${name}_ARTIFACTS_DIR}")
         install(TARGETS ${name}
                 ARCHIVE DESTINATION ${${name}_ARTIFACTS_DIR}/lib
                 LIBRARY DESTINATION ${${name}_ARTIFACTS_DIR}/lib


add more descriptive comment

add more descriptive comment

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -11,6 +11,8 @@
         ${CMAKE_CURRENT_SOURCE_DIR}/pass_fail.sh ${testname} ${CMAKE_BINARY_DIR}/reg_tests/${testname}.outb ${TOLERANCE}
       "
     )
+
+    # limit each test to ~15 minutes: 1000s
     set_tests_properties(${testname} PROPERTIES TIMEOUT 1000 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "regression")
 endfunction(add_test_r)


More modular packaging (closes #284)

More modular packaging (closes #284)

--- deploy/packages/pack-glbinding.cmake
+++ deploy/packages/pack-glbinding.cmake
@@ -56,7 +56,9 @@

 set(CPACK_COMPONENTS_ALL runtime dev)

-if (OPTION_BUILD_TOOLS)
+if (OPTION_BUILD_TOOLS AND (TARGET ${META_PROJECT_NAME}::glcontexts OR TARGET ${META_PROJECT_NAME}::glfunctions
+    OR TARGET ${META_PROJECT_NAME}::glinfo OR TARGET ${META_PROJECT_NAME}::glisdeprecated
+    OR TARGET ${META_PROJECT_NAME}::glmeta OR TARGET ${META_PROJECT_NAME}::glqueries))
     set(CPACK_COMPONENT_TOOLS_DISPLAY_NAME "Tools")
     set(CPACK_COMPONENT_TOOLS_DESCRIPTION "Tools for ${META_PROJECT_NAME} library")
     set(CPACK_COMPONENT_TOOLS_DEPENDS runtime)
@@ -65,22 +67,34 @@
 endif()

 if (OPTION_BUILD_EXAMPLES)
-    set(CPACK_COMPONENT_EXAMPLES_DATA_DISPLAY_NAME "Example data")
-    set(CPACK_COMPONENT_EXAMPLES_DATA_DESCRIPTION "Example data for ${META_PROJECT_NAME} library")
-
-    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples_data)
-
-    set(CPACK_COMPONENT_EXAMPLES_GLFW_DISPLAY_NAME "Example applications using GLFW")
-    set(CPACK_COMPONENT_EXAMPLES_GLFW_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library based on GLFW")
-    set(CPACK_COMPONENT_EXAMPLES_GLFW_DEPENDS runtime examples_data)
-
-    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples_glfw)
-
-    set(CPACK_COMPONENT_EXAMPLES_QT_DISPLAY_NAME "Example applications using Qt5")
-    set(CPACK_COMPONENT_EXAMPLES_QT_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library based on Qt5")
-    set(CPACK_COMPONENT_EXAMPLES_QT_DEPENDS runtime examples_data)
-
-    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples_qt)
+    set(EXAMPLES_DATA_REQUIRED Off)
+
+    if (TARGET ${META_PROJECT_NAME}::cubescape OR TARGET ${META_PROJECT_NAME}::cubescape-log)
+        set(CPACK_COMPONENT_EXAMPLES_GLFW_DISPLAY_NAME "Example applications using GLFW")
+        set(CPACK_COMPONENT_EXAMPLES_GLFW_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library based on GLFW")
+        set(CPACK_COMPONENT_EXAMPLES_GLFW_DEPENDS runtime examples_data)
+
+        set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples_glfw)
+
+        set(EXAMPLES_DATA_REQUIRED On)
+    endif ()
+
+    if (TARGET ${META_PROJECT_NAME}::cubescape-qt)
+        set(CPACK_COMPONENT_EXAMPLES_QT_DISPLAY_NAME "Example applications using Qt5")
+        set(CPACK_COMPONENT_EXAMPLES_QT_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library based on Qt5")
+        set(CPACK_COMPONENT_EXAMPLES_QT_DEPENDS runtime examples_data)
+
+        set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples_qt)
+
+        set(EXAMPLES_DATA_REQUIRED On)
+    endif ()
+
+    if (EXAMPLES_DATA_REQUIRED)
+        set(CPACK_COMPONENT_EXAMPLES_DATA_DISPLAY_NAME "Example data")
+        set(CPACK_COMPONENT_EXAMPLES_DATA_DESCRIPTION "Example data for ${META_PROJECT_NAME} library")
+
+        set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples_data)
+    endif ()
 endif()

 if (OPTION_BUILD_DOCS)


Add a comment about unused constants.

Add a comment about unused constants.

--- taglib/taglib_config.h.cmake
+++ taglib/taglib_config.h.cmake
@@ -1,4 +1,6 @@
 /* taglib_config.h. Generated by cmake from taglib_config.h.cmake */
+
+/* These values are no longer used. This file is present only for compatibility reasons. */

 #define   TAGLIB_WITH_ASF 1
 #define   TAGLIB_WITH_MP4 1


Pass cmake build type to external project

--- cmake/BuildSdk.cmake
+++ cmake/BuildSdk.cmake
@@ -26,8 +26,8 @@
 set(DEPS_BUILD "${DEPS}/build")
 file(MAKE_DIRECTORY ${DEPS} ${DEPS_BUILD})
 file(WRITE "${DEPS}/CMakeLists.txt" "${CMAKE_LIST_CONTENT}")
-execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} ..)
-execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} --build .)
+execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ..)
+execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE})

 set(ENV{OCL_ROOT} "${SDK_ROOT}")


Do not look for cuda.dll anymore.

Do not look for cuda.dll anymore.

git-svn-id: bd2008fbba0f7d30fd6598b54f2cd88503fdd2e4@306 95f4ed2b-212e-0410-8b90-d31948207fce

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -4,7 +4,7 @@
 #
 # CUDA_FOUND
 # CUDA_INCLUDE_PATH
-# CUDA_LIBRARY
+# CUDA_RUNTIME_LIBRARY
 # CUDA_COMPILER
 #
 # It will also define the following macro:
@@ -36,14 +36,6 @@
 	${CUDA_COMPILER_SUPER_DIR}/include
 	${CUDA_COMPILER_DIR}
 	DOC "The directory where CUDA headers reside")
-
-FIND_LIBRARY (CUDA_LIBRARY
-	NAMES cuda
-	PATHS
-	$ENV{CUDA_LIB_PATH}
-	${CUDA_COMPILER_SUPER_DIR}/lib
-	${CUDA_COMPILER_DIR}
-	DOC "The CUDA library")

 FIND_LIBRARY (CUDA_RUNTIME_LIBRARY
 	NAMES cudart
@@ -53,15 +45,15 @@
 	${CUDA_COMPILER_DIR}
 	DOC "The CUDA runtime library")

-IF (CUDA_INCLUDE_PATH AND CUDA_LIBRARY AND CUDA_RUNTIME_LIBRARY)
+IF (CUDA_INCLUDE_PATH AND CUDA_RUNTIME_LIBRARY)
 	SET (CUDA_FOUND 1 CACHE STRING "Set to 1 if CUDA is found, 0 otherwise")
-ELSE (CUDA_INCLUDE_PATH AND CUDA_LIBRARY AND CUDA_RUNTIME_LIBRARY)
+ELSE (CUDA_INCLUDE_PATH AND CUDA_RUNTIME_LIBRARY)
 	SET (CUDA_FOUND 0 CACHE STRING "Set to 1 if CUDA is found, 0 otherwise")
-ENDIF (CUDA_INCLUDE_PATH AND CUDA_LIBRARY AND CUDA_RUNTIME_LIBRARY)
+ENDIF (CUDA_INCLUDE_PATH AND CUDA_RUNTIME_LIBRARY)

-SET (CUDA_LIBRARIES ${CUDA_LIBRARY} ${CUDA_RUNTIME_LIBRARY})
+SET (CUDA_LIBRARIES ${CUDA_RUNTIME_LIBRARY})

-MARK_AS_ADVANCED (CUDA_FOUND CUDA_COMPILER CUDA_LIBRARY CUDA_RUNTIME_LIBRARY)
+MARK_AS_ADVANCED (CUDA_FOUND CUDA_COMPILER CUDA_RUNTIME_LIBRARY)

 #SET(CUDA_OPTIONS "-ncfe")


Update to latest Abseil

Update to latest Abseil

Fixes #7, when building on a recent Ubuntu

--- cmake/PawnDeps.cmake
+++ cmake/PawnDeps.cmake
@@ -27,15 +27,9 @@
 # Abseil
 FetchContent_Declare(absl
   GIT_REPOSITORY https://github.com/abseil/abseil-cpp
-  GIT_TAG        a09b5de0d57d7b2179210989ab63361c3c1894f5 # 2021-03-25
+  GIT_TAG        6f43f5bb398b6685575b36874e36cf1695734df1 # 2022-04-04
 )
 set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
 set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
-# Workaround CMake issue in Abseil
-# FetchContent_MakeAvailable(absl)
-if(NOT absl_POPULATED)
-  FetchContent_Populate(absl)
-  add_subdirectory(${absl_SOURCE_DIR} ${absl_BINARY_DIR})
-  add_subdirectory(${absl_SOURCE_DIR}/absl/cleanup ${absl_BINARY_DIR}/absl/cleanup)
-endif()
+FetchContent_MakeAvailable(absl)
 pawn_check_target(absl::core_headers)


quote flags correctly that contain spaces inside single quotes (used in AliRoot)

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -501,7 +501,20 @@
    # make a semicolon separated list of all flags
    string(TOUPPER "${CMAKE_BUILD_TYPE}" _tmp)
    set(_tmp "CMAKE_CXX_FLAGS_${_tmp}")
-   string(REPLACE " " ";" _flags "${CMAKE_CXX_FLAGS} ${${_tmp}} ${_flags}")
+   string(REPLACE " " ";" _tmp "${CMAKE_CXX_FLAGS} ${${_tmp}} ${_flags}")
+   set(_flags)
+   foreach(item ${_tmp})
+      if(item MATCHES "^[^']*'[^']*$")
+         if(_str)
+            list(APPEND _flags "${_str} ${item}")
+            unset(_str)
+         else()
+            set(_str "${item}")
+         endif()
+      else()
+         list(APPEND _flags "${item}")
+      endif()
+   endforeach()
    get_directory_property(_inc INCLUDE_DIRECTORIES)
    foreach(_i ${_inc})
       list(APPEND _flags "-I${_i}")


erthink-cmake: fix/refine cmake-compiler module.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -17,12 +17,12 @@
 cmake_policy(PUSH)
 cmake_policy(VERSION 3.8.2)

-if (CMAKE_VERSION MATCHES ".*MSVC.*" AND CMAKE_VERSION VERSION_LESS 3.16)
+if(CMAKE_VERSION MATCHES ".*MSVC.*" AND CMAKE_VERSION VERSION_LESS 3.16)
   message(FATAL_ERROR "CMake from MSVC kit is unfit! "
     "Please use MSVC2019 with modern CMake the original CMake from https://cmake.org/download/")
 endif()

-if (NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED))
+if(NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED))
   message(FATAL_ERROR "This module required C or C++ to be enabled")
 endif()

@@ -152,37 +152,40 @@

 if(CMAKE_COMPILER_IS_ELBRUSC OR CMAKE_SYSTEM_PROCESSOR MATCHES "e2k.*|E2K.*|elbrus.*|ELBRUS.*")
   set(E2K TRUE)
-elseif(MSVC64 OR MINGW64)
+  set(CMAKE_SYSTEM_ARCH "Elbrus")
+elseif((MSVC64 OR MINGW64) AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(X86_64 TRUE)
+  set(CMAKE_SYSTEM_ARCH "x86_64")
 elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
   set(X86_32 TRUE)
-elseif(CMAKE_COMPILER_IS_ELBRUSC OR CMAKE_SYSTEM_PROCESSOR MATCHES "e2k.*|E2K.*|elbrus.*|ELBRUS.*")
-  set(E2K TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
+  set(CMAKE_SYSTEM_ARCH "x86")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(X86_64 TRUE)
+  set(CMAKE_SYSTEM_ARCH "x86_64")
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*")
   set(X86_32 TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|ARM64.*)")
+  set(CMAKE_SYSTEM_ARCH "x86")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|ARM64.*)" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(AARCH64 TRUE)
+  set(CMAKE_SYSTEM_ARCH "ARM64")
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
   set(ARM32 TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le.*")
+  set(CMAKE_SYSTEM_ARCH "ARM")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le.*" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(PPC64LE TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64.*")
+  set(CMAKE_SYSTEM_ARCH "PPC64LE")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64.*" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(PPC64 TRUE)
+  set(CMAKE_SYSTEM_ARCH "PPC64")
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc).*")
   set(PPC32 TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(mips|MIPS)64.*")
+  set(CMAKE_SYSTEM_ARCH "PPC")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(mips|MIPS)64.*" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(MIPS64 TRUE)
+  set(CMAKE_SYSTEM_ARCH "MIPS64")
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(mips|MIPS).*")
   set(MIPS32 TRUE)
-endif()
-
-# Workaround for 32-bit operating systems on 64-bit x86_64 processor
-if(X86_64 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64)
-  message(STATUS "sizeof(void) = 4 on x86 / x86_64 processor. Assume 32-bit compilation mode (X86=1)")
-  unset(X86_64)
-  set(X86_32 TRUE)
+  set(CMAKE_SYSTEM_ARCH "MIPS")
 endif()

 if(MSVC)
@@ -301,7 +304,7 @@
         string(REGEX MATCH "^(.*programs: =)([^:]*:)*([^:]+/llvm[-.0-9]+/bin[^:]*)(:[^:]*)*(\n.+)$" clang_bindir_valid ${clang_search_dirs})
         if(clang_bindir_valid)
           string(REGEX REPLACE "^(.*programs: =)([^:]*:)*([^:]+/llvm[-.0-9]+/bin[^:]*)(:[^:]*)*(\n.+)$" "\\3" clang_bindir ${clang_search_dirs})
-          if (CMAKE_SYSTEM_NAME STREQUAL "WINDOWS")
+          if(CMAKE_SYSTEM_NAME STREQUAL "WINDOWS")
             set(clang_libdir ${clang_bindir})
           else()
             get_filename_component(clang_libdir "${clang_bindir}/../lib" REALPATH)
@@ -309,7 +312,7 @@
         endif()
     else()
       get_filename_component(clang_bindir ${CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER} DIRECTORY)
-      if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+      if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
         set(clang_libdir ${clang_bindir})
       else()
         get_filename_component(clang_libdir "${clang_bindir}/../lib" REALPATH)
@@ -367,14 +370,14 @@
     message(STATUS "Link-Time Optimization by CLANG/LLVM is available")
   elseif(CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 7.0)
     set(CLANG_LTO_AVAILABLE TRUE)
-    if (NOT CMAKE_CLANG_AR)
+    if(NOT CMAKE_CLANG_AR)
       set(CMAKE_CLANG_AR ${CMAKE_AR})
     endif()
-    if (NOT CMAKE_CLANG_NM)
+    if(NOT CMAKE_CLANG_NM)
       set(CMAKE_CLANG_NM ${CMAKE_NM})
     endif()
-    if (NOT CMAKE_CLANG_RANLIB)
-      set(CMAKE_CLANG_RANLIB ${CMAKE_RANLIB })
+    if(NOT CMAKE_CLANG_RANLIB)
+      set(CMAKE_CLANG_RANLIB ${CMAKE_RANLIB})
     endif()
     message(STATUS "Assume Link-Time Optimization by CLANG/LLVM is available via ${CMAKE_TOOLCHAIN_FILE}")
   else()
@@ -452,7 +455,7 @@
     add_compile_flags("CXX" "-fcxx-exceptions -frtti")
   endif()

-  if (CC_HAS_WNO_ATTRIBUTES AND CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG}
+  if(CC_HAS_WNO_ATTRIBUTES AND CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG}
       AND CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 9)
     # GCC < 9.x generates false-positive warnings for optimization attributes
     add_compile_flags("C;CXX" "-Wno-attributes")
@@ -503,7 +506,7 @@
   endif()

   if(MSVC)
-    if (MSVC_VERSION LESS 1915)
+    if(MSVC_VERSION LESS 1915)
       message(FATAL_ERROR At least \"Microsoft C/C++ Compiler\" version 19.15.26730 (Visual Studio 2017 15.8) is required.)
     endif()
     add_compile_flags("CXX" "/Zc:__cplusplus")
@@ -535,11 +538,11 @@
     if(MSVC)
       add_compile_flags("C;CXX" "/WX")
     elseif(CMAKE_COMPILER_IS_CLANG)
-      if (NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 6)
+      if(NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 6)
         add_compile_flags("C;CXX" "-Werror")
       endif()
     elseif(CMAKE_COMPILER_IS_GNUCC)
-      if (NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 6)
+      if(NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 6)
         add_compile_flags("C;CXX" "-Werror")
       endif()
     else()
@@ -551,7 +554,7 @@
     add_compile_flags("C;CXX" "-fopenmp")
   endif()

-  if (ENABLE_ASAN)
+  if(ENABLE_ASAN)
     add_compile_flags("C;CXX" -fsanitize=address)
   endif()

@@ -667,11 +670,11 @@
 # determine library for for std::filesystem
 set(LIBCXX_FILESYSTEM "")
 if(CMAKE_COMPILER_IS_GNUCXX)
-  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
     set(LIBCXX_FILESYSTEM "stdc++fs")
   endif()
-elseif (CMAKE_COMPILER_IS_CLANG)
-  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+elseif(CMAKE_COMPILER_IS_CLANG)
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
     set(LIBCXX_FILESYSTEM "c++experimental")
   else()
     set(LIBCXX_FILESYSTEM "stdc++fs")


CMake: commet fix

CMake: commet fix

--- cmake/licenses.cmake
+++ cmake/licenses.cmake
@@ -47,10 +47,11 @@
 # * TYPE (optional):    The type of license
 #
 # Example usage:
-# ivw_register_license_file(ID glew NAME "GLEW" VERSION 2.0.0 MODULE OpenGL
-#     URL http://glew.sourceforge.net
-#     FILES ${CMAKE_CURRENT_SOURCE_DIR}/ext/glew/license.txt
-# )
+#    ivw_register_license_file(NAME "GLFW" VERSION 3.1.0 MODULE GLFW
+#        URL http://www.glfw.org
+#        TYPE "The zlib/libpng License"
+#        FILES ${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw/COPYING.txt
+#    )
 function(ivw_register_license_file)
     set(options "")
     set(oneValueArgs ID NAME VERSION URL MODULE TYPE)


Fix missing quotes around thunderx targets

--- cmake/prebuild.cmake
+++ cmake/prebuild.cmake
@@ -198,7 +198,7 @@
     set(CGEMM_UNROLL_N 4)
     set(ZGEMM_UNROLL_M 8)
     set(ZGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "THUNDERX)
+  elseif ("${CORE}" STREQUAL "THUNDERX")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t32768\n"
       "#define L1_CODE_LINESIZE\t64\n"
@@ -224,7 +224,7 @@
     set(CGEMM_UNROLL_N 2)
     set(ZGEMM_UNROLL_M 2)
     set(ZGEMM_UNROLL_N 2)
-  elseif ("${CORE}" STREQUAL "THUNDERX2T99)
+  elseif ("${CORE}" STREQUAL "THUNDERX2T99")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t32768\n"
       "#define L1_CODE_LINESIZE\t64\n"


Fix typo in error message for POLLY_XCODE_COMPILER

--- compiler/xcode.cmake
+++ compiler/xcode.cmake
@@ -11,7 +11,7 @@

 string(COMPARE EQUAL "${POLLY_XCODE_COMPILER}" "" _is_empty)
 if(_is_empty)
-  polly_fatal_error("Please set POLLY_CODE_COMPILER")
+  polly_fatal_error("Please set POLLY_XCODE_COMPILER")
 endif()

 set(_cmd xcrun --find "${POLLY_XCODE_COMPILER}")


lemon version 1.3

lemon version 1.3

--- lemon.cmake
+++ lemon.cmake
@@ -16,8 +16,8 @@
 # For now, this means that we MUST use gcc for this package.
 # As soon as v1.3 is ready, we should try to upgrade.
 external_source (lemon
-    1.2.3
-    lemon-1.2.3.tar.gz
+    1.3
+    lemon-1.3.tar.gz
     750251a77be450ddddedab14e5163afb
     http://lemon.cs.elte.hu/pub/sources)


[deps] Updated DepsRevolve.cmake

[deps] Updated DepsRevolve.cmake

--- deps/deps-lib/DepsResolve.cmake
+++ deps/deps-lib/DepsResolve.cmake
@@ -18,16 +18,16 @@
 	endif()

 	# Check if folder for current system and compiler exist
-	set(${lib_dir} "${DEPS_ARTIFACTS_DIR}/${lib_name}-${CMAKE_SYSTEM_NAME}-${DEPS_ENVIRONMENT}" PARENT_SCOPE)
+	set(current_lib "${DEPS_ARTIFACTS_DIR}/${lib_name}-${CMAKE_SYSTEM_NAME}-${DEPS_ENVIRONMENT}")
+	set(${lib_dir} ${current_lib} PARENT_SCOPE)
+
+	if ("${current_lib}" STREQUAL "")
+		message( FATAL_ERROR "Could not set artifacts folder for library ${lib_name}")
+	endif()

-
-	if(NOT EXISTS "${${lib_dir}}/")
+	if(NOT EXISTS "${current_lib}/")
 		message("-- [Deps] Resolving dependency '${lib_name}'...")
-		#message(STATUS "ARG0:${DEPS_JAR_PROPS}")
-		#message(STATUS "ARG1:${lib_name}")
-		#message(STATUS "ARG2:${CMAKE_SYSTEM_NAME}")
-		#message(STATUS "ARG3:${DEPS_ENVIRONMENT}")
-		#message(STATUS "ARG4:${DEPS_ARTIFACTS_DIR}")
+
 		execute_process(COMMAND ${Java_JAVA_EXECUTABLE} -jar ${DEPS_JAR_DIR}/${DEPS_JAR} resolve ${DEPS_JAR_PROPS} ${lib_name} ${CMAKE_SYSTEM_NAME} ${DEPS_ENVIRONMENT} ${DEPS_ARTIFACTS_DIR}
 		WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
 		RESULT_VARIABLE JAVA_RESULT


cmake: Use CMake DEPRECATION level instead of WARNING

CMake provides a DEPRECATION level for messages.
This should be used instead of WARNING for deprecated features.

Using DEPRECATION allows users to disable the deprecation warning with
`cmake -Wno-deprecated ...`
or turn deprecation warning into an error using
`cmake -Werror=deprecated`

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

--- share/zephyr-package/cmake/ZephyrConfig.cmake
+++ share/zephyr-package/cmake/ZephyrConfig.cmake
@@ -16,9 +16,9 @@
   )
   list(PREPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/cmake/modules)
   if(ZEPHYR_UNITTEST)
-    message(WARNING "The ZephyrUnittest CMake package has been deprecated.\n"
-                    "ZephyrUnittest has been replaced with Zephyr CMake module 'unittest' \n"
-                    "and can be loaded as: 'find_package(Zephyr COMPONENTS unittest)'"
+    message(DEPRECATION "The ZephyrUnittest CMake package has been deprecated.\n"
+                        "ZephyrUnittest has been replaced with Zephyr CMake module 'unittest' \n"
+                        "and can be loaded as: 'find_package(Zephyr COMPONENTS unittest)'"
     )
     set(ZephyrUnittest_FOUND True)
     set(Zephyr_FIND_COMPONENTS unittest)
@@ -60,8 +60,8 @@
       endforeach()
     endif()
   else()
-    message(WARNING "The NO_BOILERPLATE setting has been deprecated.\n"
-                    "Please use: 'find_package(Zephyr COMPONENTS <components>)'"
+    message(DEPRECATION "The NO_BOILERPLATE setting has been deprecated.\n"
+                        "Please use: 'find_package(Zephyr COMPONENTS <components>)'"
     )
   endif()
 endmacro()


CI: set debug 1 in prepare superbuild (test)

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -20,7 +20,7 @@
 # This script is for the superbuild build on the CI platform

 include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
-
+set ( DEBUG "1" )
 set (ENV{LANG} "C") # Only ascii output
 get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)


[cmake] moved headerchecks into subdir

[cmake] moved headerchecks into subdir

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -35,8 +35,8 @@
 	FOREACH( HEADER ${ARGN} )
 		string(REPLACE "/" "_" fn ${HEADER})
 		SET( TEST_NAME "headercheck_${fn}")
-		configure_file( ${PROJECT_SOURCE_DIR}/../dune-stuff/cmake/headercheck.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.cpp )
-		ADD_LIBRARY( ${TEST_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.cpp )
+		configure_file( ${PROJECT_SOURCE_DIR}/../dune-stuff/cmake/headercheck.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/headercheck/${TEST_NAME}.cpp )
+		ADD_LIBRARY( ${TEST_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/headercheck/${TEST_NAME}.cpp )
 		set_target_properties(${TEST_NAME} PROPERTIES LINKER_LANGUAGE CXX)
 		add_dependencies( headercheck ${TEST_NAME} )
 	ENDFOREACH( HEADER )


build: add more search paths for libclang

thanks @smaeul

--- cmake/Findclang.cmake
+++ cmake/Findclang.cmake
@@ -8,6 +8,7 @@

 find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
     PATHS
+        /usr/lib/llvm/5/include
         /usr/lib/llvm-5.0/include
         /mingw64/include)

@@ -15,6 +16,7 @@
     string(TOUPPER ${_libname_} _prettylibname_)
     find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
         PATHS
+            /usr/lib/llvm/5/lib
             /usr/lib/llvm-5.0/lib
             /mingw64/lib
             /c/msys64/mingw64/lib


Apple: fixed non-Xcode (e.g. Ninja) builds.

--- toolchains/osx.toolchain.cmake
+++ toolchains/osx.toolchain.cmake
@@ -22,6 +22,16 @@
 set( CMAKE_OSX_SYSROOT                 "macosx"                      ) #"Latest Mac OS X"
 set( CMAKE_OSX_DEPLOYMENT_TARGET       "10.7"                        )
 set( CPACK_SYSTEM_NAME                 "OSX"                         )
+
+# Implementation note:
+# CMake (3.5.2) 'somehow' adds ${CMAKE_OSX_ARCHITECTURES} and
+# ${CMAKE_OSX_SYSROOT} to the compiler options even if a generator other than
+# Xcode (e.g. Ninja) is used (and this breaks the build of course).
+#                                         (27.06.2016.) (Domagoj Saric)
+if ( NOT ${CMAKE_GENERATOR} MATCHES "Xcode" )
+  unset( CMAKE_OSX_ARCHITECTURES )
+  unset( CMAKE_OSX_SYSROOT       )
+endif ()

 set( OSX true )


libc++ for clang

libc++ for clang

--- mk/CompilerFlags.cmake
+++ mk/CompilerFlags.cmake
@@ -12,4 +12,8 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 else()
     message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+endif()
+
+if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 endif()


Removed unneeded compile flag

Removed unneeded compile flag

--- cmake/DevBaseCompiler.cmake
+++ cmake/DevBaseCompiler.cmake
@@ -122,7 +122,6 @@
         "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
 elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 endif()


Removing duplicate SuiteSparse found message.

- Also flipping ordering of variables in
  find_package_handle_standard_args() so that the automatically
  generated message prints the include directories, not TRUE.

Change-Id: I2bf62eacd5c96f27152e9542b9a74651243a584e

--- cmake/FindSuiteSparse.cmake
+++ cmake/FindSuiteSparse.cmake
@@ -520,6 +520,9 @@
     LIST(APPEND SUITESPARSE_INCLUDE_DIRS
       ${UFCONFIG_INCLUDE_DIR})
   ENDIF (UFCONFIG_FOUND)
+  # As SuiteSparse includes are often all in the same directory, remove any
+  # repetitions.
+  LIST(REMOVE_DUPLICATES SUITESPARSE_INCLUDE_DIRS)

   # Important: The ordering of these libraries is *NOT* arbitrary, as these
   # could potentially be static libraries their link ordering is important.
@@ -538,7 +541,6 @@
     LIST(APPEND SUITESPARSE_LIBRARIES
       ${METIS_LIBRARY})
   ENDIF (METIS_FOUND)
-  MESSAGE(STATUS "Found SuiteSparse version: ${SUITESPARSE_VERSION}")
 ELSE()
   SUITESPARSE_REPORT_NOT_FOUND(
     "Failed to find some/all required components of SuiteSparse.")
@@ -582,5 +584,5 @@
 # and QUIET optional arguments, as such we use an intermediary variable.
 SET(SUITESPARSE_FOUND_COPY ${SUITESPARSE_FOUND})
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SuiteSparse
-  REQUIRED_VARS SUITESPARSE_FOUND_COPY SUITESPARSE_INCLUDE_DIRS SUITESPARSE_LIBRARIES
+  REQUIRED_VARS SUITESPARSE_INCLUDE_DIRS SUITESPARSE_LIBRARIES SUITESPARSE_FOUND_COPY
   VERSION_VAR SUITESPARSE_VERSION)


Several fixes for lintian varnings

Several fixes for lintian varnings

(cherry picked from commit 634ffed488052efb5cab1fb5cdd90d192f0121a9)

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -1,3 +1,6 @@
+# Use patched version of CPACK to build accurate set of Debian packages
+# https://github.com/asmorkalov/CMake/tree/deb_generator_improvement
+
 if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
 set(CPACK_set_DESTDIR "on")

@@ -17,6 +20,8 @@
   set(CPACK_PACKAGE_VERSION_PATCH "${OPENCV_VERSION_PATCH}")
   set(CPACK_PACKAGE_VERSION "${OPENCV_VCSVERSION}")
 endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
+
+set(CPACK_STRIP_FILES 1)

 #arch
 if(X86)
@@ -90,24 +95,31 @@
 if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
   set(CPACK_COMPONENT_libs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}")
   set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library")
+  set(CPACK_COMPONENT_libs_SECTION "libs")

   set(CPACK_COMPONENT_python_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-python")
   set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_python_SECTION "python")

   set(CPACK_COMPONENT_java_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-java")
   set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_java_SECTION "java")

   set(CPACK_COMPONENT_dev_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-dev")
   set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_dev_SECTION "libdevel")

   set(CPACK_COMPONENT_docs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-docs")
   set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_docs_SECTION "doc")

   set(CPACK_COMPONENT_samples_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-samples")
   set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_samples_SECTION "devel")

   set(CPACK_COMPONENT_tests_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-tests")
   set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
+  set(CPACK_COMPONENT_tests_SECTION "misc")
 endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)

 if(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT)


compile static libspdlog (#5048)

compile static libspdlog (#5048)

--- cmake/external/spdlog.cmake
+++ cmake/external/spdlog.cmake
@@ -1,20 +1,45 @@
 SET(spdlog_SOURCE_DIR ${THIRD_PARTY_DIR}/spdlog)
 SET(spdlog_INCLUDE_DIR ${THIRD_PARTY_INCLUDE_DIR})
+set(spdlog_PREFIX "${CMAKE_BINARY_DIR}/spdlog")
+set(spdlog_DIR "${spdlog_PREFIX}/src/SpdLog-build")
+IF(CMAKE_BUILD_TYPE MATCHES Debug)
+	set(spdlog_LIBRARY_NAME ${spdlog_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}spdlogd${CMAKE_STATIC_LIBRARY_SUFFIX})
+else()
+	set(spdlog_LIBRARY_NAME ${spdlog_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}spdlog${CMAKE_STATIC_LIBRARY_SUFFIX})
+endif()
+
 include(ExternalProject)
 ExternalProject_Add(
-	spdlog
-	PREFIX ${CMAKE_BINARY_DIR}/spdlog
+	SpdLog
+	PREFIX ${spdlog_PREFIX}
 	DOWNLOAD_DIR ${spdlog_SOURCE_DIR}
 	SOURCE_DIR ${spdlog_SOURCE_DIR}
 	URL https://github.com/gabime/spdlog/archive/v1.3.1.tar.gz
 	URL_MD5 3c17dd6983de2a66eca8b5a0b213d29f
 	CMAKE_ARGS
-	-DCMAKE_BUILD_TYPE=Release
-	-DSPDLOG_BUILD_EXAMPLES=OFF
+	-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+	-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+	-DSPDLOG_BUILD_EXAMPLE=OFF
 	-DSPDLOG_BUILD_BENCH=OFF
 	-DSPDLOG_BUILD_TESTS=OFF
-	BUILD_COMMAND ""
 	INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${spdlog_SOURCE_DIR}/include ${spdlog_INCLUDE_DIR}
+    BUILD_BYPRODUCTS ${spdlog_LIBRARY_NAME}
+    BUILD_ALWAYS 1
 )

+file(MAKE_DIRECTORY ${spdlog_INCLUDE_DIR})
+
+add_library(spdlog IMPORTED STATIC GLOBAL)
+set_target_properties(spdlog PROPERTIES
+        INTERFACE_INCLUDE_DIRECTORIES "${spdlog_INCLUDE_DIR}")
+if(CMAKE_GENERATOR MATCHES "Visual Studio.*" OR CMAKE_GENERATOR STREQUAL Xcode)
+        set_target_properties(spdlog PROPERTIES
+                IMPORTED_LOCATION_DEBUG "${spdlog_DIR}/Debug/${CMAKE_STATIC_LIBRARY_PREFIX}spdlogd${CMAKE_STATIC_LIBRARY_SUFFIX}"
+                IMPORTED_LOCATION_RELEASE "${spdlog_DIR}/Release/${CMAKE_STATIC_LIBRARY_PREFIX}spdlog${CMAKE_STATIC_LIBRARY_SUFFIX}")
+else()
+        set_target_properties(spdlog PROPERTIES
+                IMPORTED_LOCATION ${spdlog_LIBRARY_NAME})
+endif()
+
+add_dependencies(spdlog SpdLog)
 add_dependencies(libshogun spdlog)


update mkldnn to version v0.14 (#971)

update mkldnn to version v0.14 (#971)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -23,7 +23,7 @@
 if(NGRAPH_CPU_ENABLE)

     set(MKLDNN_GIT_REPO_URL https://github.com/intel/mkl-dnn)
-    set(MKLDNN_GIT_TAG "dfe8f6d")
+    set(MKLDNN_GIT_TAG "0e7ca73")

     # The 'BUILD_BYPRODUCTS' argument was introduced in CMake 3.2.
     if(${CMAKE_VERSION} VERSION_LESS 3.2)


CMake: Do not try to install a target before it is defined.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -72,23 +72,25 @@

 macro(add_llvm_tool name)
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
-  if( LLVM_BUILD_TOOLS )
-    install(TARGETS ${name} RUNTIME DESTINATION bin)
-  else()
+  if( NOT LLVM_BUILD_TOOLS )
     set(EXCLUDE_FROM_ALL ON)
   endif()
   add_llvm_executable(${name} ${ARGN})
+  if( LLVM_BUILD_TOOLS )
+    install(TARGETS ${name} RUNTIME DESTINATION bin)
+  endif()
 endmacro(add_llvm_tool name)

 macro(add_llvm_example name)
 #  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_EXAMPLES_BINARY_DIR})
-  if( LLVM_BUILD_EXAMPLES )
-    install(TARGETS ${name} RUNTIME DESTINATION examples)
-  else()
+  if( NOT LLVM_BUILD_EXAMPLES )
     set(EXCLUDE_FROM_ALL ON)
   endif()
   add_llvm_executable(${name} ${ARGN})
+  if( LLVM_BUILD_EXAMPLES )
+    install(TARGETS ${name} RUNTIME DESTINATION examples)
+  endif()
 endmacro(add_llvm_example name)


Replace "errors" with "issues" in normal output so that those using
search tools like grep to find errors in the cmake output will
not get fooled by this message.

svn path=/trunk/; revision=10453

--- cmake/modules/docbook.cmake
+++ cmake/modules/docbook.cmake
@@ -54,7 +54,7 @@
 find_program(ONSGMLS onsgmls)

 if(ONSGMLS )
-  message(STATUS "validate target will be available to check for syntax errors in the PLplot DocBook documentation using ${ONSGMLS}.")
+  message(STATUS "validate target will be available to check for syntax issues in the PLplot DocBook documentation using ${ONSGMLS}.")
 else(ONSGMLS )
   message(STATUS "WARNING: validate target will not be available to check for syntax errors in the PLplot DocBook documentation because onsgmls was not found.")
 endif(ONSGMLS )


One more test. VTK discovery obviously behaces differently for Linux than Windows. Big surprise there.

--- cmake_modules/FindVTK.cmake
+++ cmake_modules/FindVTK.cmake
@@ -72,10 +72,10 @@
 # Use the Config mode of the find_package() command to find VTKConfig.
 # If this succeeds (possibly because VTK_LIB_DIR is already set), the
 # command will have already loaded VTKConfig.cmake and set VTK_FOUND.
-if(NOT VTK_FOUND)
-  find_package(VTK QUIET NO_MODULE
-                   HINTS $ENV{HOME}/LPS/prerequisites/vtk $ENV{USERPROFILE}/LPS/prerequisites/vtk/lib)
-endif()
+#if(NOT VTK_FOUND)
+#  find_package(VTK QUIET NO_MODULE
+#                   HINTS $ENV{HOME}/LPS/prerequisites/vtk $ENV{USERPROFILE}/LPS/prerequisites/vtk/lib)
+#endif()

 if(VERSION MATCHES "5.10")

@@ -115,7 +115,7 @@
     set(VTK_INCLUDE_DIRS "${__TMP_DIR}/include/vtk-5.10" CACHE PATH "VTK Headers location.")
 message(STATUS "${VTK_LIB_DIR}")
 message(STATUS "${__TMP_DIR}/include/vtk-5.10")
-
+message(STATUS "$ENV{VTK_LIB_DIR} $ENV{HOME}/LPS/prerequisites/vtk/lib")
 else()

   # Look for UseVTK.cmake in build trees or under <prefix>/include/vtk.


Update version number in cmake soxconfig.h

--- src/soxconfig.h.cmake
+++ src/soxconfig.h.cmake
@@ -1,4 +1,4 @@
-#define PACKAGE_VERSION "14.4.0"
+#define PACKAGE_VERSION "14.4.1git"

 #cmakedefine EXTERNAL_GSM             1
 #cmakedefine EXTERNAL_LPC10           1


Remove spurious FindEigen3.cmake

Remove spurious FindEigen3.cmake

--- tests/cmake/FindEigen3.cmake
+++ tests/cmake/FindEigen3.cmake
@@ -1,81 +0,0 @@
-# - Try to find Eigen3 lib
-#
-# This module supports requiring a minimum version, e.g. you can do
-#   find_package(Eigen3 3.1.2)
-# to require version 3.1.2 or newer of Eigen3.
-#
-# Once done this will define
-#
-#  EIGEN3_FOUND - system has eigen lib with correct version
-#  EIGEN3_INCLUDE_DIR - the eigen include directory
-#  EIGEN3_VERSION - eigen version
-
-# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
-# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
-# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-
-if(NOT Eigen3_FIND_VERSION)
-  if(NOT Eigen3_FIND_VERSION_MAJOR)
-    set(Eigen3_FIND_VERSION_MAJOR 2)
-  endif(NOT Eigen3_FIND_VERSION_MAJOR)
-  if(NOT Eigen3_FIND_VERSION_MINOR)
-    set(Eigen3_FIND_VERSION_MINOR 91)
-  endif(NOT Eigen3_FIND_VERSION_MINOR)
-  if(NOT Eigen3_FIND_VERSION_PATCH)
-    set(Eigen3_FIND_VERSION_PATCH 0)
-  endif(NOT Eigen3_FIND_VERSION_PATCH)
-
-  set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
-endif(NOT Eigen3_FIND_VERSION)
-
-macro(_eigen3_check_version)
-  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
-
-  string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
-  set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
-
-  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
-  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK FALSE)
-  else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK TRUE)
-  endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-
-  if(NOT EIGEN3_VERSION_OK)
-
-    message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
-                   "but at least version ${Eigen3_FIND_VERSION} is required")
-  endif(NOT EIGEN3_VERSION_OK)
-endmacro(_eigen3_check_version)
-
-if (EIGEN3_INCLUDE_DIR)
-
-  # in cache already
-  _eigen3_check_version()
-  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
-
-else (EIGEN3_INCLUDE_DIR)
-
-  find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
-      PATHS
-      ${CMAKE_INSTALL_PREFIX}/include
-      ${KDE4_INCLUDE_DIR}
-      PATH_SUFFIXES eigen3 eigen
-    )
-
-  if(EIGEN3_INCLUDE_DIR)
-    _eigen3_check_version()
-  endif(EIGEN3_INCLUDE_DIR)
-
-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
-
-  mark_as_advanced(EIGEN3_INCLUDE_DIR)
-
-endif(EIGEN3_INCLUDE_DIR)
-


Place embedded data on flash

Place embedded data on flash

--- tools/cmake/scripts/data_file_embed_asm.cmake
+++ tools/cmake/scripts/data_file_embed_asm.cmake
@@ -67,6 +67,7 @@
 append_line(" */")

 append_line(".data")
+append_line(".section .rodata.embedded")
 append_identifier("${varname}")
 append_identifier("_binary_${varname}_start" "for objcopy compatibility")
 append("${data}")


Fixes bug (infinite loop) when there is a python target in the root directory

--- internal/macro_utils.cmake
+++ internal/macro_utils.cmake
@@ -230,7 +230,8 @@
 MACRO(CREATE_PYTHON_INIT_FILES)
     #MESSAGE("CREATE_PYTHON_INIT_FILES")
     SET(cur_dir ${CMAKE_CURRENT_BINARY_DIR})
-    SET(done 0)
+    STRING(COMPARE EQUAL ${cur_dir} ${CMAKE_BINARY_DIR} done)
+
     WHILE(NOT done)
       IF(NOT EXISTS "${cur_dir}/__init__.py")
           CONFIGURE_FILE("${cmakesnap_DIR}/internal/__init__.py.in" "${cur_dir}/__init__.py")
@@ -240,7 +241,6 @@
       STRING(REGEX REPLACE "${CMAKE_BINARY_DIR}/(.*)" "\\1" dest_dir ${cur_dir})
       INSTALL(FILES "${cur_dir}/__init__.py" DESTINATION ${dest_dir} )
       GET_FILENAME_COMPONENT(new_dir ${cur_dir} PATH)
-      #MESSAGE("cur_dir: ${cur_dir}")
       SET(cur_dir ${new_dir})
       STRING(COMPARE EQUAL ${cur_dir} ${CMAKE_BINARY_DIR} done)
     ENDWHILE()


FIX (#1774): Reenabled mitkTrackingDeviceTest and mitkTrackingDeviceSourceTest

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -16,9 +16,9 @@
    mitkNDIProtocolTest.cpp
    mitkNDITrackingDeviceTest.cpp
    mitkTimeStampTest.cpp
-   #mitkTrackingDeviceSourceTest.cpp
+   mitkTrackingDeviceSourceTest.cpp
    mitkTrackingVolumeTest.cpp
-   #mitkTrackingDeviceTest.cpp
+   mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
    mitkNavigationDataRecorderTest.cpp
    mitkNavigationToolStorageTest.cpp


Temporarily deactivating ipPic-dependent classes

* mitk::CylindricToCartesianFilter
* mitk::AngleCorrectByPointFilter
* mitk::DopplerToStrainRatiFilter

--- Modules/MitkExt/files.cmake
+++ Modules/MitkExt/files.cmake
@@ -3,16 +3,16 @@
   Algorithms/mitkBoundingObjectToSegmentationFilter.cpp
   Algorithms/vtkPointSetSlicer.cxx
   Algorithms/mitkCoreExtObjectFactory.cpp
-  Algorithms/mitkAngleCorrectByPointFilter.cpp
+  # Algorithms/mitkAngleCorrectByPointFilter.cpp
   Algorithms/mitkAutoCropImageFilter.cpp
   Algorithms/mitkBoundingObjectCutter.cpp
   Algorithms/mitkCalculateSegmentationVolume.cpp
   Algorithms/mitkContourSetToPointSetFilter.cpp
   Algorithms/mitkContourUtils.cpp
   Algorithms/mitkCorrectorAlgorithm.cpp
-  Algorithms/mitkCylindricToCartesianFilter.cpp
+  # Algorithms/mitkCylindricToCartesianFilter.cpp
   Algorithms/mitkDiffImageApplier.cpp
-  Algorithms/mitkDopplerToStrainRateFilter.cpp
+  # Algorithms/mitkDopplerToStrainRateFilter.cpp
   Algorithms/mitkGeometryClipImageFilter.cpp
   Algorithms/mitkGeometryDataSource.cpp
   Algorithms/mitkHeightFieldSurfaceClipImageFilter.cpp


COMP: Sync with NAMICExternalProjects boost config

--- SuperBuild/External_Boost.cmake
+++ SuperBuild/External_Boost.cmake
@@ -17,7 +17,7 @@
 # Make sure that the ExtProjName/IntProjName variables are unique globally
 # even if other External_${ExtProjName}.cmake files are sourced by
 # SlicerMacroCheckExternalProjectDependency
-set(extProjName Boost) #The find_package known name
+set(extProjName BOOST) #The find_package known name
 set(proj        Boost) #This local name
 set(${extProjName}_REQUIRED_VERSION "")  #If a required version is necessary, then set this, else leave blank


Fix for #91289: /Users/phristov/alice/root/test/Makefile.arch moved to /Users/phristov/alice/root/etc/Makefile.arch (Christian)

--- cmake/ALICE_CMake.cmake
+++ cmake/ALICE_CMake.cmake
@@ -580,8 +580,8 @@
     endforeach(file ${SRCS} ${HDRS} ${FSRCS} ${DHDR})

     add_custom_target(${PACKAGE}.par
-                      COMMAND sed -e 's/include .\(ROOTSYS\)\\/test\\/Makefile.arch/include Makefile.arch/\; s/PACKAGE = .*/PACKAGE = ${PACKAGE}/\; s,SRCS *=.*,SRCS = ${SRCS},\;' < Makefile | sed -e 's,HDRS *=.*,HDRS = ${HDRS},\; s,FSRCS *=.*,FSRCS = ${FSRCS},\; s,DHDR *=.*,DHDR = ${DHDR},' > ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile
-                      COMMAND cp -pR ${ROOTSYS}/test/Makefile.arch ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile.arch
+                      COMMAND sed -e 's/include .\(ROOTSYS\)\\/\\(etc\\|test\\)\\/Makefile.arch/include Makefile.arch/\; s/PACKAGE = .*/PACKAGE = ${PACKAGE}/\; s,SRCS *=.*,SRCS = ${SRCS},\;' < Makefile | sed -e 's,HDRS *=.*,HDRS = ${HDRS},\; s,FSRCS *=.*,FSRCS = ${FSRCS},\; s,DHDR *=.*,DHDR = ${DHDR},' > ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile
+                      COMMAND cp -pR ${ROOTSYS}/etc/Makefile.arch ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile.arch
                       COMMAND cp -pR PROOF-INF.${PACKAGE} ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/PROOF-INF
 #                      COMMAND cp -pR lib${PACKAGE}.pkg ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}
                       COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_BINARY_DIR} tar --exclude=.svn -czhf ${CMAKE_BINARY_DIR}/${PACKAGE}.par ${PACKAGE}


upgrading to luajit 2.0.3

upgrading to luajit 2.0.3

--- cmake/EmbedLuajit.cmake
+++ cmake/EmbedLuajit.cmake
@@ -10,8 +10,8 @@
 # Note: FFI is disabled for security reasons
 ExternalProject_Add(
   project_luajit
-  URL http://luajit.org/download/LuaJIT-2.0.2.tar.gz
-  URL_MD5 112dfb82548b03377fbefbba2e0e3a5b
+  URL http://luajit.org/download/LuaJIT-2.0.3.tar.gz
+  URL_MD5 f14e9104be513913810cd59c8c658dc0
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/luajit"
   CONFIGURE_COMMAND ""
   BUILD_IN_SOURCE 1


Fix errors in DX cmake file.

Fix errors in DX cmake file.

--- cmake/FindDirectX.cmake
+++ cmake/FindDirectX.cmake
@@ -1,5 +1,11 @@

 IF (WIN32)
+
+	FIND_PATH(DX9_INCLUDE_PATH d3d9.h
+		PATHS
+			"$ENV{DXSDK_DIR}/Include"
+			"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Include"
+		DOC "The directory where D3D9.h resides")

 	FIND_PATH(DX10_INCLUDE_PATH D3D10.h
 		PATHS
@@ -19,7 +25,7 @@
 			"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Lib/x86"
 		DOC "The directory where d3dx10.lib resides")

-	SET(DX10_LIBRARIES D3D10_LIBRARY D3DX10_LIBRARY)
+	SET(DX10_LIBRARIES ${D3D10_LIBRARY} ${D3DX10_LIBRARY})

 ENDIF (WIN32)


Fix eigen dependency in Findpanda3d

Fix eigen dependency in Findpanda3d

--- cmake/Findpanda3d.cmake
+++ cmake/Findpanda3d.cmake
@@ -166,22 +166,23 @@
             if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
                 include(CMakeFindDependencyMacro)
                 find_dependency(Threads REQUIRED)
-                set_property(TARGET panda3d::${component_name} APPEND
-                    PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads
-                )
+                target_link_libraries(panda3d::${component_name} INTERFACE Threads::Threads)
             endif()
         elseif(${component_name} STREQUAL "panda")
             if((${CMAKE_SYSTEM_NAME} MATCHES "Windows") OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
                 # check if Eigen is used
-                file(STRINGS "${panda3d_INCLUDE_DIR}/dtool_config.h"
-                    panda3d_dtool_HAVE_EIGEN
-                    REGEX "#define HAVE_EIGEN 1"
-                )
-                if(panda3d_dtool_HAVE_EIGEN)
+                foreach(configuration ${panda3d_configurations})
+                    file(STRINGS "${panda3d_INCLUDE_DIR_${configuration}}/dtool_config.h"
+                        panda3d_dtool_HAVE_EIGEN_${configuration}
+                        REGEX "#define HAVE_EIGEN 1"
+                    )
+                endforeach()
+                if(panda3d_dtool_HAVE_EIGEN_DEBUG OR panda3d_dtool_HAVE_EIGEN_RELEASE)
                     include(CMakeFindDependencyMacro)
                     find_dependency(Eigen3 REQUIRED)
-                    set_property(TARGET panda3d::${component_name} APPEND
-                        PROPERTY INTERFACE_LINK_LIBRARIES Eigen3::Eigen
+                    target_link_libraries(panda3d::${component_name} INTERFACE
+                        $<$<AND:$<BOOL:${panda3d_dtool_HAVE_EIGEN_DEBUG}>,$<CONFIG:DEBUG>>:Eigen3::Eigen>
+                        $<$<AND:$<BOOL:${panda3d_dtool_HAVE_EIGEN_RELEASE}>,$<CONFIG:RELEASE>>:Eigen3::Eigen>
                     )
                 endif()
             endif()


fixed permissions on qt moc on install

fixed permissions on qt moc on install

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -60,6 +60,7 @@

 # Install qt moc
 install(FILES ${PROJECT_BINARY_DIR}/bin/moc${CMAKE_EXECUTABLE_SUFFIX}
+    PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
     DESTINATION fast/bin
 )


added macr PCL_CUDA_ADD_EXECUTABLE

added macr PCL_CUDA_ADD_EXECUTABLE

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -152,6 +152,31 @@
         COMPONENT ${_component})
 endmacro(PCL_ADD_EXECUTABLE)

+
+###############################################################################
+# Add an executable target.
+# _name The executable name.
+# _component The part of PCL that this library belongs to.
+# ARGN the source files for the library.
+macro(PCL_CUDA_ADD_EXECUTABLE _name _component)
+    cuda_add_executable(${_name} ${ARGN})
+    # must link explicitly against boost.
+    target_link_libraries(${_name} ${Boost_LIBRARIES})
+    #
+    # Only link if needed
+    if(WIN32 AND MSVC)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+    else()
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+    endif()
+    #
+    set(PCL_EXECUTABLES ${PCL_EXECUTABLES} ${_name})
+    install(TARGETS ${_name} RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+        COMPONENT ${_component})
+endmacro(PCL_CUDA_ADD_EXECUTABLE)
+
 ###############################################################################
 # Add a test target.
 # _name The test name.


Made all libraries not required by default.

--- libraries/libraries.cmake
+++ libraries/libraries.cmake
@@ -30,7 +30,7 @@

     # Setup cache
     if(NOT ${${LIBRARY}_SECONDARY})
-        set(${LIBRARY}_REQUIRED ON CACHE BOOL "Causes the compilation to fail if ${LIBRARY} cannot be found.")
+        set(${LIBRARY}_REQUIRED OFF CACHE BOOL "Causes the compilation to fail if ${LIBRARY} cannot be found.")
         set(${LIBRARY}_IGNORE OFF CACHE BOOL "Ignores this library even if it was found.")
     endif()


Cleanup toolchain

Cleanup toolchain

--- toolchains/linux_x86.cmake
+++ toolchains/linux_x86.cmake
@@ -6,9 +6,4 @@
 set(CMAKE_SHARED_COMPILER_FLAGS "-m32 -L/usr/lib32")
 set(CMAKE_SHARED_LINKER_FLAGS "-m32 -L/usr/lib32")

-set(TARGET_ARCHITECTURE "x86")
-
-#set(CMAKE_FIND_ROOT_PATH /usr/lib32)
-#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)+set(TARGET_ARCHITECTURE "x86")


cmake: set variables set by project call

ESP-IDF overrides project() definition for user convenience. This
redefinition lacks setting the variables documented at
the project command documentation
https://cmake.org/cmake/help/v3.5/command/project.html in the parent
scope.

This commit sets those variables.

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

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -264,6 +264,31 @@
     function(project)
         set(project_ARGV ARGV)
         __project(${${project_ARGV}})
+
+        # Set the variables that project() normally sets, documented in the
+        # command's docs.
+        #
+        # https://cmake.org/cmake/help/v3.5/command/project.html
+        #
+        # There is some nuance when it comes to setting version variables in terms of whether
+        # CMP0048 is set to OLD or NEW. However, the proper behavior should have bee already handled by the original
+        # project call, and we're just echoing the values those variables were set to.
+        set(PROJECT_NAME "${PROJECT_NAME}" PARENT_SCOPE)
+        set(PROJECT_BINARY_DIR "${PROJECT_BINARY_DIR}" PARENT_SCOPE)
+        set(PROJECT_SOURCE_DIR "${PROJECT_SOURCE_DIR}" PARENT_SCOPE)
+        set(PROJECT_VERSION "${PROJECT_VERSION}" PARENT_SCOPE)
+        set(PROJECT_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}" PARENT_SCOPE)
+        set(PROJECT_VERSION_MINOR "${PROJECT_VERSION_MINOR}" PARENT_SCOPE)
+        set(PROJECT_VERSION_PATCH "${PROJECT_VERSION_PATCH}" PARENT_SCOPE)
+        set(PROJECT_VERSION_TWEAK "${PROJECT_VERSION_TWEAK}" PARENT_SCOPE)
+
+        set(${PROJECT_NAME}_BINARY_DIR "${${PROJECT_NAME}_BINARY_DIR}" PARENT_SCOPE)
+        set(${PROJECT_NAME}_SOURCE_DIR "${${PROJECT_NAME}_SOURCE_DIR}" PARENT_SCOPE)
+        set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION}" PARENT_SCOPE)
+        set(${PROJECT_NAME}_VERSION_MAJOR "${${PROJECT_NAME}_VERSION_MAJOR}" PARENT_SCOPE)
+        set(${PROJECT_NAME}_VERSION_MINOR "${${PROJECT_NAME}_VERSION_MINOR}" PARENT_SCOPE)
+        set(${PROJECT_NAME}_VERSION_PATCH "${${PROJECT_NAME}_VERSION_PATCH}" PARENT_SCOPE)
+        set(${PROJECT_NAME}_VERSION_TWEAK "${${PROJECT_NAME}_VERSION_TWEAK}" PARENT_SCOPE)
     endfunction()

     # Prepare the following arguments for the idf_build_process() call using external


Apparently boost 1.53 now needs atomic in order to use threads.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -162,8 +162,12 @@
 endif()

 if(Boost_FOUND AND Boost_VERSION GREATER 104900)
+    if(Boost_VERSION GREATER 105300)
+        set(OGRE_BOOST_COMPONENTS thread date_time system atomic chrono)
+    else()
         set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
-        find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
+    endif()
+    find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()

 # Optional Boost libs (Boost_${COMPONENT}_FOUND


BUG: missing depends to FFTW

BUG: missing depends to FFTW

--- CMake/External_ITK.cmake
+++ CMake/External_ITK.cmake
@@ -11,6 +11,7 @@
 if(USE_SYSTEM_ITK)
   message(STATUS "  Using ITK system version")
 else()
+  set(${proj}_DEPENDENCIES)
   set(ITK_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
   set(ITK_SB_SRC_DIR ${CMAKE_BINARY_DIR}/${proj}/src/${proj})

@@ -119,6 +120,8 @@
       set(ITK_SB_FFTW_CONFIG ${ITK_SB_FFTW_CONFIG}
         -DFFTW_INCLUDE_PATH:PATH=${CMAKE_INSTALL_PREFIX}/include
         )
+      list(APPEND ${proj}_DEPENDENCIES FFTWF)
+      list(APPEND ${proj}_DEPENDENCIES FFTWD)
     endif()
   endif()

@@ -145,6 +148,7 @@
     PATCH_COMMAND ${CMAKE_COMMAND} -E copy
       ${CMAKE_SOURCE_DIR}/patches/ITK/hashtable.hxx.in
       ${ITK_SB_SRC_DIR}/Modules/ThirdParty/KWSys/src/KWSys
+    DEPENDS ${${proj}_DEPENDENCIES}
     )

   # write patch in binary dir


BUG: detect the type of repository (hg/git)

--- CMake/SourceStatus.cmake
+++ CMake/SourceStatus.cmake
@@ -1,3 +1,4 @@
+if(EXISTS "${PROJECT_SOURCE_DIR}/.hg")
 find_package(Mercurial)
 if(Mercurial_FOUND)
   message(STATUS "Repository status :")
@@ -24,3 +25,27 @@
   endif()

 endif()
+endif()
+
+if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
+  find_package(Git)
+  if(GIT_FOUND)
+    execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=oneline
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+      OUTPUT_VARIABLE OTB_WC_VERSION
+      OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+    execute_process(COMMAND ${GIT_EXECUTABLE} status -s
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+      OUTPUT_VARIABLE OTB_WC_STATUS
+      OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+    message(STATUS "Repository status :")
+    message(STATUS "  Repository revision is ${OTB_WC_VERSION}")
+    if(OTB_WC_STATUS)
+      message(STATUS "  Local file modifications:")
+      string(REPLACE "\n" "\n--     " OTB_WC_STATUS_PRETTYPRINT "    ${OTB_WC_STATUS}")
+      message(STATUS "${OTB_WC_STATUS_PRETTYPRINT}")
+    else()
+      message(STATUS "  No files modified locally")
+    endif()
+  endif()
+endif()


Removed ExtApp Link from default config

Removed ExtApp Link from default config

--- CMake/mitkSetupCPack.cmake
+++ CMake/mitkSetupCPack.cmake
@@ -29,7 +29,6 @@
 set(CPACK_PACKAGE_NAME "MITK")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MITK is a medical image processing tool")
 set(CPACK_PACKAGE_VENDOR "German Cancer Research Center (DKFZ)")
-set(CPACK_CREATE_DESKTOP_LINKS "ExtApp")
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${MITK_SOURCE_DIR}/MITKCopyright.txt")
 set(CPACK_RESOURCE_FILE_LICENSE "${MITK_SOURCE_DIR}/MITKCopyright.txt")
 set(CPACK_PACKAGE_VERSION_MAJOR "${MITK_VERSION_MAJOR}")


Added ifc export to the test runs

Added ifc export to the test runs

--- CMakeModules/biicode.cmake
+++ CMakeModules/biicode.cmake
@@ -23,18 +23,19 @@
 add_test(NAME pmuc_collada COMMAND ${BII_src_main_TARGET} --collada ${CMAKE_CURRENT_SOURCE_DIR}/data/plm-sample_11072013.rvm)
 add_test(NAME pmuc_x3d COMMAND ${BII_src_main_TARGET} --x3d ${CMAKE_CURRENT_SOURCE_DIR}/data/plm-sample_11072013.rvm)
 add_test(NAME pmuc_x3db COMMAND ${BII_src_main_TARGET} --x3db ${CMAKE_CURRENT_SOURCE_DIR}/data/plm-sample_11072013.rvm)
+add_test(NAME pmuc_ifc COMMAND ${BII_src_main_TARGET} --ifc ${CMAKE_CURRENT_SOURCE_DIR}/data/plm-sample_11072013.rvm)

-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "315 group")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "118 pyramid")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "173 box")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "74 rectangualr torus")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "38 circular torus")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  2 elliptical dish")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  0 spherical dish")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  22 snout")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  139 cylinder")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  0 sphere")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  12 line")
-set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db PROPERTIES PASS_REGULAR_EXPRESSION "  80 facet group")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "315 group")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "118 pyramid")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "173 box")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "74 rectangualr torus")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "38 circular torus")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  2 elliptical dish")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  0 spherical dish")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  22 snout")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  139 cylinder")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  0 sphere")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  12 line")
+set_tests_properties(pmuc_collada pmuc_x3d pmuc_x3db pmuc_ifc PROPERTIES PASS_REGULAR_EXPRESSION "  80 facet group")


change DESTINATION argument name of ament_python_install_module()

--- rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
+++ rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
@@ -150,11 +150,11 @@

 if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
   ament_python_install_module("${_output_path}/__init__.py"
-    DESTINATION "${PROJECT_NAME}"
+    DESTINATION_SUFFIX "${PROJECT_NAME}"
   )

   ament_python_install_module("${_output_path}/__init__.py"
-    DESTINATION "${PROJECT_NAME}/${_msg_package_dir2}"
+    DESTINATION_SUFFIX "${PROJECT_NAME}/${_msg_package_dir2}"
   )

   # TODO(esteve): replace this with ament_python_install_module and allow a list


Boost.Test depends on the Numeric library, and graph_parallel has no headers of its own (at the moment)

[SVN r52796]

--- module.cmake
+++ module.cmake
@@ -1 +1 @@
-boost_module(test DEPENDS smart_ptr timer io bind)
+boost_module(test DEPENDS smart_ptr timer io bind numeric)


desktop: fallback download_command for cmake 3.0

--- desktop/External_SDL2.cmake
+++ desktop/External_SDL2.cmake
@@ -3,5 +3,6 @@
 ExternalProject_Add(SDL2
 	PREFIX ${SDL2_DIR}
 	CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
+	DOWNLOAD_COMMAND ""
 	SOURCE_DIR ../../SDL
 )


[UPD] Windows registry keys for Matlab r2011b and r2012a added in FindMatlab.cmake (not tested).
[FIX] Windows registry keys for Matlab 7.0(.x) 32-bit under Windows 7 64-bit added.

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@1182 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindMatlab.cmake
+++ CMake/FindMatlab.cmake
@@ -31,6 +31,8 @@

 IF(WIN32)
   SET(MATLAB_PATHS
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.14;MATLABROOT]"
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.13;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.12;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.11;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.10;MATLABROOT]"
@@ -47,6 +49,7 @@
   FIND_PATH(MATLAB_ROOT "license.txt" ${MATLAB_PATHS} NO_DEFAULT_PATH)
   IF (NOT MATLAB_ROOT)
     SET(MATLAB_PATHS
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.0;MATLABROOT]"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\6.5;MATLABROOT]"
     )


Part to of pull req opencog/atomspace#473

as requested in opencog/atomspace#385

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -36,7 +36,7 @@
 ENDIF (NOT PYTHON_FILE)

-# Check if this is for opencog/atomspace directory. If so, do not reference opencog::classserver()
+# Check if this is for opencog/atomspace directory. If so, do not reference opencog::classserver()
 # to avoid infinit recursivity in ClassServer constructor.
 STRING(REGEX MATCH ".*/opencog/atomspace" OPENCOG_ATOMSPACE_MATCHED "${CMAKE_CURRENT_SOURCE_DIR}")
 IF (OPENCOG_ATOMSPACE_MATCHED)
@@ -55,9 +55,9 @@

 # We need to touch the class-server before doing anything.
 # This is in order to guarantee that the main atomspace types
-# get created before other derived types.
+# get created before other derived types.
 #
-# There's still a potentially nasty bug here: if some third types.script
+# There's still a potentially nasty bug here: if some third types.script
 # file depends on types defined in a second file, but the third initializer
 # runs before the second, then any atoms in that third file that inherit
 # from the second will get a type of zero.  This will crash code later on.
@@ -81,6 +81,7 @@
 FILE(APPEND "${PYTHON_FILE}" "#\n")
 FILE(APPEND "${PYTHON_FILE}" "# This file contains basic python wrappers for atom creation.\n")
 FILE(APPEND "${PYTHON_FILE}" "#\n")
+FILE(APPEND "${PYTHON_FILE}" "from opencog.atomspace import TruthValue\n")
 FILE(APPEND "${PYTHON_FILE}" "\n")

 FILE(STRINGS "${SCRIPT_FILE}" TYPE_SCRIPT_CONTENTS)
@@ -116,7 +117,7 @@
         ENDIF (NOT "${TYPE}" STREQUAL "NOTYPE")

         IF (TYPE_NAME STREQUAL "")
-            # set type name using camel casing
+            # Set type name using camel casing
             STRING(REGEX MATCHALL "." CHARS ${TYPE})
             LIST(LENGTH CHARS LIST_LENGTH)
             MATH(EXPR LAST_INDEX "${LIST_LENGTH} - 1")
@@ -138,47 +139,48 @@
                 ENDIF (NOT ${C} STREQUAL "_")
             ENDFOREACH(I RANGE ${LIST_LENGTH})
         ENDIF (TYPE_NAME STREQUAL "")
-
-        MESSAGE(STATUS "Atom type name: ${TYPE_NAME}")
+
+        STRING(REGEX REPLACE "([a-zA-Z]*)(Link|Node)$" "\\1" SHORT_NAME ${TYPE_NAME})
+        MESSAGE(STATUS "Atom type name: ${TYPE_NAME} ${SHORT_NAME}")

         # Try to guess if the thing is a node or link based on its name
         STRING(REGEX MATCH "NODE$" ISNODE ${TYPE})
         STRING(REGEX MATCH "LINK$" ISLINK ${TYPE})
+
+        # If not named as a node or a link, assume its a link
+        # This is kind of hacky, but I don't know what else to do ...
+        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
+            SET(ISLINK "LINK")
+        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")

         # Print out the scheme definitions
         FILE(APPEND "${SCM_FILE}" "(define-public ${TYPE_NAME}Type (cog-type->int '${TYPE_NAME}))\n")
         IF (ISNODE STREQUAL "NODE")
             FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
             FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-node (append (list ${TYPE_NAME}Type) x)))\n")
+            IF (NOT SHORT_NAME STREQUAL "")
+                FILE(APPEND "${SCM_FILE}" "(define-public (${SHORT_NAME} . x)\n")
+                FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-node (append (list ${TYPE_NAME}Type) x)))\n")
+            ENDIF (NOT SHORT_NAME STREQUAL "")
         ENDIF (ISNODE STREQUAL "NODE")
         IF (ISLINK STREQUAL "LINK")
             FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
             FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list ${TYPE_NAME}Type) x)))\n")
+            IF (NOT SHORT_NAME STREQUAL "")
+                FILE(APPEND "${SCM_FILE}" "(define-public (${SHORT_NAME} . x)\n")
+                FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list ${TYPE_NAME}Type) x)))\n")
+            ENDIF (NOT SHORT_NAME STREQUAL "")
         ENDIF (ISLINK STREQUAL "LINK")
-
-        # If not named as a node or a link, assume its a link
-        # This is kind of hacky, but I don't know what else to do ...
-        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
-            FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
-            FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list ${TYPE_NAME}Type) x)))\n")
-        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")

         # Print out the python definitions
         IF (ISNODE STREQUAL "NODE")
-            FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(node_name):\n")
-            FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_node(types.${TYPE_NAME}, node_name)\n")
+            FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(node_name, tv=None):\n")
+            FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_node(types.${TYPE_NAME}, node_name, tv)\n")
         ENDIF (ISNODE STREQUAL "NODE")
         IF (ISLINK STREQUAL "LINK")
             FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(*args):\n")
             FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_link(types.${TYPE_NAME}, args)\n")
         ENDIF (ISLINK STREQUAL "LINK")
-
-        # If not named as a node or a link, assume its a link
-        # This is kind of hacky, but I don't know what else to do ...
-        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
-            FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(*args):\n")
-            FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_link(types.${TYPE_NAME}, args)\n")
-        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")

         IF (PARENT_TYPES)
             STRING(REGEX REPLACE "[ 	]*,[ 	]*" ";" PARENT_TYPES "${PARENT_TYPES}")


Update msvc.cmake (#849)

Update msvc.cmake (#849)

AscEmu requires at least Visual Studio 2019 update 16.9

--- cmake/Compilers/msvc.cmake
+++ cmake/Compilers/msvc.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2014-2021 AscEmu Team <http://www.ascemu.org>

-if(MSVC_VERSION VERSION_LESS 19.13) #2017 6
-    message(FATAL_ERROR "AscEmu requires at least Visual Studio 2017 update 6")
+if(MSVC_VERSION VERSION_LESS 19.28)
+    message(FATAL_ERROR "AscEmu requires at least Visual Studio 2019 update 16.9")
 endif()

 message(STATUS "Applying settings for ${CMAKE_CXX_COMPILER_ID}")


Set gtest dir also if prefix is given.

Set gtest dir also if prefix is given.

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@538 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/FindGoogleTest.cmake
+++ cmake/FindGoogleTest.cmake
@@ -35,6 +35,10 @@
     find_library(_GTEST_MAIN_LIBRARY gtest_main
       PATHS "${GTEST_PREFIX}/lib"
       NO_DEFAULT_PATH)
+
+    if ( _GTEST_LIBRARY )
+      get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE )
+    endif()
   else(GTEST_PREFIX)
     find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h"
       PATHS


build: Clean up the find-module for Sanitizers

Importantly, fiber support is not required.

Fixes #554.

--- cmake/FindSanitizers.cmake
+++ cmake/FindSanitizers.cmake
@@ -36,10 +36,6 @@
   set (Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS -fsanitize=undefined)
 endif ()

-if (Sanitizers_ADDRESS_FOUND AND Sanitizers_UNDEFINED_BEHAVIOR_FOUND)
-  set (Sanitizers_FOUND ON)
-endif ()
-
 set (Sanitizers_COMPILER_OPTIONS
   ${Sanitizers_ADDRESS_COMPILER_OPTIONS}
   ${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS})
@@ -51,9 +47,7 @@
 include (FindPackageHandleStandardArgs)

 find_package_handle_standard_args (Sanitizers
-  FOUND_VAR Sanitizers_FOUND
   REQUIRED_VARS
-    Sanitizers_FIBER_SUPPORT
     Sanitizers_ADDRESS_COMPILER_OPTIONS
     Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS)


external_rules.cmake: Pass along FIREBASE_PYTHON_HOST_EXECUTABLE because leveldb.cmake uses it (#9847)

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -27,6 +27,16 @@
     set(EXTERNAL_PROJECT_HTTP_HEADER "")
   endif()

+  # Pass along FIREBASE_PYTHON_HOST_EXECUTABLE because leveldb.cmake uses it.
+  if("${FIREBASE_PYTHON_HOST_EXECUTABLE}" STREQUAL "")
+    set(FIREBASE_PYTHON_HOST_EXECUTABLE_CMAKE_ARG "")
+  else()
+    set(
+      FIREBASE_PYTHON_HOST_EXECUTABLE_CMAKE_ARG
+      "-DFIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${FIREBASE_PYTHON_HOST_EXECUTABLE}"
+    )
+  endif()
+
   execute_process(
     COMMAND
       ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
@@ -36,6 +46,7 @@
       -DDOWNLOAD_BENCHMARK=${DOWNLOAD_BENCHMARK}
       -DDOWNLOAD_GOOGLETEST=${DOWNLOAD_GOOGLETEST}
       -DEXTERNAL_PROJECT_HTTP_HEADER=${EXTERNAL_PROJECT_HTTP_HEADER}
+      ${FIREBASE_PYTHON_HOST_EXECUTABLE_CMAKE_ARG}
       ${PROJECT_SOURCE_DIR}/cmake/external
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external
   )


jit fix

jit fix

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

--- cmake/gsJITConfigXml.cmake
+++ cmake/gsJITConfigXml.cmake
@@ -92,6 +92,11 @@
     set(JIT_CUDA_FLAGS "${JIT_CXX_FLAGS} ${CUDA_CXX14_STANDARD_COMPILE_OPTION}")
   endif()

+  # PIC for 64bit machines
+  if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+      set(JIT_CXX_FLAGS "${JIT_CXX_FLAGS} -fPIC")
+  endif()
+
   # Set includes
   string(REPLACE ";" " -I" JIT_INCLUDES "-I${GISMO_INCLUDE_DIRS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/src")


Implement EXCLUDE_PYTHON_LIBRARIES to workaround numpy installation bug found
by Geoff.

svn path=/trunk/; revision=10108

--- cmake/modules/python.cmake
+++ cmake/modules/python.cmake
@@ -43,7 +43,7 @@
   find_package(PythonInterp)
   if(NOT PYTHONINTERP_FOUND)
     message(STATUS "WARNING: "
-    "python interpreter not found. Disabling python bindings")
+      "python interpreter not found. Disabling python bindings")
     set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE)
   endif(NOT PYTHONINTERP_FOUND)
 endif(ENABLE_python)
@@ -55,7 +55,7 @@
   find_package(PythonLibs)
   if(NOT PYTHON_LIBRARIES OR NOT PYTHON_INCLUDE_PATH)
     message(STATUS "WARNING: "
-    "python library and/or header not found. Disabling python bindings")
+      "python library and/or header not found. Disabling python bindings")
     set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE)
   endif(NOT PYTHON_LIBRARIES OR NOT PYTHON_INCLUDE_PATH)
 endif(ENABLE_python)
@@ -66,12 +66,12 @@
   if(HAVE_NUMPY)
     # First check for new version of numpy (replaces Numeric)
     execute_process(
-    COMMAND
-    ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
-    OUTPUT_VARIABLE NUMPY_INCLUDE_PATH
-    RESULT_VARIABLE NUMPY_ERR
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
+      COMMAND
+      ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
+      OUTPUT_VARIABLE NUMPY_INCLUDE_PATH
+      RESULT_VARIABLE NUMPY_ERR
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      )
     if(NUMPY_ERR)
       set(HAVE_NUMPY OFF CACHE BOOL "Use numpy rather than deprecated Numeric" FORCE)
     endif(NUMPY_ERR)
@@ -84,38 +84,46 @@
     # Check for Python Numeric header in same include path or Numeric
     # subdirectory of that path to avoid version mismatch.
     find_path(
-    NUMERIC_INCLUDE_PATH
-    arrayobject.h
-    ${PYTHON_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH}/Numeric
-    )
+      NUMERIC_INCLUDE_PATH
+      arrayobject.h
+      ${PYTHON_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH}/Numeric
+      )
     if (NUMERIC_INCLUDE_PATH)
       set(PYTHON_NUMERIC_NAME Numeric CACHE INTERNAL "")
     endif (NUMERIC_INCLUDE_PATH)
   endif(HAVE_NUMPY)
   if(NUMERIC_INCLUDE_PATH)
     set(
-    PYTHON_INCLUDE_PATH
-    ${PYTHON_INCLUDE_PATH} ${NUMERIC_INCLUDE_PATH}
-    CACHE INTERNAL "")
+      PYTHON_INCLUDE_PATH
+      ${PYTHON_INCLUDE_PATH} ${NUMERIC_INCLUDE_PATH}
+      CACHE INTERNAL "")
   else(NUMERIC_INCLUDE_PATH)
     if(HAVE_NUMPY)
       message(STATUS "WARNING: "
-      "NumPy header not found. Disabling python bindings")
+	"NumPy header not found. Disabling python bindings")
     else(HAVE_NUMPY)
       message(STATUS "WARNING: "
-      "Numeric header not found. Disabling python bindings")
+	"Numeric header not found. Disabling python bindings")
     endif(HAVE_NUMPY)
     set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE)
   endif(NUMERIC_INCLUDE_PATH)
 endif(ENABLE_python AND NOT NUMERIC_INCLUDE_PATH)

+if(ENABLE_python AND HAVE_NUMPY)
+  # This numpy installation bug found by Geoff.
+  option(EXCLUDE_PYTHON_LIBRARIES "Linux temporary workaround for numpy installation bug for non-system Python install prefix" OFF)
+  if(EXCLUDE_PYTHON_LIBRARIES)
+    set(PYTHON_LIBRARIES)
+  endif(EXCLUDE_PYTHON_LIBRARIES)
+endif(ENABLE_python AND HAVE_NUMPY)
+
 if(ENABLE_python)
   # N.B. This is a nice way to obtain all sorts of python information
   # using distutils.
   execute_process(
-  COMMAND
-  ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
-  OUTPUT_VARIABLE PYTHON_INSTDIR
-  OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
+    COMMAND
+    ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
+    OUTPUT_VARIABLE PYTHON_INSTDIR
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
 endif(ENABLE_python)


build i386 and x86_64 on mac

build i386 and x86_64 on mac

--- cmake_modules/common.cmake
+++ cmake_modules/common.cmake
@@ -1,8 +1,6 @@
 SET(CMAKE_BUILD_TYPE Release) # Release | Debug
 SET(CMAKE_VERBOSE_MAKEFILE 0)
-SET(CMAKE_OSX_ARCHITECTURES i386 x86_64
-    CACHE STRING "The architectures to build on Mac"
-   )
+SET(CMAKE_OSX_ARCHITECTURES i386 x86_64)

 FIND_PATH(OpenCV_DIR OpenCVConfig.cmake
    "/opt/opencv/share/opencv"


- Add PNaCL library directory, it was missing

--- cmake/Toolchains/linux-nativeclient_linux.toolchain.cmake
+++ cmake/Toolchains/linux-nativeclient_linux.toolchain.cmake
@@ -55,6 +55,10 @@
     "${NACL_PATH}/include"
     )

+link_directories (
+    "${NACL_PATH}/lib/pnacl/Release/"
+    )
+
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


cleanups in package.cmake

cleanups in package.cmake

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -16,85 +16,77 @@

 OPTION(ENABLE_INSTALLER "Switches between installer or ZIP file creation for 'make package'" ON)

+SET(CPACK_PACKAGE_NAME Embree)
+SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")
+#SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
+
 SET(CPACK_PACKAGE_VERSION_MAJOR ${EMBREE_VERSION_MAJOR})
 SET(CPACK_PACKAGE_VERSION_MINOR ${EMBREE_VERSION_MINOR})
 SET(CPACK_PACKAGE_VERSION_PATCH ${EMBREE_VERSION_PATCH})
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Embree: High Performance Ray Tracing Kernels")
-SET(CPACK_PACKAGE_VENDOR "intel") # creates short name com.intel.embree2.xxx in pkgutil
+SET(CPACK_PACKAGE_VENDOR "Intel Corporation")
 SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)

-IF (WIN32)
-  SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities redist)
-ELSEIF (APPLE)
-    SET(CPACK_MONOLITHIC_INSTALL 1)
-ELSE()
-  SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities libraries_xeonphi tutorials_xeonphi utilities_xeonphi)
-ENDIF()
+SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
+SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "The Embree library.")

-SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
 SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Headers")
-SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "C and ISPC header files needed to develop applications with Embree.")
+SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "Header Files for C and ISPC required to develop applications with Embree.")
+
 SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
 SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Documents describing Embree's API, usage and tutorials.")
+
 SET(CPACK_COMPONENT_TUTORIALS_DISPLAY_NAME "Tutorials")
-SET(CPACK_COMPONENT_TUTORIALS_DESCRIPTION "A set of tutorials demonstrating how Embree can be used and extended.")
+SET(CPACK_COMPONENT_TUTORIALS_DESCRIPTION "Tutorials demonstrating how to use Embree.")
+
 SET(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME "Utilities")
 SET(CPACK_COMPONENT_UTILITIES_DESCRIPTION "Tools to benchmark, test and debug Embree.")
+
 SET(CPACK_COMPONENT_REDIST_DISPLAY_NAME "Redistributables")
-SET(CPACK_COMPONENT_REDIST_DESCRIPTION "Install 3rd-party redistributables needed by Embree.")
+SET(CPACK_COMPONENT_REDIST_DESCRIPTION "Installs 3rd-party redistributables needed by Embree.")

-SET(CPACK_COMPONENT_DOCUMENTATION_GROUP devel)
+# devel install group
 SET(CPACK_COMPONENT_LIBRARIES_GROUP devel)
 SET(CPACK_COMPONENT_HEADERS_GROUP devel)
+SET(CPACK_COMPONENT_DOCUMENTATION_GROUP devel)
+SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development")
+SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Files needed to develop applications based on Embree.")
+SET(CPACK_COMPONENT_DEVEL_DESCRIPTION ${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION})
+
+# example install group
 SET(CPACK_COMPONENT_TUTORIALS_GROUP examples)
 SET(CPACK_COMPONENT_UTILITIES_GROUP examples)
 SET(CPACK_COMPONENT_REDIST_GROUP examples)
+SET(CPACK_COMPONENT_GROUP_EXAMPLES_DISPLAY_NAME "Examples")
+SET(CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION "Example tutorials and tools for Embree.")
+SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION ${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION})
+
+# xeon phi install groups
 SET(CPACK_COMPONENT_LIBRARIES_XEONPHI_GROUP devel_xeonphi)
 SET(CPACK_COMPONENT_TUTORIALS_XEONPHI_GROUP examples_xeonphi)
 SET(CPACK_COMPONENT_UTILITIES_XEONPHI_GROUP examples_xeonphi)
-
-SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development")
-SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Files needed to develop applications based on Embree.")
-SET(CPACK_COMPONENT_DEVEL_DESCRIPTION ${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION})
 SET(XEONPHI_DESCRIPTION "For The Intel Xeon Phi coprocessor." )
 SET(CPACK_COMPONENT_DEVEL_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")
-SET(CPACK_COMPONENT_GROUP_EXAMPLES_DISPLAY_NAME "Examples")
-SET(CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION "Example tutorials and tools for Embree.")
-SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION ${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION})
 SET(CPACK_COMPONENT_EXAMPLES_XEONPHI_DESCRIPTION "${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION}\n${XEONPHI_DESCRIPTION}")

+# dependencies between components
 SET(CPACK_COMPONENT_TUTORIALS_DEPENDS libraries)
 SET(CPACK_COMPONENT_UTILITIES_DEPENDS libraries)
 SET(CPACK_COMPONENT_LIBRARIES_XEONPHI_DEPENDS libraries)
 SET(CPACK_COMPONENT_TUTORIALS_XEONPHI_DEPENDS libraries_xeonphi)
 SET(CPACK_COMPONENT_UTILITIES_XEONPHI_DEPENDS libraries_xeonphi)

-IF (APPLE)
-  SET(CPACK_COMPONENT_LIBRARIES_REQUIRED ON)
-  SET(CPACK_COMPONENT_UTILITIES_REQUIRED ON)
-  SET(CPACK_COMPONENT_TUTORIALS_REQUIRED ON)
-ELSE()
-  SET(CPACK_COMPONENT_LIBRARIES_REQUIRED ON)
-  SET(CPACK_COMPONENT_UTILITIES_DISABLED ON)
-  SET(CPACK_COMPONENT_TUTORIALS_DISABLED ON)
-ENDIF()
-
-IF (APPLE)
-  CONFIGURE_FILE(README.md README.txt)
-  SET(CPACK_RESOURCE_FILE_README ${PROJECT_BINARY_DIR}/README.txt)
-ELSE()
-  SET(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md)
-ENDIF()
+# point to readme and license files
+SET(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md)
 SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)
-#SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
-SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")

 # Windows specific settings
 IF(WIN32)
+  SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities redist)
   SET(CPACK_COMPONENT_REDIST_DISABLED ON)
   SET(CPACK_COMPONENT_TUTORIALS_DEPENDS redist)
   SET(CPACK_COMPONENT_UTILITIES_DEPENDS redist)
-  # detect and select Win32 or x64
+
   IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(ARCH x64)
     SET(PROGRAMFILES "\$PROGRAMFILES64")
@@ -102,8 +94,7 @@
     SET(ARCH win32)
     SET(PROGRAMFILES "\$PROGRAMFILES")
   ENDIF()
-  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${ARCH}")
-  SET(CPACK_PACKAGE_NAME Embree)
+  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}")

   # NSIS specific settings
   IF (ENABLE_INSTALLER)
@@ -116,22 +107,34 @@
     SET(CPACK_NSIS_MUI_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon32.ico)
     SET(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
   ELSE()
+    SET(CPACK_COMPONENTS_ALL)
+    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_GENERATOR ZIP)
+    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.windows")
   ENDIF()

 # MacOSX specific settings
 ELSEIF(APPLE)
+
+  CONFIGURE_FILE(README.md README.txt)
+  SET(CPACK_RESOURCE_FILE_README ${PROJECT_BINARY_DIR}/README.txt)
+
   IF (ENABLE_INSTALLER)
+    SET(CPACK_PACKAGE_VENDOR "intel") # creates short name com.intel.embree2.xxx in pkgutil
+    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_GENERATOR PackageMaker)
     SET(CPACK_OSX_PACKAGE_VERSION 10.7)
   ELSE()
+    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_GENERATOR TGZ)
+    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
   ENDIF()

 # Linux specific settings
 ELSE()

   IF (ENABLE_INSTALLER)
+    SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities libraries_xeonphi tutorials_xeonphi utilities_xeonphi)
     SET(CPACK_GENERATOR RPM)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64")
     SET(CPACK_RPM_COMPONENT_INSTALL ON)
@@ -147,8 +150,10 @@
     SET(CPACK_RPM_devel_xeonphi_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
     SET(CPACK_RPM_devel_xeonphi_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
   ELSE()
+    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_GENERATOR TGZ)
     SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
+    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
   ENDIF()

 ENDIF()


changing Windows install directory to Intel/Embree3

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -171,7 +171,7 @@
   IF (NOT EMBREE_ZIP_MODE)
     SET(CPACK_GENERATOR WIX)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.${VCVER}")
-    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree${EMBREE_VERSION_MAJOR} ${ARCH}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree${EMBREE_VERSION_MAJOR}")
     SET(CPACK_WIX_PRODUCT_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_NUMBER}")
     SET(CPACK_WIX_UPGRADE_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_MAJOR}0000") # upgrade as long as major version is the same
     SET(CPACK_WIX_CMAKE_PACKAGE_REGISTRY TRUE)


Added -fPIC for static libraries on 64 bit linux.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@1786 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/NektarCommon.cmake
+++ library/NektarCommon.cmake
@@ -146,6 +146,12 @@

     SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNEKTAR_RELEASE")

+    IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
+        # The static libraries must be compiled with position independent code
+        # on 64 bit Linux.
+        SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "-fPIC")
+    ENDIF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
+
     IF( ${CMAKE_COMPILER_IS_GNUCXX} )
         IF(NEKTAR_ENABLE_PROFILE)
             #SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -finstrument-functions")


[OGRE-273] Correct the case of the Ogre framework name to match what we build.

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -162,7 +162,7 @@
 	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")

 	# try to find framework on OSX
-	findpkg_framework(OGRE)
+	findpkg_framework(Ogre)
 else()
 	set(OGRE_LIBRARY_FWK "")
 endif()


Update test data.

Update test data.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,12 +12,12 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag e2d97a94) # first 8 characters of hash-tag
+  set(revision_tag b8db25fb) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}
     SOURCE_DIR ${proj}
-    URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz
+    URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/mitk-data_${revision_tag}.tar.gz
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""


Bug: CMAKE_BUILD_TYPE must be defined before use

--- CMakeModules/BaseConfig.cmake
+++ CMakeModules/BaseConfig.cmake
@@ -1,3 +1,10 @@
+IF(NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE Debug)
+  # SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+      # "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      # FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
 if(CMAKE_COMPILER_IS_GNUCC)
     SET(RSN_BASE_C_FLAGS "-std=c99 -pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter")
     SET(RSN_BASE_CXX_FLAGS "-Wall")
@@ -28,10 +35,3 @@
     ENDIF(${CMAKE_BUILD_TYPE} STREQUAL Debug)

 endif(CMAKE_COMPILER_IS_GNUCC)
-
-IF(NOT CMAKE_BUILD_TYPE)
-    set(CMAKE_BUILD_TYPE Debug)
-  # SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
-      # "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
-      # FORCE)
-ENDIF(NOT CMAKE_BUILD_TYPE)


Added feature to record custom event to QtTesting

- Added possibility to pause the record
- Added feature to be able to add custom comment during the record
      - simple comment
      - comment which block the play back

--- CMakeExternals/QtTesting.cmake
+++ CMakeExternals/QtTesting.cmake
@@ -23,7 +23,7 @@

     if(NOT DEFINED QtTesting_DIR)

-      set(revision_tag d26842afd5fc7c2fd6e08eb35bdaf982a9e61869)
+      set(revision_tag ed44502bf430651007f5ba737884a249dbb928e1)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()


Cache header file reads between CMake invocations.

The file will be re-read if CPP_IDENTIFIERS or the file itself
changes. This ensures that we don't spend a long time reading files
in the configure stage in this module.

--- DetermineHeaderLanguage.cmake
+++ DetermineHeaderLanguage.cmake
@@ -12,7 +12,7 @@
                                                          LANGUAGE)

     # ABSOLUTE_PATH is a GLOBAL property
-    # called "_CPPCHECK_H_MAP_" + ABSOLUTE_PATH.
+    # called "_PSQ_DETERMINE_LANG_LANGUAGE_" + ABSOLUTE_PATH.
     # We can't address it immediately by that name though,
     # because CMake properties and variables can only be
     # addressed by certain characters, however, internally,
@@ -25,36 +25,26 @@
     # and pass the string directly to the internal
     # implementation of "set", which sets the string
     # as the key value
-    set (MAP_KEY "_CPPCHECK_H_MAP_${ABSOLUTE_PATH_TO_HEADER}")
-    get_property (HEADER_FILE_LANGUAGE_SET GLOBAL PROPERTY "${MAP_KEY}" SET)
-
-    if (HEADER_FILE_LANGUAGE_SET)
-
-        get_property (HEADER_FILE_LANGUAGE GLOBAL PROPERTY "${MAP_KEY}")
-
-        # If it is just C, check our _CPPCHECK_HAS_CXX_TOKENS_MAP_ to see
-        # if this is actually a mixed mode header.
-        if (HEADER_FILE_LANGUAGE STREQUAL "C")
-
-            set (MIXED_MODE_MAP_KEY
-                 "_CPPCHECK_HAS_CXX_TOKENS_MAP_${ABSOLUTE_PATH_TO_HEADER}")
-            get_property (IS_MIXED_MODE GLOBAL PROPERTY
-                          "${MIXED_MODE_MAP_KEY}")
-
-            if (IS_MIXED_MODE)
-
-                list (APPEND HEADER_FILE_LANGUAGE "CXX")
-
-            endif (IS_MIXED_MODE)
-
-        endif (HEADER_FILE_LANGUAGE STREQUAL "C")
-
-        set (${LANGUAGE} ${HEADER_FILE_LANGUAGE} PARENT_SCOPE)
-        return ()
-
-    endif (HEADER_FILE_LANGUAGE_SET)
-
-    return ()
+    set (MAP_KEY "_PSQ_DETERMINE_LANG_LANGUAGE_${ABSOLUTE_PATH_TO_HEADER}")
+    set (HEADER_FILE_LANGUAGE "${${MAP_KEY}}")
+
+    # If it is just C, check our _PSQ_DETERMINE_LANG_HAS_CXX_TOKENS_ to see
+    # if this is actually a mixed mode header.
+    if ("${HEADER_FILE_LANGUAGE}" STREQUAL "C")
+
+        set (MIXED_MODE_MAP_KEY
+             "_PSQ_DETERMINE_LANG_HAS_CXX_TOKENS_${ABSOLUTE_PATH_TO_HEADER}")
+        set (IS_MIXED_MODE "${${MIXED_MODE_MAP_KEY}}")
+
+        if (IS_MIXED_MODE)
+
+            list (APPEND HEADER_FILE_LANGUAGE "CXX")
+
+        endif (IS_MIXED_MODE)
+
+    endif ("${HEADER_FILE_LANGUAGE}" STREQUAL "C")
+
+    set (${LANGUAGE} ${HEADER_FILE_LANGUAGE} PARENT_SCOPE)

 endfunction ()

@@ -198,7 +188,8 @@

 endfunction ()

-function (_psq_process_include_statement_path INCLUDE_PATH UPDATE_HEADERS)
+function (_psq_process_include_statement_path INCLUDE_PATH
+                                              UPDATE_HEADERS_RETURN)

     set (HEADERS_TO_UPDATE_LIST)
     set (PROCESS_MULTIVAR_ARGS INCLUDES)
@@ -226,9 +217,6 @@
             _psq_get_absolute_path_to_header_file_language (${ABSOLUTE_PATH}
                                                             HEADER_LANGUAGE)

-            set (MAP_KEY "_CPPCHECK_H_MAP_${ABSOLUTE_PATH}")
-            set (UPDATE_HEADER_IN_MAP FALSE)
-
             list (FIND HEADER_LANGUAGE "C" C_INDEX)

             if (DEFINED HEADER_LANGUAGE AND
@@ -246,7 +234,7 @@

     endforeach ()

-    set (${UPDATE_HEADERS} ${HEADERS_TO_UPDATE_LIST} PARENT_SCOPE)
+    set (${UPDATE_HEADERS_RETURN} ${HEADERS_TO_UPDATE_LIST} PARENT_SCOPE)

 endfunction ()

@@ -285,7 +273,8 @@

     if (NOT DEFINED SCAN_SOURCE)

-        message (FATAL_ERROR "SOURCE ${SCAN_SOURCE} must be set to use this function")
+        message (FATAL_ERROR "SOURCE ${SCAN_SOURCE} must be "
+                             "set to use this function")

     endif (NOT DEFINED SCAN_SOURCE)

@@ -325,96 +314,140 @@
     set_property (GLOBAL APPEND PROPERTY _CPPCHECK_ALREADY_SCANNED_SOURCES
                   ${SCAN_SOURCE})

-    # Open the source file and read its contents
-    file (READ ${SCAN_SOURCE} SOURCE_CONTENTS)
-
-    # Split the read contents into lines, using ; as the delimiter
-    string (REGEX REPLACE ";" "\\\\;" SOURCE_CONTENTS "${SOURCE_CONTENTS}")
-    string (REGEX REPLACE "\n" ";" SOURCE_CONTENTS "${SOURCE_CONTENTS}")
-
-    _psq_language_from_source (${SCAN_SOURCE} LANGUAGE WAS_HEADER)
-
-    # If we are scanning a header file right now, the we need to check now
-    # while reading it for other headers for CXX tokens too. If there are
-    # CXX tokens, we'll keep it in our special _CPPCHECK_HAS_CXX_TOKENS_MAP_
-    set (SCAN_FOR_CXX_IDENTIFIERS ${WAS_HEADER})
-
-    foreach (LINE ${SOURCE_CONTENTS})
-
-        # This is an #include statement, check what is within it
-        if (LINE MATCHES "^.*\#include.*[<\"].*[>\"]")
-
-            # Start with ${LINE}
-            set (HEADER ${LINE})
-
-            # Trim out the beginning and end of the include statement
-            # Because CMake doesn't support non-greedy expressions (eg "?")
-            # we need to match based on indices and not using REGEX REPLACE
-            # so we need to use REGEX MATCH to get the first match and then
-            # FIND to get the index.
-            string (REGEX MATCH "[<\"]" PATH_START "${HEADER}")
-            string (FIND "${HEADER}" "${PATH_START}" PATH_START_INDEX)
-            math (EXPR PATH_START_INDEX "${PATH_START_INDEX} + 1")
-            string (SUBSTRING "${HEADER}" ${PATH_START_INDEX} -1 HEADER)
-
-            string (REGEX MATCH "[>\"]" PATH_END "${HEADER}")
-            string (FIND "${HEADER}" "${PATH_END}" PATH_END_INDEX)
-            string (SUBSTRING "${HEADER}" 0 ${PATH_END_INDEX} HEADER)
-
-            string (STRIP ${HEADER} HEADER)
-
-            # Check if this include statement has quotes. If it does, then
-            # we should include the current source directory in the include
-            # directory scan.
-            string (FIND "${LINE}" "\"" QUOTE_INDEX)
-
-            if (NOT QUOTE_INDEX EQUAL -1)
-
-                list (APPEND SCAN_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR})
-
-            endif (NOT QUOTE_INDEX EQUAL -1)
-
-            _psq_process_include_statement_path (${HEADER} UPDATE_HEADERS
-                                                 INCLUDES ${SCAN_INCLUDES})
-
-            # Every correct combination of include-directory to header
-            foreach (HEADER ${UPDATE_HEADERS})
-
-                set (MAP_KEY "_CPPCHECK_H_MAP_${HEADER}")
-                set_property (GLOBAL PROPERTY "${MAP_KEY}"
-                                              "${LANGUAGE}")
-
-                # Recursively scan for header more header files
-                # in this one
-                polysquare_scan_source_for_headers (SOURCE ${HEADER}
-                                                    INCLUDES
-                                                    ${SCAN_INCLUDES}
-                                                    CPP_IDENTIFIERS
-                                                    ${SCAN_CPP_IDENTIFIERS})
-
-            endforeach ()
-
-       endif (LINE MATCHES "^.*\#include.*[<\"].*[>\"]")
-
-       if (SCAN_FOR_CXX_IDENTIFIERS)
-
-            list (APPEND SCAN_CPP_IDENTIFIERS
-                  __cplusplus)
-            list (REMOVE_DUPLICATES SCAN_CPP_IDENTIFIERS)
-
-            foreach (IDENTIFIER ${SCAN_CPP_IDENTIFIERS})
-
-                if (LINE MATCHES "^.*${IDENTIFIER}")
-
-                    set (MAP_KEY "_CPPCHECK_HAS_CXX_TOKENS_MAP_${SCAN_SOURCE}")
-                    set_property (GLOBAL PROPERTY "${MAP_KEY}" TRUE)
-                    set (SCAN_FOR_CXX_IDENTIFIERS FALSE)
-
-                endif (LINE MATCHES "^.*${IDENTIFIER}")
-
-            endforeach ()
-
-        endif (SCAN_FOR_CXX_IDENTIFIERS)
+    set (HEADER_PATHS_MAP_KEY "_PSQ_DETERMINE_LANG_HEADERS_${SCAN_SOURCE}")
+    set (HAS_CXX_TOKENS_MAP_KEY
+         "_PSQ_DETERMINE_LANG_HAS_CXX_TOKENS_${SCAN_SOURCE}")
+    set (SCANNED_CXX_TOKENS_MAP_KEY
+         "_PSQ_DETERMINE_LANG_SCANNED_CXX_TOKENS_${SCAN_SOURCE}")
+    set (FILE_TIMESTAMP_MAP_KEY
+         "_PSQ_DETERMINE_LANG_SCAN_TIMESTAMP_${SCAN_SOURCE}")
+
+    # Check the source file's timestamp and then check it against what we have
+    # in the cache. If it is different, or CPP_IDENTIFIERS are different, then
+    # we need to re-scan this file
+    file (TIMESTAMP ${SCAN_SOURCE} FILE_TIMESTAMP)
+
+    if (NOT "${FILE_TIMESTAMP}" STREQUAL "${${FILE_TIMESTAMP_MAP_KEY}}" OR
+        NOT "${CPP_IDENTIFIERS}" STREQUAL "${${SCANNED_CXX_TOKENS_MAP_KEY}}")
+
+        set ("${FILE_TIMESTAMP_MAP_KEY}"
+             "${FILE_TIMESTAMP}" CACHE INTERNAL "" FORCE)
+
+        # Open the source file and read its contents
+        file (READ ${SCAN_SOURCE} SOURCE_CONTENTS)
+        message ("READ ${SCAN_SOURCE}")
+
+        # Split the read contents into lines, using ; as the delimiter
+        string (REGEX REPLACE ";" "\\\\;" SOURCE_CONTENTS "${SOURCE_CONTENTS}")
+        string (REGEX REPLACE "\n" ";" SOURCE_CONTENTS "${SOURCE_CONTENTS}")
+
+        _psq_language_from_source (${SCAN_SOURCE} LANGUAGE WAS_HEADER)
+
+        # If we are scanning a header file right now, the we need to check now
+        # while reading it for other headers for CXX tokens too. If there are
+        # CXX tokens, we'll keep it in our special
+        # _PSQ_DETERMINE_LANG_HAS_CXX_TOKENS_
+        set (SCAN_FOR_CXX_IDENTIFIERS ${WAS_HEADER})
+
+        foreach (LINE ${SOURCE_CONTENTS})
+
+            # This is an #include statement, check what is within it
+            if (LINE MATCHES "^.*\#include.*[<\"].*[>\"]")
+
+                # Start with ${LINE}
+                set (HEADER ${LINE})
+
+                # Trim out the beginning and end of the include statement
+                # Because CMake doesn't support non-greedy expressions (eg "?")
+                # we need to match based on indices and not using REGEX REPLACE
+                # so we need to use REGEX MATCH to get the first match and then
+                # FIND to get the index.
+                string (REGEX MATCH "[<\"]" PATH_START "${HEADER}")
+                string (FIND "${HEADER}" "${PATH_START}" PATH_START_INDEX)
+                math (EXPR PATH_START_INDEX "${PATH_START_INDEX} + 1")
+                string (SUBSTRING "${HEADER}" ${PATH_START_INDEX} -1 HEADER)
+
+                string (REGEX MATCH "[>\"]" PATH_END "${HEADER}")
+                string (FIND "${HEADER}" "${PATH_END}" PATH_END_INDEX)
+                string (SUBSTRING "${HEADER}" 0 ${PATH_END_INDEX} HEADER)
+
+                string (STRIP ${HEADER} HEADER)
+
+                # Check if this include statement has quotes. If it does, then
+                # we should include the current source directory in the include
+                # directory scan.
+                string (FIND "${LINE}" "\"" QUOTE_INDEX)
+
+                if (NOT QUOTE_INDEX EQUAL -1)
+
+                    list (APPEND SCAN_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR})
+
+                endif (NOT QUOTE_INDEX EQUAL -1)
+
+                _psq_process_include_statement_path (${HEADER} UPDATE_HEADERS
+                                                     INCLUDES ${SCAN_INCLUDES})
+
+                # Every correct combination of include-directory to header
+                foreach (HEADER ${UPDATE_HEADERS})
+
+                    set (LANGUAGE_MAP_KEY
+                         "_PSQ_DETERMINE_LANG_LANGUAGE_${HEADER}")
+                    set ("${LANGUAGE_MAP_KEY}" "${LANGUAGE}"
+                         CACHE INTERNAL "" FORCE)
+
+                    list (FIND "${HEADER_PATHS_MAP_KEY}"
+                          ${HEADER} PATH_TO_SCAN_INDEX)
+
+                    if (PATH_TO_SCAN_INDEX EQUAL -1)
+
+                        list (APPEND "${HEADER_PATHS_MAP_KEY}" ${HEADER})
+                        set ("${HEADER_PATHS_MAP_KEY}"
+                             "${${HEADER_PATHS_MAP_KEY}}"
+                             CACHE INTERNAL "" FORCE)
+
+                    endif (PATH_TO_SCAN_INDEX EQUAL -1)
+
+                endforeach ()
+
+           endif (LINE MATCHES "^.*\#include.*[<\"].*[>\"]")
+
+           if (SCAN_FOR_CXX_IDENTIFIERS)
+
+                list (APPEND SCAN_CPP_IDENTIFIERS
+                      __cplusplus)
+                list (REMOVE_DUPLICATES SCAN_CPP_IDENTIFIERS)
+
+                foreach (IDENTIFIER ${SCAN_CPP_IDENTIFIERS})
+
+                    if (LINE MATCHES "^.*${IDENTIFIER}")
+
+                        set ("${HAS_CXX_TOKENS_MAP_KEY}" TRUE
+                             CACHE INTERNAL "" FORCE)
+                        set ("${SCANNED_CXX_TOKENS_MAP_KEY}"
+                             ${SCAN_CPP_IDENTIFIERS}
+                             CACHE INTERNAL "" FORCE)
+                        set (SCAN_FOR_CXX_IDENTIFIERS FALSE)
+
+                    endif (LINE MATCHES "^.*${IDENTIFIER}")
+
+                endforeach ()
+
+            endif (SCAN_FOR_CXX_IDENTIFIERS)
+
+        endforeach ()
+
+    endif (NOT "${FILE_TIMESTAMP}" STREQUAL "${${FILE_TIMESTAMP_MAP_KEY}}" OR
+           NOT "${CPP_IDENTIFIERS}" STREQUAL "${${SCANNED_CXX_TOKENS_MAP_KEY}}")
+
+    foreach (HEADER ${${HEADER_PATHS_MAP_KEY}})
+
+        # Recursively scan for header more header files
+        # in this one
+        polysquare_scan_source_for_headers (SOURCE ${HEADER}
+                                            INCLUDES
+                                            ${SCAN_INCLUDES}
+                                            CPP_IDENTIFIERS
+                                            ${SCAN_CPP_IDENTIFIERS})

     endforeach ()

@@ -526,5 +559,4 @@

     message (FATAL_ERROR "This section should not be reached")

-endfunction ()
-
+endfunction ()