STYLE: SuperBuild: Display one option per line

This will allow to more easily understand while options are added or
removed in the future.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -27,10 +27,37 @@
   set( USE_SYSTEM_DCMTK ON CACHE BOOL "Use system DCMTK" FORCE )
   set( USE_SYSTEM_Teem ON CACHE BOOL "Use system Teem" FORCE )
   set( BUILD_SHARED_LIBS OFF CACHE BOOL "Use shared libraries" FORCE)
-  unsetForSlicer(NAMES CMAKE_MODULE_PATH CMAKE_C_COMPILER CMAKE_CXX_COMPILER DCMTK_DIR ITK_DIR SlicerExecutionModel_DIR VTK_DIR QT_QMAKE_EXECUTABLE ITK_VERSION_MAJOR CMAKE_CXX_FLAGS CMAKE_C_FLAGS Teem_DIR)
+  unsetForSlicer(NAMES
+    CMAKE_MODULE_PATH
+    CMAKE_C_COMPILER
+    CMAKE_CXX_COMPILER
+    DCMTK_DIR
+    ITK_DIR
+    SlicerExecutionModel_DIR
+    VTK_DIR
+    QT_QMAKE_EXECUTABLE
+    ITK_VERSION_MAJOR
+    CMAKE_CXX_FLAGS
+    CMAKE_C_FLAGS
+    Teem_DIR
+    )
   find_package(Slicer REQUIRED)
-  unsetAllForSlicerBut( NAMES VTK_DIR QT_QMAKE_EXECUTABLE DCMTK_DIR Teem_DIR )
-  resetForSlicer(NAMES CMAKE_MODULE_PATH CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS CMAKE_C_FLAGS ITK_DIR SlicerExecutionModel_DIR  ITK_VERSION_MAJOR )
+  unsetAllForSlicerBut( NAMES
+    VTK_DIR
+    QT_QMAKE_EXECUTABLE
+    DCMTK_DIR
+    Teem_DIR
+    )
+  resetForSlicer(NAMES
+    CMAKE_MODULE_PATH
+    CMAKE_C_COMPILER
+    CMAKE_CXX_COMPILER
+    CMAKE_CXX_FLAGS
+    CMAKE_C_FLAGS
+    ITK_DIR
+    SlicerExecutionModel_DIR
+    ITK_VERSION_MAJOR
+    )
   if( APPLE )
     set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../../../../../")
   endif()


Replace CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES by CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES

Brad King explained at http://bugs.debian.org/683484#10 that we should not use
this variable, it is undocumented, but use CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES
instead.

--- adm/cmake/BuildToolkit.cmake
+++ adm/cmake/BuildToolkit.cmake
@@ -144,7 +144,7 @@
 		SET(non_system_paths "")
 		FOREACH(dir ${dirs})
 			LIST(FIND CMAKE_INSTALL_RPATH "${dir}" _exists)
-			LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${dir}" _isSystem)
+			LIST(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${dir}" _isSystem)
 			IF("${_exists}" LESS 0 AND "${_isSystem}" LESS 0)
 				LIST(APPEND non_system_paths "${dir}")
 			ENDIF("${_exists}" LESS 0 AND "${_isSystem}" LESS 0)


Detect changed TBB_ROOT

Detect changed TBB_ROOT

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -21,6 +21,18 @@
 ENDIF()
 IF (NOT TBB_ROOT)
   SET(TBB_ROOT $ENV{TBBROOT})
+ENDIF()
+
+# detect changed TBB_ROOT
+IF (NOT TBB_ROOT STREQUAL TBB_ROOT_LAST)
+  UNSET(TBB_INCLUDE_DIR CACHE)
+  UNSET(TBB_LIBRARY CACHE)
+  UNSET(TBB_LIBRARY_DEBUG CACHE)
+  UNSET(TBB_LIBRARY_MALLOC CACHE)
+  UNSET(TBB_LIBRARY_MALLOC_DEBUG CACHE)
+  UNSET(TBB_INCLUDE_DIR_MIC CACHE)
+  UNSET(TBB_LIBRARY_MIC CACHE)
+  UNSET(TBB_LIBRARY_MALLOC_MIC CACHE)
 ENDIF()

 IF (WIN32)
@@ -99,6 +111,8 @@
   MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC_MIC)
 ENDIF()

+SET(TBB_ROOT_LAST ${TBB_ROOT} CACHE INTERNAL "Last value of TBB_ROOT to detect changes")
+
 SET(TBB_ERROR_MESSAGE
   "Threading Building Blocks (TBB) with minimum version ${TBB_VERSION_REQUIRED} not found.
 OSPRay uses TBB as default tasking system. Please make sure you have the TBB headers installed as well (the package is typically named 'libtbb-dev' or 'tbb-devel') and/or hint the location of TBB in TBB_ROOT.
@@ -133,7 +147,7 @@
   # NOTE(jda) - TBB found in CentOS 6/7 package manager does not have debug
   #             versions of the library...silently fall-back to using only the
   #             libraries which we actually found.
-  IF (${TBB_LIBRARY_DEBUG} STREQUAL "TBB_LIBRARY_DEBUG-NOTFOUND")
+  IF (NOT TBB_LIBRARY_DEBUG)
     SET(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC})
   ELSE ()
     SET(TBB_LIBRARIES


Removed unecessary link_directories call in FindTBB

Signed-off-by: Nick Avramoussis <4c6772d20f21e1f087b814400acc0120202ec49e@dneg.com>

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -315,13 +315,6 @@
   ENDFOREACH ()
   LIST ( REMOVE_DUPLICATES Tbb_LIBRARY_DIRS )

-  # CMake sometimes struggles to follow TBB's imported target, as libtbb.so
-  # is usually just a file which defines "INPUT (libtbb.so.2)". As it's not
-  # a symlink, we need to include this directory manually incase it's not on
-  # the environment library path
-
-  LINK_DIRECTORIES ( ${Tbb_LIBRARY_DIRS} )
-
   # Configure imported targets

   FOREACH ( COMPONENT ${TBB_FIND_COMPONENTS} )


cmake: headers: fixed paths

cmake: headers: fixed paths

cmake: headers: added the path to the generated c-ares
headers.

cmake: headers: changed the static jansson path with the
variable the same way the others so it doesn't have to be
changed next time the library gets updated.

Signed-off-by: Leonardo Alminana <7610bae85f2b530654cc716772f1fe653373e892@calyptia.com>

--- cmake/headers.cmake
+++ cmake/headers.cmake
@@ -20,7 +20,8 @@
   ${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_SNAPPY}
   ${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_CMETRICS}/include
   ${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_CARES}/include
-  ${CMAKE_CURRENT_BINARY_DIR}/lib/jansson-fd3e9e3/include
+  ${CMAKE_CURRENT_BINARY_DIR}/${FLB_PATH_LIB_CARES}
+  ${CMAKE_CURRENT_BINARY_DIR}/${FLB_PATH_LIB_JANSSON}/include
   ${CMAKE_CURRENT_BINARY_DIR}/include
   )


flat_namespace results in exception not being handled properly for osx_gcc build

--- cmake/osx_gcc.cmake
+++ cmake/osx_gcc.cmake
@@ -38,7 +38,9 @@
 SET (ZLIB_ARCHIVE "-lz")
 SET (SYMDIFF_ARCHIVE ${EXTERNAL_LIB}/symdiff/lib/libsymdiff_static.a)
 SET (SYMDIFF_INCLUDE ${EXTERNAL_LIB}/symdiff/include)
-SET (ADD_LINKER_FLAGS " -flat_namespace")
+# FLAT NAMESPACE CAUSES AN ABORT WHEN EXCEPTIONS ARE THROWN
+# For Example: https://github.com/elemental/Elemental/issues/203
+#SET (ADD_LINKER_FLAGS " -flat_namespace")
 #SET (ADD_RPATH "@executable_path/../lib")
 #ENDIF (${DEVSIM_CONFIG} STREQUAL "osx_10.9")


cmake: emu: ensure that QEMU_PIPE is set when using sysbuild

Ensure that QEMU_PIPE variable is set when using sysbuild. This is required
because twister will use the "main" sysbuild application as the target for
"ninja run" when testing QEMU targets, which means that the "main" build
must be aware of any QEMU_PIPE setting passed by twister at build time.

Signed-off-by: Daniel DeGrasse <002dd1d4ac44ebb71088aae93501e62b784ed821@nxp.com>

--- cmake/emu/qemu.cmake
+++ cmake/emu/qemu.cmake
@@ -54,6 +54,8 @@
   list(APPEND QEMU_FLAGS qemu${QEMU_INSTANCE}.pid)
 endif()

+# If running with sysbuild, we need to ensure this variable is populated
+zephyr_get(QEMU_PIPE)
 # Set up chardev for console.
 if(QEMU_PTY)
   # Redirect console to a pseudo-tty, used for running automated tests.


cmake: qemu: Use chardev for console

cmake: qemu: Use chardev for console

The current QEMU console configuration directly connects the console
serial port to the backend using '-serial' option.

This is less than ideal because only single console instance can be
connected to a backend and aggregation of multiple console outputs is
not possible (e.g. multiple console serial ports and semihosting
console to single console backend).

In order to solve this problem, single multiplexed chardev console
backend is declared and all consoles are connected to it.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/emu/qemu.cmake
+++ cmake/emu/qemu.cmake
@@ -35,33 +35,23 @@
   list(APPEND QEMU_FLAGS qemu${QEMU_INSTANCE}.pid)
 endif()

-# We can set "default" value for QEMU_PTY & QEMU_PIPE on cmake invocation.
+# Set up chardev for console.
 if(QEMU_PTY)
-  # Send console output to a pseudo-tty, used for running automated tests
-  set(CMAKE_QEMU_SERIAL0 pty)
-else()
-  if(QEMU_PIPE)
-    # Send console output to a pipe, used for running automated tests
-    set(CMAKE_QEMU_SERIAL0 pipe:${QEMU_PIPE})
-  else()
-    set(CMAKE_QEMU_SERIAL0 mon:stdio)
-  endif()
-endif()
-
-# But also can set QEMU_PTY & QEMU_PIPE on *make* (not cmake) invocation,
-# like it was before cmake.
-if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
-  list(APPEND QEMU_FLAGS
-    -serial
-    \${if \${QEMU_PTY}, pty, \${if \${QEMU_PIPE}, pipe:\${QEMU_PIPE}, ${CMAKE_QEMU_SERIAL0}}}
-    # NB: \$ is not supported by Ninja
-    )
-else()
-  list(APPEND QEMU_FLAGS
-    -serial
-    ${CMAKE_QEMU_SERIAL0}
-    )
-endif()
+  # Redirect console to a pseudo-tty, used for running automated tests.
+  list(APPEND QEMU_FLAGS -chardev pty,id=con,mux=on)
+elseif(QEMU_PIPE)
+  # Redirect console to a pipe, used for running automated tests.
+  list(APPEND QEMU_FLAGS -chardev pipe,id=con,mux=on,path=${QEMU_PIPE})
+else()
+  # Redirect console to stdio, used for manual debugging.
+  list(APPEND QEMU_FLAGS -chardev stdio,id=con,mux=on)
+endif()
+
+# Connect main serial port to the console chardev.
+list(APPEND QEMU_FLAGS -serial chardev:con)
+
+# Connect monitor to the console chardev.
+list(APPEND QEMU_FLAGS -mon chardev=con,mode=readline)

 # Add a BT serial device when building for bluetooth, unless the
 # application explicitly opts out with NO_QEMU_SERIAL_BT_SERVER.


Update 0.7.0

Update 0.7.0

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -23,7 +23,7 @@
 endif ()

 set (PACKAGE_NAME        "${CMAKE_PROJECT_NAME}")
-set (PACKAGE_VERSION     "0.6.1.${GIT_CHECKIN_COUNT}")
+set (PACKAGE_VERSION     "0.7.0.${GIT_CHECKIN_COUNT}")
 set (PACKAGE_STRING      "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set (PACKAGE_TARNAME     "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 set (PACKAGE_BUGREPORT   "https://github.com/Qihoo360/evpp/issues")


Fixed bug with ARM_TARGET caching

Fixed bug with ARM_TARGET caching

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -221,13 +221,15 @@

 #setup build targets, mutually exclusive
 set( PossibleArmTargets "armeabi;armeabi-v7a;armeabi-v7a with NEON;armeabi-v7a with VFPV3" )
-set( ARM_TARGET "armeabi-v7a" CACHE INTERNAL "the arm target for android, recommend armeabi-v7a for floating point support and NEON." )
-set_property( CACHE ARM_TARGET PROPERTY STRINGS ${PossibleArmTargets} )
-
 #compatibility junk for previous version of toolchain
 if( DEFINED ARM_TARGETS AND NOT DEFINED ARM_TARGET )
- SET( ARM_TARGET "${ARM_TARGETS}" )
-endif()
+ set( ARM_TARGET "${ARM_TARGETS}" )
+endif()
+IF( NOT ARM_TARGET)
+ set( ARM_TARGET armeabi-v7a )
+ENDIF()
+set( ARM_TARGET "${ARM_TARGET}" CACHE INTERNAL "the arm target for android, recommend armeabi-v7a for floating point support and NEON." )
+set_property( CACHE ARM_TARGET PROPERTY STRINGS ${PossibleArmTargets} )

 #set these flags for client use
 if( ARM_TARGET STREQUAL "armeabi" )


Remove FindTbui cmake script.

Remove FindTbui cmake script.

--- cmake/TbagFindPackage/FindTbui.cmake
+++ cmake/TbagFindPackage/FindTbui.cmake
@@ -1,37 +0,0 @@
-## Find the libtbag-ui library.
-#
-# The following variables are optionally searched for defaults
-#  Tbui_ROOT
-#
-# The following are set after configuration is done:
-#  Tbui_FOUND
-#  Tbui_INCLUDE_DIRS
-#  Tbui_LIBRARIES
-
-if (Tbui_FOUND)
-    return ()
-endif ()
-
-set (__headers "libtbui/libtbui.h")
-set (__libs    "tbui")
-
-if (IS_DIRECTORY "$ENV{TBAG_HOME}")
-    if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
-        set (__build_type_lower debug)
-    else ()
-        string (TOLOWER ${CMAKE_BUILD_TYPE} __build_type_lower)
-    endif ()
-
-    set (Tbui_ROOT_INCLUDE_PATHS "$ENV{TBAG_HOME}")
-    set (Tbui_ROOT_LIBRARY_PATHS "$ENV{TBAG_HOME}/build"
-                                 "$ENV{TBAG_HOME}/build-${__build_type_lower}"
-                                 "$ENV{TBAG_HOME}/cmake-build-${__build_type_lower}")
-endif ()
-
-include (TbagSimpleFindLibrary)
-tbag_simple_find_library_with_module_prefix ("${__headers}" "${__libs}")
-
-if (Tbui_FOUND)
-    message (STATUS "Found Tbui: ${Tbui_LIBRARIES}")
-endif ()
-


bugfixed OpenCV install for newer MSVC OpenCV-builds

--- cmake/jkqtplotter_deployopencv.cmake
+++ cmake/jkqtplotter_deployopencv.cmake
@@ -1,12 +1,20 @@
 function(jkqtplotter_deployopencv TARGET_NAME)
-    #use windeploy
     if(OpenCV_FOUND)
         if(WIN32)
-            add_custom_command(TARGET ${EXENAME} POST_BUILD        # Adds a post-build event the TARGET
-                    COMMAND ${CMAKE_COMMAND} -E copy_directory
-                    "${_OpenCV_LIB_PATH}"
-                    $<TARGET_FILE_DIR:${EXENAME}>
+            if (EXISTS ${_OpenCV_LIB_PATH})
+              add_custom_command(TARGET ${EXENAME} POST_BUILD        # Adds a post-build event the TARGET
+                      COMMAND ${CMAKE_COMMAND} -E copy_directory
+                      "${_OpenCV_LIB_PATH}"
+                      "$<TARGET_FILE_DIR:${EXENAME}>"
                     )
+            endif()
+            if (EXISTS ${OpenCV_INSTALL_PATH}/bin)
+              add_custom_command(TARGET ${EXENAME} POST_BUILD        # Adds a post-build event the TARGET
+                      COMMAND ${CMAKE_COMMAND} -E copy_directory
+                      "${OpenCV_INSTALL_PATH}/bin"
+                      "$<TARGET_FILE_DIR:${EXENAME}>"
+                    )
+            endif()
         endif(WIN32)
      endif(OpenCV_FOUND)
 endfunction(jkqtplotter_deployopencv)


Allow overwriting of CMAKE_FIND_ROOT_PATH_MODE_LIBRARY & INCLUDE (#125)

This matches the behaviour of the Android toolchain cmake file and it allows providing self-compiled libraries (not part of vitasdk/vdpm)

--- cmake_toolchain/vita.toolchain.cmake
+++ cmake_toolchain/vita.toolchain.cmake
@@ -109,5 +109,9 @@
 set( CMAKE_INSTALL_PREFIX "${VITASDK}/arm-vita-eabi" CACHE PATH "default install path" )

 # only search for libraries and includes in vita toolchain
-set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+if( NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY )
+  set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+endif()
+if( NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE )
+  set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+endif()


Minor update for zlib search

Minor update for zlib search

--- cmake/OpenCVFindLibsGrfmt.cmake
+++ cmake/OpenCVFindLibsGrfmt.cmake
@@ -7,11 +7,11 @@
   ocv_clear_vars(ZLIB_FOUND)
 else()
   include(FindZLIB)
+  if(ZLIB_VERSION_STRING)
+    #cmake 2.8.2 bug - it fails to determine zlib version
+    unset(ZLIB_VERSION_STRING CACHE)
+  endif()
   if(ZLIB_FOUND)
-    if(ZLIB_VERSION_STRING)
-      #cmake 2.8.2 bug - it fails to determine zlib version
-      unset(ZLIB_VERSION_STRING CACHE)
-    endif()
     ocv_parse_header2(ZLIB "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_VERSION "")
   endif()
   if(ZLIB_FOUND AND ANDROID)


Add Lua 5.1.5-p0

Add Lua 5.1.5-p0

--- cmake/projects/Lua/hunter.cmake
+++ cmake/projects/Lua/hunter.cmake
@@ -30,6 +30,17 @@
     6512fca43e01209f6e69803558d346ea767e52fc
 )

+hunter_add_version(
+    PACKAGE_NAME
+    Lua
+    VERSION
+    "5.1.5-p0"
+    URL
+    "https://github.com/hunter-packages/lua/archive/v5.1.5-p0.tar.gz"
+    SHA1
+    70005ecaca16c155e684d966fc3e2b6ce8a70d6f
+)
+
 hunter_cacheable(Lua)
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_download(PACKAGE_NAME Lua)


Fix build warings in linux Fedora 17

Fix build warings in linux Fedora 17

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3465 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyPython.cmake
+++ trunk/cmake-modules/FindThirdPartyPython.cmake
@@ -33,18 +33,18 @@
 	IF(PYTHONLIBS_FOUND)
 		MESSAGE(STATUS "  Found Python...")
 		INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
-
-		FOREACH(PYTHON_LIB ${PYTHON_LIBRARIES})
-			SET(PYTHON_LIB1 "PYTHON_LIB1-NOTFOUND")
-			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS NO_DEFAULT_PATH)
-			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS "/")
-			IF(PYTHON_LIB1)
-				MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB1}")
-				TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB1})
-			ELSE(PYTHON_LIB1)
-				MESSAGE(STATUS "    [FAILED] Third party lib ${PYTHON_LIB}")
-			ENDIF(PYTHON_LIB1)
-		ENDFOREACH(PYTHON_LIB)
+		TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIBRARIES})
+#		FOREACH(PYTHON_LIB ${PYTHON_LIBRARIES})
+#			SET(PYTHON_LIB1 "PYTHON_LIB1-NOTFOUND")
+#			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS NO_DEFAULT_PATH)
+#			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS "/")
+#			IF(PYTHON_LIB1)
+#				MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB1}")
+#				TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB1})
+#			ELSE(PYTHON_LIB1)
+#				MESSAGE(STATUS "    [FAILED] Third party lib ${PYTHON_LIB}")
+#			ENDIF(PYTHON_LIB1)
+#		ENDFOREACH(PYTHON_LIB)

 		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
 	ELSE(PYTHONLIBS_FOUND)


ql: pp3: don't limit graph for pp3 devices

Signed-off-by: Paweł Czarnecki <be3a62494a976d1435cc0900bd9adf3fa1029787@antmicro.com>

--- quicklogic/common/cmake/quicklogic_device.cmake
+++ quicklogic/common/cmake/quicklogic_device.cmake
@@ -231,6 +231,7 @@
     VPR_DB_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${VPR_DB_FILE}
     CELLS_SIM ${CMAKE_CURRENT_SOURCE_DIR}/${RAM_CELLS_SIM}
     CELLS_MAP ${CMAKE_CURRENT_SOURCE_DIR}/${RAM_CELLS_MAP}
+    LIMIT_GRAPH_TO_DEVICE FALSE
   )

 endfunction()


the sample project now allows you to specify the URL of a ramalloc source archive.

--- src/sample/cmake/ramalloc.cmake
+++ src/sample/cmake/ramalloc.cmake
@@ -48,9 +48,12 @@
 	${DOXYGEN_FOUND})

 if(RAMALLOC_DOWNLOAD)
-	find_package(Git REQUIRED)
+	find_package(Git)
 endif()

+set(RAMALLOC_URL IGNORE
+	CACHE STRING
+	"a URL describing where to download an installation archive from. set to IGNORE if you wish to fetch with git.")
 set(RAMALLOC_GIT_REPOSITORY "git://github.com/fmrl/ramalloc.git"
 	CACHE STRING
 	"a URL describing where the ramalloc git repository is located.")
@@ -66,15 +69,28 @@
 find_library(RAMALLOC_LIBRARY libramalloc.a DOC ${RAMALLOC_STATIC_LIBRARY_DOC})

 if(NOT RAMALLOC_LIBRARY AND NOT RAMALLOC_DOWNLOAD)
-	message(WARNING "i couldn't find ramalloc on your system. set RAMALLOC_DOWNLOAD=1 if you would like me to download and install it for you.")
+	message(SEND_ERROR "i couldn't find ramalloc on your system. set RAMALLOC_DOWNLOAD=1 if you would like me to download and install it for you.")
 elseif(RAMALLOC_LIBRARY STREQUAL ${RAMALLOC_BINDIR_PREFIX}/lib/${RAMALLOC_STATIC_LIBRARY_NAME}
 		OR NOT RAMALLOC_LIBRARY)
 	if(NOT RAMALLOC_IS_A_TARGET AND RAMALLOC_DOWNLOAD)
+		if(RAMALLOC_URL)
+			set(download_args
+				URL ${RAMALLOC_URL}
+				)
+		elseif(GIT_FOUND)
+			set(download_args
+				GIT_TAG ${RAMALLOC_GIT_TAG}
+				GIT_REPOSITORY ${RAMALLOC_GIT_REPOSITORY}
+				)
+		else()
+			message(SEND_ERROR
+				"if you want me to download ramalloc, you must either install git or provide the URL of an installation archive.")
+		endif()
+
 		include(ExternalProject)
 		ExternalProject_Add(ramalloc
 			PREFIX ${RAMALLOC_BINDIR_PREFIX}
-			GIT_TAG ${RAMALLOC_GIT_TAG}
-			GIT_REPOSITORY ${RAMALLOC_GIT_REPOSITORY}
+			${download_args}
 			CMAKE_ARGS
 				-DCMAKE_INSTALL_PREFIX:path=${RAMALLOC_BINDIR_PREFIX}
 				-DTRIO_DOWNLOAD:bool=YES


STYLE: Add required packages to the External project Qt5

--- SuperBuild/External_Qt5.cmake
+++ SuperBuild/External_Qt5.cmake
@@ -41,6 +41,8 @@
 # project may depend on ${extProjName}, let's add an 'empty' one
 SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")

+find_package(Qt5 COMPONENTS Core Widgets Svg OpenGL REQUIRED)
+
 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS
     QT_QMAKE_EXECUTABLE:PATH
     QT_MOC_EXECUTABLE:PATH


fix \ and / on Windows

fix \ and / on Windows

--- cmake/PythonNumpyPybind11.cmake
+++ cmake/PythonNumpyPybind11.cmake
@@ -36,7 +36,7 @@
 execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
         "import sys;\
         from distutils import sysconfig;\
-        sys.stdout.write(sysconfig.get_config_var('LIBDIR') or sysconfig.get_python_lib())"
+        sys.stdout.write((sysconfig.get_config_var('LIBDIR') or sysconfig.get_python_lib()).replace('\\\\','/'))"
         OUTPUT_VARIABLE PYTHON_LIBRARY_DIR)

 find_library(PYTHON_LIBRARY NAMES python${PYTHON_VERSION} python${PYTHON_VERSION}m PATHS ${PYTHON_LIBRARY_DIR}


[fixed] AddFortranTest indentation of end-test-char }

--- src/t123/cmake/AddFortranTest.cmake
+++ src/t123/cmake/AddFortranTest.cmake
@@ -27,6 +27,10 @@
   STRING(REPLACE "." "_" test_name "${test_file}" )

   # First, we need to copy the file in.
+  IF( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${test_file}" )
+    MESSAGE(FATAL_ERROR "[Testing123] test file for AddFortranTest(${CMAKE_CURRENT_SOURCE_DIR}/${test_file}) does not exist!")
+  ENDIF()
+
   TRIBITS_COPY_FILES_TO_BINARY_DIR( COPY_${test_name}
       SOURCE_FILES
         ${test_file}
@@ -57,7 +61,7 @@
   # track of line numbers DESPITE having expanded } to two lines!
   SET( copied_n_file "${CMAKE_CURRENT_BINARY_DIR}/${test_name}.newline.f90" )
   FILE( GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${test_name}.newline.cmake" CONTENT
-  "FILE( READ \"${copied_file}\" temp )\nSTRING( REPLACE \"{\" \"\" temp \"\${temp}\")\nSTRING( REGEX REPLACE \"[\\n] *![^\\n]*\" \"\\n\" temp \"\${temp}\")\nSTRING( REGEX REPLACE \"\\n}\" \";end subroutine\n\#include \\\"t123/internal/TEST_END.f90i\\\"\" temp \"\${temp}\")\nFILE( WRITE \"${copied_n_file}\" \"\${temp}\" )"
+  "FILE( READ \"${copied_file}\" temp )\nSTRING( REPLACE \"{\" \"\" temp \"\${temp}\")\nSTRING( REGEX REPLACE \"[\\n] *![^\\n]*\" \"\\n\" temp \"\${temp}\")\nSTRING( REGEX REPLACE \"\\n *}\" \";end subroutine\n\#include \\\"t123/internal/TEST_END.f90i\\\"\" temp \"\${temp}\")\nFILE( WRITE \"${copied_n_file}\" \"\${temp}\" )"
   )
   ADD_CUSTOM_COMMAND(
     OUTPUT ${copied_n_file}


Tune cuda architectures (#8152)

Tune cuda architectures (#8152)

--- cmake/Utils.cmake
+++ cmake/Utils.cmake
@@ -91,21 +91,21 @@
   # Set up architecture flags
   if(NOT flags)
     if (CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
-      set(flags "52;60;61;70;75;80;86")
+      set(flags "50;60;70;80")
     elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
-      set(flags "52;60;61;70;75;80")
+      set(flags "50;60;70;80")
     elseif(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
-      set(flags "35;50;52;60;61;70;75")
+      set(flags "35;50;60;70")
     elseif(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
-      set(flags "35;50;52;60;61;70")
+      set(flags "35;50;60;70")
     else()
-      set(flags "35;50;52;60;61")
+      set(flags "35;50;60")
     endif()
   endif()

   if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
     cmake_policy(SET CMP0104 NEW)
-    list(POP_BACK flags latest_arch)
+    list(GET flags -1 latest_arch)
     list(TRANSFORM flags APPEND "-real")
     list(APPEND flags ${latest_arch})
     set(CMAKE_CUDA_ARCHITECTURES ${flags})


limix.cmake for windows

limix.cmake for windows

--- cmake/limix.cmake
+++ cmake/limix.cmake
@@ -17,6 +17,26 @@
         message(${MSG})
     endforeach()
 endfunction(display_welcome)
+
+macro(limix_windows_config)
+    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+    set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+    add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+    add_definitions(-Dinline=__inline)
+
+    set(CompilerFlags
+        CMAKE_CXX_FLAGS
+        CMAKE_CXX_FLAGS_DEBUG
+        CMAKE_CXX_FLAGS_RELEASE
+        CMAKE_C_FLAGS
+        CMAKE_C_FLAGS_DEBUG
+        CMAKE_C_FLAGS_RELEASE)
+
+    foreach(CompilerFlag ${CompilerFlags})
+        string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
+    endforeach()
+endmacro(limix_windows_config)

 macro(limix_config)
     enable_testing()
@@ -39,10 +59,7 @@

     # Windows specific common configuration
     if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-      set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
-      add_definitions(-D_CRT_SECURE_NO_WARNINGS)
-      add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
-      add_definitions(-Dinline=__inline)
+        limix_windows_config()
     endif()

     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
@@ -109,9 +126,10 @@
     add_executable(${NAME} ${SOURCES})
     target_link_libraries(${NAME} ${LIBRARY})
     add_test(test_${NAME} ${NAME} -E environment)
+    file(TO_CMAKE_PATH "$ENV{PATH}" MYPATH)

-    file(TO_CMAKE_PATH "$ENV{PATH}" MYPATH)
     list(APPEND MYPATH ${CMAKE_BINARY_DIR})
+    list(APPEND MYPATH ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
     string(REPLACE ";" "\\;" MYPATH "${MYPATH}")

     set_property(TEST test_${NAME} APPEND PROPERTY ENVIRONMENT


OpenBLAS from conda causing undefined references on Clang

Former-commit-id: c904d24c6d565971bcfc211368fde5ac66ab252b

--- cmake-modules/FindOpenBLAS.cmake
+++ cmake-modules/FindOpenBLAS.cmake
@@ -5,8 +5,7 @@
     # the hints.
     # This means we are more likely to build it from source on Clang.
     if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-        set(OPENBLAS_HINTS /usr   $ENV{EBROOTOPENBLAS})
-#        set(OPENBLAS_HINTS /usr ${CMAKE_INSTALL_PREFIX} $ENV{EBROOTOPENBLAS})
+        set(OPENBLAS_HINTS /usr ${CMAKE_INSTALL_PREFIX} $ENV{EBROOTOPENBLAS})
         set(NO_DEFAULT_PATH NO_DEFAULT_PATH)
     else()
         set(OPENBLAS_HINTS ${CMAKE_INSTALL_PREFIX} $ENV{EBROOTOPENBLAS} ${CONDA_HINTS})
@@ -68,13 +67,14 @@
                 )
         find_path(OpenBLAS_INCLUDE_DIRS
                 NAMES openblas_config.h
-                HINTS ${CMAKE_INSTALL_PREFIX} $ENV{EBROOTOPENBLAS} ${CONDA_HINTS}
+                HINTS ${OPENBLAS_HINTS}
                 PATHS
                     $ENV{EBROOTBLAS}
                     $ENV{BLAS_DIR}
                     $ENV{BLAS_ROOT}
                 PATH_SUFFIXES
                     include openblas openblas/include OpenBLAS OpenBLAS/include blas/include include/x86_64-linux-gnu
+                ${NO_DEFAULT_PATH}
                 )
         if (OpenBLAS_LIBRARIES AND OpenBLAS_INCLUDE_DIRS)
             add_library(openblas::openblas STATIC IMPORTED)


android build: don't set WITH_OPENSLES in options

WITH_OPENSLES is automatically set by find_feature

--- cmake/ConfigOptionsAndroid.cmake
+++ cmake/ConfigOptionsAndroid.cmake
@@ -21,11 +21,10 @@
 endif()

 option(WITH_DEBUG_ANDROID_JNI "Enable debug output for android jni bindings" ${DEFAULT_DEBUG_OPTION})
-option(WITH_OPENSLES "Enable sound and microphone redirection using OpenSLES" ON)
 option(ANDROID_BUILD_JAVA "Automatically android java code - build type depends on CMAKE_BUILD_TYPE" ON)
 option(ANDROID_BUILD_JAVA_DEBUG "Create a android debug package" ${JAVA_DEBUG_DEFAULT})

 set(ANDROID_APP_TARGET_SDK 11 CACHE STRING "Application target android SDK")
 set(ANDROID_APP_MIN_SDK 9 CACHE STRING "Application minimum android SDK requirement")
 set(ANDROID_APP_GOOGLE_TARGET_SDK "16" CACHE STRING "Application target google SDK")
-
+set(ANDROID_NATIVE_API_LEVEL "9" CACHE STRING "Android API level for native code")


Add check for capn proto version 0.6.1 (#1875)

* Fix whitespace

* Fix error caused by rebase

Co-authored-by: joe maley <16a9a54ddf4259952e3c118c763138e83693d7fd@tiledb.io>

--- cmake/Modules/FindCapnp_EP.cmake
+++ cmake/Modules/FindCapnp_EP.cmake
@@ -45,6 +45,7 @@
   endif()

   find_package(CapnProto
+    0.6.1 EXACT
     PATHS ${TILEDB_EP_INSTALL_PREFIX}
     ${TILEDB_CAPNP_NO_DEFAULT_PATH}
     )
@@ -170,4 +171,4 @@
   else()
     message(FATAL_ERROR "Unable to find Capnp")
   endif()
-endif()
+endif()


CMake: improve FindHeeksCAD module

CMake: improve FindHeeksCAD module

  * Use a cleaner method to find from multiple paths
  * Add "/usr/local/share/heekscad" to searched paths: HeeksCAD now install its sources there (with default prefix: /usr/local)
  * Add "/usr/share/heekscad" to searched paths: HeeksCAD now install its sources there (with most linux distributions prefix: /usr)

--- cmake/Modules/FindHeeksCAD.cmake
+++ cmake/Modules/FindHeeksCAD.cmake
@@ -9,19 +9,18 @@
 #

 IF(NOT HeeksCAD_FOUND)
-   # Will try to find at standard locations
-   FIND_PATH(HeeksCAD_SRC_DIR src/Geom.h PATH_SUFFIXES heekscad)
+  SET( SEARCH_PATHS
+    "/usr/local/share/heekscad"
+    "/usr/share/heekscad"
+    "${CMAKE_SOURCE_DIR}/heekscad"
+    "${CMAKE_SOURCE_DIR}/.."
+    "${CMAKE_SOURCE_DIR}/../heekscad"
+  )
+
+  FIND_PATH( HeeksCAD_SRC_DIR interface/Geom.cpp PATHS ${SEARCH_PATHS} DOC "Path to HeeksCAD includes" )
+  IF( NOT HeeksCAD_SRC_DIR )
+      MESSAGE( FATAL_ERROR "Cannot find HeeksCAD sources dir." )
+  ENDIF( NOT HeeksCAD_SRC_DIR )
+
+  MESSAGE( STATUS "HeeksCAD_SRC_DIR:     " ${HeeksCAD_SRC_DIR} )
 ENDIF(NOT HeeksCAD_FOUND)
-
-MESSAGE( STATUS "HeeksCAD_SRC_DIR:     " ${HeeksCAD_SRC_DIR} )
-
-IF( HeeksCAD_SRC_DIR STREQUAL HeeksCAD_SRC_DIR-NOTFOUND )
-  # try to find at heekscad/ location then ../
-  FIND_PATH( HeeksCAD_SRC_DIR src/Geom.h PATHS "${CMAKE_SOURCE_DIR}/heekscad" "${CMAKE_SOURCE_DIR}/.." "${CMAKE_SOURCE_DIR}/../heekscad"DOC "Path to HeeksCAD includes" )
-  #FIND_PATH( HeeksCAD_SRC_DIR src/Geom.h PATHS "${CMAKE_SOURCE_DIR}/heekscad" DOC "Path to HeeksCAD includes" )
-  IF( HeeksCAD_SRC_DIR STREQUAL Geom.h-NOTFOUND )
-    MESSAGE( FATAL_ERROR "Cannot find HeeksCAD sources dir." )
-   ENDIF( HeeksCAD_SRC_DIR STREQUAL Geom.h-NOTFOUND )
-ENDIF(HeeksCAD_SRC_DIR STREQUAL HeeksCAD_SRC_DIR-NOTFOUND )
-
-MESSAGE( STATUS "HeeksCAD_SRC_DIR:     " ${HeeksCAD_SRC_DIR} )


emscripten compiler settings tweaks

emscripten compiler settings tweaks

--- cmake/emscripten.toolchain.cmake
+++ cmake/emscripten.toolchain.cmake
@@ -19,7 +19,7 @@
 set(EMSCRIPTEN_TOTAL_MEMORY 134217728)
 set(EMSCRIPTEN_TOTAL_MEMORY_WORKER 16777216)
 set(EMSCRIPTEN_USE_MEMORY_INIT_FILE 1)
-set(EMSCRIPTEN_USE_LTO 1)
+set(EMSCRIPTEN_LTO_LEVEL 3)
 set(EMSCRIPTEN_USE_CLOSURE 1)
 set(EMSCRIPTEN_ASSERTIONS 0)
 set(EMSCRIPTEN_BUILD_VERBOSE 0)
@@ -28,7 +28,7 @@
 message("EMSCRIPTEN_TOTAL_MEMORY: ${EMSCRIPTEN_TOTAL_MEMORY}")
 message("EMSCRIPTEN_TOTAL_MEMORY_WORKER: ${EMSCRIPTEN_TOTAL_MEMORY_WORKER}")
 message("EMSCRIPTEN_USE_MEMORY_INIT_FILE: ${EMSCRIPTEN_USE_MEMORY_INIT_FILE}")
-message("EMSCRIPTEN_USE_LTO: ${EMSCRIPTEN_USE_LTO}")
+message("EMSCRIPTEN_LTO_LEVEL: ${EMSCRIPTEN_LTO_LEVEL}")
 message("EMSCRIPTEN_USE_CLOSURE: ${EMSCRIPTEN_USE_CLOSURE}")
 message("EMSCRIPTEN_ASSERTIONS: ${EMSCRIPTEN_ASSERTIONS}")
 message("EMSCRIPTEN_OUTLINING_LIMIT: ${EMSCRIPTEN_OUTLINING_LIMIT}")
@@ -92,22 +92,22 @@

 # c++ compiler flags
 set(CMAKE_CXX_FLAGS "${ORYOL_PLATFORM_DEFINES} -std=c++11 -stdlib=libstdc++ -fno-exceptions -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
-set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")

 # c compiler flags
 set(CMAKE_C_FLAGS "${ORYOL_PLATFORM_DEFINES} -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
-set(CMAKE_C_FLAGS_RELEASE "-Os -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")

 # linker flags
 set(CMAKE_EXE_LINKER_FLAGS "--memory-init-file ${EMSCRIPTEN_USE_MEMORY_INIT_FILE} -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=1")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Os --llvm-lto ${EMSCRIPTEN_USE_LTO} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")

 # dynamic lib linker flags
 set(CMAKE_SHARED_LINKER_FLAGS "-shared --memory-init-file 0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=1")
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Os --llvm-lto ${EMSCRIPTEN_USE_LTO} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")

 # update cache variables for cmake gui


Remove obsolete linker flag for Bebop build

The pthread linker flags were changed in c6a2641 and it was questioned in #5504 if the
exception for the Bebop is necessary. It is not, so remove those lines from the cmake
file.

--- cmake/posix/px4_impl_posix.cmake
+++ cmake/posix/px4_impl_posix.cmake
@@ -174,16 +174,6 @@
                 mavlink/include/mavlink
                 )

-# This block sets added_exe_linker_flags.
-if ("${BOARD}" STREQUAL "bebop")
-	# Use the -pthread if the firmware is build for the parrot bebop.
-	# This resolves some linker errors in DriverFramework, when building
-	# a static target.
-	set(added_exe_linker_flags "-pthread")
-else()
-	set(added_exe_linker_flags)
-endif()
-
 # This block sets added_definitions and added_cxx_flags.
 if(UNIX AND APPLE)
         set(added_definitions
@@ -228,6 +218,8 @@

 endif()

+set(added_exe_linker_flags)
+
 # This block sets added_c_flags (appends to others).
 if ("${BOARD}" STREQUAL "eagle" OR "${BOARD}" STREQUAL "excelsior")


SDL2 "2.0.4-urho-p2"

SDL2 "2.0.4-urho-p2"

--- cmake/projects/SDL2/hunter.cmake
+++ cmake/projects/SDL2/hunter.cmake
@@ -105,6 +105,16 @@
         a3550bae876c3b6ca7c160a2ee583f04cb38207a
 )

+hunter_add_version(
+        PACKAGE_NAME
+        SDL2
+        VERSION
+        "2.0.4-urho-p2"
+        URL
+        "https://github.com/hunter-packages/SDL2/archive/v2.0.4-urho-p2.tar.gz"
+        SHA1
+        0d78d5fa59fb009e3ce9125cc518891889d09451
+)

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(SDL2)


REFAC: remove DiapOTB from OTB CI (for now)

--- CI/configure_options.cmake
+++ CI/configure_options.cmake
@@ -77,7 +77,7 @@
 set(cmake_configure_option
 "${cmake_configure_option}
 CMAKE_PREFIX_PATH=${XDK_PATH}")
-foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM DiapOTBModule S1TilingSupportApplications)
+foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM S1TilingSupportApplications) #DiapOTBModule
   set(cmake_configure_option
 "${cmake_configure_option}
 Module_${remote_module}:BOOL=ON")


STYLE: mark the two options as advanced

Alex

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -97,9 +97,10 @@

 MACRO(PYTHON_ADD_MODULE _NAME )
   OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
+  OPTION(PYTHON_MODULE_${_NAME}_SHARED "Add module ${_NAME} shared" FALSE)
+  MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME} PYTHON_MODULE_${_NAME}_SHARED)

   IF(PYTHON_ENABLE_MODULE_${_NAME})
-    OPTION(PYTHON_MODULE_${_NAME}_SHARED "Add module ${_NAME} shared" FALSE)
     IF(PYTHON_MODULE_${_NAME}_SHARED)
       SET(PY_MODULE_TYPE MODULE)
     ELSE(PYTHON_MODULE_${_NAME}_SHARED)


Let macro find TclTk version 8.6

Let macro find TclTk version 8.6

Change-Id: Iaf16f371c9e8767bd85f155e863aa92229234abe

--- CMake/vtkTclTkMacros.cmake
+++ CMake/vtkTclTkMacros.cmake
@@ -20,7 +20,7 @@
   ELSE (TK_INTERNAL_PATH)
     SET (try_tk_internal_path ${VTK_TK_INTERNAL_DIR})
   ENDIF (TK_INTERNAL_PATH)
-  FOREACH (tcl_tk_minor_version_try "2" "3" "4" "5")
+  FOREACH (tcl_tk_minor_version_try "2" "3" "4" "5" "6")
     IF ("${try_tk_internal_path}" MATCHES "tk8\\.?${tcl_tk_minor_version_try}")
       SET (${tcl_tk_major_version} "8")
       SET (${tcl_tk_minor_version} ${tcl_tk_minor_version_try})


revert FindMKL

revert FindMKL

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -94,6 +94,7 @@
   PATHS
     /opt/intel
     /opt/intel/mkl
+    /opt/intel/oneapi/mkl/latest
     $ENV{MKLROOT}
     /opt/intel/compilers_and_libraries/linux/mkl
     /usr/include/mkl
@@ -223,6 +224,9 @@
         /opt/intel/mkl/lib
         /opt/intel/tbb/lib
         /opt/intel/lib
+        /opt/intel/oneapi/mkl/latest/lib
+        /opt/intel/oneapi/compiler/latest/linux/compiler/lib
+        /opt/intel/oneapi/lib
         $ENV{MKLROOT}/lib
         ${ENV_LIBRARY_PATHS}
         /opt/intel/compilers_and_libraries/linux/mkl/lib
@@ -251,6 +255,9 @@
         /opt/intel/mkl/lib
         /opt/intel/tbb/lib
         /opt/intel/lib
+        /opt/intel/oneapi/mkl/latest/lib
+        /opt/intel/oneapi/compiler/latest/linux/compiler/lib
+        /opt/intel/oneapi/lib
         $ENV{MKLROOT}/lib
         ${ENV_LIBRARY_PATHS}
         /opt/intel/compilers_and_libraries/linux/mkl/lib
@@ -369,6 +376,7 @@
   REQUIRED_VARS MKL_INCLUDE_DIR
                 MKL_Core_LINK_LIBRARY
                 MKL_Interface_LINK_LIBRARY
+                MKL_ThreadingLibrary_LINK_LIBRARY
                 MKL_ThreadLayer_LINK_LIBRARY)

 find_package_handle_standard_args(MKL_Static


capnp_generate_cpp: Fix input file existence check

capnp_generate_cpp() checks that input schema files exist at configure-time, and reports a fatal error if they don't exist. However, the check prepended the value of CAPNPC_SRC_PREFIX to input file paths, which is the wrong thing to do: the input file paths should be checked as-is if they are absolute paths, and checked relative to the current source directory, NOT the value of capnp's src-prefix flag, if they are relative paths, in order to match the capnp tool's behavior.

It turns out that it's easiest to just unconditionally convert the input file paths to absolute paths, then check the absolute path. The reason is that we can't even pass relative paths to the capnp command, anyway: capnp interprets relative path inputs relative to its working directory, which defaults to the build dir. For consistency with other CMake commands (add_library, add_executable, etc.), it makes most sense if relative file path inputs to capnp_generate_cpp() are interpreted relative to the current source directory. This means that relative path inputs need to be converted to absolute paths before being fed to capnp, which was done right after the faulty existence check.

This commit fixes the issue by modifying the existence check to check the path only after it's been converted to absolute form.

Closes #586.

--- c++/cmake/CapnProtoMacros.cmake
+++ c++/cmake/CapnProtoMacros.cmake
@@ -71,11 +71,11 @@
   set(${SOURCES})
   set(${HEADERS})
   foreach(schema_file ${ARGN})
-    if(NOT EXISTS "${CAPNPC_SRC_PREFIX}/${schema_file}")
-      message(FATAL_ERROR "Cap'n Proto schema file '${CAPNPC_SRC_PREFIX}/${schema_file}' does not exist!")
-    endif()
     get_filename_component(file_path "${schema_file}" ABSOLUTE)
     get_filename_component(file_dir "${file_path}" PATH)
+    if(NOT EXISTS "${file_path}")
+      message(FATAL_ERROR "Cap'n Proto schema file '${file_path}' does not exist!")
+    endif()

     # Figure out where the output files will go
     if (NOT DEFINED CAPNPC_OUTPUT_DIR)


Fix for ROOT-7333 (Pythia 6 is not found by CMake in ROOT if the 'general_pythia.inc' file is not found)

--- cmake/modules/FindPythia6.cmake
+++ cmake/modules/FindPythia6.cmake
@@ -24,8 +24,9 @@
            PATH_SUFFIXES include
            DOC "Specify the Pythia6 include dir here.")

-set(PYTHIA6_INCLUDE_DIRS ${PYTHIA6_INCLUDE_DIR})
-
+if(PYTHIA6_INCLUDE_DIR)
+  set(PYTHIA6_INCLUDE_DIRS ${PYTHIA6_INCLUDE_DIR})
+endif()

 find_library(PYTHIA6_LIBRARY NAMES pythia6 Pythia6
              HINTS ${_pythia6dirs}
@@ -49,7 +50,7 @@
 # all listed variables are TRUE

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Pythia6 DEFAULT_MSG PYTHIA6_INCLUDE_DIR PYTHIA6_LIBRARY)
+find_package_handle_standard_args(Pythia6 DEFAULT_MSG PYTHIA6_LIBRARY)

 mark_as_advanced(PYTHIA6_INCLUDE_DIR
                  PYTHIA6_LIBRARY


cmake: avoid emitting .swiftsourceinfo files for overlays

rdar://problem/58611222

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -355,13 +355,9 @@
     if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS OR
        SWIFTFILE_SDK STREQUAL "MACCATALYST")
       set(specific_module_dir "${module_base}.swiftmodule")
-      set(specific_module_project_dir "${specific_module_dir}/Project")
-      set(source_info_file "${specific_module_project_dir}/${SWIFTFILE_ARCHITECTURE}.swiftsourceinfo")
       set(module_base "${module_base}.swiftmodule/${SWIFTFILE_ARCHITECTURE}")
     else()
       set(specific_module_dir)
-      set(specific_module_project_dir)
-      set(source_info_file "${module_base}.swiftsourceinfo")
     endif()
     set(module_file "${module_base}.swiftmodule")
     set(module_doc_file "${module_base}.swiftdoc")
@@ -622,11 +618,10 @@
         COMMAND
           "${CMAKE_COMMAND}" "-E" "make_directory" ${module_dir}
           ${specific_module_dir}
-          ${specific_module_project_dir}
         COMMAND
           "${PYTHON_EXECUTABLE}" "${line_directive_tool}" "@${file_path}" --
           "${swift_compiler_tool}" "-emit-module" "-o" "${module_file}"
-          "-emit-module-source-info-path" "${source_info_file}"
+          "-avoid-emit-module-source-info"
           ${swift_flags} ${swift_module_flags} "@${file_path}"
         ${command_touch_module_outputs}
         OUTPUT ${module_outputs}


Implement additional blank-in-path protection for Tcl/Tk/Itcl/Itk version checking logic.

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -182,9 +182,9 @@
       message(STATUS "Looking for itcl.h")
       if(NOT USE_INCRTCL_VERSION_4)
 	# Search first for epa_build install location.
-        find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}/itcl${PLPLOT_ITCL_VERSION})
+        find_path(ITCL_INCLUDE_PATH itcl.h HINTS "${TCL_INCLUDE_PATH}/itcl${PLPLOT_ITCL_VERSION}")
       endif(NOT USE_INCRTCL_VERSION_4)
-      find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH})
+      find_path(ITCL_INCLUDE_PATH itcl.h HINTS "${TCL_INCLUDE_PATH}")

       if(ITCL_INCLUDE_PATH)
         message(STATUS "Looking for itcl.h - found")
@@ -196,8 +196,9 @@
 	string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITCL_MINOR_VERSION  "${PLPLOT_ITCL_VERSION}")
 	message(STATUS "ITCL_MAJOR_VERSION = ${ITCL_MAJOR_VERSION}")
 	message(STATUS "ITCL_MINOR_VERSION = ${ITCL_MINOR_VERSION}")
-	file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c
-	  "// #define RC_INVOKED to avoid sucking in lots of additional includes for
+	if(NOT DEFINED CONSISTENT_HEADER_ITCL_VERSION)
+	  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c
+	    "// #define RC_INVOKED to avoid sucking in lots of additional includes for
 // efficiency and simplicity.
 #define RC_INVOKED 1
 #include <itcl.h>
@@ -206,11 +207,13 @@
 #endif
 void main(void){}
 "
-	  )
-	try_compile(CONSISTENT_HEADER_ITCL_VERSION ${CMAKE_BINARY_DIR}
-	  ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c
-	  CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${ITCL_INCLUDE_PATH};${TCL_INCLUDE_PATH}"
-	  )
+	    )
+	  try_compile(CONSISTENT_HEADER_ITCL_VERSION ${CMAKE_BINARY_DIR}
+	    ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c
+	    CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${ITCL_INCLUDE_PATH};${TCL_INCLUDE_PATH}"
+	    )
+	endif(NOT DEFINED CONSISTENT_HEADER_ITCL_VERSION)
+
 	if(CONSISTENT_HEADER_ITCL_VERSION)
 	  message(STATUS "Checking for Itcl header version consistency - true")
 	else(CONSISTENT_HEADER_ITCL_VERSION)
@@ -236,7 +239,7 @@
 	  get_filename_component(ITCL_LIBRARY_PATH ${ITCL_LIBRARY} PATH)
 	  list(APPEND TCL_TK_ITCL_ITK_RPATH ${ITCL_LIBRARY_PATH})
           set(HAVE_ITCL ON)
-          find_path(HAVE_ITCLDECLS_H itclDecls.h HINTS ${ITCL_INCLUDE_PATH})
+          find_path(HAVE_ITCLDECLS_H itclDecls.h HINTS "${ITCL_INCLUDE_PATH}")
         else(ITCL_LIBRARY)
           message(STATUS "Looking for itcl library - not found")
           message(STATUS "WARNING: Disabling Itcl interface code")
@@ -413,9 +416,9 @@
       message(STATUS "Looking for itk.h")
       if(NOT USE_INCRTCL_VERSION_4)
 	# Search first for epa_build install location.
-        find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}/itcl${PLPLOT_ITCL_VERSION})
+        find_path(ITK_INCLUDE_PATH itk.h HINTS "${TCL_INCLUDE_PATH}/itcl${PLPLOT_ITCL_VERSION}")
       endif(NOT USE_INCRTCL_VERSION_4)
-      find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH})
+      find_path(ITK_INCLUDE_PATH itk.h HINTS "${TCL_INCLUDE_PATH}")

       if(ITK_INCLUDE_PATH)
         message(STATUS "Looking for itk.h - found")
@@ -427,8 +430,9 @@
 	string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITK_MINOR_VERSION  "${PLPLOT_ITK_VERSION}")
 	message(STATUS "ITK_MAJOR_VERSION = ${ITK_MAJOR_VERSION}")
 	message(STATUS "ITK_MINOR_VERSION = ${ITK_MINOR_VERSION}")
-	file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c
-	  "// #define RC_INVOKED to avoid sucking in lots of additional includes for
+	if(NOT DEFINED CONSISTENT_HEADER_ITK_VERSION)
+	  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c
+	    "// #define RC_INVOKED to avoid sucking in lots of additional includes for
 // efficiency and simplicity and also to avoid the header file disaster that has long
 // been a problem for version 3.3 of itk.h
 #define RC_INVOKED 1
@@ -438,11 +442,13 @@
 #endif
 void main(void){}
 "
-	  )
-	try_compile(CONSISTENT_HEADER_ITK_VERSION ${CMAKE_BINARY_DIR}
-	  ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c
-	  CMAKE_FLAGS -DINCLUDE_DIRECTORIES:PATH=${ITK_INCLUDE_PATH}
-	  )
+	    )
+	  try_compile(CONSISTENT_HEADER_ITK_VERSION ${CMAKE_BINARY_DIR}
+	    ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c
+	    CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${ITK_INCLUDE_PATH};${TK_INCLUDE_PATH};${TCL_INCLUDE_PATH}"
+	    )
+	endif(NOT DEFINED CONSISTENT_HEADER_ITK_VERSION)
+
 	if(CONSISTENT_HEADER_ITK_VERSION)
 	  message(STATUS "Checking for Itk header version consistency - true")
 	else(CONSISTENT_HEADER_ITK_VERSION)


Fix variable name

Fix variable name

--- cmake/generate_char_array.cmake
+++ cmake/generate_char_array.cmake
@@ -1,3 +1,3 @@
 file(READ ${CMAKE_ARGV3} hexdata HEX)
-string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1, " PRIMITIV_OPENCL_KERNEL_CHAR_ARRAY ${hexdata})
-file(WRITE ${CMAKE_ARGV4} ${PRIMITIV_OPENCL_KERNEL_CHAR_ARRAY})
+string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1, " hex_split ${hexdata})
+file(WRITE ${CMAKE_ARGV4} ${hex_split})


Remove some commented out code

Remove some commented out code

--- cmake/modules/FindSoprano.cmake
+++ cmake/modules/FindSoprano.cmake
@@ -28,15 +28,6 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-#if(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES)
-
-  # read from cache
-#  set(Soprano_FOUND TRUE)
-#  set(SopranoServer_FOUND TRUE)
-#  set(SopranoClient_FOUND TRUE)
-#  set(SopranoIndex_FOUND TRUE)
-
-#else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES)
   include(FindLibraryWithDebug)

   # have packageconfig set variables to find Soprano:
@@ -220,5 +211,3 @@
                  SOPRANO_SERVER_LIBRARIES
                  SOPRANO_INCLUDE_DIR
                  SOPRANO_PLUGIN_DIR)
-
-#endif(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES)


Correct version info on master branch

Correct version info on master branch

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

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
-set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 17 )
-set ( HPCC_MATURITY "closedown" )
+set ( HPCC_MINOR 3 )
+set ( HPCC_POINT 0 )
+set ( HPCC_MATURITY "trunk" )
 set ( HPCC_SEQUENCE 0 )
 ###


added dependencies to gaf generation command

--- gaf.cmake
+++ gaf.cmake
@@ -46,7 +46,7 @@
              "${CMAKE_CURRENT_BINARY_DIR}/${Gaf_CUSTOM_PREFIX}${FIL_NAME}.h"
       COMMAND  ${PYTHON_EXECUTABLE}
       ARGS ${ABSOLUTE_GAF} gen cpp ${ABS_FIL} ${CMAKE_CURRENT_BINARY_DIR} ${GAF_EXTRA_ARGS}
-      DEPENDS ${ABS_FIL} ${ABSOLUTE_GAF} ${PYTHON_EXECUTABLE}
+      DEPENDS ${ABS_FIL} ${ABSOLUTE_GAF} ${PYTHON_EXECUTABLE} ${GAF_ROOT_DIR}/gaf_cpp.py ${GAF_ROOT_DIR}/gaf_parse.py ${GAF_ROOT_DIR}/gaf_types.py
       COMMENT "Running C++ GAF compiler on ${FIL}"
       VERBATIM)
   endforeach()


Create compile commands database.

Create compile commands database.

--- common/cmake/CommonHeader.cmake
+++ common/cmake/CommonHeader.cmake
@@ -28,6 +28,7 @@

 # Don't make any install rules
 set (CMAKE_SKIP_INSTALL_RULES TRUE)
+set (CMAKE_EXPORT_COMPILE_COMMANDS TRUE)

 include (CheckCXXCompilerFlag)
 if (MSVC)


cmake: improve error output on failed ronn

--- scripts/cmake/ElektraManPage.cmake
+++ scripts/cmake/ElektraManPage.cmake
@@ -12,11 +12,11 @@
 endif (NOT DATE)

 execute_process (
-	COMMAND ${CMAKE_COMMAND} -E env RUBYOPT=-Eutf-8:utf-8 LC_ALL=C.utf-8 ${RONN_COMMAND} -r --pipe ${MDFILE} --date=${DATE}
+	COMMAND "${CMAKE_COMMAND} -E env RUBYOPT=-Eutf-8:utf-8 LC_ALL=C.utf-8 ${RONN_COMMAND} -r --pipe ${MDFILE} --date=${DATE}"
 	OUTPUT_FILE ${MANPAGE}
 	ERROR_VARIABLE ERROR_OUTPUT
 	RESULT_VARIABLE RESULT)

 if (NOT RESULT EQUAL 0)
-	message (FATAL_ERROR "${ERROR_OUTPUT}")
+	message (FATAL_ERROR "${RONN_COMMAND} -r --pipe ${MDFILE} --date=${DATE} failed with output: ${ERROR_OUTPUT}")
 endif ()


Added environment hashing to correct DAKOTA_CMAKE_HOSTFILE determination and
produce working builds on tlcc systems (glory, taco, and ebird) as well as
aday (jenkins-driven, native MSVC).

NOTE:  The "fall-through" case is still the original logic that leverages
the 'hostname' program and CMake's regex feature.

OK'd by Dena Vigil, pending testing.

git-svn-id: c6750f7dd89925e309f580f56430152d063ff36c@1186 aa0779c3-6ec2-4b84-a212-a405c134cd8d


Suffix noarch targets

Suffix noarch targets

This matches the target names used by the Python library code.

--- conf/sprokit-macro-python.cmake
+++ conf/sprokit-macro-python.cmake
@@ -88,14 +88,14 @@
   _sprokit_create_safe_modpath("${modpath}" safe_modpath)

   set(python_sitepath /site-packages)
-  set(python_arch x)
+  set(python_arch)

   if (WIN32)
     set(python_install_path bin)
   else ()
     if (python_noarch)
       set(python_install_path lib)
-      set(python_arch)
+      set(python_arch u)
     else ()
       set(python_install_path "lib${LIB_SUFFIX}")
     endif ()


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -17,6 +17,7 @@
 Name[cs]=VLC
 Name[da]=VLC
 Name[de]=VLC
+Name[el]=VLC
 Name[es]=VLC
 Name[et]=VLC
 Name[fi]=VLC
@@ -57,6 +58,7 @@
 Comment[cs]=Podpůrná vrstva VLC
 Comment[da]=Phonon VLC-motor
 Comment[de]=Phonon-Treiber für VLC
+Comment[el]=Σύστημα υποστήριξης Phonon VLC
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
 Comment[fi]=Phonon VLC-taustaohjelma


fix cmake line length lint failure

fix cmake line length lint failure

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -222,11 +222,13 @@
   find_package(rticonnextmsgcpp)
   if(nddscpp_FOUND AND rticonnextmsgcpp_FOUND)
     message(STATUS "Found RTI Connext: ${nddscpp_DIR} ${rticonnextmsgcpp_DIR}")
-    set(Connext_INCLUDE_DIRS ${nddscpp_INCLUDE_DIRS} ${rticonnextmsgcpp_INCLUDE_DIRS})
+    set(Connext_INCLUDE_DIRS
+      ${nddscpp_INCLUDE_DIRS} ${rticonnextmsgcpp_INCLUDE_DIRS})
     set(Connext_LIBRARIES ${nddscpp_LIBRARIES} ${rticonnextmsgcpp_LIBRARIES})
     set(Connext_LIBRARY_DIRS "")
     set(Connext_LIBRARY_DIR "")
-    set(Connext_DEFINITIONS ${nddscpp_DEFINITIONS} ${rticonnextmsgcpp_DEFINITIONS})
+    set(Connext_DEFINITIONS
+      ${nddscpp_DEFINITIONS} ${rticonnextmsgcpp_DEFINITIONS})
     set(Connext_DDSGEN2 "/usr/bin/rtiddsgen2")
     set(Connext_FOUND TRUE)


Internal documentation cleanup

Internal documentation cleanup

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -56,44 +56,71 @@
 #        PORT         - Serial port [optional]
 #        SERIAL       - Serial command [optional]
 # Creates a example from the specified library.
-
-
-# load_board_settings()
-#
-# Load the Arduino SDK board settings from the boards.txt file.
-#
-function(LOAD_BOARD_SETTINGS)
-    load_arduino_style_settings(ARDUINO_BOARDS "${ARDUINO_BOARDS_PATH}")
-endfunction()
-
-function(LOAD_PROGRAMMERS_SETTINGS)
-    load_arduino_style_settings(ARDUINO_PROGRAMMERS "${ARDUINO_PROGRAMMERS_PATH}")
-endfunction()
-
+#
+#
 # print_board_list()
 #
 # Print list of detected Arduino Boards.
+#
+#
+#
+# print_programmer_list()
+#
+# Print list of detected Programmers.
+#
+#
+#
+# print_programmer_settings(PROGRAMMER)
+#
+#        PROGRAMMER - programmer id
+#
+# Print the detected Programmer settings.
+#
+#
+#
+# print_board_settings(ARDUINO_BOARD)
+#
+#        ARDUINO_BOARD - Board id
+#
+# Print the detected Arduino board settings.
+
+
+
+
+
+
+
+#=============================================================================#
+#                           User Functions                                    #
+#=============================================================================#
+
+# [PUBLIC/USER]
+#
+# print_board_list()
+#
+# see documentation at top
 function(PRINT_BOARD_LIST)
     message(STATUS "Arduino Boards:")
     print_list(ARDUINO_BOARDS)
     message(STATUS "")
 endfunction()

+# [PUBLIC/USER]
+#
 # print_programmer_list()
 #
-# Print list of detected Programmers.
+# see documentation at top
 function(PRINT_PROGRAMMER_LIST)
     message(STATUS "Arduino Programmers:")
     print_list(ARDUINO_PROGRAMMERS)
     message(STATUS "")
 endfunction()

+# [PUBLIC/USER]
+#
 # print_programmer_settings(PROGRAMMER)
 #
-#        PROGRAMMER - programmer id
-#
-# Print the detected Programmer settings.
-#
+# see documentation at top
 function(PRINT_PROGRAMMER_SETTINGS PROGRAMMER)
     if(${PROGRAMMER}.SETTINGS)
         message(STATUS "Programmer ${PROGRAMMER} Settings:")
@@ -101,12 +128,11 @@
     endif()
 endfunction()

+# [PUBLIC/USER]
+#
 # print_board_settings(ARDUINO_BOARD)
 #
-#        ARDUINO_BOARD - Board id
-#
-# Print the detected Arduino board settings.
-#
+# see documentation at top
 function(PRINT_BOARD_SETTINGS ARDUINO_BOARD)
     if(${ARDUINO_BOARD}.SETTINGS)
         message(STATUS "Arduino ${ARDUINO_BOARD} Board:")
@@ -116,6 +142,8 @@

+# [PUBLIC/USER]
+#
 # generate_arduino_library(TARGET_NAME)
 #
 # see documentation at top
@@ -147,6 +175,8 @@
     target_link_libraries(${TARGET_NAME} ${ALL_LIBS})
 endfunction()

+# [PUBLIC/USER]
+#
 # generate_arduino_firmware(TARGET_NAME)
 #
 # see documentation at top
@@ -199,6 +229,8 @@
     endif()
 endfunction()

+# [PUBLIC/USER]
+#
 # generate_arduino_example(LIBRARY_NAME EXAMPLE_NAME BOARD_ID [PORT] [SERIAL])
 #
 # see documentation at top
@@ -239,6 +271,36 @@
 endfunction()

+
+
+
+
+
+
+
+
+#=============================================================================#
+#                        Internal Functions                                   #
+#=============================================================================#
+
+# [PRIVATE/INTERNAL]
+#
+# load_board_settings()
+#
+# Load the Arduino SDK board settings from the boards.txt file.
+#
+function(LOAD_BOARD_SETTINGS)
+    load_arduino_style_settings(ARDUINO_BOARDS "${ARDUINO_BOARDS_PATH}")
+endfunction()
+
+# [PRIVATE/INTERNAL]
+#
+function(LOAD_PROGRAMMERS_SETTINGS)
+    load_arduino_style_settings(ARDUINO_PROGRAMMERS "${ARDUINO_PROGRAMMERS_PATH}")
+endfunction()
+
+# [PRIVATE/INTERNAL]
+#
 # load_generator_settings(TARGET_NAME PREFIX [SUFFIX_1 SUFFIX_2 .. SUFFIX_N])
 #
 #         TARGET_NAME - The base name of the user settings
@@ -267,6 +329,8 @@
     endforeach()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_compiler(BOARD_ID)
 #
 #       BOARD_ID - The board id name
@@ -310,6 +374,8 @@
     endif()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_core(VAR_NAME BOARD_ID)
 #
 #        VAR_NAME    - Variable name that will hold the generated library name
@@ -331,6 +397,8 @@
     endif()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # find_arduino_libraries(VAR_NAME SRCS)
 #
 #      VAR_NAME - Variable name which will hold the results
@@ -377,6 +445,8 @@
     set(${VAR_NAME} ${ARDUINO_LIBS} PARENT_SCOPE)
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_library(VAR_NAME BOARD_ID LIB_PATH)
 #
 #        VAR_NAME    - Vairable wich will hold the generated library names
@@ -433,6 +503,8 @@
     set(${VAR_NAME} ${LIB_TARGETS} PARENT_SCOPE)
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_libraries(VAR_NAME BOARD_ID SRCS)
 #
 #        VAR_NAME    - Vairable wich will hold the generated library names
@@ -452,6 +524,8 @@
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_target(TARGET_NAME ALL_SRCS ALL_LIBS)
 #
 #        TARGET_NAME - Target name
@@ -500,6 +574,8 @@
                         COMMENT "Calculating ${TARGET_NAME} image size")
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_upload(BOARD_ID TARGET_NAME PORT)
 #
 #        BOARD_ID    - Arduino board id
@@ -520,6 +596,8 @@
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_bootloader_upload(TARGET_NAME BOARD_ID PORT)
 #
 #      TARGET_NAME - target name
@@ -548,6 +626,8 @@
                      DEPENDS ${TARGET_NAME})
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_programmer_burn(TARGET_NAME BOARD_ID PROGRAMMER)
 #
 #      TARGET_NAME - name of target to burn
@@ -578,6 +658,8 @@
                      DEPENDS ${TARGET_NAME})
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_bootloader_burn(TARGET_NAME BOARD_ID PROGRAMMER)
 #
 #      TARGET_NAME - name of target to burn
@@ -652,6 +734,8 @@
                      DEPENDS ${TARGET_NAME})
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_programmer_args(PROGRAMMER OUTPUT_VAR)
 #
 #      PROGRAMMER  - programmer id
@@ -700,6 +784,8 @@
     set(${OUTPUT_VAR} ${AVRDUDE_ARGS} PARENT_SCOPE)
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_bootloader_args(BOARD_ID TARGET_NAME PORT OUTPUT_VAR)
 #
 #      BOARD_ID    - board id
@@ -738,6 +824,8 @@
     set(${OUTPUT_VAR} ${AVRDUDE_ARGS} PARENT_SCOPE)
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # find_sources(VAR_NAME LIB_PATH RECURSE)
 #
 #        VAR_NAME - Variable name that will hold the detected sources
@@ -767,6 +855,8 @@
     endif()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_serial_target(TARGET_NAME CMD)
 #
 #         TARGET_NAME - Target name
@@ -781,6 +871,8 @@
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # detect_arduino_version(VAR_NAME)
 #
 #       VAR_NAME - Variable name where the detected version will be saved
@@ -799,6 +891,8 @@
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # load_arduino_style_settings(SETTINGS_LIST SETTINGS_PATH)
 #
 #      SETTINGS_LIST - Variable name of settings list
@@ -929,6 +1023,8 @@
     endif()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # print_list(SETTINGS_LIST)
 #
 #      SETTINGS_LIST - Variables name of settings list
@@ -976,6 +1072,8 @@
     endif()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_sketch(SKETCH_PATH OUTPUT_VAR)
 #
 #      SKETCH_PATH - Path to sketch directory
@@ -1021,6 +1119,8 @@
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # generate_cpp_from_sketch(MAIN_SKETCH_PATH SKETCH_SOURCES SKETCH_CPP)
 #
 #         MAIN_SKETCH_PATH - Main sketch file path
@@ -1076,6 +1176,8 @@
 	endforeach()
 endfunction()

+# [PRIVATE/INTERNAL]
+#
 # setup_arduino_size_script(OUTPUT_VAR)
 #
 #        OUTPUT_VAR - Output variable that will contain the script path
@@ -1104,6 +1206,12 @@

     set(${OUTPUT_VAR} ${ARDUINO_SIZE_SCRIPT_PATH} PARENT_SCOPE)
 endfunction()
+
+
+
+
+
+

 #=============================================================================#
 #                              C Flags                                        #
@@ -1184,6 +1292,15 @@
 set(ARDUINO_OBJCOPY_HEX_FLAGS -O ihex -R .eeprom          CACHE STRING "")
 set(ARDUINO_AVRDUDE_FLAGS -V                              CACHE STRING "Arvdude global flag list.")

+
+
+
+
+
+
+#=============================================================================#
+#                          Initialization                                     #
+#=============================================================================#
 if(NOT ARDUINO_FOUND)
     set(ARDUINO_PATHS)
     foreach(VERSION 22 1)
@@ -1191,6 +1308,8 @@
     endforeach()

     file(GLOB SDK_PATH_HINTS /usr/share/arduino*)
+    list(SORT SDK_PATH_HINTS)
+    list(REVERSE SDK_PATH_HINTS)

     find_path(ARDUINO_SDK_PATH
               NAMES lib/version.txt
@@ -1198,7 +1317,7 @@
                             Arduino.app/Contents/Resources/Java/
                             ${ARDUINO_PATHS}
               HINTS ${SDK_PATH_HINTS}
-              DOC "Arduino Development Kit path.")
+              DOC "Arduino SDK path.")

     if(ARDUINO_SDK_PATH)
         if(WIN32)


Remove extra FindOpenCL.cmake file.

Remove extra FindOpenCL.cmake file.

--- examples/FindOpenCL.cmake
+++ examples/FindOpenCL.cmake
@@ -1,168 +0,0 @@
-#.rst:
-# FindOpenCL
-# ----------
-#
-# Try to find OpenCL
-#
-# Once done this will define::
-#
-#   OpenCL_FOUND          - True if OpenCL was found
-#   OpenCL_INCLUDE_DIRS   - include directories for OpenCL
-#   OpenCL_LIBRARIES      - link against this library to use OpenCL
-#   OpenCL_VERSION_STRING - Highest supported OpenCL version (eg. 1.2)
-#   OpenCL_VERSION_MAJOR  - The major version of the OpenCL implementation
-#   OpenCL_VERSION_MINOR  - The minor version of the OpenCL implementation
-#
-# The module will also define two cache variables::
-#
-#   OpenCL_INCLUDE_DIR    - the OpenCL include directory
-#   OpenCL_LIBRARY        - the path to the OpenCL library
-#
-
-#=============================================================================
-# From CMake 3.2
-# Copyright 2014 Matthaeus G. Chajdas
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-
-# CMake - Cross Platform Makefile Generator
-# Copyright 2000-2014 Kitware, Inc.
-# Copyright 2000-2011 Insight Software Consortium
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# * Neither the names of Kitware, Inc., the Insight Software Consortium,
-# nor the names of their contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#=============================================================================
-
-function(_FIND_OPENCL_VERSION)
-  include(CheckSymbolExists)
-  include(CMakePushCheckState)
-  set(CMAKE_REQUIRED_QUIET ${OpenCL_FIND_QUIETLY})
-
-  CMAKE_PUSH_CHECK_STATE()
-  foreach(VERSION "2_0" "1_2" "1_1" "1_0")
-    set(CMAKE_REQUIRED_INCLUDES "${OpenCL_INCLUDE_DIR}")
-    if(APPLE)
-      CHECK_SYMBOL_EXISTS(
-        CL_VERSION_${VERSION}
-        "${OpenCL_INCLUDE_DIR}/OpenCL/cl.h"
-        OPENCL_VERSION_${VERSION})
-    else()
-      CHECK_SYMBOL_EXISTS(
-        CL_VERSION_${VERSION}
-        "${OpenCL_INCLUDE_DIR}/CL/cl.h"
-        OPENCL_VERSION_${VERSION})
-    endif()
-
-    if(OPENCL_VERSION_${VERSION})
-      string(REPLACE "_" "." VERSION "${VERSION}")
-      set(OpenCL_VERSION_STRING ${VERSION} PARENT_SCOPE)
-      string(REGEX MATCHALL "[0-9]+" version_components "${VERSION}")
-      list(GET version_components 0 major_version)
-      list(GET version_components 1 minor_version)
-      set(OpenCL_VERSION_MAJOR ${major_version} PARENT_SCOPE)
-      set(OpenCL_VERSION_MINOR ${minor_version} PARENT_SCOPE)
-      break()
-    endif()
-  endforeach()
-  CMAKE_POP_CHECK_STATE()
-endfunction()
-
-find_path(OpenCL_INCLUDE_DIR
-  NAMES
-    CL/cl.h OpenCL/cl.h
-  PATHS
-    ENV "PROGRAMFILES(X86)"
-    ENV NVSDKCOMPUTE_ROOT
-    ENV CUDA_PATH
-    ENV AMDAPPSDKROOT
-    ENV INTELOCLSDKROOT
-    ENV ATISTREAMSDKROOT
-  PATH_SUFFIXES
-    include
-    OpenCL/common/inc
-    "AMD APP/include")
-
-_FIND_OPENCL_VERSION()
-
-if(WIN32)
-  if(CMAKE_SIZEOF_VOID_P EQUAL 4)
-    find_library(OpenCL_LIBRARY
-      NAMES OpenCL
-      PATHS
-        ENV "PROGRAMFILES(X86)"
-        ENV CUDA_PATH
-        ENV NVSDKCOMPUTE_ROOT
-        ENV AMDAPPSDKROOT
-        ENV INTELOCLSDKROOT
-        ENV ATISTREAMSDKROOT
-      PATH_SUFFIXES
-        "AMD APP/lib/x86"
-        lib/x86
-        lib/Win32
-        OpenCL/common/lib/Win32)
-  elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    find_library(OpenCL_LIBRARY
-      NAMES OpenCL
-      PATHS
-        ENV "PROGRAMFILES(X86)"
-        ENV CUDA_PATH
-        ENV NVSDKCOMPUTE_ROOT
-        ENV AMDAPPSDKROOT
-        ENV INTELOCLSDKROOT
-        ENV ATISTREAMSDKROOT
-      PATH_SUFFIXES
-        "AMD APP/lib/x86_64"
-        lib/x86_64
-        lib/x64
-        OpenCL/common/lib/x64)
-  endif()
-else()
-  find_library(OpenCL_LIBRARY
-    NAMES OpenCL)
-endif()
-
-set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})
-set(OpenCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIR})
-
-#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-find_package_handle_standard_args(
-  OpenCL
-  FOUND_VAR OpenCL_FOUND
-  REQUIRED_VARS OpenCL_LIBRARY OpenCL_INCLUDE_DIR
-  VERSION_VAR OpenCL_VERSION_STRING)
-
-mark_as_advanced(
-  OpenCL_INCLUDE_DIR
-  OpenCL_LIBRARY)
-


Minor comment change relating to Hershey fonts.

svn path=/trunk/; revision=10931

--- bindings/ada/plplot.adb.cmake
+++ bindings/ada/plplot.adb.cmake
@@ -207,8 +207,8 @@
             Set_Pen_Color(Colors(1));
             Select_Line_Style(Line_Styles(1));
             Draw_Curve(x1, y1);
-            --Draw_Hershey_Symbol(x1, y1, 850);
-            --Draw_Points(x1, y1, 17);
+--Draw_Hershey_Symbol(x1, y1, 850);
+--Draw_Points(x1, y1, 17); -- 17 is  "Hershey bullet, same as 850 when using Draw_Hershey.
         end if;

         if x2'length /= 1 and y2'length /= 1 then


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -25,7 +25,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


Fix link order in FindCapnProto.cmake

Fix link order in FindCapnProto.cmake

--- c++/cmake/FindCapnProto.cmake
+++ c++/cmake/FindCapnProto.cmake
@@ -149,13 +149,14 @@
 )
 mark_as_advanced(CAPNP_LIB_KJ CAPNP_LIB_KJ-ASYNC CAPNP_LIB_CAPNP CAPNP_LIB_CAPNP-RPC)
 set(CAPNP_LIBRARIES_LITE
+  ${CAPNP_LIB_CAPNP}
   ${CAPNP_LIB_KJ}
-  ${CAPNP_LIB_CAPNP}
 )
 set(CAPNP_LIBRARIES
-  ${CAPNP_LIBRARIES_LITE}
+  ${CAPNP_LIB_CAPNP-RPC}
+  ${CAPNP_LIB_CAPNP}
   ${CAPNP_LIB_KJ-ASYNC}
-  ${CAPNP_LIB_CAPNP-RPC}
+  ${CAPNP_LIB_KJ}
 )

 # Was only the 'lite' library found?


Add custom target removed by error in commit 3d5a81f

--- build-options.cmake
+++ build-options.cmake
@@ -79,8 +79,8 @@

 include( ${LOMSE_ROOT_DIR}/build-version.cmake )

-#add_custom_target(build-version ALL
-  COMMAND ${CMAKE_COMMAND} -D LOMSE_ROOT_DIR=${LOMSE_ROOT_DIR} -P ${LOMSE_ROOT_DIR}/build-version.cmake
+add_custom_target (build-version ALL
+  COMMAND ${CMAKE_COMMAND} -D LOMSE_ROOT_DIR=${CMAKE_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/build-version.cmake
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
   COMMENT "setting Lomse version information ...")


cmake: zephyr-package: add message mode

cmake: zephyr-package: add message mode

Explicitly set the <mode> value to the message printed when including
zephyr modules. The documentation is added to explain why it is
output to stderr, as this has been been subject of multiple PR's
(#31365,#43009).

Signed-off-by: Jordan Yates <d74a90e280bbad1cc3646781a4e234b467b60fe1@data61.csiro.au>

--- share/zephyr-package/cmake/ZephyrConfig.cmake
+++ share/zephyr-package/cmake/ZephyrConfig.cmake
@@ -43,11 +43,14 @@

   if(NOT NO_BOILERPLATE)
     list(LENGTH Zephyr_FIND_COMPONENTS components_length)
+    # The module messages are intentionally higher than STATUS to avoid the -- prefix
+    # and make them more visible to users. This does result in them being output
+    # to stderr, but that is an implementation detail of cmake.
     if(components_length EQUAL 0)
-      message("Loading Zephyr default modules (${location}).")
+      message(NOTICE "Loading Zephyr default modules (${location}).")
       include(zephyr_default NO_POLICY_SCOPE)
     else()
-      message("Loading Zephyr module(s) (${location}): ${Zephyr_FIND_COMPONENTS}")
+      message(NOTICE "Loading Zephyr module(s) (${location}): ${Zephyr_FIND_COMPONENTS}")
       foreach(component ${Zephyr_FIND_COMPONENTS})
         if(${component} MATCHES "^\([^:]*\):\(.*\)$")
           string(REPLACE "," ";" SUB_COMPONENTS ${CMAKE_MATCH_2})


Wrogly commited some debug code in RunRemoteTests.cmake

--- test/remote/RunRemoteTest.cmake
+++ test/remote/RunRemoteTest.cmake
@@ -117,7 +117,6 @@
                  "${CMAKE_ZORBA_BUILD_DIR}/remotequeue/${changefile}"
                  "${svn_path}/workingsets/${changefile}"
                  TIMEOUT 300 RESULT_VARIABLE result)
-MESSAGE (FATAL_ERROR "${datetime}")

 if (NOT result STREQUAL 0)
   message ("Job failed to submit!")


Fix bot breakage from r300372

Fix bot breakage from r300372

Use #cmakedefine instead of #cmakedefine01 because the uses are ifndef instead of if.

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

--- include/lldb/Host/Config.h.cmake
+++ include/lldb/Host/Config.h.cmake
@@ -10,7 +10,7 @@
 #ifndef LLDB_HOST_CONFIG_H
 #define LLDB_HOST_CONFIG_H

-#cmakedefine01 LLDB_CONFIG_TERMIOS_SUPPORTED
+#cmakedefine LLDB_CONFIG_TERMIOS_SUPPORTED

 #cmakedefine LLDB_DISABLE_POSIX


Upgrade to C++17 (#15)

Upgrade to C++17 (#15)

Summary:
Pull Request resolved: https://github.com/facebook/SPARTA/pull/15

Following a recent Redex move to C++17.

Reviewed By: minjang

Differential Revision: D28612765

fbshipit-source-id: 270a45c571b2657589793ea360561bc1b327e837

--- sparta/cmake_modules/Commons.cmake
+++ sparta/cmake_modules/Commons.cmake
@@ -10,8 +10,8 @@
 endfunction()

 macro(set_common_cxx_flags_for_sparta)
-    message(STATUS "Using C++14")
-    set(CMAKE_CXX_STANDARD 14)
+    message(STATUS "Using C++17")
+    set(CMAKE_CXX_STANDARD 17)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
     set(CMAKE_CXX_EXTENSIONS OFF)
     if (MSVC)


Separate the localNode functionality from net::Node

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[x] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation

--- PurpleDoxygen.cmake
+++ PurpleDoxygen.cmake
@@ -16,8 +16,7 @@
   if(THIS_DOXYFILE)
     configure_file(${THIS_DOXYFILE} ${DOXYFILE} COPYONLY)
   else()
-    execute_process(COMMAND ${DOXYGEN_EXECUTABLE} -s -g ${DOXYFILE}
-      OUTPUT_QUIET ERROR_QUIET)
+    execute_process(COMMAND ${DOXYGEN_EXECUTABLE} -s -g ${DOXYFILE})
   endif()

   foreach(PARAM ${THIS_PARAMETERS})


Add debug symbols on release mode

Add debug symbols on release mode

Former-commit-id: dde43fbe3c6df83affffba3787df2e15733271a4

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -73,7 +73,7 @@
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)

-set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fdiagnostics-color=always -Wall -Wpedantic -Wextra -Wconversion -Wunused")
+set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -g -fno-strict-aliasing -fdiagnostics-color=always -Wall -Wpedantic -Wextra -Wconversion -Wunused")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MARCH} ${MTUNE}")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2") #-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2")
@@ -112,7 +112,7 @@
 if(NOT TARGET flags)
     add_library(flags INTERFACE)
 endif()
-target_compile_options(flags INTERFACE -fno-strict-aliasing -fdiagnostics-color=always -Wall -Wpedantic -Wextra -Wconversion -Wunused)
+target_compile_options(flags INTERFACE -g -fno-strict-aliasing -fdiagnostics-color=always -Wall -Wpedantic -Wextra -Wconversion -Wunused)
 target_compile_options(flags INTERFACE $<$<CONFIG:RELEASE>:${MARCH} ${MTUNE}>)
 target_compile_options(flags INTERFACE $<$<CONFIG:DEBUG>: -fno-omit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2>)
 target_compile_options(flags INTERFACE $<$<AND:$<CONFIG:DEBUG>,$<CXX_COMPILER_ID:Clang>>: -fstandalone-debug>)


fix static build

fix static build

--- cmake-modules/configure.cmake
+++ cmake-modules/configure.cmake
@@ -40,8 +40,13 @@
   set(XERCES_PLATFORM_EXPORT "")
   set(XERCES_PLATFORM_IMPORT "")
   if(WIN32 OR MINGW OR MSYS)
-    set(XERCES_PLATFORM_EXPORT "__declspec(dllexport)")
-    set(XERCES_PLATFORM_IMPORT "__declspec(dllimport)")
+    if(ENABLE_STATIC)
+      set(XERCES_PLATFORM_EXPORT "")
+      set(XERCES_PLATFORM_IMPORT "")
+    else()
+      set(XERCES_PLATFORM_EXPORT "__declspec(dllexport)")
+      set(XERCES_PLATFORM_IMPORT "__declspec(dllimport)")
+    endif()
   endif()

   if(WIN32 OR MINGW OR MSYS)


Fix typo

Fix typo

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -66,8 +66,7 @@
 endif()

 CHECK_C_COMPILER_FLAG("-std=c99" COMPILER_SUPPORTS_C99)
-
-if(CC_SUPPORTS_C99)
+if(COMPILER_SUPPORTS_C99)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
 endif()


Fix typo in kNet cmake lookup. Use environment variable directly instead of an intermediate variable.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -203,7 +203,7 @@
 endmacro (configure_sparkle)

 macro(use_package_knet)
-    set(KNET_DIR ${ENV_KNET_DIR_QT47})
+    set(KNET_DIR $ENV{KNET_DIR_QT47})

     # If KNET_DIR_QT47 was not specified, use kNet from TUNDRA_DEP_PATH.
     if ("${KNET_DIR}" STREQUAL "")
@@ -217,7 +217,7 @@
     include_directories (${KNET_DIR}/include)
     link_directories (${KNET_DIR}/lib)

-    message (STATUS "Using kNet from $(KNET_DIR)")
+    message (STATUS "Using kNet from ${KNET_DIR}")
 endmacro()

 macro(link_package_knet)


Update copyright year [ci skip]

Update copyright year [ci skip]

--- cmake/OpenSimMacros.cmake
+++ cmake/OpenSimMacros.cmake
@@ -52,7 +52,7 @@
         -DOPENSIM_${OSIMADDLIB_UKIT}_MAJOR_VERSION=${OPENSIM_MAJOR_VERSION}
         -DOPENSIM_${OSIMADDLIB_UKIT}_MINOR_VERSION=${OPENSIM_MINOR_VERSION}
         -DOPENSIM_${OSIMADDLIB_UKIT}_BUILD_VERSION=${OPENSIM_PATCH_VERSION}
-        -DOPENSIM_${OSIMADDLIB_UKIT}_COPYRIGHT_YEARS="2005-2014"
+        -DOPENSIM_${OSIMADDLIB_UKIT}_COPYRIGHT_YEARS="2005-2017"
         -DOPENSIM_${OSIMADDLIB_UKIT}_AUTHORS="${AUTHORS}"
         -DOPENSIM_${OSIMADDLIB_UKIT}_TYPE="Shared"
         )


Use the unparsed args in export_variables_to_bazel (#2467)

This allows properly passing arguments (i.e. YEAR) without them ending
up in the bazel file as (likely empty) variables.

--- cmake/CreateBazelConfig.cmake
+++ cmake/CreateBazelConfig.cmake
@@ -129,7 +129,7 @@
 """Automatically generated version numbers - DO NOT EDIT."""

 ]=])
-    foreach (item ${ARGN})
+    foreach (item ${_EXPORT_VARIABLES_TO_BAZEL_OPT_UNPARSED_ARGUMENTS})
         file(APPEND "${filename}" "${item} = \"${${item}}\"\n")
     endforeach ()
 endfunction ()


reduce sim_cpp11 spam

reduce sim_cpp11 spam

--- cmake/bde_component.cmake
+++ cmake/bde_component.cmake
@@ -82,7 +82,6 @@

             string(REPLACE "_cpp03." "." cpp11SrcFile ${srcFile})
             bde_log(VERBOSE "sim_cpp11 ${cpp11Operation}: ${cpp11SrcFile} -> ${srcFile}")
-            message(STATUS "sim_cpp11 ${cpp11Operation}: ${cpp11SrcFile} -> ${srcFile}")

             add_custom_command(
                 OUTPUT    "${srcFile}"


Fix compiler version regex

Fix compiler version regex

--- cmake/GetBoostLibB2Args.cmake
+++ cmake/GetBoostLibB2Args.cmake
@@ -71,7 +71,7 @@
         else()
             list(APPEND b2Args cxxflags=-fPIC cxxflags=-std=c++11)
             # Need to configure the toolset based on whatever version CMAKE_CXX_COMPILER is
-            string(REGEX MATCH "[0-9]+\\.[0-9]+" ToolsetVer "${CMAKE_CXX_COMPILER_VERSION}")
+            string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]" ToolsetVer "${CMAKE_CXX_COMPILER_VERSION}")
             if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
                 list(APPEND b2Args toolset=clang-${ToolsetVer})
                 if(HAVE_LIBC++)


Fix version string parsing

Fix version string parsing

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -55,10 +55,12 @@

   SET(VERSION ${VERSION_STRING})

+  # Remove trailing (non-numeric) part of the version string
+  STRING(REGEX REPLACE "[^\\.0-9].*" "" VERSION_STRING ${VERSION_STRING})
+
   STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" MAJOR_VERSION "${VERSION_STRING}")
   STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" MINOR_VERSION "${VERSION_STRING}")
   STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" PATCH "${VERSION_STRING}")
-
   SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
   SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}")
   MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH}")


ubuntu library cvsba fix

ubuntu library cvsba fix

--- cmake_modules/Findcvsba.cmake
+++ cmake_modules/Findcvsba.cmake
@@ -25,8 +25,12 @@
 LINK_DIRECTORIES("/usr/local/lib")
 SET(cvsba_LIB_DIR "/usr/local/lib")

-SET(cvsba_LIBS /usr/lib/libblas.dylib;/usr/lib/liblapack.dylib;/usr/local/lib/libf2c.a;opencv_videostab;opencv_video;opencv_ts;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;opencv_objdetect;opencv_nonfree;opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_features2d;opencv_core;opencv_contrib;opencv_calib3d cvsba)

+if(UNIX AND NOT APPLE)
+    SET(cvsba_LIBS /usr/lib/libblas.so;/usr/lib/liblapack.so;/usr/lib/libf2c.a;opencv_videostab;opencv_video;opencv_ts;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;opencv_objdetect;opencv_nonfree;opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_features2d;opencv_core;opencv_contrib;opencv_calib3d cvsba)
+else()
+	SET(cvsba_LIBS /usr/lib/libblas.dylib;/usr/lib/liblapack.dylib;/usr/local/lib/libf2c.a;opencv_videostab;opencv_video;opencv_ts;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;opencv_objdetect;opencv_nonfree;opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_features2d;opencv_core;opencv_contrib;opencv_calib3d cvsba)
+endif()
 SET(cvsba_FOUND YES)
 SET(cvsba_FOUND "YES")
 SET(cvsba_VERSION        1.0.0)


Build 32bit boost when cmake is configured for 32bit, regardless of system

--- Projects/win32/boost.cmake
+++ Projects/win32/boost.cmake
@@ -1,8 +1,14 @@
+
+set(boost_address_model 32)
+if (64bit_build)
+  set(boost_address_model 64)
+endif()
+
 add_external_project_or_use_system(boost
   BUILD_IN_SOURCE 1
   CONFIGURE_COMMAND
     <SOURCE_DIR>/bootstrap.bat
   BUILD_COMMAND <SOURCE_DIR>/b2
-    toolset=msvc-9.0 address-model=64 --prefix=<INSTALL_DIR> --with-regex --with-system --with-date_time --with-thread install
+    toolset=msvc-9.0 address-model=${boost_address_model} --prefix=<INSTALL_DIR> --with-regex --with-system --with-date_time --with-thread install
   INSTALL_COMMAND ""
 )


FindClang.cmake: Also look for libclangASTMatchers

We need to link to it to use ASTMatchers

CCMAIL: 95d1dd7f1db6f20c1d1d461daa9bfc128b15d621@kde.org

--- cmake/FindClang.cmake
+++ cmake/FindClang.cmake
@@ -58,6 +58,7 @@
   FIND_AND_ADD_CLANG_LIB(clangRewriteFrontend)
   FIND_AND_ADD_CLANG_LIB(clangRewrite)
   FIND_AND_ADD_CLANG_LIB(clangAST)
+  FIND_AND_ADD_CLANG_LIB(clangASTMatchers)
   FIND_AND_ADD_CLANG_LIB(clangParse)
   FIND_AND_ADD_CLANG_LIB(clangLex)
   FIND_AND_ADD_CLANG_LIB(clangBasic)


Move c++11 check to cmake 2.8

Move c++11 check to cmake 2.8

Previous check required cmake >= 3.1

--- cmake/MiscCheck.cmake
+++ cmake/MiscCheck.cmake
@@ -1,5 +1,6 @@
 INCLUDE(CheckCXXSourceCompiles)
-set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_CXX11_STANDARD_COMPILE_OPTION})
+
+set(CMAKE_REQUIRED_FLAGS "-std=c++11")

 CHECK_CXX_SOURCE_COMPILES(
     "#include <cstdint>


UsePython.cmake: more 2017 approach

UsePython.cmake: more 2017 approach

--- cmake/UsePython.cmake
+++ cmake/UsePython.cmake
@@ -223,7 +223,7 @@
 	# TODO we should check if only one script is present
 	set(cmd ${scripts})
 	list(APPEND cmd ${pyr_COMMAND} ${pyr_UNPARSED_ARGUMENTS})
-	message(STATUS "cmd: ${cmd}")
+	# message(STATUS "cmd: ${cmd}")
 	add_custom_command(OUTPUT ${pyr_OUTPUT} TARGET ${pyr_TARGET}
 		DEPENDS ${pyr_DEPENDS}
 		COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${pp}"
@@ -282,7 +282,7 @@
 	# TODO we should check if only one script is present
 	set(cmd ${scripts})
 	list(APPEND cmd ${pyt_COMMAND} ${pyt_UNPARSED_ARGUMENTS})
-	message(STATUS "cmd: ${cmd}")
+	# message(STATUS "cmd: ${cmd}")
 	add_test(NAME "${pyt_NAME}"
 		COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${pp}"
 			"${PYTHON_EXECUTABLE}" ${pyflags} ${cmd})


fix generator expression

fix generator expression

--- cmake/compilers.cmake
+++ cmake/compilers.cmake
@@ -5,9 +5,9 @@
 check_c_compiler_flag(-Wall _has_wall)
 if(_has_wall)
   add_compile_options(
-    $<$<COMPILE_LANGUAGE:C> -Wall>
-    $<$<COMPILE_LANGUAGE:CXX> -Wall>
-    $<$<COMPILE_LANGUAGE:Fortran> -Wall>
+    $<$<COMPILE_LANGUAGE:C>:-Wall>
+    $<$<COMPILE_LANGUAGE:CXX>:-Wall>
+    $<$<COMPILE_LANGUAGE:Fortran>:-Wall>
     )
 else()
   check_c_compiler_flag(/Wall _has_msvc_wall)


[sanitizer] Fix a typo in config-ix.cmake causing all Darwin embedded platforms to be built with the 'iossim' SDK.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@270840 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -288,7 +288,7 @@
         set(DARWIN_${platform}sim_CFLAGS
           ${DARWIN_COMMON_CFLAGS}
           ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
-          -isysroot ${DARWIN_iossim_SYSROOT})
+          -isysroot ${DARWIN_${platform}sim_SYSROOT})
         set(DARWIN_${platform}sim_LINKFLAGS
           ${DARWIN_COMMON_LINKFLAGS}
           ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}


disabled test box

disabled test box

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

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -22,4 +22,9 @@
         endforeach(_dep)
       endif()
     endforeach(_ss)
+
+    #file(APPEND ${_dot_file}
+    #    "  \"test\" [style=\"filled\" fillcolor=\"#A3A27C\" shape=\"box\"];\n ")
+    file(APPEND ${_dot_file} "}\n")
 endfunction(MAKE_DEP_GRAPH)
+


Set correct ldpaths in closing message.

Set correct ldpaths in closing message.

--- conf.d/cmake/config.cmake
+++ conf.d/cmake/config.cmake
@@ -80,7 +80,7 @@
 if(IS_DIRECTORY $ENV{HOME}/opt/afb-monitoring)
 set(MONITORING_ALIAS "--alias=/monitoring:$ENV{HOME}/opt/afb-monitoring")
 endif()
-set(CLOSING_MESSAGE "Debug from afb-daemon --port=1234 ${MONITORING_ALIAS} --ldpaths=. --workdir=. --roothttp=../htdocs --token= --verbose ")
+set(CLOSING_MESSAGE "Debug from afb-daemon --port=1234 ${MONITORING_ALIAS} --ldpaths=package --workdir=. --roothttp=../htdocs --token= --verbose ")
 set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")

 # Customize link option


Added CMake flag for unit tests.

Added CMake flag for unit tests.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -60,6 +60,8 @@
 mark_as_advanced(TORQUE_EXTENDED_MOVE)
 option(TORQUE_NAVIGATION "Enable Navigation module" OFF)
 #mark_as_advanced(TORQUE_NAVIGATION)
+option(TORQUE_TESTING "Enable unit test module" OFF)
+mark_as_advanced(TORQUE_TESTING)
 if(WIN32)
 	option(TORQUE_OPENGL "Allow OpenGL render" OFF)
 	#mark_as_advanced(TORQUE_OPENGL)
@@ -326,6 +328,10 @@
     addPath("${srcDir}/T3D/gameBase/std")
 endif()

+if(TORQUE_TESTING)
+   include( "modules/module_testing.cmake" )
+endif()
+
 if(TORQUE_NAVIGATION)
    include( "modules/module_navigation.cmake" )
 endif()


[TASK] Update dependency to the latest C++ SDK

Related: CLI-117 #time 1h

--- ext/virgil_sdk/virgil_sdk.cmake
+++ ext/virgil_sdk/virgil_sdk.cmake
@@ -52,8 +52,8 @@

 ExternalProject_Add (${PROJECT_NAME}
     DOWNLOAD_DIR "@VIRGIL_DEPENDS_PACKAGE_DOWNLOAD_DIR@"
-    URL "https://github.com/VirgilSecurity/virgil-sdk-cpp/archive/6f91201393f051559d919b49476b8ca53fdc48bb.tar.gz"
-    URL_HASH SHA1=2253271eb76b2c2fe14e78f0c7fb01367bc3b5d2
+    URL "https://github.com/VirgilSecurity/virgil-sdk-cpp/archive/e3ed9e19c006f2e352b25ff9e35aeb1def83cce3.tar.gz"
+    URL_HASH SHA1=31e6b481fefc15f74ee86082fe02f96451caf61f
     PREFIX "@VIRGIL_DEPENDS_PACKAGE_BUILD_DIR@"
     CMAKE_ARGS "@VIRGIL_DEPENDS_CMAKE_ARGS@"
 )


cmake: Remove long deprecated include_directories file

The proper way of including flexcore is the cmake way: use the
FindPackage or add_subdirectory.
__NOT__ include(flexcore/include_directories.cmake).

--- include_directories.cmake
+++ include_directories.cmake
@@ -1,8 +0,0 @@
-# Generate list of relevant flexcore include directories
-
-MESSAGE( WARNING "Including this file is deprecated. "
-	"Please see ${CMAKE_CURRENT_LIST_DIR}/docs/USING for instructions on including flexcore." )
-SET (FLEXCORE_INCLUDE_DIRECTORIES
-     ${FLEXCORE_DIR}/src
-     ${FLEXCORE_DIR}/src/3rdparty/cereal/include )
-


Fixes #1

Fixes #1

--- cmake/FindGLM.cmake
+++ cmake/FindGLM.cmake
@@ -36,7 +36,7 @@
 		/usr/local/include
 		/sw/include
 		/opt/local/include
-		${GLEW_ROOT_DIR}/include
+		${GLM_ROOT_DIR}/include
 		DOC "The directory where glm/glm.hpp resides")
 endif()

@@ -49,4 +49,4 @@
 endif()

 # Hide some variables
-mark_as_advanced(GLM_INCLUDE_DIR)+mark_as_advanced(GLM_INCLUDE_DIR)


Add vc10 to TBB support

Add vc10 to TBB support

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -43,8 +43,11 @@
     if (MSVC90)
         set(_TBB_COMPILER "vc9")
     endif(MSVC90)
+    if (MSVC10)
+        set(_TBB_COMPILER "vc10")
+    endif(MSVC10)
     if (NOT _TBB_COMPILER)
-        message("ERROR: TBB supports only VC 7.1, 8 and 9 compilers on Windows platforms.")
+        message("ERROR: TBB supports only VC 7.1, 8, 9, and 10 compilers on Windows platforms.")
     endif (NOT _TBB_COMPILER)
     set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
 endif (WIN32)


Fixed FindTBB.cmake

Fixed FindTBB.cmake

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -184,7 +184,7 @@
   ##################################

   if(TBB_INCLUDE_DIRS)
-    file(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _tbb_version_file)
+    file(READ "${TBB_INCLUDE_DIRS}/tbb/version.h" _tbb_version_file)
     string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1"
         TBB_VERSION_MAJOR "${_tbb_version_file}")
     string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1"
@@ -300,4 +300,4 @@
   unset(TBB_LIB_PATH_SUFFIX)
   unset(TBB_DEFAULT_SEARCH_DIR)

-endif()+endif()


Fixed XDR detection on Linux.

Fixed XDR detection on Linux.

--- cmake/FindXDR.cmake
+++ cmake/FindXDR.cmake
@@ -36,7 +36,6 @@
 	## Now let's see if we need an extra lib to compile it
 	SET(XDR_INT_FOUND)
 	CHECK_FUNCTION_EXISTS(xdr_int XDR_INT_FOUND)
-
 	IF (NOT XDR_INT_FOUND)
 		FOREACH(lib nsl oncrpc)
 			## Try to find the corresponding lib
@@ -61,7 +60,11 @@
 		SET(XDR_FOUND TRUE)

 		## Let's see if we have an implementation for xdr_u_hyper
-		CHECK_LIBRARY_EXISTS(${XDR_LIBRARIES} xdr_u_hyper "" BALL_HAS_XDR_U_HYPER)
+		IF (${XDR_LIBRARIES})
+			CHECK_LIBRARY_EXISTS(${XDR_LIBRARIES} xdr_u_hyper "" BALL_HAS_XDR_U_HYPER)
+		ELSE()
+			CHECK_FUNCTION_EXISTS(xdr_u_hyper BALL_HAS_XDR_U_HYPER)
+		ENDIF()

 		IF(BALL_HAS_XDR_U_HYPER)
 				SET(XDR_TEST_HEADER "#include <rpc/types.h>
@@ -76,8 +79,11 @@
 				SET(POSSIBLE_64BIT_TYPES u_quad_t u_longlong_t "unsigned long long" __uint64_t)

 				#iterate over the list and try out the types
-				FOREACH(BALL_XDR_UINT64_TYPE "${POSSIBLE_64BIT_TYPES}")
+				FOREACH(BALL_XDR_UINT64_TYPE ${POSSIBLE_64BIT_TYPES})
 						CHECK_CXX_SOURCE_COMPILES( "${XDR_TEST_HEADER}${BALL_XDR_UINT64_TYPE} q;${XDR_TEST_FOOTER}" XDR_64Bit_Type )
+						IF (XDR_64Bit_Type)
+							BREAK()
+						ENDIF()
 				ENDFOREACH()

 				IF(XDR_64Bit_Type)


Fix typo

Fix typo

--- cmake/Util/Op.cmake
+++ cmake/Util/Op.cmake
@@ -1,4 +1,4 @@
-OB# Op.cmake should be included by a CMake script that will build a custom Scanner
+# Op.cmake should be included by a CMake script that will build a custom Scanner
 # op. It sets a few default flags and exposes a function build_op for simplifying
 # the build process. See examples/tutorial/04_custom_op.py for an example usage.

@@ -35,7 +35,6 @@
     add_library(${args_LIB_NAME} SHARED ${args_CPP_SRCS} ${PROTO_SRCS})
     add_dependencies(${args_LIB_NAME} ${args_LIB_NAME}_proto_files)
     target_link_libraries(${args_LIB_NAME} PUBLIC "${PROTOBUF_LIBRARY}")
-
   else()
     add_library(${args_LIB_NAME} SHARED ${args_CPP_SRCS})
   endif()


Report error if TARGET_PLATFORM was not defined (#68)

When calling the cmake for the project if
the TARGET_PLATFORM definition is not set only a cryptic
file not found error is displayed for the user.

By checking the TARGET_PLATFORM cmake definition
we can avoid the file not found error and display
a more descriptive reason why the cmake call failed.

libtuv-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -32,6 +32,10 @@

 # path for platform depends files, use full name for default
 # (e.g, i686-linux)
+if (NOT DEFINED TARGET_PLATFORM)
+  message(FATAL_ERROR "TARGET_PLATFORM was not specified! (e.g., arm-linux)")
+endif()
+
 set(TUV_PLATFORM_PATH ${TARGET_PLATFORM})
 include("cmake/option/option_${TARGET_PLATFORM}.cmake")


Remove USE_D3D9_SUBSURFACE_BLIT as it is buggy.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -163,7 +163,7 @@
         sagase_configure_report (OGRE)
     else()
         # DX blitting define for naali
-        add_definitions(-DUSE_D3D9_SUBSURFACE_BLIT)
+#        add_definitions(-DUSE_D3D9_SUBSURFACE_BLIT)
         include_directories($ENV{OGRE_HOME})
         # Ogre built from sources
         include_directories($ENV{OGRE_HOME}/include)


- CMake: Better approach to find Python 3.2 without breaking anything else (hopefully)

--- CMakeModules/FindYafPythonLibs.cmake
+++ CMakeModules/FindYafPythonLibs.cmake
@@ -36,10 +36,6 @@
   SET(_CURRENT_VERSION ${REQUIRED_PYTHON_VERSION})
 ENDIF(NOT REQUIRED_PYTHON_VERSION)

-IF(_CURRENT_VERSION GREATER 3.1)
-  SET(_CURRENT_VERSION ${_CURRENT_VERSION}m)
-ENDIF(_CURRENT_VERSION GREATER 3.1)
-
 UNSET(PYTHON_DEBUG_LIBRARY CACHE)
 UNSET(PYTHON_LIBRARY CACHE)
 UNSET(PYTHON_INCLUDE_DIR CACHE)
@@ -48,14 +44,14 @@

 IF(WIN32)
   FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
-    NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
+    NAMES python${_CURRENT_VERSION_NO_DOTS}_d python${_CURRENT_VERSION}m_d python${_CURRENT_VERSION}mu_d python
     PATHS
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
 ENDIF(WIN32)

 FIND_LIBRARY(PYTHON_LIBRARY
-  NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+  NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} python${_CURRENT_VERSION}m python${_CURRENT_VERSION}mu
   PATHS
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
   PATH_SUFFIXES
@@ -78,7 +74,7 @@
     ${PYTHON_FRAMEWORK_INCLUDES}
     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
   PATH_SUFFIXES
-    python${_CURRENT_VERSION}
+    python${_CURRENT_VERSION} python${_CURRENT_VERSION}m python${_CURRENT_VERSION}mu
 )

 # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.


build not only

build not only

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -128,7 +128,7 @@

 			# 5. compilo y genera el paquete en local
 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)


SNOW-756 / VWR-23385 FOLLOWUP fixed indentation

--- indra/cmake/LLAddBuildTest.cmake
+++ indra/cmake/LLAddBuildTest.cmake
@@ -257,10 +257,10 @@
     set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
   ELSE(WINDOWS)
     # Linux uses a single staging directory anyway.
-	IF (STANDALONE)
+    IF (STANDALONE)
       set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib)
     ELSE (STANDALONE)
-	  set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
+      set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
     ENDIF (STANDALONE)
   ENDIF(WINDOWS)
 ENDMACRO(SET_TEST_LIST)


fixed: find the optimized libs in their current install dir (windows)

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@1933 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/FindOpenSG.cmake
+++ CMake/FindOpenSG.cmake
@@ -27,17 +27,19 @@
   SET(OPENSG_ROOT ${OpenSG_DIR})
 ENDIF(NOT OPENSG_ROOT AND OpenSG_DIR)

-SET(__OpenSG_IN_CACHE TRUE)
-IF(OpenSG_INCLUDE_DIR)
+IF(NOT OSG_FORCE_CACHE_UPDATE)
+  SET(__OpenSG_IN_CACHE TRUE)
+  IF(OpenSG_INCLUDE_DIR)
     FOREACH(COMPONENT ${OpenSG_FIND_COMPONENTS})
         STRING(TOUPPER ${COMPONENT} COMPONENT)
         IF(NOT OpenSG_${COMPONENT}_FOUND)
             SET(__OpenSG_IN_CACHE FALSE)
         ENDIF(NOT OpenSG_${COMPONENT}_FOUND)
     ENDFOREACH(COMPONENT)
-ELSE(OpenSG_INCLUDE_DIR)
+  ELSE(OpenSG_INCLUDE_DIR)
     SET(__OpenSG_IN_CACHE FALSE)
-ENDIF(OpenSG_INCLUDE_DIR)
+  ENDIF(OpenSG_INCLUDE_DIR)
+ENDIF(NOT OSG_FORCE_CACHE_UPDATE)

 # The reason that we failed to find OpenSG. This will be set to a
 # user-friendly message when we fail to find some necessary piece of
@@ -107,15 +109,15 @@

   IF(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE)

-  GET_FILENAME_COMPONENT(OSG_TMP_LIB_DIR_OPT ${OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE}
-                         PATH)
+    GET_FILENAME_COMPONENT(OSG_TMP_LIB_DIR_OPT ${OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE}
+                           PATH)

-  IF(UNIX)
-    SET(OSG_IMP_RELEASE IMPORTED_LOCATION_RELEASE ${OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE})
-  ELSE(UNIX)
+    IF(UNIX)
+      SET(OSG_IMP_RELEASE IMPORTED_LOCATION_RELEASE ${OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE})
+    ELSE(UNIX)
       SET(OSG_IMP_RELEASE IMPORTED_IMPLIB_RELEASE ${OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE}
                           IMPORTED_LOCATION_RELEASE ${OSG_TMP_LIB_DIR_OPT})
-  ENDIF(UNIX)
+    ENDIF(UNIX)

   ENDIF(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE)

@@ -225,7 +227,7 @@
         FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE
             NAMES  ${COMPONENT}
             HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
-            PATH_SUFFIXES "release" "relwithdbg"
+            PATH_SUFFIXES "release" "relwithdbg" "opt"
         )

         FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG


Fix gstreamer-1.0 detection

Fix gstreamer-1.0 detection

--- cmake/FindGStreamer_1_0.cmake
+++ cmake/FindGStreamer_1_0.cmake
@@ -59,7 +59,7 @@

     string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
     if ("${CMAKE_MATCH_2}" STREQUAL "")
-        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
+        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GSTREAMER_1_0_MINIMUM_VERSION}")
     else ()
         pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
     endif ()


cmake/curl: remove hardcoded --with-ssl switch

--- cmake/Modules/BuildCURL.cmake
+++ cmake/Modules/BuildCURL.cmake
@@ -43,7 +43,6 @@
         --disable-ldap
         --without-librtmp
         --disable-rtsp
-        --with-ssl
         --with-zlib
         ${CURL_SSL_SWITCH}


added missing quotes

added missing quotes

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

--- cmake/Modules/FindFlann.cmake
+++ cmake/Modules/FindFlann.cmake
@@ -28,7 +28,7 @@

   find_library(FLANN_LIBRARY_DEBUG
                NAMES flann_cpp_s-gd flann_cpp-gd flann_cpp_s flann_cpp
-               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT} $ENV{FLANN_ROOT}"
+               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
                PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
                      "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9"
                PATH_SUFFIXES lib)
@@ -40,7 +40,7 @@

   find_library(FLANN_LIBRARY_DEBUG
                NAMES flann_cpp-gd flann_cpp
-               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT} $ENV{FLANN_ROOT}"
+               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
                PATH_SUFFIXES lib)
 endif(WIN32)