rename the clean-test-results target to avoid conflicts with the same target in catkin

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -319,12 +319,12 @@
   # conditional to ignore failures (most often happens when a stale NFS
   # handle lingers in the test results directory), because CMake doesn't
   # seem to be able to do it.
-  add_custom_target(clean-test-results
+  add_custom_target(rosbuild_clean-test-results
                     if ! rm -rf ${rosbuild_test_results_dir}/${PROJECT_NAME}\; then echo "WARNING: failed to remove test-results directory"\; fi)
-  # Make the tests target depend on clean-test-results, which will ensure
+  # Make the tests target depend on rosbuild_clean-test-results, which will ensure
   # that test results are deleted before we try to build tests, and thus
   # before we try to run tests.
-  add_dependencies(tests clean-test-results)
+  add_dependencies(tests rosbuild_clean-test-results)
   # The 'test-future' target runs the future tests
   add_custom_target(test-future)


Fixed moc warning

Fixed moc warning

--- Modules/QtWidgets/files.cmake
+++ Modules/QtWidgets/files.cmake
@@ -64,7 +64,6 @@
   include/QmitkStdMultiWidget.h
   include/QmitkMouseModeSwitcher.h
   include/QmitkDataStorageComboBoxWithSelectNone.h
-  include/QmitkPropertyItem.h
   include/QmitkPropertyItemDelegate.h
   include/QmitkPropertyItemModel.h
 )


Update example_config.cmake

Update example_config.cmake

--- scripts/cmake/config/example_config.cmake
+++ scripts/cmake/config/example_config.cmake
@@ -160,7 +160,7 @@
     set(ENABLE_BUILD_TEST OFF)
 endif()

-if(ENABLE_DEVELOPER_MODE)
+if(ENABLE_DEVELOPER_MODE AND NOT HOST_SYSTEM_NAME STREQUAL "Windows")
     set(ENABLE_ASAN ON)
     set(ENABLE_TIDY ON)
     set(ENABLE_FORMAT ON)


MAINT: quiet down some annoying compiler warnings with MSVC.

--- cmake/do_configure_cxx_compiler.cmake
+++ cmake/do_configure_cxx_compiler.cmake
@@ -2,13 +2,18 @@

 # Visual C++ compiler
 if (MSVC)
-  add_definitions(/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_DEPRECATE)
-  message(STATUS "  - NON-SECURE warnings are disabled.")
+  add_definitions(
+    /D_SCL_SECURE_NO_WARNINGS
+    /D_CRT_SECURE_NO_DEPRECATE
+    /wd4251)
+  message(STATUS "  - Disabled annoying warnings in MSVC.")
+
   add_definitions(/EHsc)
   message(STATUS
           "  - Using /EHsc: catches C++ exceptions only and tells the "
           "compiler to assume that extern C functions never throw a C++ "
           "exception.")
+
   if (MSVC_VERSION EQUAL 1700)
     message(STATUS
             "  - Using version 2012: setting '_VARIADIC_MAX=10' to compile "


odb-boost: ++PACKAGE_INTERNAL_DEPS_ID

odb-boost: ++PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/odb-boost/hunter.cmake
+++ cmake/projects/odb-boost/hunter.cmake
@@ -27,5 +27,5 @@
     PACKAGE_UNRELOCATABLE_TEXT_FILES
     "lib/libodb-boost.la"
     "lib/pkgconfig/libodb-boost.pc"
-    PACKAGE_INTERNAL_DEPS_ID "7"
+    PACKAGE_INTERNAL_DEPS_ID "8"
 )


qibuild: be more and more standard...

qibuild: be more and more standard...

If you install qibuild/cmake/qibuild in /usr/share/cmake/Modules,
it just fucking works !

--- cmake/qibuild/templates/qibuild.cmake
+++ cmake/qibuild/templates/qibuild.cmake
@@ -6,7 +6,7 @@
 # This file is part of the qibuild project    #
 ###############################################

-set(QIBUILD_BOOTSTRAP_VERSION 6)
+set(QIBUILD_BOOTSTRAP_VERSION 7)

 ##
@@ -79,15 +79,17 @@
   endif()
 endfunction()

+
+include(qibuild/general OPTIONAL RESULT_VARIABLE _qibuild_found)
+if(_qibuild_found)
+  return()
+endif()
+
 if(NOT EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
   bootstrap()
 endif()

-if(EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
-  include(${CMAKE_BINARY_DIR}/dependencies.cmake)
-else()
-  message(STATUS "can't find dependencies.cmake")
-endif()
+include(${CMAKE_BINARY_DIR}/dependencies.cmake)
+

 include(qibuild/general)
-


MUSL stack size (#4995)

MUSL stack size (#4995)

--- CMake/Fixups.cmake
+++ CMake/Fixups.cmake
@@ -4,4 +4,12 @@
 		# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
 		target_compile_options(mbedcrypto PRIVATE -fomit-frame-pointer)
 	endif()
+
+	if(UNIX)
+		execute_process(COMMAND ldd OUTPUT_VARIABLE LDD_OUTPUT ERROR_VARIABLE LDD_OUTPUT)
+		if (LDD_OUTPUT MATCHES musl)
+			# Bring musl stack size in line with other platforms:
+			target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-Wl,-z,stack-size=1048576")
+		endif()
+	endif()
 endfunction()


minor wording change, testing svn

minor wording change, testing svn

--- README.cmake
+++ README.cmake
@@ -10,7 +10,7 @@

 and so on.

-Eventually, we will replace the Gnu autoconf/automake/libtool toolset for P2
+Very soon, we will replace the Gnu autoconf/automake/libtool toolset for P2
 with cmake, to allow us better cross-platform compatibility (especially for
 the upcoming Windows port).

@@ -41,4 +41,4 @@

 When you want to clean up, you can simply run "rm -rf ~/devel/build". There is
 no "make clean" target in cmake, you simply blow away the directory where you
-did the build.+did the build.


Update ITK superbuild version to 4.12rc2

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -51,7 +51,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.12rc01) # v4.12 Release Candidate
+set(ITK_TAG_COMMAND GIT_TAG v4.12rc02) # v4.12 Release Candidate

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


ARROW-8420: [C++] Distinguish ARMv7 from ARMv8 in SetupCxxFlags.cmake

ARMv7 machines may not be that practical for data processing purposes, but the project should at least build there.

Closes #6914 from wesm/ARROW-8420

Authored-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>
Signed-off-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -20,8 +20,13 @@
 include(CheckCXXCompilerFlag)
 # Get cpu architecture
 set(ARROW_CPU_FLAG "x86")
+
+message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")
+
 if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64")
-  set(ARROW_CPU_FLAG "arm")
+  set(ARROW_CPU_FLAG "armv8")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7")
+  set(ARROW_CPU_FLAG "armv7")
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
   set(ARROW_CPU_FLAG "ppc")
 endif()
@@ -46,7 +51,7 @@
   # power compiler flags, gcc/clang only
   set(ARROW_ALTIVEC_FLAG "-maltivec")
   check_cxx_compiler_flag(${ARROW_ALTIVEC_FLAG} CXX_SUPPORTS_ALTIVEC)
-elseif(ARROW_CPU_FLAG STREQUAL "arm")
+elseif(ARROW_CPU_FLAG STREQUAL "armv8")
   # Arm64 compiler flags, gcc/clang only
   set(ARROW_ARMV8_ARCH_FLAG "-march=${ARROW_ARMV8_ARCH}")
   check_cxx_compiler_flag(${ARROW_ARMV8_ARCH_FLAG} CXX_SUPPORTS_ARMV8_ARCH)
@@ -328,7 +333,7 @@
   endif()
 endif()

-if(ARROW_CPU_FLAG STREQUAL "arm")
+if(ARROW_CPU_FLAG STREQUAL "armv8")
   if(NOT CXX_SUPPORTS_ARMV8_ARCH)
     message(FATAL_ERROR "Unsupported arch flag: ${ARROW_ARMV8_ARCH_FLAG}.")
   endif()


added warning and turned off shallow for git version less than 2.14 (#6055)

added warning and turned off shallow for git version less than 2.14

--- libraries/cmake/source/modules/utils.cmake
+++ libraries/cmake/source/modules/utils.cmake
@@ -25,10 +25,13 @@
     set(optional_recursive_arg "--recursive")
   endif()

+  set(optional_depth_arg "")
   if(shallow)
-    set(optional_depth_arg "--depth=1")
-  else()
-    set(optional_depth_arg "")
+    if(GIT_VERSION_STRING VERSION_GREATER_EQUAL "2.14.0")
+      set(optional_depth_arg "--depth=1")
+    else()
+      message(WARNING "Git version >=2.14.0 is required to perform shallow clones, detected version ${GIT_VERSION_STRING}, falling back to full clones (slower).")
+    endif()
   endif()

   # In git versions >= 2.18.0 we need to explicitly set the protocol


Fix corner case where cached version of CPM was never updated.

--- CPM.cmake
+++ CPM.cmake
@@ -707,6 +707,17 @@
       GIT_TAG "origin/master"
       USE_CACHING FALSE
       )
+
+    # Ensure that the cached version of CPM is up-to-date and cloned.
+    if ((DEFINED CPM_MODULE_CACHE_DIR) AND (NOT DEFINED CPM_MODULE_CACHE_NO_WRITE))
+      CPM_EnsureRepoIsCurrent(
+        TARGET_DIR "${CPM_MODULE_CACHE_DIR}/github_iauns_cpm"
+        GIT_REPOSITORY "https://github.com/iauns/cpm"
+        GIT_TAG "origin/master"
+        USE_CACHING FALSE
+        )
+    endif()
+
   endif()
 endmacro()

@@ -1869,23 +1880,3 @@

 endfunction()

-
-# Check to see if we should cache a copy of CPM in the cache directory.
-if (DEFINED CPM_MODULE_CACHE_DIR)
-  if (NOT EXISTS "${CPM_MODULE_CACHE_DIR}/github_iauns_cpm/")
-    # Clone the CPM repository into cache.
-    CPM_EnsureRepoIsCurrent(
-      TARGET_DIR "${CPM_MODULE_CACHE_DIR}/github_iauns_cpm"
-      GIT_REPOSITORY "https://github.com/iauns/cpm"
-      GIT_TAG "origin/master"
-      USE_CACHING FALSE
-      )
-  endif()
-  if (NOT EXISTS "${CPM_MODULE_CACHE_DIR}/init-cpm.cmake")
-    file(COPY ${CPM_DIR_OF_CPM}/init-cpm.cmake DESTINATION ${CPM_MODULE_CACHE_DIR}/)
-  endif()
-  if (NOT EXISTS "${CPM_MODULE_CACHE_DIR}/init-cpm-module.cmake")
-    file(COPY ${CPM_DIR_OF_CPM}/init-cpm-module.cmake DESTINATION ${CPM_MODULE_CACHE_DIR}/)
-  endif()
-endif()
-


Ensure tag checking is quiet.

Ensure tag checking is quiet.

If we fail to find the tag, error_code will be set to a positive value
and we will refetch the repository.

--- CPM.cmake
+++ CPM.cmake
@@ -906,6 +906,8 @@
     WORKING_DIRECTORY "${dir}"
     RESULT_VARIABLE error_code
     OUTPUT_VARIABLE tag_sha
+    OUTPUT_QUIET
+    ERROR_QUIET
     )

   # Is the hash checkout out that we want?


Quick fix for gtest

Quick fix for gtest

FIXME: fix export_lib() instead

--- cmake/qibuild/modules/gtest-config.cmake
+++ cmake/qibuild/modules/gtest-config.cmake
@@ -13,5 +13,5 @@
   flib(GTEST gtest_main)
 endif()

-set(GTEST_DEPENDS PTHREAD)
+set(GTEST_DEPENDS PTHREAD CACHE STRING "" FORCE)
 export_lib(GTEST)


Write module filename for Buildyard metamodule target

--- GNUModules.cmake
+++ GNUModules.cmake
@@ -150,6 +150,10 @@
   "\n"
 )

+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Module.txt
+  "${MODULE_FILENAME}"
+)
+
 get_property(INSTALL_DEPENDS GLOBAL PROPERTY ALL_DEP_TARGETS)
 set(MODULE_SRC_INSTALL "${MODULE_SW_BASEDIR}/${MODULE_SW_CLASS}/${MODULE_PACKAGE_NAME}/${MODULE_VERSION}/${MODULE_PLATFORM}/${MODULE_COMPILER}")
 add_custom_target(module_install


[CMake] Fix wrong comment

[CMake] Fix wrong comment

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -91,7 +91,7 @@
         set(PYTHON_LIBRARIES "${Python${PYTHON_PREFER_VERSION}_LIBRARIES}")
         set(PYTHON_LIBRARY_DIR "${Python${PYTHON_PREFER_VERSION}_LIBRARY_DIRS}")
         # Set PyROOT variables
-        set(Python${PYTHON_PREFER_VERSION}_Interpreter_Development_FOUND ON) # This means we have both Interpreter and Development, hence we can build PyROOT with Python3
+        set(Python${PYTHON_PREFER_VERSION}_Interpreter_Development_FOUND ON) # This means we have both Interpreter and Development, hence we can build PyROOT with this Python
         set(PYTHON_EXECUTABLE_Development_Main "${Python${PYTHON_PREFER_VERSION}_EXECUTABLE}")
         set(PYTHON_VERSION_STRING_Development_Main "${Python${PYTHON_PREFER_VERSION}_VERSION}")
         set(PYTHON_VERSION_MAJOR_Development_Main "${Python${PYTHON_PREFER_VERSION}_VERSION_MAJOR}")


updated STIR TAG

updated STIR TAG

--- version_config.cmake
+++ version_config.cmake
@@ -116,11 +116,11 @@
   set(DEFAULT_glog_TAG v035)

 else()
-  set(DEFAULT_SIRF_TAG v1.0.0-rc.3)
+  set(DEFAULT_SIRF_TAG v1.0.0)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG 36200d37f83a9487a6eb3929b007967907910948 )
+  set(DEFAULT_STIR_TAG 5710d438090a972bd7b0636ff6de5315519b78e9 )

   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )


fix for cmake gui build

fix for cmake gui build

--- tensorflow/contrib/cmake/tf_cc_ops.cmake
+++ tensorflow/contrib/cmake/tf_cc_ops.cmake
@@ -149,7 +149,7 @@
 add_dependencies(tf_cc tf_cc_framework tf_cc_ops)

 if (WIN32)
-  set (pywrap_tensorflow_lib "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/pywrap_tensorflow_internal.lib")
+  set (pywrap_tensorflow_lib "${CMAKE_CURRENT_BINARY_DIR}/$(Configuration)/pywrap_tensorflow_internal.lib")
 else (WIN32)
   set (pywrap_tensorflow_lib "${CMAKE_CURRENT_BINARY_DIR}/libpywrap_tensorflow_internal.so")
 endif (WIN32)


boards: px4_fmu-v6x_default re-enable top and free up flash

--- boards/px4/fmu-v6x/default.cmake
+++ boards/px4/fmu-v6x/default.cmake
@@ -109,15 +109,15 @@
 		perf
 		pwm
 		reboot
-		reflect
+		#reflect
 		sd_bench
-		serial_test
+		#serial_test
 		system_time
-#		top
+		top
 		topic_listener
 		tune_control
 		uorb
-		usb_connected
+		#usb_connected
 		ver
 		work_queue
 	EXAMPLES


Fix breakpad configuration to list debug and optimized on individual libraries to get proper selection between the two configurations.

--- build/modules/FindBreakpad.cmake
+++ build/modules/FindBreakpad.cmake
@@ -141,7 +141,7 @@
     ENDIF()

     IF(BREAKPAD_COMMON_LIBRARY_RELEASE AND BREAKPAD_EXCEPTION_HANDLER_LIBRARY_RELEASE AND BREAKPAD_CRASH_GEN_CLIENT_LIBRARY_RELEASE)
-      SET(BREAKPAD_LIBRARIES debug "wininet" ${BREAKPAD_COMMON_LIBRARY_DEBUG} ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DEBUG} ${BREAKPAD_CRASH_GEN_CLIENT_LIBRARY_DEBUG} optimized "wininet" ${BREAKPAD_COMMON_LIBRARY_RELEASE} ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_RELEASE} ${BREAKPAD_CRASH_GEN_CLIENT_LIBRARY_RELEASE})
+      SET(BREAKPAD_LIBRARIES "wininet" debug ${BREAKPAD_COMMON_LIBRARY_DEBUG} debug ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DEBUG} debug ${BREAKPAD_CRASH_GEN_CLIENT_LIBRARY_DEBUG} optimized ${BREAKPAD_COMMON_LIBRARY_RELEASE} optimized ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_RELEASE} optimized ${BREAKPAD_CRASH_GEN_CLIENT_LIBRARY_RELEASE})
     ENDIF()

   ELSEIF(APPLE)


Take out removed file from cmake source list, omitted in revision C10084. Issue 3361.

git-svn-id: b9baf8c2d14a71b3ba9c27a102eb6e792fc13348@10085 3c1deb5b-d424-0410-962d-aba41a686d42

--- core/source/cmake/api_source_files.cmake
+++ core/source/cmake/api_source_files.cmake
@@ -67,7 +67,6 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/fontid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/graphicsmaterialid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/graphicsmoduleid.h
-	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/graphicsrendertype.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/interactivetoolid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/nodeid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/source/api/zinc/types/optimisationid.h


reduce warning level on Windows

reduce warning level on Windows

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -168,9 +168,10 @@
   target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PRIVATE "NDDS_USER_DLL_EXPORT")
 endif()
-set(_target_compile_flags "-Wall")
 if(NOT WIN32)
-  set(_target_compile_flags "${_target_compile_flags} -Wextra")
+  set(_target_compile_flags "-Wall -Wextra")
+else()
+  set(_target_compile_flags "/W4")
 endif()
 set_target_properties(${rosidl_generate_interfaces_TARGET}${_target_suffix}
   PROPERTIES COMPILE_FLAGS "${_target_compile_flags}")


update snopt revision

update snopt revision

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -109,7 +109,7 @@
 set(spotless_depends)

 set(snopt_url ssh://git@github.com/RobotLocomotion/snopt.git)
-set(snopt_revision d8a5443e7a30a569f961f381f8bdafec27810b7c)
+set(snopt_revision 063b048229a85d50b9d08e39da72a39ffc4c3a25)
 set(snopt_depends)

 set(gurobi_url ssh://git@github.com/RobotLocomotion/gurobi.git)


update iris

update iris

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -118,7 +118,7 @@
 set(gurobi_depends)

 set(iris_url ssh://git@github.com/rdeits/iris-distro.git)
-set(iris_revision 0b34b9e4beac1cf0d319cb72c809b087b02bef53)
+set(iris_revision b3e9e663e2ac89bc0bd607091e50d598b5914956)
 set(iris_depends)

 set(mosek_url ssh://git@github.com/RobotLocomotion/mosek.git)


Force gflags to not search default paths on static conda builds

Former-commit-id: c76fbfcf5ad833257bda155a669c9dd9a598bbd8

--- cmake-modules/Fetch_gflags.cmake
+++ cmake-modules/Fetch_gflags.cmake
@@ -8,7 +8,7 @@
     list(APPEND GFLAGS_CONDA_PREFIX ${DMRG_CONDA_CANDIDATE_PATHS})
 elseif(DMRG_PREFER_CONDA_LIBS)
     # Static build should avoid conda gflags since it only offers a shared version
-    set(NO_SYSTEM_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+    set(NO_DEFAULT_PATH NO_DEFAULT_PATH)
 endif()

 if(NOT TARGET gflags AND DMRG_DOWNLOAD_METHOD MATCHES "find|fetch")
@@ -17,7 +17,7 @@
             HINTS ${GFLAGS_CONDA_PREFIX}
             ${COMPONENTS} ${ITEMS}
             NO_CMAKE_PACKAGE_REGISTRY
-            ${NO_SYSTEM_ENVIRONMENT_PATH}
+            ${NO_DEFAULT_PATH}
             )
     if(TARGET gflags)
         message(STATUS "Found gflags")
@@ -33,7 +33,7 @@
             ${COMPONENTS} ${ITEMS}
             HINTS ${CMAKE_INSTALL_PREFIX}/gflags
             NO_CMAKE_PACKAGE_REGISTRY
-            ${NO_SYSTEM_ENVIRONMENT_PATH}
+            ${NO_DEFAULT_PATH}
             )
     if(TARGET gflags)
         message(STATUS "gflags installed successfully")


cmake: fix bug in add_plugintest

cmake: fix bug in add_plugintest

add_plugintest wasn't respecting LINK_PLUGIN when searching for added plugin

--- cmake/Modules/LibAddPlugin.cmake
+++ cmake/Modules/LibAddPlugin.cmake
@@ -84,14 +84,20 @@
 				       "${MULTI_VALUE_KEYWORDS}" # multi value keywords
 				       ${ARGN})

+		if (ARG_LINK_PLUGIN)
+			set (testplugin "${ARG_LINK_PLUGIN}")
+		else (ARG_LINK_PLUGIN)
+			set (testplugin "${testname}")
+		endif (ARG_LINK_PLUGIN)
+
 		list (FIND ADDED_PLUGINS
-			   "${testname}"
+			   "${testplugin}"
 			   FOUND_NAME)
 		if (FOUND_NAME EQUAL -1)
 			if (NOT ARG_LINK_PLUGIN)
 				message (
 					FATAL_ERROR
-						"Trying to add plugintest ${testname} but no such plugin was added (try to use LINK_PLUGIN)"
+						"Trying to add plugintest ${testplugin} but no such plugin was added (try to use LINK_PLUGIN)"
 					)
 			endif ()

@@ -99,7 +105,7 @@
 			return ()
 		endif ()

-		set (PLUGIN_NAME elektra-${testname})
+		set (PLUGIN_NAME elektra-${testplugin})
 		restore_variable (${PLUGIN_NAME} ARG_LINK_LIBRARIES)
 		restore_variable (${PLUGIN_NAME} ARG_COMPILE_DEFINITIONS)
 		restore_variable (${PLUGIN_NAME} ARG_INCLUDE_DIRECTORIES)


Bug 793368 - Install AppStream metadata to /usr/share/metainfo/

--- cmake/modules/FindIntltool.cmake
+++ cmake/modules/FindIntltool.cmake
@@ -39,7 +39,7 @@
 #
 # add_appdata_file(_infilename _outfilename)
 #    A shortcut to call intltool-merge() for an appdata file and install it
-#    to ${SHARE_INSTALL_PREFIX}/appdata
+#    to ${SHARE_INSTALL_PREFIX}/metainfo

 include(FindGettext)

@@ -204,6 +204,6 @@
 	add_dependencies(appdata-files appdata-${_outtarget})

 	install(FILES ${_out}
-		DESTINATION ${SHARE_INSTALL_PREFIX}/appdata
+		DESTINATION ${SHARE_INSTALL_PREFIX}/metainfo
 	)
 endmacro(add_appdata_file)


CMake first check defualts enviroment .. later the appended pathes. If
other libraries already installed in the system enviroment this will
found .. instead of the libraries in the extended PATHS list (quote from CMake help):

       The reason the paths listed in the call to the command are searched
       last is that most users of CMake would expect things to be found first
       in the locations specified by their environment.  Projects may
       override this behavior by simply calling the command twice:

          FIND_LIBRARY(<VAR> NAMES name PATHS paths NO_DEFAULT_PATH)
          FIND_LIBRARY(<VAR> NAMES name)

       Once one of these calls succeeds the result variable will be set and
       stored in the cache so that neither call will search again.

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@2617 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/modules/FindOpenSync.cmake
+++ cmake/modules/FindOpenSync.cmake
@@ -19,10 +19,12 @@
 	PKGCONFIG( opensync-1.0 _opensync_include_DIR _opensync_link_DIR _opensync_link_FLAGS _opensync_cflags )
 ENDIF ( NOT WIN32 )

-# Look for OpenSync include dir and libraries
-FIND_PATH( OPENSYNC_INCLUDE_DIR opensync/opensync.h PATHS ${_opensync_include_DIR} PATH_SUFFIXES opensync-1.0 )
+# Look for OpenSync include dir and libraries, and take care about pkg-config first...
+FIND_PATH( OPENSYNC_INCLUDE_DIR opensync/opensync.h PATHS ${_opensync_include_DIR} PATH_SUFFIXES opensync-1.0 NO_DEFAULT_PATH )
+FIND_PATH( OPENSYNC_INCLUDE_DIR opensync/opensync.h PATH_SUFFIXES opensync-1.0 )

-FIND_LIBRARY( OPENSYNC_LIBRARIES opensync PATHS ${_opensync_link_DIR} )
+FIND_LIBRARY( OPENSYNC_LIBRARIES opensync PATHS ${_opensync_link_DIR} NO_DEFAULT_PATH )
+FIND_LIBRARY( OPENSYNC_LIBRARIES opensync )

 # Report results
 IF ( OPENSYNC_LIBRARIES AND OPENSYNC_INCLUDE_DIR )


Fix flags for OS X

Fix flags for OS X

--- cmake/posix/px4_impl_posix.cmake
+++ cmake/posix/px4_impl_posix.cmake
@@ -166,13 +166,25 @@
                 mavlink/include/mavlink
                 )

+if(UNIX AND APPLE)
         set(added_definitions
 		-D__PX4_POSIX
-                -D__PX4_LINUX
+		-D__PX4_DARWIN
 		-DCLOCK_MONOTONIC=1
 		-Dnoreturn_function=__attribute__\(\(noreturn\)\)
 		-include ${PX4_INCLUDE_DIR}visibility.h
                 )
+
+else()
+
+        set(added_definitions
+		-D__PX4_POSIX
+		-D__PX4_LINUX
+		-DCLOCK_MONOTONIC=1
+		-Dnoreturn_function=__attribute__\(\(noreturn\)\)
+		-include ${PX4_INCLUDE_DIR}visibility.h
+                )
+endif()

         set(added_exe_linker_flags
 		-lpthread


Added option to disable half precision functionality completely. Fixed compilation errors on casesensitive file systems. Android: assumed NEON is always available.

--- nnpack.cmake
+++ nnpack.cmake
@@ -67,9 +67,10 @@
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/src           )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/src/ref       )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/fp16/include  )
-target_include_directories( NNPACK PRIVATE ${nnpack_source}/FXdiv/include )
+target_include_directories( NNPACK PRIVATE ${nnpack_source}/fxdiv/include )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/psimd/include )

+target_compile_definitions( NNPACK PRIVATE NNP_DISABLE_HALF_PRECISION=1 )
 if ( DEFINED nnpack_explicit_backend )
   target_compile_definitions( NNPACK PRIVATE NNP_BACKEND_${nnpack_explicit_backend}=1 )
 endif()
@@ -98,7 +99,7 @@
 elseif( iOS )
   string( REPLACE ";" " " neon_source_files "${nnpack_neon_sources}" )
   set_target_properties( NNPACK PROPERTIES
-    XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7] "$(OTHER_CFLAGS) -mfpu=neon-fp16"
+    XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7]  "$(OTHER_CFLAGS) -mfpu=neon-fp16"
     XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7s] "$(OTHER_CFLAGS) -mfpu=neon-fp16"
     XCODE_ATTRIBUTE_EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] "${neon_source_files}" # those sources fail to build for simulator
     XCODE_ATTRIBUTE_GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] "NNP_BACKEND_PSIMD" # don't use AVX2 on iOS simulator


Delete CTestTestfile.cmake

Delete CTestTestfile.cmake

--- src/UGVControl/build/CTestTestfile.cmake
+++ src/UGVControl/build/CTestTestfile.cmake
@@ -1,7 +0,0 @@
-# CMake generated Testfile for
-# Source directory: /home/anthony/UGVControl/src
-# Build directory: /home/anthony/UGVControl/build
-#
-# This file includes the relevant testing commands required for
-# testing this directory and lists subdirectories to be tested as well.
-subdirs(gtest)


standalone fix

standalone fix

--- examples/include.cmake
+++ examples/include.cmake
@@ -28,7 +28,13 @@

 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 if ("$ENV{GAMS_BUILD}" STREQUAL "")
-    set(BASEPATH "${GAMSPATH}/apifiles")
+    # stand alone subproject
+    if ("${GAMSPATH}" STREQUAL "")
+        message("STANDALONE: ${CMAKE_CURRENT_SOURCE_DIR}")
+        set(BASEPATH "${CMAKE_CURRENT_SOURCE_DIR}/../..")
+    else()
+        set(BASEPATH "${GAMSPATH}/apifiles")
+    endif()
     include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../C++/api")
 else()
     # jenkins switch:


TEST: update debug traces for ci

TEST: update debug traces for ci

--- CMake/FindOpenCV.cmake
+++ CMake/FindOpenCV.cmake
@@ -137,7 +137,7 @@
   set(OPENCV_VERSION ${OpenCV_VERSION}) #for compatility
 endif()
 message("OpenCV_VERSION")
-message("${OpenCV_VERSION} ${OPENCV_ml_LIBRARY} ${OPENCV_core_LIBRARY}")
+message("${OpenCV_VERSION} ${OPENCV_ml_LIBRARY} ${OPENCV_core_LIBRARY} ${opencv_INCLUDE_DIR} ${OPENCV_SEARCH_PATH}")

 include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 find_package_handle_standard_args(OpenCV


ENH: Update ImageViewer checksum to compile on Macs

Change-Id: I5b561370819710154e85455270da637fb447802f

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -432,7 +432,7 @@
 set( proj ImageViewer )
 ExternalProject_Add( ImageViewer
   GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/ImageViewer.git"
-  GIT_TAG "361e639e999d2d8f3aa093a6611398798099c89c"
+  GIT_TAG "914c6127d5c07332ed3b365ae8308a584f276445"
   SOURCE_DIR "${CMAKE_BINARY_DIR}/ImageViewer"
   BINARY_DIR ImageViewer-Build
   CMAKE_GENERATOR ${gen}


Increment version to VTK 6.1.0

Increment version to VTK 6.1.0

Change-Id: I754b471b2fe5b1fce74cf9d2848769583cfdd610

--- CMake/vtkVersion.cmake
+++ CMake/vtkVersion.cmake
@@ -1,4 +1,4 @@
 # VTK version number components.
 set(VTK_MAJOR_VERSION 6)
-set(VTK_MINOR_VERSION 0)
+set(VTK_MINOR_VERSION 1)
 set(VTK_BUILD_VERSION 0)


Dynamic suffix for libraries

Dynamic suffix for libraries

--- external/UseGDAL.cmake
+++ external/UseGDAL.cmake
@@ -25,7 +25,13 @@

 set(GDAL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install/include CACHE INTERNAL "")
 # NOTE: setting the GDAL_INCLUDES as an internal cache variable, makes it accessible to other modules.
-set(GDAL_LIBRARY  ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install/lib/libgdal.so CACHE INTERNAL "")
+if(APPLE)
+    set(LIB_SUFFIX dylib)
+else()
+    set(LIB_SUFFIX so)
+endif()
+
+set(GDAL_LIBRARY  ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install/lib/libgdal.${LIB_SUFFIX} CACHE INTERNAL "")

 #set(GDAL_LIB_DIR ${GDAL_BASE_DIR}/osgearth-build/lib)


[cmake] Generate opt-remark bitstream files for the stdlib.

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -91,6 +91,9 @@
     # FIXME: We shouldn't /have/ to build things in a single process.
     # <rdar://problem/15972329>
     list(APPEND swift_compile_flags "-whole-module-optimization")
+    if(sdk IN_LIST SWIFT_APPLE_PLATFORMS OR sdk STREQUAL "MACCATALYST")
+      list(APPEND swift_compile_flags "-save-optimization-record=bitstream")
+    endif()

     _compile_swift_files(
         dependency_target


Revert "[cmake] Ignore required explicit availability in Swift stdlib"

This reverts commit 4bec9d54e72cc13858b1eaae9abb12eed7e93c81.

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -483,8 +483,7 @@
   # The standard library and overlays are built resiliently when SWIFT_STDLIB_STABLE_ABI=On.
   if(SWIFTFILE_IS_STDLIB AND SWIFT_STDLIB_STABLE_ABI)
     list(APPEND swift_flags "-enable-library-evolution")
-    list(APPEND swift_flags "-library-level" "api")
-    list(APPEND swift_flags "-Xfrontend" "-require-explicit-availability=ignore")
+    list(APPEND swift_flags "-Xfrontend" "-library-level"  "-Xfrontend" "api")
   endif()

   if("${SWIFT_SDK_${SWIFTFILE_SDK}_THREADING_PACKAGE}" STREQUAL "none")


* cmake: use bindir variable for journal-flush service;

--- data/systemd/journal-flush.service.cmake
+++ data/systemd/journal-flush.service.cmake
@@ -14,5 +14,5 @@
 Before=systemd-user-sessions.service

 [Service]
-ExecStart=@rootbindir@/systemctl kill --kill-who=main --signal=SIGUSR1 journald.service
+ExecStart=@bindir@/systemctl kill --kill-who=main --signal=SIGUSR1 journald.service
 Type=oneshot


Misc: Disable error on web builds and hope they work.

--- Source/ThirdParty/EASTL/scripts/CMake/CommonCppFlags.cmake
+++ Source/ThirdParty/EASTL/scripts/CMake/CommonCppFlags.cmake
@@ -35,7 +35,9 @@
         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     endif()
     if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.0")
-        message(FATAL_ERROR "Building with a clang version less than 3.0 is not supported.")
+        if (NOT WEB)
+            message(FATAL_ERROR "Building with a clang version less than 3.0 is not supported.")
+        endif ()
     endif()
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
     if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0"))


- switch to EPEL testing test bed for DPM test

--- test/functional/ctest_functional.cmake
+++ test/functional/ctest_functional.cmake
@@ -7,7 +7,8 @@
 set(BASIC_PASSWD "tester")

 set(http_desy_base "https://vm-dcache-deploy6.desy.de:2880/dteam/davix-tests" CACHE STRING "dCache test instance to use")
-set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )
+#set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )
+set(http_lcgdm_base "https://lxfsra10a01.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )
 set(http_storm_base "https://gridhttps-storm-atlas.cr.cnaf.infn.it:8443/webdav/dteam/davix-tests/" CACHE STRING "Storm test instance to use")
 set(http_dynaFed_base "http://dav-federation.cern.ch/myfed/dteam/")
 set(http_lcgdm_file "${http_lcgdm_base}/davix-tests/testread0011")


FIX #2174 -- remove `DEBUG_POSTFIX`

FIX #2174 -- remove `DEBUG_POSTFIX`

while this is not synced with the pkg-config file, it only breaks things

Fix #2174

Signed-off-by: Ayush Joshi <c4f6dabab2b45a1d30013834bed64a7c1734fc32@gmail.com>

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -154,10 +154,6 @@
   set_target_properties(${name}
     PROPERTIES
     COMPILE_FLAGS "${cxx_flags}")
-  # Generate debug library name with a postfix.
-  set_target_properties(${name}
-    PROPERTIES
-    DEBUG_POSTFIX "d")
   # Set the output directory for build artifacts
   set_target_properties(${name}
     PROPERTIES


Revert "Enable address sanitizer on gcc >= 4.8" (See #67)

This reverts commit 9bd599390e483e88e2a5d74992787ec8f55814d0.

--- Compiler.cmake
+++ Compiler.cmake
@@ -55,9 +55,6 @@
   endif()
   if(CMAKE_COMPILER_IS_CLANG)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-  endif()
-  if(NOT GCC_COMPILER_VERSION VERSION_LESS 4.8)
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
   endif()

 # icc


Yet another change that may or may not work

--- exc_control/cmake_modules/FindSFML.cmake
+++ exc_control/cmake_modules/FindSFML.cmake
@@ -66,6 +66,10 @@
     $ENV{SFML_ROOT}
     ~/Library/Frameworks
     /Library/Frameworks
+    /usr/lib
+    /usr/lib/x86_64-linux-gnu
+    /usr/include
+    /usr/include/SFML
     /usr/local
     /usr
     /sw


osgEarth CMake file cleanup

osgEarth CMake file cleanup

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -7,261 +7,45 @@

 # The OSGWORKS_STATIC preprocessor definition tells osgBullet that
 # we are using the static version of osgWorks.
+set(OSGEARTH_GENERATOR ${CMAKE_GENERATOR})
+
+set(OSGEARTH_ARGS
+     -DCMAKE_CXX_FLAGS:STRING=${OSGEARTH_CXX_FLAGS}
+	 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+     -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+     -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+     -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+     -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+     -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+     -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+     -DOSGEARTH_USE_QT=OFF
+     -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
+)
+
 if(WIN32)
-    set(OSGEARTH_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D\"OSGWORKS_STATIC\"")
-else()
-    set(OSGEARTH_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOSGWORKS_STATIC")
-endif()
-if(WIN32)
-	ExternalProject_Add(
-		osgearth
-	    GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
-		CMAKE_GENERATOR ${OSGWORKS_GENERATOR}
-		DEPENDS osg
-		CMAKE_ARGS
-			-DCMAKE_SHARED_LINKER_FLAGS:STRING="${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:msvcprt.lib /NODEFAULTLIB:libcpmt.lib"
-			-DCMAKE_LINKER_FLAGS:STRING="${CMAKE_LINKER_FLAGS} /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcprt.lib"
-            -DCMAKE_CXX_FLAGS:STRING=${OSGEARTH_CXX_FLAGS}
-			-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}
+    set(OSGEARTH_ARGS
+        -DCMAKE_SHARED_LINKER_FLAGS:STRING="${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:msvcprt.lib /NODEFAULTLIB:libcpmt.lib"
+		-DCMAKE_LINKER_FLAGS:STRING="${CMAKE_LINKER_FLAGS} /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcprt.lib"
+        ${OSGEARTH_ARGS}
+    )
+endif(WIN32)

-			-DOSGInstallType:STRING=${OsgInstallType}
-            -DOSGSourceRoot:STRING=${CMAKE_BINARY_DIR}/modules/omegaOsg/osg-prefix/src/osg
-            -DOSGBuildRoot:STRING=${CMAKE_BINARY_DIR}/modules/omegaOsg/osg-prefix/src/osg-build
-
-			-DBUILD_SHARED_LIBS:BOOLEAN=false
-            #-DOSGBULLET_BUILD_APPLICATIONS=OFF
-            #-DOSGBULLET_BUILD_EXAMPLES=OFF
-            #-DOSGBULLET_INSTALL_DATA=OFF
-			#Bullet
-            #-DBulletInstallType:STRING=${BulletInstallType}
-            #-DBulletSourceRoot:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/bullet-prefix/src/bullet
-            #-DBulletBuildRoot:PATH=${CMAKE_BINARY_DIR}/src/bullet-prefix/src/bullet-build
-			#osgWorks
-            #-DosgWorks_DIR:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/osgWorks-prefix/src/osgWorks-build/lib
-			#osg
-			-DOSG_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSG_LIBRARY:PATH=${osg_LIBRARY}
-			-DOSG_LIBRARY_DEBUG:PATH=${osg_LIBRARY_DEBUG}
-			#osgGA
-			-DOSGGA_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGGA_LIBRARY:PATH=${osgGA_LIBRARY}
-			-DOSGGA_LIBRARY_DEBUG:PATH=${osgGA_LIBRARY_DEBUG}
-			#osgText
-			-DOSGTEXT_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGTEXT_LIBRARY:PATH=${osgText_LIBRARY}
-			-DOSGTEXT_LIBRARY_DEBUG:PATH=${osgText_LIBRARY_DEBUG}
-			#osgViewer
-			-DOSGVIEWER_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGVIEWER_LIBRARY:PATH=${osgViewer_LIBRARY}
-			-DOSGVIEWER_LIBRARY_DEBUG:PATH=${osgViewer_LIBRARY_DEBUG}
-			#osgSim
-			-DOSGSIM_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGSIM_LIBRARY:PATH=${osgSim_LIBRARY}
-			-DOSGSIM_LIBRARY_DEBUG:PATH=${osgSim_LIBRARY_DEBUG}
-			#osgDB
-			-DOSGDB_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGDB_LIBRARY:PATH=${osgDB_LIBRARY}
-			-DOSGDB_LIBRARY_DEBUG:PATH=${osgDB_LIBRARY_DEBUG}
-			#osgUtil
-			-DOSGUTIL_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGUTIL_LIBRARY:PATH=${osgUtil_LIBRARY}
-			-DOSGUTIL_LIBRARY_DEBUG:PATH=${osgUtil_LIBRARY_DEBUG}
-			#osgShadow
-			-DOSGSHADOW_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGSHADOW_LIBRARY:PATH=${osgShadow_LIBRARY}
-			-DOSSHADOW_LIBRARY_DEBUG:PATH=${osgShadow_LIBRARY_DEBUG}
-			#openthreads
-			-DOPENTHREADS_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOPENTHREADS_LIBRARY:PATH=${OpenThreads_LIBRARY}
-			-DOPENTHREADS_LIBRARY_DEBUG:PATH=${OpenThreads_LIBRARY_DEBUG}
-			INSTALL_COMMAND ""
-		)
-elseif(APPLE)
-	ExternalProject_Add(
-		osgearth
-	    GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
-		CMAKE_GENERATOR ${OSGWORKS_GENERATOR}
-		DEPENDS osg
-		CMAKE_ARGS
-			#-DCMAKE_SHARED_LINKER_FLAGS:STRING="${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:msvcprt.lib /NODEFAULTLIB:libcpmt.lib"
-			#-DCMAKE_LINKER_FLAGS:STRING="${CMAKE_LINKER_FLAGS} /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcprt.lib"
-            -DCMAKE_CXX_FLAGS:STRING=${OSGEARTH_CXX_FLAGS}
-			-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}
-
-            #-DOSGInstallType:STRING=${OsgInstallType}
-            #-DOSGSourceRoot:STRING=${CMAKE_BINARY_DIR}/modules/omegaOsg/osg-prefix/src/osg
-            #-DOSGBuildRoot:STRING=${CMAKE_BINARY_DIR}/modules/omegaOsg/osg-prefix/src/osg-build
-
-			# Bild a shared lib on linux, or linking with apps will fail (why? Because little
-			# gnomes live in your computer to make your life miserable)
-			-DBUILD_SHARED_LIBS:BOOLEAN=false
-            -DOSGEARTH_USE_QT=OFF
-            #-DOSGBULLET_BUILD_APPLICATIONS=OFF
-            #-DOSGBULLET_BUILD_EXAMPLES=OFF
-            #-DOSGBULLET_INSTALL_DATA=OFF
-			#Bullet
-            #-DBulletInstallType:STRING=${BulletInstallType}
-            #-DBulletSourceRoot:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/bullet-prefix/src/bullet
-            #-DBulletBuildRoot:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/bullet-prefix/src/bullet-build
-			#osgWorks
-            #-DosgWorks_DIR:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/osgWorks-prefix/src/osgWorks-build/lib
-            -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
-            #osg
-            #-DOSG_INCLUDE_DIR:PATH=${OSG_INSTALL_DIR}/include
-            #-DOSG_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSG_LIBRARY:PATH=${osg_LIBRARY}
-            #-DOSG_LIBRARY_DEBUG:PATH=${osg_LIBRARY_DEBUG}
-			#osgGA
-            #-DOSGGA_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGGA_LIBRARY:PATH=${osgGA_LIBRARY}
-            #-DOSGGA_LIBRARY_DEBUG:PATH=${osgGA_LIBRARY_DEBUG}
-			#osgText
-            #-DOSGTEXT_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGTEXT_LIBRARY:PATH=${osgText_LIBRARY}
-            #-DOSGTEXT_LIBRARY_DEBUG:PATH=${osgText_LIBRARY_DEBUG}
-			#osgViewer
-            #-DOSGVIEWER_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGVIEWER_LIBRARY:PATH=${osgViewer_LIBRARY}
-            #-DOSGVIEWER_LIBRARY_DEBUG:PATH=${osgViewer_LIBRARY_DEBUG}
-			#osgSim
-            #-DOSGSIM_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGSIM_LIBRARY:PATH=${osgSim_LIBRARY}
-            #-DOSGSIM_LIBRARY_DEBUG:PATH=${osgSim_LIBRARY_DEBUG}
-			#osgDB
-            #-DOSGDB_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGDB_LIBRARY:PATH=${osgDB_LIBRARY}
-            #-DOSGDB_LIBRARY_DEBUG:PATH=${osgDB_LIBRARY_DEBUG}
-			#osgUtil
-            #-DOSGUTIL_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGUTIL_LIBRARY:PATH=${osgUtil_LIBRARY}
-            #-DOSGUTIL_LIBRARY_DEBUG:PATH=${osgUtil_LIBRARY_DEBUG}
-			#osgShadow
-            #-DOSGSHADOW_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOSGSHADOW_LIBRARY:PATH=${osgShadow_LIBRARY}
-            #-DOSGSHADOW_LIBRARY_DEBUG:PATH=${osgShadow_LIBRARY_DEBUG}
-            #osgFX
-            #-DOSGFX_LIBRARY:PATH=${osgFX_LIBRARY}
-            #-DOSGFX_LIBRARY_DEBUG:PATH=${osgFX_LIBRARY_DEBUG}
-            #osgTerrain
-            #-DOSGTERRAIN_LIBRARY:PATH=${osgTerrain_LIBRARY}
-            #-DOSGTERRAIN_LIBRARY_DEBUG:PATH=${osgTerrain_LIBRARY_DEBUG}
-            #osgTerrain
-            #-DOSGMANIPULATOR_LIBRARY:PATH=${osgManipulator_LIBRARY}
-            #-DOSGMANIPULATOR_LIBRARY_DEBUG:PATH=${osgManipulator_LIBRARY_DEBUG}
-            #osgWidget
-            #-DOSGWIDGET_LIBRARY:PATH=${osgWidget_LIBRARY}
-            #-DOSGWIDGET_LIBRARY_DEBUG:PATH=${osgWidget_LIBRARY_DEBUG}
-            #openthreads
-            #-DOPENTHREADS_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-            #-DOPENTHREADS_LIBRARY:PATH=${OpenThreads_LIBRARY}
-            #-DOPENTHREADS_LIBRARY_DEBUG:PATH=${OpenThreads_LIBRARY_DEBUG}
-			INSTALL_COMMAND ""
-		)
-else()
-	ExternalProject_Add(
-        osgearth
-	    GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
-		CMAKE_GENERATOR ${OSGWORKS_GENERATOR}
-		DEPENDS bullet osgWorks osg
-		CMAKE_ARGS
-        -DCMAKE_CXX_FLAGS:STRING=${OSGEARTH_CXX_FLAGS}
-			-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}
-
-			-DOSGInstallType:STRING=${OsgInstallType}
-			-DOSGSourceRoot:STRING=${CMAKE_BINARY_DIR}/modules/omegaOsg/osg-prefix/src/osg
-			-DOSGBuildRoot:STRING=${CMAKE_BINARY_DIR}/modules/omegaOsg/osg-prefix/src/osg-build
-
-			# Bild a shared lib on linux, or linking with apps will fail (why? Because little
-			# gnomes live in your computer to make your life miserable)
-			-DBUILD_SHARED_LIBS:BOOLEAN=true
-            #-DOSGBULLET_BUILD_APPLICATIONS=OFF
-            #-DOSGBULLET_BUILD_EXAMPLES=OFF
-            #-DOSGBULLET_INSTALL_DATA=OFF
-			#Bullet
-            #-DBulletInstallType:STRING=${BulletInstallType}
-            #-DBulletSourceRoot:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/bullet-prefix/src/bullet
-            #-DBulletBuildRoot:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsg/bullet-prefix/src/bullet-build
-			#osg
-			-DOSG_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSG_LIBRARY:PATH=${osg_LIBRARY}
-			-DOSG_LIBRARY_DEBUG:PATH=${osg_LIBRARY_DEBUG}
-			#osgGA
-			-DOSGGA_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGGA_LIBRARY:PATH=${osgGA_LIBRARY}
-			-DOSGGA_LIBRARY_DEBUG:PATH=${osgGA_LIBRARY_DEBUG}
-			#osgText
-			-DOSGTEXT_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGTEXT_LIBRARY:PATH=${osgText_LIBRARY}
-			-DOSGTEXT_LIBRARY_DEBUG:PATH=${osgText_LIBRARY_DEBUG}
-			#osgViewer
-			-DOSGVIEWER_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGVIEWER_LIBRARY:PATH=${osgViewer_LIBRARY}
-			-DOSGVIEWER_LIBRARY_DEBUG:PATH=${osgViewer_LIBRARY_DEBUG}
-			#osgSim
-			-DOSGSIM_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGSIM_LIBRARY:PATH=${osgSim_LIBRARY}
-			-DOSGSIM_LIBRARY_DEBUG:PATH=${osgSim_LIBRARY_DEBUG}
-			#osgDB
-			-DOSGDB_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGDB_LIBRARY:PATH=${osgDB_LIBRARY}
-			-DOSGDB_LIBRARY_DEBUG:PATH=${osgDB_LIBRARY_DEBUG}
-			#osgUtil
-			-DOSGUTIL_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGUTIL_LIBRARY:PATH=${osgUtil_LIBRARY}
-			-DOSGUTIL_LIBRARY_DEBUG:PATH=${osgUtil_LIBRARY_DEBUG}
-			#osgShadow
-			-DOSGSHADOW_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOSGSHADOW_LIBRARY:PATH=${osgShadow_LIBRARY}
-			-DOSSHADOW_LIBRARY_DEBUG:PATH=${osgShadow_LIBRARY_DEBUG}
-			#openthreads
-			-DOPENTHREADS_INCLUDE_DIR:PATH=${OSG_INCLUDES}
-			-DOPENTHREADS_LIBRARY:PATH=${OpenThreads_LIBRARY}
-			-DOPENTHREADS_LIBRARY_DEBUG:PATH=${OpenThreads_LIBRARY_DEBUG}
-
-			INSTALL_COMMAND ""
-		)
-endif()
+ExternalProject_Add(
+    osgearth
+    GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
+    CMAKE_GENERATOR ${OSGEARTH_GENERATOR}
+    DEPENDS osg
+    CMAKE_ARGS
+        ${OSGEARTH_ARGS}
+    INSTALL_COMMAND ""
+)

 set_target_properties(osgearth PROPERTIES FOLDER "3rdparty")

-set(OSGEARTH_BASE_DIR ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/osgearth-prefix/src)
+#set(OSGEARTH_BASE_DIR ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/osgearth-prefix/src)
 # NOTE: setting the OSGEARTH_INCLUDES as an internal cache variable, makes it accessible to other modules.
-set(OSGEARTH_INCLUDES ${OSGEARTH_INCLUDES} ${OSGEARTH_BASE_DIR}/osgEarth/include CACHE INTERNAL "")
+#set(OSGEARTH_INCLUDES ${OSGEARTH_INCLUDES} ${OSGEARTH_BASE_DIR}/osgEarth/include CACHE INTERNAL "")

-set(OSGEARTH_LIB_DIR ${OSGEARTH_BASE_DIR}/osgearth-build/lib)
-#set(OSGEARTH_COMPONENTS osgbCollision osgbDynamics osgbInteraction)
-if(OMEGA_OS_WIN)
-	foreach( C ${OSGEARTH_COMPONENTS})
-		set(${C}_LIBRARY ${OSGEARTH_LIB_DIR}/Release/${C}.lib)
-		set(${C}_LIBRARY_DEBUG ${OSGEARTH_LIB_DIR}/Debug/${C}d.lib)
-		set(OSGEARTH_LIBRARIES ${OSGEARTH_LIBRARIES} optimized ${${C}_LIBRARY} debug ${${C}_LIBRARY_DEBUG})
-	endforeach()
-elseif(OMEGA_OS_LINUX)
-    foreach( C ${OSGEARTH_COMPONENTS} )
-		set(${C}_LIBRARY ${OSGEARTH_LIB_DIR}/lib${C}.so)
-		set(${C}_LIBRARY_DEBUG ${OSGEARTH_LIB_DIR}/lib${C}.so)
-		set(OSGEARTH_LIBRARIES ${OSGEARTH_LIBRARIES} optimized ${${C}_LIBRARY} debug ${${C}_LIBRARY_DEBUG})
-	endforeach()
-elseif(APPLE)
-	foreach( C ${OSGEARTH_COMPONENTS} )
-		set(${C}_LIBRARY ${OSGEARTH_LIB_DIR}/lib${C}.a)
-		set(${C}_LIBRARY_DEBUG ${OSGEARTH_LIB_DIR}/lib${C}.a)
-		set(OSGEARTH_LIBRARIES ${OSGEARTH_LIBRARIES} optimized ${${C}_LIBRARY} debug ${${C}_LIBRARY_DEBUG})
-	endforeach()
-endif(OMEGA_OS_WIN)
+#set(OSGEARTH_LIB_DIR ${OSGEARTH_BASE_DIR}/osgearth-build/lib)

-if(WIN32)
-	# Add the DOSGEARTH_STATIC to following projects, so we tell the header files
-	# we are not importing dll symbols.
-	add_definitions(-DOSGEARTH_STATIC)
-endif()
-
-include_directories(${OSG_INCLUDES})
-# NOTE: setting the OSGEARTH_LIBS as an internal cache variable, makes it accessible to other modules.
-set(OSGEARTH_LIBS ${OSGEARTH_LIBRARIES} ${OSGEARTH_LIBS} CACHE INTERNAL "")
+#include_directories(${OSG_INCLUDES})


OSX10.9 fix

OSX10.9 fix

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -1,15 +1,30 @@
 set(OMEGA_OSG_ENABLE_COLLADA_DOM false CACHE BOOL "")

-set(OSGEARTH_ARGS
-	 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-     -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
-     -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
-     -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
-     -DOSGEARTH_USE_QT=OFF
-     -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
-     -DGDAL_INCLUDE_DIR=${GDAL_INCLUDE_DIR}
-     -DGDAL_LIBRARY=${GDAL_LIBRARY}
-)
+if(APPLE)
+    set(OSGEARTH_ARGS
+         -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
+         -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
+         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
+         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+         -DOSGEARTH_USE_QT=OFF
+         -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
+         -DGDAL_INCLUDE_DIR=${GDAL_INCLUDE_DIR}
+         -DGDAL_LIBRARY=${GDAL_LIBRARY}
+    )
+else()
+    set(OSGEARTH_ARGS
+         -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+         -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+         -DOSGEARTH_USE_QT=OFF
+         -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
+         -DGDAL_INCLUDE_DIR=${GDAL_INCLUDE_DIR}
+         -DGDAL_LIBRARY=${GDAL_LIBRARY}
+    )
+endif()

 if(OMEGA_OSG_ENABLE_COLLADA_DOM)
 	set(OSGEARTH_ARGS
@@ -127,6 +142,7 @@
 set(OSGEARTH_BASE_DIR ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/osgearth-prefix/src)
 # NOTE: setting the OSGEARTH_INCLUDES as an internal cache variable, makes it accessible to other modules.
 set(OSGEARTH_INCLUDES ${OSGEARTH_BASE_DIR}/osgearth/src CACHE INTERNAL "")
+set(OSGEARTH_LIBS "")

 set(OSGEARTH_COMPONENTS osgEarth osgEarthAnnotation osgEarthFeatures osgEarthSymbology osgEarthUtil)
 if(OMEGA_OS_WIN)
@@ -145,8 +161,8 @@
 else()
 	# OSX
     foreach( C ${OSGEARTH_COMPONENTS} )
-		set(${C}_LIBRARY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0/lib${C}.dylib)
-		set(${C}_LIBRARY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0/lib${C}d.dylib)
+		set(${C}_LIBRARY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0/lib${C}.dylib)
+		set(${C}_LIBRARY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0/lib${C}d.dylib)
         set(OSGEARTH_LIBS ${OSGEARTH_LIBS} optimized ${${C}_LIBRARY} debug ${${C}_LIBRARY_DEBUG} CACHE INTERNAL "")
 	endforeach()
 endif()


attempting to fix the qhull cmake module

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@460 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindQhull.cmake
+++ cmake/Modules/FindQhull.cmake
@@ -7,9 +7,15 @@
 # QHULL_LIBRARIES - Libraries needed to use QHULL.
 # QHULL_DEFINITIONS - Compiler flags for QHULL.

-find_path(QHULL_INCLUDE_DIR qhull/qhull.h)
+#find_path(QHULL_INCLUDE_DIR qhull/qhull.h)
+find_path(QHULL_INCLUDE_DIR qhull.h
+          HINTS ${QHULL_ROOT}
+          PATH_SUFFIXES qhull src)

-find_library(QHULL_LIBRARY qhull)
+#find_library(QHULL_LIBRARY qhull)
+find_library(QHULL_LIBRARY qhull
+             HINTS ${QHULL_ROOT}
+             PATH_SUFFIXES project)

 set(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR})
 set(QHULL_LIBRARIES ${QHULL_LIBRARY})
@@ -20,3 +26,7 @@

 mark_as_advanced(QHULL_LIBRARY QHULL_INCLUDE_DIR)

+if(QHULL_FOUND)
+  message(STATUS "QHULL found (include: ${QHULL_INCLUDE_DIRS}, lib: ${QHULL_LIBRARIES})")
+endif(QHULL_FOUND)
+


Fix ppa deploy.

Fix ppa deploy.

--- cmake/Modules/UploadPPA.cmake
+++ cmake/Modules/UploadPPA.cmake
@@ -103,7 +103,7 @@
          "\tdh  $@ --buildsystem=cmake\n"
          "\noverride_dh_auto_configure:\n"
          "\tDESTDIR=\"$(CURDIR)\" dh_auto_configure"
-         " -- -DCMAKE_BUILD_TYPE=Release -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_EXT_STRINGS=OFF"
+         " -- -DCMAKE_BUILD_TYPE=Release -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_EXT_STRINGS=OFF "
          "-DAFF3CT_OVERRIDE_VERSION=${GIT_VERSION} -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'"
          "\n\noverride_dh_auto_install:\n"
          "\tdh_auto_install --destdir=\"$(CURDIR)\" --buildsystem=cmake"


Add openblas log configuration

Add openblas log configuration

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -39,6 +39,7 @@

     ExternalProject_Add(
         openblas
+        ${EXTERNAL_PROJECT_LOG_ARGS}
         GIT_REPOSITORY      https://github.com/xianyi/OpenBLAS.git
         GIT_TAG             v0.2.19
         PREFIX              ${CBLAS_SOURCES_DIR}


Set protobuf version when PROTOBUF_ROOT set

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -17,8 +17,13 @@
 macro(PROMPT_PROTOBUF_LIB)
     MESSAGE(STATUS "Protobuf protoc executable: ${PROTOBUF_PROTOC_EXECUTABLE}")
     MESSAGE(STATUS "Protobuf library: ${PROTOBUF_LIBRARY}")
+    MESSAGE(STATUS "Protobuf version: ${PROTOBUF_VERSION}")
     INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
     RETURN()
+endmacro()
+macro(SET_PROTOBUF_VERSION)
+    EXEC_PROGRAM(${PROTOBUF_PROTOC_EXECUTABLE} ARGS --version OUTPUT_VARIABLE PROTOBUF_VERSION)
+    STRING(REGEX MATCH "[0-9]+.[0-9]+" PROTOBUF_VERSION "${PROTOBUF_VERSION}")
 endmacro()

 set(PROTOBUF_ROOT "" CACHE PATH "Folder contains protobuf")
@@ -30,6 +35,7 @@
     find_program(PROTOBUF_PROTOC_EXECUTABLE protoc PATHS ${PROTOBUF_ROOT}/bin)
     if (PROTOBUF_INCLUDE_DIR AND PROTOBUF_LIBRARY AND PROTOBUF_LITE_LIBRARY AND PROTOBUF_PROTOC_LIBRARY AND PROTOBUF_PROTOC_EXECUTABLE)
         message(STATUS "Using custom protobuf library in ${PROTOBUF_ROOT}.")
+        SET_PROTOBUF_VERSION()
         PROMPT_PROTOBUF_LIB()
     else()
         message(WARNING "Cannot find protobuf library in ${PROTOBUF_ROOT}.")
@@ -100,8 +106,7 @@
     FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION})

     IF(PROTOBUF_FOUND)
-        EXEC_PROGRAM(${PROTOBUF_PROTOC_EXECUTABLE} ARGS --version OUTPUT_VARIABLE PROTOBUF_VERSION)
-        STRING(REGEX MATCH "[0-9]+.[0-9]+" PROTOBUF_VERSION "${PROTOBUF_VERSION}")
+        SET_PROTOBUF_VERSION()
         IF("${PROTOBUF_VERSION}" VERSION_LESS "3.1.0")
             SET(PROTOBUF_FOUND OFF)
         ENDIF()


fix bug: fix can not find cudnn in docker env

--- cmake/modules/FindCUDNN.cmake
+++ cmake/modules/FindCUDNN.cmake
@@ -2,7 +2,7 @@

 set(CUDNN_ROOT_DIR "" CACHE PATH "Folder contains NVIDIA cuDNN")

-set(CUDNN_DIR ${CUDNN_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR})
+set(CUDNN_DIR ${CUDNN_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR} /usr /usr/local)

 find_path(CUDNN_INCLUDE_DIRS
           NAMES cudnn.h
@@ -13,7 +13,7 @@
 find_library(CUDNN_LIBRARIES
              NAMES cudnn
              PATHS ${CUDNN_DIR}
-             PATH_SUFFIXES lib lib64 lib/x86_64 lib/x64 lib/x86
+             PATH_SUFFIXES lib lib64 lib/x86_64 lib/x86_64-linux-gnu lib/x64 lib/x86
              NO_DEFAULT_PATH)

 find_package_handle_standard_args(CUDNN DEFAULT_MSG CUDNN_INCLUDE_DIRS CUDNN_LIBRARIES)


cmake/modules/FindVIGRA.cmake: Try to get VIGRA_ROOT from the path.

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -6,6 +6,14 @@
 #  VIGRA_VIGRANUMPYCORE_LIBRARY      - Vigra's vigranumpycore library
 #  VIGRA_VIGRANUMPYCORE_LIBRARY_DIR  - path to Vigra vigranumpycore library

+
+# See if VIGRA_ROOT was set externally, if so use it.
+if (NOT "$ENV{VIGRA_ROOT}" STREQUAL "")
+    set(VIGRA_ROOT $ENV{BOOST_ROOT})
+elseif (NOT "$ENV{VIGRAROOT}" STREQUAL "")
+      set(VIGRA_ROOT $ENV{VIGRAROOT})
+      set(ENV{VIGRA_ROOT} $ENV{VIGRA_ROOT})
+endif()

 # configVersion.hxx only present, after build of Vigra
 FIND_PATH(VIGRA_INCLUDE_DIR vigra/configVersion.hxx PATHS $ENV{VIGRA_ROOT}/include ENV CPLUS_INCLUDE_PATH)


Fix for headerpad unused compilation. Bug in cmake causes the flag to be used with the compiler instead of linker. Fixes #37. Buddy: Ben

--- cmake/toolchain/ios/iOS.cmake
+++ cmake/toolchain/ios/iOS.cmake
@@ -76,10 +76,10 @@

 # Hidden visibilty is required for cxx on iOS
 set (CMAKE_C_FLAGS_INIT "")
-set (CMAKE_CXX_FLAGS_INIT "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
-
-set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
-set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
+set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden")
+
+set (CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
+set (CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")

 set (CMAKE_PLATFORM_HAS_INSTALLNAME 1)
 set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
@@ -87,6 +87,9 @@
 set (CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
 set (CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
 set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
+
+string(REPLACE "-headerpad_max_install_names" " " REMOVE_FLAG_R ${CMAKE_CXX_FLAGS})
+set(CMAKE_CXX_FLAGS ${REMOVE_FLAG_R})

 # hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree
 # (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache


Remove duplicative cache value writing for travis

--- cmake/travis_continuous.cmake
+++ cmake/travis_continuous.cmake
@@ -5,10 +5,6 @@
 set(CTEST_SITE "Travis")
 set(CTEST_BUILD_NAME "Linux-$ENV{TRAVIS_BRANCH}")
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
-
-file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
-PYTHON_COVERAGE:BOOL=ON
-")

 ctest_start("Continuous")
 ctest_configure()


Added tetgen to exports file

Added tetgen to exports file

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -797,7 +797,7 @@
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
     endif()
     #$$TODO: "GEOMETRY" will change to "TOOLS" when we pull kd_lattice out of SheafSystem
-    if("${COMPONENT}" MATCHES "GEOMETRY")
+    if("${COMPONENT}" MATCHES "TOOLS")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
     #    file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(USE_VTK ON CACHE BOOL \"Set to link against VTK libs\" FORCE)\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
@@ -809,6 +809,10 @@
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(TETGEN_INCLUDE_DIR ${TETGEN_INC_DIR} CACHE STRING \"Tetgen Include Path \")\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(TETGEN_LIB_DIR ${TETGEN_LIB_DIR} CACHE STRING \"Tetgen Library Path \")\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(TETGEN_LIB ${TETGEN_LIB} CACHE STRING \"Tetgen Library \")\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
     endif()
 endfunction(export_targets)


stdlib: Build with -requirement-machine-abstract-signatures=verify

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -465,9 +465,10 @@
     endif()
   endif()

-  # The standard library and overlays are built with -requirement-machine-protocol-signatures=verify.
+  # The standard library and overlays are built with the Requirement Machine enabled.
   if(SWIFTFILE_IS_STDLIB)
     list(APPEND swift_flags "-Xfrontend" "-requirement-machine-protocol-signatures=verify")
+    list(APPEND swift_flags "-Xfrontend" "-requirement-machine-abstract-signatures=verify")
   endif()

   # The standard library and overlays are built resiliently when SWIFT_STDLIB_STABLE_ABI=On.


MAINT: remove dead CMake macro.

MAINT: remove dead CMake macro.

--- cmake/UseDO.cmake
+++ cmake/UseDO.cmake
@@ -16,60 +16,3 @@
     set(DO_LIBRARIES "${DO_LIBRARIES};${DO_${COMPONENT}_LIBRARIES}")
   endif ()
 endforeach (COMPONENT)
-
-
-# Not stable yet.
-macro (do_use_modules TARGET COMPONENT_LIST)
-  # Include the following useful macros.
-  set_target_properties(${TARGET} PROPERTIES
-                        COMPILE_FLAGS -DSRCDIR=${CMAKE_CURRENT_SOURCE_DIR})
-
-  if (DO_USE_FROM_SOURCE)
-    set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS DO_STATIC)
-    target_link_libraries(${TARGET} ${COMPONENT_LIST})
-  else ()
-    # Warn the user that precompiled libraries does not work for every build
-    # types...
-    message (WARNING "Precompiled libraries only work for DEBUG or RELEASE builds... If you want to use other build modes, you need to recompile DO++ from the sources. To do so, just insert at the top of the CMakeLists.txt: '(set DO_USE_FROM_SOURCE 1)'")
-
-    # Static or dynamic linking?
-    if (DO_USE_STATIC_LIBS)
-      set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS DO_STATIC)
-    endif ()
-
-    # Set library paths
-    if (WIN32)
-      set(FLAG /LIBPATH:"${DO_DIR}/lib")
-    else ()
-      set(FLAG -L"${DO_DIR}/lib")
-    endif ()
-    set_target_properties(${TARGET} PROPERTIES LINK_FLAGS ${FLAG})
-
-    # Link with libraries listed in ${COMPONENT_LIST}
-    foreach (f ${COMPONENT_LIST})
-      if ("${f}" STREQUAL "DO_Graphics")
-        qt5_use_modules(${TARGET} Widgets OpenGL) # Link with Qt5
-        target_link_libraries(${TARGET} ${OPENGL_LIBRARIES})
-      endif ()
-
-      # \todo: CHECK THAT AGAIN...
-      if (NOT "${${f}_LIBRARIES}" STREQUAL "" AND NOT DO_USE_STATIC_LIBS)
-        if (WIN32)
-          target_link_libraries(${TARGET}
-                                debug ${f}-${DO_VERSION}-d
-                                optimized ${f}-${DO_VERSION})
-        else ()
-          target_link_libraries(${TARGET} ${f}-${DO_VERSION})
-        endif ()
-      elseif (NOT "${${f}_LIBRARIES}" STREQUAL "")
-         if (WIN32)
-           target_link_libraries(${TARGET}
-                                 debug ${f}-{DO_VERSION}-debug
-                                 optimized ${f}-${DO_VERSION})
-        else ()
-          target_link_libraries(${TARGET} ${f}-${DO_VERSION})
-        endif ()
-      endif ()
-    endforeach ()
-  endif ()
-endmacro (do_use_modules)


add cmake patch for gcc version larger than 4.9

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -8,6 +8,11 @@
     if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
         if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8)
             message(FATAL_ERROR "Unsupported GCC version. GCC >= 4.8 required.")
+        endif()
+        # TODO(qijun) gcc 4.9 or later versions raise SEGV due to the optimization problem.
+        # Use Debug mode instead for now.
+        if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9)
+            set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
         endif()
     elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
         # cmake >= 3.0 compiler id "AppleClang" on Mac OS X, otherwise "Clang"


create out_dir explicitly

create out_dir explicitly

--- cmake/macro.cmake
+++ cmake/macro.cmake
@@ -52,6 +52,7 @@
 macro(TRANSLATE_TS_FILES output out_dir)
 	find_program(QT_LRELEASE_EXECUTABLE NAMES lrelease-qt5 lrelease DOC "lrelease path")

+	file(MAKE_DIRECTORY ${out_dir})
 	foreach(ts_file ${ARGN})
 		get_filename_component(filename ${ts_file} NAME_WE)
 		set(qm_file ${out_dir}/${filename}.qm)


Don't build HTML docs by default

Don't build HTML docs by default

Some asciidoctor installations are broken in a mysterious way. HTML
documentation generation is not critical, so don't force the default
build target to depend on it.

Fixes https://github.com/google/shaderc/issues/363

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -59,7 +59,10 @@
         ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.asciidoc
       DEPENDS ${FILE}.asciidoc ${ARGN}
       OUTPUT ${DEST})
-    add_custom_target(${TARGET} ALL DEPENDS ${DEST})
+    # Create the target, but the default build target does not depend on it.
+    # Some Asciidoctor installations are mysteriously broken, and it's hard
+    # to detect those cases.  Generating HTML is not critical by default.
+    add_custom_target(${TARGET} DEPENDS ${DEST})
   endif(ASCIIDOCTOR_EXE)
 endfunction()


updated

updated

--- BuildSetup.cmake
+++ BuildSetup.cmake
@@ -53,8 +53,6 @@
 # Project options
 #############################################################################

-
-#SET( BUILD_SHARED_LIBS OFF CACHE BOOL "Set to OFF to build static libraries" FORCE )
 #SET( INSTALL_DOC OFF CACHE BOOL "Set to OFF to skip build/install Documentation" FORCE )
 #SET( BUILD_LCIO_TESTJOBS ON CACHE BOOL "Set to ON to build LCIO testjobs" FORCE )
 #SET( BUILD_F77_TESTJOBS ON CACHE BOOL "Set to ON to build LCIO F77 testjobs" FORCE )
@@ -67,5 +65,7 @@
 # Advanced options
 #############################################################################

+#SET( BUILD_SHARED_LIBS OFF CACHE BOOL "Set to OFF to build static libraries" FORCE )
+
 # installation path for LCIO
 #SET( CMAKE_INSTALL_PREFIX "/foo/bar" CACHE STRING "Where to install LCIO" FORCE )


Fixed incremental link warnings in UWP/Debug build

--- BuildUtils.cmake
+++ BuildUtils.cmake
@@ -83,7 +83,7 @@
             if(PLATFORM_UNIVERSAL_WINDOWS)
                 # On UWP, disable incremental link to avoid linker warnings
                 foreach(DBG_CONFIG ${DEBUG_CONFIGURATIONS})
-                    set_target_properties(${TARGET_NAME} PROPERTIES
+                    set_target_properties(${TARGET} PROPERTIES
                         LINK_FLAGS_${DBG_CONFIG} "/INCREMENTAL:NO"
                     )
                 endforeach()


Use system includes.

Use system includes.

--- FindOpenSG.cmake
+++ FindOpenSG.cmake
@@ -41,7 +41,7 @@
 		ADD_DEFINITIONS(/W1)
 	ENDIF (MSVC)
 	TARGET_LINK_LIBRARIES( ${targetName} ${OpenSG_LIBRARIES} )
-	INCLUDE_DIRECTORIES( ${OpenSG_INCLUDE_DIRS} )
+	INCLUDE_DIRECTORIES( SYSTEM ${OpenSG_INCLUDE_DIRS} )
 ENDMACRO()

 SET(__OpenSG_IN_CACHE TRUE)


Add Python style tests to model classes

Add Python style tests to model classes

--- plugin.cmake
+++ plugin.cmake
@@ -1,6 +1,28 @@
-add_eslint_test(
-  isic_archive "${PROJECT_SOURCE_DIR}/plugins/isic_archive/web_external/js"
-  ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/isic_archive/web_external/js/.eslintrc.js"
-  ESLINT_IGNORE_FILE "${PROJECT_SOURCE_DIR}/plugins/isic_archive/web_external/js/.eslintignore"
+###############################################################################
+#  Copyright Kitware Inc.
+#
+#  Licensed under the Apache License, Version 2.0 ( the "License" );
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+###############################################################################
+
+add_python_style_test(
+  python_static_analysis_isic_archive_models
+  "${CMAKE_CURRENT_LIST_DIR}/server/models"
 )

+add_eslint_test(
+  js_static_analysis_isic_archive_external
+  "${CMAKE_CURRENT_LIST_DIR}/web_external/js"
+  ESLINT_CONFIG_FILE "${CMAKE_CURRENT_LIST_DIR}/web_external/js/.eslintrc.js"
+  ESLINT_IGNORE_FILE "${CMAKE_CURRENT_LIST_DIR}/web_external/js/.eslintignore"
+)
+


Remove unused CMake script for virtualenv

Python 3's build in venv has replaced the external script.

--- CMake/FindPythonVirtualEnv.cmake
+++ CMake/FindPythonVirtualEnv.cmake
@@ -1,53 +0,0 @@
-#.rst:
-# FindPythonVirtualEnv
-# --------
-#
-# Find Python's VirtualEnv Utility
-#
-# ::
-#
-#   PYTHON_VIRTUALENV_SCRIPT           - the full path to virtualenv
-#   PYTHON_VIRTUALENV_SCRIPT_FOUND     - If false, don't attempt to use lua
-#   PYTHON_VIRTUALENV_VERSION_STRING   - version of lua found
-
-find_program(PYTHON_VIRTUALENV_SCRIPT
-  NAMES virtualenv.py virtualenv
-  )
-
-if(PYTHON_VIRTUALENV_SCRIPT)
-
-  if ("${PYTHON_EXECUTABLE}" STREQUAL "")
-    find_package(PythonInterp REQUIRED)
-  endif()
-
-  ### PYTHON_VIRTUALENV_VERSION
-  execute_process(
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_VIRTUALENV_SCRIPT} --version
-    OUTPUT_VARIABLE
-      PYTHON_VIRTUALENV_VERSION_STRING
-    ERROR_VARIABLE
-      PYTHON_VIRTUALENV_VERSION_STRING
-    RESULT_VARIABLE
-      PYTHON_VIRTUALENV_VERSION_RESULT_VARIABLE
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    ERROR_STRIP_TRAILING_WHITESPACE
-    )
-  if (PYTHON_VIRTUALENV_VERSION_RESULT_VARIABLE)
-    message(ERROR "Unable to determing PythonVirtualEnv version!\n${PYTHON_VIRTUALENV_VERSION_STRING}")
-    set(PYTHON_VIRTUALENV_VERSION_STRING "")
-  else()
-    string( REGEX MATCH "([0-9]*)([.])([0-9]*)([.]*)([0-9]*)"
-      PYTHON_VIRTUALENV_VERSION
-      ${PYTHON_VIRTUALENV_VERSION_STRING} )
-  endif()
-endif()
-
-
-# handle the QUIETLY and REQUIRED arguments and set PYTHON_VIRTUALENV_FOUND to TRUE if
-# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PythonVirtualEnv
-                                  REQUIRED_VARS PYTHON_VIRTUALENV_SCRIPT
-                                  VERSION_VAR PYTHON_VIRTUALENV_VERSION)
-
-mark_as_advanced(PYTHON_VIRTUALENV_SCRIPT)


use normalize_path()

use normalize_path()

--- rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
@@ -87,11 +87,8 @@
   ${CMAKE_CURRENT_BINARY_DIR}/rosidl_typesupport_opensplice_cpp
 )
 foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES})
-  set(_include_dir "${${_pkg_name}_DIR}")
-  get_filename_component(_include_dir "${_include_dir}" DIRECTORY)
-  get_filename_component(_include_dir "${_include_dir}" DIRECTORY)
-  get_filename_component(_include_dir "${_include_dir}" DIRECTORY)
-  set(_include_dir "${_include_dir}/include/${_pkg_name}/dds_opensplice")
+  set(_include_dir "${${_pkg_name}_DIR}/../../../include/${_pkg_name}/dds_opensplice")
+  normalize_path(_include_dir "${_include_dir}")
   target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PUBLIC
     "${_include_dir}"


Minor typo

Minor typo

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -50,7 +50,7 @@
 #
 # FILES: List of files to be installed/symlinked
 #
-# MODULE_DESTINATION: The absolute path  where the files associated
+# MODULE_DESTINATION: The absolute path where the files associated
 #   with the module are installed, with the exception of the
 #   MODULE_FILE(see definition at top of this file). The path for
 #   MODULE_FILE, is inferred from this argument, even if it is the only file to


Fix C flags for xlC

Fix C flags for xlC

--- Common.cmake
+++ Common.cmake
@@ -78,7 +78,7 @@
   endif()
 elseif(CMAKE_COMPILER_IS_XLCXX)
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -qnosmp -q64")
-  set(CMAKE_CC_FLAGS_DEBUG "${CMAKE_CC_FLAGS_DEBUG} -qnosmp -q64")
+  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qnosmp -q64")
   set(CMAKE_SHARED_LINKER_FLAGS_DEBUG
 	 "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -qsmp -q64")
 endif()


Order the output of CMake macro DETERMIN_LIBS_TO_LINK correctly so that statically linked user application can be linked correctly.

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -189,7 +189,6 @@

 # output link libs command to OUTPUT_VAR which required by all services from SERVCE_LIST
 macro(AWSSDK_DETERMINE_LIBS_TO_LINK SERVICE_LIST OUTPUT_VAR)
-    set(ALL_SERVICES "core")

     foreach(SVC IN LISTS ${SERVICE_LIST})
         list(APPEND ALL_SERVICES ${SVC})
@@ -201,6 +200,49 @@
         unset(DEPENDENCY_LIST CACHE)
     endforeach()
     list(REMOVE_DUPLICATES ALL_SERVICES)
+
+    # Order the dependencies correctly
+    # Change order from e.g. "core;transfer;s3;s3-encryption;kms" to "transfer;s3-encryption;kms;s3;core".
+    # This is important for static linked user application.
+    # They way of doing this is to keep checking libs after current lib till the end, if current lib is a dependency of checking lib,
+    # then move current lib to the end of list, after moving, current index stay and start another round of checking. If no libs after
+    # current lib is a dependency of current lib, move current index to next and start anohter round of checking.
+    # Example: "s3;core;transfer"
+    #-> s3(cur);core(checking);transfer  s3 is not a dependency of core
+    #-> s3(cur);core;transfer(checking)  s3 is a dependency of transfer
+    #-> core(cur);transfer(checking);s3  core is a dependency of transfer
+    #-> transfer(cur);s3(checking);core  transfer is not a dependency of s3
+    #-> transfer(cur);s3;core(checking)  transfer is not a dependency of core
+    #-> transfer;s3(cur);core(checking)  s3 is not a dependency of core
+    #-> transfer;s3;core(cur)            end of checking
+
+    list(LENGTH ALL_SERVICES length)
+    math(EXPR length ${length}-1) # Get index of last element.
+    if (length GREATER 0) # If more than 1 element.
+        set(i 0)
+        while (i LESS length) # No need to process last element
+            list(GET ALL_SERVICES ${i} SVC)
+            math(EXPR j ${i}+1)
+            math(EXPR jEnd ${length}+1)
+            while (j LESS jEnd)
+                list(GET ALL_SERVICES ${j} NEXT_SVC)
+                get_dependencies_for_sdk(${NEXT_SVC} DEPENDING_SDKS)
+                if (DEPENDING_SDKS)
+                    string(REPLACE "," ";" DEPENDING_SDKS ${DEPENDING_SDKS})
+                endif()
+                list(FIND DEPENDING_SDKS ${SVC} index)
+                if (NOT ${index} EQUAL -1) # NEXT_SVC depend on SVC
+                    list(REMOVE_AT ALL_SERVICES ${i}) # Move SVC to end
+                    list(APPEND ALL_SERVICES ${SVC})
+                    math(EXPR i ${i}-1) # make index point to new element but with the same index.
+                    break() # as long as we moved SVC to end, the inner loop can be broke.
+                endif()
+                math(EXPR j ${j}+1)
+            endwhile()
+            math(EXPR i ${i}+1)
+        endwhile()
+    endif()
+
     set(${OUTPUT_VAR} "")
     foreach(DEP IN LISTS ALL_SERVICES)
         list(APPEND ${OUTPUT_VAR} "aws-cpp-sdk-${DEP}")


cmake: avoid PATH

cmake: avoid PATH

see #691

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -152,11 +152,11 @@
 # Runtime paths for KDB
 #

-set (KDB_DB_SYSTEM "/etc/kdb" CACHE PATH
+set (KDB_DB_SYSTEM "/etc/kdb" CACHE STRING
 		"The path to the system key database."
 		)

-set (KDB_DB_HOME "/home" CACHE PATH
+set (KDB_DB_HOME "/home" CACHE STRING
 		"The compiled-in fallback path to users home directories."
 		)


Use all LDFLAGS when linking via pkgconfig

As one example, the Ubuntu pkgconfig file for check includes a
`-pthread` switch, which cmake doesn't pass through if we use the
`_LIBRARIES` variable instead of the `_LDFLAGS` variable.

--- cmake/FindCTargets.cmake
+++ cmake/FindCTargets.cmake
@@ -25,7 +25,7 @@
         string(TOUPPER ${lib} upperlib)
         target_link_libraries(
             ${TARGET_NAME}
-            ${${upperlib}_LIBRARIES}
+            ${${upperlib}_LDFLAGS}
         )
     endforeach(lib)
     foreach(lib ${LOCAL_LIBRARIES})
@@ -39,7 +39,7 @@
         string(TOUPPER ${lib} upperlib)
         target_link_libraries(
             ${TARGET_NAME}
-            ${${upperlib}_STATIC_LIBRARIES}
+            ${${upperlib}_STATIC_LDFLAGS}
         )
     endforeach(lib)
     foreach(lib ${LOCAL_LIBRARIES})


Fix issue with identification of CUDA architecture on Windows.

- nvcc compilation on Windows is not silent, resulting in polluted output from running the CMake test program in FindCudaArch

--- cmake/FindCudaArch.cmake
+++ cmake/FindCudaArch.cmake
@@ -48,10 +48,13 @@
                     RESULT_VARIABLE __nvcc_res OUTPUT_VARIABLE __nvcc_out
                     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

+    # RADU: fix for nvcc on Windows (output includes compilation messages)
+    string(REGEX MATCH "([0-9]+)\\.([0-9]+)$" __nvcc_out "${__nvcc_out}")
+
     IF(__nvcc_res EQUAL 0)
-	  # Catch any pre-CUDA 8.0 GPUs and replace the target SM with a newer one
+      # Catch any pre-CUDA 8.0 GPUs and replace the target SM with a newer one
       STRING(REPLACE "2.0" "3.0" __nvcc_out "${__nvcc_out}")
-	  STRING(REPLACE "2.1(2.0)" "3.0" __nvcc_out "${__nvcc_out}")
+      STRING(REPLACE "2.1(2.0)" "3.0" __nvcc_out "${__nvcc_out}")
       SET(CUDA_GPU_DETECT_OUTPUT ${__nvcc_out} CACHE INTERNAL "Returned GPU architectures from detect_gpus tool" FORCE)
     ENDIF()
   ENDIF()
@@ -105,9 +108,9 @@
   elseIF(${CUDA_ARCH_NAME} STREQUAL "Maxwell")
     SET(__cuda_arch_bin "5.0")
   elseIF(${CUDA_ARCH_NAME} STREQUAL "Pascal")
-	SET(__cuda_arch_bin "6.0 6.1")
+    SET(__cuda_arch_bin "6.0 6.1")
   elseIF(${CUDA_ARCH_NAME} STREQUAL "Volta")
-	SET(__cuda_arch_bin "7.0")
+    SET(__cuda_arch_bin "7.0")
   elseIF(${CUDA_ARCH_NAME} STREQUAL "All")
     SET(__cuda_arch_bin ${KNOWN_GPU_ARCHITECTURES})
   elseIF(${CUDA_ARCH_NAME} STREQUAL "Auto")


Fix FindPrimitiv.cmake.

Fix FindPrimitiv.cmake.

--- cmake/FindPrimitiv.cmake
+++ cmake/FindPrimitiv.cmake
@@ -5,6 +5,10 @@
 #   PRIMITIV_FOUND - Whether or not the system has the primitiv library.
 #   PRIMITIV_INCLUDE_DIR - primitiv include directory.
 #   PRIMITIV_LIBRARIES - primitiv library files.
+#
+#   PRIMITIV_C_FOUND - Whether or not the system has the primitiv C API.
+#   PRIMITIV_C_INCLUDE_DIR - primitiv C API include directory.
+#   PRIMITIV_C_LIBRARIES - primitiv C API library files.
 #
 # This script reads hints about search locations from the following
 # environment variables:
@@ -14,11 +18,16 @@
 #
 # Author: Yusuke Oda (odashi) <yus.takara@gmail.com>
 # Created: 2017/08/13
-# Updated: 2017/08/13
+# Updated: 2017/12/15
 #
-# This script is provided as a part of the primitiv library.
+# This script is provided as a part of the primitiv core library.
 # Redistributing and using this script is allowed according to
 # the Apache License Version 2.
+
+
+#
+# Finding primitiv core library
+#

 find_path(PRIMITIV_INCLUDE_DIR NAMES primitiv/primitiv.h
   HINTS
@@ -45,3 +54,35 @@
   message(STATUS "Primitiv is not installed.")
   set(PRIMITIV_FOUND OFF)
 endif()
+
+
+#
+# Finding primitiv C API
+#
+
+find_path(PRIMITIV_C_INCLUDE_DIR NAMES primitiv/c/api.h
+  HINTS
+  ENV PRIMITIV_ROOT
+  ENV PRIMITIV_ROOT_DIR
+  PATHS
+  ${CMAKE_INSTALL_PREFIX}/include
+)
+
+find_library(PRIMITIV_C_LIBRARIES NAMES primitiv_c
+  HINTS
+  ENV PRIMITIV_ROOT
+  ENV PRIMITIV_ROOT_DIR
+  PATHS
+  ${CMAKE_INSTALL_PREFIX}/lib
+)
+
+if (PRIMITIV_C_INCLUDE_DIR AND PRIMITIV_C_LIBRARIES)
+  message("-- Found Primitiv C API: " ${PRIMITIV_C_LIBRARIES})
+  #message("-- Primitiv C API include dir: " ${PRIMITIV_C_INCLUDE_DIR})
+  #message("-- Primitiv C API libraries: " ${PRIMITIV_C_LIBRARIES})
+  set(PRIMITIV_C_FOUND ON)
+else()
+  message(STATUS "Primitiv C API is not installed.")
+  set(PRIMITIV_C_FOUND OFF)
+endif()
+


Wrap FindBoost in if(BUILD_UNIT_TESTS) so that it can be excluded entirely

Signed-off-by: Matthew Bentham <286076deec2404ae356dd8bc92f2f71e81044bd4@arm.com>
Change-Id: Iabe1b10e53d393a19e681156c001d6a2e9eb835e

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -134,10 +134,12 @@
   else()
     set(Boost_USE_STATIC_LIBS ON)
   endif()
-  add_definitions("-DBOOST_ALL_NO_LIB") # Turn off auto-linking as we specify the libs manually
-  find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework)
-  include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
-  link_directories(${Boost_LIBRARY_DIRS})
+  if (BUILD_UNIT_TESTS)
+    add_definitions("-DBOOST_ALL_NO_LIB") # Turn off auto-linking as we specify the libs manually
+    find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework)
+    include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
+    link_directories(${Boost_LIBRARY_DIRS})
+  endif()
 endif()

 if (NOT BUILD_PIPE_ONLY)


Suppress warnings from OpenCL include folder.

Fixes an odd compiler warning with half.hpp when included
from ComputeLibrary/include directory.

Signed-off-by: Matthew Bentham <286076deec2404ae356dd8bc92f2f71e81044bd4@arm.com>
Change-Id: I17d251bb68384c357ffb93ea8e63333564aba659

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -279,7 +279,7 @@
     link_libraries(-L${ARMCOMPUTE_BUILD_DIR}/opencl-1.2-stubs)
     set(OPENCL_LIBRARIES OpenCL)

-    include_directories(${OPENCL_INCLUDE})
+    include_directories(SYSTEM ${OPENCL_INCLUDE})

     # Add preprocessor definition for ARM Compute OpenCL
     add_definitions(-DARMCOMPUTECL_ENABLED)


Update cmake luajit check

Update cmake luajit check

--- cmake/check_luajit.cmake
+++ cmake/check_luajit.cmake
@@ -1,11 +1,11 @@
 message(STATUS "Checking for luajit")

 execute_process(
-  COMMAND vim --version | grep "luajit"
+  COMMAND "vim --version | grep luajit"
   OUTPUT_QUIET ERROR_QUIET
   RESULT_VARIABLE RESULT
 )

-if(RESULT EQUAL 1)
+if(RESULT EQUAL 0)
   message(FATAL_ERROR "luajit doesn't support being embedded; to use color_coded, you must install vim without luajit")
 endif()


more options in test script

more options in test script

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -25,7 +25,11 @@
 ## For multiple tests (eg. different compilers) make multiple copies
 ## of this file and adjust options. Few options can be passed by arguments:
 ##
-## ctest -S ctest_script.cmake,"Experimental;Release;8;Ninja"
+## ctest -S ctest_script.cmake,"Experimental;Release;8;Ninja;cc;g++;180;Valgrind"
+##
+## ctest -S ctest_script.cmake,"Nightly;Debug;8;Ninja;cc;g++;180;"";1"
+##
+## ctest -S ctest_script.cmake,"Nightly;RelWithDebInfo;8;Ninja;clang;clang++;180;"AddressSanitizer";0"
 ##
 ## On linux this script can be invoked in a cronjob. e.g.:
 ##    $ crontab -e
@@ -61,7 +65,18 @@
 set(CNAME cc)
 set(CXXNAME g++)

-# The above parameters can be reset by passing upto 6 arguments
+# Test timeout in seconds
+set(CTEST_TEST_TIMEOUT 200)
+
+# Dynamic analysis
+#Valgrind, Purify, BoundsChecker. ThreadSanitizer, AddressSanitizer,
+#LeakSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer.
+set(CTEST_MEMORYCHECK_TYPE "")
+
+# Coverage analysis
+set(test_coverage FALSE)
+
+# The above parameters can be reset by passing upto 9 arguments
 # e.g. as: ctest -S ctest_script.cmake,"Experimental;Release;8;Ninja"
 macro(read_args)
   set(narg ${ARGC})
@@ -77,9 +92,20 @@
   if (narg GREATER 3)
     set(CTEST_CMAKE_GENERATOR "${ARGV3}")
   endif()
+  if (narg GREATER 4)
+    set(CNAME "${ARGV4}")
+  endif()
   if (narg GREATER 5)
-    set(CNAME "${ARGV4}")
     set(CXXNAME "${ARGV5}")
+  endif()
+  if (narg GREATER 6)
+    set(CTEST_TEST_TIMEOUT "${ARGV6}")
+  endif()
+  if (narg GREATER 7)
+    set(CTEST_MEMORYCHECK_TYPE "${ARGV7}")
+  endif()
+  if (narg GREATER 8)
+    set(test_coverage "${ARGV8}")
   endif()
 endmacro(read_args)
 read_args(${CTEST_SCRIPT_ARG})
@@ -128,22 +154,12 @@
 #ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
 file(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/bin)

-# Test timeout in seconds
-set(CTEST_TEST_TIMEOUT 200)
-
-# Coverage analysis
-set(test_coverage FALSE)
 if (test_coverage)
   find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
   set(CTEST_CUSTOM_COVERAGE_EXCLUDE "${CTEST_SOURCE_DIRECTORY}/external/")
   set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
   set(ENV{CFLAGS} "$ENV{CFLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
 endif()
-
-# Dynamic analysis
-#Valgrind, Purify, BoundsChecker. ThreadSanitizer, AddressSanitizer,
-#LeakSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer.
-set(CTEST_MEMORYCHECK_TYPE "")

 if ("${CTEST_MEMORYCHECK_TYPE}" STREQUAL "Valgrind")
   find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)


Minor CMake path fix.

Minor CMake path fix.

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -352,7 +352,7 @@
 #--------------------------------------------------------------------
 # Create CMAKE file for pre-process
 macro(ivw_generate_shader_resource parent_path)
-    set(output "include(${CMAKE_SOURCE_DIR}/cmake/txt2h.cmake)\n")
+    set(output "include(${IVW_ROOT_DIR}/cmake/txt2h.cmake)\n")
 	set(shaders "")
 	foreach(current_path ${ARGN})
 		file(RELATIVE_PATH filepath0 ${parent_path} ${current_path})
@@ -817,7 +817,7 @@
       #set_target_properties(${_projectName} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
       if(PRECOMPILED_HEADERS)
 		  set_target_properties(${_projectName} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
-		  list(APPEND _allPchDirs ${CMAKE_SOURCE_DIR}/ext)
+		  list(APPEND _allPchDirs ${IVW_EXTENSIONS_DIR})
 		  set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_INCLUDE_PATH "${_allPchDirs}")
 		  cotire(${_projectName})
       endif()


BUG: Use variable PROJECT_SOURCE_DIR

BUG: Use variable PROJECT_SOURCE_DIR

The variable DTIProcess_SOURCE_DIR is empty, use PROJECT_SOURCE_DIR instead

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -106,9 +106,9 @@

 INCLUDE_DIRECTORIES(
-${DTIProcess_SOURCE_DIR}/Library
-${DTIProcess_SOURCE_DIR}/PrivateLibrary
-${DTIProcess_SOURCE_DIR}
+${PROJECT_SOURCE_DIR}/Library
+${PROJECT_SOURCE_DIR}/PrivateLibrary
+${PROJECT_SOURCE_DIR}
 )


CI: use sourceforge mirror for doxygen

CI: use sourceforge mirror for doxygen

--- ci-build.cmake
+++ ci-build.cmake
@@ -105,7 +105,7 @@
 if("$ENV{TRAVIS_OS_NAME}" STREQUAL "linux" AND NOT DEFINED ENV{ANDROID})
     message(STATUS "Downloading Doxygen")
     file(DOWNLOAD
-        http://doxygen.nl/files/doxygen-1.8.17.linux.bin.tar.gz
+        https://downloads.sourceforge.net/project/doxygen/rel-1.8.17/doxygen-1.8.17.linux.bin.tar.gz
         ./doxygen-1.8.17.linux.bin.tar.gz)
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf doxygen-1.8.17.linux.bin.tar.gz OUTPUT_QUIET)
     set(OTHER -DDOXYGEN_EXECUTABLE=${CMAKE_CURRENT_SOURCE_DIR}/doxygen-1.8.17/bin/doxygen)


Build docs in build folder

Build docs in build folder

--- cmake/GtkDoc.cmake
+++ cmake/GtkDoc.cmake
@@ -14,25 +14,26 @@
     set (GTKDOC_FOUND TRUE)

     macro (gtkdoc_build module)
+        # file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}")
         add_custom_target ("gtkdoc-scan_${module}" ALL
             ${GTKDOC_SCAN_BIN} --module=${module}
-                --source-dir="../../${module}"
-                --output-dir="${module}"
+                --source-dir="${CMAKE_SOURCE_DIR}/${module}"
+                --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
                 --rebuild-sections --rebuild-types
-            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+                WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

         add_custom_target ("gtkdoc-tmpl_${module}" ALL
             ${GTKDOC_MKTMPL_BIN} --module=${module}
-            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}")
+            --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

         add_custom_target ("gtkdoc-docbook_${module}" ALL
             ${GTKDOC_MKDB_BIN} --module=${module}
-                --source-dir="."
                 --output-dir="xml"
                 --source-suffixes=c,h --output-format=xml
                 --default-includes=${module}/${module}.h
                 --sgml-mode --main-sgml-file=${module}.sgml
-            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}")
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

         add_dependencies ("gtkdoc-docbook_${module}"
             "gtkdoc-tmpl_${module}"
@@ -41,19 +42,19 @@
         # Keep this target alone, otherwise build fails
         add_custom_target ("gtkdoc-html_${module}" ALL
             ${GTKDOC_MKHTML_BIN} ${module}
-                "../${module}.sgml"
-            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}/html")
+            "${CMAKE_CURRENT_BINARY_DIR}/${module}.sgml"
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html")

         add_dependencies ("gtkdoc-html_${module}"
             "gtkdoc-docbook_${module}")
     endmacro (gtkdoc_build module)

     macro (gtkdoc module)
-        file (MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}/html")
+        file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html")
         gtkdoc_build (${module})

         set (DOC_DIR "html/midori-${MIDORI_MAJOR_VERSION}-${MIDORI_MINOR_VERSION}")
-        install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}/html/"
+        install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html/"
             DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/${DOC_DIR}/${module}"
             PATTERN "html/*"
             PATTERN "index.sgml" EXCLUDE)


Allow overloading of operators for dbg class.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -149,6 +149,7 @@
       -fuchsia-default-arguments-calls
       -fuchsia-default-arguments-declarations
       -fuchsia-multiple-inheritance
+      -fuchsia-overloaded-operator
       -fuchsia-statically-constructed-objects
       google-*
       -google-readability-todo


arm: remove LuaJIT EXTERNAL_UNWIND on x86/64

--- cmake/luajit.cmake
+++ cmake/luajit.cmake
@@ -145,10 +145,6 @@
         separate_arguments(luajit_cflags)
     set (luajut_ldflags ${CMAKE_STATIC_LINKER_FLAGS})
         separate_arguments(luajit_ldflags)
-    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "86|amd64")
-        # Use external unwind on x86
-        set (luajit_xcflags "-DLUAJIT_UNWIND_EXTERNAL=1")
-    endif()
     # We are consciously ommiting debug info in RelWithDebugInfo mode
     if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
         set (luajit_ccopt -O0)


[XPUPS]modify xpu_kp.cmake with HETERPS&PSLIB (#41760)

* modify xpu_kp.cmake with HETERPS&PSLIB

* fix. test=develop

* fix. test=develop

* fix. test=develop

* fix. test=develop

--- cmake/xpu_kp.cmake
+++ cmake/xpu_kp.cmake
@@ -122,6 +122,12 @@
   string(REPLACE ";" " " XPU_CXX_DEFINES "${XPU_CXX_DEFINES}" )
   separate_arguments(XPU_CXX_DEFINES UNIX_COMMAND "${XPU_CXX_DEFINES}")

+  set(ABI_VERSION "")
+  if(WITH_HETERPS AND WITH_PSLIB)
+    set(ABI_VERSION "-D_GLIBCXX_USE_CXX11_ABI=0")
+  else()
+    set(ABI_VERSION "-D_GLIBCXX_USE_CXX11_ABI=1")
+  endif()
   add_custom_command(
     OUTPUT
       kernel_build/${kernel_name}.bin.o
@@ -130,7 +136,7 @@
     COMMAND
 	  ${CMAKE_COMMAND} -E copy ${kernel_path}/${kernel_name}.kps kernel_build/${kernel_name}.xpu
     COMMAND
-    ${XPU_CLANG} --sysroot=${CXX_DIR}  -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1 ${OPT_LEVEL} -fno-builtin -mcpu=xpu2  -fPIC ${XPU_CXX_DEFINES}  ${XPU_CXX_FLAGS}  ${XPU_CXX_INCLUDES}
+    ${XPU_CLANG} --sysroot=${CXX_DIR}  -std=c++11 ${ABI_VERSION} ${OPT_LEVEL} -fno-builtin -mcpu=xpu2  -fPIC ${XPU_CXX_DEFINES}  ${XPU_CXX_FLAGS}  ${XPU_CXX_INCLUDES}
        -I.  -o kernel_build/${kernel_name}.bin.o.sec kernel_build/${kernel_name}.xpu
         --xpu-device-only -c -v
     COMMAND
@@ -153,7 +159,7 @@
     COMMAND
 	  ${CMAKE_COMMAND} -E copy ${kernel_path}/${kernel_name}.kps kernel_build/${kernel_name}.xpu
     COMMAND
-    ${XPU_CLANG} --sysroot=${CXX_DIR}  -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1 ${OPT_LEVEL} -fno-builtin -mcpu=xpu2  -fPIC ${XPU_CXX_DEFINES}  ${XPU_CXX_FLAGS} ${XPU_CXX_INCLUDES}
+    ${XPU_CLANG} --sysroot=${CXX_DIR}  -std=c++11 ${ABI_VERSION} ${OPT_LEVEL} -fno-builtin -mcpu=xpu2  -fPIC ${XPU_CXX_DEFINES}  ${XPU_CXX_FLAGS} ${XPU_CXX_INCLUDES}
         -I.  -o kernel_build/${kernel_name}.host.o kernel_build/${kernel_name}.xpu
         --xpu-host-only -c -v
     WORKING_DIRECTORY


Cleanup config options

Cleanup config options

--- config.h.cmake
+++ config.h.cmake
@@ -14,23 +14,18 @@

 /************************** HEADER FILES *************************/

-/* Define to 1 if you have the <pty.h> header file. */
-#cmakedefine HAVE_PTY_H 1

 /*************************** FUNCTIONS ***************************/

-/* Define to 1 if you have the `cfmakeraw' function. */
-#cmakedefine HAVE_CFMAKERAW 1

 /*************************** LIBRARIES ***************************/

-/* Define to 1 if you have the `z' library (-lz). */
-#cmakedefine HAVE_LIBZ 1
+#cmakedefine CURSES_FOUND 1
+#ifdef CURSES_FOUND
+#define HAVE_CURSES 1
+#endif

 /**************************** OPTIONS ****************************/
-
-/* Define to 1 if you want to enable ZLIB */
-#cmakedefine WITH_LIBZ 1

 /* Define if building with gcov instrumentation */
 #cmakedefine CGREEN_INTERNAL_WITH_GCOV


Fix ICU linkage on ubuntu

Fix ICU linkage on ubuntu

--- src/framework/cmake/FindICU.cmake
+++ src/framework/cmake/FindICU.cmake
@@ -4,6 +4,8 @@
 #  ICU_LIBRARY - the ICU library

 FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/utf8.h)
+SET(_ICUIO_STATIC_LIBS libicuio.a)
+SET(_ICUIO_SHARED_LIBS libicuio.dll.a icuio)
 SET(_ICUI18N_STATIC_LIBS libicui18n.a)
 SET(_ICUI18N_SHARED_LIBS libicui18n.dll.a icui18n)
 SET(_ICUUC_STATIC_LIBS libicuuc.a)
@@ -11,15 +13,17 @@
 SET(_ICUDATA_STATIC_LIBS libicudata.a)
 SET(_ICUDATA_SHARED_LIBS libicudata.dll.a icudata)
 IF(USE_STATIC_LIBS)
+    FIND_LIBRARY(ICUIO_LIBRARY NAMES ${_ICUIO_STATIC_LIBS} ${_ICUIO_SHARED_LIBS})
     FIND_LIBRARY(ICUI18N_LIBRARY NAMES ${_ICUI18N_STATIC_LIBS} ${_ICUI18N_SHARED_LIBS})
     FIND_LIBRARY(ICUUC_LIBRARY NAMES ${_ICUUC_STATIC_LIBS} ${_ICUUC_SHARED_LIBS})
     FIND_LIBRARY(ICUDATA_LIBRARY NAMES ${_ICUDATA_STATIC_LIBS} ${_ICUDATA_SHARED_LIBS})
 ELSE()
+    FIND_LIBRARY(ICUIO_LIBRARY NAMES ${_ICUIO_SHARED_LIBS} ${_ICUIO_STATIC_LIBS})
     FIND_LIBRARY(ICUI18N_LIBRARY NAMES ${_ICUI18N_SHARED_LIBS} ${_ICUI18N_STATIC_LIBS})
     FIND_LIBRARY(ICUUC_LIBRARY NAMES ${_ICUUC_SHARED_LIBS} ${_ICUUC_STATIC_LIBS})
     FIND_LIBRARY(ICUDATA_LIBRARY NAMES ${_ICUDATA_SHARED_LIBS} ${_ICUDATA_STATIC_LIBS})
 ENDIF()
-SET(ICU_LIBRARIES ${ICUI18N_LIBRARY} ${ICUUC_LIBRARY} ${ICUDATA_LIBRARY})
+SET(ICU_LIBRARIES ${ICUIO_LIBRARY}  ${ICUI18N_LIBRARY} ${ICUUC_LIBRARY} ${ICUDATA_LIBRARY})
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ICU DEFAULT_MSG ICU_LIBRARIES ICU_INCLUDE_DIR)
 MARK_AS_ADVANCED(ICU_LIBRARIES  ICU_INCLUDE_DIR)


added dependency for openrave

added dependency for openrave

--- catkin.cmake
+++ catkin.cmake
@@ -4,6 +4,7 @@
 catkin_package()

 find_package(Boost REQUIRED COMPONENTS filesystem system)
+find_package(OpenRAVE REQUIRED)

 include_directories(
     include/${PROJECT_NAME}
@@ -13,6 +14,7 @@
 link_directories(
     ${Boost_LIBRARY_DIRS}
     ${catkin_LIBRARY_DIRS}
+    ${OpenRAVE_LIBRARY_DIRS}
 )

 openrave_plugin("${PROJECT_NAME}_plugin"


Convert the paths given via the PRIVATE_PLUGINS_DIRS parameter to CMake paths

--- packaging/windows/WindowsPackaging.cmake
+++ packaging/windows/WindowsPackaging.cmake
@@ -65,6 +65,7 @@
 	Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\*.*'
 ")

+file(TO_CMAKE_PATH PRIVATE_PLUGINS_DIRS PRIVATE_PLUGINS_DIRS)
 if (NOT PRIVATE_PLUGINS_DIRS STREQUAL "")
     message(WARNING "PRIVATE_PLUGINS_DIRS : Be careful to use '/' in your plugin paths and to end each path with '/' to copy the private plugins in the same level as the public plugins. Do not forget to separate each path with ';'")
     foreach(pluginpath ${PRIVATE_PLUGINS_DIRS})


Switching to 10.5 SDK

Switching to 10.5 SDK

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -79,7 +79,7 @@
   # NOTE: wont have a distributable build unless you add this on the configure line with:
   # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'
   #set(CMAKE_OSX_ARCHITECTURES i386;ppc)
-  set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
+  set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
   if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
     set(ARCH universal)
   else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")


improved status message for files which are added for generation

--- cmake_modules/ZorbaRuntimeGenerator.cmake
+++ cmake_modules/ZorbaRuntimeGenerator.cmake
@@ -50,7 +50,7 @@
   SET(H_OUTPUT_SOURCE_DIR   "${CMAKE_SOURCE_DIR}/${OUTPUT}.h")

   IF (ZORBA_WORKS) # only try to generate if zorbacmd is working
-     MESSAGE(STATUS "Generating ${CPP_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${CPP_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${CPP_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${CPP_QUERY}\"" "-f"
@@ -64,7 +64,7 @@
                                  "${H_OUTPUT_BINARY_DIR}"
                                  "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq") # cpp always depends on .h

-     MESSAGE(STATUS "Generating ${H_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${H_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${H_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${HEADER_QUERY}\"" "-f"
@@ -88,7 +88,7 @@
   SET(CPP_OUTPUT_SOURCE_DIR "${CMAKE_SOURCE_DIR}/${OUTPUT}.cpp")
   SET(H_OUTPUT_SOURCE_DIR   "${CMAKE_SOURCE_DIR}/${OUTPUT}.h")
   IF (ZORBA_WORKS) # only try to generate if zorbacmd is working
-     MESSAGE(STATUS "Generating ${CPP_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${CPP_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${CPP_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${CPP_QUERY}\"" "-f"
@@ -103,7 +103,7 @@
                                  "${CMAKE_BINARY_DIR}/src/runtime/visitors/planiter_visitor.h"
                                  "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq")

-     MESSAGE(STATUS "Generating ${H_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${H_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${H_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${HEADER_QUERY}\"" "-f"
@@ -126,7 +126,7 @@
   SET(H_OUTPUT_BINARY_DIR   "${CMAKE_BINARY_DIR}/${OUTPUT}.h")
   SET(H_OUTPUT_SOURCE_DIR   "${CMAKE_SOURCE_DIR}/${OUTPUT}.h")
   IF (ZORBA_WORKS) # only try to generate if zorbacmd is working
-     MESSAGE(STATUS "Generating planvisitor ${H_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${H_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${H_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${HEADER_QUERY}\"" "-f"
@@ -149,7 +149,7 @@
   SET(CPP_OUTPUT_SOURCE_DIR "${CMAKE_SOURCE_DIR}/${OUTPUT}.cpp")
   SET(H_OUTPUT_SOURCE_DIR   "${CMAKE_SOURCE_DIR}/${OUTPUT}.h")
   IF (ZORBA_WORKS) # only try to generate if zorbacmd is working
-     MESSAGE(STATUS "Generating ${CPP_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${CPP_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${CPP_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${CPP_QUERY}\"" "-f"
@@ -165,7 +165,7 @@
                                  "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq"
                        )

-     MESSAGE(STATUS "Generating ${H_OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${H_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${H_OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${HEADER_QUERY}\"" "-f"
@@ -187,7 +187,7 @@
   SET(OUTPUT_BINARY_DIR   "${CMAKE_BINARY_DIR}/${OUTPUT}")
   SET(OUTPUT_SOURCE_DIR   "${CMAKE_SOURCE_DIR}/${OUTPUT}")
   IF (ZORBA_WORKS) # only try to generate if zorbacmd is working
-     MESSAGE(STATUS "Generating ${OUTPUT_BINARY_DIR}")
+     MESSAGE(STATUS "Added for generation: ${OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${OUTPUT_BINARY_DIR}"
                         COMMAND ${ZORBA_RUNTIME_GENERATOR}
                            "-q" "\"${HEADER_QUERY}\"" "-f"


Update common.cmake to allow addons to the file globbing

--- common.cmake
+++ common.cmake
@@ -63,8 +63,11 @@

 include_directories( include  )

-file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
-file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")
+set(PROJECT_INCLUDES_GLOBS ${PROJECT_INCLUDES_GLOBS} "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
+set(PROJECT_SRC_GLOBS ${PROJECT_SRC_GLOBS} "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")
+
+file(GLOB PROJECT_INCLUDES ${PROJECT_INCLUDES_GLOBS} )
+file(GLOB PROJECT_SRC ${PROJECT_SRC_GLOBS} )

 add_library (${PROJECT} ${PROJECT_SRC} ${PROJECT_INCLUDES})


set NVCONTROL alwsays to ON

set NVCONTROL alwsays to ON

--- cmake/externals/projects_modules/VTK.cmake
+++ cmake/externals/projects_modules/VTK.cmake
@@ -80,28 +80,10 @@
   -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
   -DVTK_USE_QT:BOOL=ON
   -DVTK_WRAP_TCL:BOOL=OFF
-  -DBUILD_TESTING:BOOL=OFF
+  -DBUILD_TESTING:BOOL=OFF
+  -DVTK_USE_NVCONTROL:BOOL=ON
   -DVTK_INSTALL_QT_PLUGIN_DIR:STRING=""
   )
-
-# Activate nvidia optimisation ? (currently only for Linux)
-option(TRY_ENABLE_NVCONTROL "Try to enable nvidia optimisation for vtk" OFF)
-mark_as_advanced(TRY_ENABLE_NVCONTROL)
-if(TRY_ENABLE_NVCONTROL)
-  if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-    execute_process(COMMAND lspci
-      COMMAND grep VGA
-      OUTPUT_VARIABLE PCI_VGA
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      )
-    if(${PCI_VGA} MATCHES Nvidia|NVIDIA|nvidia)
-      set(cmake_args
-        ${cmake_args}
-        -DVTK_USE_NVCONTROL:BOOL=ON
-        )
-    endif()
-  endif()
-endif()

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