* make sure that we always check for SSE flags no matter what, to be able to enable @-mfpmath=sse@ on SSE platforms

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@8259 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -20,159 +20,167 @@
         endif()
     endif()

-    if (NOT SSE_FLAGS)
-      include(CheckCXXSourceRuns)
-      set(CMAKE_REQUIRED_FLAGS)
-
-      check_cxx_source_runs("
-          #include <mm_malloc.h>
-          int main()
-          {
-            void* mem = _mm_malloc (100, 16);
-            return 0;
-          }"
-          HAVE_MM_MALLOC)
-
-      check_cxx_source_runs("
-          #include <stdlib.h>
-          int main()
-          {
-            void* mem;
-            return posix_memalign (&mem, 16, 100);
-          }"
-          HAVE_POSIX_MEMALIGN)
-
-      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-          set(CMAKE_REQUIRED_FLAGS "-msse4.2")
-      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-
-      check_cxx_source_runs("
-          #include <emmintrin.h>
-          #include <nmmintrin.h>
-          int main ()
-          {
-            long long a[2] = {  1, 2 };
-            long long b[2] = { -1, 3 };
-            long long c[2];
-            __m128i va = _mm_loadu_si128 ((__m128i*)a);
-            __m128i vb = _mm_loadu_si128 ((__m128i*)b);
-            __m128i vc = _mm_cmpgt_epi64 (va, vb);
-
-            _mm_storeu_si128 ((__m128i*)c, vc);
-            if (c[0] == -1LL && c[1] == 0LL)
-              return (0);
-            else
-              return (1);
-          }"
-          HAVE_SSE4_2_EXTENSIONS)
-
-      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-          set(CMAKE_REQUIRED_FLAGS "-msse4.1")
-      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-
-      check_cxx_source_runs("
-          #include <smmintrin.h>
-          int main ()
-          {
+    # Unfortunately we need to check for SSE to enable "-mfpmath=sse" alongside
+    # "-march=native". The reason for this is that by default, 32bit architectures
+    # tend to use the x87 FPU (which has 80 bit internal precision), thus leading
+    # to different results than 64bit architectures which are using SSE2 (64 bit internal
+    # precision). One solution would be to use "-ffloat-store" on 32bit (see
+    # http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html), but that slows code down,
+    # so the preferred solution is to try "-mpfmath=sse" first.
+    include(CheckCXXSourceRuns)
+    set(CMAKE_REQUIRED_FLAGS)
+
+    check_cxx_source_runs("
+        #include <mm_malloc.h>
+        int main()
+        {
+          void* mem = _mm_malloc (100, 16);
+          return 0;
+        }"
+        HAVE_MM_MALLOC)
+
+    check_cxx_source_runs("
+        #include <stdlib.h>
+        int main()
+        {
+          void* mem;
+          return posix_memalign (&mem, 16, 100);
+        }"
+        HAVE_POSIX_MEMALIGN)
+
+    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+        set(CMAKE_REQUIRED_FLAGS "-msse4.2")
+    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+
+    check_cxx_source_runs("
+        #include <emmintrin.h>
+        #include <nmmintrin.h>
+        int main ()
+        {
+          long long a[2] = {  1, 2 };
+          long long b[2] = { -1, 3 };
+          long long c[2];
+          __m128i va = _mm_loadu_si128 ((__m128i*)a);
+          __m128i vb = _mm_loadu_si128 ((__m128i*)b);
+          __m128i vc = _mm_cmpgt_epi64 (va, vb);
+
+          _mm_storeu_si128 ((__m128i*)c, vc);
+          if (c[0] == -1LL && c[1] == 0LL)
+            return (0);
+          else
+            return (1);
+        }"
+        HAVE_SSE4_2_EXTENSIONS)
+
+    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+        set(CMAKE_REQUIRED_FLAGS "-msse4.1")
+    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+
+    check_cxx_source_runs("
+        #include <smmintrin.h>
+        int main ()
+        {
+          __m128 a, b;
+          float vals[4] = {1, 2, 3, 4};
+          const int mask = 123;
+          a = _mm_loadu_ps (vals);
+          b = a;
+          b = _mm_dp_ps (a, a, mask);
+          _mm_storeu_ps (vals,b);
+          return (0);
+        }"
+        HAVE_SSE4_1_EXTENSIONS)
+
+    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+        set(CMAKE_REQUIRED_FLAGS "-msse3")
+    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+
+    check_cxx_source_runs("
+        #include <pmmintrin.h>
+        int main ()
+        {
+            __m128d a, b;
+            double vals[2] = {0};
+            a = _mm_loadu_pd (vals);
+            b = _mm_hadd_pd (a,a);
+            _mm_storeu_pd (vals, b);
+            return (0);
+        }"
+        HAVE_SSE3_EXTENSIONS)
+
+    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+        set(CMAKE_REQUIRED_FLAGS "-msse2")
+    elseif(MSVC AND NOT CMAKE_CL_64)
+        set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
+    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+
+    check_cxx_source_runs("
+        #include <emmintrin.h>
+        int main ()
+        {
+            __m128d a, b;
+            double vals[2] = {0};
+            a = _mm_loadu_pd (vals);
+            b = _mm_add_pd (a,a);
+            _mm_storeu_pd (vals,b);
+            return (0);
+        }"
+        HAVE_SSE2_EXTENSIONS)
+
+    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+        set(CMAKE_REQUIRED_FLAGS "-msse")
+    elseif(MSVC AND NOT CMAKE_CL_64)
+        set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
+    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+
+    check_cxx_source_runs("
+        #include <xmmintrin.h>
+        int main ()
+        {
             __m128 a, b;
-            float vals[4] = {1, 2, 3, 4};
-            const int mask = 123;
+            float vals[4] = {0};
             a = _mm_loadu_ps (vals);
             b = a;
-            b = _mm_dp_ps (a, a, mask);
+            b = _mm_add_ps (a,b);
             _mm_storeu_ps (vals,b);
             return (0);
-          }"
-          HAVE_SSE4_1_EXTENSIONS)
-
-      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-          set(CMAKE_REQUIRED_FLAGS "-msse3")
-      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-
-      check_cxx_source_runs("
-          #include <pmmintrin.h>
-          int main ()
-          {
-              __m128d a, b;
-              double vals[2] = {0};
-              a = _mm_loadu_pd (vals);
-              b = _mm_hadd_pd (a,a);
-              _mm_storeu_pd (vals, b);
-              return (0);
-          }"
-          HAVE_SSE3_EXTENSIONS)
-
-      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-          set(CMAKE_REQUIRED_FLAGS "-msse2")
-      elseif(MSVC AND NOT CMAKE_CL_64)
-          set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
-      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-
-      check_cxx_source_runs("
-          #include <emmintrin.h>
-          int main ()
-          {
-              __m128d a, b;
-              double vals[2] = {0};
-              a = _mm_loadu_pd (vals);
-              b = _mm_add_pd (a,a);
-              _mm_storeu_pd (vals,b);
-              return (0);
-          }"
-          HAVE_SSE2_EXTENSIONS)
-
-      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-          set(CMAKE_REQUIRED_FLAGS "-msse")
-      elseif(MSVC AND NOT CMAKE_CL_64)
-          set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
-      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-
-      check_cxx_source_runs("
-          #include <xmmintrin.h>
-          int main ()
-          {
-              __m128 a, b;
-              float vals[4] = {0};
-              a = _mm_loadu_ps (vals);
-              b = a;
-              b = _mm_add_ps (a,b);
-              _mm_storeu_ps (vals,b);
-              return (0);
-          }"
-          HAVE_SSE_EXTENSIONS)
-
-      set(CMAKE_REQUIRED_FLAGS)
-
-      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
-          if(HAVE_SSE4_2_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} -msse4.2 -mfpmath=sse")
-              message(STATUS "Found SSE4.2 extensions, using flags: ${SSE_FLAGS}")
-          elseif(HAVE_SSE4_1_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1 -mfpmath=sse")
-              message(STATUS "Found SSE4.1 extensions, using flags: ${SSE_FLAGS}")
-          elseif(HAVE_SSE3_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} -msse3 -mfpmath=sse")
-              message(STATUS "Found SSE3 extensions, using flags: ${SSE_FLAGS}")
-          elseif(HAVE_SSE2_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} -msse2 -mfpmath=sse")
-              message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
-          elseif(HAVE_SSE_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} -msse -mfpmath=sse")
-              message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
-          else()
-              message(STATUS "No SSE extensions found")
-          endif()
-      elseif(MSVC AND NOT CMAKE_CL_64)
-          if(HAVE_SSE2_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
-              message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
-          elseif(HAVE_SSE_EXTENSIONS)
-              SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE")
-              message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
-          endif(HAVE_SSE2_EXTENSIONS)
-      endif()
-
+        }"
+        HAVE_SSE_EXTENSIONS)
+
+    set(CMAKE_REQUIRED_FLAGS)
+
+    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+        if(HAVE_SSE4_2_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} -msse4.2 -mfpmath=sse")
+            message(STATUS "Found SSE4.2 extensions, using flags: ${SSE_FLAGS}")
+        elseif(HAVE_SSE4_1_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1 -mfpmath=sse")
+            message(STATUS "Found SSE4.1 extensions, using flags: ${SSE_FLAGS}")
+        elseif(HAVE_SSE3_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} -msse3 -mfpmath=sse")
+            message(STATUS "Found SSE3 extensions, using flags: ${SSE_FLAGS}")
+        elseif(HAVE_SSE2_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} -msse2 -mfpmath=sse")
+            message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+        elseif(HAVE_SSE_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} -msse -mfpmath=sse")
+            message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
+        else()
+            # Setting -ffloat-store to alleviate 32bit vs 64bit discrepancies on non-SSE
+            # platforms.
+            set(SSE_FLAGS "-ffloat-store")
+            message(STATUS "No SSE extensions found")
+        endif()
+    elseif(MSVC AND NOT CMAKE_CL_64)
+        if(HAVE_SSE2_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
+            message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+        elseif(HAVE_SSE_EXTENSIONS)
+            SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE")
+            message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
+        endif(HAVE_SSE2_EXTENSIONS)
     endif()
+
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${SSE_FLAGS}")


cmake: Generate memdisk.asm to build folder

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -361,8 +361,8 @@
                          REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
   add_custom_command(
     OUTPUT  memdisk.o
-    COMMAND python ${INSTALL_LOC}/memdisk/memdisk.py --file ${INSTALL_LOC}/memdisk/memdisk.asm ${DISK_RELPATH}
-    COMMAND nasm -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} ${INSTALL_LOC}/memdisk/memdisk.asm -o memdisk.o
+    COMMAND python ${INSTALL_LOC}/memdisk/memdisk.py --file memdisk.asm ${DISK_RELPATH}
+    COMMAND nasm -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} memdisk.asm -o memdisk.o
     DEPENDS ${DISK_RELPATH} fake_news
   )
   add_library(memdisk STATIC memdisk.o)
@@ -452,7 +452,7 @@
   libos
   libplatform
   libarch
-
+
   ${LIBR_CMAKE_NAMES}
   libos
   libbotan


enh: Add pthreads library to test link depends only when GTest_NO_PTHREADS not TRUE [CMake]

--- CMake/Modules/mirtkAddTest.cmake
+++ CMake/Modules/mirtkAddTest.cmake
@@ -44,14 +44,16 @@
   endforeach ()
   # Add test executable build target and CTest target
   if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test${target_name}.cc")
+    set(GTEST_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
+    if (UNIX AND NOT GTest_NO_PTHREADS AND CMAKE_USE_PTHREADS_INIT)
+      list(APPEND GTEST_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+    endif ()
     basis_add_test(test${target_name}
       SOURCES
         ${CMAKE_CURRENT_SOURCE_DIR}/test${target_name}.cc
         ${TARGET_SOURCES}
       LINK_DEPENDS
-        ${GTEST_LIBRARY}
-        ${GTEST_MAIN_LIBRARY}
-        ${CMAKE_THREAD_LIBS_INIT}
+        ${GTEST_LIBRARIES}
         ${TARGET_DEPENDS}
     )
   else ()


git-svn-id: https://svn.icg.tugraz.at/svn/vmgpu/trunk/vmlibraries/imageutilities@10171 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindImageUtilities.cmake
+++ imageutilities/cmake/FindImageUtilities.cmake
@@ -229,15 +229,6 @@
         set(IU_IUCORE_LIB_DEPENDENCIES ${IU_IUCORE_LIB_DEPENDENCIES} ${CUDA_SPARSE_LIBRARY})
       endif(CUDASparse_FOUND)

-      # Matlab
-      find_package(Matlab_ICG QUIET)
-      if(MATLAB_FOUND)
-        message("Matlab lib found")
-        include_directories(${MATLAB_INCLUDE_DIR})
-        cuda_include_directories(${MATLAB_INCLUDE_DIR})
-        set(IU_IUCORE_LIB_DEPENDENCIES ${IU_IUCORE_LIB_DEPENDENCIES} ${MATLAB_LIBRARIES})
-      endif(MATLAB_FOUND)
-
     endif(CUDA_FOUND AND CUDASDK_FOUND)
   endif(IU_IUCORE_FOUND)


Fix git command not found after first configure (#5880)

During the first configuration, the git command is searched
when submodules are initialized and it's then saved into a cache variable.
If though we delete the build folder and run configure again,
the submodules won't be initialized again, so the git command
won't be cached and visible to CMake.
Therefore we need to search for it each time.

Cleanup dead/deprecated code.

--- libraries/cmake/source/modules/utils.cmake
+++ libraries/cmake/source/modules/utils.cmake
@@ -7,27 +7,6 @@
 cmake_minimum_required(VERSION 3.14.6)

 option(OSQUERY_THIRD_PARTY_SOURCE_MODULE_WARNINGS "This option can be enable to show all warnings in the source modules. Not recommended" OFF)
-
-function(getGitExecutableName output_variable)
-  set(output "git")
-  if(DEFINED PLATFORM_WINDOWS)
-    set(output "${output}.exe")
-  endif()
-
-  set("${output_variable}" "${output}" PARENT_SCOPE)
-endfunction()
-
-function(locateGitExecutable output_variable)
-  getGitExecutableName(git_executable_name)
-
-  find_program(git_path "${git_executable_name}")
-  if("${git_path}" STREQUAL "git_path-NOTFOUND")
-    set("${output_variable}" "git_path-NOTFOUND" PARENT_SCOPE)
-
-  else()
-    set("${output_variable}" "${git_path}" PARENT_SCOPE)
-  endif()
-endfunction()

 function(initializeGitSubmodule submodule_path no_recursive shallow)
   file(GLOB submodule_folder_contents "${submodule_path}/*")
@@ -77,6 +56,7 @@
     return()
   endif()

+  find_package(Git REQUIRED)

   # We patch the submodule before moving it to the binary folder
   # because if git apply working directory is inside a repository or submodule


We're not Analitza

We're not Analitza

--- cmake/FindKPeople.cmake
+++ cmake/FindKPeople.cmake
@@ -1,10 +1,10 @@
 # Find libkpeople
 # Once done this will define
 #
-#  KPEOPLE_FOUND    - system has Analitza Library
-#  KPEOPLE_INCLUDES - the Analitza include directory
-#  KPEOPLE_LIBS     - link these to use Analitza
-#  KPEOPLE_VERSION  - the version of the Analitza Library
+#  KPEOPLE_FOUND    - system has KPeople Library
+#  KPEOPLE_INCLUDES - the KPeople include directory
+#  KPEOPLE_LIBS     - link these to use KPeople
+#  KPEOPLE_VERSION  - the version of the KPeople Library

 # Copyright (c) 2012, Aleix Pol Gonzalez <aleixpol@blue-systems.com>
 #
@@ -22,6 +22,6 @@
 endif(KPEOPLE_INCLUDE_DIR AND KPEOPLE_LIBRARY)

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Analitza  DEFAULT_MSG KPEOPLE_INCLUDE_DIR KPEOPLE_LIBRARY)
+find_package_handle_standard_args(KPeople  DEFAULT_MSG KPEOPLE_INCLUDE_DIR KPEOPLE_LIBRARY)

 mark_as_advanced(KPEOPLE_INCLUDE_DIR KPEOPLE_LIBRARY)


FindUmfPack: add AMD and COLAMD libraries only if they are found

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -28,8 +28,8 @@
     find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
     if (AMD_LIBRARY)
       set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})
-    else (AMD_LIBRARY)
-      set(UMFPACK_LIBRARIES FALSE)
+    #else (AMD_LIBRARY)
+    #  set(UMFPACK_LIBRARIES FALSE)
     endif (AMD_LIBRARY)

   endif(UMFPACK_LIBRARIES)
@@ -39,8 +39,8 @@
     find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
     if (COLAMD_LIBRARY)
       set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
-    else (COLAMD_LIBRARY)
-      set(UMFPACK_LIBRARIES FALSE)
+    #else (COLAMD_LIBRARY)
+    #  set(UMFPACK_LIBRARIES FALSE)
     endif (COLAMD_LIBRARY)

   endif(UMFPACK_LIBRARIES)


auto parse kernel deps by include (#38438)

--- cmake/pten_kernel.cmake
+++ cmake/pten_kernel.cmake
@@ -18,7 +18,7 @@
         file(READ ${kernel_path} kernel_impl)
         # TODO(chenweihang): rename PT_REGISTER_CTX_KERNEL to PT_REGISTER_KERNEL
         # NOTE(chenweihang): now we don't recommend to use digit in kernel name
-        string(REGEX MATCH "(PT_REGISTER_CTX_KERNEL|PT_REGISTER_GENERAL_KERNEL)\\([ \t\r\n]*[a-z_]*," first_registry "${kernel_impl}")
+        string(REGEX MATCH "(PT_REGISTER_CTX_KERNEL|PT_REGISTER_GENERAL_KERNEL)\\([ \t\r\n]*[a-z0-9_]*," first_registry "${kernel_impl}")
         if (NOT first_registry STREQUAL "")
             # parse the first kernel name
             string(REPLACE "PT_REGISTER_CTX_KERNEL(" "" kernel_name "${first_registry}")
@@ -49,6 +49,9 @@
     set(gpu_srcs)
     set(xpu_srcs)
     set(npu_srcs)
+    # parse and save the deps kerenl targets
+    set(all_srcs)
+    set(kernel_deps)

     set(oneValueArgs "")
     set(multiValueArgs SRCS DEPS)
@@ -57,7 +60,6 @@

     list(LENGTH kernel_library_SRCS kernel_library_SRCS_len)
     # one kernel only match one impl file in each backend
-    # TODO(chenweihang): parse compile deps by include headers
     if (${kernel_library_SRCS_len} EQUAL 0)
         if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.cc)
             list(APPEND common_srcs ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.cc)
@@ -84,6 +86,23 @@
         # TODO(chenweihang): impl compile by source later
     endif()

+    list(APPEND all_srcs ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.h)
+    list(APPEND all_srcs ${common_srcs})
+    list(APPEND all_srcs ${cpu_srcs})
+    list(APPEND all_srcs ${gpu_srcs})
+    list(APPEND all_srcs ${xpu_srcs})
+    foreach(src ${all_srcs})
+        file(READ ${src} target_content)
+        string(REGEX MATCHALL "#include \"paddle\/pten\/kernels\/[a-z0-9_]+_kernel.h\"" include_kernels ${target_content})
+        foreach(include_kernel ${include_kernels})
+            string(REGEX REPLACE "#include \"paddle\/pten\/kernels\/" "" kernel_name ${include_kernel})
+            string(REGEX REPLACE ".h\"" "" kernel_name ${kernel_name})
+            list(APPEND kernel_deps ${kernel_name})
+        endforeach()
+    endforeach()
+    list(REMOVE_DUPLICATES kernel_deps)
+    list(REMOVE_ITEM kernel_deps ${TARGET})
+
     list(LENGTH common_srcs common_srcs_len)
     list(LENGTH cpu_srcs cpu_srcs_len)
     list(LENGTH gpu_srcs gpu_srcs_len)
@@ -95,11 +114,11 @@
         # we will use this implementation and will not adopt the implementation
         # under specific devices
         if (WITH_GPU)
-            nv_library(${TARGET} SRCS ${common_srcs} DEPS ${kernel_library_DEPS})
+            nv_library(${TARGET} SRCS ${common_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
         elseif (WITH_ROCM)
-            hip_library(${TARGET} SRCS ${common_srcs} DEPS ${kernel_library_DEPS})
+            hip_library(${TARGET} SRCS ${common_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
         else()
-            cc_library(${TARGET} SRCS ${common_srcs} DEPS ${kernel_library_DEPS})
+            cc_library(${TARGET} SRCS ${common_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
         endif()
     else()
         # If the kernel has a header file declaration, but no corresponding
@@ -110,15 +129,15 @@
         else()
             if (WITH_GPU)
                 if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0)
-                    nv_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS})
+                    nv_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
                 endif()
             elseif (WITH_ROCM)
                 if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0)
-                    hip_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS})
+                    hip_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
                 endif()
             else()
                 if (${cpu_srcs_len} GREATER 0 OR ${xpu_srcs_len} GREATER 0 OR ${npu_srcs_len} GREATER 0)
-                    cc_library(${TARGET} SRCS ${cpu_srcs} ${xpu_srcs} ${npu_srcs} DEPS ${kernel_library_DEPS})
+                    cc_library(${TARGET} SRCS ${cpu_srcs} ${xpu_srcs} ${npu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
                 endif()
             endif()
         endif()


this isn't packagable.  the stack is packagable.  install via setup.py
is handled by enable_python()

--- core/roslib/catkin.cmake
+++ core/roslib/catkin.cmake
@@ -7,7 +7,4 @@
   PYTHONPATH src
   )

-catkin_package(roslib)
 enable_python(roslib)
-
-


need all options before adding dependencies

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -21,25 +21,6 @@

 #This needs to be unique globally
 set(proj STIR)
-
-# Set dependency list
-set(${proj}_DEPENDENCIES "Boost")
-if (USE_ITK)
-  list(APPEND ${proj}_DEPENDENCIES "ITK")
-endif()
-if (BUILD_STIR_SWIG_PYTHON)
-  list(APPEND ${proj}_DEPENDENCIES "SWIG")
-endif()
-if (USE_NiftyPET)
-  list(APPEND ${proj}_DEPENDENCIES "NiftyPET")
-endif()
-option(STIR_DISABLE_JSON "Disable JSON support in ${proj}" ON)
-if (STIR_USE_JSON)
-  list(APPEND ${proj}_DEPENDENCIES "JSON")
-endif()
-
-# Include dependent projects if any
-ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)

 # Set external name (same as internal for now)
 set(externalProjName ${proj})
@@ -78,6 +59,25 @@
   if(${STIR_BUILD_SWIG_PYTHON} AND NOT "${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
     message(FATAL_ERROR "STIR Python currently needs to have PYTHON_STRATEGY=PYTHONPATH")
   endif()
+
+  # Set dependency list
+  set(${proj}_DEPENDENCIES "Boost")
+  if (USE_ITK)
+    list(APPEND ${proj}_DEPENDENCIES "ITK")
+  endif()
+  if (BUILD_STIR_SWIG_PYTHON)
+    list(APPEND ${proj}_DEPENDENCIES "SWIG")
+  endif()
+  if (USE_NiftyPET)
+    list(APPEND ${proj}_DEPENDENCIES "NiftyPET")
+  endif()
+  option(STIR_DISABLE_JSON "Disable JSON support in ${proj}" ON)
+  if (STIR_USE_JSON)
+    list(APPEND ${proj}_DEPENDENCIES "JSON")
+  endif()
+
+  # Include dependent projects if any
+  ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)

   set(STIR_CMAKE_ARGS


think this will fix win32 nightly build

think this will fix win32 nightly build

it's not doing the install step, i think because cmake's install rule for VS is INSTALL not install.

--- ctest/ctest-common.cmake
+++ ctest/ctest-common.cmake
@@ -110,7 +110,11 @@

 # Step 4: ctest_build()
 message("\n4. ctest_build()")
-ctest_build(TARGET install)
+if (WIN32)
+  ctest_build(TARGET INSTALL)
+else()
+  ctest_build(TARGET install)
+endif()
 ctest_submit(PARTS Build)


gzstream depend on the zlib in thirdparty test=develop

--- cmake/external/gzstream.cmake
+++ cmake/external/gzstream.cmake
@@ -27,13 +27,14 @@

 ExternalProject_Add(
         extern_gzstream
+        DEPENDS zlib
         GIT_REPOSITORY "https://github.com/jacquesqiao/gzstream.git"
         GIT_TAG ""
         PREFIX          ${GZSTREAM_SOURCES_DIR}
         UPDATE_COMMAND  ""
         CONFIGURE_COMMAND ""
         BUILD_IN_SOURCE 1
-        BUILD_COMMAND   make -j8
+        BUILD_COMMAND   make EXTERN_CPPFLAGS="-I${THIRD_PARTY_PATH}/install/zlib/include" EXTERM_LDFLAGS="-L${THIRD_PARTY_PATH}/install/zlib/lib" -j8
         INSTALL_COMMAND mkdir -p ${GZSTREAM_INSTALL_DIR}/lib/ && mkdir -p ${GZSTREAM_INSTALL_DIR}/include/
         && cp ${GZSTREAM_SOURCES_DIR}/src/extern_gzstream/libgzstream.a ${GZSTREAM_INSTALL_DIR}/lib
         && cp -r ${GZSTREAM_SOURCES_DIR}/src/extern_gzstream/gzstream.h ${GZSTREAM_INSTALL_DIR}/include


Specify protoc binary as an imported target

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -27,4 +27,6 @@
 SET(Protobuf_LIBRARIES "")
 LIST(APPEND Protobuf_LIBRARIES Protobuf ${ZLIB_LIBRARIES})

+ADD_EXECUTABLE(Protobuf_PROTOC_EXECUTABLE IMPORTED)
+SET_PROPERTY(TARGET Protobuf_PROTOC_EXECUTABLE IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/protobuf_project/src/protobuf/protoc)
 SET(Protobuf_PROTOC_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/protobuf_project/src/protobuf/protoc)


GLibTools.cmake: Generate signal marshallers without source reference

It helps with reproducible builds, by not including the source path
in the public header files.

Related to https://gitlab.gnome.org/GNOME/evolution/-/issues/1273

--- cmake/modules/GLibTools.cmake
+++ cmake/modules/GLibTools.cmake
@@ -146,7 +146,7 @@
 function(glib_genmarshal _output_filename_noext _prefix _marshallist_filename)
 	add_custom_command(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
-		COMMAND ${GLIB_GENMARSHAL} --header --prefix=${_prefix} "${CMAKE_CURRENT_SOURCE_DIR}/${_marshallist_filename}" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h.tmp
+		COMMAND ${GLIB_GENMARSHAL} --header --skip-source --prefix=${_prefix} "${CMAKE_CURRENT_SOURCE_DIR}/${_marshallist_filename}" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h.tmp
 		COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h.tmp ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
 		DEPENDS ${_marshallist_filename}
 	)
@@ -154,7 +154,7 @@
 	add_custom_command(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
 		COMMAND ${CMAKE_COMMAND} -E echo " #include \\\"${_output_filename_noext}.h\\\"" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c.tmp
-		COMMAND ${GLIB_GENMARSHAL} --body --prefix=${_prefix} "${CMAKE_CURRENT_SOURCE_DIR}/${_marshallist_filename}" >>${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c.tmp
+		COMMAND ${GLIB_GENMARSHAL} --body --skip-source --prefix=${_prefix} "${CMAKE_CURRENT_SOURCE_DIR}/${_marshallist_filename}" >>${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c.tmp
 		COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c.tmp ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
 		DEPENDS ${_marshallist_filename}
 	)


Bug 781645 - Skip GSettings schema compile when DESTDIR is set

--- cmake/modules/GLibTools.cmake
+++ cmake/modules/GLibTools.cmake
@@ -238,9 +238,11 @@
 	if(_install_code)
 		# Compile gsettings schemas and ensure that all of them are in the place.
 		install(CODE
-			"execute_process(${_install_code}
-				COMMAND ${CMAKE_COMMAND} -E chdir . \"${GLIB_COMPILE_SCHEMAS}\" \"${GSETTINGS_SCHEMAS_DIR}\"
-			)")
+			"if(\"\$ENV{DESTDIR}\" STREQUAL \"\")
+				execute_process(${_install_code}
+					COMMAND ${CMAKE_COMMAND} -E chdir . \"${GLIB_COMPILE_SCHEMAS}\" \"${GSETTINGS_SCHEMAS_DIR}\"
+				)
+			endif(\"\$ENV{DESTDIR}\" STREQUAL \"\")")
 	endif(_install_code)
 endmacro(add_gsettings_schemas)


added inline limit to msvc.cmake

added inline limit to msvc.cmake

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -29,11 +29,12 @@
 ENDIF()
 SET(FLAGS_AVX512 "")

-SET(ADDITIONAL_CXX_FLAGS "/Ox /fp:fast /Qpar /Oi /Gy /GR- /MP")
+SET(COMMON_CXX_FLAGS "/EHsc /MP /GR- /Qinline-max-size:10000 /Qinline-max-total-size:10000 ")

-SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} /EHsc /MP")
-SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} /EHsc ${ADDITIONAL_CXX_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /EHsc ${ADDITIONAL_CXX_FLAGS}")
+SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
+SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /fp:fast /Oi /Gy ")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /fp:fast /Oi /Gy ")
+
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:4000000")
 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")
 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /STACK:4000000")


Add contrib to include dirs on projects.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -88,6 +88,7 @@

 set(HALLEY_PROJECT_INCLUDE_DIRS
 	${HALLEY_PATH}/include
+	${HALLEY_PATH}/contrib
 	${HALLEY_PATH}/engine/core/include
 	${HALLEY_PATH}/engine/net/include
 	${HALLEY_PATH}/engine/utils/include


CMake: Export LAPACK_DIR and BLAS_DIR if they are needed

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

--- deal.II/cmake/modules/FindDEALII_LAPACK.cmake
+++ deal.II/cmake/modules/FindDEALII_LAPACK.cmake
@@ -50,6 +50,17 @@

 SET(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup})

+MARK_AS_ADVANCED(
+  atlas_LIBRARY
+  blas_LIBRARY
+  gslcblas_LIBRARY
+  lapack_LIBRARY
+  m_LIBRARY
+  ptf77blas_LIBRARY
+  ptlapack_LIBRARY
+  refblas_LIBRARY
+  reflapack_LIBRARY
+  )

 IF(LAPACK_FOUND)
@@ -72,18 +83,6 @@
       )
     LIST(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
   ENDIF()
-
-  MARK_AS_ADVANCED(
-    atlas_LIBRARY
-    blas_LIBRARY
-    gslcblas_LIBRARY
-    lapack_LIBRARY
-    m_LIBRARY
-    ptf77blas_LIBRARY
-    ptlapack_LIBRARY
-    refblas_LIBRARY
-    reflapack_LIBRARY
-    )

   #
   # Well, in case of static archives we have to manually pick up the
@@ -110,8 +109,20 @@
   ENDFOREACH()
   SWITCH_LIBRARY_PREFERENCE()

+  MARK_AS_ADVANCED(
+    BLAS_DIR
+    LAPACK_DIR
+    )
+
 ELSE()
   SET(DEALII_LAPACK_FOUND FALSE)
+
+  SET(LAPACK_DIR "" CACHE PATH
+    "An optional hint to a LAPACK installation"
+    )
+  SET(BLAS_DIR "" CACHE PATH
+    "An optional hint to a BLAS installation"
+    )

   #
   # If we couldn't find LAPACK, clean up the library variables:


its lowercase.

its lowercase.

--- cmake/packages/nsis.cmake
+++ cmake/packages/nsis.cmake
@@ -115,13 +115,13 @@
 list(APPEND COPY_PACKAGES_LIST copy_zip_packages)

 add_custom_target(remove_packages
-  COMMAND ${CMAKE_COMMAND} -E REMOVE_RECURSIVE _CPack_Packages
+  COMMAND ${CMAKE_COMMAND} -E remove_recursive _CPack_Packages
   COMMENT Removing server packaging build directory
-  COMMAND ${CMAKE_COMMAND} -E REMOVE ${CPACK_PACKAGE_FILE_NAME}.zip
+  COMMAND ${CMAKE_COMMAND} -E remove ${CPACK_PACKAGE_FILE_NAME}.zip
   COMMENT Removing local target zip packages
-  COMMAND ${CMAKE_COMMAND} -E REMOVE ${CPACK_PACKAGE_FILE_NAME}.exe
+  COMMAND ${CMAKE_COMMAND} -E remove ${CPACK_PACKAGE_FILE_NAME}.exe
   COMMENT Removing local target nsis packages
-  COMMAND ${CMAKE_COMMAND} -E REMOVE ${ARANGODB_CLIENT_PACKAGE_FILE_NAME}.exe
+  COMMAND ${CMAKE_COMMAND} -E remove ${ARANGODB_CLIENT_PACKAGE_FILE_NAME}.exe
   COMMENT Removing local target nsis client packages
   )


[Conf] The ZeroMQ header file is zmq.h, not zmq.hpp

--- config/FindZeroMQ.cmake
+++ config/FindZeroMQ.cmake
@@ -18,14 +18,14 @@
 #  ZeroMQ_INCLUDE_DIR        The location of ZeroMQ headers

 find_path (ZeroMQ_ROOT_DIR
-  NAMES include/zmq.hpp)
+  NAMES include/zmq.h)

 find_library (ZeroMQ_LIBRARIES
   NAMES zmq
   HINTS ${ZeroMQ_ROOT_DIR}/lib)

 find_path (ZeroMQ_INCLUDE_DIR
-  NAMES zmq.hpp
+  NAMES zmq.h
   HINTS ${ZeroMQ_ROOT_DIR}/include)

 #


Revert "[Conf] The ZeroMQ header file is zmq.h, not zmq.hpp"

This reverts commit 9fe9766858e2a48f6d5e8f2583fd32f34accd48e.

--- config/FindZeroMQ.cmake
+++ config/FindZeroMQ.cmake
@@ -18,14 +18,14 @@
 #  ZeroMQ_INCLUDE_DIR        The location of ZeroMQ headers

 find_path (ZeroMQ_ROOT_DIR
-  NAMES include/zmq.h)
+  NAMES include/zmq.hpp)

 find_library (ZeroMQ_LIBRARIES
   NAMES zmq
   HINTS ${ZeroMQ_ROOT_DIR}/lib)

 find_path (ZeroMQ_INCLUDE_DIR
-  NAMES zmq.h
+  NAMES zmq.hpp
   HINTS ${ZeroMQ_ROOT_DIR}/include)

 #


when compiling with ICC for the dashboard reduce the noise that hides real problems

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -275,6 +275,12 @@
          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ALIAS_FLAGS}")
       endif()
       vc_add_compiler_flag(Vc_DEFINITIONS "-diag-disable 913")
+
+      if(NOT "$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
+         # disable warning #2928: the __GXX_EXPERIMENTAL_CXX0X__ macro is disabled when using GNU version 4.6 with the c++0x option
+         # this warning just adds noise about problems in the compiler - but I'm only interested in seeing problems in Vc
+         vc_add_compiler_flag(Vc_DEFINITIONS "-diag-disable 2928")
+      endif()
    elseif(Vc_COMPILER_IS_MSVC)
       if(_add_warning_flags)
          AddCompilerFlag("/wd4800") # Disable warning "forcing value to bool"


Add support for cpp17 flag in ufid. (#18)

--- cmake/bde_ufid.cmake
+++ cmake/bde_ufid.cmake
@@ -19,7 +19,7 @@
 set(install_ufid_flags opt dbg exc mt safe safe2 pic shr)

 # These flags can appear in a valid ufid. The order of those flags is important.
-set(known_ufid_flags opt dbg exc mt 64 safe safe2 pic shr ndebug cpp11 cpp14)
+set(known_ufid_flags opt dbg exc mt 64 safe safe2 pic shr ndebug cpp11 cpp14 cpp17)

 #.rst:
 # bde_ufid_filter_flags
@@ -116,9 +116,13 @@
         endif()
     endforeach()

-    # Check for conflicts in standard
-    if (cpp11 IN_LIST ufid_flags AND cpp14 IN_LIST ufid_flags)
-        message(FATAL_ERROR "UFID ${UFID} both cpp11 and cpp14 flags.")
+    # Check for conflicts in cpp standards
+    bde_ufid_filter_flags(cppStds "${ufid_flags}" "cpp11;cpp14;cpp17")
+    string(REPLACE "_" ";" cppStds "${cppStds}")
+    list(LENGTH cppStds cppStdsLen)
+    if (cppStdsLen GREATER 1)
+        message(FATAL_ERROR
+                "UFID ${UFID} contains multiple cpp standards: ${cppStds}")
     endif()

     # Setting the flags in local...
@@ -210,6 +214,7 @@
         PUBLIC
             $<${bde_ufid_is_cpp11}:cxx_std_11>
             $<${bde_ufid_is_cpp14}:cxx_std_14>
+            $<${bde_ufid_is_cpp17}:cxx_std_17>
     )

     bde_interface_target_compile_options(
@@ -261,6 +266,7 @@
             $<${bde_ufid_is_shr}:BDE_BUILD_TARGET_SHR>
             $<${bde_ufid_is_cpp11}:BDE_BUILD_TARGET_CPP11>
             $<${bde_ufid_is_cpp14}:BDE_BUILD_TARGET_CPP14>
+            $<${bde_ufid_is_cpp17}:BDE_BUILD_TARGET_CPP17>

             $<${bde_ufid_is_ndebug}:
                 NDEBUG
@@ -427,6 +433,7 @@
             $<${bde_ufid_is_shr}:BDE_BUILD_TARGET_SHR>
             $<${bde_ufid_is_cpp11}:BDE_BUILD_TARGET_CPP11>
             $<${bde_ufid_is_cpp14}:BDE_BUILD_TARGET_CPP14>
+            $<${bde_ufid_is_cpp17}:BDE_BUILD_TARGET_CPP17>

             $<${bde_ufid_is_ndebug}:
                 NDEBUG
@@ -458,6 +465,9 @@

             $<$<CXX_COMPILER_ID:GNU>:
                 $<${bde_ufid_is_cpp14}:
+                    _FILE_OFFSET_BITS=64
+                >
+                $<${bde_ufid_is_cpp17}:
                     _FILE_OFFSET_BITS=64
                 >
                 $<${bde_ufid_is_mt}:


cmake: Set COMPONENT_PATH during early expansion of dependencies

Works around bug where components/soc/CMakeLists.txt was testing "EXISTS
${COMPONENT_PATH}/${SOC_NAME}" and this test could pass during early
expansion if COMPONENT_PATH was empty and a directory /esp32 exists
on Windows.

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

--- tools/cmake/scripts/expand_requirements.cmake
+++ tools/cmake/scripts/expand_requirements.cmake
@@ -92,9 +92,9 @@
     endif()
     set_property(GLOBAL APPEND PROPERTY SEEN_COMPONENTS ${component})

-    find_component_path("${component}" "${ALL_COMPONENTS}" "${ALL_COMPONENT_PATHS}" component_path)
-    debug("Expanding dependencies of ${component} @ ${component_path}")
-    if(NOT component_path)
+    find_component_path("${component}" "${ALL_COMPONENTS}" "${ALL_COMPONENT_PATHS}" COMPONENT_PATH)
+    debug("Expanding dependencies of ${component} @ ${COMPONENT_PATH}")
+    if(NOT COMPONENT_PATH)
         set_property(GLOBAL APPEND PROPERTY COMPONENTS_NOT_FOUND ${component})
         return()
     endif()
@@ -104,7 +104,7 @@
     unset(COMPONENT_REQUIRES)
     unset(COMPONENT_PRIV_REQUIRES)
     set(COMPONENT ${component})
-    include(${component_path}/CMakeLists.txt)
+    include(${COMPONENT_PATH}/CMakeLists.txt)

     get_property(requires GLOBAL PROPERTY "${component}_REQUIRES")
     get_property(requires_priv GLOBAL PROPERTY "${component}_PRIV_REQUIRES")
@@ -124,7 +124,7 @@
     endif()

     # Now append this component to the full list (after its dependencies)
-    set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENT_PATHS ${component_path})
+    set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENT_PATHS ${COMPONENT_PATH})
     set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENTS ${component})
 endfunction()


removed unused file

removed unused file

--- Modules/Segmentation/files.cmake
+++ Modules/Segmentation/files.cmake
@@ -23,7 +23,6 @@
 Algorithms/mitkContourModelToPointSetFilter.cpp
 Algorithms/mitkContourModelToSurfaceFilter.cpp
 Algorithms/mitkContourModelSubDivisionFilter.cpp
-Algorithms/mitkImageToContourModelFilter.cpp
 Controllers/mitkSegmentationInterpolationController.cpp
 Controllers/mitkSurfaceInterpolationController.cpp
 # DataManagement/mitkApplyDiffImageOperation.cpp


PKG: temporarily remove OTBFFSforGMM

PKG: temporarily remove OTBFFSforGMM

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -144,7 +144,7 @@

 set(OTB_MODULES_CONFIG)
 if(WITH_REMOTE_MODULES)
-  foreach(remote_module SertitObject Mosaic otbGRM OTBFFSforGMM DiapOTBModule)
+  foreach(remote_module SertitObject Mosaic otbGRM DiapOTBModule)
     list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
   endforeach()


Properly define the variable to see if we have variadic support.

Also store the result of each try_compile so it is easier to debug in the future.

--- GenericVariadicParser/CMake/VariadicSupport.cmake
+++ GenericVariadicParser/CMake/VariadicSupport.cmake
@@ -27,6 +27,7 @@
   set(c++Boost_compiler 3)

   set(Variadic_Requires_Boost FALSE PARENT_SCOPE)
+  set(VARIADIC_SUPPORT_FOUND FALSE)

   #check if we have c++11 support
   if(NOT ${VARIADIC_SUPPORT_FOUND})
@@ -34,6 +35,7 @@
       ${PROJECT_BINARY_DIR}/CMakeTmp
       ${PROJECT_SOURCE_DIR}/CMake/variadic_11.cxx
       COMPILE_DEFINITIONS "-std=c++11"
+      OUTPUT_VARIABLE output
       )
     if(${VARIADIC_SUPPORT_FOUND})
       set(compiler_type ${c++11_compiler})
@@ -47,6 +49,7 @@
     ${PROJECT_BINARY_DIR}/CMakeTmp
     ${PROJECT_SOURCE_DIR}/CMake/variadic_0x.cxx
     COMPILE_DEFINITIONS "-std=c++0x"
+    OUTPUT_VARIABLE output
     )
     if(${VARIADIC_SUPPORT_FOUND})
       set(compiler_type ${c++0x_compiler})
@@ -60,10 +63,10 @@
     set(Variadic_Requires_Boost TRUE PARENT_SCOPE)
   endif()

-configure_file(
-  ${PROJECT_SOURCE_DIR}/CMake/tuple.hpp.in
-  ${PROJECT_BINARY_DIR}/@tuple_new_namespace@_tuple.hpp
-  @ONLY)
+  configure_file(
+    ${PROJECT_SOURCE_DIR}/CMake/tuple.hpp.in
+    ${PROJECT_BINARY_DIR}/@tuple_new_namespace@_tuple.hpp
+    @ONLY)

 endfunction(setupVariadicSupport)


processor detection seems to work: remove the warning

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -48,7 +48,6 @@
          mark_as_advanced(_vendor_id _cpu_id)
          string(REGEX REPLACE ".* Family ([0-9]+) .*" "\\1" _cpu_family "${_cpu_id}")
          string(REGEX REPLACE ".* Model ([0-9]+) .*" "\\1" _cpu_model "${_cpu_id}")
-         message(AUTHOR_WARNING "If you know how to query the processor capabilities wrt. SSE on Windows, let me know!")
       endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
       if(_vendor_id STREQUAL "GenuineIntel")
          if(_cpu_family EQUAL 6)


cmake: Allow finding qt using a qmake in a non-standard location

Change-Id: I70347bb17bb973e7a612edeb5b6663159ce67e2d

--- cmake/qibuild/modules/qtutils.cmake
+++ cmake/qibuild/modules/qtutils.cmake
@@ -13,7 +13,8 @@
 include(qibuild/modules/qt-tools)

 function(qt_flib _suffix _libname)
-  if(QT_USE_QMAKE)
+  find_program(QT_QMAKE NAMES qmake-qt4 qmake)
+  if(QT_QMAKE)
     # Use upstream cmake files
     find_package(Qt4 COMPONENTS ${_libname})
     include("${QT_USE_FILE}")


Fixes #4 (SuiteSparse was not detected on ARM architectures)

--- cmake_modules/FindSUITESPARSE.cmake
+++ cmake_modules/FindSUITESPARSE.cmake
@@ -61,7 +61,8 @@
                             /usr/lib64
                             /usr/lib/x86_64-linux-gnu
                             /usr/lib/i386-linux-gnu
-                            /usr/local/lib )
+                            /usr/local/lib
+                            /usr/lib/arm-linux-gnueabihf/)
    ENDIF(APPLE)

    # Add cholmod include directory to collection include directories


Update CMake script for macOS

Update CMake script for macOS

--- toolchains/darwin.cmake
+++ toolchains/darwin.cmake
@@ -8,19 +8,10 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wreturn-type -Wsign-compare")
 set(CXX_FLAGS_DEBUG "-g -O0")

-
-if (USE_EXTERNAL_LIBS)
-include(${EXTERNAL_LIBS_DIR}/core-dependencies.cmake)
-include(${EXTERNAL_LIBS_DIR}/glfw.cmake)
-else()
-# build dependencies (yaml, benchmark, glfw)
-add_subdirectory(${PROJECT_SOURCE_DIR}/external)
-endif()
-
 # compile definitions (adds -DPLATFORM_OSX)
 set(CORE_COMPILE_DEFS PLATFORM_OSX)

-# load core library
+# Build core library with dependencies.
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)

 if(APPLICATION)
@@ -29,28 +20,42 @@

   find_package(OpenGL REQUIRED)

+  # Build GLFW.
+  if (USE_SYSTEM_GLFW_LIBS)
+    include(FindPkgConfig)
+    pkg_check_modules(GLFW REQUIRED glfw3)
+  else()
+    # configure GLFW to build only the library
+    set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build the GLFW example programs")
+    set(GLFW_BUILD_TESTS OFF CACHE BOOL "Build the GLFW test programs")
+    set(GLFW_BUILD_DOCS OFF CACHE BOOL "Build the GLFW documentation")
+    set(GLFW_INSTALL OFF CACHE BOOL "Generate installation target")
+    add_subdirectory(${PROJECT_SOURCE_DIR}/platforms/common/glfw)
+  endif()
+
   # add sources and include headers
   set(OSX_EXTENSIONS_FILES *.mm *.cpp)
   foreach(_ext ${OSX_EXTENSIONS_FILES})
     find_sources_and_include_directories(
-      ${PROJECT_SOURCE_DIR}/osx/src/*.h
-      ${PROJECT_SOURCE_DIR}/osx/src/${_ext})
+      ${PROJECT_SOURCE_DIR}/platforms/osx/src/*.h
+      ${PROJECT_SOURCE_DIR}/platforms/osx/src/${_ext})
   endforeach()

   add_bundle_resources(RESOURCES "${PROJECT_SOURCE_DIR}/scenes" "Resources")

-  set(SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/core/common/platform_gl.cpp)
+  set(SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/platforms/common/platform_gl.cpp)

   add_executable(${EXECUTABLE_NAME} MACOSX_BUNDLE ${SOURCES} ${RESOURCES} ${OSX_RESOURCES})

   target_link_libraries(${EXECUTABLE_NAME}
     ${CORE_LIBRARY}
     glfw
+    ${GLFW_LIBRARIES}
     ${OPENGL_LIBRARIES})

   # add resource files and property list
   set_target_properties(${EXECUTABLE_NAME} PROPERTIES
-    MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/osx/Info.plist"
+    MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/platforms/osx/Info.plist"
     RESOURCE "${OSX_RESOURCES}")

 endif()


Detection of CASA's cfitsio

Detection of CASA's cfitsio

--- modules/FindCFitsIO.cmake
+++ modules/FindCFitsIO.cmake
@@ -19,7 +19,7 @@
 endif()
 find_path(
   CFitsIO_INCLUDE_DIR fitsio.h
-  PATH_SUFFIXES include include/cfitsio Frameworks/Headers
+  PATH_SUFFIXES include include/cfitsio Frameworks/Headers/cfitsio
   DOC "Path to the cfitsio include directory"
   PATHS "${casapath}"
 )


ConfigurePackages.cmake: remove extraneous cruft from link_package_bullet.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -254,10 +254,7 @@
 endmacro()

 macro(link_package_bullet)
-    # TODO just checking for RelWithDebInfo dir doesn't necessary cut it as user could have modified
-    # the build script and built Release instead during initial deps build. This is however very unlikely.
     if (WIN32) # Full-build deps
-        link_directories(${TARGET_NAME}/lib/$(ConfigurationName))
         target_link_libraries(${TARGET_NAME} debug LinearMath.lib debug BulletDynamics.lib BulletCollision.lib)
         target_link_libraries(${TARGET_NAME} optimized LinearMath.lib optimized BulletDynamics.lib optimized BulletCollision.lib)
     else()


Add pdf in aff3ct-doc package.

Add pdf in aff3ct-doc package.

--- cmake/Modules/UploadPPA.cmake
+++ cmake/Modules/UploadPPA.cmake
@@ -84,7 +84,8 @@
          "usr/include/aff3ct-${AFF3CT_VERSION_FULL}/*\n")

     file(WRITE "${DEBIAN_SOURCE_DIR}/debian/${CPACK_DEBIAN_PACKAGE_NAME}-doc.install"
-         "doc/sphinx/built/html/* usr/share/aff3ct-${AFF3CT_VERSION_FULL}/doc/html\n")
+         "doc/sphinx/built/html/* usr/share/aff3ct-${AFF3CT_VERSION_FULL}/doc/html\n"
+         "doc/sphinx/built/latex/AFF3CT.pdf usr/share/aff3ct-${AFF3CT_VERSION_FULL}/doc/pdf/\n")

     ##############################################################################
     # debian/copyright
@@ -99,7 +100,7 @@
          "\tdh  $@ --buildsystem=cmake\n"
          "\noverride_dh_auto_configure:\n"
          "\tDESTDIR=\"$(CURDIR)\" dh_auto_configure"
-         " -- -DCMAKE_BUILD_TYPE=Release -DAFF3CT_COMPILE_SHARED_LIB=ON -DPACKAGE_TGZ=OFF "
+         " -- -DCMAKE_BUILD_TYPE=Release -DAFF3CT_COMPILE_SHARED_LIB=ON "
          "-DAFF3CT_OVERRIDE_VERSION=${GIT_VERSION} -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'"
          "\n\noverride_dh_auto_install:\n"
          "\tdh_auto_install --destdir=\"$(CURDIR)\" --buildsystem=cmake"


fix(android): fix processor count detection to be cross-platform

--- cmake/Toolchain-Android.cmake
+++ cmake/Toolchain-Android.cmake
@@ -1,6 +1,10 @@
 cmake_minimum_required (VERSION 3.2)
+include(ProcessorCount)

 set(CMAKE_SYSTEM_NAME Android)

 # Use the clang tool set because it's support for C++11 is superior
 set(CMAKE_GENERATOR_TOOLSET DefaultClang)
+
+# Make sure we use all our processors when building
+ProcessorCount(CMAKE_ANDROID_PROCESS_MAX)


cmake: clang: Allow host's clang to be used for native_posix

Allow host installed clang to be used for native_posix when
ZEPHYR_TOOLCHAIN_VARIANT=llvm.

Signed-off-by: Oleg Zhurakivskyy <cdb82bfa180f8df716a77d2c2557196a597a233c@intel.com>

--- cmake/generic_toolchain.cmake
+++ cmake/generic_toolchain.cmake
@@ -50,7 +50,9 @@

 # Pick host system's toolchain if we are targeting posix
 if((${ARCH} STREQUAL "posix") OR (${ARCH} STREQUAL "x86_64"))
-  set(ZEPHYR_TOOLCHAIN_VARIANT "host")
+  if(NOT "${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "llvm")
+    set(ZEPHYR_TOOLCHAIN_VARIANT "host")
+  endif()
 endif()

 # Configure the toolchain based on what SDK/toolchain is in use.


cmake/modules/FindNUMPY.cmake: Changed to show results.

--- cmake/modules/FindNUMPY.cmake
+++ cmake/modules/FindNUMPY.cmake
@@ -29,7 +29,5 @@
       MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
     ENDIF()
 ELSE()
-    IF(Numpy_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find Numpy")
-    ENDIF()
+    MESSAGE(FATAL_ERROR "Could not find Numpy.")
 ENDIF()


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

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -26,7 +26,7 @@
 endif()

 EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import vigra.vigranumpycore; print vigra.vigranumpycore.__file__"
+                            "import vigra.vigranumpycore; print(vigra.vigranumpycore.__file__)"
                             RESULT_VARIABLE VIGRA_VIGRANUMPYCORE_LIBRARY_NOT_FOUND
                             OUTPUT_VARIABLE VIGRA_VIGRANUMPYCORE_LIBRARY
                             OUTPUT_STRIP_TRAILING_WHITESPACE)


FindGTest: support parametric tests

FindGTest: support parametric tests

--- cmake_modules/FindGTest.cmake
+++ cmake_modules/FindGTest.cmake
@@ -84,13 +84,13 @@
 	endif()
 	foreach(source ${ARGN})
 		file(READ "${source}" contents)
-		string(REGEX MATCHALL "TEST_?F?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
+		string(REGEX MATCHALL "TEST_?[FP]?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
 		foreach(hit ${found_tests})
 			string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit})
                         if (test_name MATCHES "\\.DISABLED_")
                             message(STATUS "Test ${test_name} disabled")
                         else()
-                            add_test(${test_name} ${executable} --gtest_filter=${test_name} ${extra_args})
+                            add_test(${test_name} ${executable} --gtest_filter=${test_name}:*/${test_name}/*  ${extra_args})
                         endif()
 		endforeach()
 	endforeach()


Silence some warnings

Silence some warnings

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

--- deal.II/cmake/setup_compiler_flags_gnu.cmake
+++ deal.II/cmake/setup_compiler_flags_gnu.cmake
@@ -81,10 +81,12 @@
   # (that are mainly triggered in third party headers so that we cannot
   # easily fix them...)
   #
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-c99-extensions")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-delete-non-virtual-dtor") # not harmless but needed for boost <1.50.0
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-newline-eof")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-function")
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-private-field")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-variable")
 ENDIF()


finished renaming

finished renaming

--- Plugins/org.mitk.gui.qt.openigtlink/files.cmake
+++ Plugins/org.mitk.gui.qt.openigtlink/files.cmake
@@ -18,7 +18,7 @@
 )

 set(MOC_H_FILES
-  src/internal/org_mitk_gui_qt_igtlplugin_Activator.h
+  src/internal/org_mitk_gui_qt_openigtlink_Activator.h
   src/internal/OpenIGTLinkProviderExample.h
   src/internal/OpenIGTLinkExample.h
   src/internal/OpenIGTLinkManager.h


COMP: unused cmake variable

COMP: unused cmake variable

--- Modules/ThirdParty/Boost/otb-module-init.cmake
+++ Modules/ThirdParty/Boost/otb-module-init.cmake
@@ -6,6 +6,6 @@
   if (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
     message(STATUS "Boost unit_test_framework not found. Hence otbOGRTests will be skipped")
   else()
-    message(STATUS "Found Boost components: ${OTB_Boost_COMPONENTS}")
+    message(STATUS "Found Boost components: unit_test_framework")
   endif()
 endif() #BUILD_TESTING


COMP: fix find_boost and find_boost unit_test_framework

--- Modules/ThirdParty/Boost/otb-module-init.cmake
+++ Modules/ThirdParty/Boost/otb-module-init.cmake
@@ -1,11 +1,11 @@
-# Optional components
+find_package (Boost 1.35.0 REQUIRED)
+
 if (BUILD_TESTING)
-  set(OTB_Boost_COMPONENTS unit_test_framework)
-endif()
-
-message(STATUS "Looking for boost components: ${OTB_Boost_COMPONENTS}")
-find_package ( Boost
-  1.35.0
-  COMPONENTS ${OTB_Boost_COMPONENTS}
-  REQUIRED
-  )
+  find_package (Boost 1.35.0 QUIET
+    COMPONENTS unit_test_framework)
+  if (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
+    message(STATUS "Boost unit_test_framework not found. Hence otbOGRTests will be skipped")
+  else()
+    message(STATUS "Found Boost components: ${OTB_Boost_COMPONENTS}")
+  endif()
+endif() #BUILD_TESTING


STYLE: Remove unused DTIPrepTools_CLI_* option from "Common.cmake"

--- Common.cmake
+++ Common.cmake
@@ -67,16 +67,6 @@
 SETIFEMPTY(CMAKE_INSTALL_RUNTIME_DESTINATION bin)

 #-------------------------------------------------------------------------
-SETIFEMPTY(DTIPrepTools_CLI_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
-SETIFEMPTY(DTIPrepTools_CLI_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
-SETIFEMPTY(DTIPrepTools_CLI_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
-
-#-------------------------------------------------------------------------
-SETIFEMPTY(DTIPrepTools_CLI_INSTALL_LIBRARY_DESTINATION ${CMAKE_INSTALL_LIBRARY_DESTINATION})
-SETIFEMPTY(DTIPrepTools_CLI_INSTALL_ARCHIVE_DESTINATION ${CMAKE_INSTALL_ARCHIVE_DESTINATION})
-SETIFEMPTY(DTIPrepTools_CLI_INSTALL_RUNTIME_DESTINATION ${CMAKE_INSTALL_RUNTIME_DESTINATION})
-
-#-------------------------------------------------------------------------
 # Augment compiler flags
 #-------------------------------------------------------------------------
 include(ITKSetStandardCompilerFlags)


Remove LuaJIT specific definition as it is not needed.

Since we are not installing LuaJIT directly but leave it in Urho3D's Bin directory, it should not be necessary to alter the search path to include LUA_XROOT (in v2.0.2) or LUA_ROOT (in v2.0.3). Similarly because of that, we also do not need to care about LuaJIT new support for MULTILIB.

This change should remove the incorrectly included hardcoded-value in the Urho3D.pc for the Raspberry Pi platform as well.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -126,10 +126,6 @@
     set (JIT JIT)
     # Implied ENABLE_LUA
     set (ENABLE_LUA 1)
-    # Adjust LuaJIT default search path as necessary (adapted from LuaJIT's original Makefile)
-    if (NOT CMAKE_INSTALL_PREFIX STREQUAL /usr/local)
-        add_definitions (-DLUA_XROOT="${CMAKE_INSTALL_PREFIX}/")
-    endif ()
 endif ()
 if (ENABLE_LUA)
     add_definitions (-DENABLE_LUA)


Only search the project source directory when URHO3D_HOME is defined.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -511,7 +511,10 @@
 macro (add_android_native_init)
     # This source file could not be added when building SDL static library because it needs SDL_Main() which is not yet available at library building time
     # The SDL_Main() is defined by Android application that could be resided in other CMake projects outside of Urho3D CMake project which makes things a little bit complicated
-    find_file (ANDROID_MAIN_C_PATH SDL_android_main.c PATHS ${URHO3D_HOME}/Source/ThirdParty/SDL/src/main/android DOC "Path to SDL_android_main.c" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+    if (URHO3D_HOME)
+        # First attempt to search using project source directory
+        find_file (ANDROID_MAIN_C_PATH SDL_android_main.c PATHS ${URHO3D_HOME}/Source/ThirdParty/SDL/src/main/android DOC "Path to SDL_android_main.c" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+    endif ()
     if (NOT ANDROID_MAIN_C_PATH)
         # Attempt another search using Urho3D SDK installation location which could be rooted
         find_file (ANDROID_MAIN_C_PATH SDL_android_main.c PATH_SUFFIXES ${PATH_SUFFIX} DOC "Path to SDL_android_main.c")


Update external protobuf codebase version for Windows cmake build

PiperOrigin-RevId: 184057827

--- tensorflow/contrib/cmake/external/protobuf.cmake
+++ tensorflow/contrib/cmake/external/protobuf.cmake
@@ -16,7 +16,7 @@

 set(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf/src)
 set(PROTOBUF_URL https://github.com/google/protobuf.git)
-set(PROTOBUF_TAG b04e5cba356212e4e8c66c61bbe0c3a20537c5b9)
+set(PROTOBUF_TAG 396336eb961b75f03b25824fe86cf6490fb75e3a)

 if(WIN32)
   set(protobuf_STATIC_LIBRARIES


Remove sugar_install_ios_arch_library [skip ci]

--- cmake/core/sugar_install_ios_arch_library.cmake
+++ cmake/core/sugar_install_ios_arch_library.cmake
@@ -1,88 +0,0 @@
-# Copyright (c) 2013, Ruslan Baratov
-# All rights reserved.
-
-include(sugar_add_this_to_sourcelist)
-sugar_add_this_to_sourcelist()
-
-include(sugar_expected_number_of_arguments)
-include(sugar_fatal_error)
-include(sugar_test_target_exists)
-include(sugar_test_variable_not_empty)
-
-function(sugar_install_ios_arch_library library_target destination)
-  sugar_expected_number_of_arguments(${ARGC} 2)
-
-  if(NOT XCODE_VERSION)
-    sugar_fatal_error("Only Xcode")
-  endif()
-
-  sugar_test_variable_not_empty(SUGAR_IOS_ARCH)
-
-  sugar_test_target_exists(${library_target})
-
-  get_target_property(is_ios ${library_target} SUGAR_IOS)
-  if(NOT is_ios)
-    sugar_fatal_error(
-        "Property SUGAR_IOS not found."
-        "Please use sugar_add_ios_library/sugar_add_library to create library."
-    )
-  endif()
-
-  get_target_property(path_debug ${library_target} SUGAR_IOS_PATH_DEBUG)
-  get_target_property(path_release ${library_target} SUGAR_IOS_PATH_RELEASE)
-
-  string(COMPARE EQUAL "${SUGAR_IOS_ARCH}" "i386" is_i386_simulator)
-  string(COMPARE EQUAL "${SUGAR_IOS_ARCH}" "x86_64" is_x64_simulator)
-
-  if(is_i386_simulator OR is_x64_simulator)
-    set(sdk "iphonesimulator")
-  else()
-    set(sdk "iphoneos")
-  endif()
-
-  install(
-      CODE
-      "execute_process(
-          COMMAND
-          xcodebuild
-          -target
-          ${library_target}
-          -configuration
-          Release
-          -sdk
-          ${sdk}
-          WORKING_DIRECTORY
-          ${PROJECT_BINARY_DIR}
-      )"
-  )
-
-  install(
-      CODE
-      "execute_process(
-          COMMAND
-          xcodebuild
-          -target
-          ${library_target}
-          -configuration
-          Debug
-          -sdk
-          ${sdk}
-          WORKING_DIRECTORY
-          ${PROJECT_BINARY_DIR}
-      )"
-  )
-
-  install(
-      FILES
-      "${path_debug}"
-      DESTINATION
-      "${destination}"
-  )
-
-  install(
-      FILES
-      "${path_release}"
-      DESTINATION
-      "${destination}"
-  )
-endfunction()


SWIGPython: don't overwrite variables

SWIGPython: don't overwrite variables

--- cmake-modules/SWIGPython.cmake
+++ cmake-modules/SWIGPython.cmake
@@ -59,25 +59,25 @@
 MACRO(SWIG_BUILD_PYTHON_MODULE module_name install_dir cplusplus)
     INCLUDE(${SWIG_USE_FILE})

-    SET(SWIG_PYTHON_INCLUDE_DIRS
+    SET(SWIG_INCLUDE_DIRS
         ${CMAKE_CURRENT_SOURCE_DIR}
         ${CMAKE_CURRENT_BINARY_DIR}
         ${SWIG_MODULE_DIR}
         ${SWIG_PYTHON_INCLUDE_DIRS}
         ${PYTHON_INCLUDE_DIRS}
     )
-    INCLUDE_DIRECTORIES(${SWIG_PYTHON_INCLUDE_DIRS})
+    INCLUDE_DIRECTORIES(${SWIG_INCLUDE_DIRS})

-    SET(SWIG_PYTHON_LIBRARIES
+    SET(SWIG_LIBRARIES
         ${SWIG_PYTHON_LIBRARIES}
         ${PYTHON_LIBRARIES}
     )

     # Set flags to pass into SWIG call
     SET(CMAKE_SWIG_FLAGS -module ${module_name})
-    FOREACH(dir ${SWIG_PYTHON_INCLUDE_DIRS})
+    FOREACH(dir ${SWIG_INCLUDE_DIRS})
         LIST(APPEND CMAKE_SWIG_FLAGS "-I${dir}")
-    ENDFOREACH(dir ${SWIG_PYTHON_INCLUDE_DIRS})
+    ENDFOREACH(dir ${SWIG_INCLUDE_DIRS})

     # Allows CMake variables to be placed in SWIG .i files
     CONFIGURE_FILE(
@@ -92,7 +92,7 @@

     # The actual CMake call for SWIG
     SWIG_ADD_MODULE(${module_name} python ${CMAKE_CURRENT_BINARY_DIR}/${module_name}.i)
-    SWIG_LINK_LIBRARIES(${module_name} ${SWIG_PYTHON_LIBRARIES})
+    SWIG_LINK_LIBRARIES(${module_name} ${SWIG_LIBRARIES})

     # Make sure SWIG artifacts are placed in same location on each platform
     # Makes Python unit testing easier


ENH: also add OpenMP to RelWithDebInfo

ENH: also add OpenMP to RelWithDebInfo

--- cmake/DependenciesConfig.cmake
+++ cmake/DependenciesConfig.cmake
@@ -20,10 +20,9 @@
   if(${OPENMP_FOUND})
       message(STATUS "OpenMP found")
       set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OpenMP_CXX_FLAGS}")
-      set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OpenMP_C_FLAGS}")
+      set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${OpenMP_CXX_FLAGS}")

       include_directories(${OpenMP_CXX_INCLUDE_DIRS})
-      include_directories(${OpenMP_C_INCLUDE_DIRS})

       message(STATUS "OpenMP_CXX_LIB_NAMES ${OpenMP_CXX_LIB_NAMES}")
       message(STATUS "OpenMP_CXX_LIBRARY ${OpenMP_CXX_LIBRARY}")


Fix static libs dependencies for tensorflow

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -35,14 +35,17 @@
 if(WIN32)
     # Tensorflow is built static on windows, need to include all dependecies
     list(APPEND LIBRARIES
-        ${CMAKE_STATIC_LIBRARY_PREFIX}tensorflow${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}protobuf${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}jpeg${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}png${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}gif${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}farmhash${CMAKE_STATIC_LIBRARY_SUFFIX}
-        ${CMAKE_STATIC_LIBRARY_PREFIX}highwayhash${CMAKE_STATIC_LIBRARY_SUFFIX}
+        tensorflow.lib
+        libprotobuf.lib
+        libjpeg.lib
+        libpng12_static.lib
+        giflib.lib
+        jsoncpp.lib
+        farmhash.lib
+        highwayhash.lib
+	gpr.lib
+	grpc_unsecure.lib
+	grpc++_unsecure.lib
     )
     set(Tensorflow_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}tensorflow${CMAKE_STATIC_LIBRARY_SUFFIX})
 else(WIN32)


[bfd][homebrew] Comment on re-install for libiberty

--- cmake/Modules/FindLibBfd.cmake
+++ cmake/Modules/FindLibBfd.cmake
@@ -67,8 +67,9 @@
 #message("LIBBFD_LIBRARY = ${LIBBFD_LIBRARY}")

 if (CMAKE_HOST_APPLE OR CYGWIN)
-  # required on Homebrew, Cygwin
-  # but not on Ubuntu, MSYS2
+  # These are not required on Ubuntu, MSYS2
+  # but are required on Homebrew, Cygwin
+  # Homebrew requires a re-install of binutils with '--enable-install-libiberty'
   find_library (LIBIBERTY_LIBRARY
     NAMES
     iberty


fix slash/baslash issue in CMake path

fix slash/baslash issue in CMake path

--- cmake_modules/SuperBuild.cmake
+++ cmake_modules/SuperBuild.cmake
@@ -80,6 +80,7 @@

     set(PYTHON_LIBS "${PYTHON_LIBRARIES}")
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+    file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR)
     set_vars(NETGEN_CMAKE_ARGS PYTHON_LIBS PYTHON_LIBRARY PYTHON_PACKAGES_INSTALL_DIR PYTHON_INCLUDE_DIR PYBIND_INCLUDE_DIR PYTHON_LIBRARIES PYTHON_EXECUTABLE PYTHON_VERSION)
 endif (USE_PYTHON)


correct more typos (lower case for the package name).

--- packaging/Packaging.cmake
+++ packaging/Packaging.cmake
@@ -15,7 +15,7 @@
 ## Set common CPACK variables
 ## #############################################################################

-set(CPACK_PACKAGE_NAME medInria CACHE
+set(CPACK_PACKAGE_NAME medinria CACHE
   STRING "Name of the package for medInria superproject"
   )
 mark_as_advanced(CPACK_PACKAGE_NAME)


Fix for Win32 Debug

Fix for Win32 Debug

--- salome_adm/cmake_files/FindSalomePython.cmake
+++ salome_adm/cmake_files/FindSalomePython.cmake
@@ -107,6 +107,14 @@
 # Set the FOUND flag for SalomePython and Python:
 SET(SALOMEPYTHON_FOUND FALSE)
 IF (_found1 AND PYTHONLIBS_FOUND)
+
+  # 24.03.2015 ANA: Fix problem on Windows in  Debug mode
+  # If you have Python, installed by Windows MSI Installer,
+  # PYTHON_LIBRARIES variable contains redundant release libraries...
+  IF(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug)
+    SET (PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+  ENDIF()
+
   SET(SALOMEPYTHON_FOUND TRUE)
   SET(Python_FOUND TRUE)
 ELSE()
@@ -116,7 +124,7 @@

 IF (SALOMEPYTHON_FOUND)
   MESSAGE(STATUS "Python interpreter and Python libraries found:")
-  MESSAGE(STATUS "Python libraries: ${PYTHON_LIBRARY}")
+  MESSAGE(STATUS "Python libraries: ${PYTHON_LIBRARIES}")
   MESSAGE(STATUS "Python include dir: ${PYTHON_INCLUDE_DIR}")

   # 3. Set the root dir which was finally retained


cmake/StringToInternalBool.cmake: Removed debug MESSAGE()

--- cmake/StringToInternalBool.cmake
+++ cmake/StringToInternalBool.cmake
@@ -4,5 +4,4 @@
   ELSE (${ARGN})
     SET (${name} 0)
   ENDIF (${ARGN})
-  MESSAGE(STATUS "Using ${name} ${${name}}")
 ENDMACRO(STRINGTOINTERNALBOOL)


CMake: sample-based-testing: rstest-* targets: specify USES_TERMINAL

--- cmake/sample-based-testing.cmake
+++ cmake/sample-based-testing.cmake
@@ -32,28 +32,32 @@
   COMMAND rstest -c ${REFERENCE_SAMPLES}
   WORKING_DIRECTORY "${REFERENCE_SAMPLE_ARCHIVE}"
   COMMENT "Running rstest on all the samples in the sample set to generate the missing hashes"
-  VERBATIM)
+  VERBATIM
+  USES_TERMINAL)

 add_custom_target(rstest-recreate)
 add_custom_command(TARGET rstest-recreate
   COMMAND rstest -c -f ${REFERENCE_SAMPLES}
   WORKING_DIRECTORY "${REFERENCE_SAMPLE_ARCHIVE}"
   COMMENT "Running rstest on all the samples in the sample set to [re]generate all the hashes"
-  VERBATIM)
+  VERBATIM
+  USES_TERMINAL)

 add_custom_target(rstest-test) # hashes must exist beforehand
 add_custom_command(TARGET rstest-test
   COMMAND rstest ${REFERENCE_SAMPLES}
   WORKING_DIRECTORY "${REFERENCE_SAMPLE_ARCHIVE}"
   COMMENT "Running rstest on all the samples in the sample set to check for regressions"
-  VERBATIM)
+  VERBATIM
+  USES_TERMINAL)

 add_custom_target(rstest-check) # hashes should exist beforehand if you want to check for regressions
 add_custom_command(TARGET rstest-check
   COMMAND rstest -f ${REFERENCE_SAMPLES}
   WORKING_DIRECTORY "${REFERENCE_SAMPLE_ARCHIVE}"
   COMMENT "Trying to decode all the samples in the sample set"
-  VERBATIM)
+  VERBATIM
+  USES_TERMINAL)

 add_custom_target(rstest-clean)
 add_custom_command(TARGET rstest-clean


github ci aarch64 config build  cpp-httplib .cmake  1.2

--- toolchains/aarch64-linux-gnu.toolchain.cmake
+++ toolchains/aarch64-linux-gnu.toolchain.cmake
@@ -22,4 +22,4 @@
 set(OPENSSL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/openssl-1.1.1i/install/include")
 set(OPENSSL_CRYPTO_LIBRARY "${CMAKE_SOURCE_DIR}/openssl-1.1.1i/install/lib/libcrypto.a")
 set(DOPENSSL_SSL_LIBRARY "${CMAKE_SOURCE_DIR}/openssl-1.1.1i/install/lib/libssl.a")
-set(HTTPLIB_REQUIRE_OPENSSL OFF)+set(HTTPLIB_REQUIRE_OPENSSL OFF)


Dependencies: build SDL2 on Windows for convenience

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -151,6 +151,24 @@
         ${CMAKE_BINARY_DIR}/freetype-2.6.5
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs)
     execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs --target install)
+
+    if(MSVC) # other platforms dont need this
+        message(STATUS "Building SDL2")
+        file(DOWNLOAD
+            https://libsdl.org/release/SDL2-2.0.5.tar.gz
+            ${OGRE_BINARY_DIR}/SDL2-2.0.5.tar.gz)
+        execute_process(COMMAND cmake -E tar xf SDL2-2.0.5.tar.gz WORKING_DIRECTORY ${OGRE_BINARY_DIR})
+        execute_process(COMMAND cmake -E make_directory ${OGRE_BINARY_DIR}/SDL2-build)
+        execute_process(COMMAND cmake
+            -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
+            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+            -DSDL_STATIC=FALSE
+            -G ${CMAKE_GENERATOR}
+            ${CROSS}
+            ${OGRE_BINARY_DIR}/SDL2-2.0.5
+            WORKING_DIRECTORY ${OGRE_BINARY_DIR}/SDL2-build)
+        execute_process(COMMAND cmake --build ${OGRE_BINARY_DIR}/SDL2-build --target install)
+    endif()
 endif()

 #######################################################################


Use CTK gcc version comparison fix

Use CTK gcc version comparison fix

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag e1a14345)
+    SET(revision_tag 70943814)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


cmake: add more info to debug build, especially macros

--- lib/cmake/compiler.cmake
+++ lib/cmake/compiler.cmake
@@ -1,5 +1,5 @@
 # STANDARDS
-set(CMAKE_C_FLAGS  "${CMAKE_C_FLAGS} -std=c99")
+set(CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -gdwarf-4")

 execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
 if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")


BUG: Remove double slash from CTEST_BINARY_DIRECTORY

--- Docker/itksoftwareguide-dashboard/dashboard.cmake
+++ Docker/itksoftwareguide-dashboard/dashboard.cmake
@@ -13,8 +13,8 @@
 set( CTEST_CMAKE_GENERATOR "Ninja" )

 set( CTEST_DASHBOARD_ROOT "/" )
-set( CTEST_SOURCE_DIRECTORY ${CTEST_DASHBOARD_ROOT}/ITKSoftwareGuide )
-set( CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}/ITKSoftwareGuide-build )
+set( CTEST_SOURCE_DIRECTORY ${CTEST_DASHBOARD_ROOT}ITKSoftwareGuide )
+set( CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}ITKSoftwareGuide-build )
 set( CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION} )

 find_program(CTEST_GIT_COMMAND NAMES git git.cmd)


fix regex

fix regex

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -909,7 +909,7 @@
       elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$")
          # ICC (on Linux)
          AddCompilerFlag("-xHOST" CXX_FLAGS OFA_ARCHITECTURE_FLAGS)
-      elseif(CMAKE_CXX_COMPILER MATCHES "/(icl\.exe)$")
+      elseif(CMAKE_CXX_COMPILER MATCHES "/(icl\\.exe)$")
          # ICC (on Windows)
          AddCompilerFlag("/QxHOST" CXX_FLAGS OFA_ARCHITECTURE_FLAGS)
       elseif(CMAKE_CXX_COMPILER MATCHES "/(pgcc|pgc\\+\\+)$")


Remove old StandardProjectSettings.cmake

This is now a build module and supplied by
the umbase recipe

--- cmake/StandardProjectSettings.cmake
+++ cmake/StandardProjectSettings.cmake
@@ -1,217 +0,0 @@
-include(GNUInstallDirs) # Standard install dirs
-
-# Generate compile_commands.json to make it easier to work with clang based tools
-message(STATUS "Generating compile commands to ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json")
-set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-
-# Ultimaker uniform Thread linking method
-function(use_threads project_name)
-    message(STATUS "Enabling threading support for ${project_name}")
-    set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
-    set(THREADS_PREFER_PTHREAD_FLAG TRUE)
-    find_package(Threads)
-    get_target_property(type ${project_name} TYPE)
-    if (${type} STREQUAL "INTERFACE_LIBRARY")
-        target_link_libraries(${project_name} INTERFACE Threads::Threads)
-    else ()
-        target_link_libraries(${project_name} PRIVATE Threads::Threads)
-    endif ()
-endfunction()
-
-# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md
-function(set_project_warnings project_name)
-    message(STATUS "Setting warnings for ${project_name}")
-    set(MSVC_WARNINGS
-            /W4 # Baseline reasonable warnings
-            /w14242 # 'identifier': conversion from 'type1' to 'type1', possible loss of data
-            /w14254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
-            /w14263 # 'function': member function does not override any base class virtual member function
-            /w14265 # 'classname': class has virtual functions, but destructor is not virtual instances of this class may not
-            # be destructed correctly
-            /w14287 # 'operator': unsigned/negative constant mismatch
-            /we4289 # nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside
-            # the for-loop scope
-            /w14296 # 'operator': expression is always 'boolean_value'
-            /w14311 # 'variable': pointer truncation from 'type1' to 'type2'
-            /w14545 # expression before comma evaluates to a function which is missing an argument list
-            /w14546 # function call before comma missing argument list
-            /w14547 # 'operator': operator before comma has no effect; expected operator with side-effect
-            /w14549 # 'operator': operator before comma has no effect; did you intend 'operator'?
-            /w14555 # expression has no effect; expected expression with side- effect
-            /w14619 # pragma warning: there is no warning number 'number'
-            /w14640 # Enable warning on thread un-safe static member initialization
-            /w14826 # Conversion from 'type1' to 'type_2' is sign-extended. This may cause unexpected runtime behavior.
-            /w14905 # wide string literal cast to 'LPSTR'
-            /w14906 # string literal cast to 'LPWSTR'
-            /w14928 # illegal copy-initialization; more than one user-defined conversion has been implicitly applied
-            /permissive- # standards conformance mode for MSVC compiler.
-            )
-
-    set(CLANG_WARNINGS
-            -Wall
-            -Wextra # reasonable and standard
-            -Wshadow # warn the user if a variable declaration shadows one from a parent context
-            -Wnon-virtual-dtor # warn the user if a class with virtual functions has a non-virtual destructor. This helps
-            # catch hard to track down memory errors
-            -Wold-style-cast # warn for c-style casts
-            -Wcast-align # warn for potential performance problem casts
-            -Wunused # warn on anything being unused
-            -Woverloaded-virtual # warn if you overload (not override) a virtual function
-            -Wpedantic # warn if non-standard C++ is used
-            -Wconversion # warn on type conversions that may lose data
-            -Wsign-conversion # warn on sign conversions
-            -Wnull-dereference # warn if a null dereference is detected
-            -Wdouble-promotion # warn if float is implicit promoted to double
-            -Wformat=2 # warn on security issues around functions that format output (ie printf)
-            )
-
-    set(GCC_WARNINGS
-            ${CLANG_WARNINGS}
-            -Wmisleading-indentation # warn if indentation implies blocks where blocks do not exist
-            -Wduplicated-cond # warn if if / else chain has duplicated conditions
-            -Wduplicated-branches # warn if if / else branches have duplicated code
-            -Wlogical-op # warn about logical operations being used where bitwise were probably wanted
-            -Wuseless-cast # warn if you perform a cast to the same type
-            )
-
-    if (MSVC)
-        set(PROJECT_WARNINGS ${MSVC_WARNINGS})
-    elseif (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
-        set(PROJECT_WARNINGS ${CLANG_WARNINGS})
-    elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-        set(PROJECT_WARNINGS ${GCC_WARNINGS})
-    else ()
-        message(AUTHOR_WARNING "No compiler warnings set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
-    endif ()
-
-    get_target_property(type ${project_name} TYPE)
-    if (${type} STREQUAL "INTERFACE_LIBRARY")
-        target_compile_options(${project_name} INTERFACE ${PROJECT_WARNINGS})
-    else ()
-        target_compile_options(${project_name} PRIVATE ${PROJECT_WARNINGS})
-    endif ()
-endfunction()
-
-# This function will prevent in-source builds
-function(AssureOutOfSourceBuilds)
-    # make sure the user doesn't play dirty with symlinks
-    get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
-    get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
-
-    # disallow in-source builds
-    if ("${srcdir}" STREQUAL "${bindir}")
-        message("######################################################")
-        message("Warning: in-source builds are disabled")
-        message("Please create a separate build directory and run cmake from there")
-        message("######################################################")
-        message(FATAL_ERROR "Quitting configuration")
-    endif ()
-endfunction()
-
-function(enable_sanitizers project_name)
-
-    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
-        option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE)
-
-        if (ENABLE_COVERAGE)
-            target_compile_options(${project_name} INTERFACE --coverage -O0 -g)
-            target_link_libraries(${project_name} INTERFACE --coverage)
-        endif ()
-
-        set(SANITIZERS "")
-
-        option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" FALSE)
-        if (ENABLE_SANITIZER_ADDRESS)
-            list(APPEND SANITIZERS "address")
-        endif ()
-
-        option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" FALSE)
-        if (ENABLE_SANITIZER_LEAK)
-            list(APPEND SANITIZERS "leak")
-        endif ()
-
-        option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer" FALSE)
-        if (ENABLE_SANITIZER_UNDEFINED_BEHAVIOR)
-            list(APPEND SANITIZERS "undefined")
-        endif ()
-
-        option(ENABLE_SANITIZER_THREAD "Enable thread sanitizer" FALSE)
-        if (ENABLE_SANITIZER_THREAD)
-            if ("address" IN_LIST SANITIZERS OR "leak" IN_LIST SANITIZERS)
-                message(WARNING "Thread sanitizer does not work with Address and Leak sanitizer enabled")
-            else ()
-                list(APPEND SANITIZERS "thread")
-            endif ()
-        endif ()
-
-        option(ENABLE_SANITIZER_MEMORY "Enable memory sanitizer" FALSE)
-        if (ENABLE_SANITIZER_MEMORY AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
-            if ("address" IN_LIST SANITIZERS
-                    OR "thread" IN_LIST SANITIZERS
-                    OR "leak" IN_LIST SANITIZERS)
-                message(WARNING "Memory sanitizer does not work with Address, Thread and Leak sanitizer enabled")
-            else ()
-                list(APPEND SANITIZERS "memory")
-            endif ()
-        endif ()
-
-        list(
-                JOIN
-                SANITIZERS
-                ","
-                LIST_OF_SANITIZERS)
-
-    endif ()
-
-    if (LIST_OF_SANITIZERS)
-        if (NOT
-                "${LIST_OF_SANITIZERS}"
-                STREQUAL
-                "")
-            target_compile_options(${project_name} INTERFACE -fsanitize=${LIST_OF_SANITIZERS})
-            target_link_options(${project_name} INTERFACE -fsanitize=${LIST_OF_SANITIZERS})
-        endif ()
-    endif ()
-
-endfunction()
-
-option(ENABLE_CPPCHECK "Enable static analysis with cppcheck" OFF)
-option(ENABLE_CLANG_TIDY "Enable static analysis with clang-tidy" OFF)
-option(ENABLE_INCLUDE_WHAT_YOU_USE "Enable static analysis with include-what-you-use" OFF)
-
-if (ENABLE_CPPCHECK)
-    find_program(CPPCHECK cppcheck)
-    if (CPPCHECK)
-        message(STATUS "Using cppcheck")
-        set(CMAKE_CXX_CPPCHECK
-                ${CPPCHECK}
-                --suppress=missingInclude
-                --enable=all
-                --inline-suppr
-                --inconclusive
-                -i
-                ${CMAKE_SOURCE_DIR}/imgui/lib)
-    else ()
-        message(WARNING "cppcheck requested but executable not found")
-    endif ()
-endif ()
-
-if (ENABLE_CLANG_TIDY)
-    find_program(CLANGTIDY clang-tidy)
-    if (CLANGTIDY)
-        message(STATUS "Using clang-tidy")
-        set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY} -extra-arg=-Wno-unknown-warning-option)
-    else ()
-        message(WARNING "clang-tidy requested but executable not found")
-    endif ()
-endif ()
-
-if (ENABLE_INCLUDE_WHAT_YOU_USE)
-    find_program(INCLUDE_WHAT_YOU_USE include-what-you-use)
-    if (INCLUDE_WHAT_YOU_USE)
-        message(STATUS "Using include-what-you-use")
-        set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE})
-    else ()
-        message(WARNING "include-what-you-use requested but executable not found")
-    endif ()
-endif ()


CMake: Adding TODO note

CMake: Adding TODO note

--- cmake/UraniumTranslationTools.cmake
+++ cmake/UraniumTranslationTools.cmake
@@ -73,6 +73,7 @@
 ENDMACRO()

 # Checks for availability of gettext and when found creates all targets
+# TODO: Adding option to set the PROJECT_NAME externally!
 MACRO(CREATE_TRANSLATION_TARGETS)
 find_package(Gettext)


[CMake] Generate audio_ops wrappers in the CMake build.

Fixes #14004.

PiperOrigin-RevId: 173732397

--- tensorflow/contrib/cmake/tf_core_ops.cmake
+++ tensorflow/contrib/cmake/tf_core_ops.cmake
@@ -13,6 +13,7 @@
 # limitations under the License.
 # ==============================================================================
 set(tf_op_lib_names
+    "audio_ops"
     "array_ops"
     "bitwise_ops"
     "candidate_sampling_ops"


Fix trouble with execute process command arguments

--- make/CreatePatchCVS.cmake
+++ make/CreatePatchCVS.cmake
@@ -16,9 +16,13 @@
 MESSAGE(STATUS "CVS Patch:: Generating patch using CVS...")
 MESSAGE(STATUS "CVS Patch:: Using command     : ${CVS_COMMAND} ${CVS_DIFF_ARGS}")
 MESSAGE(STATUS "CVS Patch:: Rooted at Workdir : ${WDIR}")
-EXECUTE_PROCESS(COMMAND ${CVS_COMMAND} ${CVS_DIFF_ARGS}
+EXECUTE_PROCESS(COMMAND ${CVS_COMMAND} diff -u
                 OUTPUT_FILE ${ODIR}/patch.diff
                 RESULT_VARIABLE PATCHOK
                 WORKING_DIRECTORY ${WDIR}
-                ERROR_QUIET)
-MESSAGE(STATUS "CVS Patch:: Patch file is : ${ODIR}/patch.diff")              +                ERROR_QUIET)
+IF(PATCHOK)
+    MESSAGE(STATUS "CVS Patch:: Patch file is : ${ODIR}/patch.diff")
+ELSE(PATCHOK)
+    MESSAGE(SEND_ERROR "CVS Patch:: FAILED")
+ENDIF(PATCHOK)


Comment out 3x5BP test until it gets fixed

--- testing/adios2/engine/sst/TestSSTMxN.cmake
+++ testing/adios2/engine/sst/TestSSTMxN.cmake
@@ -16,11 +16,11 @@
     -nw 3 -nr 5 -v -p TestSst)
 set_tests_properties(ADIOSSstTest.3x5 PROPERTIES TIMEOUT 30)

-add_test(
-  NAME ADIOSSstTest.3x5BP
-  COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run_staging_test
-    -nw 3 -nr 5 -v -p TestSst -arg "MarshalMethod:BP")
-set_tests_properties(ADIOSSstTest.3x5BP PROPERTIES TIMEOUT 30)
+# add_test(
+#   NAME ADIOSSstTest.3x5BP
+#   COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run_staging_test
+#     -nw 3 -nr 5 -v -p TestSst -arg "MarshalMethod:BP")
+# set_tests_properties(ADIOSSstTest.3x5BP PROPERTIES TIMEOUT 30)

 add_test(
   NAME ADIOSSstTest.5x3


BUG: fix Ossim version checking for 1.8.20-3

--- CMake/FindOssim.cmake
+++ CMake/FindOssim.cmake
@@ -14,6 +14,7 @@
 find_path( OSSIM_INCLUDE_DIR
            NAMES ossim/init/ossimInit.h )

+# Version checking
 if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h")
   file(READ "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h" _ossim_version_h_CONTENTS)
   string(REGEX REPLACE ".*# *define OSSIM_VERSION *\"([0-9.]+)\".*" "\\1" OSSIM_VERSION "${_ossim_version_h_CONTENTS}")
@@ -22,33 +23,27 @@
   string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" OSSIM_PATCH_VERSION_NUMBER "${OSSIM_VERSION}")
   math(EXPR OSSIM_VERSION_NUMBER
     "((${OSSIM_MAJOR_VERSION_NUMBER})*100+${OSSIM_MINOR_VERSION_NUMBER})*100+${OSSIM_PATCH_VERSION_NUMBER}")
-else()
-  if(NOT Ossim_FIND_QUIETLY)
-  message(WARNING "ossimVersion.h not found !")
-  endif()
-endif()
-
-# Parse a certain header to check if SVN revision is 23537
-if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h")
-  file(STRINGS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h" _ossim_image_renderer_h_CONTENTS REGEX "^// \\$Id: ossimImageRenderer\\.h [0-9.]+ ")
-  string(REGEX REPLACE ".*ossimImageRenderer\\.h ([0-9.]+) .*" "\\1" _ossim_svn_revision_hint "${_ossim_image_renderer_h_CONTENTS}")
-
-  if("${_ossim_svn_revision_hint}" LESS "23537")
+  if("${OSSIM_VERSION}" VERSION_LESS "1.8.20")
     message(WARNING "The OSSIM include directory detected by OTB is: '${OSSIM_INCLUDE_DIR}'."
-      "This version does not have support for SENTINEL-1 products."
-      "Opening an image will result in immediate crash!. "
-      "Please consider updating your ossim to latest stable release.(1.8.20-3)")
+      "This version (${OSSIM_VERSION}) is not fully compatible with OTB."
+      "Please consider updating your Ossim to version 1.8.20-3 or above")
   else()
-    if("${_ossim_svn_revision_hint}" LESS "23664")
-      message(WARNING "The OSSIM include directory detected by OTB is '${OSSIM_INCLUDE_DIR}'."
-        "This version has a critical bug inside ossimRpcModel."
-        "When an input point outside image extent is given the model returns 'NaN'."
-        "Please consider updating your ossim to latest stable release.(1.8.20-3)")
+    if("${OSSIM_VERSION}" VERSION_EQUAL "1.8.20")
+      # special case to detect versions 1.8.20-1 and 1.8.20-2
+      if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/projection/ossimRpcProjection.h")
+        file(STRINGS "${OSSIM_INCLUDE_DIR}/ossim/projection/ossimRpcProjection.h" _ossim_rpc_proj_h_CONTENTS REGEX "^// \\$Id: ossimRpcProjection\\.h [0-9.]+ ")
+        string(REGEX REPLACE ".*ossimRpcProjection\\.h ([0-9.]+) .*" "\\1" _ossim_svn_revision_hint "${_ossim_rpc_proj_h_CONTENTS}")
+        if("${_ossim_svn_revision_hint}" LESS "23666")
+          message(WARNING "The OSSIM include directory detected by OTB is: '${OSSIM_INCLUDE_DIR}'."
+            "This version (${OSSIM_VERSION}, rev < r23666) is not fully compatible with OTB."
+            "Please consider updating your Ossim to version 1.8.20-3 or above")
+        endif()
+      endif()
     endif()
   endif()
 else()
   if(NOT Ossim_FIND_QUIETLY)
-    message(WARNING "ossimImageRenderer.h not found !")
+    message(WARNING "ossimVersion.h not found !")
   endif()
 endif()


Don't forward CMAKE_GENERATOR twice

Don't forward CMAKE_GENERATOR twice

It is already forwarded in COMMON_PROLOGUE

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -371,8 +371,6 @@
     set (DRIVER_SCRIPT_CONTENTS
          "set (_CMAKE_UNIT_PHASE CLEAN)\n"
          ${COMMON_PROLOGUE}
-         "set (CMAKE_GENERATOR\n"
-         "     \"${CMAKE_GENERATOR}\")\n"
          "set (CMAKE_UNIT_NO_DEV_WARNINGS\n"
          "     ${CMAKE_UNIT_NO_DEV_WARNINGS}\n"
          "     CACHE BOOL \"\" FORCE)\n"


fix problem with debug verion of library name.

--- external/gtest.cmake
+++ external/gtest.cmake
@@ -52,13 +52,15 @@
 	UPDATE_DISCONNECTED 1
 	QUIET
 	)
-
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+  set(DEBUG_POSTFIX d)
+endif()
 set(INSTALL_GTEST OFF CACHE BOOL "prevents installing gtest" FORCE)
 set(BUILD_GMOCK   OFF CACHE BOOL "prevents building gmock"   FORCE)
 #set(gtest_force_shared_crt ON CACHE BOOL "Prevent GoogleTest from overriding our compiler/linker options" FORCE)
 add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})

 FILE(APPEND "${EXPORT_FILE_NAME}" "gtest_INCLUDE_DIRS@@@${googletest_SOURCE_DIR}/googletest/include\n")
-FILE(APPEND "${EXPORT_FILE_NAME}" "gtest_LIBRARIES@@@${googletest_BINARY_DIR}/googletest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}\n")
+FILE(APPEND "${EXPORT_FILE_NAME}" "gtest_LIBRARIES@@@${googletest_BINARY_DIR}/googletest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}\n")


absolute paths may be more stable than relative ones...

--- test/testing.cmake
+++ test/testing.cmake
@@ -1,4 +1,5 @@
-set(MDIR ../../meshes/pipe)
+set(MESHES /lore/dibanez/meshes)
+set(MDIR ${MESHES}/pipe)
 add_test(verify_serial
   verify
   "${MDIR}/pipe.dmg"
@@ -46,7 +47,7 @@
   "${MDIR}/pipe.dmg"
   "pipe_4_.smb"
   "tet.smb")
-set(MDIR ../../meshes/mpas)
+set(MDIR ${MESHES}/mpas)
 add_test(read_mpas
   mpas_read
   "${MDIR}/ocean_QU_240km.nc"


Eliminate CMake policy warnings.

Eliminate CMake policy warnings.

--- components/native/bf-cpp/jace/Prerequisites.cmake
+++ components/native/bf-cpp/jace/Prerequisites.cmake
@@ -21,12 +21,6 @@

 # CMake build file for cross-platform location of prerequisite libraries,
 # including Boost Thread and Java's jni.h.
-
-if(WIN32)
-cmake_minimum_required(VERSION 2.8)
-else(WIN32)
-cmake_minimum_required(VERSION 2.6)
-endif(WIN32)

 ### search for prerequisite libraries ###


Compile NanoVG with FreeType.

Compile NanoVG with FreeType.

--- build/cmake/nanovg.cmake
+++ build/cmake/nanovg.cmake
@@ -2,8 +2,8 @@
 set(NANOVG_SRC ${NANOVG_INCLUDE_DIR}/nanovg.c)

 add_library(nanovg STATIC ${NANOVG_SRC})
-set_property(TARGET nanovg APPEND PROPERTY INCLUDE_DIRECTORIES ${NANOVG_INCLUDE_DIR})
-add_definitions(-DUSE_NANOVG)
+set_property(TARGET nanovg APPEND PROPERTY INCLUDE_DIRECTORIES ${NANOVG_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIR})
+add_definitions(-D__STB_INCLUDE_STB_TRUETYPE_H__=0 -DFONS_USE_FREETYPE=1 -DUSE_NANOVG)
 add_dependencies(rainbow nanovg)

 set(VECTOR_LIBRARY nanovg)


Fix indents to give correct formating

Fix indents to give correct formating

--- Modules/CetTest.cmake
+++ Modules/CetTest.cmake
@@ -27,13 +27,13 @@
 #
 # HANDBUILT
 #   Do not build the target -- it will be provided. This option is
-#    mutually exclusive with the PREBUILT option.
+#   mutually exclusive with the PREBUILT option.
 #
 # PREBUILT
 #   Do not build the target -- pick it up from the source dir (eg
-#    scripts).  This option is mutually exclusive with the HANDBUILT
-#    option and simply calls the cet_script() function with appropriate
-#    options.
+#   scripts).  This option is mutually exclusive with the HANDBUILT
+#   option and simply calls the cet_script() function with appropriate
+#   options.
 #
 # NO_AUTO
 #   Do not add the target to the auto test list.
@@ -47,7 +47,7 @@
 #
 # INSTALL_EXAMPLE
 #   Install this test and all its data files into the examples area of the
-#    product.
+#   product.
 #
 # INSTALL_SOURCE
 #   Install this test's source in the source area of the product.
@@ -55,45 +55,44 @@
 # Args:
 #
 # CONFIGURATIONS
-#
 #   Configurations (Debug, etc, etc) under which the test shall be executed.
 #
 # DATAFILES
 #   Input and/or references files to be copied to the test area in the
-#    build tree for use by the test. If there is no path, or a relative
-#    path, the file is assumed to be in or under
-#    ``CMAKE_CURRENT_SOURCE_DIR``.
+#   build tree for use by the test. If there is no path, or a relative
+#   path, the file is assumed to be in or under
+#   ``CMAKE_CURRENT_SOURCE_DIR``.
 #
 # DEPENDENCIES
 #   List of top-level dependencies to consider for a PREBUILT
-#    target. Top-level implies a target (not file) created with
-#    ADD_EXECUTABLE, ADD_LIBRARY or ADD_CUSTOM_TARGET.
+#   target. Top-level implies a target (not file) created with
+#   ADD_EXECUTABLE, ADD_LIBRARY or ADD_CUSTOM_TARGET.
 #
 # LIBRARIES
-#   Extra libraries with which to link this target.
+#   Extra libraries to link to the resulting target.
 #
 # OPTIONAL_GROUPS
 #   Assign this test to one or more named optional groups. If the CMake
-#    list variable CET_TEST_GROUPS is set (e.g. with -D on the CMake
-#    command line) and there is overlap between the two lists, execute
-#    the test. The CET_TEST_GROUPS cache variable may additionally
-#    contain the optional values ALL or NONE.
+#   list variable CET_TEST_GROUPS is set (e.g. with -D on the CMake
+#   command line) and there is overlap between the two lists, execute
+#   the test. The CET_TEST_GROUPS cache variable may additionally
+#   contain the optional values ALL or NONE.
 #
 # REF
 #  The standard output of the test will be captured and compared against
-#   the specified reference file. It is an error to specify this
-#   argument and either the PASS_REGULAR_EXPRESSION or
-#   FAIL_REGULAR_EXPRESSION test properties to the TEST_PROPERTIES
-#   argument: success is the logical AND of the exit code from execution
-#   of the test as originally specified, and the success of the
-#   filtering and subsequent comparison of the output (and optionally,
-#   the error stream). Optionally, a second element may be specified
-#   representing a reference for the error stream; otherwise, standard
-#   error will be ignored.
+#  the specified reference file. It is an error to specify this
+#  argument and either the PASS_REGULAR_EXPRESSION or
+#  FAIL_REGULAR_EXPRESSION test properties to the TEST_PROPERTIES
+#  argument: success is the logical AND of the exit code from execution
+#  of the test as originally specified, and the success of the
+#  filtering and subsequent comparison of the output (and optionally,
+#  the error stream). Optionally, a second element may be specified
+#  representing a reference for the error stream; otherwise, standard
+#  error will be ignored.
 #
 #  If REF is specified, then OUTPUT_FILTER and OUTPUT_FILTER_ARGS may
-#   also be specified. OUTPUT_FILTER must be a program which expects an
-#   input filename as argument and puts the filtered output on STDOUT.
+#  also be specified. OUTPUT_FILTER must be a program which expects an
+#  input filename as argument and puts the filtered output on STDOUT.
 #
 # REQUIRED_FILES
 #   These files are required to be present before the test will be
@@ -108,25 +107,25 @@
 #
 # TEST_EXEC
 #   The exec to run (if not the target). The HANDBUILT option must
-#    be specified in conjunction with this option.
+#   be specified in conjunction with this option.
 #
 # TEST_PROPERTIES
 #   Properties to be added to the test. See documentation of the cmake
-#    command, "set_tests_properties."
+#   command, "set_tests_properties."
 #
 # Cache variables
 #
 # CET_TEST_GROUPS
 #   Test group names specified using the OPTIONAL_GROUPS list option are
-#    compared against this list to determine whether to configure the
-#    test. Default value is the special value "NONE," meaning no
-#    optional tests are to be configured. Optionally CET_TEST_GROUPS may
-#    contain the special value "ALL." Specify multiple values separated
-#    by ";" (escape or protect with quotes) or "," See explanation of
-#    the OPTIONAL_GROUPS variable above for more details.
+#   compared against this list to determine whether to configure the
+#   test. Default value is the special value "NONE," meaning no
+#   optional tests are to be configured. Optionally CET_TEST_GROUPS may
+#   contain the special value "ALL." Specify multiple values separated
+#   by ";" (escape or protect with quotes) or "," See explanation of
+#   the OPTIONAL_GROUPS variable above for more details.
 #
 # CET_DEFINED_TEST_GROUPS
-#  Any test group names CMake sees will be added to this list.
+#   Any test group names CMake sees will be added to this list.
 #
 # Notes
 #
@@ -156,7 +155,7 @@
 #
 # CLEAR
 #   Clear the global test environment (ie anything previously set with
-#    cet_test_env()) before setting <env>.
+#   cet_test_env()) before setting <env>.
 #
 # Notes:
 #


ENH: further OSGeo4W tips, after tests from a minimal install

--- CMake/FindOSGeo4W.cmake
+++ CMake/FindOSGeo4W.cmake
@@ -1,6 +1,6 @@

 IF(WIN32)
-    FIND_PATH(OSGEO4W_ROOT NAMES OSGeo4W.bat PATHS ENV{OSGEO4W_ROOT} C:/OSGeo4W )
+    FIND_PATH(OSGEO4W_ROOT NAMES OSGeo4W.bat PATHS $ENV{OSGEO4W_ROOT} )
 	IF(OSGEO4W_ROOT)
 		MESSAGE(STATUS "Found OSGeo4W : ${OSGEO4W_ROOT}")
 		SET(OSGEO4W_FOUND TRUE)
@@ -23,7 +23,7 @@
 		FIND_PATH(TIFF_INCLUDE_DIR NAMES tiffio.h PATHS ${OSGEO4W_INCLUDE})
 		FIND_LIBRARY(TIFF_LIBRARY NAMES libtiff_i PATHS ${OSGEO4W_LIB})
 		IF(NOT TIFF_INCLUDE_DIR OR NOT TIFF_LIBRARY)
-		  MESSAGE(WARNING "OSGeo4W found but TIFF is not found : Please install the 'libtiff' package from the OSGeo4W Setup")
+		  MESSAGE(WARNING "OSGeo4W found but TIFF is not found : Please install the 'libtiff' and 'libtiff-devel' package from the OSGeo4W Setup")
 		ENDIF()

 		FIND_PATH(JPEG_INCLUDE_DIRS NAMES jpeglib.h PATHS ${OSGEO4W_INCLUDE})
@@ -59,7 +59,7 @@
 		FIND_PATH(LIBLAS_INCLUDE_DIR NAMES liblas/capi/liblas.h PATHS ${OSGEO4W_INCLUDE})
 		FIND_LIBRARY(LIBLAS_LIBRARY NAMES liblas_c PATHS ${OSGEO4W_LIB})
 		IF(NOT LIBLAS_INCLUDE_DIR OR NOT LIBLAS_LIBRARY)
-		  MESSAGE(WARNING "OSGeo4W found but LibLAS is not found : Please install the 'liblas' package from the OSGeo4W Setup")
+		  MESSAGE(WARNING "OSGeo4W found but LibLAS is not found : Please install the 'liblas' and 'liblas-devel' package from the OSGeo4W Setup")
 		ENDIF()

 	ELSE(OSGEO4W_ROOT)


Do not blanket-set include dirs and link libs

Not all targets in the project necessarily depend on `Python.h` and `libpython`.

--- modules/python_libs.cmake
+++ modules/python_libs.cmake
@@ -84,6 +84,3 @@
 # Hook-up script variables to cache variables
 set(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
 set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
-
-include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS})
-link_directories(${PYTHON_LIBRARIES})


use -std=gnu++0x for older gcc (FreeBSD build fix)

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -88,7 +88,7 @@
         add_compile_flags("CXX" "-std=c++11")
     else()
         add_compile_flags("C" "-std=gnu99")
-        add_compile_flags("CXX" "-std=c++0x")
+        add_compile_flags("CXX" "-std=gnu++0x")
     endif()

     # Disable Run-time type information


Adding support for disabling explicit instantiation for the datatype 'float'

--- cmake/config.h.cmake
+++ cmake/config.h.cmake
@@ -74,6 +74,11 @@
 #cmakedefine EL_POOL_MEMORY
 #cmakedefine EL_AVOID_OMP_FMA

+/* NOTE: Only EL_DISABLE_FLOAT has been tested so far */
+#cmakedefine EL_DISABLE_FLOAT
+#cmakedefine EL_DISABLE_DOUBLE
+#cmakedefine EL_DISABLE_COMPLEX
+
 #cmakedefine EL_HAVE_VALGRIND

 #endif /* EL_CONFIG_H */