Remove the astc-encoder cmake compiler work-arounds.

--- third_party/astc-encoder.cmake
+++ third_party/astc-encoder.cmake
@@ -28,14 +28,5 @@

 if(NOT DISABLED_CXX)
     add_library(astc-encoder ${sources})
-
-    if(WIN32)
-        target_compile_options(astc-encoder PRIVATE "-Wno-narrowing"
-            "-D__NO_INLINE__"                     # Avoids a lvalue compile error
-            "-D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"   # Avoids redefinition compile error
-        )
-    else()
-        target_compile_options(astc-encoder PRIVATE "-Wno-c++11-narrowing")
-    endif()
     target_include_directories(astc-encoder PUBLIC "${astc-encoder_gen}")
 endif()


Add Python 3.6 and 3.7 to the version list

Python 3.6 and 3.7 have been released.

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

Patch from Christian Biesinger <cbiesinger@google.com>!

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

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -88,7 +88,7 @@
   include(LLVMDistributionSupport)

   if (PYTHON_EXECUTABLE STREQUAL "")
-    set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)
+    set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)
     include(FindPythonInterp)
     if( NOT PYTHONINTERP_FOUND )
       message(FATAL_ERROR


added printing showing build flags

added printing showing build flags

--- cmake/oskar_compiler_options.cmake
+++ cmake/oskar_compiler_options.cmake
@@ -157,6 +157,33 @@
     add_definitions(-DCUDA_ARCH=${CUDA_ARCH})
 endif (CUDA_FOUND)

+set(VERBOSE ON)
+
+if (VERBOSE)
+    message(STATUS "")
+    message(STATUS "Compliler:")
+    message(STATUS "  Build Type: ${CMAKE_BUILD_TYPE}")
+    message(STATUS "")
+    message(STATUS "  C++ flags:")
+    message(STATUS "    all: ${CMAKE_CXX_FLAGS}")
+    message(STATUS "    Release: ${CMAKE_CXX_FLAGS_RELEASE}")
+    message(STATUS "    RelWithDebInfo: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+    message(STATUS "    debug: ${CMAKE_CXX_FLAGS_DEBUG}")
+    message(STATUS "")
+    message(STATUS "  C flags:")
+    message(STATUS "    all: ${CMAKE_C_FLAGS}")
+    message(STATUS "    Release: ${CMAKE_C_FLAGS_RELEASE}")
+    message(STATUS "    RelWithDebInfo: ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+    message(STATUS "    debug: ${CMAKE_C_FLAGS_DEBUG}")
+    message(STATUS "")
+    message(STATUS "  CUDA:")
+    message(STATUS "    all: ${CUDA_NVCC_FLAGS}")
+    message(STATUS "    Release: ${CUDA_NVCC_FLAGS_RELEASE}")
+    message(STATUS "    RelWithDebInfo: ${CUDA_NVCC_FLAGS_RELWITHDEBINFO}")
+    message(STATUS "    debug: ${CUDA_NVCCC_FLAGS_DEBUG}")
+    message(STATUS "")
+endif (VERBOSE)
+

 # Set MATLAB mex function compiler flags.
 # ------------------------------------------------------------------------------


refs #4871 generate a different build name for coverage tests so they don't clobber the debug runs

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

--- cmake_modules/TokuSetupCTest.cmake
+++ cmake_modules/TokuSetupCTest.cmake
@@ -110,8 +110,13 @@

 ## construct SITE, seems to have to happen before include(CTest)
 set(SITE "${user}@${host}")
+if (USE_GCOV)
+  set(buildname_build_type "Coverage")
+else (USE_GCOV)
+  set(buildname_build_type "${CMAKE_BUILD_TYPE}")
+endif (USE_GCOV)
 ## construct BUILDNAME, seems to have to happen before include(CTest)
-set(BUILDNAME "${branchname} ${CMAKE_BUILD_TYPE} ${CMAKE_SYSTEM} ${machine_type} ${CMAKE_CXX_COMPILER_ID} ${real_cxx_compiler} ${CMAKE_CXX_COMPILER_VERSION}" CACHE STRING "CTest build name" FORCE)
+set(BUILDNAME "${branchname} ${buildname_build_type} ${CMAKE_SYSTEM} ${machine_type} ${CMAKE_CXX_COMPILER_ID} ${real_cxx_compiler} ${CMAKE_CXX_COMPILER_VERSION}" CACHE STRING "CTest build name" FORCE)

 include(CTest)


ilastik.cmake: Updated git tag to checkout.

--- ilastik.cmake
+++ ilastik.cmake
@@ -27,7 +27,7 @@
 include (greenlet)

 external_git_repo (ilastik
-    flyem-20130131
+    flyem-20130206B
     http://github.com/janelia-flyem/flyem-ilastik)

 message ("Installing ${ilastik_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")


Fix intelmpi oversubscription on circle

Fix intelmpi oversubscription on circle

--- scripts/circle/circle_el7-intel18-impi.cmake
+++ scripts/circle/circle_el7-intel18-impi.cmake
@@ -30,6 +30,9 @@
 find_program(MPI_CXX_COMPILER mpiicpc)
 find_program(MPI_Fortran_COMPILER mpiifort)

+# Allow oversubscription for IntelMPI to prevent timeouts on circleci
+set(ENV{I_MPI_WAIT_MODE} "enable")
+
 set(dashboard_cache "
 ADIOS2_USE_ADIOS1:STRING=ON
 ADIOS2_USE_BZip2:STRING=ON


Droped the `FindCUDAAPIWrappers.cmake` module: It is irrelevant to modern CMake usage; one should just use `find_package(cuda-api-wrappers)` after installation, and make sure the install location is visible in one of the `CMAKE_MODULE_PATH` directories.

--- cmake/Modules/FindCUDAAPIWrappers.cmake
+++ cmake/Modules/FindCUDAAPIWrappers.cmake
@@ -1,68 +0,0 @@
-# Find the Modern C++ API wrappers for the CUDA runtime API
-#
-# The following variables are set if the library is found.
-#
-#	CUDA_API_WRAPPERS_FOUND
-#       True when both the include files and the libraries were found
-#
-#	CUDA_API_WRAPPERS_INCLUDE_DIR
-#       The path to where the CUB include files are the path which should
-#       be added to a project's include directories to use the API wrappers
-#
-#	CUDA_API_WRAPPERS_LIB
-#       The (static) library file to be linked when using the non-header-only
-#       parts of the CUDA API wrappers
-
-find_package(PkgConfig) # will this even help us at all?
-
-find_path(
-	CUDA_API_WRAPPERS_INCLUDE_DIR
-	cuda/api_wrappers.hpp
-	HINTS
-		${CUDA_INCLUDE_DIRS}
-		${CMAKE_CURRENT_SOURCE_DIR}/cuda-api-wrappers
-		${CMAKE_SOURCE_DIR}
-		${PROJECT_SOURCE_DIR}
-		/opt
-		/opt/cuda-api-wrappers
-		$ENV{HOME}/opt
-		${CMAKE_PREFIX_PATH}/cuda-api-wrappers/lib
-		ENV CUDA_API_WRAPPERS_DIR
-		ENV CUDA_API_WRAPPERS_INCLUDE_DIR
-		ENV CUDA_API_WRAPPERS_PATH
-	DOC "CUDA Modern C++ API wrappers - include directory"
-	PATH_SUFFIXES include src
-)
-mark_as_advanced(CUDA_API_WRAPPERS_INCLUDE_DIR)
-
-find_library(
-	CUDA_API_WRAPPERS_LIB
-	HINTS
-		${CMAKE_CURRENT_SOURCE_DIR}/cuda-api-wrappers/lib
-		${CMAKE_SOURCE_DIR}
-		${PROJECT_SOURCE_DIR}
-		ENV CUDA_API_WRAPPERS_DIR
-		ENV CUDA_API_WRAPPERS_LIBRARY_DIR
-		ENV CUDA_API_WRAPPERS_INCLUDE_DIR
-	NAMES cuda-api-wrappers libcuda-api-wrappers
-	PATH_SUFFIXES lib
-	DOC "CUDA Modern C++ API wrappers - library"
-	NO_DEFAULT_PATH
-)
-mark_as_advanced(CUDA_API_WRAPPERS_LIB)
-
-# handles the QUIETLY and REQUIRED arguments and sets the find variable to TRUE
-# if all of the requirement variables are TRUE. This library is not versioned,
-# so we'll not have a version check.
-find_package_handle_standard_args(CUDAAPIWrappers
-	FOUND_VAR     CUDAAPIWrappers_FOUND
-	REQUIRED_VARS CUDA_API_WRAPPERS_INCLUDE_DIR CUDA_API_WRAPPERS_LIB
-)
-
-# We don't have any dependent include dirs, so what we want the user code to use is just
-# our own directory
-set(CUDA_API_WRAPPERS_INCLUDE_DIRS ${CUDA_API_WRAPPERS_INCLUDE_DIR})
-# We don't have any dependent libraries, so what we want to user code to use is just
-# our own library
-set(CUDA_API_WRAPPERS_LIBS "${CUDA_API_WRAPPERS_LIB}")
-


cmake: force GCC to emit DWARF version 4

GCC 11 defaults to output DWARF version 5 which pyelftools cannot
currently parse. So keep output at version 4 for the time being.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/compiler/gcc/compiler_flags.cmake
+++ cmake/compiler/gcc/compiler_flags.cmake
@@ -167,6 +167,10 @@
 # Flag to enable debugging
 set_compiler_property(PROPERTY debug -g)

+# GCC 11 by default emits DWARF version 5 which cannot be parsed by
+# pyelftools. Can be removed once pyelftools supports v5.
+check_set_compiler_property(APPEND PROPERTY debug -gdwarf-4)
+
 set_compiler_property(PROPERTY no_common -fno-common)

 # GCC compiler flags for imacros. The specific header must be appended by user.


hunter_status_debug: print timestamp

hunter_status_debug: print timestamp

--- cmake/modules/hunter_status_debug.cmake
+++ cmake/modules/hunter_status_debug.cmake
@@ -4,7 +4,8 @@
 function(hunter_status_debug)
   foreach(print_message ${ARGV})
     if(HUNTER_STATUS_DEBUG)
-      message(STATUS "[hunter *** DEBUG ***] ${print_message}")
+      string(TIMESTAMP timestamp)
+      message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}")
     endif()
   endforeach()
 endfunction()


bootstrap.cmake version 4

bootstrap.cmake version 4

enable cross compiling with qibuild based ctc

--- cmake/qibuild/templates/bootstrap.cmake
+++ cmake/qibuild/templates/bootstrap.cmake
@@ -8,22 +8,31 @@
 # This file is part of the T001CHAIN project  #
 ###############################################

-set(BOOTSTRAP_VERSION 3)
+set(BOOTSTRAP_VERSION 4)
+
+# Function to use qibuild from a old toc project
+function(use_qibuild)
+  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qibuild.cmake)
+    include(${CMAKE_CURRENT_SOURCE_DIR}/qibuild.cmake)
+
+    set(NO_WARN_DEPRECATED TRUE PARENT_SCOPE)
+    include(qibuild/compat/compat)
+  endif()
+endfunction()

 if (CMAKE_TOOLCHAIN_FILE)
   # a toolchain which defines TOOLCHAIN_DIR -> toc
   if(TOOLCHAIN_DIR)
-    set(T001CHAIN_DIR ${TOOLCHAIN_DIR} CACHE PATH "" FORCE)
-    include("${T001CHAIN_DIR}/cmake/general.cmake")
-    return()
+    # toc --cross -> qibuild (ctc uses qibuild now)
+    if(OE_CROSS_DIR)
+      use_qibuild()
+      return()
+    else()
+      set(T001CHAIN_DIR ${TOOLCHAIN_DIR} CACHE PATH "" FORCE)
+      include("${T001CHAIN_DIR}/cmake/general.cmake")
+      return()
+    endif()
   endif()
 endif()

-# else, simply includes qibuild.cmake if it is there:
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qibuild.cmake)
-  include(${CMAKE_CURRENT_SOURCE_DIR}/qibuild.cmake)
-
-  # plus a few stuff:
-  set(NO_WARN_DEPRECATED TRUE)
-  include(qibuild/compat/compat)
-endif()
+use_qibuild()


use enable_testing() insted of CTest module (#153)

use enable_testing() instead of CTest module

--- ament_cmake_test/ament_cmake_test-extras.cmake
+++ ament_cmake_test/ament_cmake_test-extras.cmake
@@ -14,7 +14,9 @@

 # copied from ament_cmake_test/ament_cmake_test-extras.cmake

-include(CTest)
+enable_testing()
+# same option as in the CTest module
+option(BUILD_TESTING "Build the testing tree." ON)

 # option()
 set(
@@ -24,9 +26,14 @@

 if(BUILD_TESTING)
   # configure ctest not to truncate the dashboard summary
-  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest"
+  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
     "set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0)\n"
     "set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0)\n")
+  # create dart configuration from template
+  site_name(SITE)
+  configure_file(
+    ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
+    ${PROJECT_BINARY_DIR}/CTestConfiguration.ini )
 endif()

 find_package(ament_cmake_core QUIET REQUIRED)


CMake: Silence warning w654 with icc: "overloaded virtual function is only partially overriden" - I assume this is intended...

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

--- deal.II/cmake/setup_compiler_flags_intel.cmake
+++ deal.II/cmake/setup_compiler_flags_intel.cmake
@@ -91,6 +91,7 @@
 #           references; however, it's the only useful way to do
 #           so if you need an invalid value for a reference)
 #   -w383  value copied to temporary, reference to temporary used
+#   -w654  overloaded virtual function is only partially overriden
 #   -w981  operands are evaluated in unspecified order
 #   -w1418 external function definition with no prior declaration
 #          (happens in boost)
@@ -110,6 +111,7 @@
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd279")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd327")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd383")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd654")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd981")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd1418")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd1478")


Disable C++ extensions by default.

Disable C++ extensions by default.

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -54,9 +54,13 @@
     set(CMAKE_BUILD_TYPE "Debug")
 endif (COVERAGE AND NOT MSVC)

-if (NOT CMAKE_CXX_STANDARD AND C++11)
+if (CMAKE_CXX_STANDARD)
+    set(CMAKE_CXX_EXTENSIONS OFF)
+elseif (C++11)
     find_package(CXX11 REQUIRED)
     set(CPPUTEST_CXX_FLAGS "${CPPUTEST_CXX_FLAGS} ${CXX11_FLAGS}")
+else()
+    # No standard specified
 endif ()

 set(GMOCK_HOME $ENV{GMOCK_HOME})


boards: olimexino_stm32: Use standard openocd.board.cmake

olimexino_stm32 was not getting the flash base address from the Kconfig
variable.  Since the board uses DTS that will get set, so we can use the
standard openocd.board.cmake.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- boards/arm/olimexino_stm32/board.cmake
+++ boards/arm/olimexino_stm32/board.cmake
@@ -1,12 +1 @@
-set(FLASH_SCRIPT openocd.sh)
-set(DEBUG_SCRIPT openocd.sh)
-
-set(FLASH_BASE_ADDRESS 0x08000000)
-
-set(OPENOCD_LOAD_CMD "flash write_image erase ${PROJECT_BINARY_DIR}/${KERNEL_BIN_NAME} ${FLASH_BASE_ADDRESS}")
-set(OPENOCD_VERIFY_CMD "verify_image          ${PROJECT_BINARY_DIR}/${KERNEL_BIN_NAME} ${FLASH_BASE_ADDRESS}")
-
-set_property(GLOBAL APPEND PROPERTY FLASH_SCRIPT_ENV_VARS
-  OPENOCD_LOAD_CMD
-  OPENOCD_VERIFY_CMD
-  )
+include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)


Add support tizen i586/x86_64 (#109)

Add support tizen i586/x86_64 (#109)

libtuv-DCO-1.0-Signed-off-by: Haesik Jun haesik.jun@samsung.com

--- cmake/option/option_noarch-tizen.cmake
+++ cmake/option/option_noarch-tizen.cmake
@@ -24,6 +24,7 @@
           "-mfloat-abi=softfp"
           "-mfpu=neon-vfpv4"
           )
+  elseif(${TARGET_BOARD} STREQUAL "None")
   else()
     message(FATAL_ERROR "TARGET_BOARD=`${TARGET_BOARD}` is unknown to make")
   endif()


[Config] Fixed the delivery directory of Python modules and libraries

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -497,7 +497,7 @@

     # Set the Python installation directory
     set (INSTALL_PY_LIB_DIR
-      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
       CACHE PATH "Installation directory for Python libraries")

     # Update the list of include directories for the project
@@ -1461,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


[Build][Doc] Factorised the CMake-related helpers for the documentation (HTML, PDF and manual pages).

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1127,11 +1127,227 @@
 ###################################################################
 ##                         Documentation                         ##
 ###################################################################
+##
+# HTML pages and PDF reference manual
+##
+#
 macro (handle_html_doc)
   if (${INSTALL_DOC} STREQUAL "ON")
 	add_subdirectory (doc)
   endif (${INSTALL_DOC} STREQUAL "ON")
 endmacro (handle_html_doc)
+
+# Define the substitutes for the variables present in the Doxygen
+# configuration files. Note that PACKAGE, PACKAGE_NAME and PACKAGE_VERSION
+# are defined in the main CMakeLists.txt (of the top root directory).
+macro (doc_set_directories)
+  set (OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+  set (top_srcdir ${CMAKE_SOURCE_DIR})
+  set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+endmacro (doc_set_directories)
+
+#
+macro (doc_add_web_pages)
+  # Set the documentation directories for the Doxygen configuration file
+  doc_set_directories()
+
+  # Convert the Doxygen configuration files (basically, just replace
+  # the @<variable>@ variables).
+  set (DOXYGEN_CFG_SRC doxygen_html.cfg.in)
+  set (DOXYGEN_CFG ${CMAKE_CURRENT_BINARY_DIR}/doxygen_html.cfg)
+  configure_file (${DOXYGEN_CFG_SRC} ${DOXYGEN_CFG} @ONLY)
+
+  ## Documentation sources
+  # (CSS) Style sheets
+  set (docstyles_DIR ${CMAKE_CURRENT_SOURCE_DIR}/styles)
+  set (style_SOURCES ${CPACK_PACKAGE_NAME}.css)
+  set (docstyles_SOURCES ${docstyles_DIR}/${style_SOURCES})
+  # Images
+  set (docimages_DIR ${CMAKE_CURRENT_SOURCE_DIR}/images)
+  set (image_SOURCES ${CPACK_PACKAGE_NAME}_logo.png sfx_logo.png favicon.ico)
+  set (docimages_SOURCES "")
+  foreach (_doc_img_src ${image_SOURCES})
+	list (APPEND docimages_SOURCES ${docimages_DIR}/${_doc_img_src})
+  endforeach (_doc_img_src ${image_SOURCES})
+  # Tutorial
+  FILE (GLOB doctutorial_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tutorial/*.doc)
+  # Local
+  FILE (GLOB doclocaldoc_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/local/*.doc)
+  FILE (GLOB doclocalhtml_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/local/*.html)
+  set (doclocal_SOURCES ${doclocaldoc_SOURCES} ${doclocalhtml_SOURCES})
+  # Aggregating all the documentation sources
+  set (doc_SOURCES ${doctutorial_SOURCES} ${doclocal_SOURCES}
+	${docstyles_SOURCES} ${docimages_SOURCES})
+
+  # Latex reference manual source (.tex file), generated by Doxygen
+  set (REFMAN refman)
+  set (TEX_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/latex)
+  set (REFMAN_TEX ${REFMAN}.tex)
+  set (REFMAN_TEX_FULL ${TEX_GEN_DIR}/${REFMAN_TEX})
+
+  # Add the build rule for Doxygen
+  set (DOXYGEN_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
+  add_custom_command (OUTPUT ${DOXYGEN_OUTPUT} ${REFMAN_TEX_FULL}
+	COMMAND ${DOXYGEN_EXECUTABLE} ARGS ${DOXYGEN_CFG}
+	DEPENDS ${DOXYGEN_CFG} ${doc_SOURCES}
+	COMMENT "Generating documentation with Doxygen, from '${DOXYGEN_CFG}'...")
+  # Add the 'doc' target, depending on the generated HTML documentation
+  add_custom_target (doc ALL DEPENDS ${DOXYGEN_OUTPUT})
+
+  ##
+  # Copy the needed files into the generated HTML directory
+  set (htmldoc_DIR ${CMAKE_CURRENT_BINARY_DIR}/html)
+  set (pdfdoc_DIR ${CMAKE_CURRENT_BINARY_DIR}/latex)
+
+  # (CSS) Style sheets
+  foreach (style_SRC ${style_SOURCES})
+	set (CSS_SRC_FULL_DIR ${docstyles_DIR}/${style_SRC})
+	set (CSS_GEN_FULL_DIR ${htmldoc_DIR}/${style_SRC})
+	add_custom_command (OUTPUT ${CSS_GEN_FULL_DIR}
+	  COMMAND ${CMAKE_COMMAND}
+	  ARGS -E copy ${CSS_SRC_FULL_DIR} ${CSS_GEN_FULL_DIR}
+	  DEPENDS ${DOXYGEN_OUTPUT} ${CSS_SRC_FULL_DIR}
+	  COMMENT "Copying style '${CSS_SRC_FULL_DIR}' into '${htmldoc_DIR}'...")
+	add_custom_target (css_${style_SRC} ALL DEPENDS ${CSS_GEN_FULL_DIR})
+  endforeach (style_SRC)
+
+  # Images
+  foreach (image_SRC ${image_SOURCES})
+	set (IMG_SRC_FULL_DIR ${docimages_DIR}/${image_SRC})
+	set (IMG_GEN_FULL_DIR ${htmldoc_DIR}/${image_SRC})
+	add_custom_command (OUTPUT ${IMG_GEN_FULL_DIR}
+	  COMMAND ${CMAKE_COMMAND}
+	  ARGS -E copy ${IMG_SRC_FULL_DIR} ${IMG_GEN_FULL_DIR}
+	  DEPENDS ${DOXYGEN_OUTPUT} ${IMG_SRC_FULL_DIR}
+	  COMMENT "Copying image '${IMG_SRC_FULL_DIR}' into '${htmldoc_DIR}'...")
+	add_custom_target (img_${image_SRC} ALL DEPENDS ${IMG_GEN_FULL_DIR})
+  endforeach (image_SRC)
+
+  ##
+  # PDF, generated by (Pdf)Latex from the Latex source file, itself generated
+  # by Doxygen (see above)
+  set (REFMAN_IDX ${REFMAN}.idx)
+  set (REFMAN_IDX_FULL ${TEX_GEN_DIR}/${REFMAN_IDX})
+  set (REFMAN_PDF ${REFMAN}.pdf)
+  set (REFMAN_PDF_FULL ${TEX_GEN_DIR}/${REFMAN_PDF})
+  # Note the "|| echo" addition to the pdflatex command, as that latter returns
+  # as if there were an error.
+  add_custom_command (OUTPUT ${REFMAN_IDX_FULL} ${REFMAN_PDF_FULL}
+	DEPENDS ${DOXYGEN_OUTPUT} ${REFMAN_TEX_FULL}
+	COMMAND ${CMAKE_COMMAND}
+	ARGS -E chdir ${TEX_GEN_DIR} pdflatex -interaction batchmode ${REFMAN_TEX} || echo "First PDF generation done."
+	COMMAND ${CMAKE_COMMAND}
+	ARGS -E chdir ${TEX_GEN_DIR} makeindex -q ${REFMAN_IDX}
+	COMMAND ${CMAKE_COMMAND}
+	ARGS -E chdir ${TEX_GEN_DIR} pdflatex -interaction batchmode ${REFMAN_TEX} || echo "Second PDF generation done."
+	COMMENT "Generating PDF Reference Manual ('${REFMAN_PDF}')..."
+	COMMAND ${CMAKE_COMMAND}
+	ARGS -E chdir ${TEX_GEN_DIR} test -f ${REFMAN_PDF} || echo "Warning: the PDF reference manual \\\('${REFMAN_PDF_FULL}'\\\) has failed to build. You can perform a simple re-build \\\('make' in the 'doc/latex' sub-directory\\\)."
+	COMMENT "Checking whether the PDF Reference Manual ('${REFMAN_PDF}') has been built...")
+  # Add the 'pdf' target, depending on the generated PDF manual
+  add_custom_target (pdf ALL DEPENDS ${REFMAN_PDF_FULL})
+
+  # Clean-up $build/html and $build/latex on 'make clean'
+  set_property (DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
+	${htmldoc_DIR} ${pdfdoc_DIR})
+
+  ##
+  # Installation of the HTML documentation
+  set (DOC_PATH share/doc/${PROJECT_NAME}-${CPACK_PACKAGE_VERSION})
+  # HTML pages
+  install (DIRECTORY ${htmldoc_DIR} DESTINATION ${DOC_PATH})
+  # PDF reference manual
+  # Note: the 'OPTIONAL' ensures that even when the PDF file fails to be
+  # generated, the install process does not complain. If the PDF build fails,
+  # a simple re-build ('make' in the 'doc/latex' sub-directory) is usually
+  # enough.
+  install (FILES ${REFMAN_PDF_FULL} DESTINATION ${DOC_PATH}/html OPTIONAL)
+endmacro (doc_add_web_pages)
+
+##
+# Manual pages
+##
+macro (doc_add_man_pages)
+  # Specify the relative path where the manual pages are to be installed.
+  # That path is relative to the installation prefix. By default, the prefix
+  # is '/usr', and the manual page installation directory is therefore
+  # /usr/share/man
+  set (MAN_PATH "share/man")
+
+  # Specify the list of manual sections, e.g.:
+  #  * Section 1 (general commands)
+  #  * Section 3 (development)
+  set (man_section_list 1 2 3 4 5 6 7 8 9)
+
+  # Initialise the lists gathering information for each valid manual section
+  set (man_doxy_output_list "")
+  set (man_dir_list "")
+
+  # Parse the arguments
+  set (options "")
+  set (oneValueArgs "")
+
+  # Added one argument option for every manual section
+  foreach (man_sect ${man_section_list})
+	list (APPEND multiValueArgs MAN${man_sect})
+  endforeach (man_sect ${man_section_list})
+
+  cmake_parse_arguments (_man_arg "${options}" "${oneValueArgs}"
+	"${multiValueArgs}" ${ARGN})
+
+  # Set the documentation directories for the Doxygen configuration file
+  doc_set_directories()
+
+  # Browse all the manual sections
+  foreach (man_sect ${man_section_list})
+	# If the (current) macro was passed arguments for the current manual
+	# section, process the generation of manual pages (with Doxygen).
+	if (NOT "${_man_arg_MAN${man_sect}}" STREQUAL "")
+
+	  # Specify in which sub-directory the manual pages are to be found
+	  set (man${man_sect}_DIR ${CMAKE_CURRENT_BINARY_DIR}/man${man_sect})
+	  # Add that sub-directory to the dedicated list
+	  list (APPEND man_dir_list ${man${man_sect}_DIR})
+
+	  # Convert the Doxygen configuration files (basically, just replace
+	  # the @<variable>@ variables).
+	  set (man_doxy_cfg doxygen_man${man_sect}.cfg)
+	  set (DOXYGEN_CFG${man_sect}_SRC ${man_doxy_cfg}.in)
+	  set (DOXYGEN_CFG${man_sect} ${CMAKE_CURRENT_BINARY_DIR}/${man_doxy_cfg})
+	  configure_file (${DOXYGEN_CFG${man_sect}_SRC}
+		${DOXYGEN_CFG${man_sect}} @ONLY)
+
+	  # Manual page sources for the current manual section
+	  foreach (_doc_src ${_man_arg_MAN${man_sect}})
+		list (APPEND man${man_sect}_SOURCES ${_doc_src}.doc)
+	  endforeach (_doc_src ${_man_arg_MAN${man_sect}})
+
+	  # Add the build rule for Doxygen for section 1 manual pages
+	  set (DOXYGEN_OUTPUT${man_sect}
+		${man${man_sect}_DIR}/stdair-config.${man_sect})
+	  add_custom_command (OUTPUT ${DOXYGEN_OUTPUT${man_sect}}
+		COMMAND ${DOXYGEN_EXECUTABLE} ARGS ${DOXYGEN_CFG${man_sect}}
+		DEPENDS ${DOXYGEN_CFG${man_sect}} ${man${man_sect}_SOURCES}
+		COMMENT "Generating section ${man_sect} manual pages with Doxygen, from '${DOXYGEN_CFG${man_sect}}'...")
+
+	  # Add the current manual section output to the dedicated list,
+	  # so that it can then be added to the corresponding target (see below).
+	  list (APPEND man_doxy_output_list ${DOXYGEN_OUTPUT${man_sect}})
+
+	  # Specifiy what to do for the installation of the manual pages
+	  install (DIRECTORY "${man${man_sect}_DIR}" DESTINATION ${MAN_PATH})
+
+	endif (NOT "${_man_arg_MAN${man_sect}}" STREQUAL "")
+  endforeach (man_sect ${man_section_list})
+
+  # Add the 'man' target, depending on the generated manual page documentation
+  add_custom_target (man ALL DEPENDS ${man_doxy_output_list})
+
+  # Clean-up $build/man1 and $build/man3 on 'make clean'
+  set_property (DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
+	${man_dir_list})
+
+endmacro (doc_add_man_pages)

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


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


[Conf] More robust way to derive Boost.Python component

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -70,6 +70,8 @@
 #  * INSTALL_INCLUDE_DIR  - Installation directory for the header files
 #  * INSTALL_DATA_DIR     - Installation directory for the data files
 #  * INSTALL_SAMPLE_DIR   - Installation directory for the (CSV) sample files
+#  * NEED_PYTHON          - Whether Python libraries are needed
+#                           That paremeter is derived from the required libraries
 #  * RUN_GCOV             - Whether or not to perform code coverage
 #
 macro (set_project_options _build_doc _enable_tests _run_gcov)
@@ -106,6 +108,7 @@
   set (CSS_ALL_TARGETS)
   set (IMG_ALL_TARGETS)
   set (MAN_ALL_TARGETS)
+  set (NEED_PYTHON OFF)

   # Set the library installation directory (either 32 or 64 bits)
   set (LIBDIR "lib${LIB_SUFFIX}" CACHE PATH
@@ -335,6 +338,7 @@
     endif (${_arg_lower} STREQUAL "lcov")

     if (${_arg_lower} STREQUAL "python")
+      set (NEED_PYTHON ON)
       get_python (${_arg_version})
     endif (${_arg_lower} STREQUAL "python")

@@ -616,19 +620,37 @@
   #         On some platform/Boost version combinations, the Python version
   #         may be just the major version (2 or 3 as of 2020) or the major
   #         and minor versions (e.g., 27, 28, 34, 36, 37, 38, 39 as of 2020)
-  set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
-  set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
+  # Note 3: Boot.Python has is reuired only for Python extensions. It should
+  #         not be linked with other regular (non-Python) libraries/binaries,
+  #         as it pulls with it symbols from the Python interpreter, which are
+  #         available only when launched from a Python interpreter.
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
+  # Boost.Python - Depending on the platforms, the component name
+  # differs. We try all of them, and the find_package() will retrieve
+  # just one
+  if (NEED_PYTHON)
+    set (python_cpt_name0 "python")
+    #
+    if (Python3_VERSION_MAJOR)
+      set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
+    endif (Python3_VERSION_MAJOR)
+    #
+    if (Python3_VERSION_MINOR)
+      set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
+    endif (Python3_VERSION_MINOR)
+  endif (NEED_PYTHON)

   # Boost components for (non-Python) libraries
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system locale regex)

   # Boost components for Python extensions
-  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT
-	${python_cpt_name1} ${python_cpt_name2})
+  if (NEED_PYTHON)
+    set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT
+      ${python_cpt_name0} ${python_cpt_name1} ${python_cpt_name2})
+  endif (NEED_PYTHON)

   # Boost components for main (non-test) binaries
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
@@ -655,54 +677,61 @@
   find_package (BoostWrapper ${_required_version} REQUIRED)

   if (Boost_FOUND)
-    # Boost.Python library
-	if (${Boost_PYTHON3_FOUND})
-      message (STATUS "  + Boost_PYTHON3_FOUND: ${Boost_PYTHON3_FOUND}")
-	endif (${Boost_PYTHON3_FOUND})
-	#
-	if (${Boost_PYTHON38_FOUND})
-      message (STATUS "  + Boost_PYTHON38_FOUND: ${Boost_PYTHON38_FOUND}")
-	endif (${Boost_PYTHON38_FOUND})
-	#
-	if (${Boost_PYTHON_VERSION})
+
+    if (NEED_PYTHON)
+      # Boost has a single Python library, but its name depends on the
+      # distribution, it can be libboost_python3 or libboost_python3x
+      if (Boost_PYTHON_LIBRARY)
+	set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name0})
+	if (Python3_VERSION_MAJOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name1})
+	endif (Python3_VERSION_MAJOR)
+	if (Python3_VERSION_MINOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
+	endif (Python3_VERSION_MINOR)
+      endif (Boost_PYTHON_LIBRARY)
+
+      #
+      if (Boost_PYTHON${Python3_VERSION_MAJOR}_LIBRARY)
+	set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1})
+	list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name0})
+	if (Python3_VERSION_MINOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
+	endif (Python3_VERSION_MINOR)
+      endif (Boost_PYTHON${Python3_VERSION_MAJOR}_LIBRARY)
+
+      #
+      if (Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_LIBRARY)
+	set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name2})
+	list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name0})
+	if (Python3_VERSION_MAJOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name1})
+	endif (Python3_VERSION_MAJOR)
+      endif (Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_LIBRARY)
+
+      # Reporting
+      message (STATUS "  + Retained Boost Python component: ${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT}")
+
+      # Derive the Boost.Python component name (amoung Boost_PYTHON,
+      # Boost_PYTHON3, Boost_PYTHON3X)
+      string (TOUPPER ${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT} _python_cpt)
+
+      # Reporting
+      message (STATUS "  + Boost Python component: Boost_${_python_cpt}")
+
+      # Derive the Python version used by Boost.Python
+      if (${Boost_${_python_cpt}_LIBRARY} MATCHES "python([1-9])\\.?([0-9])?")
+	set (Boost_PYTHON_VERSION "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
+      endif (${Boost_${_python_cpt}_LIBRARY} MATCHES "python([1-9])\\.?([0-9])?")
+
+      # Reporting
       message (STATUS "  + Boost_PYTHON_VERSION: ${Boost_PYTHON_VERSION}")
-	endif (${Boost_PYTHON_VERSION})
-	#
-	if (${Boost_PYTHON_LIBRARY})
-      message (STATUS "  + Boost_PYTHON_LIBRARY: ${Boost_PYTHON_LIBRARY}")
-	endif (${Boost_PYTHON_LIBRARY})
-	#
-	if (${Boost_PYTHON3_LIBRARY})
-      message (STATUS "  + Boost_PYTHON3_LIBRARY: ${Boost_PYTHON3_LIBRARY}")
-	endif (${Boost_PYTHON3_LIBRARY})
-	#
-	if (${Boost_PYTHON36_LIBRARY})
-      message (STATUS "  + Boost_PYTHON36_LIBRARY: ${Boost_PYTHON36_LIBRARY}")
-	endif (${Boost_PYTHON36_LIBRARY})
-	#
-	if (${Boost_PYTHON37_LIBRARY})
-      message (STATUS "  + Boost_PYTHON37_LIBRARY: ${Boost_PYTHON37_LIBRARY}")
-	endif (${Boost_PYTHON37_LIBRARY})
-	#
-	if (${Boost_PYTHON38_LIBRARY})
-      message (STATUS "  + Boost_PYTHON38_LIBRARY: ${Boost_PYTHON38_LIBRARY}")
-	endif (${Boost_PYTHON38_LIBRARY})
-	#
-	if (${Boost_PYTHON39_LIBRARY})
-      message (STATUS "  + Boost_PYTHON39_LIBRARY: ${Boost_PYTHON39_LIBRARY}")
-	endif (${Boost_PYTHON39_LIBRARY})
-
-	# Boost has a single Python library, but its name depends on the
-	# distribution, it can be libboost_python3 or libboost_python3x
-	if (${Boost_PYTHON3_FOUND})
-	  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1})
-	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
-	endif (${Boost_PYTHON3_FOUND})
-
-	if (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})
-	  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name2})
-	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name1})
-	endif (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})
+
+      # Boost.Python library
+      if (Boost_${_python_cpt}_LIBRARY)
+	message (STATUS "  + Boost_${_python_cpt}_LIBRARY: ${Boost_${_python_cpt}_LIBRARY}")
+      endif (Boost_${_python_cpt}_LIBRARY)
+    endif (NEED_PYTHON)

     # Update the list of include directories for the project
     include_directories (${Boost_INCLUDE_DIRS})
@@ -715,8 +744,10 @@
       "${BOOST_REQUIRED_COMPONENTS_FOR_LIB}")

     # Update the list of Python library dependencies for the project
-    register_boost_lib ("PROJ_DEP_LIBS_FOR_PYEXT"
-      "${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT}")
+    if (NEED_PYTHON)
+      register_boost_lib ("PROJ_DEP_LIBS_FOR_PYEXT"
+	"${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT}")
+    endif (NEED_PYTHON)

     # Update the list of binary dependencies for the project
     register_boost_lib ("PROJ_DEP_LIBS_FOR_BIN"
@@ -772,22 +803,22 @@

   set (${_proto_srcs})
   foreach (FIL ${ARGN})
-	# Extract the file-path and the extension of the Protobuf specification file
+    # Extract the file-path and the extension of the Protobuf specification file
     get_filename_component (ABS_FIL ${FIL} ABSOLUTE)
     get_filename_component (FIL_WE ${FIL} NAME_WE)

-	# With Python, Protobuf adds "_pb2"
-	set (_proto_gen_src ${FIL_WE}_pb2.py)
-
-	message (STATUS
-	  "Adding ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src} to Python sources")
+    # With Python, Protobuf adds "_pb2"
+    set (_proto_gen_src ${FIL_WE}_pb2.py)
+
+    message (STATUS
+      "Adding ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src} to Python sources")

     list (APPEND ${_proto_srcs} "${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}")

-	# Add a specific command for the Protobuf stub/skeleton generation
+    # Add a specific command for the Protobuf stub/skeleton generation
     add_custom_command (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}"
       COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
-	  --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
+      --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
       DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
       COMMENT "Running Python protocol buffer compiler on ${FIL}, generating ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}"
       VERBATIM)
@@ -1852,10 +1883,10 @@
   endif (${_lib_short_name} STREQUAL ${MODULE_NAME})

   ##
-  # Python extension libraries hase some peculiarities
+  # Python extension libraries has some peculiarities
   if ("${_lib_prefix}" STREQUAL "py")
-	message (STATUS "${_lib_short_name} is assumed to be a Python library:")
-	message (STATUS "  -> Following libraries will be weakly linked: ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT}")
+    message (STATUS "${_lib_short_name} is assumed to be a Python library:")
+    message (STATUS "  -> Following libraries will be weakly linked: ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT}")

     # no 'lib' prefix
     set_target_properties (${_lib_target} PROPERTIES PREFIX "")
@@ -1863,34 +1894,34 @@
     # The suffix must be .so (even on MacOS, not .dylib)
     set_target_properties (${_lib_target} PROPERTIES SUFFIX ".so")

-	# Add the dependencies for Python extensions.
-	#
-	# Python extensions (which are also libraries per se) must not be linked
-	# against libpython3.x.so (which includes the interpreter). On Linux, it is
-	# fine not to link against libpython3.x.so, but on OS X, the compiler
-	# fails, unless the -undefined dynamic_lookup option is passed, which is
-	# what target_link_libraries_with_dynamic_lookup() is doing. That function
-	# is specified in the targetLinkLibrariesWithDynamicLookup.cmake file.
-	#
-	# See also:
-	#  https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/
-	#  https://github.com/scikit-build/scikit-build/blob/master/skbuild/resources/cmake/targetLinkLibrariesWithDynamicLookup.cmake
-	target_link_libraries_with_dynamic_lookup (${_lib_target}
-	  ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT})
-	#python_extension_module (${_lib_target})
+    # Add the dependencies for Python extensions.
+    #
+    # Python extensions (which are also libraries per se) must not be linked
+    # against libpython3.x.so (which includes the interpreter). On Linux, it is
+    # fine not to link against libpython3.x.so, but on OS X, the compiler
+    # fails, unless the -undefined dynamic_lookup option is passed, which is
+    # what target_link_libraries_with_dynamic_lookup() is doing. That function
+    # is specified in the targetLinkLibrariesWithDynamicLookup.cmake file.
+    #
+    # See also:
+    #  https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/
+    #  https://github.com/scikit-build/scikit-build/blob/master/skbuild/resources/cmake/targetLinkLibrariesWithDynamicLookup.cmake
+    target_link_libraries_with_dynamic_lookup (${_lib_target}
+      ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT})
+    #python_extension_module (${_lib_target})

   endif ("${_lib_prefix}" STREQUAL "py")

   ##
   # Library name (and soname)
   if (WIN32)
-	# MS Windows
+    # MS Windows
     set_target_properties (${_lib_target} PROPERTIES
       OUTPUT_NAME ${_lib_short_name}
       VERSION ${GENERIC_LIB_VERSION})

   else (WIN32)
-	# Linux and MacOS
+    # Linux and MacOS
     set_target_properties (${_lib_target} PROPERTIES
       OUTPUT_NAME ${_lib_short_name}
       VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
@@ -1907,15 +1938,15 @@
   ##
   # Installation of the library
   if ("${_lib_prefix}" STREQUAL "py")
-	# If the library is Python, install it into a dedicated directory
-	message (STATUS "${_lib_short_name} is assumed to be a Python library")
-	install (TARGETS ${_lib_target}
+    # If the library is Python, install it into a dedicated directory
+    message (STATUS "${_lib_short_name} is assumed to be a Python library")
+    install (TARGETS ${_lib_target}
       EXPORT ${LIB_DEPENDENCY_EXPORT}
       LIBRARY DESTINATION "${INSTALL_PY_LIB_DIR}" COMPONENT runtime)
-
+
   else ("${_lib_prefix}" STREQUAL "py")
-	# Install the library in the standard location
-	install (TARGETS ${_lib_target}
+    # Install the library in the standard location
+    install (TARGETS ${_lib_target}
       EXPORT ${LIB_DEPENDENCY_EXPORT}
       LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT runtime)
   endif ("${_lib_prefix}" STREQUAL "py")
@@ -2673,7 +2704,7 @@

 # Python
 macro (display_python)
-  if (Python3_FOUND)
+  if (NEED_PYTHON)
     message (STATUS)
     message (STATUS "* Python:")
     message (STATUS "  - Python3_VERSION ............... : ${Python3_VERSION}")
@@ -2682,7 +2713,10 @@
     message (STATUS "  - Python3_LIBRARIES ............. : ${Python3_LIBRARIES}")
     message (STATUS "  - Python3_LIBRARY_DIRS .......... : ${Python3_LIBRARY_DIRS}")
     message (STATUS "  - Python3_RUNTIME_LIBRARY_DIRS .. : ${Python3_RUNTIME_LIBRARY_DIRS}")
-  endif (Python3_FOUND)
+  else (NEED_PYTHON)
+    message (STATUS)
+    message (STATUS "* Python not required")
+  endif (NEED_PYTHON)
 endmacro (display_python)

 # ICU
@@ -2717,7 +2751,9 @@
     message (STATUS "  - Boost_LIB_VERSION ............. : ${Boost_LIB_VERSION}")
     message (STATUS "  - Boost_HUMAN_VERSION ........... : ${Boost_HUMAN_VERSION}")
     message (STATUS "  - Boost_INCLUDE_DIRS ............ : ${Boost_INCLUDE_DIRS}")
-    message (STATUS "  - Boost_PYTHON_VERSION .......... : ${Boost_PYTHON_VERSION}")
+    if (NEED_PYTHON)
+      message (STATUS "  - Boost_PYTHON_VERSION .......... : ${Boost_PYTHON_VERSION}")
+    endif (NEED_PYTHON)
     message (STATUS "  - Boost required components ..... : ${BOOST_REQUIRED_COMPONENTS}")
     message (STATUS "  - Boost required libraries ...... : ${BOOST_REQUIRED_LIBS}")
     message (STATUS "  - Boost required libs for Py ext. : ${PROJ_DEP_LIBS_FOR_PYEXT}")


update docs and change list append syntax

--- contrib/cmake/build_from_scratch.cmake
+++ contrib/cmake/build_from_scratch.cmake
@@ -10,19 +10,21 @@
     It will set up and build 3rdparty dependencies in a folder next to the SDK folder, and also
     set up the project (Visual Studio on Windows) and bulid it in an SDK subfolder "build-<triplet>"

-    The parameters EXTRA_ARGS and TARGET are both optional parameters which can accept a single argument
-    or a semicolon-delimited list of arguments.
+    The parameters EXTRA_ARGS and TARGET are both optional parameters. You may pass a single argument
+    in the normal way, but lists of arguments must be semicolon-delimited to conform with CMake's list syntax.
+    Please note in the examples below the use of quotes when a list is passed: this is needed to prevent your
+    shell from parsing the semicolons.

     The parameter EXTRA_ARGS controls configuration parameters that will be used to control the SDK build.
     These must be passed with the CMake definition syntax. For example:

-        "-DEXTRA_ARGS=-DUSE_PDFIUM=0"
-        "-DEXTRA_ARGS=-DUSE_PDFIUM=0;-DUSE_FREEIMAGE=0"
+        -DEXTRA_ARGS=-DUSE_PDFIUM=0
+        -DEXTRA_ARGS="-DUSE_PDFIUM=0;-DUSE_FREEIMAGE=0"

     The parameter TARGET, if provided, will build only the selected targets. For example:

         -DTARGET=megacli
-        "-DTARGET=megacli;test_unit"
+        -DTARGET="megacli;test_unit"

     If omitted, the script will build the whole project in a manner equivalent to calling `make all`.

@@ -40,7 +42,6 @@
 Script must be run from its current folder")
 endfunction()

-get_filename_component(_prog_name ${CMAKE_ARGV2} NAME)
 set(_script_cwd ${CMAKE_CURRENT_SOURCE_DIR})

 if(NOT EXISTS "${_script_cwd}/build_from_scratch.cmake")
@@ -171,7 +172,7 @@

 if(WIN32)
     if(_triplet MATCHES "staticdev$")
-        set(_extra_cmake_args ${_extra_cmake_args} -DMEGA_LINK_DYNAMIC_CRT=0 -DUNCHECKED_ITERATORS=1)
+        list(APPEND _extra_cmake_args -DMEGA_LINK_DYNAMIC_CRT=0 -DUNCHECKED_ITERATORS=1)
     endif()

     if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")


catch test modified for MPI

catch test modified for MPI

--- scripts/AddCatchTest.cmake
+++ scripts/AddCatchTest.cmake
@@ -54,8 +54,8 @@
     set(EXTRA_ARGS WORKING_DIRECTORY ${catch_WORKING_DIRECTORY})
   endif()
   set(arguments ${catch_ARGUMENTS})
-  if(catch_SEED)
-    list(APPEND arguments --rng-seed ${catch_SEED})
+  if(NOT "${seed}" STREQUAL "")
+    list(APPEND arguments --rng-seed ${seed})
   else()
     list(APPEND arguments --rng-seed time)
   endif()
@@ -81,7 +81,7 @@
 function(add_catch_test testname)
   cmake_parse_arguments(catch
     "NOMAIN;NOTEST;NOCATCHLABEL"
-    "SEED;WORKING_DIRECTORY"
+    "SEED;WORKING_DIRECTORY;COMMON_MAIN;PRECOMMAND"
     "LIBRARIES;DEPENDS;INCLUDES;LABELS;ARGUMENTS"
     ${ARGN}
   )
@@ -100,9 +100,11 @@
   # We create here
   if(catch_NOMAIN)
     add_executable(test_${testname} ${source} ${catch_UNPARSED_ARGUMENTS})
+  elseif(catch_COMMON_MAIN)
+    add_executable(test_${testname}
+      ${source} $<TARGET_OBJECTS:${catch_COMMON_MAIN}> ${catch_UNPARSED_ARGUMENTS})
   else()
     common_catch_main()
-    # Construct executable
     add_executable(test_${testname}
       ${source} $<TARGET_OBJECTS:common_catch_main_object> ${catch_UNPARSED_ARGUMENTS})
   endif()
@@ -123,17 +125,18 @@
     add_dependencies(test_${testname} lookup_dependencies)
   endif()

-  if(NOT catch_SEED)
-    set(catch_SEED time)
-  endif()
   if(catch_NOCATCHLABEL)
     set(catch_NOCATCHLABEL "NOCATCHLABEL")
   else()
     unset(catch_NOCATCHLABEL)
   endif()
+  set(test_command test_${testname})
+  if(catch_PRECOMMAND)
+    set(test_command "${catch_PRECOMMAND} ${test_command}")
+  endif()
   if(NOT catch_NOTEST)
     add_catch_test_with_seed(
-      test_${testname} test_${testname} ${catch_SEED} ${catch_UNPARSED_ARGUMENTS}
+      test_${testname} "test_${testname}" "${catch_SEED}" ${catch_UNPARSED_ARGUMENTS}
       ${catch_NOCATCHLABEL} WORKING_DIRECTORY ${catch_WORKING_DIRECTORY}
       LABELS ${catch_LABELS} ARGUMENTS ${catch_ARGUMENTS}
     )


github ci aarch64 config build  cpp-httplib .cmake  1.2

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


Should not be recursive

Should not be recursive

--- CMake/FindEigen.cmake
+++ CMake/FindEigen.cmake
@@ -90,7 +90,7 @@
   /opt/local/include
   /usr/include)
 # Additional suffixes to try appending to each search path.
-file(GLOB_RECURSE EIGEN_CHECK_PATH_SUFFIXES ${DEIGEN_INCLUDE_DIRS}/eigen*)
+file(GLOB EIGEN_CHECK_PATH_SUFFIXES ${DEIGEN_INCLUDE_DIRS}/eigen*)
 # Search supplied hint directories first if supplied.
 FIND_PATH(EIGEN_INCLUDE_DIR
   NAMES Eigen/Core


CMake requires normalized paths when appending.

Patch by Hugh Bellamy
Differential Revision: https://reviews.llvm.org/D30927

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

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -87,6 +87,7 @@

   set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
   if(EXISTS ${LLVMCONFIG_FILE})
+    file(TO_CMAKE_PATH "${LLVM_CMAKE_PATH}" LLVM_CMAKE_PATH)
     list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
     include(${LLVMCONFIG_FILE})
   else()


[CMake] Remove duplicated cache variable. NFC.

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

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -20,8 +20,6 @@
   find_package(Clang REQUIRED CONFIG
     HINTS "${LLDB_PATH_TO_CLANG_BUILD}" NO_CMAKE_FIND_ROOT_PATH)

-  # We set LLVM_MAIN_INCLUDE_DIR so that it gets included in TableGen flags.
-  set(LLVM_MAIN_INCLUDE_DIR "${LLVM_BUILD_MAIN_INCLUDE_DIR}" CACHE PATH "Path to LLVM's source include dir")
   # We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when building SVNVersion.inc
   set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules")


Minor bug: causes undefined symbol error in libtvm from NNPACK (#1368)

--- cmake/modules/contrib/NNPack.cmake
+++ cmake/modules/contrib/NNPack.cmake
@@ -7,7 +7,7 @@
   list(APPEND RUNTIME_SRCS ${NNPACK_CONTRIB_SRC})
 	include_directories(${NNPACK_PATH}/include)
 	include_directories(${PTHREAD_POOL_PATH}/include)
-  find_library(NNPACK_CONTRB_LIB nnpack ${NNPACK_PATH}/lib)
+    find_library(NNPACK_CONTRIB_LIB nnpack ${NNPACK_PATH}/lib)
   find_library(NNPACK_PTHREAD_CONTRIB_LIB pthreadpool ${NNPACK_PATH}/lib)
   list(APPEND TVM_RUNTIME_LINKER_LIBS ${NNPACK_CONTRIB_LIB})
   list(APPEND TVM_RUNTIME_LINKER_LIBS ${NNPACK_PTHREAD_CONTRIB_LIB})


Update date and version number for the 5.9.8 release. Increment SOVERSION for the libplplotd and libplplotcxxd libraries to reflect backwards incompatible API changes made in this version.

svn path=/trunk/; revision=11830

--- cmake/modules/plplot_version.cmake
+++ cmake/modules/plplot_version.cmake
@@ -1,15 +1,15 @@
 # For now, must set this by hand before each release.  This value affects
 # at least the documentation build and perhaps other parts of the release.
-set(RELEASE_DATE "2010-10-03")
+set(RELEASE_DATE "2011-08-01")

 # Version data that need review and possible modification for each release.

-set(VERSION 5.9.7)
+set(VERSION 5.9.8)

 # CPack version numbers for release tarball name.
 set(CPACK_PACKAGE_VERSION_MAJOR 5)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 7)
+set(CPACK_PACKAGE_VERSION_PATCH 8)

 # PLplot library version information.

@@ -42,11 +42,11 @@
 set(qsastime_SOVERSION 0)
 set(qsastime_VERSION ${qsastime_SOVERSION}.0.1)

-set(plplot_SOVERSION 10)
+set(plplot_SOVERSION 11)
 set(plplot_VERSION ${plplot_SOVERSION}.0.0)

-set(plplotcxx_SOVERSION 9)
-set(plplotcxx_VERSION ${plplotcxx_SOVERSION}.3.0)
+set(plplotcxx_SOVERSION 10)
+set(plplotcxx_VERSION ${plplotcxx_SOVERSION}.0.0)

 set(plplotdmd_SOVERSION 0)
 set(plplotdmd_VERSION ${plplotdmd_SOVERSION}.0.0)


refs #6566 Revert xz third_party patches.  Will do this on git to reduce effects on nightly tests.
svn merge -c -55449 https://svn.tokutek.com/tokudb/toku/tokudb
svn merge -c -55401 https://svn.tokutek.com/tokudb/toku/tokudb
svn merge -c -55400 https://svn.tokutek.com/tokudb/toku/tokudb

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

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -46,39 +46,39 @@
   list(APPEND xz_configure_opts --enable-debug)
 endif ()

-set(XZ_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/xz-4.999.9beta" CACHE FILEPATH "Where to find sources for xz (lzma).")
+set(XZ_SOURCE_DIR "${TOKU_SVNROOT}/xz-4.999.9beta" CACHE FILEPATH "Where to find sources for xz (lzma).")
 if (NOT EXISTS "${XZ_SOURCE_DIR}/configure")
-    message(FATAL_ERROR "Can't find the xz sources.  Please check them out to ${XZ_SOURCE_DIR} or modify TokuDB_SOURCE_DIR (${TokuDB_SOURCE_DIR}) or XZ_SOURCE_DIR.")
+  message(FATAL_ERROR "Can't find the xz sources.  Please check them out to ${XZ_SOURCE_DIR} or modify TOKU_SVNROOT (${TOKU_SVNROOT}) or XZ_SOURCE_DIR.")
 endif ()

-FILE(GLOB XZ_ALL_FILES ${XZ_SOURCE_DIR}/*)
 if (CMAKE_GENERATOR STREQUAL Ninja)
   ## ninja doesn't understand "$(MAKE)"
-  set(SUBMAKE_COMMAND make)
+  ExternalProject_Add(build_lzma
+    PREFIX xz
+    SOURCE_DIR "${XZ_SOURCE_DIR}"
+    CONFIGURE_COMMAND
+        "${XZ_SOURCE_DIR}/configure" ${xz_configure_opts}
+        "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
+    BUILD_COMMAND
+        make -C src/liblzma
+    INSTALL_COMMAND
+        make -C src/liblzma install
+    )
 else ()
   ## use "$(MAKE)" for submakes so they can use the jobserver, doesn't
   ## seem to break Xcode...
-  set(SUBMAKE_COMMAND $(MAKE))
-endif ()
-
-ExternalProject_Add(build_lzma
+  ExternalProject_Add(build_lzma
     PREFIX xz
-    DOWNLOAD_COMMAND
-        cp -au "${XZ_ALL_FILES}" "<SOURCE_DIR>/"
+    SOURCE_DIR "${XZ_SOURCE_DIR}"
     CONFIGURE_COMMAND
-        "<SOURCE_DIR>/configure" ${xz_configure_opts}
+        "${XZ_SOURCE_DIR}/configure" ${xz_configure_opts}
         "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
     BUILD_COMMAND
-        ${SUBMAKE_COMMAND} -C src/liblzma
+        $(MAKE) -C src/liblzma
     INSTALL_COMMAND
-        ${SUBMAKE_COMMAND} -C src/liblzma install
-)
-FILE(GLOB_RECURSE XZ_ALL_FILES_RECURSIVE ${XZ_SOURCE_DIR}/*)
-ExternalProject_Add_Step(build_lzma reclone_src # Names of project and custom step
-    COMMENT "(re)cloning xz source..."     # Text printed when step executes
-    DEPENDERS download configure   # Steps that depend on this step
-    DEPENDS   ${XZ_ALL_FILES_RECURSIVE}   # Files on which this step depends
-)
+        $(MAKE) -C src/liblzma install
+    )
+endif ()

 set_source_files_properties(
   "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz/include/lzma.h"


Use short git hashes for revision

Use short git hashes for revision

--- revision.cmake
+++ revision.cmake
@@ -8,7 +8,7 @@
 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
   FIND_PACKAGE(Git)
   IF(GIT_FOUND)
-    EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-list -n 1 HEAD
+    EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       OUTPUT_VARIABLE EQ_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
     MESSAGE(STATUS "git revision ${EQ_REVISION}")


Another update to cmake system.

Another update to cmake system.

--- Modules/FindSDL_gfx.cmake
+++ Modules/FindSDL_gfx.cmake
@@ -74,8 +74,25 @@
     )
 ENDIF(${SDLGFX_INCLUDE_DIR} MATCHES ".framework")

+if(SDLGFX_INCLUDE_DIR AND EXISTS "${SDLGFX_INCLUDE_DIR}/SDL_gfxPrimitives.h")
+  file(STRINGS "${SDLGFX_INCLUDE_DIR}/SDL_gfxPrimitives.h" SDL_GFXPRIMITIVES_MAJOR_LINE REGEX "^#define[ \t]+SDL_GFXPRIMITIVES_MAJOR[ \t]+[0-9]+$")
+  file(STRINGS "${SDLGFX_INCLUDE_DIR}/SDL_gfxPrimitives.h" SDL_GFXPRIMITIVES_MINOR_LINE REGEX "^#define[ \t]+SDL_GFXPRIMITIVES_MINOR[ \t]+[0-9]+$")
+  file(STRINGS "${SDLGFX_INCLUDE_DIR}/SDL_gfxPrimitives.h" SDL_GFXPRIMITIVES_MICRO_LINE REGEX "^#define[ \t]+SDL_GFXPRIMITIVES_MICRO[ \t]+[0-9]+$")
+  string(REGEX REPLACE "^#define[ \t]+SDL_GFXPRIMITIVES_MAJOR[ \t]+([0-9]+)$" "\\1" SDL_GFXPRIMITIVES_MAJOR "${SDL_GFXPRIMITIVES_MAJOR_LINE}")
+  string(REGEX REPLACE "^#define[ \t]+SDL_GFXPRIMITIVES_MINOR[ \t]+([0-9]+)$" "\\1" SDL_GFXPRIMITIVES_MINOR "${SDL_GFXPRIMITIVES_MINOR_LINE}")
+  string(REGEX REPLACE "^#define[ \t]+SDL_GFXPRIMITIVES_MICRO[ \t]+([0-9]+)$" "\\1" SDL_GFXPRIMITIVES_MICRO "${SDL_GFXPRIMITIVES_MICRO_LINE}")
+  set(SDL_GFXPRIMITIVES_VERSION_STRING ${SDL_GFXPRIMITIVES_MAJOR}.${SDL_GFXPRIMITIVES_MINOR}.${SDL_GFXPRIMITIVES_MICRO})
+  unset(SDL_GFXPRIMITIVES_MAJOR_LINE)
+  unset(SDL_GFXPRIMITIVES_MINOR_LINE)
+  unset(SDL_GFXPRIMITIVES_MICRO_LINE)
+  unset(SDL_GFXPRIMITIVES_MAJOR)
+  unset(SDL_GFXPRIMITIVES_MINOR)
+  unset(SDL_GFXPRIMITIVES_MICRO)
+endif()
+
 SET(SDLGFX_FOUND FALSE)
 IF(SDLGFX_LIBRARY AND SDLGFX_INCLUDE_DIR)
+  MESSAGE(STATUS "Found SDL_gfx: ${SDLGFX_LIBRARY} (found version \"${SDL_GFXPRIMITIVES_VERSION_STRING}\")")
   SET(SDLGFX_FOUND TRUE)
 ENDIF(SDLGFX_LIBRARY AND SDLGFX_INCLUDE_DIR)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


ctkMacroOptionUtils - Improve the enabling message

* It now displays the value of the variable within the logical expression

--- CMake/ctkMacroOptionUtils.cmake
+++ CMake/ctkMacroOptionUtils.cmake
@@ -10,7 +10,20 @@
       # option value, which requires the current option to be ON.
       get_property(_doc_string CACHE ${option_prefix}_${name} PROPERTY HELPSTRING)
       set(${option_prefix}_${name} ON CACHE BOOL ${_doc_string} FORCE)
-      message("Enabling [${option_prefix}_${name}] because of [${ARGN}]")
+      # Generate user-friendly message
+      set(enabling_msg)
+      foreach(arg ${ARGN})
+        if(NOT "${${arg}}" STREQUAL "")
+          set(value_as_int 0)
+          if(${${arg}})
+            set(value_as_int 1)
+          endif()
+          set(enabling_msg "${enabling_msg} ${arg}:${value_as_int}")
+        else()
+          set(enabling_msg "${enabling_msg} ${arg}")
+        endif()
+      endforeach()
+      message("Enabling [${option_prefix}_${name}] because of [${enabling_msg}] evaluates to True")
     endif()
   endif()
 endmacro()


Really fix dependent libraries with static libs.

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -73,7 +73,6 @@
   "endif()\n"
   "\n"
   "@DEPENDENTS@" # add dependent library finding
-
   "set(${UPPER_PROJECT_NAME}_FIND_FILES ${${UPPER_PROJECT_NAME}_FIND_FILES})\n"
 )

@@ -89,7 +88,7 @@
   "  if(${PROJECT_NAME}_FIND_COMPONENTS)\n"
   "    find_library(\${UPPER_PROJECT_NAME}_LIBRARY ${PROJECT_NAME} NO_DEFAULT_PATH\n"
   "                 PATHS \${${PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
-  "    list(INSERT 0 ${UPPER_PROJECT_NAME}_LIBRARIES \${${UPPER_PROJECT_NAME}_LIBRARY})\n"
+  "    list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${UPPER_PROJECT_NAME}_LIBRARY})\n"
   "    foreach(_component \${${PROJECT_NAME}_FIND_COMPONENTS})\n"
   "      find_library(\${_component}_libraryname ${PROJECT_NAME}_\${_component} NO_DEFAULT_PATH\n"
   "        PATHS \${${PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
@@ -107,7 +106,7 @@
   "        string(TOUPPER \${_component} _COMPONENT)\n"
   "        set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_FOUND TRUE)\n"
   "        set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_LIBRARY \${\${_component}_libraryname})\n"
-  "        list(INSERT 0 ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_component}_libraryname})\n"
+  "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_component}_libraryname})\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "      endif()\n"
   "    endforeach()\n"
@@ -136,7 +135,7 @@
   "            \"   Missing \${_libraryname} in \${${PROJECT_NAME}_PREFIX_DIR}/lib\")\n"
   "        endif()\n"
   "      else()\n"
-  "        list(INSERT 0 ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_LIBRARYNAME}_LIBRARY})\n"
+  "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_LIBRARYNAME}_LIBRARY})\n"
   "        string(REPLACE \"${PROJECT_NAME}_\" \"\" _component \${_libraryname})\n"
   "        string(TOUPPER \${_component} _COMPONENT)\n"
   "        set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_FOUND TRUE)\n"
@@ -163,12 +162,12 @@
   "\n"
 # find components if specified
   "  if(${PROJECT_NAME}_FIND_COMPONENTS)\n"
-  "    list(INSERT 0 ${UPPER_PROJECT_NAME}_LIBRARIES \${${PROJECT_NAME}})\n"
+  "    list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${PROJECT_NAME}})\n"
   "    foreach(_component \${${PROJECT_NAME}_FIND_COMPONENTS})\n"
   "      string(TOUPPER \${_component} _COMPONENT)\n"
   "      set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_FOUND TRUE)\n"
   "      set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_LIBRARY \${\${_component}_libraryname})\n"
-  "      list(INSERT 0 ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_component}_libraryname})\n"
+  "      list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_component}_libraryname})\n"
   "      list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "    endforeach()\n"
 # search for ${UPPER_PROJECT_NAME}_FIND_FILES
@@ -177,7 +176,7 @@
 # if no component or file was specified, find all produced libraries
   "    set(${UPPER_PROJECT_NAME}_LIBRARY_NAMES \"@LIBRARY_NAMES@\")\n"
   "    foreach(_libraryname \${${UPPER_PROJECT_NAME}_LIBRARY_NAMES})\n"
-  "      list(INSERT 0 ${UPPER_PROJECT_NAME}_LIBRARIES \${_libraryname})\n"
+  "      list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${_libraryname})\n"
   "    endforeach()\n"
   "  endif()\n"
   "\n"
@@ -191,6 +190,8 @@

 set(_config_file_final
+  "list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${UPPER_PROJECT_NAME}_DEP_LIBRARIES})\n"
+  "set(${UPPER_PROJECT_NAME}_DEP_LIBRARIES)\n"
 # finally report about found or not found
   "if(_fail)\n"
   "  set(${UPPER_PROJECT_NAME}_FOUND)\n"
@@ -340,7 +341,7 @@
       "  endif()\n")
   endif()
   list(APPEND DEPENDENTS
-    "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_dependent}_name}_LIBRARIES})\n"
+    "  list(APPEND ${UPPER_PROJECT_NAME}_DEP_LIBRARIES \${${${_dependent}_name}_LIBRARIES})\n"
     "  list(APPEND ${UPPER_PROJECT_NAME}_INCLUDE_DIRS \${${${_dependent}_name}_INCLUDE_DIRS})\n"
     "else()\n"
     "  set(_fail \"${_dependent} not found\")\n"


Cut various references to cpp reflection

Summary: [Thrift] Cut various references to cpp reflection, which no longer exists.

Reviewed By: luciang

Differential Revision: D9174833

fbshipit-source-id: e1e29f89482807ccee140ae05d1eb4e7f3c6a0c9

--- ThriftLibrary.cmake
+++ ThriftLibrary.cmake
@@ -168,16 +168,6 @@
   ${output_path}/gen-${language}/${file_name}_data.cpp
   ${output_path}/gen-${language}/${file_name}_types.cpp
 )
-if("${language}" STREQUAL "cpp")
-  set("${file_name}-${language}-HEADERS"
-    ${${file_name}-${language}-HEADERS}
-    ${output_path}/gen-${language}/${file_name}_reflection.h
-  )
-  set("${file_name}-${language}-SOURCES"
-    ${${file_name}-${language}-SOURCES}
-    ${output_path}/gen-${language}/${file_name}_reflection.cpp
-  )
-endif()
 foreach(service ${services})
   set("${file_name}-${language}-HEADERS"
     ${${file_name}-${language}-HEADERS}


BUG: do not use c++ flag in c

BUG: do not use c++ flag in c

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -59,6 +59,19 @@
 ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/${source_file}
 CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
 COMPILE_DEFINITIONS "-std=c++14" "-w"
+COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT_${var}
+RUN_OUTPUT_VARIABLE RUN_OUTPUT_${var}
+ARGS ${ARGN}
+)
+
+#------------------- C version ---------------------
+macro(gdal_try_run_c msg_type var source_file)
+message(STATUS "Performing Test ${var}")
+set(${var})
+try_run(RUN_${var} COMPILE_${var} ${CMAKE_CURRENT_BINARY_DIR}
+${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/${source_file}
+CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
+COMPILE_DEFINITIONS "-w"
 COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT_${var}
 RUN_OUTPUT_VARIABLE RUN_OUTPUT_${var}
 ARGS ${ARGN}
@@ -118,11 +131,11 @@
 # check formats TIFF, GeoTIFF, JPEG, JPEG2000, HDF5
 # Note : exact format names can be found here http://www.gdal.org/formats_list.html

-gdal_try_run(STATUS GDAL_FORMATS_LIST gdalFormatsListTest.c ${TEMP}/gdalFormatsList.csv)
-
-gdal_try_run(FATAL_ERROR GDAL_HAS_JPEG gdalFormatsTest.c JPEG)
-
-gdal_try_run(FATAL_ERROR GDAL_HAS_GTiff gdalFormatsTest.c GTiff)
+gdal_try_run_c(STATUS GDAL_FORMATS_LIST gdalFormatsListTest.c ${TEMP}/gdalFormatsList.csv)
+
+gdal_try_run_c(FATAL_ERROR GDAL_HAS_JPEG gdalFormatsTest.c JPEG)
+
+gdal_try_run_c(FATAL_ERROR GDAL_HAS_GTiff gdalFormatsTest.c GTiff)

 gdal_try_run(FATAL_ERROR GDAL_CAN_CREATE_GTiff gdalCreateTest.cxx GTiff ${TEMP}/testImage.gtif )

@@ -131,7 +144,7 @@
 gdal_try_run(FATAL_ERROR GDAL_CAN_CREATE_JPEG gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.jpeg JPEG)

 set(JPEG2000_DRIVER_USED)
-gdal_try_run(STATUS GDAL_HAS_JP2OpenJPEG gdalFormatsTest.c JP2OpenJPEG)
+gdal_try_run_c(STATUS GDAL_HAS_JP2OpenJPEG gdalFormatsTest.c JP2OpenJPEG)
 if (GDAL_HAS_JP2OpenJPEG)
   set(JPEG2000_DRIVER_USED "OpenJPEG")
   gdal_try_run(STATUS GDAL_CAN_CREATE_JP2OpenJPEG gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2OpenJPEG)
@@ -143,27 +156,27 @@
   gdal_try_run(STATUS GDAL_CAN_CREATE_JP2KAK gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2KAK)
 endif()

-gdal_try_run(STATUS GDAL_HAS_JP2ECW gdalFormatsTest.c JP2ECW)
+gdal_try_run_c(STATUS GDAL_HAS_JP2ECW gdalFormatsTest.c JP2ECW)
 if (GDAL_HAS_JP2ECW)
   set(JPEG2000_DRIVER_USED "ECW")
   gdal_try_run(STATUS GDAL_CAN_CREATE_JP2ECW gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2ECW)
 endif()

-gdal_try_run(STATUS GDAL_HAS_JPEG2000 gdalFormatsTest.c JPEG2000)
+gdal_try_run_c(STATUS GDAL_HAS_JPEG2000 gdalFormatsTest.c JPEG2000)
 if (GDAL_HAS_JPEG2000)
     set(JPEG2000_DRIVER_USED "JPEG2000")
   gdal_try_run(STATUS GDAL_CAN_CREATE_JPEG2000 gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JPEG2000)
 endif()

-gdal_try_run(STATUS GDAL_HAS_HDF5 gdalFormatsTest.c HDF5)
-gdal_try_run(STATUS GDAL_HAS_HDF4 gdalFormatsTest.c HDF4)
+gdal_try_run_c(STATUS GDAL_HAS_HDF5 gdalFormatsTest.c HDF5)
+gdal_try_run_c(STATUS GDAL_HAS_HDF4 gdalFormatsTest.c HDF4)

 #check some vector formats
 #TODO: fix gdalFormatsTest.c to work with gdal 1.x and 2.x
-# gdal_try_run(FATAL_ERROR GDAL_HAS_SQLite gdalFormatsTest.c SQLite)
-# gdal_try_run(FATAL_ERROR GDAL_HAS_VRT gdalFormatsTest.c VRT)
-# gdal_try_run(FATAL_ERROR GDAL_HAS_KML gdalFormatsTest.c KML)
-# gdal_try_run(STATUS GDAL_HAS_LIBKML gdalFormatsTest.c LIBKML)
+# gdal_try_run_c(FATAL_ERROR GDAL_HAS_SQLite gdalFormatsTest.c SQLite)
+# gdal_try_run_c(FATAL_ERROR GDAL_HAS_VRT gdalFormatsTest.c VRT)
+# gdal_try_run_c(FATAL_ERROR GDAL_HAS_KML gdalFormatsTest.c KML)
+# gdal_try_run_c(STATUS GDAL_HAS_LIBKML gdalFormatsTest.c LIBKML)

 #------------------- TESTS (END)---------------------


libfftw.cmake: Generate BOTH double and single-precision float libraries.

--- libfftw.cmake
+++ libfftw.cmake
@@ -26,13 +26,38 @@
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ${libfftw_SRC_DIR}/configure
         --prefix=${BUILDEM_DIR}
         --enable-shared
-        --enable-float  # This creates libfftw3f single-precision libraries
         LDFLAGS=${BUILDEM_LDFLAGS}
         CPPFLAGS=-I${BUILDEM_DIR}/include
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
 )

+# Add additional steps to build and install the fftw single-precision libraries.
+# (It is not possible to generate single and double precision libraries in one make step.)
+
+# Configure single-precision
+ExternalProject_Add_Step(${libfftw_NAME} singlefloat-configure
+    DEPENDEES install
+    COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} ${libfftw_SRC_DIR}/configure
+        --prefix=${BUILDEM_DIR}
+        --enable-shared
+        --enable-float  # This creates libfftw3f single-precision libraries INSTEAD OF the default double libraries.
+        LDFLAGS=${BUILDEM_LDFLAGS}
+        CPPFLAGS=-I${BUILDEM_DIR}/include
+)
+
+# build single-precision
+ExternalProject_Add_Step(${libfftw_NAME} singlefloat-build
+    DEPENDEES singlefloat-configure
+    COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} make
+)
+
+# install single-precision
+ExternalProject_Add_Step(${libfftw_NAME} singlefloat-install
+    DEPENDEES singlefloat-build
+    COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} make install
+)
+
 set_target_properties(${libfftw_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

 endif (NOT libfftw_NAME)


Restore NSIS specific workaround, add NSIS category to package config

--- packages/pack-template.cmake
+++ packages/pack-template.cmake
@@ -65,9 +65,16 @@
     set(CPACK_PACKAGE_ICON                  "")
     set(CPACK_PACKAGE_RELOCATABLE           OFF)

+
+    # NSIS package information
+
+    if(X64)
+        # http://public.kitware.com/Bug/view.php?id=9094
+        set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+    endif()
     #set(CPACK_NSIS_DISPLAY_NAME             "${package_name}-${META_VERSION}")

-
+
     # Debian package information

     set(CPACK_DEBIAN_PACKAGE_NAME           "${package_name}")


uniqueu cmake include guards (copy and paste error)

--- android-ndk-r10e-api-21-arm64-v8a-gcc-49-hid.cmake
+++ android-ndk-r10e-api-21-arm64-v8a-gcc-49-hid.cmake
@@ -2,10 +2,10 @@
 # Copyright (c) 2015, David Hirvonen
 # All rights reserved.

-if(DEFINED POLLY_ANDROID_NDK_R10E_API_21_ARM64_V8A_GCC_49_CMAKE_)
+if(DEFINED POLLY_ANDROID_NDK_R10E_API_21_ARM64_V8A_GCC_49_HID_CMAKE_)
   return()
 else()
-  set(POLLY_ANDROID_NDK_R10E_API_21_ARM64_V8A_GCC_49_CMAKE_ 1)
+  set(POLLY_ANDROID_NDK_R10E_API_21_ARM64_V8A_GCC_49_HID_CMAKE_ 1)
 endif()

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_clear_environment_variables.cmake")


Fix validation of gstreamer.desktop.

Fix validation of gstreamer.desktop.

REVIEW: 106010


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


Mise a jour du DartConfig.cmake

Mise a jour du DartConfig.cmake

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -5,9 +5,10 @@
 # Dart server to submit results (used by client)
 SET (DROP_METHOD "http")
 SET (DROP_SITE "nemo/dart_server")
-SET (DROP_LOCATION "/incoming")
-SET (DROP_SITE_USER "ftpuser")
-SET (DROP_SITE_PASSWORD "public")
+SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
+#SET (DROP_LOCATION "/incoming")
+#SET (DROP_SITE_USER "ftpuser")
+#SET (DROP_SITE_PASSWORD "public")

 SET (DROP_SITE_MODE "active")

@@ -18,10 +19,10 @@

 # Dart server configuration
 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/insight-rollup-dashboard.sh")
-SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/orfeotoolbox-rollup-dashboard.sh")
-SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/")
+#SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/orfeotoolbox-rollup-dashboard.sh")
+#SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/")
 #SET (CVS_WEB_CVSROOT "Insight")
-SET (CVS_WEB_CVSROOT "OrfeoToolbox")
+#SET (CVS_WEB_CVSROOT "OrfeoToolbox")

 OPTION(BUILD_DOXYGEN "Build source documentation using doxygen" "Off")
 SET (DOXYGEN_CONFIG "${OTB_BINARY_DIR}/doxygen.config" )
@@ -32,9 +33,9 @@
 SET (GNATS_WEB_URL "http://${DROP_SITE}/bugTracker/query.php?projects=6&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")

 # Continuous email delivery variables
-SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
-SET (SMTP_MAILHOST "public.kitware.com")
-SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com lorensen@nycap.rr.com")
-SET (CONTINUOUS_BASE_URL "http://www.itk.org/Testing")
+#SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
+#SET (SMTP_MAILHOST "public.kitware.com")
+#SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com lorensen@nycap.rr.com")
+#SET (CONTINUOUS_BASE_URL "http://www.itk.org/Testing")

 MARK_AS_ADVANCED(BUILD_DOXYGEN)


Comment with list of packages to test

Comment with list of packages to test

--- cmake/modules/hunter_pkgconfig_export_target.cmake
+++ cmake/modules/hunter_pkgconfig_export_target.cmake
@@ -12,6 +12,10 @@
 include(hunter_internal_error)
 include(hunter_status_debug)

+# Packages to test this function:
+# * x11
+# * x264
+# * xcb
 function(hunter_pkgconfig_export_target PKG_CONFIG_MODULE)
   set(target_name "PkgConfig::${PKG_CONFIG_MODULE}")
   if(TARGET "${target_name}")


add gfortran to clang-libstdcxx

add gfortran to clang-libstdcxx

--- clang-libstdcxx.cmake
+++ clang-libstdcxx.cmake
@@ -21,3 +21,5 @@
 include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake")

 include("${CMAKE_CURRENT_LIST_DIR}/os/osx.cmake")
+
+include("${CMAKE_CURRENT_LIST_DIR}/compiler/gfortran.cmake")


r1401@suzhe:  suzhe | 2009-04-08 11:22:28 +0800  - Fix cmake build with xulrunner 1.9.1

--- cmake/Configure.cmake
+++ cmake/Configure.cmake
@@ -95,6 +95,7 @@
 INCLUDE(CheckFunctionExists)
 INCLUDE(GGLCheckFunctionExists)
 INCLUDE(FindPkgConfig)
+INCLUDE(CheckIncludeFile)

 INCLUDE(CheckTypeSize)
 SET(HAVE_STDDEF_H 1)
@@ -447,6 +448,11 @@
   SET(CMAKE_REQUIRED_INCLUDES ${SMJS_INCLUDE_DIR})
   SET(CMAKE_REQUIRED_LIBRARIES ${SMJS_LIBRARIES})
   SET(CMAKE_REQUIRED_LINK_DIR ${SMJS_LINK_DIR})
+  SET(CMAKE_REQUIRED_DEFINITIONS ${SMJS_DEFINITIONS})
+  CHECK_INCLUDE_FILE(jsversion.h JSVERSION_H_FOUND)
+  IF(JSVERSION_H_FOUND)
+    LIST(APPEND SMJS_DEFINITIONS "-DHAVE_JSVERSION_H")
+  ENDIF(JSVERSION_H_FOUND)
   GGL_CHECK_FUNCTION_EXISTS(JS_SetOperationCallback JS_SETOPERATIONCALLBACK_FOUND)
   IF(JS_SETOPERATIONCALLBACK_FOUND)
     LIST(APPEND SMJS_DEFINITIONS "-DHAVE_JS_SetOperationCallback")


[cmake] fixed ug

[cmake] fixed ug

--- cmake/GridUtils.cmake
+++ cmake/GridUtils.cmake
@@ -11,17 +11,11 @@
   if( NOT UG_GRID_FOUND )
     message( FATAL_ERROR "Gridtype ${GRIDTYPE} requested, but libug was not found!" )
   endif( NOT UG_GRID_FOUND )
-  # ug needs Xt, but the libXt.so seems to be missing sometimes
-  SET( TMP_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} )
-  SET( CMAKE_FIND_LIBRARY_SUFFIXES ${TMP_CMAKE_FIND_LIBRARY_SUFFIXES} ".so.6" )
-  find_library( XT_FOUND Xt )
-  SET( CMAKE_FIND_LIBRARY_SUFFIXES ${TMP_CMAKE_FIND_LIBRARY_SUFFIXES} )
-  if( NOT XT_FOUND )
-    message( FATAL_ERROR "Gridtype UGGRID requested, but libXt was not found!" )
-  endif( NOT XT_FOUND )
   include_sys_dir( ${UG_GRID_INCLUDE_DIRS} )
   link_directories( ${UG_GRID_LIBRARY_DIRS} )
-  set( GRIDLIBS ugS2 ugS3 devX ugL2 ugL3 SM ICE X11 ${XT_FOUND} )
+  # althoug we use pkg_config to find ug we do not use UG_LIBRARIES,
+  # because those listed in lubug.pc are wrong
+  set( GRIDLIBS ugS2 ugS3 devS m )
   add_definitions( "-DENABLE_UG=1" )
 endif( ${GRIDTYPE} MATCHES "UGGRID" )


[axl] cmake subsystem modifications (work in progress)

--- cmake/axl_cmake.cmake
+++ cmake/axl_cmake.cmake
@@ -1,4 +1,4 @@
-# to make use of AXL cmake build infrastructure, copy this file into
+# to make use of AXL cmake build infrastructure, copy this file into
 # your project directory and include it in master CMakeLists.txt like this:

 # include (axl_cmake.cmake NO_POLICY_SCOPE)
@@ -8,7 +8,7 @@
 # excerpt from axl_utils.cmake

 macro (
-axl_calc_max_string_length
+axl_calc_max_string_length
 	_RESULT
 	# ...
 	)
@@ -22,8 +22,8 @@
 			set (_MAX_LENGTH ${_LENGTH})
 		endif ()
 	endforeach ()
-
-	set (${_RESULT} ${_MAX_LENGTH})
+
+	set (${_RESULT} ${_MAX_LENGTH})
 endmacro ()

 macro (
@@ -67,7 +67,7 @@
 	_FILE_NAME
 	# ...
 	)
-
+
 	set (_DIR_LIST ${ARGN})

 	set (_FILE_PATH ${_FILE_NAME}-NOTFOUND)
@@ -76,7 +76,7 @@
 		if (EXISTS ${_DIR}/${_FILE_NAME})
 			set (_FILE_PATH ${_DIR}/${_FILE_NAME})
 			break ()
-		endif ()
+		endif ()
 	endforeach ()

 	set (${_RESULT} ${_FILE_PATH})
@@ -96,14 +96,14 @@
 			set (_FILE_PATH ${_DIR}/${_FILE_NAME})
 			break ()
 		endif ()
-
+
 		get_filename_component (_PARENT_DIR "${_DIR}/.." ABSOLUTE)

 		if (${_DIR} STREQUAL ${_PARENT_DIR})
 			set (_FILE_PATH ${_FILE_NAME}-NOTFOUND)
 			break ()
-		endif ()
-
+		endif ()
+
 		set (_DIR ${_PARENT_DIR})
 	endwhile ()

@@ -154,6 +154,14 @@
 include (${_PATHS_CMAKE})
 include (${CMAKE_SOURCE_DIR}/dependencies.cmake)

+# find and include settings.cmake
+
+axl_find_file_recurse_parent_dirs (_SETTINGS_CMAKE settings.cmake ${CMAKE_CURRENT_LIST_DIR})
+
+if (_SETTINGS_CMAKE)
+	include (${_SETTINGS_CMAKE})
+endif ()
+
 # diagnostic printing

 axl_print_std_settings ()


git@github.com:ObKo/stm32-cmake.git

--- cmake/gcc_stm32.cmake
+++ cmake/gcc_stm32.cmake
@@ -88,8 +88,8 @@
     ELSE()
       SET(FILENAME "${TARGET}")
     ENDIF()
-    ADD_CUSTOM_TARGET(${TARGET}.hex DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Oihex ${FILENAME} ${FILENAME}.hex)
-    ADD_CUSTOM_TARGET(${TARGET}.bin DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Obinary ${FILENAME} ${FILENAME}.bin)
+    ADD_CUSTOM_TARGET(${TARGET}.hex ALL DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Oihex ${FILENAME} ${FILENAME}.hex)
+    ADD_CUSTOM_TARGET(${TARGET}.bin ALL DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Obinary ${FILENAME} ${FILENAME}.bin)
 ENDFUNCTION()

 FUNCTION(STM32_ADD_DUMP_TARGET TARGET)


px4_fmu-v2_default temporarily disable sf0x

 - can be reenabled after #11256 is merged

--- boards/px4/fmu-v2/default.cmake
+++ boards/px4/fmu-v2/default.cmake
@@ -27,7 +27,7 @@
 		differential_pressure/ms4525
 		#distance_sensor # all available distance sensor drivers
 		distance_sensor/ll40ls
-		distance_sensor/sf0x
+		#distance_sensor/sf0x
 		gps
 		#heater
 		#imu/adis16448


Add runtime location linux will use

Add runtime location linux will use

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -211,10 +211,13 @@
 MACRO(SET_BIN_DIR ProjectName OutputName)
     set_target_properties(${ProjectName} PROPERTIES OUTPUT_NAME ${OutputName})
     if(${ARGC} GREATER 2)
+        # VS_IDE (and perhaps others) make Release and Debug subfolders.  This removes them.
+        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY         ${CMAKE_BINARY_DIR}${ARGV2})
         set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}${ARGV2})
         set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${CMAKE_BINARY_DIR}${ARGV2})
         set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY         ${CMAKE_BINARY_DIR}${ARGV2})
     else(${ARGC} GREATER 2)
+        set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY         ${CMAKE_BINARY_DIR}/bin)
         set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
         set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${CMAKE_BINARY_DIR}/bin)
         set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY         ${CMAKE_BINARY_DIR}/lib)


fix config.cmake

fix config.cmake

--- glow-config.cmake
+++ glow-config.cmake
@@ -54,7 +54,11 @@
 		PATHS ${HINT_PATHS}
 		DOC "The ${LIB_NAME} debug library")

-	set(${LIB_NAME_UPPER}_LIBRARIES optimized ${${LIB_NAME_UPPER}_LIBRARY} debug ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+	if(${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+		set(${LIB_NAME_UPPER}_LIBRARIES optimized ${${LIB_NAME_UPPER}_LIBRARY} debug ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+	else()
+		set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})
+	endif()

 endmacro()


Use cmake mechanism to get OpenMP flags

Use cmake mechanism to get OpenMP flags

--- cmake/CompileFlags.cmake
+++ cmake/CompileFlags.cmake
@@ -6,22 +6,13 @@
 #    message(STATUS "${PROJECT_NAME} : Compiling on Apple with compiler " ${CMAKE_CXX_COMPILER_ID})

     if ( (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") )
-        set(OMP_FLAG "-fopenmp -ftree-vectorize")
         set(MATH_FLAG "-mfpmath=sse -ffast-math")
     else()
         set(MATH_FLAG "-mfpmath=sse")
-        set(OMP_FLAG "")
-    endif()
-
-    if (NOT ${RADIUM_WITH_OMP})
-        set (OMP_FLAG "")
-        add_definitions( -Wno-unknown-pragmas )  # gcc/mingw prints a lot of warnings due to open mp pragmas
-    else()
-        set(RADIUM_WITH_OMP ON)
     endif()

     set(CMAKE_CXX_STANDARD 14)
-    set(CMAKE_CXX_FLAGS                "-Wall -Wextra  -pthread -msse3 -Wno-sign-compare -Wno-unused-parameter -fno-exceptions -fPIC ${OMP_FLAG} ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS                "-Wall -Wextra  -pthread -msse3 -Wno-sign-compare -Wno-unused-parameter -fno-exceptions -fPIC ${CMAKE_CXX_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG          "-D_DEBUG -DCORE_DEBUG -g3 -ggdb ${CMAKE_CXX_FLAGS_DEBUG}")
     set(CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG -O3 ${MATH_FLAG}")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g3 ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -29,16 +20,9 @@
     add_definitions( -Wno-deprecated-declarations ) # Do not warn for eigen bind being deprecated
 elseif (UNIX OR MINGW)
     if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
-        set(OMP_FLAG "-fopenmp=libiomp5")
         set(MATH_FLAG "-mfpmath=sse")
     else()
-        set(OMP_FLAG "-fopenmp -ftree-vectorize")
         set(MATH_FLAG "-mfpmath=sse -ffast-math")
-    endif()
-
-    if (NOT ${RADIUM_WITH_OMP})
-        set (OMP_FLAG "")
-        add_definitions( -Wno-unknown-pragmas )  # gcc/mingw prints a lot of warnings due to open mp pragmas
     endif()

     if( MINGW )
@@ -48,7 +32,7 @@
     endif()

     set(CMAKE_CXX_STANDARD 14)
-    set(CMAKE_CXX_FLAGS                "-Wall -Wextra  -pthread -msse3 -Wno-sign-compare -Wno-unused-parameter -fno-exceptions -fPIC ${OMP_FLAG} ${EIGEN_ALIGNMENT_FLAG} ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS                "-Wall -Wextra  -pthread -msse3 -Wno-sign-compare -Wno-unused-parameter -fno-exceptions -fPIC ${EIGEN_ALIGNMENT_FLAG} ${CMAKE_CXX_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG          "-D_DEBUG -DCORE_DEBUG -g3 -ggdb ${CMAKE_CXX_FLAGS_DEBUG}")
     set(CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG -O3 ${MATH_FLAG}")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g3 -ggdb ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -83,13 +67,7 @@
     string( REGEX REPLACE "/M(T|D)(d)*" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
     string( REGEX REPLACE "/M(T|D)(d)*" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

-    if ("${RADIUM_WITH_OMP}" STREQUAL "True")
-        set (OMP_FLAG "/openmp")
-    else()
-        set (OMP_FLAG "")
-    endif()
-
-    set(CMAKE_CXX_FLAGS                "/arch:AVX2 /EHs-c- /MP ${OMP_FLAG} ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS                "/arch:AVX2 /EHs-c- /MP ${CMAKE_CXX_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG          "/D_DEBUG /DCORE_DEBUG /Od /Zi ${CMAKE_CXX_FLAGS_DEBUG} /MDd")
     set(CMAKE_CXX_FLAGS_RELEASE        "/DNDEBUG /Ox /fp:fast ${CMAKE_CXX_FLAGS_RELEASE} /MT")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -102,6 +80,22 @@
 endif()

 # Additional flags depending on build options =================================
+
+if (${RADIUM_WITH_OMP})
+    find_package(OpenMP QUIET)
+
+    if(OPENMP_FOUND)
+      message(STATUS "${PROJECT_NAME} : Using OpenMP")
+      add_definitions(-DCORE_USE_OMP)
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    endif(OPENMP_FOUND)
+else (${RADIUM_WITH_OMP})
+    message(STATUS "${PROJECT_NAME} : OpenMP disabled")
+    if ( (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") )
+        add_definitions( -Wno-unknown-pragmas )  # gcc/mingw prints a lot of warnings due to open mp pragmas
+    endif()
+endif()

 if ("${CMAKE_BUILD_TYPE}"  STREQUAL "Release" )
     add_definitions(-DNO_DEBUG_INFO)
@@ -117,13 +111,6 @@
 if (NOT ${RADIUM_WITH_FANCY_GL})
   add_definitions(-DNO_TRANSPARENCY)
   message(STATUS "${PROJECT_NAME} : Fancy OpenGL Effects are disabled")
-endif()
-
-if (${RADIUM_WITH_OMP})
-    add_definitions(-DCORE_USE_OMP)
-    message(STATUS "${PROJECT_NAME} : Using OpenMP")
-else()
-    message(STATUS "${PROJECT_NAME} : OpenMP disabled")
 endif()

 if (${RADIUM_WITH_TEXTURES})


Fix for Github issue #78

Fix for Github issue #78

Always use the Compute Library OpenCL stubs for linking,
but do not add the location to the runtime library path.

Change-Id: Ifc2fbec20183af1babf1167a8711e6709ad33210

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -278,12 +278,9 @@
               PATHS ${ARMCOMPUTE_ROOT}/include
               NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)

-    find_library(OPENCL_LIBRARIES OpenCL)
-    if (NOT OPENCL_LIBRARIES)
-        # Link against libOpenCL in opencl-1.2-stubs, but don't search there at runtime
-        link_libraries(-L${ARMCOMPUTE_BUILD_DIR}/opencl-1.2-stubs)
-        set(OPENCL_LIBRARIES OpenCL)
-    endif()
+    # Link against libOpenCL in opencl-1.2-stubs, but don't search there at runtime
+    link_libraries(-L${ARMCOMPUTE_BUILD_DIR}/opencl-1.2-stubs)
+    set(OPENCL_LIBRARIES OpenCL)

     include_directories(${OPENCL_INCLUDE})


Version bump

Version bump

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -29,7 +29,7 @@

 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
-set(IVW_PATCH_VERSION 8)
+set(IVW_PATCH_VERSION 9)
 set(IVW_VERSION ${IVW_MAJOR_VERSION}.${IVW_MINOR_VERSION}.${IVW_PATCH_VERSION})

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


CMake: Bugfix

CMake: Bugfix

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -94,18 +94,8 @@
 endfunction()

 #--------------------------------------------------------------------
-# Add own cmake modules
+# Add our cmake modules to search path
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/modules")
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/cmake/")
-
-#--------------------------------------------------------------------
-# Add globalmacros
-include(${CMAKE_CURRENT_LIST_DIR}/globalutils.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/compileoptions.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/installutils.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/deprecated.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/globalmacros.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/licenses.cmake)

 #--------------------------------------------------------------------
 # Add parameter for paths to external modules
@@ -121,16 +111,8 @@
 # Output paths for the executables, runtimes, archives and libraries
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH
    "Single Directory for all Executables.")
-
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib CACHE PATH
    "Single Directory for all Libraries")
-
-mark_as_advanced(
-    CMAKE_RUNTIME_OUTPUT_DIRECTORY
-    CMAKE_BUNDLE_OUTPUT_DIRECTORY
-    CMAKE_ARCHIVE_OUTPUT_DIRECTORY
-    CMAKE_LIBRARY_OUTPUT_DIRECTORY
-)

 #--------------------------------------------------------------------
 # Path for this solution
@@ -138,13 +120,10 @@
     set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH
         "Single output directory for building all executables.")
 endif()
-
 if(NOT LIBRARY_OUTPUT_PATH)
     set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE PATH
         "Single output directory for building all libraries.")
 endif()
-
-mark_as_advanced(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)

 # Set Common Variables
 get_filename_component(IVW_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH)
@@ -165,6 +144,15 @@
 set(IVW_CMAKE_BINARY_MODULE_DIR ${CMAKE_BINARY_DIR}/cmake)
 set(IVW_CMAKE_TEMPLATES         ${IVW_ROOT_DIR}/cmake/templates)

+#--------------------------------------------------------------------
+# Add globalmacros
+include(${CMAKE_CURRENT_LIST_DIR}/globalutils.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/compileoptions.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/installutils.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/deprecated.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/globalmacros.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/licenses.cmake)
+
 #Generate headers
 ivw_generate_module_paths_header()
 configure_file(${IVW_CMAKE_TEMPLATES}/inviwocommondefines_template.h
@@ -341,13 +329,3 @@
 if(PRECOMPILED_HEADERS)
     include(${CMAKE_CURRENT_LIST_DIR}/cotire.cmake)
 endif()
-
-mark_as_advanced(
-    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS
-    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH
-    COTIRE_DEBUG
-    COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES
-    COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES
-    COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS
-    COTIRE_VERBOSE
-)


Cmake: Revert prev changes for replacing backslashes in IVW_EXTERNAL_MODULES


fix install directory

fix install directory


ubuntu 18 fix include path, redundant

ubuntu 18 fix include path, redundant

--- cmake/ubuntu_18.04.cmake
+++ cmake/ubuntu_18.04.cmake
@@ -13,7 +13,7 @@
 SET (SUPERLULOCATE  ${EXTERNAL_LIB}/SuperLU_4.3)
 SET (SUPERLU_INCLUDE ${SUPERLULOCATE}/SRC)
 SET (SUPERLU_ARCHIVE ${SUPERLULOCATE}/lib/libsuperlu_4.3.a)
-SET (BOOST_INCLUDE "$ENV{CONDA_PREFIX}/include")
+SET (BOOST_INCLUDE "/usr/include")
 SET (QUADMATH_ARCHIVE "-lquadmath")
 SET (PTHREAD_LIB -lpthread)
 SET (DLOPEN_LIB -ldl)


MAINT: use more idiomatic MSVC definitions.

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -2,7 +2,7 @@

 # Visual C++ compiler
 if (MSVC)
-  add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
+  add_definitions(/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_DEPRECATE)
   message(STATUS "  - NON-SECURE warnings are disabled.")
   add_definitions(/EHsc)
   message(STATUS
@@ -13,7 +13,7 @@
     message(STATUS
             "  - Using version 2012: setting '_VARIADIC_MAX=10' to compile "
             "'Google Test'")
-    add_definitions(/D _VARIADIC_MAX=10)
+    add_definitions(/D_VARIADIC_MAX=10)
   endif ()

 # Clang compiler


Corrected the WITH_GSTREAMER and WITH_GSTREAMER_0_10 semantic

--- cmake/OpenCVFindLibsVideo.cmake
+++ cmake/OpenCVFindLibsVideo.cmake
@@ -32,7 +32,7 @@
 endif(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10)

 # if gstreamer 1.x was not found, or we specified we wanted 0.10, try to find it
-if(WITH_GSTREAMER_0_10 OR NOT HAVE_GSTREAMER)
+if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10)
   CHECK_MODULE(gstreamer-base-0.10 HAVE_GSTREAMER_BASE)
   CHECK_MODULE(gstreamer-video-0.10 HAVE_GSTREAMER_VIDEO)
   CHECK_MODULE(gstreamer-app-0.10 HAVE_GSTREAMER_APP)
@@ -47,7 +47,7 @@
       set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-0.10_VERSION})
       set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-0.10_VERSION})
   endif()
-endif(WITH_GSTREAMER_0_10 OR NOT HAVE_GSTREAMER)
+endif(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10)

 # --- unicap ---
 ocv_clear_vars(HAVE_UNICAP)


Licensed under BSL. Renamed function to avoid collisions.

--- cmake/PlatformDefinitions.cmake
+++ cmake/PlatformDefinitions.cmake
@@ -8,8 +8,12 @@
 # Author:
 #   Kevin M. Godby <kevin@godby.org>
 #
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#

-function(_define_macro prefix platform_string variable_name)
+function(_define_platform_macros_impl prefix platform_string variable_name)
 	if (${CMAKE_SYSTEM_NAME} MATCHES "${platform_string}")
 		string(TOUPPER "${prefix}_${variable_name}" _varname)
 		set(${_varname} TRUE PARENT_SCOPE)
@@ -17,24 +21,24 @@
 endfunction()

 macro(define_platform_macros _prefix)
-	_define_macro(${_prefix} "AIX" AIX)
-	_define_macro(${_prefix} "BS/DOS" BSDOS)
-	_define_macro(${_prefix} "FreeBSD" FREEBSD)
-	_define_macro(${_prefix} "HP-UX" HPUX)
-	_define_macro(${_prefix} "IRIX" IRIX)
-	_define_macro(${_prefix} "Linux" LINUX)
-	_define_macro(${_prefix} "GNU/kFreeBSD" KFREEBSD)
-	_define_macro(${_prefix} "NetBSD" NETBSD)
-	_define_macro(${_prefix} "OpenBSD" OPENBSD)
-	_define_macro(${_prefix} "OFS1" OFS1)
-	_define_macro(${_prefix} "SCO_SV" SCO_SV)
-	_define_macro(${_prefix} "UnixWare" UNIXWARE)
-	_define_macro(${_prefix} "Xenix" XENIX)
-	_define_macro(${_prefix} "SunOS" SUNOS)
-	_define_macro(${_prefix} "Tru64" TRU64)
-	_define_macro(${_prefix} "ULTRIX" ULTRIX)
-	_define_macro(${_prefix} "CYGWIN" CYGWIN)
-	_define_macro(${_prefix} "Darwin" MACOSX)
-	_define_macro(${_prefix} "Windows" WINDOWS)
+	_define_platform_macros_impl(${_prefix} "AIX" AIX)
+	_define_platform_macros_impl(${_prefix} "BS/DOS" BSDOS)
+	_define_platform_macros_impl(${_prefix} "FreeBSD" FREEBSD)
+	_define_platform_macros_impl(${_prefix} "HP-UX" HPUX)
+	_define_platform_macros_impl(${_prefix} "IRIX" IRIX)
+	_define_platform_macros_impl(${_prefix} "Linux" LINUX)
+	_define_platform_macros_impl(${_prefix} "GNU/kFreeBSD" KFREEBSD)
+	_define_platform_macros_impl(${_prefix} "NetBSD" NETBSD)
+	_define_platform_macros_impl(${_prefix} "OpenBSD" OPENBSD)
+	_define_platform_macros_impl(${_prefix} "OFS1" OFS1)
+	_define_platform_macros_impl(${_prefix} "SCO_SV" SCO_SV)
+	_define_platform_macros_impl(${_prefix} "UnixWare" UNIXWARE)
+	_define_platform_macros_impl(${_prefix} "Xenix" XENIX)
+	_define_platform_macros_impl(${_prefix} "SunOS" SUNOS)
+	_define_platform_macros_impl(${_prefix} "Tru64" TRU64)
+	_define_platform_macros_impl(${_prefix} "ULTRIX" ULTRIX)
+	_define_platform_macros_impl(${_prefix} "CYGWIN" CYGWIN)
+	_define_platform_macros_impl(${_prefix} "Darwin" MACOSX)
+	_define_platform_macros_impl(${_prefix} "Windows" WINDOWS)
 endmacro()


cpack: Add project version major to cpack package name

--- cmake/modules/CPackConfig.cmake
+++ cmake/modules/CPackConfig.cmake
@@ -2,6 +2,7 @@
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
 set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
+set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}")

 if(UNIX)
   if(NOT CPACK_GENERATOR)


Fix introduced problem in Pythia8

Fix introduced problem in Pythia8

--- cmake/modules/FindPythia8.cmake
+++ cmake/modules/FindPythia8.cmake
@@ -11,7 +11,7 @@
 set(_pythia8dirs ${PYTHIA8_DIR} $ENV{PYTHIA8_DIR} /usr /opt/pythia8)

 find_path(PYTHIA8_INCLUDE_DIR
-          NAMES Pythia.h Pythia8/Pythia.h
+          NAMES Pythia8/Pythia.h
           HINTS ${_pythia8dirs}
           PATH_SUFFIXES include include/Pythia8 include/pythia8
           DOC "Specify the directory containing Pythia.h.")


Disable float checking for now, as it seems to break in Homebrew...

...and isn't being used anyway.

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -354,15 +354,15 @@
 # Floating point detection
 include(CheckTypeRepresentation)

-check_float_type_representation(float FLOAT_TYPE_C)
-check_float_type_representation(double DOUBLE_TYPE_C)
-check_float_type_representation("long double" LONG_DOUBLE_TYPE_C)
+#check_float_type_representation(float FLOAT_TYPE_C)
+#check_float_type_representation(double DOUBLE_TYPE_C)
+#check_float_type_representation("long double" LONG_DOUBLE_TYPE_C)

 if(ADIOS2_USE_Fortran)
-  check_float_type_representation(real REAL_TYPE_Fortran LANGUAGE Fortran)
-  check_float_type_representation("real(kind=4)" REAL4_TYPE_Fortran LANGUAGE Fortran)
-  check_float_type_representation("real(kind=8)" REAL8_TYPE_Fortran LANGUAGE Fortran)
-  check_float_type_representation("real(kind=16)" REAL16_TYPE_Fortran LANGUAGE Fortran)
+  #check_float_type_representation(real REAL_TYPE_Fortran LANGUAGE Fortran)
+  #check_float_type_representation("real(kind=4)" REAL4_TYPE_Fortran LANGUAGE Fortran)
+  #check_float_type_representation("real(kind=8)" REAL8_TYPE_Fortran LANGUAGE Fortran)
+  #check_float_type_representation("real(kind=16)" REAL16_TYPE_Fortran LANGUAGE Fortran)

   include(CheckFortranCompilerFlag)
   check_fortran_compiler_flag("-fallow-argument-mismatch" ADIOS2_USE_Fortran_flag_argument_mismatch)


gcc flags passed by nvcc were not between flags

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


Updated XLink with DLL loading improvements

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4.2-develop"
-    URL "https://github.com/luxonis/XLink/archive/72eb8ffc0a52524280bad8639a648e13079c65ef.tar.gz"
-    SHA1 "e1f6ecd0a407ab84b913d8a11e521ca5c8a0cc97"
+    URL "https://github.com/luxonis/XLink/archive/3a4eb7f17c17a996a93d7cbac25c195efeca02cc.tar.gz"
+    SHA1 "41f57904c4f9e642f505ab4ce970408bdb08eb93"
 )

 hunter_config(


add coverage build type

add coverage build type

--- cmake/ProjectHelper.cmake
+++ cmake/ProjectHelper.cmake
@@ -1,9 +1,16 @@
 set(CMAKE_CXX_FLAGS_PACKAGE ${CMAKE_CXX_FLAGS_RELEASE})
 set(CMAKE_C_FLAGS_PACKAGE ${CMAKE_CXX_FLAGS_RELEASE})

+if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
+    SET(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
+    SET(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG} --coverage")
+    SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage")
+endif ()
+
+
 if (NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE release CACHE STRING
-        "Options: None Debug Release Package RelWithDebInfo MinSizeRel." FORCE)
+        "Options: None Debug Release Package RelWithDebInfo MinSizeRel Coverage." FORCE)
     message("No CMAKE_BUILD_TYPE specified, defaulting to release")
 endif ()


don't append PACKAGE_VERSION_SUFFIX to FULL_VERSION

instead, cpack files should be modified to reference
PACKAGE_VERSION_SUFFIX directly (FULL_VERSION has other uses)

--- cmake/VersionHelper.cmake
+++ cmake/VersionHelper.cmake
@@ -18,5 +18,3 @@
 if (NOT PACKAGE_VERSION_SUFFIX)
     set(PACKAGE_VERSION_SUFFIX "")
 endif ()
-
-set(FULL_VERSION "${FULL_VERSION}${PACKAGE_VERSION_SUFFIX}")


update lite tag. (#29392)

update lite tag. (#29392)

--- cmake/external/lite.cmake
+++ cmake/external/lite.cmake
@@ -34,7 +34,7 @@
   set(LITE_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lite)

   if(NOT LITE_GIT_TAG)
-    set(LITE_GIT_TAG 6d2b2a4028a58715b01887b04eb9bff8432eb184)
+    set(LITE_GIT_TAG 345545e2ce2f3895a332be88d5c3d495d9b206d3)
   endif()

   if(NOT CUDA_ARCH_NAME)


update build script

update build script

Signed-off-by: ouyang <df059019b88c9134f42bb5d37df88a8363def2b4@gmail.com>


The client shared library major version was changed to 18, to reflect
ABI changes (Bug#60061)

Bumping the version from 16 to 18, instead of 17, was done to avoid a
library conflict on Mac OS X between MySQL 5.1 and MySQL 5.5. In MySQL
5.1 GNU libtool was used, that made the ABI version used in the file
name to be 16, and the one stored inside the binary to be 17.

MySQL 5.5 uses CMake as a build tool, that will store the same ABI
number in the file name as inside the binary in Mac OS X, and then
bumping the ABI number two steps avoids a conflict on Mac OS X.

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -17,7 +17,7 @@
 # Global constants, only to be changed between major releases.
 #

-SET(SHARED_LIB_MAJOR_VERSION "16")
+SET(SHARED_LIB_MAJOR_VERSION "18")
 SET(PROTOCOL_VERSION "10")
 SET(DOT_FRM_VERSION "6")


Link system library needed for LLVM (#1282)

--- cmake/util/FindLLVM.cmake
+++ cmake/util/FindLLVM.cmake
@@ -26,14 +26,18 @@
     execute_process(COMMAND ${LLVM_CONFIG} --includedir
       OUTPUT_VARIABLE LLVM_INCLUDE_DIRS)
     execute_process(COMMAND ${LLVM_CONFIG} --libfiles
-      OUTPUT_VARIABLE LLVM_LIBS)
+      OUTPUT_VARIABLE __llvm_libfiles)
+    execute_process(COMMAND ${LLVM_CONFIG} --system-libs
+      OUTPUT_VARIABLE __llvm_system_libs)
     execute_process(COMMAND ${LLVM_CONFIG} --cxxflags
       OUTPUT_VARIABLE __llvm_cxxflags)
     execute_process(COMMAND ${LLVM_CONFIG} --version
       COMMAND cut -b 1,3
       OUTPUT_VARIABLE TVM_LLVM_VERSION)
     string(REGEX MATCHALL "(^| )-D[A-Za-z0-9_]*" LLVM_DEFINITIONS ${__llvm_cxxflags})
-    string(STRIP ${LLVM_LIBS} LLVM_LIBS)
+    string(STRIP ${__llvm_libfiles} __llvm_libfiles)
+    string(STRIP ${__llvm_system_libs} __llvm_system_libs)
+    set(LLVM_LIBS "${__llvm_libfiles} ${__llvm_system_libs}")
     separate_arguments(LLVM_LIBS)
     string(STRIP ${LLVM_INCLUDE_DIRS} LLVM_INCLUDE_DIRS)
     string(STRIP ${TVM_LLVM_VERSION} TVM_LLVM_VERSION)


Deal with CMake policy CMP0004.

Deal with CMake policy CMP0004.

--- macros.cmake
+++ macros.cmake
@@ -106,6 +106,9 @@
   set(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS} ${FLL_LDFLAGS}")
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLL_LDFLAGS}")
   set(CEF_STANDARD_LIBS         "${CEF_STANDARD_LIBS} ${FLL_LIBS}")
+
+  # Strip leading and trailing whitepspace to deal with policy CMP0004.
+  STRING(STRIP "${CEF_STANDARD_LIBS}"    CEF_STANDARD_LIBS)
 endmacro()

 # Set SUID permissions on the specified executable.