Add implementation that tries to detect a nuGET installed openssl if provided with an OPENSSL_ROOT_DIR.

--- cmake/FindOpenSSL.cmake
+++ cmake/FindOpenSSL.cmake
@@ -70,23 +70,42 @@
 endif()

 if (WIN32)
-  # http://www.slproweb.com/products/Win32OpenSSL.html
-  set(_OPENSSL_ROOT_HINTS
-    ${OPENSSL_ROOT_DIR}
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
-    ENV OPENSSL_ROOT_DIR
-    )
-  file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
-  set(_OPENSSL_ROOT_PATHS
-    "${_programfiles}/OpenSSL"
-    "${_programfiles}/OpenSSL-Win32"
-    "${_programfiles}/OpenSSL-Win64"
-    "C:/OpenSSL/"
-    "C:/OpenSSL-Win32/"
-    "C:/OpenSSL-Win64/"
-    )
-  unset(_programfiles)
+  if (IS_DIRECTORY "${OPENSSL_ROOT_DIR}/build/native/")
+    set(NUGET TRUE)
+  else()
+    set(NUGET FALSE)
+  endif()
+  if (OPENSSL_ROOT_DIR AND NUGET)
+    message("Found nuGET installation of OpenSSL!")
+    # its an openssl downloaded via nuget!
+    set(OPENSSL_INCLUDE "${OPENSSL_ROOT_DIR}/build/native/include")
+    set(_OPENSSL_ROOT_HINTS "${OPENSSL_ROOT_DIR}/build/native/include")
+
+    set(OPENSSL_LIB_DIR "${OPENSSL_ROOT_DIR}/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/x64/release/")
+    set(_OPENSSL_ROOT_HINTS "${OPENSSL_ROOT_DIR}/build/native/include")
+
+    set(_OPENSSL_ROOT_PATHS
+      "${OPENSSL_ROOT_DIR}/build/native/include"
+      "${OPENSSL_ROOT_DIR}/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/x64/release/")
+  else()
+    # http://www.slproweb.com/products/Win32OpenSSL.html
+    set(_OPENSSL_ROOT_HINTS
+      ${OPENSSL_ROOT_DIR}
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
+      ENV OPENSSL_ROOT_DIR
+      )
+    file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
+    set(_OPENSSL_ROOT_PATHS
+      "${_programfiles}/OpenSSL"
+      "${_programfiles}/OpenSSL-Win32"
+      "${_programfiles}/OpenSSL-Win64"
+      "C:/OpenSSL/"
+      "C:/OpenSSL-Win32/"
+      "C:/OpenSSL-Win64/"
+      )
+    unset(_programfiles)
+  endif()
 else ()
   set(_OPENSSL_ROOT_HINTS
     ${OPENSSL_ROOT_DIR}


don't double-prefix include path install location

--- cmake/hexer_utils.cmake
+++ cmake/hexer_utils.cmake
@@ -80,9 +80,8 @@
   if (NOT DEFINED LIB_INSTALL_DIR)
     set(HEXER_LIB_DIR "lib")
   endif (NOT DEFINED LIB_INSTALL_DIR)
-    set(HEXER_INCLUDE_ROOT
+    set(HEXER_INCLUDE_DIR
         "include/${PROJECT_NAME_LOWER}")
-    set(HEXER_INCLUDE_DIR "${HEXER_INCLUDE_ROOT}/hexer")
     set(HEXER_DOC_DIR "share/doc/${PROJECT_NAME_LOWER}-${HEXER_VERSION_MAJOR}.${HEXER_VERSION_MINOR}")
     set(HEXER_BIN_DIR "bin")
     set(HEXER_PKGCFG_DIR "${HEXER_LIB_DIR}/pkgconfig")


fix python tests

fix python tests

--- cmake/tools4tests.cmake
+++ cmake/tools4tests.cmake
@@ -361,9 +361,9 @@

     # copy test dir to binary dir (inside siconos package)
     # ---> allows py.test run in binary dir
-    file(GLOB data4tests ${CMAKE_CURRENT_SOURCE_DIR}/data/*)
+    file(GLOB data4tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/data/*)
     foreach(datafile ${data4tests})
-      configure_file(${datafile} ${SICONOS_SWIG_ROOT_DIR}/tests/data/${datafile} COPYONLY)
+      configure_file(${datafile} ${SICONOS_SWIG_ROOT_DIR}/tests/data/ COPYONLY)
     endforeach()

     file(GLOB testfiles ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_*.py)


fix mpi link

fix mpi link

--- cmake/vSMCFindMPI.cmake
+++ cmake/vSMCFindMPI.cmake
@@ -12,7 +12,8 @@
         SET (VSMC_MPI_FOUND TRUE CACHE BOOL "Found MPI")
         SET (VSMC_MPI_LINK_LIBRARIES
             ${Boost_MPI_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
-            ${MPI_CXX_LIBRARIES})
+            ${MPI_CXX_LIBRARIES} CACHE STRING "MPI Link Libraries")
+        MESSAGE (STATUS "VSMC_MPI_LINK_LIBRARIES: ${VSMC_MPI_LINK_LIBRARIES}")
         IF (NOT VSMC_MPIEXEC)
             SET (VSMC_MPIEXEC ${MPIEXEC} CACHE STRING "MPIEXEC")
         ENDIF (NOT VSMC_MPIEXEC)


Remove invalid install line (#5219)

Remove invalid install line (#5219)

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -304,7 +304,6 @@

   source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_shared_cc_srcs})
   add_library(onnxruntime_providers_shared SHARED ${onnxruntime_providers_shared_cc_srcs})
-  install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/providers/shared  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers)
   set_target_properties(onnxruntime_providers_shared PROPERTIES FOLDER "ONNXRuntime")
   set_target_properties(onnxruntime_providers_shared PROPERTIES LINKER_LANGUAGE CXX)


Fix for _doxygen macro.

Fix for _doxygen macro.

--- cmsproject/CMakeSupport/Support.cmake
+++ cmsproject/CMakeSupport/Support.cmake
@@ -193,12 +193,10 @@
         message( WARNING "_doxygen: _projectNameUpper not set. You must invoke _projectName(...) before _doxygen(...)." )
     endif()

-    # Do nothing if building documentation is disabled.
-    if( NOT ${_projectNameUpper}_DOCUMENTATION )
-        return()
-    endif()
-
-    find_package( Doxygen )
+    # Only look for Doxygen is asked to.
+    if( ${_projectNameUpper}_DOCUMENTATION )
+        find_package( Doxygen )
+    endif()

     if( DOXYGEN_FOUND )
         set( HAVE_DOT "NO" )


Remove local url

Remove local url

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -26,8 +26,7 @@
       set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
     else()
       set(download_step
-          #URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev_471e4259.tar.gz
-          URL D:/MatchPoint/MatchPoint_rev_471e4259.tar.gz
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev_471e4259.tar.gz
           URL_MD5 ef2f1f80a41ee561d9dfe8d7437055f0
          )
     endif()


Fix shader generation

Fix shader generation

--- hecl/ApplicationTools.cmake
+++ hecl/ApplicationTools.cmake
@@ -52,7 +52,6 @@
   add_stage_rep(shader_${name} ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.hpp)
   add_pipeline_rep(shader_${name} ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.hpp UNIVERSAL)
   add_library(shader_${name} ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.hpp ${CMAKE_CURRENT_BINARY_DIR}/${dir}/shader_${name}.cpp)
-  target_link_libraries(shader_${name} PUBLIC boo hecl-light)
   add_shader_target(shader_${name})
 endfunction()

@@ -60,6 +59,5 @@
   add_stage_rep(${name} ${name}.hpp)
   add_pipeline_rep(${name} ${name}.hpp UNIVERSAL)
   add_library(${name} ${name}.hpp ${ARGN})
-  target_link_libraries(${name} PUBLIC boo hecl-light)
   add_shader_target(${name})
 endfunction()


Fix typo in R for cmake

Fix typo in R for cmake

--- dev/cmake/Modules/FindR.cmake
+++ dev/cmake/Modules/FindR.cmake
@@ -36,7 +36,7 @@

 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/get_home.R R.home())
 execute_process(
-    COMMAND ${R_EXEC} --quiet -f ${CMAKE_CURRENT_BINARY_DIR}/get_bin.R OUTPUT_VARIABLE R_HOME_TEXT RESULT_VARIABLE R_HOME_RESULT
+    COMMAND ${R_EXEC} --quiet -f ${CMAKE_CURRENT_BINARY_DIR}/get_home.R OUTPUT_VARIABLE R_HOME_TEXT RESULT_VARIABLE R_HOME_RESULT
 )
 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/get_home.R)
 MESSAGE(STATUS "R_HOME_TEXT = ${R_HOME_TEXT} w/ RESULT=${R_HOME_RESULT}")


added support for ISPC v1.8.2 again

added support for ISPC v1.8.2 again

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -46,18 +46,13 @@
   ENDIF()
 ENDIF()

-IF(NOT ISPC_VERSION)
-  EXECUTE_PROCESS(COMMAND ${ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
-  STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl)? " DUMMY "${ISPC_OUTPUT}")
-  SET(ISPC_VERSION ${CMAKE_MATCH_1})
-
-  IF (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED)
-    MESSAGE(FATAL_ERROR "Need at least version ${ISPC_VERSION_REQUIRED} of Intel SPMD Compiler (ISPC).")
-  ENDIF()
-
-  SET(ISPC_VERSION ${ISPC_VERSION} CACHE STRING "ISPC Version")
-  MARK_AS_ADVANCED(ISPC_VERSION)
-  MARK_AS_ADVANCED(ISPC_EXECUTABLE)
+# check ISPC version
+EXECUTE_PROCESS(COMMAND ${ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
+STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl)? " DUMMY "${ISPC_OUTPUT}")
+SET(ISPC_VERSION ${CMAKE_MATCH_1})
+
+IF (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED)
+  MESSAGE(FATAL_ERROR "Need at least version ${ISPC_VERSION_REQUIRED} of Intel SPMD Compiler (ISPC).")
 ENDIF()

 GET_FILENAME_COMPONENT(ISPC_DIR ${ISPC_EXECUTABLE} PATH)
@@ -132,8 +127,10 @@
       LIST(LENGTH ISPC_TARGETS NUM_TARGETS)
       IF (NUM_TARGETS GREATER 1)
         FOREACH(target ${ISPC_TARGETS})
-          STRING(REPLACE "-i32x16" "" targetname "${target}")
-          SET(results ${results} "${outdir}/${fname}.dev_${targetname}${ISPC_TARGET_EXT}")
+          IF (ISPC_VERSION VERSION_GREATER "1.8.2")
+            STRING(REPLACE "-i32x16" "" target "${target}")
+          ENDIF()
+          SET(results ${results} "${outdir}/${fname}.dev_${target}${ISPC_TARGET_EXT}")
         ENDFOREACH()
       ENDIF()
     ENDIF()


Fix test configuration error

Fix test configuration error

This commit fixes an error when configuring Girder tests due to EXTERNAL_DATA
referencing nonexistent files. For example:

    vagrant@isic-archive:~/girder-build$ cmake --version
    cmake version 2.8.12.2

    vagrant@isic-archive:~/girder-build$ cmake ../girder
    ...
    -- Including plugin.cmake from "large_image"
    CMake Error at /usr/share/cmake-2.8/Modules/ExternalData.cmake:434 (message):
      Data file referenced by argument

	DATA{/home/vagrant/girder-build/data_src/sample_image.ptif}

      corresponds to source tree path

	sample_image.ptif

      that does not exist as a file (with or without an extension)!
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/ExternalData.cmake:255 (_ExternalData_arg)
      tests/TestData.cmake:105 (ExternalData_Expand_Arguments)
      tests/PythonTests.cmake:153 (girder_ExternalData_expand_arguments)
      plugins/large_image/plugin.cmake:47 (add_python_test)
      tests/CMakeLists.txt:90 (include)
      tests/CMakeLists.txt:105 (_add_plugin)

In the Travis environment these errors show up as warnings.

--- plugin.cmake
+++ plugin.cmake
@@ -45,8 +45,8 @@
 )

 add_python_test(tiles PLUGIN large_image BIND_SERVER EXTERNAL_DATA
-  "sample_image.ptif" "plugins/large_image/sample_image.ptif"
-  "sample_svs_image.svs" "plugins/large_image/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
+  "plugins/large_image/sample_image.ptif"
+  "plugins/large_image/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
   )
 set_property(TEST server_large_image.tiles APPEND PROPERTY ENVIRONMENT
   "LARGE_IMAGE_DATA=${PROJECT_BINARY_DIR}/data/plugins/large_image")
@@ -54,8 +54,8 @@
 add_python_test(import PLUGIN large_image)

 add_python_test(girderless PLUGIN large_image BIND_SERVER EXTERNAL_DATA
-  "sample_image.ptif" "plugins/large_image/sample_image.ptif"
-  "sample_svs_image.svs" "plugins/large_image/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
+  "plugins/large_image/sample_image.ptif"
+  "plugins/large_image/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
   )
 set_property(TEST server_large_image.girderless APPEND PROPERTY ENVIRONMENT
   "LARGE_IMAGE_DATA=${PROJECT_BINARY_DIR}/data/plugins/large_image")


add host system check

add host system check

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -1,3 +1,10 @@
 # Copyright (C) 2014 ARM Limited. All rights reserved.

 cmake_minimum_required(VERSION 2.8)
+
+# check that we are actually running on Linux, if we're not then we may pull in
+# incorrect dependencies.
+if(NOT (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux"))
+    message(FATAL_ERROR "This Linux native target will not work on non-Linux platforms, use `yotta target` to set the target.")
+endif()
+


Delete cmake_install.cmake

Delete cmake_install.cmake

--- Labs/Ex-sp17/build/cmake_install.cmake
+++ Labs/Ex-sp17/build/cmake_install.cmake
@@ -1,44 +0,0 @@
-# Install script for directory: /home/moorthy/Ex-sp17
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  IF(BUILD_TYPE)
-    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  ELSE(BUILD_TYPE)
-    SET(CMAKE_INSTALL_CONFIG_NAME "")
-  ENDIF(BUILD_TYPE)
-  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
-  IF(COMPONENT)
-    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
-    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  ELSE(COMPONENT)
-    SET(CMAKE_INSTALL_COMPONENT)
-  ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
-# Install shared libraries without execute permission?
-IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-  SET(CMAKE_INSTALL_SO_NO_EXE "1")
-ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-
-IF(CMAKE_INSTALL_COMPONENT)
-  SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-ELSE(CMAKE_INSTALL_COMPONENT)
-  SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-ENDIF(CMAKE_INSTALL_COMPONENT)
-
-FILE(WRITE "/home/moorthy/Ex-sp17/build/${CMAKE_INSTALL_MANIFEST}" "")
-FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
-  FILE(APPEND "/home/moorthy/Ex-sp17/build/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
-ENDFOREACH(file)


COMP: Removed test that is no longer possible due to low-level writer access

--- Modules/Multilabel/Testing/files.cmake
+++ Modules/Multilabel/Testing/files.cmake
@@ -2,6 +2,6 @@
     mitkLabelTest.cpp
     mitkLabelSetTest.cpp
     mitkLabelSetImageTest.cpp
-    mitkLabelSetImageIOTest.cpp
+    #mitkLabelSetImageIOTest.cpp # Deactivated. Not supported yet - requires low level writer access.
 )


FindFreeRTOS works when FREERTOS_PATH is the repo FreeRTOS/FreeRTOS too.

Before this change this var could only by FreeRTOS-Kernel.

--- cmake/FindFreeRTOS.cmake
+++ cmake/FindFreeRTOS.cmake
@@ -14,14 +14,16 @@

 find_path(FreeRTOS_COMMON_INCLUDE
     NAMES FreeRTOS.h
-    PATHS "${FREERTOS_PATH}/Source/include"
+    PATHS "${FREERTOS_PATH}" "${FREERTOS_PATH}/FreeRTOS"
+    PATH_SUFFIXES  "Source/include"
     NO_DEFAULT_PATH
 )
 list(APPEND FreeRTOS_INCLUDE_DIRS "${FreeRTOS_COMMON_INCLUDE}")

 find_path(FreeRTOS_SOURCE_DIR
     NAMES tasks.c
-    PATHS "${FREERTOS_PATH}/Source"
+    PATHS "${FREERTOS_PATH}" "${FREERTOS_PATH}/FreeRTOS"
+    PATH_SUFFIXES  "Source"
     NO_DEFAULT_PATH
 )
 if(NOT (TARGET FreeRTOS))
@@ -69,7 +71,8 @@
 foreach(PORT ${FreeRTOS_FIND_COMPONENTS})
     find_path(FreeRTOS_${PORT}_PATH
         NAMES portmacro.h
-        PATHS "${FREERTOS_PATH}/Source/portable/GCC/${PORT}"
+        PATHS "${FREERTOS_PATH}" "${FREERTOS_PATH}/FreeRTOS"
+        PATH_SUFFIXES "Source/portable/GCC/${PORT}"
         NO_DEFAULT_PATH
     )
     list(APPEND FreeRTOS_INCLUDE_DIRS "${FreeRTOS_${PORT}_PATH}")


remove boost depency

remove boost depency

--- cmake/InstallFolly.cmake
+++ cmake/InstallFolly.cmake
@@ -5,19 +5,22 @@
     endif()

     ExternalProject_Add(folly
+        DEPENDS             gflags glog
         DOWNLOAD_NAME       folly-${FOLLY_VERSION}.tar.gz
         URL                 https://github.com/facebook/folly/archive/v${FOLLY_VERSION}.tar.gz
         URL_MD5             ${FOLLY_URL_MD5}
         CONFIGURE_COMMAND   cd <SOURCE_DIR>/folly &&
                             autoreconf -vi &&
                             LD_LIBRARY_PATH=<INSTALL_DIR>/lib
+                            LIBRARY_PATH=<INSTALL_DIR>/lib
                             LDFLAGS=-L<INSTALL_DIR>/lib
                             PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig
                             CFLAGS=-I<INSTALL_DIR>/include
                             CXXFLAGS=-I<INSTALL_DIR>/include
+                            LIBS=${CMAKE_THREAD_LIBS_INIT}
                             <SOURCE_DIR>/folly/configure
-                                --prefix=<INSTALL_DIR> ${WITH_OPENSSL}
-                                --with-boost=${BOOST_ROOT}
+                                --prefix=<INSTALL_DIR>
+                                ${WITH_OPENSSL}
         BUILD_COMMAND       cd <SOURCE_DIR>/folly && make
         INSTALL_COMMAND     cd <SOURCE_DIR>/folly && make install
     )


Fixes the case of undefined ignored file paths

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -55,7 +55,7 @@
       set(CPPCHECK_IGNORED_PATHS -i${_ignored_paths})
     endif(CPPCHECK_IGNORED_PATHS)

-    set(_cppcheck_args -i${CPPCHECK_IGNORED_PATHS} -I ${PROJECT_SOURCE_DIR}
+    set(_cppcheck_args ${CPPCHECK_IGNORED_PATHS} -I ${PROJECT_SOURCE_DIR}
       --error-exitcode=2 --inline-suppr
       --suppress=unmatchedSuppression --suppress=preprocessorErrorDirective
       ${CPPCHECK_EXTRA_ARGS})


fptu-make: fix message space (cosmetic).

--- cmake.fptu/compiler.cmake
+++ cmake.fptu/compiler.cmake
@@ -3,7 +3,7 @@
 #
 if(NOT (CMAKE_C_COMPILER_ID STREQUAL CMAKE_CXX_COMPILER_ID))
   message(WARNING "CMAKE_C_COMPILER_ID (${CMAKE_C_COMPILER_ID}) is different "
-    "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID})."
+    "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID}). "
     "The final binary may be unusable.")
 endif()


Add color output to ninja builds

Add color output to ninja builds

--- cmake/CompilerSetup.cmake
+++ cmake/CompilerSetup.cmake
@@ -18,6 +18,10 @@
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)
+
+if(CMAKE_GENERATOR STREQUAL "Ninja")
+  set(NINJA ON)
+endif()

 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CLANG ON)
@@ -67,6 +71,13 @@
     )
   endif()

+  if(NINJA)
+    # If building under Ninja, disable tty detection and force color output
+    if(CLANG OR GNU)
+      list(APPEND common_flags -fdiagnostics-color)
+    endif()
+  endif()
+
   foreach(flag ${common_flags} ${c_flags})
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
   endforeach()


made table engine an MPI-only engine

made table engine an MPI-only engine

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -133,7 +133,7 @@

 # Table
 if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
-    if(ZeroMQ_FOUND)
+    if(ZeroMQ_FOUND AND ADIOS2_HAVE_MPI)
         if(ADIOS2_USE_Table STREQUAL AUTO)
             set(ADIOS2_HAVE_Table TRUE)
         elseif(ADIOS2_USE_Table)


Tried to make every version of FindCUDA.cmake happy with FindCUDA_wrap.cmake

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -14,7 +14,11 @@
   if (CMAKE_COMPILER_IS_GNUCC)
     set (CUDA_PROPAGATE_HOST_FLAGS OFF)
     if (CMAKE_C_FLAGS)
+      if(CMAKE_VERSION VERSION_LESS "2.8.7")
+        set (CUDA_NVCC_FLAGS --compiler-options "${CMAKE_C_FLAGS}")
+      else ()
         set (CUDA_NVCC_FLAGS "--compiler-options \"${CMAKE_C_FLAGS}\"")
+      endif()
     endif ()
   endif ()


fixes verilator binary discovery

fixes verilator binary discovery

--- cmake/FindVerilator.cmake
+++ cmake/FindVerilator.cmake
@@ -30,25 +30,24 @@
 find_package(PackageHandleStandardArgs REQUIRED)

 include(SystemCPackage)
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-
-find_program(VERILATOR_EXECUTABLE verilator
-    HINTS ${CONAN_VERILATOR_ROOT}
-          $ENV{VERILATOR_ROOT}
+if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+    include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+endif()
+find_program(VERILATOR_EXECUTABLE
+    NAMES verilator_bin verilator_bin_dbg
+    HINTS ${CONAN_VERILATOR_ROOT} ENV VERILATOR_ROOT
     PATH_SUFFIXES bin
+    REQUIRED
     DOC "Path to the Verilator executable"
 )

-find_program(VERILATOR_COVERAGE_EXECUTABLE verilator_coverage verilator_coverage_bin_dbg
-    HINTS ${CONAN_VERILATOR_ROOT}
-    $ENV{VERILATOR_ROOT}
+find_program(VERILATOR_COVERAGE_EXECUTABLE
+	NAMES verilator_coverage_bin verilator_coverage_bin_dbg
+    HINTS ${CONAN_VERILATOR_ROOT} ENV VERILATOR_ROOT
     PATH_SUFFIXES bin
+    REQUIRED
     DOC "Path to the Verilator coverage executable"
 )
-
-find_program(VERILATOR_BIN NAMES verilator_bin verilator_bin_dbg
-  HINTS ${VERILATOR_ROOT}/bin ENV VERILATOR_ROOT
-  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)

 if(${CONAN_VERILATOR_ROOT})
     set (ENV{VERILATOR_ROOT} ${CONAN_VERILATOR_ROOT})


update boost dst dir

update boost dst dir

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -70,7 +70,7 @@
   DSTS ${dst_dir} ${dst_dir}/lib
 )

-set(dst_dir "${CMAKE_INSTALL_PREFIX}/third_party/boost/include")
+set(dst_dir "${CMAKE_INSTALL_PREFIX}/third_party/boost/")
 copy(boost_lib
   SRCS ${BOOST_INCLUDE_DIR}/boost
   DSTS ${dst_dir}


Enable ocaml by default.

Enable ocaml by default.

svn path=/trunk/; revision=8743

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -22,7 +22,7 @@
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 else(DEFAULT_NO_BINDINGS)
-  option(ENABLE_ocaml "Enable OCaml bindings" OFF)
+  option(ENABLE_ocaml "Enable OCaml bindings" ON)
 endif(DEFAULT_NO_BINDINGS)

 if(ENABLE_ocaml)


Debian packages with legacy C headers added to list of conflicts, relpaces, etc.

(cherry picked from commit e245aed6bbebd69a63a00d45a66b358df4153888)

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -127,6 +127,8 @@
   endif()
 endforeach()

+list(APPEND STD_OPENCV_DEV "libhighgui-dev" "libcv-dev" "libcvaux-dev")
+
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_PROVIDES "${STD_OPENCV_LIBS}")
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_REPLACES "${STD_OPENCV_LIBS}")


Update URL.

Update URL.

--- cmake/ThirdPartyMetis.cmake
+++ cmake/ThirdPartyMetis.cmake
@@ -6,7 +6,7 @@
     EXTERNALPROJECT_ADD(
         modmetis-5.1.0
         PREFIX ${TPSRC}
-        URL ${TPURL}/modmetis-5.1.0.tar.bz2
+        URL ${TPURL}/modmetis-5.1.0_1.tar.bz2
         URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
         DOWNLOAD_DIR ${TPSRC}
         CONFIGURE_COMMAND ${CMAKE_COMMAND}


soc: support out of dir soc code

soc: support out of dir soc code

Just like boards, support also SoCs out of the tree.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -194,6 +194,9 @@
 # found, use that path to infer the ARCH we are building for.
 if(NOT BOARD_ROOT)
   set(BOARD_ROOT ${ZEPHYR_BASE})
+endif()
+if(NOT SOC_ROOT)
+  set(SOC_ROOT ${ZEPHYR_BASE})
 endif()

 find_path(BOARD_DIR NAMES "${BOARD}_defconfig" PATHS ${BOARD_ROOT}/boards/*/* NO_DEFAULT_PATH)


Fix build issues on CentOS. test=develop

--- cmake/external/ngraph.cmake
+++ cmake/external/ngraph.cmake
@@ -36,18 +36,13 @@

 SET(NGRAPH_PROJECT         "extern_ngraph")
 SET(NGRAPH_VERSION         "0.9")
-SET(NGRAPH_TAG_VERSION     "0.9.1")
-SET(NGRAPH_GIT_TAG         "v${NGRAPH_TAG_VERSION}")
+SET(NGRAPH_GIT_TAG         "f9fd9d4cc318dc59dd4b68448e7fbb5f67a28bd0")
 SET(NGRAPH_SOURCES_DIR     ${THIRD_PARTY_PATH}/ngraph)
 SET(NGRAPH_INSTALL_DIR     ${THIRD_PARTY_PATH}/install/ngraph)
 SET(NGRAPH_INC_DIR         ${NGRAPH_INSTALL_DIR}/include)
-SET(NGRAPH_LIB_DIR         ${NGRAPH_INSTALL_DIR}/lib)
 SET(NGRAPH_SHARED_LIB_NAME libngraph.so.${NGRAPH_VERSION})
 SET(NGRAPH_CPU_LIB_NAME    libcpu_backend.so)
 SET(NGRAPH_TBB_LIB_NAME    libtbb.so.2)
-SET(NGRAPH_SHARED_LIB      ${NGRAPH_LIB_DIR}/${NGRAPH_SHARED_LIB_NAME})
-SET(NGRAPH_CPU_LIB         ${NGRAPH_LIB_DIR}/${NGRAPH_CPU_LIB_NAME})
-SET(NGRAPH_TBB_LIB         ${NGRAPH_LIB_DIR}/${NGRAPH_TBB_LIB_NAME})
 SET(NGRAPH_GIT_REPO        "https://github.com/NervanaSystems/ngraph.git")

 ExternalProject_Add(
@@ -68,6 +63,18 @@
     CMAKE_ARGS          -DMKLDNN_LIB_DIR=${MKLDNN_INSTALL_DIR}/lib
 )

+if(UNIX AND NOT APPLE)
+    include(GNUInstallDirs)
+    SET(NGRAPH_LIB_DIR ${NGRAPH_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR})
+else()
+    SET(NGRAPH_LIB_DIR ${NGRAPH_INSTALL_DIR}/lib)
+endif()
+MESSAGE(STATUS "nGraph lib will be installed at: ${NGRAPH_LIB_DIR}")
+
+SET(NGRAPH_SHARED_LIB      ${NGRAPH_LIB_DIR}/${NGRAPH_SHARED_LIB_NAME})
+SET(NGRAPH_CPU_LIB         ${NGRAPH_LIB_DIR}/${NGRAPH_CPU_LIB_NAME})
+SET(NGRAPH_TBB_LIB         ${NGRAPH_LIB_DIR}/${NGRAPH_TBB_LIB_NAME})
+
 # Workaround for nGraph expecting mklml to be in mkldnn install directory.
 ExternalProject_Add_Step(
     ${NGRAPH_PROJECT}


Started using ARGV instead of ARGN when parsing source files

--- cmake-modules/ConditionalSources.cmake
+++ cmake-modules/ConditionalSources.cmake
@@ -25,7 +25,7 @@
 include(VerboseMessage)

   include(CMakeParseArguments)
-  cmake_parse_arguments(conditional_sources "" "GROUP_NAME" "FILES" ${ARGV})
+  cmake_parse_arguments(conditional_sources "" "GROUP_NAME" "FILES" ${ARGN})
 function(conditional_sources condition_var)

   source_group(${conditional_sources_GROUP_NAME} FILES ${conditional_sources_FILES})


[Build] Suppressed wrong end-of-lines.

[Build] Suppressed wrong end-of-lines.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1280,9 +1280,7 @@

   # Convenient message to the user/developer
   if (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
-    install (CODE "message (\"On Unix-based platforms, run "
-	  "export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH "
-	  "once per session\")")
+    install (CODE "message (\"On Unix-based platforms, run export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH once per session\")")
   endif (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)

 endmacro (module_library_add_standard)


increase the default timeout for each test; test case 21 takes a while

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -36,8 +36,8 @@
        ${CMAKE_SYSTEM_NAME}             # [Darwin,Linux,Windows]
        ${CMAKE_Fortran_COMPILER_ID}     # [Intel,GNU]
   )
-  # limit each test to 25 minutes: 1500s
-  set_tests_properties(${testname} PROPERTIES TIMEOUT 1500 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "regression")
+  # limit each test to 45 minutes: 2700s
+  set_tests_properties(${testname} PROPERTIES TIMEOUT 2700 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "regression")
 endfunction(of_regression)

 function(bd_regression testname)


Update Boost.Compute tag to Boost 1.61.0

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -1,9 +1,9 @@
 # If using a commit, remove the v prefix to VER in URL.
 # If using a tag, don't use v in VER
 # This is because of how github handles it's release tar balls
-SET(VER 0.5)
-SET(URL https://github.com/boostorg/compute/archive/v${VER}.tar.gz)
-SET(MD5 69a52598ac539d3b7f6005a3dd2b6f58)
+SET(VER boost-1.61.0)
+SET(URL https://github.com/boostorg/compute/archive/${VER}.tar.gz)
+SET(MD5 7e1c433b48825d8cb2effa963823aec8)

 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/compute-${VER}")


libbreakpad_client.so.0 isn't needed anymore. Linux statically links against breakpad now.

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -277,7 +277,6 @@
         libboost_system-mt.so.${BOOST_VERSION}.0
         libboost_thread-mt.so.${BOOST_VERSION}.0
         libboost_wave-mt.so.${BOOST_VERSION}.0
-#        libbreakpad_client.so.0
         libcollada14dom.so
         libcrypto.so.1.0.0
         libdb-5.1.so
@@ -308,11 +307,6 @@
       set(release_files ${release_files} "libtcmalloc_minimal.so")
     endif (USE_TCMALLOC)

-    # <FS:ND> We only ever need google breakpad when crash reporting is used
-    if(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
-      set(release_files ${release_files} "libbreakpad_client.so.0")
-    endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
-
     if (FMODEX)
       set(release_file ${release_files} "libfmodex.so")
     endif (FMODEX)


COMP: Do not use CMake features from CMake > 2.8.4.

--- Core/Code/CppMicroServices/CMake/usFunctionCreateTestModule.cmake
+++ Core/Code/CppMicroServices/CMake/usFunctionCreateTestModule.cmake
@@ -7,7 +7,8 @@
   endif()

   if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS "-fPIC")
+    get_property(_compile_flags TARGET ${name} PROPERTY COMPILE_FLAGS)
+    set_property(TARGET ${name} PROPERTY COMPILE_FLAGS "${_compile_flags} -fPIC")
   endif()

   target_link_libraries(${name} ${US_LINK_LIBRARIES})


emscripten toolchain: move '-s ASSERTIONS=0' to linker flags (new warning in emsdk 2.0.19)

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -128,7 +128,7 @@
 if (FIPS_EMSCRIPTEN_DEMANGLE)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1")
 endif()
-set(EMSC_COMMON_FLAGS_RELEASE "${EMSC_COMMON_FLAGS_RELEASE} -s ASSERTIONS=0")
+set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s ASSERTIONS=0")
 if (FIPS_EMSCRIPTEN_USE_FETCH)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s FETCH=1")
 endif()


Updated FW to allow for graceful resets

Updated FW to allow for graceful resets

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "231cdecf84a2f1977a0d00bcee2ce6fa2ae8ce85")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "6a2abd52e513272993a6f8140702407e5c6ea251")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


FMUv2: Do not build BMI160

FMUv2: Do not build BMI160

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -48,7 +48,6 @@
 	drivers/bst
 	drivers/snapdragon_rc_pwm
 	drivers/lis3mdl
-	drivers/bmi160

 	#
 	# System commands


cmake: add ztest_suite_node output section to linker script generator

The commit dee79d2b66cc983f1fff345aaebed14b05600d85 introduced a new
linker output section ztest_suite_node in linker/common-ram.ld but
without updating the corresponding linker_script/common/common-ram.cmake
linker script generator code.

This causes test cases for arm Compiler 6 to fail.

Add the same section to common-ram.ld.

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

--- cmake/linker_script/common/common-ram.cmake
+++ cmake/linker_script/common/common-ram.cmake
@@ -102,3 +102,7 @@
 #	_static_kernel_objects_end = .;
 #endif()
 #
+
+if(CONFIG_ZTEST)
+  zephyr_iterable_section(NAME ztest_suite_node GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
+endif()


[cmake] use QUIET mode for searching nlohmann_json

On platform where nlohmann/json.hpp does not provided,
find_package(nlohmann_json) produces too much warnings.
Printout version number and include dirs if found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -71,8 +71,11 @@
   if(fail-on-missing)
     find_package(nlohmann_json REQUIRED)
   else()
-    find_package(nlohmann_json)
-    if(NOT nlohmann_json_FOUND)
+    find_package(nlohmann_json QUIET)
+    if(nlohmann_json_FOUND)
+      get_target_property(_nlohmann_json_inlc nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
+      message(STATUS "Found nlohmann/json.hpp in ${_nlohmann_json_inlc} (found version ${nlohmann_json_VERSION})")
+    else()
       message(STATUS "nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option")
       set(builtin_nlohmannjson ON CACHE BOOL "Enabled because nlohmann/json.hpp not found" FORCE)
     endif()


ENH: outdated compiler flag

ENH: outdated compiler flag

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -118,7 +118,7 @@
 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)

 IF(APPLE)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-coalesce-templates -fno-coalesce-static-vtables")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
 ENDIF(APPLE)

 IF(CMAKE_COMPILER_IS_GNUCXX)


Fixed cmake_dependent_option use.

Fixed cmake_dependent_option use.

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -61,7 +61,7 @@
 option(WITH_SAMPLE "Build sample code" OFF)

 option(WITH_CLIENT_COMMON "Build client common library" ON)
-cmake_dependent_option(WITH_CLIENT "Build client binaries" ON WITH_CLIENT_COMMON ON)
+cmake_dependent_option(WITH_CLIENT "Build client binaries" ON "WITH_CLIENT_COMMON" OFF)

 option(WITH_SERVER "Build server binaries" OFF)

@@ -70,7 +70,7 @@
 option(WITH_CHANNELS "Build virtual channel plugins" ON)

 cmake_dependent_option(WITH_CLIENT_CHANNELS "Build virtual channel plugins" ON
-	"WITH_CLIENT_COMMON;WITH_CHANNELS" ON)
+	"WITH_CLIENT_COMMON;WITH_CHANNELS" OFF)

 if(WITH_SERVER AND WITH_CHANNELS)
 	option(WITH_SERVER_CHANNELS "Build virtual channel plugins" ON)


added mpi dependency back for wdm to pass tests

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -102,7 +102,7 @@
 # WDM
 # WDM currently breaks the PGI compiler
 if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
-    if(ZeroMQ_FOUND)
+    if(ZeroMQ_FOUND AND MPI_FOUND)
         if(ADIOS2_USE_WDM STREQUAL AUTO)
             set(ADIOS2_HAVE_WDM TRUE)
         elseif(ADIOS2_USE_WDM)


Handle filename changed in Wireshark source tree

epan/column_info.h renamed in epan/column-info.h

--- cmake/FindWireshark.cmake
+++ cmake/FindWireshark.cmake
@@ -16,6 +16,7 @@
 # wireshark does not install its library with pkg-config information,
 # so we need to manually find the libraries and headers

+FIND_PATH( WIRESHARK_INCLUDE_DIRS epan/column_info.h PATH_SUFFIXES wireshark )
 FIND_PATH( WIRESHARK_INCLUDE_DIRS epan/column-info.h PATH_SUFFIXES wireshark )
 FIND_LIBRARY( WIRESHARK_LIBRARIES wireshark )


Make RelWithDebInfo builds behave more like release builds.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -58,17 +58,21 @@
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /permissive-")
 	endif ()
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /sdl /Oi /Ot /Oy /Ob2 /Zi")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Ob2")
-	set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
+	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Oy /Ob2 /Zi")
+	#set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")

 	if(DEV_BUILD EQUAL 0)
 		set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
+		set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
 		set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
+		set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
 	endif()

 	set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
 	set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
 	set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
+	set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
+	set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
 	set(CMAKE_CXX_STANDARD 17)

 	if (${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")


Bug#20344207: Add support for CMake 3.1

Bug#20344207: Add support for CMake 3.1

Rename a CMake variable in compile_flags.cmake to avoid triggering
CMake 3.1 warning about CMP0054 about interpreting if() arguments
as keywords or variables.

No changes in behavior.

--- cmake/compile_flags.cmake
+++ cmake/compile_flags.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,11 +18,11 @@
 MACRO(ADD_COMPILE_FLAGS)
   SET(FILES "")
   SET(FLAGS "")
-  SET(COMPILE_FLAGS)
+  SET(COMPILE_FLAGS_SEEN)
   FOREACH(ARG ${ARGV})
     IF(ARG STREQUAL "COMPILE_FLAGS")
-      SET(COMPILE_FLAGS "COMPILE_FLAGS")
-    ELSEIF(COMPILE_FLAGS)
+      SET(COMPILE_FLAGS_SEEN 1)
+    ELSEIF(COMPILE_FLAGS_SEEN)
       LIST(APPEND FLAGS ${ARG})
     ELSE()
       LIST(APPEND FILES ${ARG})


use master tip of balboa

use master tip of balboa

--- cmake/custom/balboa.cmake
+++ cmake/custom/balboa.cmake
@@ -4,7 +4,7 @@
     balboa
     PREFIX "${PROJECT_BINARY_DIR}/balboa"
     GIT_REPOSITORY https://github.com/bast/balboa.git
-    GIT_TAG a26be6df03c3736c96e401b1a3b0c2d9f4f8272c
+    GIT_TAG master
     INSTALL_COMMAND true  # currently no install command
     )


Fixing cmake/elemvariables.cmake to only specify PMRRR as a dependency if it was actually built.

--- cmake/elemvariables.cmake
+++ cmake/elemvariables.cmake
@@ -16,5 +16,12 @@

 ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} -I${MPI_CXX_INCLUDE_PATH}
 ELEM_LINK_FLAGS = -L${ELEM_LIB} ${MPI_CXX_LINK_FLAGS}
-ELEM_LIBS = -lelemental -lplcg -lpmrrr -lcmake-dummy-lib \
-            ${MATH_LIBS} ${MPI_CXX_LIBS}
+
+HAVE_PMRRR = @HAVE_PMRRR@
+ifdef HAVE_PMRRR
+  ELEM_LIBS = -lelemental -lplcg -lpmrrr -lcmake-dummy-lib \
+              ${MATH_LIBS} ${MPI_CXX_LIBS}
+else
+  ELEM_LIBS = -lelemental -lplcg -lcmake-dummy-lib \
+              ${MATH_LIBS} ${MPI_CXX_LIBS}
+endif


ARROW-4898: [C++] Old versions of FindProtobuf.cmake use ALL-CAPS for variables

Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>

Closes #3919 from xhochy/ARROW-4898 and squashes the following commits:

dea6b6f95 <Korn, Uwe> ARROW-4898:  Old versions of FindProtobuf.cmake use ALL-CAPS for variables

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -987,6 +987,10 @@
     )
   endif()
   if (NOT TARGET protobuf::libprotoc)
+    if (PROTOBUF_PROTOC_LIBRARY AND NOT Protobuf_PROTOC_LIBRARY)
+      # Old CMake versions have a different casing.
+      set(Protobuf_PROTOC_LIBRARY ${PROTOBUF_PROTOC_LIBRARY})
+    endif()
     if (NOT Protobuf_PROTOC_LIBRARY)
       message(FATAL_ERROR "libprotoc was set to ${Protobuf_PROTOC_LIBRARY}")
     endif()


Exclude temporary build files from installation.

--- build/cmake/core.cmake
+++ build/cmake/core.cmake
@@ -101,7 +101,7 @@
   DEPENDS ${STAMP_DIR}/core-build-release
   DEPENDS ${STAMP_DIR}/core-build-install-dist
   COMMAND mkdir -p ${STAGE_EMBEDDED_DIR}/apps/core
-  COMMAND rsync -a --delete-after ${CORE_BUILD_DIR}/ ${STAGE_EMBEDDED_DIR}/apps/core/
+  COMMAND rsync -a --delete-after --delete-excluded --exclude=/tmp ${CORE_BUILD_DIR}/ ${STAGE_EMBEDDED_DIR}/apps/core/
   COMMAND touch -c ${STAGE_EMBEDDED_DIR}/apps/core
 )


removed unused cmake-modules.

removed unused cmake-modules.

--- cmake-modules/cmake_utils.cmake
+++ cmake-modules/cmake_utils.cmake
@@ -1,118 +0,0 @@
-set_property(GLOBAL PROPERTY USE_FOLDERS On)
-
-#enable c++11 support
-if(NOT MSVC) #TODO others??
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pedantic -fPIC")
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-endif()
-
-function(source_group)
-	foreach(file ${ARGN})
-		#if file is an absolute path make it relitive to current source/build directory
-		if(IS_ABSOLUTE ${file})
-			string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" file "${file}")
-			string(REGEX REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" file "${file}")
-		endif()
-
-		#only add if in current source directory
-		if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}" AND NOT "${file}" MATCHES ".*\\.\\..*")
-			#get the file extention
-			get_filename_component(extention "${file}" EXT)
-
-			#remove the name and extention of the file
-			get_filename_component(file_path "${file}" DIRECTORY)
-
-			#if it is a source file
-			if("${extention}" MATCHES "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$")
-				string(REGEX REPLACE "(source|sources|src)" "" file_path "${file_path}") #TODO others??
-				set(file_path "Source Files/${file_path}")
-			elseif("${extention}" MATCHES "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$")
-				string(REGEX REPLACE "(include|includes|inc)" "" file_path "${file_path}") #TODO others??
-				set(file_path "Header Files/${file_path}")
-			endif()
-
-			#convert to the source group format (see cmake documentation for source_group)
-			string(REGEX REPLACE "/" "\\\\" group "${file_path}")
-
-			if(NOT ${group} STREQUAL "")
-				#add the file to the source group
-				_source_group(${group} FILES ${file})
-			endif()
-		endif()
-	endforeach()
-endfunction()
-
-function(default_target_setup_ target)
-	#mimic the source file folder structor in IDE virtual folders
-	get_target_property(source_files ${target} SOURCES)
-	source_group(${source_files})
-
-	#mimic project layout in IDE virtual folders
-	file(RELATIVE_PATH group ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-	get_filename_component(last_folder "${group}" NAME)
-	if("${last_folder}" MATCHES ${target})
-		string(REGEX REPLACE "/${last_folder}" "" group "${group}")
-	endif()
-	set_property(TARGET ${target} PROPERTY FOLDER ${group})
-
-	#just add a few usefull defines
-	if("${CMAKE_GENERATOR}" MATCHES "(Visual Studio|Xcode).*")
-		target_compile_options(${target} PRIVATE -DCMAKE_IDE_GENERATOR)
-	else()
-		target_compile_options(${target} PRIVATE -DCMAKE_MAKEFILE_GENERATOR)
-	endif()
-
-	#get uppercase target name
-	string(TOUPPER ${target} upper_target)
-
-	#fix format for C/C++
-	string(REGEX REPLACE "-" "_" upper_target "${upper_target}")
-
-	#define debug
-	target_compile_definitions(${target} PUBLIC -D$<$<CONFIG:Debug>:${upper_target}_DEBUG>)
-
-	#check if it is a shared library or module
-	get_target_property(target_type ${target} TYPE)
-	if(${target_type} STREQUAL SHARED_LIBRARY OR ${target_type} STREQUAL MODULE_LIBRARY)
-		#define export
-		target_compile_definitions(${target} PRIVATE -D${upper_target}_EXPORT)
-	endif()
-endfunction()
-
-function(add_library target)
-	list(FIND ARGN "IMPORTED" imported_target)
-	if(${imported_target} EQUAL -1)
-		#add the library and cmake files
-		_add_library(${target} ${ARGN})
-
-		#setup some defalts
-		default_target_setup_(${target})
-	else()
-		#add the library like normal
-		_add_library(${target} ${ARGN})
-	endif()
-endfunction()
-
-function(add_executable target)
-	list(FIND ARGN "IMPORTED" imported_target)
-	if(${imported_target} EQUAL -1)
-		#add the executable and cmake files
-		_add_executable(${target} ${ARGN})
-
-		#setup some defalts
-		default_target_setup_(${target})
-	else()
-		#add the executable like normal
-		_add_executable(${target} ${ARGN})
-	endif()
-endfunction()
-
-
-function(add_plugin name)
-	add_library(${name} MODULE ${ARGN})
-	set_target_properties(${name}
-			PROPERTIES
-			PREFIX ""
-			LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins
-			RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
-endfunction()


Removed an "&" from cmake output (Visual Studio 2010 required fix)

--- cmake/BALLFinishedMessage.cmake
+++ cmake/BALLFinishedMessage.cmake
@@ -21,7 +21,7 @@
                     COMMAND ${CMAKE_COMMAND} -E echo ""
                     COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/source/TEST/bin/$(OutDir)/"
 										COMMAND copy ${DLL_SOURCE} ${DLL_TARGET} /Y
-                    COMMENT "message after library is built & copy BALL(d).dll to test binary dir"
+                    COMMENT "message after library is built and copy BALL(d).dll to test binary dir"
                     VERBATIM)
 ELSE()
   ADD_CUSTOM_COMMAND(TARGET BALL


Only pass --with-ssl to curl config for superbuild

I think this used to work incidentally thanks for a fallback to system
paths. However, with the version bump, curl config now validates that
the ssl headers are available in '$PREFIX/include', so we can only pass
'--with-ssl' when we control the prefix.

https://github.com/curl/curl/commit/d353af001420574210605ba132dfd31a0e3876a5

--- cmake/Modules/FindCurl_EP.cmake
+++ cmake/Modules/FindCurl_EP.cmake
@@ -73,6 +73,7 @@

   if (TARGET ep_openssl)
     set(DEPENDS ep_openssl)
+    set(with_ssl "--with-ssl=${TILEDB_EP_INSTALL_PREFIX}")
   endif()

   set(TILEDB_CURL_LIBS "-ldl -lpthread")
@@ -101,7 +102,7 @@
         --enable-shared=no
         --disable-ldap
         --with-pic=yes
-        --with-ssl=${TILEDB_EP_INSTALL_PREFIX}
+        ${with_ssl}
     BUILD_IN_SOURCE TRUE
     BUILD_COMMAND $(MAKE)
     INSTALL_COMMAND $(MAKE) install


Copy the file to the cmake for manpage generation.

--- cmake/Modules/UseAsciidoc.cmake
+++ cmake/Modules/UseAsciidoc.cmake
@@ -7,6 +7,8 @@
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+include(MacroCopyFile)

 macro(MACRO_ASCIIDOC2MAN _a2m_input _a2m_output)
   find_program(A2X
@@ -18,13 +20,13 @@
   if (A2X)

     #message("+++ ${A2X} --doctype=manpage --format=manpage --destination-dir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_a2m_input}")
+    macro_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/${_a2m_input} ${CMAKE_CURRENT_BINARY_DIR}/${_a2m_input})
+
     execute_process(
       COMMAND
-        ${A2X} --doctype=manpage --format=manpage --destination-dir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_a2m_input}
-      INPUT_FILE
-        ${CMAKE_CURRENT_SOURCE_DIR}/${_a2m_input}
-      OUTPUT_FILE
-        ${CMAKE_CURRENT_BINARY_DIR}/${_a2m_output}
+        ${A2X} --doctype=manpage --format=manpage ${_a2m_input}
+      WORKING_DIRECTORY
+        ${CMAKE_CURRENT_BINARY_DIR}
       RESULT_VARIABLE
         A2M_MAN_GENERATED
       ERROR_QUIET


Use llvm and clang of cling.

Use llvm and clang of cling.

--- cmake/modules/ClingConfig.cmake
+++ cmake/modules/ClingConfig.cmake
@@ -4,7 +4,9 @@
 # uses LLVM's. When it does, we should move this file to ClingConfig.cmake.in
 # and call configure_file() on it.

-find_package(LLVM REQUIRED CONFIG)
+# Don't just use any llvm / clang: cling needs its own:
+find_package(LLVM REQUIRED CONFIG NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_LIST_DIR}/../llvm")
+find_package(clang REQUIRED CONFIG NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_LIST_DIR}/../clang")

 # Provide all our library targets to users.
 include("${CMAKE_CURRENT_LIST_DIR}/ClingTargets.cmake")


Fix filenames for MSVC build

Fix filenames for MSVC build

--- ice40/family.cmake
+++ ice40/family.cmake
@@ -21,13 +21,13 @@
     foreach (dev ${devices})
         if (dev EQUAL "5k")
             set(OPT_FAST "")
-            set(OPT_SLOW --slow ${ICEBOX_ROOT}/timings-up5k.txt)
+            set(OPT_SLOW --slow ${ICEBOX_ROOT}/timings_up5k.txt)
         elseif(dev EQUAL "384")
             set(OPT_FAST "")
-            set(OPT_SLOW --slow ${ICEBOX_ROOT}/timings-lp384.txt)
+            set(OPT_SLOW --slow ${ICEBOX_ROOT}/timings_lp384.txt)
         else()
-            set(OPT_FAST --fast ${ICEBOX_ROOT}/timings-hx${dev}.txt)
-            set(OPT_SLOW --slow ${ICEBOX_ROOT}/timings-lp${dev}.txt)
+            set(OPT_FAST --fast ${ICEBOX_ROOT}/timings_hx${dev}.txt)
+            set(OPT_SLOW --slow ${ICEBOX_ROOT}/timings_lp${dev}.txt)
         endif()
         set(DEV_TXT_DB ${ICEBOX_ROOT}/chipdb-${dev}.txt)
         set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.bba)


Added search path for Microsoft DirectX SDK (August 2008), the latest version.  OK by Ambroff.

--- indra/cmake/DirectX.cmake
+++ indra/cmake/DirectX.cmake
@@ -3,6 +3,7 @@
 if (VIEWER AND WINDOWS)
   find_path(DIRECTX_INCLUDE_DIR dxdiag.h
             "$ENV{DXSDK_DIR}/Include"
+            "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include"
@@ -22,6 +23,7 @@

   find_path(DIRECTX_LIBRARY_DIR dxguid.lib
             "$ENV{DXSDK_DIR}/Lib/x86"
+            "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86"


Allow configure the python used for CBSE

--- cmake/DaemonCBSE.cmake
+++ cmake/DaemonCBSE.cmake
@@ -24,7 +24,13 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-find_package(Python REQUIRED)
+# Allow overriding the python path with a cached variable.
+set(DAEMON_CBSE_PYTHON_PATH "NOTFOUND" CACHE FILEPATH "")
+if (NOT ${DAEMON_CBSE_PYTHON_PATH})
+    find_package(Python REQUIRED)
+set(DAEMON_CBSE_PYTHON_PATH "${Python_EXECUTABLE}" CACHE FILEPATH "" FORCE)
+endif()
+message(STATUS "Using CBSE Python executable: ${DAEMON_CBSE_PYTHON_PATH}")

 function(maybe_add_dep target dep)
     if (TARGET ${target})
@@ -36,7 +42,7 @@
     # Check if python has all the dependencies
     # TODO: Execute pip directly here and install them
     execute_process(
-        COMMAND ${Python_EXECUTABLE} -c "import jinja2, yaml, collections, argparse, sys, os.path, re"
+        COMMAND ${DAEMON_CBSE_PYTHON_PATH} -c "import jinja2, yaml, collections, argparse, sys, os.path, re"
         RESULT_VARIABLE RET)
     if (NOT RET EQUAL 0)
         message(FATAL_ERROR "Missing dependences for CBSE generation. Please ensure you have python ≥ 2, python-yaml, and python-jinja installed.
@@ -59,7 +65,7 @@
                 ${CMAKE_SOURCE_DIR}/src/utils/cbse/templates/Helper.h
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/utils/cbse
         COMMAND
-                ${Python_EXECUTABLE}
+                ${DAEMON_CBSE_PYTHON_PATH}
                 ${CMAKE_SOURCE_DIR}/src/utils/cbse/CBSE.py
                 -s -o
                 "${output}"


Add ability to disable ZeroMQ

Add ability to disable ZeroMQ

ZeroMQ autodetection can be programmatically disabled by passing as argument
`-DDISABLE_ZEROMQ=ON`


cmake: fix code section ordering

cmake: fix code section ordering

Order the code sections according to their numbering in the table of
contents.

Signed-off-by: Henrik Brix Andersen <a076b11c2cc63ccdc903dbe182e1eecc3cbbc094@brixandersen.dk>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -304,6 +304,161 @@
   endforeach()
 endmacro()

+# 1.2 zephyr_library_*
+#
+# Zephyr libraries use CMake's library concept and a set of
+# assumptions about how zephyr code is organized to cut down on
+# boilerplate code.
+#
+# A Zephyr library can be constructed by the function zephyr_library
+# or zephyr_library_named. The constructors create a CMake library
+# with a name accessible through the variable ZEPHYR_CURRENT_LIBRARY.
+#
+# The variable ZEPHYR_CURRENT_LIBRARY should seldomly be needed since
+# the zephyr libraries have methods that modify the libraries. These
+# methods have the signature: zephyr_library_<target-function>
+#
+# The methods are wrappers around the CMake target_* functions. See
+# https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
+# documentation on the underlying target_* functions.
+#
+# The methods modify the CMake target_* API to reduce boilerplate;
+#  PRIVATE is assumed
+#  The target is assumed to be ZEPHYR_CURRENT_LIBRARY
+#
+# When a flag that is given through the zephyr_* API conflicts with
+# the zephyr_library_* API then precedence will be given to the
+# zephyr_library_* API. In other words, local configuration overrides
+# global configuration.
+
+# Constructor with a directory-inferred name
+macro(zephyr_library)
+  zephyr_library_get_current_dir_lib_name(lib_name)
+  zephyr_library_named(${lib_name})
+endmacro()
+
+# Determines what the current directory's lib name would be and writes
+# it to the argument "lib_name"
+macro(zephyr_library_get_current_dir_lib_name lib_name)
+  # Remove the prefix (/home/sebo/zephyr/driver/serial/CMakeLists.txt => driver/serial/CMakeLists.txt)
+  file(RELATIVE_PATH name ${ZEPHYR_BASE} ${CMAKE_CURRENT_LIST_FILE})
+
+  # Remove the filename (driver/serial/CMakeLists.txt => driver/serial)
+  get_filename_component(name ${name} DIRECTORY)
+
+  # Replace / with __ (driver/serial => driver__serial)
+  string(REGEX REPLACE "/" "__" name ${name})
+
+  set(${lib_name} ${name})
+endmacro()
+
+# Constructor with an explicitly given name.
+macro(zephyr_library_named name)
+  # This is a macro because we need add_library() to be executed
+  # within the scope of the caller.
+  set(ZEPHYR_CURRENT_LIBRARY ${name})
+  add_library(${name} STATIC "")
+
+  zephyr_append_cmake_library(${name})
+
+  target_link_libraries(${name} PUBLIC zephyr_interface)
+endmacro()
+
+
+function(zephyr_link_interface interface)
+  target_link_libraries(${interface} INTERFACE zephyr_interface)
+endfunction()
+
+#
+# zephyr_library versions of normal CMake target_<func> functions
+#
+function(zephyr_library_sources source)
+  target_sources(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${source} ${ARGN})
+endfunction()
+
+function(zephyr_library_include_directories)
+  target_include_directories(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${ARGN})
+endfunction()
+
+function(zephyr_library_link_libraries item)
+  target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PUBLIC ${item} ${ARGN})
+endfunction()
+
+function(zephyr_library_compile_definitions item)
+  target_compile_definitions(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${item} ${ARGN})
+endfunction()
+
+function(zephyr_library_compile_options item)
+  # The compiler is relied upon for sane behaviour when flags are in
+  # conflict. Compilers generally give precedence to flags given late
+  # on the command line. So to ensure that zephyr_library_* flags are
+  # placed late on the command line we create a dummy interface
+  # library and link with it to obtain the flags.
+  #
+  # Linking with a dummy interface library will place flags later on
+  # the command line than the the flags from zephyr_interface because
+  # zephyr_interface will be the first interface library that flags
+  # are taken from.
+
+  string(RANDOM random)
+  set(lib_name options_interface_lib_${random})
+
+  add_library(           ${lib_name} INTERFACE)
+  target_compile_options(${lib_name} INTERFACE ${item} ${ARGN})
+
+  target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${lib_name})
+endfunction()
+
+function(zephyr_library_cc_option)
+  foreach(option ${ARGV})
+    string(MAKE_C_IDENTIFIER check${option} check)
+    zephyr_check_compiler_flag(C ${option} ${check})
+
+    if(${check})
+      zephyr_library_compile_options(${option})
+    endif()
+  endforeach()
+endfunction()
+
+# Add the existing CMake library 'library' to the global list of
+# Zephyr CMake libraries. This is done automatically by the
+# constructor but must called explicitly on CMake libraries that do
+# not use a zephyr library constructor, but have source files that
+# need to be included in the build.
+function(zephyr_append_cmake_library library)
+  set_property(GLOBAL APPEND PROPERTY ZEPHYR_LIBS ${library})
+endfunction()
+
+# 1.2.1 zephyr_interface_library_*
+#
+# A Zephyr interface library is a thin wrapper over a CMake INTERFACE
+# library. The most important responsibility of this abstraction is to
+# ensure that when a user KConfig-enables a library then the header
+# files of this library will be accessible to the 'app' library.
+#
+# This is done because when a user uses Kconfig to enable a library he
+# expects to be able to include it's header files and call it's
+# functions out-of-the box.
+#
+# A Zephyr interface library should be used when there exists some
+# build information (include directories, defines, compiler flags,
+# etc.) that should be applied to a set of Zephyr libraries and 'app'
+# might be one of these libraries.
+#
+# Zephyr libraries must explicitly call
+# zephyr_library_link_libraries(<interface_library>) to use this build
+# information. 'app' is treated as a special case for usability
+# reasons; a Kconfig option (CONFIG_APP_LINK_WITH_<interface_library>)
+# should exist for each interface_library and will determine if 'app'
+# links with the interface_library.
+#
+# This API has a constructor like the zephyr_library API has, but it
+# does not have wrappers over the other cmake target functions.
+macro(zephyr_interface_library_named name)
+  add_library(${name} INTERFACE)
+  set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS ${name})
+endmacro()
+
 # 1.3 generate_inc_*

 # These functions are useful if there is a need to generate a file
@@ -360,161 +515,6 @@
   add_custom_target(${generated_target_name} DEPENDS ${generated_file})
   generate_inc_file_for_gen_target(${target} ${source_file} ${generated_file} ${generated_target_name} ${ARGN})
 endfunction()
-
-# 1.2 zephyr_library_*
-#
-# Zephyr libraries use CMake's library concept and a set of
-# assumptions about how zephyr code is organized to cut down on
-# boilerplate code.
-#
-# A Zephyr library can be constructed by the function zephyr_library
-# or zephyr_library_named. The constructors create a CMake library
-# with a name accessible through the variable ZEPHYR_CURRENT_LIBRARY.
-#
-# The variable ZEPHYR_CURRENT_LIBRARY should seldomly be needed since
-# the zephyr libraries have methods that modify the libraries. These
-# methods have the signature: zephyr_library_<target-function>
-#
-# The methods are wrappers around the CMake target_* functions. See
-# https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
-# documentation on the underlying target_* functions.
-#
-# The methods modify the CMake target_* API to reduce boilerplate;
-#  PRIVATE is assumed
-#  The target is assumed to be ZEPHYR_CURRENT_LIBRARY
-#
-# When a flag that is given through the zephyr_* API conflicts with
-# the zephyr_library_* API then precedence will be given to the
-# zephyr_library_* API. In other words, local configuration overrides
-# global configuration.
-
-# Constructor with a directory-inferred name
-macro(zephyr_library)
-  zephyr_library_get_current_dir_lib_name(lib_name)
-  zephyr_library_named(${lib_name})
-endmacro()
-
-# Determines what the current directory's lib name would be and writes
-# it to the argument "lib_name"
-macro(zephyr_library_get_current_dir_lib_name lib_name)
-  # Remove the prefix (/home/sebo/zephyr/driver/serial/CMakeLists.txt => driver/serial/CMakeLists.txt)
-  file(RELATIVE_PATH name ${ZEPHYR_BASE} ${CMAKE_CURRENT_LIST_FILE})
-
-  # Remove the filename (driver/serial/CMakeLists.txt => driver/serial)
-  get_filename_component(name ${name} DIRECTORY)
-
-  # Replace / with __ (driver/serial => driver__serial)
-  string(REGEX REPLACE "/" "__" name ${name})
-
-  set(${lib_name} ${name})
-endmacro()
-
-# Constructor with an explicitly given name.
-macro(zephyr_library_named name)
-  # This is a macro because we need add_library() to be executed
-  # within the scope of the caller.
-  set(ZEPHYR_CURRENT_LIBRARY ${name})
-  add_library(${name} STATIC "")
-
-  zephyr_append_cmake_library(${name})
-
-  target_link_libraries(${name} PUBLIC zephyr_interface)
-endmacro()
-
-
-function(zephyr_link_interface interface)
-  target_link_libraries(${interface} INTERFACE zephyr_interface)
-endfunction()
-
-#
-# zephyr_library versions of normal CMake target_<func> functions
-#
-function(zephyr_library_sources source)
-  target_sources(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${source} ${ARGN})
-endfunction()
-
-function(zephyr_library_include_directories)
-  target_include_directories(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${ARGN})
-endfunction()
-
-function(zephyr_library_link_libraries item)
-  target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PUBLIC ${item} ${ARGN})
-endfunction()
-
-function(zephyr_library_compile_definitions item)
-  target_compile_definitions(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${item} ${ARGN})
-endfunction()
-
-function(zephyr_library_compile_options item)
-  # The compiler is relied upon for sane behaviour when flags are in
-  # conflict. Compilers generally give precedence to flags given late
-  # on the command line. So to ensure that zephyr_library_* flags are
-  # placed late on the command line we create a dummy interface
-  # library and link with it to obtain the flags.
-  #
-  # Linking with a dummy interface library will place flags later on
-  # the command line than the the flags from zephyr_interface because
-  # zephyr_interface will be the first interface library that flags
-  # are taken from.
-
-  string(RANDOM random)
-  set(lib_name options_interface_lib_${random})
-
-  add_library(           ${lib_name} INTERFACE)
-  target_compile_options(${lib_name} INTERFACE ${item} ${ARGN})
-
-  target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${lib_name})
-endfunction()
-
-function(zephyr_library_cc_option)
-  foreach(option ${ARGV})
-    string(MAKE_C_IDENTIFIER check${option} check)
-    zephyr_check_compiler_flag(C ${option} ${check})
-
-    if(${check})
-      zephyr_library_compile_options(${option})
-    endif()
-  endforeach()
-endfunction()
-
-# Add the existing CMake library 'library' to the global list of
-# Zephyr CMake libraries. This is done automatically by the
-# constructor but must called explicitly on CMake libraries that do
-# not use a zephyr library constructor, but have source files that
-# need to be included in the build.
-function(zephyr_append_cmake_library library)
-  set_property(GLOBAL APPEND PROPERTY ZEPHYR_LIBS ${library})
-endfunction()
-
-# 1.2.1 zephyr_interface_library_*
-#
-# A Zephyr interface library is a thin wrapper over a CMake INTERFACE
-# library. The most important responsibility of this abstraction is to
-# ensure that when a user KConfig-enables a library then the header
-# files of this library will be accessible to the 'app' library.
-#
-# This is done because when a user uses Kconfig to enable a library he
-# expects to be able to include it's header files and call it's
-# functions out-of-the box.
-#
-# A Zephyr interface library should be used when there exists some
-# build information (include directories, defines, compiler flags,
-# etc.) that should be applied to a set of Zephyr libraries and 'app'
-# might be one of these libraries.
-#
-# Zephyr libraries must explicitly call
-# zephyr_library_link_libraries(<interface_library>) to use this build
-# information. 'app' is treated as a special case for usability
-# reasons; a Kconfig option (CONFIG_APP_LINK_WITH_<interface_library>)
-# should exist for each interface_library and will determine if 'app'
-# links with the interface_library.
-#
-# This API has a constructor like the zephyr_library API has, but it
-# does not have wrappers over the other cmake target functions.
-macro(zephyr_interface_library_named name)
-  add_library(${name} INTERFACE)
-  set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS ${name})
-endmacro()

 # 1.4. board_*
 #


cmake: fix the build on windows

cmake: fix the build on windows

Commit ef3c5e551676278ccc1f42ecb572838144c5e33a changed the way
WEST_TOPDIR is initialized from calling 'west topdir' as a subprocess
to using the west API.

However, WEST_TOPDIR is a cmake variable and must be a cmake-style
path, with forward slashes. While 'west topdir' as a command does
output a forward slash separated path (basically in order to make the
zephyr build system work), west_topdir() as an API returns the path in
the host environment path style, which on Windows uses backslashes.

This turns out to be the ultimate cause of the following build error:

CMake Error at C:/.../CheckCCompilerFlag.cmake:41 (set):
  Syntax error in cmake code when parsing string
    -fmacro-prefix-map=C:\Users\Marti\zp=WEST_TOPDIR

Fix it by converting to POSIX style in Python. We could have
potentially also done this using file(TO_CMAKE_PATH "${WEST_TOPDIR}"
...), but I'm intentionally repeating the old way of doing things
since it was known to work.

Signed-off-by: Martí Bolívar <9d90ac4c7bf6a305f6bfd81a23c7859bc883380e@nordicsemi.no>

--- cmake/host-tools.cmake
+++ cmake/host-tools.cmake
@@ -54,7 +54,7 @@

   execute_process(
     COMMAND ${PYTHON_EXECUTABLE} -c
-    "from west.util import west_topdir; print(west_topdir())"
+    "import pathlib; from west.util import west_topdir; print(pathlib.Path(west_topdir()).as_posix())"
     OUTPUT_VARIABLE  WEST_TOPDIR
     OUTPUT_STRIP_TRAILING_WHITESPACE
     WORKING_DIRECTORY ${ZEPHYR_BASE}


Use the right source directory for 3rdparty projects

This commit removes the need of a prebuild command to move (copy) the source
directory of an external project. This was needed since the
`add_siplasplas_thirdparty()` function generates CMake external projects
named `<name>-external-project`, thus using `<name>-external-project` as
source directory. This however conflicted with the fact that we
encourage full-qualified `#include<>`s, since in libraries distributing
their header files directly in their source dir root the qualified path
to the headers was `<name>-external-project/header.h` instead of
`<name>/header.h`.

The command above was a workaround to solve the problem, but introduced
issues with the way CMake tracks dependencies (Long story short, the
command was considered always out of date so CMake keep rebuilding the
followind dependent targets).

This commit fixes all the above by using
`<binary-dir>/THIRDPARTY/<name>/src/<name>` as source directory for
third party dependencies (Check `SOURCE_DIR` of `ExternalProject_Add()`
command).

--- cmake/thirdparty.cmake
+++ cmake/thirdparty.cmake
@@ -17,6 +17,7 @@

     file(WRITE "${CMAKE_BINARY_DIR}/${outputFile}"
 "ExternalProject_Add(${NAME}-external-project
+    SOURCE_DIR ${CMAKE_BINARY_DIR}/THIRDPARTY/${NAME}/src/${NAME}
     PREFIX ${CMAKE_BINARY_DIR}/THIRDPARTY/${NAME}
     ${EXTERNAL_PROJECT_ARGS}
     ${configureCommand}
@@ -126,18 +127,7 @@
     set(${FORMATTED_NAME}_BINARY_DIR "${binary_dir}" PARENT_SCOPE)

     add_library(${NAME} INTERFACE)
-
-    if(THIRDPARTY_RENAME AND (NOT ("${repodir}" STREQUAL "${downloaddir}") AND NOT (EXISTS "${repodir}")))
-        add_custom_target(${NAME}-rename-sources
-            COMMAND ${CMAKE_COMMAND} -E copy_directory "${downloaddir}" "${repodir}"
-            COMMENT "Copying ${NAME} sources to ${repodir}"
-        )
-
-        add_dependencies(${NAME} ${NAME}-rename-sources)
-        add_dependencies(${NAME}-rename-sources ${external})
-    else()
-        add_dependencies(${NAME} ${external})
-    endif()
+    add_dependencies(${NAME} ${external})

     set(includedirs)
     foreach(includedir ${THIRDPARTY_INCLUDE_DIRS})


correction

correction

--- findGMM/FindGMM.cmake
+++ findGMM/FindGMM.cmake
@@ -14,12 +14,12 @@
 #
 # ----------------------------------------------------------------------------

-find_file(GMM_INCLUDE_DIRS "gmm/gmm.h")
+find_path(GMM_INCLUDE_DIRS "gmm/gmm.h")

 # ----------------------------------------------------------------------------

 include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set TBB_FOUND to TRUE
+# handle the QUIETLY and REQUIRED arguments and set GMM_FOUND to TRUE
 # if all listed variables are TRUE
 find_package_handle_standard_args(GMM DEFAULT_MSG
 				GMM_INCLUDE_DIRS)


Cleaned redundant include for cmath and math.h from platform.h.cmake (#317)

git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@2871 5242fede-7e19-0410-aef8-94bd7d2200fb

--- include/geos/platform.h.cmake
+++ include/geos/platform.h.cmake
@@ -83,8 +83,12 @@
  */
 #ifdef _MSC_VER
 #define _USE_MATH_DEFINES
-#include <math.h>
+#include <cmath>
+#include <float.h>
+#else
+#include <cmath>
 #endif
+#include <limits>

 #ifndef M_PI
 #define M_PI 3.14159265358979323846
@@ -118,20 +122,15 @@
 #endif

 #if defined(HAVE_STD_ISNAN)
-# include <cmath>
 # define ISNAN(x) (std::isnan)(x)
 #elif defined(HAVE_INLINE_ISNAND_XCODE)
-# include <math.h>
 # define ISNAN(x) __inline_isnand(static_cast<double>(x))
 #elif defined(HAVE_ISNAND_XCODE)
-# include <math.h>
 # define ISNAN(x) __isnand(static_cast<double>(x))
 #elif defined(HAVE_ISNAN)
 # if defined(_MSC_VER)
-#  include <float.h>
 #  define ISNAN(x) _isnan(static_cast<double>(x))
 # else
-#  include <math.h>
 #  define ISNAN(x) isnan(x)
 # endif
 #else
@@ -139,24 +138,20 @@
 #endif

 #if defined(HAVE_STD_ISFINITE)
-# include <cmath>
 # define FINITE(x) (std::isfinite)(x)
 #elif defined(HAVE_ISFINITE)
-# include <math.h>
 # define FINITE(x) isfinite(x)
 #elif defined(HAVE_FINITE)
-# include <float.h>
 # define FINITE(x) _finite(static_cast<double>(x))
 #else
 # error "Could not find finite or isfinite function or macro!"
 #endif

-#include <limits>
-#define DoubleNegInfinity (-(std::numeric_limits<double>::infinity)())
-#define DoubleMax (std::numeric_limits<double>::max)()
-// Defines NaN for Intel platforms
-#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
-// Don't forget to define infinities
-#define DoubleInfinity (std::numeric_limits<double>::infinity)()
+#define DoubleNegInfinity (-(std::numeric_limits<double>::infinity)())
+#define DoubleMax (std::numeric_limits<double>::max)()
+// Defines NaN for Intel platforms
+#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
+// Don't forget to define infinities
+#define DoubleInfinity (std::numeric_limits<double>::infinity)()

 #endif // GEOS_PLATFORM_H_INCLUDED


configure guile installation path

configure guile installation path

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -52,18 +52,28 @@
     SET(MODULE_NAME ${CMAKE_MATCH_3})
     SET(MODULE_FILE_DIR_PATH ${CMAKE_MATCH_2})
     SET(MODULE_FILES_DIR_PATH ${CMAKE_MATCH_2}/${CMAKE_MATCH_3})
+    SET(GUILE_SYMLINK_DIR "${CMAKE_BINARY_DIR}/opencog/scm")
+    SET(GUILE_INSTALL_DIR "${DATADIR}/scm")

-    # Create symlinks in build directory mirroring what the install path
-    # structure.
+    # Create symlinks in build directory mirroring the install path structure.
+    # Also configure for install.
     IF ("${MODULE_NAME}.scm" STREQUAL "${MODULE_FILE}")
         EXECUTE_PROCESS(
             COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILE_DIR_PATH}
-            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILE_DIR_PATH}/${MODULE_FILE}"
+            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${MODULE_FILE}"
+        )
+        INSTALL (FILES
+            ${MODULE_FILE}
+            DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILE_DIR_PATH}"
         )
     ELSE()
         EXECUTE_PROCESS(
             COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILES_DIR_PATH}
-            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILES_DIR_PATH}/${MODULE_FILE}"
+            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILES_DIR_PATH}/${MODULE_FILE}"
+        )
+        INSTALL (FILES
+            ${MODULE_FILE}
+            DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILES_DIR_PATH}"
         )
     ENDIF()


Add C++ standard to BuildFlags.cmake

Add C++ standard to BuildFlags.cmake

--- cmake/BuildFlags.cmake
+++ cmake/BuildFlags.cmake
@@ -1,3 +1,4 @@
+set(CMAKE_CXX_STANDARD)
 if (MSVC AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))

   # Final flags are Common + build-specific flags (e.g., Release, Debug)


BuildTest cmake module: ts now part of modules, no need for seperate linking

--- cmake/BuildTests.cmake
+++ cmake/BuildTests.cmake
@@ -27,12 +27,12 @@
             add_definitions(-DPYTHON_USE_NUMPY=1)
             add_dependencies( ${test_project} python )
             include_directories( ${BIND_PYTHON_INCLUDE_DIRS} )
-            target_link_libraries(${test_project} ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ts ${BIND_PYTHON_LIBS} python)
+            target_link_libraries(${test_project} ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ${BIND_PYTHON_LIBS} python)

         else(BUILD_python)

             add_dependencies(${test_project} ${${ROOT_PROJECT}_MODULES})
-            set(${test_project}_LIBS ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ts ${${ROOT_PROJECT}_MODULES})
+            set(${test_project}_LIBS ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ${${ROOT_PROJECT}_MODULES})
             list(REMOVE_DUPLICATES ${test_project}_LIBS)
             target_link_libraries(${test_project} ${${test_project}_LIBS})


cmake: more documentation

cmake: more documentation

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -28,7 +28,14 @@
 #       src/MyPlugin.cpp
 #   FILES_UI
 #       src/MyUI.cpp)
+#
+# target_include_directories(MyPlugin
+#   PUBLIC src)
 # ```
+#
+# Important: note that properties, such as include directories, definitions,
+# and linked libraries *must* be marked with `PUBLIC` so they take effect and
+# propagate into all the plugin targets.

 include(CMakeParseArguments)


Added include path for MPI when mpi conduit is active.

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -158,6 +158,7 @@
     set(MPI_C_COMPILER ${_GASNet_LD})
     find_package(MPI REQUIRED COMPONENTS C)
     list(APPEND COMPONENT_DEPS ${MPI_C_LIBRARIES})
+    list(APPEND IDIRS ${MPI_C_INCLUDE_PATH})
   endif()
   add_library(GASNet::${COMPONENT_NAME} UNKNOWN IMPORTED)
   set_target_properties(GASNet::${COMPONENT_NAME} PROPERTIES


Mirror fix for cmake FindLibBcc module

Mirror fix for cmake FindLibBcc module

--- cmake/FindLibBcc.cmake
+++ cmake/FindLibBcc.cmake
@@ -83,7 +83,9 @@
 else()
   SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_LIBRARIES})
 endif()
+
 INCLUDE(CheckCXXSourceCompiles)
+SET(CMAKE_REQUIRED_INCLUDES ${LIBBCC_INCLUDE_DIRS})
 CHECK_CXX_SOURCE_COMPILES("
 #include <bcc/libbpf.h>

@@ -93,4 +95,5 @@
 }
 " LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
 SET(CMAKE_REQUIRED_LIBRARIES)
+SET(CMAKE_REQUIRED_INCLUDES)
 endif()


[cmake] add 2017 matlab versions to findMatlab

--- cmake/FindMATLAB.cmake
+++ cmake/FindMATLAB.cmake
@@ -126,7 +126,7 @@
     IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))

     # Search for a version of Matlab available, starting from the most modern one to older versions
-      FOREACH(MATVER "R2016b" "R2016a" "R2015b" "R2015a" "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
+      FOREACH(MATVER "R2017b" "R2017a" "R2016b" "R2016a" "R2015b" "R2015a" "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
         SET(MATLAB_VERSION ${MATVER})
         IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))
           IF(EXISTS /Applications/MATLAB_${MATVER}.app)


CONFIG: Update HunterGate to new one.

CONFIG: Update HunterGate to new one.

--- cmake/HunterGate.cmake
+++ cmake/HunterGate.cmake
@@ -288,7 +288,7 @@

   hunter_gate_status_debug("Run generate")
   execute_process(
-      COMMAND "${CMAKE_COMMAND}" "-H${dir}" "-B${build_dir}"
+      COMMAND "${CMAKE_COMMAND}" "-H${dir}" "-B${build_dir}" "-G${CMAKE_GENERATOR}"
       WORKING_DIRECTORY "${dir}"
       RESULT_VARIABLE download_result
       ${logging_params}
@@ -377,16 +377,16 @@
     string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global)
     string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath)

-    if(_empty_sha1)
-      hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
-    endif()
-    if(_empty_url)
-      hunter_gate_user_error("URL suboption of HunterGate is mandatory")
-    endif()
     if(_have_unparsed)
       hunter_gate_user_error(
           "HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}"
       )
+    endif()
+    if(_empty_sha1)
+      hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
+    endif()
+    if(_empty_url)
+      hunter_gate_user_error("URL suboption of HunterGate is mandatory")
     endif()
     if(_have_global)
       if(HUNTER_GATE_LOCAL)
@@ -495,3 +495,4 @@
     set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
   endif()
 endmacro()
+


Add a tbag-cmake debugging message.

Add a tbag-cmake debugging message.

--- cmake/TbagConfig.cmake
+++ cmake/TbagConfig.cmake
@@ -95,6 +95,7 @@
 macro (tbag_config__set_library_prefix __value)
     set (${__value} "/usr/local") # DEFAULT SETTING.
     tbag_utils__get_args_size (__library_prefix_arg_length ${ARGN})
+
     if (${__library_prefix_arg_length} GREATER 0)
         foreach (__library_prefix_cursor ${ARGN})
             if (IS_DIRECTORY "${__library_prefix_cursor}")
@@ -105,6 +106,8 @@
     elseif (DEFINED THIRD_PREFIX)
         set (${__value} "${THIRD_PREFIX}")
     endif ()
+
+    tbag_debug_variable (tbag_config__set_library_prefix ${__value})
     set (${__value} "${${__value}}" CACHE PATH "Library prefix directory.")
 endmacro ()

@@ -172,6 +175,7 @@
         set (ENV{LIBRARY_PATH} "${THIRD_LIB}${TBAG_PATH_SEPARATOR}$ENV{LIBRARY_PATH}")
     endif ()

+    message (STATUS "THIRD_PREFIX: ${THIRD_PREFIX}")
     list (INSERT CMAKE_PROGRAM_PATH 0 ${THIRD_BIN})
     list (INSERT CMAKE_INCLUDE_PATH 0 ${THIRD_INC})
     list (INSERT CMAKE_LIBRARY_PATH 0 ${THIRD_LIB})


cmake: extensions: DT helper fixes

cmake: extensions: DT helper fixes

Fix miscellaneous issues:

- dt_node_has_status() is missing a return() statement
- dt_chosen()'s comment string and error handling message contain errors

Signed-off-by: Martí Bolívar <9d90ac4c7bf6a305f6bfd81a23c7859bc883380e@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -2650,6 +2650,7 @@
   dt_node_exists(${var} PATH ${DT_NODE_PATH})
   if(NOT ${${var}})
     set(${var} FALSE PARENT_SCOPE)
+    return()
   endif()

   dt_prop(${var} PATH ${DT_NODE_PATH} PROPERTY status)
@@ -2926,7 +2927,8 @@
 #
 # Get a node path for a /chosen node property.
 #
-# the node path will be returned in the <value> parameter.
+# The node's path will be returned in the <var> parameter. The
+# variable will be left undefined if the chosen node does not exist.
 #
 # <var>           : Return variable where the node path will be stored
 # PROPERTY <prop> : Chosen property
@@ -2935,7 +2937,7 @@
   cmake_parse_arguments(DT_CHOSEN "" "${req_single_args}" "" ${ARGN})

   if(${ARGV0} IN_LIST req_single_args)
-    message(FATAL_ERROR "dt_has_chosen(${ARGV0} ...) missing return parameter.")
+    message(FATAL_ERROR "dt_chosen(${ARGV0} ...) missing return parameter.")
   endif()

   foreach(arg ${req_single_args})


boost find script is too paranoical about architectures

--- cmake/find/boost.cmake
+++ cmake/find/boost.cmake
@@ -77,7 +77,7 @@
 				ELSE()
 					STRING( FIND ${Boost_SYSTEM_LIBRARY_DEBUG} "x86_64" APOSITION )
 					IF ("${APOSITION}" STREQUAL "-1")
-						MESSAGE(FATAL_ERROR "This is a 64-bit build, and it looks like CMake actually found the 32-bit Boost libraries to link to!")
+						MESSAGE(WARNING "This is a 64-bit build, and it looks like CMake actually found the 32-bit Boost libraries to link to!")
 					ENDIF()
 				ENDIF()
 			ELSE()


cmake: Speed up CMake by not invoking 'west'

Speed up CMake by 100ms by importing west instead of invoking it as an
executable.

There is significant overhead in invoking west as a script via
pip. The exact reason why is not clear.

Also, simplify the version output parsing as we get the version in a
more machine-readable form now.

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

--- cmake/host-tools.cmake
+++ cmake/host-tools.cmake
@@ -15,31 +15,25 @@
   set(MIN_WEST_VERSION 0.6.0)
   execute_process(
     COMMAND
-    ${WEST} --version
-    OUTPUT_VARIABLE west_version_output
+    ${PYTHON_EXECUTABLE}
+    -c
+    "import west.version; print(west.version.__version__, end='')"
+    OUTPUT_VARIABLE west_version
+    RESULT_VARIABLE west_version_output_result
     )

-  # The west --version output is currently multiline: bootstrapper
-  # followed by installation version. Test both. This will still work
-  # when .west/west is eliminated from the installation and obtained
-  # via pypi, which will result in a single line of output.
-  string(REGEX REPLACE "\n" ";" west_version_output "${west_version_output}")
-  foreach(item ${west_version_output})
-    if("${item}" MATCHES "^[^\/\\]*v([0-9]+[.][0-9]+[.][0-9]+)")
-      set(west_version "${CMAKE_MATCH_1}")
-      if(${west_version} VERSION_LESS ${MIN_WEST_VERSION})
-        message(FATAL_ERROR "The detected west version is unsupported.\n\
+  if(west_version_output_result)
+    message(FATAL_ERROR "Unable to import west.version from '${PYTHON_EXECUTABLE}'")
+  endif()
+
+  if(${west_version} VERSION_LESS ${MIN_WEST_VERSION})
+    message(FATAL_ERROR "The detected west version is unsupported.\n\
   The version was found to be ${west_version}:\n\
     ${item}\n\
   But the minimum supported version is ${MIN_WEST_VERSION}\n\
-  Please upgrade, e.g. with:\n\
-      pip3 install --upgrade west\n\
-  if the version from pip is too old, or:\n\
-      west update\n\
-  if the version in the installation is too old.")
-      endif()
-    endif()
-  endforeach()
+  Please upgrade with:\n\
+      pip3 install --upgrade west")
+  endif()
   # Just output information for a single version. This will still work
   # even after output is one line.
   message(STATUS "Found west: ${WEST} (found suitable version \"${west_version}\", minimum required is \"${MIN_WEST_VERSION}\")")


Fix FindUrho3D.cmake to look for *.bc extension in Emscripten build. [ci only: Emscripten]

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -51,6 +51,11 @@
     if (NOT URHO3D_LIB_TYPE STREQUAL SHARED)
         list (REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
     endif ()
+endif ()
+
+# Cater for the shared library extension in Emscripten build has been changed to ".bc"
+if (EMSCRIPTEN)
+    string (REPLACE .so .bc CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")   # Stringify for string replacement
 endif ()

 set (PATH_SUFFIX Urho3D)


CMake: And take into account projects consuming engine as a library.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -349,7 +349,7 @@

     # Prefer binary dir - generated msvc solution with .csproj projects included in it.
     if (MSVC)
-        set (VS_SOLUTIONS ${CMAKE_BINARY_DIR}/rbfx.sln)
+        set (VS_SOLUTIONS ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln)
     else ()
         # On unixes source directory will contain manually crafted .sln
         file (GLOB VS_SOLUTIONS ${CMAKE_SOURCE_DIR}/*.sln)


CMake: Fix msbuild /t:restore always using cmake-build directory on unixes/mingw.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -337,8 +337,10 @@
     endif ()

     if (NOT MSVC)
-        execute_process(COMMAND ${TERM_WORKAROUND} ${MSBUILD} ${CSHARP_SOLUTION} /t:restore /m /consoleloggerparameters:ErrorsOnly)
-        add_custom_target(NugetRestore COMMAND ${TERM_WORKAROUND} ${MSBUILD} ${CSHARP_SOLUTION} /t:restore /m /consoleloggerparameters:ErrorsOnly)
+        execute_process(COMMAND
+            ${TERM_WORKAROUND} ${MSBUILD} ${CSHARP_SOLUTION} /p:BuildDir="${CMAKE_BINARY_DIR}/" /t:restore /m /consoleloggerparameters:ErrorsOnly)
+        add_custom_target(NugetRestore COMMAND
+            ${TERM_WORKAROUND} ${MSBUILD} ${CSHARP_SOLUTION} /p:BuildDir="${CMAKE_BINARY_DIR}/" /t:restore /m /consoleloggerparameters:ErrorsOnly)
         set_property(TARGET NugetRestore PROPERTY EXCLUDE_FROM_ALL ON)
     endif ()


Reordered source code lines of CMake toolchain file for MinGW-w64.


COMP: In dashboard script example, binary directory now include the build type

It will look like: CTK-Superbuild-Release-continuous
instead of
CTK-Superbuild-continuous

--- CMake/ctkDashboardScript.EXAMPLE.cmake
+++ CMake/ctkDashboardScript.EXAMPLE.cmake
@@ -55,7 +55,7 @@
 # Project specific properties
 #
 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK")
-set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK-Superbuild-${SCRIPT_MODE}")
+set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK-Superbuild-${CTEST_BUILD_CONFIGURATION}-${SCRIPT_MODE}")

 # Additionnal CMakeCache options - For example:
 # CTK_LIB_Widgets:BOOL=ON


generated cmake command for flatc generation should depend on source file (#5087)

--- CMake/FindFlatBuffers.cmake
+++ CMake/FindFlatBuffers.cmake
@@ -45,6 +45,7 @@
       add_custom_command(OUTPUT ${FLATC_OUTPUT}
         COMMAND ${FLATBUFFERS_FLATC_EXECUTABLE}
         ARGS -c -o "${CMAKE_CURRENT_BINARY_DIR}/" ${FILE}
+        DEPENDS ${FILE}
         COMMENT "Building C++ header for ${FILE}"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
     endforeach()


BUG: Remove slicer.kitware.com as a content link server

This server has been retired.

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -39,9 +39,6 @@

     # Data published by developers using git-gerrit-push.
     "https://itk.org/files/ExternalData/%(algo)/%(hash)"
-
-    # Mirror supported by the Slicer community.
-    "https://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
     )
 endif()


Fixed capital letters

Fixed capital letters

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -345,9 +345,9 @@
     require_external(imgui)

     if(WIN32)
-      set(IMGUIZMOQUAT_LIB "lib/imGuIZMOquat.lib")
-    else()
-      set(IMGUIZMOQUAT_LIB "lib/imGuIZMOquat.a")
+      set(IMGUIZMOQUAT_LIB "lib/imguizmoquat.lib")
+    else()
+      set(IMGUIZMOQUAT_LIB "lib/imguizmoquat.a")
     endif()

     if(WIN32)


Update Android toolchain

Update Android toolchain

Set CMAKE_ANDROID_API

Added the directories of ANDROID_STL_INCLUDE_DIRS to ANDROID_CXX_FLAGS,
which means CMAKE_{C,CXX}_FLAGS will be updated to contain them.

Replaced tabs with 2 spaces

--- os/android.toolchain.cmake
+++ os/android.toolchain.cmake
@@ -1067,7 +1067,7 @@
    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" )
   endif()
   set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" "${__libstl}/include/backward" )
-	set( ANDROID_STL_LIB_DIR "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}")
+  set( ANDROID_STL_LIB_DIR "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}")
   if( EXISTS "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
    set( __libstl                "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
   else()
@@ -1421,7 +1421,7 @@
 endif()

 if( ANDROID_STL STREQUAL "gnustl_static" )
-	set(ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -L${ANDROID_STL_LIB_DIR} -lgnustl_static")
+  set(ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -L${ANDROID_STL_LIB_DIR} -lgnustl_static")
 endif()

 if( ANDROID_COMPILER_IS_CLANG )
@@ -1430,6 +1430,10 @@
   set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" )
  endif()
 endif()
+
+foreach(x ${ANDROID_STL_INCLUDE_DIRS})
+  set(ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -I${x}")
+endforeach(x)

 # cache flags
 set( CMAKE_CXX_FLAGS           ""                        CACHE STRING "c++ flags" )
@@ -1447,6 +1451,8 @@
 set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE}" CACHE INTERNAL "Android specific c/c++ Release flags" )
 set( ANDROID_CXX_FLAGS_DEBUG   "${ANDROID_CXX_FLAGS_DEBUG}"   CACHE INTERNAL "Android specific c/c++ Debug flags" )
 set( ANDROID_LINKER_FLAGS      "${ANDROID_LINKER_FLAGS}"      CACHE INTERNAL "Android specific c/c++ linker flags" )
+
+set( CMAKE_ANDROID_API         "${ANDROID_API_LEVEL}"         CACHE INTERNAL "Android API Level")

 # finish flags
 set( CMAKE_CXX_FLAGS           "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" )


updated os/android.toolchain.cmake

updated os/android.toolchain.cmake

--- os/android.toolchain.cmake
+++ os/android.toolchain.cmake
@@ -29,7 +29,7 @@
 # POSSIBILITY OF SUCH DAMAGE.

 # ------------------------------------------------------------------------------
-#  Android CMake toolchain file, for use with the Android NDK r5-r10d
+#  Android CMake toolchain file, for use with the Android NDK r5-r11c
 #  Requires cmake 2.6.3 or newer (2.8.9 or newer is recommended).
 #  See home page: https://github.com/taka-no-me/android-cmake
 #
@@ -218,7 +218,7 @@
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

 # NDK search paths
-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r11c -r11b -r11 -r10e -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -1683,7 +1683,7 @@
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : from r5 to r10d; set only for NDK
+#   ANDROID_NDK_RELEASE : from r5 to r11c; set only for NDK
 #   ANDROID_NDK_RELEASE_NUM : numeric ANDROID_NDK_RELEASE version (1000*major+minor)
 #   ANDROID_ARCH_NAME : "arm", "x86", "mips", "arm64", "x86_64", "mips64" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot


so new style scripts require a manual loop for Continuous builds

--- VCTest.cmake
+++ VCTest.cmake
@@ -4,21 +4,29 @@
 Set(CTEST_BUILD_NAME $ENV{LABEL})
 Set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 Set(CTEST_PROJECT_NAME "VC")
-Set(CTEST_CONTINUOUS_DURATION 1080)
-Set(CTEST_CONTINUOUS_MINIMUM_INTERVAL 20)
 Set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)

 Set(CTEST_CONFIGURE_COMMAND "${CMAKE_EXECUTABLE_NAME} ${CTEST_SOURCE_DIRECTORY} -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=TRUE -DBUILD_EXAMPLES=TRUE")
 Set(BUILD_COMMAND "make")
 Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}")

-#If($ENV{ctest_model} MATCHES Nightly)
-  CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
-#EndIf($ENV{ctest_model} MATCHES Nightly)
-
-CTEST_START ($ENV{ctest_model})
-CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
-CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
-CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
-CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}")
-CTEST_SUBMIT ()
+if($ENV{ctest_model} STREQUAL "Continuous")
+   while(${CTEST_ELAPSED_TIME} LESS 64800)
+      set(START_TIME ${CTEST_ELAPSED_TIME})
+      CTEST_START (Continuous)
+      CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+      CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+      CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
+      CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}")
+      CTEST_SUBMIT ()
+      ctest_sleep(${START_TIME} 1200 ${CTEST_ELAPSED_TIME})
+   endwhile()
+else($ENV{ctest_model} STREQUAL "Continuous")
+   CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+   CTEST_START ($ENV{ctest_model})
+   CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+   CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+   CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
+   CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}")
+   CTEST_SUBMIT ()
+endif($ENV{ctest_model} STREQUAL "Continuous")


Install the storage engine plugins

Install the storage engine plugins

--- storage/mysql_storage_engine.cmake
+++ storage/mysql_storage_engine.cmake
@@ -38,6 +38,8 @@
     IF(${engine}_LIBS)
       TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS})
     ENDIF(${engine}_LIBS)
+    # Install the plugin
+    INSTALL(TARGETS ${dyn_libname} DESTINATION lib/plugin COMPONENT runtime)
     MESSAGE("build ${engine} as DLL")
   ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
 ENDIF(NOT SOURCE_SUBLIBS)


Fix cross-compiling between i686 and x86_64 when building SHARED lib. Credits goes to alexrass.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -261,9 +261,11 @@
             if (URHO3D_64BIT)
                 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
                 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
+                set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m64")
             else ()
                 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
                 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
+                set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
                 if (URHO3D_SSE)
                     if (NOT WIN32)
                         set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse")


STYLE: remove debug messages

STYLE: remove debug messages

--- DTIAtlasFiberAnalyzer.cmake
+++ DTIAtlasFiberAnalyzer.cmake
@@ -51,9 +51,6 @@
   set( LIBRARY_DESTINATION lib )
   set( RUNTIME_DESTINATION bin )
 endif()
-message(WARNING ${ARCHIVE_DESTINATION} )
-message(WARNING ${LIBRARY_DESTINATION} )
-message(WARNING ${RUNTIME_DESTINATION} )

 if( WIN32 )
   set( fileextension ".exe" )


Fixing cmake errors when external repos unavailable


Split off 8.0.68

Split off 8.0.68

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 67 )
+set ( HPCC_POINT 69 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[axl] rollback version to 5.9

[axl] rollback version to 5.9


Split off 7.10.26

Split off 7.10.26

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 25 )
+set ( HPCC_POINT 27 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Bump GAPID version to v1.0.0

Bump GAPID version to v1.0.0

--- version.cmake
+++ version.cmake
@@ -14,9 +14,9 @@

 # True source of GAPID versions.
 # Increment these numbers immediately after releasing a new version.
-set(GAPID_VERSION_MAJOR 0)
-set(GAPID_VERSION_MINOR 9)
-set(GAPID_VERSION_POINT 7)
+set(GAPID_VERSION_MAJOR 1)
+set(GAPID_VERSION_MINOR 0)
+set(GAPID_VERSION_POINT 0)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


Split off 8.6.10

Split off 8.6.10

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 6 )
-set ( HPCC_POINT 9 )
+set ( HPCC_POINT 11 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###