Search for libxml2 on macOS too.

Search for libxml2 on macOS too.

This allows lld-link to process /manifestinput: flags on macOS too.
Also makes the `REQUIRES: manifesttool` lld tests run on macOS.
Setting LLVM_ENABLE_LIBXML2 to off can suppress this behavior, like on Linux.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@315873 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -160,7 +160,7 @@
   find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
   set(LLVM_LIBXML2_ENABLED 0)
   set(LIBXML2_FOUND 0)
-  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH))
+  if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))
     find_package(LibXml2)
     if (LIBXML2_FOUND)
       set(LLVM_LIBXML2_ENABLED 1)


Fixup for r190409: add dep on LZMA only if CMake is cross-compiling

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@190591 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -308,7 +308,7 @@
   # be checked by CMake, breaking native compilation.
   # Since this is only pertinent to cross-compilations, and there's no way CMake
   # can check for every foreign library on every OS, we add the dep and warn the dev.
-  if ( DEFINED CMAKE_CROSSCOMPILING )
+  if ( CMAKE_CROSSCOMPILING )
     if (NOT PC_LIBXML_VERSION VERSION_LESS "2.8.0")
       message(STATUS "Adding LZMA as a dep to XML2 for cross-compilation, make sure liblzma.a is available.")
       set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} "-llzma")


simplify the catkin macro

simplify the catkin macro

--- cmake/rosbuild2.cmake
+++ cmake/rosbuild2.cmake
@@ -7,58 +7,18 @@
     # Construct the path to the .cfg file
     set(_input ${PROJECT_SOURCE_DIR}/${_cfg})

-    # The .cfg file is its own generator.
-    set(gencfg_build_files
-      ${dynamic_reconfigure_SELF_DIR}/../templates/ConfigType.py
-      ${dynamic_reconfigure_SELF_DIR}/../templates/ConfigType.h
+    execute_process(COMMAND ${CATKIN_ENV}
+                            ${_input}
+                            ${dynamic_reconfigure_SELF_DIR}/..
+                            ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
+                            ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+                            ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}
+                    RESULT_VARIABLE RES_VAR
+                    OUTPUT_VARIABLE OUT_VAR
+                    ERROR_VARIABLE ERR_VAR
     )
-
-    get_filename_component(_cfgonly ${_cfg} NAME_WE)
-    set(_output_cpp ${CATKIN_PACKAGE_INCLUDE_DESTINATION}/${_cfgonly}Config.h)
-    set(_output_py ${CATKIN_PACKAGE_PYTHON_DESTINATION}/cfg/${_cfgonly}Config.py)
-    set(_output_dox ${CATKIN_PACKAGE_SHARE_DESTINATION}/docs/${_cfg_bare}Config.dox)
-    set(_output_wikidoc ${CATKIN_PACKAGE_SHARE_DESTINATION}/docs/${_cfg_bare}Config.wikidoc)
-    set(_output_usage ${CATKIN_PACKAGE_SHARE_DESTINATION}/docs/${_cfg_bare}Config-usage.dox)
-
-    add_custom_command(OUTPUT
-      ${_output_cpp} ${_output_dox} ${_output_usage} ${_output_py} ${_output_wikidoc}
-      COMMAND ${CATKIN_ENV}
-      ${_input}
-      ${dynamic_reconfigure_SELF_DIR}/..
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}
-      DEPENDS ${_input} ${gencfg_build_files}
-      COMMENT "Generating dynamic reconfigure stuff from ${_cfg}: ${_output_cpp} ${_output_py}"
-      )
-
-    execute_process(
-      COMMAND ${CATKIN_ENV}
-      ${_input}
-      ${dynamic_reconfigure_SELF_DIR}/..
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}
-      RESULT_VARIABLE RES_VAR
-      OUTPUT_VARIABLE OUT_VAR
-      ERROR_VARIABLE ERR_VAR
-      )
-    message(INFO "${CATKIN_ENV}
-      ${_input}
-      ${dynamic_reconfigure_SELF_DIR}/..
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}"
-    )
-    message(INFO ${RES_VAR})
-    message(INFO ${OUT_VAR})
-    message(INFO ${ERR_VAR})
-
-
-    list(APPEND ${PROJECT_NAME}_generated
-      ${_output_cpp} ${_output_py}
-      )
+    if (${ERR_VAR})
+      message(ERROR ${ERR_VAR})
+    endif()
   endforeach(_cfg)
-
-  add_custom_target(${PROJECT_NAME}_gencfg DEPENDS ${${PROJECT_NAME}_generated})
 endmacro()


Make error message more actionable

Make error message more actionable

--- conan.cmake
+++ conan.cmake
@@ -528,7 +528,7 @@

     find_program(CONAN_CMD conan)
     if(NOT CONAN_CMD AND CONAN_REQUIRED)
-        message(FATAL_ERROR "Conan executable not found!")
+        message(FATAL_ERROR "Conan executable not found! Please install conan.")
     endif()
     message(STATUS "Conan: Found program ${CONAN_CMD}")
     execute_process(COMMAND ${CONAN_CMD} --version


v2 test config: Disable a couple unnecessary parts

--- cmake/configs/nuttx_px4fmu-v2_test.cmake
+++ cmake/configs/nuttx_px4fmu-v2_test.cmake
@@ -24,12 +24,12 @@
 	drivers/hmc5883
 	drivers/ms5611
 	#drivers/mb12xx
-	drivers/srf02
-	drivers/sf0x
-	drivers/ll40ls
-	drivers/trone
+	#drivers/srf02
+	#drivers/sf0x
+	#drivers/ll40ls
+	#drivers/trone
 	drivers/gps
-	drivers/pwm_out_sim
+	#drivers/pwm_out_sim
 	#drivers/hott
 	#drivers/hott/hott_telemetry
 	#drivers/hott/hott_sensors
@@ -45,8 +45,8 @@
 	drivers/gimbal
 	drivers/pwm_input
 	drivers/camera_trigger
-	drivers/bst
-	drivers/snapdragon_rc_pwm
+	#drivers/bst
+	#drivers/snapdragon_rc_pwm
 	#drivers/lis3mdl
 	#drivers/bmi160


ecp5: add support for PREGENERATED_BBA_PATH

Support pre-generated bba files to speed up compiling on Windows
and get it compiling on Darwin.

Signed-off-by: Sean Cross <d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@xobs.io>

--- ecp5/family.cmake
+++ ecp5/family.cmake
@@ -40,14 +40,20 @@
             set(DEV_CC_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.bin)
             set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.bba)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/constids.inc)
-            add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${ENV_CMD} ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}
-                DEPENDS ${DB_PY} ${PREV_DEV_CC_BBA_DB}
-                )
-            add_custom_command(OUTPUT ${DEV_CC_DB}
-                COMMAND bbasm ${DEV_CC_BBA_DB} ${DEV_CC_DB}
-                DEPENDS bbasm ${DEV_CC_BBA_DB}
-                )
+            if (PREGENERATED_BBA_PATH)
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm ${PREGENERATED_BBA_PATH}/chipdb-${dev}.bba ${DEV_CC_DB}
+                    )
+            else()
+                add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
+                    COMMAND ${ENV_CMD} ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}
+                    DEPENDS ${DB_PY} ${PREV_DEV_CC_BBA_DB}
+                    )
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm ${DEV_CC_BBA_DB} ${DEV_CC_DB}
+                    DEPENDS bbasm ${DEV_CC_BBA_DB}
+                    )
+            endif()
             if (SERIALIZE_CHIPDB)
                 set(PREV_DEV_CC_BBA_DB ${DEV_CC_BBA_DB})
             endif()
@@ -64,16 +70,23 @@
             set(DEV_CC_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.cc)
             set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.bba)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/constids.inc)
-            add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${ENV_CMD} ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}.new
-                COMMAND mv ${DEV_CC_BBA_DB}.new ${DEV_CC_BBA_DB}
-                DEPENDS ${DB_PY} ${PREV_DEV_CC_BBA_DB}
-                )
-            add_custom_command(OUTPUT ${DEV_CC_DB}
-                COMMAND bbasm --c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new
-                COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
-                DEPENDS bbasm ${DEV_CC_BBA_DB}
-                )
+            if (PREGENERATED_BBA_PATH)
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm --c ${PREGENERATED_BBA_PATH}/chipdb-${dev}.bba ${DEV_CC_DB}.new
+                    COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
+                    )
+            else()
+                add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
+                    COMMAND ${ENV_CMD} ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}.new
+                    COMMAND mv ${DEV_CC_BBA_DB}.new ${DEV_CC_BBA_DB}
+                    DEPENDS ${DB_PY} ${PREV_DEV_CC_BBA_DB}
+                    )
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm --c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new
+                    COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
+                    DEPENDS bbasm ${DEV_CC_BBA_DB}
+                    )
+            endif()
             if (SERIALIZE_CHIPDB)
                 set(PREV_DEV_CC_BBA_DB ${DEV_CC_BBA_DB})
             endif()


Fixed incorrect search paths for FreeImage includes.

--- cmake/FindFreeImage.cmake
+++ cmake/FindFreeImage.cmake
@@ -18,8 +18,8 @@
 ENDIF (FreeImage_LIBRARIES AND FreeImage_INCLUDE_DIRS)

 SET(FreeImage_INCLUDE_SEARCH_DIRS
-	${FreeImage_LIBRARY_SEARCH_DIRS}
-	${CMAKE_LIBRARY_PATH}
+	${FreeImage_INCLUDE_SEARCH_DIRS}
+	${CMAKE_INCLUDE_PATH}
 	/usr/include
 	/usr/local/include
 	/opt/include


Attempted fix for Mac

Attempted fix for Mac

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -420,10 +420,7 @@
 	include_directories("." "gen/cpp" ${HALLEY_PROJECT_INCLUDE_DIRS})
 	link_directories(${HALLEY_PROJECT_LIB_DIRS})

-	if (BUILD_MACOSX_BUNDLE)
-		add_executable(${name} MACOSX_BUNDLE ${proj_sources} ${proj_headers})
-		add_definitions(-DHALLEY_EXECUTABLE)
-	elseif (ANDROID_NDK)
+	if (ANDROID_NDK)
 		add_library(${name} SHARED ${proj_sources} ${proj_headers})
 		add_definitions(-DHALLEY_SHARED_LIBRARY)
 	elseif (HALLEY_MONOLITHIC)
@@ -432,7 +429,12 @@
 	else()
 		add_library(${name} STATIC ${proj_sources} ${proj_headers})
 		add_library(${name}-dll SHARED ${HALLEY_PATH}/src/entry/halley_dll_entry.cpp)
-		add_executable(${name}-exe WIN32 ${HALLEY_PATH}/src/entry/halley_exe_entry.cpp)
+
+		if (BUILD_MACOSX_BUNDLE)
+			add_executable(${name}-exe MACOSX_BUNDLE ${HALLEY_PATH}/src/entry/halley_exe_entry.cpp)
+		else()
+			add_executable(${name}-exe WIN32 ${HALLEY_PATH}/src/entry/halley_exe_entry.cpp)
+		endif()

 		target_compile_definitions(${name} PUBLIC HALLEY_STATIC_LIBRARY)
 		target_compile_definitions(${name}-dll PUBLIC HALLEY_SHARED_LIBRARY)


Updated XLink with a couple of fixes

Updated XLink with a couple of fixes

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4-master"
-    URL "https://github.com/luxonis/XLink/archive/d2de4895b8f956b3f3afea220a95a30dd4a3ae79.tar.gz"
-    SHA1 "2f58b22a9c2441f9adf8ebd871f2d08162ec552b"
+    URL "https://github.com/luxonis/XLink/archive/09fcfc93ca7060b07fe21db7371fc83e04a257f3.tar.gz"
+    SHA1 "7c8a947e80aaab7ceeb615001349f44e4162af4a"
 )

 hunter_config(


fix the location for README and LICENSE

fix the location for README and LICENSE


Fixes IPP build on linux;

Fixes IPP build on linux;

--- cmake/OpenCVFindIPP.cmake
+++ cmake/OpenCVFindIPP.cmake
@@ -182,15 +182,15 @@
   if(HAVE_IPP_ICV_ONLY)
     _ipp_add_library(icv)
   else()
-    _ipp_add_library(core)
-    _ipp_add_library(s)
+    _ipp_add_library(m)
+    _ipp_add_library(cv)
     _ipp_add_library(i)
     _ipp_add_library(cc)
-    _ipp_add_library(cv)
+    _ipp_add_library(s)
     _ipp_add_library(vm)
-    _ipp_add_library(m)
-
-    if(UNIX)
+    _ipp_add_library(core)
+
+    if(UNIX AND IPP_VERSION_MAJOR LESS 2017)
       get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH)
       if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR})
         get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../compiler/lib REALPATH)
@@ -223,7 +223,7 @@
       _ipp_add_compiler_library(irc)
       _ipp_add_compiler_library(imf)
       _ipp_add_compiler_library(svml)
-    endif(UNIX)
+    endif()
   endif()

   #message(STATUS "IPP libs: ${IPP_LIBRARIES}")


Changing use of OpenCMISS(Zinc) to OpenCMISS-Zinc.  https://tracker.physiomeproject.org/show_bug.cgi?id=3535

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

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -49,7 +49,7 @@

 	SET( ZINC_ARCHITECTURE "universal" )
 	SET( CPACK_GENERATOR  "TGZ" "PackageMaker" )
-	#SET( CPACK_BUNDLE_NAME "OpenCMISS(Zinc" )
+	#SET( CPACK_BUNDLE_NAME "OpenCMISS-Zinc" )
 ELSEIF( UNIX )
 	SET( CPACK_GENERATOR "TGZ" )
 	STRING( FIND ${ZINC_SYSTEM} "Ubuntu" INDEX )


Disable CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE

Disable the CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE option in all MSVC
versions.

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

-if(MSVC11)
+if(MSVC)
 	# Setting this to true brakes Visual Studio builds.
 	set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF CACHE BOOL "CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE")
 endif()


qibuild/tests.cmake : fix running tests on mac

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -46,7 +46,7 @@
   # HACK for apple until the .dylib problems are fixed...
   if(APPLE)
     set_tests_properties(${test_name} PROPERTIES
-      ENVIRONMENT "DYLD_LIBRARY_PATH=${QI_SDK_DIR}/${QI_SDK_LIB} DYLD_FRAMEWORK_PATH=${QI_SDK_DIR}"
+      ENVIRONMENT "DYLD_LIBRARY_PATH=${QI_SDK_DIR}/${QI_SDK_LIB};DYLD_FRAMEWORK_PATH=${QI_SDK_DIR}"
     )
   endif()
 endfunction()


Update to Cotire 1.7.10

Update to Cotire 1.7.10

--- cmakemodules/cotire.cmake
+++ cmakemodules/cotire.cmake
@@ -3,7 +3,7 @@
 # See the cotire manual for usage hints.
 #
 #=============================================================================
-# Copyright 2012-2016 Sascha Kratky
+# Copyright 2012-2017 Sascha Kratky
 #
 # Permission is hereby granted, free of charge, to any person
 # obtaining a copy of this software and associated documentation
@@ -43,7 +43,7 @@
 endif()

 set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
-set (COTIRE_CMAKE_MODULE_VERSION "1.7.9")
+set (COTIRE_CMAKE_MODULE_VERSION "1.7.10")

 # activate select policies
 if (POLICY CMP0025)
@@ -104,6 +104,11 @@
 if (POLICY CMP0054)
 	# only interpret if() arguments as variables or keywords when unquoted
 	cmake_policy(SET CMP0054 NEW)
+endif()
+
+if (POLICY CMP0055)
+	# strict checking for break() command
+	cmake_policy(SET CMP0055 NEW)
 endif()

 include(CMakeParseArguments)
@@ -293,7 +298,7 @@
 	set (${_valuesVar} ${_values} PARENT_SCOPE)
 endfunction()

-function (cotire_resolve_config_properites _configurations _propertiesVar)
+function (cotire_resolve_config_properties _configurations _propertiesVar)
 	set (_properties "")
 	foreach (_property ${ARGN})
 		if ("${_property}" MATCHES "<CONFIG>")
@@ -309,8 +314,8 @@
 	set (${_propertiesVar} ${_properties} PARENT_SCOPE)
 endfunction()

-function (cotire_copy_set_properites _configurations _type _source _target)
-	cotire_resolve_config_properites("${_configurations}" _properties ${ARGN})
+function (cotire_copy_set_properties _configurations _type _source _target)
+	cotire_resolve_config_properties("${_configurations}" _properties ${ARGN})
 	foreach (_property ${_properties})
 		get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET)
 		if (_isSet)
@@ -320,13 +325,18 @@
 	endforeach()
 endfunction()

-function (cotire_get_target_usage_requirements _target _targetRequirementsVar)
+function (cotire_get_target_usage_requirements _target _config _targetRequirementsVar)
 	set (_targetRequirements "")
 	get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES)
 	while (_librariesToProcess)
 		# remove from head
 		list (GET _librariesToProcess 0 _library)
 		list (REMOVE_AT _librariesToProcess 0)
+		if (_library MATCHES "^\\$<\\$<CONFIG:${_config}>:([A-Za-z0-9_:-]+)>$")
+			set (_library "${CMAKE_MATCH_1}")
+		elseif (_config STREQUAL "None" AND _library MATCHES "^\\$<\\$<CONFIG:>:([A-Za-z0-9_:-]+)>$")
+			set (_library "${CMAKE_MATCH_1}")
+		endif()
 		if (TARGET ${_library})
 			list (FIND _targetRequirements ${_library} _index)
 			if (_index LESS 0)
@@ -441,7 +451,7 @@
 	# interface compile options from linked library targets
 	if (_target)
 		set (_linkedTargets "")
-		cotire_get_target_usage_requirements(${_target} _linkedTargets)
+		cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
 		foreach (_linkedTarget ${_linkedTargets})
 			get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS)
 			if (_targetOptions)
@@ -573,7 +583,7 @@
 	# interface include directories from linked library targets
 	if (_target)
 		set (_linkedTargets "")
-		cotire_get_target_usage_requirements(${_target} _linkedTargets)
+		cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
 		foreach (_linkedTarget ${_linkedTargets})
 			get_target_property(_linkedTargetType ${_linkedTarget} TYPE)
 			if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND
@@ -627,7 +637,7 @@
 	if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
 		list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
 	endif()
-	if (WIN32)
+	if (WIN32 AND NOT MINGW)
 		# convert Windows paths in include directories to CMake paths
 		if (_includeDirs)
 			set (_paths "")
@@ -703,7 +713,7 @@
 	endif()
 	# interface compile definitions from linked library targets
 	set (_linkedTargets "")
-	cotire_get_target_usage_requirements(${_target} _linkedTargets)
+	cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
 	foreach (_linkedTarget ${_linkedTargets})
 		get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS)
 		if (_definitions)
@@ -859,6 +869,9 @@
 		list (APPEND ${_cmdVar} "--warn-uninitialized")
 	endif()
 	list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$<CONFIGURATION>")
+	if (XCODE)
+		list (APPEND ${_cmdVar} "-DXCODE:BOOL=TRUE")
+	endif()
 	if (COTIRE_VERBOSE)
 		list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON")
 	elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles")
@@ -902,16 +915,16 @@
 		foreach (_include ${_includeDirs})
 			if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
 				file (TO_NATIVE_PATH "${_include}" _include)
-				list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}")
+				list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
 			else()
 				set (_index -1)
 				if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+")
 					list (FIND ${_systemIncludesVar} "${_include}" _index)
 				endif()
 				if (_index GREATER -1)
-					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${_include}")
+					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
 				else()
-					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}")
+					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
 				endif()
 			endif()
 		endforeach()
@@ -1657,6 +1670,10 @@
 			get_filename_component(_pchName "${_pchFile}" NAME)
 			set (_xLanguage_C "c-header")
 			set (_xLanguage_CXX "c++-header")
+			set (_pchSuppressMessages FALSE)
+			if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*")
+				set(_pchSuppressMessages TRUE)
+			endif()
 			if (_flags)
 				# append to list
 				if ("${_language}" STREQUAL "CXX")
@@ -1664,13 +1681,17 @@
 				endif()
 				list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}")
 				if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
-					list (APPEND _flags "-Wpch-messages")
+					if (NOT _pchSuppressMessages)
+						list (APPEND _flags "-Wpch-messages")
+					endif()
 				endif()
 			else()
 				# return as a flag string
 				set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"")
 				if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
-					set (_flags "${_flags} -Wpch-messages")
+					if (NOT _pchSuppressMessages)
+						set (_flags "${_flags} -Wpch-messages")
+					endif()
 				endif()
 			endif()
 		endif()
@@ -1781,17 +1802,25 @@
 			if (_pchFile)
 				get_filename_component(_pchDir "${_pchFile}" DIRECTORY)
 				get_filename_component(_pchName "${_pchFile}" NAME)
+				set (_pchSuppressMessages FALSE)
+				if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*")
+					set(_pchSuppressMessages TRUE)
+				endif()
 				if (_flags)
 					# append to list
 					list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}")
 					if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
-						list (APPEND _flags "-Wpch-messages")
+						if (NOT _pchSuppressMessages)
+							list (APPEND _flags "-Wpch-messages")
+						endif()
 					endif()
 				else()
 					# return as a flag string
 					set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"")
 					if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
-						set (_flags "${_flags} -Wpch-messages")
+						if (NOT _pchSuppressMessages)
+							set (_flags "${_flags} -Wpch-messages")
+						endif()
 					endif()
 				endif()
 			else()
@@ -1839,6 +1868,14 @@
 	if (_option_COMPILER_ID MATCHES "MSVC")
 		# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
 		unset (ENV{VS_UNICODE_OUTPUT})
+	elseif (_option_COMPILER_ID MATCHES "GNU|Clang")
+		if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR
+			_option_COMPILER_EXECUTABLE MATCHES "ccache")
+			# Newer versions of Clang and GCC seem to embed a compilation timestamp into the precompiled header binary,
+			# which results in "file has been modified since the precompiled header was built" errors if ccache is used.
+			# We work around the problem by disabling ccache upon pre-compiling the prefix header.
+			set (ENV{CCACHE_DISABLE} "true")
+		endif()
 	endif()
 	execute_process(
 		COMMAND ${_cmd}
@@ -2191,7 +2228,7 @@
 		XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES
 		CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION
 		CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
-		CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP
+		CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_SEP_${_language}
 		CMAKE_INCLUDE_SYSTEM_FLAG_${_language}
 		CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG
 		CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG
@@ -2989,8 +3026,13 @@
 	if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
 		# if the original target sources are subject to CMake's automatic Qt processing,
 		# also include implicitly generated <targetname>_automoc.cpp file
-		list (APPEND _unityTargetSources "${_target}_automoc.cpp")
-		set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE)
+		if (CMAKE_VERSION VERSION_LESS "3.8.0")
+			list (APPEND _unityTargetSources "${_target}_automoc.cpp")
+			set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE)
+		else()
+			list (APPEND _unityTargetSources "${_target}_autogen/moc_compilation.cpp")
+			set_property (SOURCE "${_target}_autogen/moc_compilation.cpp" PROPERTY GENERATED TRUE)
+		endif()
 	endif()
 	# prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created
 	set (CMAKE_AUTOMOC OFF)
@@ -3013,7 +3055,11 @@
 	else()
 		if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
 			# depend on the original target's implicity generated <targetname>_automoc target
-			add_dependencies(${_unityTargetName} ${_target}_automoc)
+			if (CMAKE_VERSION VERSION_LESS "3.8.0")
+				add_dependencies(${_unityTargetName} ${_target}_automoc)
+			else()
+				add_dependencies(${_unityTargetName} ${_target}_autogen)
+			endif()
 		endif()
 	endif()
 	# copy output location properties
@@ -3027,8 +3073,8 @@
 			set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}")
 		else()
 			# append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory
-			cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties})
-			cotire_resolve_config_properites("${_configurations}" _properties ${_outputDirProperties})
+			cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties})
+			cotire_resolve_config_properties("${_configurations}" _properties ${_outputDirProperties})
 			foreach (_property ${_properties})
 				get_property(_outputDir TARGET ${_target} PROPERTY ${_property})
 				if (_outputDir)
@@ -3048,11 +3094,11 @@
 				RUNTIME_OUTPUT_DIRECTORY "${_outputDir}")
 		endif()
 	else()
-		cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+		cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 			${_outputDirProperties})
 	endif()
 	# copy output name
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_<CONFIG>
 		LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_<CONFIG>
 		OUTPUT_NAME OUTPUT_NAME_<CONFIG>
@@ -3060,7 +3106,7 @@
 		PREFIX <CONFIG>_POSTFIX SUFFIX
 		IMPORT_PREFIX IMPORT_SUFFIX)
 	# copy compile stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		COMPILE_DEFINITIONS COMPILE_DEFINITIONS_<CONFIG>
 		COMPILE_FLAGS COMPILE_OPTIONS
 		Fortran_FORMAT Fortran_MODULE_DIRECTORY
@@ -3072,12 +3118,12 @@
 		C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN
 		C_CLANG_TIDY CXX_CLANG_TIDY)
 	# copy compile features
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED
 		CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED
 		COMPILE_FEATURES)
 	# copy interface stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN
 		COMPATIBLE_INTERFACE_STRING
 		INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS
@@ -3085,7 +3131,7 @@
 		INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
 		INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)
 	# copy link stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
 		LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED
 		LINK_FLAGS LINK_FLAGS_<CONFIG>
@@ -3094,18 +3140,18 @@
 		LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC
 		STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_<CONFIG>
 		NO_SONAME SOVERSION VERSION
-		LINK_WHAT_YOU_USE)
+		LINK_WHAT_YOU_USE BUILD_RPATH)
 	# copy cmake stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK)
 	# copy Apple platform specific stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR
 		MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH
 		OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST
-		IOS_INSTALL_COMBINED)
+		IOS_INSTALL_COMBINED XCODE_EXPLICIT_FILE_TYPE XCODE_PRODUCT_TYPE)
 	# copy Windows platform specific stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		GNUtoMS
 		COMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>
 		COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
@@ -3119,9 +3165,9 @@
 		VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES
 		WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS
 		DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE
-		VS_SDK_REFERENCES)
+		VS_SDK_REFERENCES VS_USER_PROPS VS_DEBUGGER_WORKING_DIRECTORY)
 	# copy Android platform specific stuff
-	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		ANDROID_API ANDROID_API_MIN ANDROID_GUI
 		ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES
 		ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR


[CMake] Use foreach for the "run qemu" scripts

--- scripts/gen_config.cmake
+++ scripts/gen_config.cmake
@@ -127,54 +127,26 @@

 # Run qemu scripts

-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_nokvm_qemu
-   ${CMAKE_BINARY_DIR}/run_nokvm_qemu
+list(
+   APPEND run_qemu_files
+
+   run_nokvm_qemu
+   run_qemu
+   run_nokvm_qemu_with_usbdisk
+   run_multiboot_nokvm_qemu
+   run_multiboot_qemu
+   run_efi_nokvm_qemu32
+   run_efi_qemu32
+   run_efi_nokvm_qemu64
+   run_efi_qemu64
+   debug_run_qemu
 )

-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_qemu
-   ${CMAKE_BINARY_DIR}/run_qemu
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_nokvm_qemu_with_usbdisk
-   ${CMAKE_BINARY_DIR}/run_nokvm_qemu_with_usbdisk
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_multiboot_nokvm_qemu
-   ${CMAKE_BINARY_DIR}/run_multiboot_nokvm_qemu
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_multiboot_qemu
-   ${CMAKE_BINARY_DIR}/run_multiboot_qemu
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_efi_nokvm_qemu32
-   ${CMAKE_BINARY_DIR}/run_efi_nokvm_qemu32
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_efi_qemu32
-   ${CMAKE_BINARY_DIR}/run_efi_qemu32
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_efi_nokvm_qemu64
-   ${CMAKE_BINARY_DIR}/run_efi_nokvm_qemu64
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/run_efi_qemu64
-   ${CMAKE_BINARY_DIR}/run_efi_qemu64
-)
-
-configure_file(
-   ${CMAKE_SOURCE_DIR}/scripts/qemu/debug_run_qemu
-   ${CMAKE_BINARY_DIR}/debug_run_qemu
-)
+foreach(script_file ${run_qemu_files})
+   configure_file(
+      ${CMAKE_SOURCE_DIR}/scripts/qemu/${script_file}
+      ${CMAKE_BINARY_DIR}/${script_file}
+   )
+endforeach()

 include_directories(${CMAKE_BINARY_DIR})


fixed: missing use of global deps for tests/unittests

git-svn-id: 9c86407f91444b2cc93bb44d37d96a685973386f@2488 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -1241,6 +1241,17 @@
         INCLUDE_DIRECTORIES(${${OSGTESTDEP}_INC})
     ENDFOREACH(OSGTESTDEP)

+    # dependencies - global
+    FOREACH(INCDIR ${OSG_GLOBAL_DEP_INCDIR})
+        OSG_MSG("  (global) - include dir ${INCDIR} = ${${INCDIR}}")
+        INCLUDE_DIRECTORIES(${${INCDIR}})
+    ENDFOREACH(INCDIR)
+
+    FOREACH(LIBDIR ${OSG_GLOBAL_DEP_LIBDIR})
+        OSG_MSG("  (global) - library dir ${LIBDIR} = ${${LIBDIR}}")
+        LINK_DIRECTORIES(${${LIBDIR}})
+    ENDFOREACH(LIBDIR)
+
     # dependencies - External
     FOREACH(INCDIR ${${PROJECT_NAME}_DEP_INCDIR})
         OSG_MSG("  (external) - include dir ${INCDIR} = ${${INCDIR}}")
@@ -1370,6 +1381,17 @@
         OSG_CHECKED_INCLUDE("${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
         INCLUDE_DIRECTORIES(${${OSGDEP}_INC})
     ENDFOREACH(OSGDEP)
+
+    # dependencies global
+    FOREACH(INCDIR ${OSG_GLOBAL_DEP_INCDIR})
+        OSG_MSG("  (global) - include dir ${INCDIR} = ${${INCDIR}}")
+        INCLUDE_DIRECTORIES(${${INCDIR}})
+    ENDFOREACH(INCDIR)
+
+    FOREACH(LIBDIR ${OSG_GLOBAL_DEP_LIBDIR})
+        OSG_MSG("  (global) - library dir ${LIBDIR} = ${${LIBDIR}}")
+        LINK_DIRECTORIES(${${LIBDIR}})
+    ENDFOREACH(LIBDIR)

     # dependencies - unittest External
     FOREACH(INCDIR ${${PROJECT_NAME}_DEP_UNITTEST_INCDIR})


Update DCMTK to 3.6.6

Update DCMTK to 3.6.6

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -30,8 +30,8 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/dcmtk-3.6.5.tar.gz
-      URL_MD5 e19707f64ee5695c496b9c1e48e39d07
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/dcmtk-3.6.6.tar.gz
+      URL_MD5 f815879d315b916366a9da71339c7575
       CMAKE_GENERATOR ${gen}
       CMAKE_GENERATOR_PLATFORM ${gen_platform}
       CMAKE_ARGS


Revert "Fix DCMTK linking issue by explicitly passing fPIC flag" Closes #22

This reverts commit 4b95a9bef509e62a2d86621539829165500baa48.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -28,21 +28,6 @@
         -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
         -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
     endif()
-
-    #-----------------------------------------------------------------------------
-    # HACK Waiting upstream DCMTK is fixed, specify -fPIC here.
-    #      See http://public.kitware.com/pipermail/ctk-developers/2011-August/000725.html
-    #-----------------------------------------------------------------------------
-    set(dcmtk_cxx_flags ${ep_common_cxx_flags})
-    set(dcmtk_c_flags ${ep_common_c_flags})
-    # To fix compilation problem: relocation R_X86_64_32 against `a local symbol' can not be
-    # used when making a shared object; recompile with -fPIC
-    # See http://www.cmake.org/pipermail/cmake/2007-May/014350.html
-    #
-    IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-      set(dcmtk_cxx_flags "${ep_common_cxx_flags} -fPIC")
-      set(dcmtk_c_flags "${ep_common_c_flags} -fPIC")
-    ENDIF()

     ExternalProject_Add(${proj}
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
@@ -54,8 +39,8 @@
       BUILD_COMMAND ""
       CMAKE_ARGS
         -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-        -DCMAKE_CXX_FLAGS:STRING=${dcmtk_cxx_flags}
-        -DCMAKE_C_FLAGS:STRING=${dcmtk_c_flags}
+        -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
+        -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
         -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
         ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
         -DBUILD_TESTING:BOOL=OFF


Update FindICU.cmake

Update FindICU.cmake

--- CMakeModules/FindICU.cmake
+++ CMakeModules/FindICU.cmake
@@ -37,7 +37,7 @@
 #      include_directories(${ICU_INCLUDE_DIRS})
 #      add_executable(myapp myapp.c)
 #      target_link_libraries(myapp ${ICU_LIBRARIES})
-#   endif()
+#   endif(ICU_FOUND)

 #=============================================================================
 # Copyright (c) 2011-2012, julp
@@ -100,7 +100,12 @@
 set(${ICU_PUBLIC_VAR_NS}_FOUND TRUE)
 set(${ICU_PUBLIC_VAR_NS}_LIBRARIES )
 set(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS )
-set(${ICU_PUBLIC_VAR_NS}_DEFINITIONS )
+set(${ICU_PUBLIC_VAR_NS}_C_FLAGS "")
+set(${ICU_PUBLIC_VAR_NS}_CXX_FLAGS "")
+set(${ICU_PUBLIC_VAR_NS}_CPP_FLAGS "")
+set(${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS "")
+set(${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS "")
+set(${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS "")
 foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS})
     string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT)
     set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) # may be done in the icu_declare_component macro
@@ -139,7 +144,7 @@
     elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h") # ICU 1.3
         file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS)
     else()
-        message("ICU version header not found")
+        message(FATAL_ERROR "ICU version header not found")
     endif()

     if(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *ICU_VERSION *\"([0-9]+)\".*") # ICU 1.3
@@ -175,7 +180,7 @@
             set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${CMAKE_MATCH_3}")
         endif()
     else()
-        message("failed to detect ICU version")
+        message(FATAL_ERROR "failed to detect ICU version")
     endif()
     set(${ICU_PUBLIC_VAR_NS}_VERSION "${${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_MINOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_PATCH_VERSION}")
     ########## </part to keep synced with tests/version/CMakeLists.txt> ##########
@@ -242,9 +247,20 @@
             list(APPEND ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT}})
         endif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT})
     endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT)
-endif(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS)
-
-if(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS)
+
+    # Try to find out compiler flags
+    find_program(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} icu-config)
+    if(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE)
+        execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+        execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+        execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+        execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+        execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+        execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+    endif(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE)
+
+    # Check find_package arguments
     include(FindPackageHandleStandardArgs)
     if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY)
         find_package_handle_standard_args(
@@ -280,6 +296,13 @@
 icudebug("LE_FOUND")
 icudebug("LX_FOUND")
 icudebug("DATA_FOUND")
+# Flags
+icudebug("C_FLAGS")
+icudebug("CPP_FLAGS")
+icudebug("CXX_FLAGS")
+icudebug("C_SHARED_FLAGS")
+icudebug("CPP_SHARED_FLAGS")
+icudebug("CXX_SHARED_FLAGS")
 # Linking
 icudebug("INCLUDE_DIRS")
 icudebug("LIBRARIES")
@@ -287,4 +310,4 @@
 icudebug("MAJOR_VERSION")
 icudebug("MINOR_VERSION")
 icudebug("PATCH_VERSION")
-icudebug("VERSION")+icudebug("VERSION")


Updating ArrayFire version to 3.6.0

Updating ArrayFire version to 3.6.0

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -9,7 +9,7 @@
 ENDIF()

 SET(AF_VERSION_MAJOR "3")
-SET(AF_VERSION_MINOR "5")
+SET(AF_VERSION_MINOR "6")
 SET(AF_VERSION_PATCH "0")

 SET(AF_VERSION "${AF_VERSION_MAJOR}.${AF_VERSION_MINOR}.${AF_VERSION_PATCH}")


1. CMAKE_BUILD_TYPE could be empty. 2. Find sources recursively only when DSN_RECURSIVE_SRC is set to "1"(true). 3. Make ms_link_static_runtime() a function instead of a macro, and save flags to cache.

--- cmake/dsn.cmake
+++ cmake/dsn.cmake
@@ -61,20 +61,22 @@
 	endforeach()
 endmacro(ms_add_compiler_flags LANGUAGES SUFFIXES FLAGS)

-macro(ms_link_static_runtime FLAG_VAR)
+function(ms_link_static_runtime FLAG_VAR)
 	if(MSVC)
 		if(${FLAG_VAR} MATCHES "/MD")
 			string(REGEX REPLACE "/MD"  "/MT" "${FLAG_VAR}" "${${FLAG_VAR}}")
-		endif(${FLAG_VAR} MATCHES "/MD")
+			#Save persistently
+			set(${FLAG_VAR} ${${FLAG_VAR}} CACHE STRING "" FORCE)
+		endif()
 	endif()
 	#message(STATUS ${FLAG_VAR} ":" ${${FLAG_VAR}})
-endmacro(ms_link_static_runtime)
+endfunction(ms_link_static_runtime)

 function(ms_replace_compiler_flags REPLACE_OPTION)
 	set(SUFFIXES "")
-	if(NOT DEFINED CMAKE_CONFIGURATION_TYPES)
+	if(CMAKE_CONFIGURATION_TYPES STREQUAL "")
 		#set(SUFFIXES "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
-		if(DEFINED CMAKE_BUILD_TYPE)
+		if(NOT (CMAKE_BUILD_TYPE STREQUAL ""))
 			string(TOUPPER ${CMAKE_BUILD_TYPE} SUFFIXES)
 			set(SUFFIXES "_${SUFFIXES}")
 		endif()
@@ -84,14 +86,13 @@
 			set(SUFFIXES ${SUFFIXES} "_${SUFFIX}")
 		endforeach()
 	endif()
+
 	foreach(SUFFIX "" ${SUFFIXES})
 		foreach(LANG C CXX)
 			set(FLAG_VAR "CMAKE_${LANG}_FLAGS${SUFFIX}")
 			if(${REPLACE_OPTION} STREQUAL "STATIC_LINK")
 				ms_link_static_runtime(${FLAG_VAR})
 			endif()
-			#Save persistently
-			set(${FLAG_VAR} ${${FLAG_VAR}} CACHE STRING "" FORCE)
 		endforeach()
 	endforeach()
 endfunction(ms_replace_compiler_flags REPLACE_OPTION)
@@ -116,7 +117,13 @@

 function(dsn_add_library PROJ_NAME)
-	file(GLOB_RECURSE
+	if((NOT DEFINED DSN_RECURSIVE_SRC) OR (NOT DSN_RECURSIVE_SRC))
+		set(MY_GLOB_OPTION "GLOB")
+	else()
+		set(MY_GLOB_OPTION "GLOB_RECURSE")
+	endif()
+
+	file(${MY_GLOB_OPTION}
 		PROJ_SRC
 		"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
 		"${CMAKE_CURRENT_SOURCE_DIR}/*.c"
@@ -127,7 +134,13 @@
 endfunction(dsn_add_library)

 function(dsn_add_executable PROJ_NAME BINPLACE_FILES)
-	file(GLOB_RECURSE
+	if((NOT DEFINED DSN_RECURSIVE_SRC) OR (NOT DSN_RECURSIVE_SRC))
+		set(MY_GLOB_OPTION "GLOB")
+	else()
+		set(MY_GLOB_OPTION "GLOB_RECURSE")
+	endif()
+
+	file(${MY_GLOB_OPTION}
 		PROJ_SRC
 		"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
 		"${CMAKE_CURRENT_SOURCE_DIR}/*.c"


Updated comments for consistency.

Updated comments for consistency.

--- cmake/ucm.cmake
+++ cmake/ucm.cmake
@@ -251,8 +251,8 @@
     message("")
 endmacro()

-# Set xcode attributes
-# name value CONFIG config1 conifg2..
+# ucm_set_xcode_attrib
+# Set xcode attributes - name value CONFIG config1 conifg2..
 macro(ucm_set_xcode_attrib)
     cmake_parse_arguments(ARG "" "CLEAR" "CONFIG" ${ARGN})


fbcode_builder: add a license header to FBBuildOptions.cmake

Summary:
Add a license header to satisfy the open source linter. Use the same
header the other .cmake files have.

Reviewed By: mhlakhani

Differential Revision: D17404782

fbshipit-source-id: 66679d72c9e680f8bb8b27869e981a046b3520cf

--- build/fbcode_builder/CMake/FBBuildOptions.cmake
+++ build/fbcode_builder/CMake/FBBuildOptions.cmake
@@ -1,3 +1,5 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+
 function (fb_activate_static_library_option)
   option(USE_STATIC_DEPS_ON_UNIX
     "If enabled, use static dependencies on unix systems. This is generally discouraged."


cmake: boost_thread depends on pthread on UNIX

Change-Id: Ie9dabc1bdda402b492a820d71e8eb0a822ce4bc9
Reviewed-on: http://gerrit.aldebaran.lan:8080/125
Reviewed-by: Dimitri Merejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: Dimitri Merejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/boost_thread-config.cmake
+++ cmake/qibuild/modules/boost_thread-config.cmake
@@ -7,3 +7,6 @@
 include("${_ROOT_DIR}/boostutils.cmake")

 boost_flib("thread")
+if(UNIX)
+  qi_set_global(BOOST_THREAD_DEPENDS "PTHREAD")
+endif()


update user config

update user config

--- config/user_options.cmake
+++ config/user_options.cmake
@@ -31,19 +31,12 @@

 IF (MSVC)
     SET (BOOST_ROOT "C:/Program Files/Boost" CACHE PATH "Boost ROOT")
-    SET (TBB_ROOT "C:/Program Files/Intel/TBB/4.2")
+    SET (TBB_ROOT "C:/Program Files/TBB")
     SET (TBB_INC_PATH "${TBB_ROOT}/include" CACHE PATH "TBB include")
-    IF (MSVC_VERSION EQUAL 1600)
-        SET (TBB_LIB_PATH "${TBB_ROOT}/lib/intel64/vc10" CACHE PATH "TBB lib")
-    ELSEIF (MSVC_VERSION EQUAL 1700)
-        SET (TBB_LIB_PATH "${TBB_ROOT}/lib/intel64/vc11" CACHE PATH "TBB lib")
-    ELSEIF (MSVC_VERSION EQUAL 1800)
-        SET (TBB_LIB_PATH "${TBB_ROOT}/lib/intel64/vc12" CACHE PATH "TBB lib")
-    ENDIF (MSVC_VERSION EQUAL 1600)
-    SET (OpenCL_INC_PATH "C:/Program Files (x86)/Intel/OpenCL SDK/3.2/include"
-        CACHE PATH "OpenCL include path")
-    SET (OpenCL_LIB_PATH "C:/Program Files (x86)/Intel/OpenCL SDK/3.2/lib/x64"
-        CACHE PATH "OpenCL lib path")
+    SET (TBB_LIB_PATH "${TBB_ROOT}/lib/intel64/vc12" CACHE PATH "TBB lib")
+    SET (VSMC_MPI_FOUND FALSE CACHE "NO MPI")
+    SET (OPENCL_FOUND FALSE CACHE "NO OpenCL")
+    SET (OPENMP_FOUND FALSE CACHE "NO OpenMP")
 ENDIF (MSVC)

 IF (UNIX AND NOT APPLE AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")


Issue #12: VTK builds should depend on MYPROJECT_USE_QT.

--- CMake/ExternalProjects/VTK.cmake
+++ CMake/ExternalProjects/VTK.cmake
@@ -69,7 +69,7 @@
        -DVTK_WINDOWS_PYTHON_DEBUGGABLE:BOOL=OFF
       )

-  if(Qt5_DIR AND BUILDING_GUIS)
+  if(Qt5_DIR AND MYPROJECT_USE_QT)
     list(APPEND additional_cmake_args
         -DVTK_QT_VERSION:STRING=5
         -DVTK_Group_Qt:BOOL=ON


Fix CLBLast libdir

Fix CLBLast libdir

On some systems, libs are stored in `lib64` folder instead of `lib` making the build fail.

--- CMakeModules/build_CLBlast.cmake
+++ CMakeModules/build_CLBlast.cmake
@@ -26,6 +26,7 @@
       "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -w -fPIC"
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+      -DCMAKE_INSTALL_LIBDIR:PATH=lib
       -DBUILD_SHARED_LIBS:BOOL=OFF
       -DSAMPLES:BOOL=OFF
       -DTUNERS:BOOL=OFF


More flexible package name when adding pytest

--- scripts/AddPyTest.cmake
+++ scripts/AddPyTest.cmake
@@ -10,11 +10,13 @@
 endfunction()

 function(_apt_module_name OUTVAR prefix)
-    set(target "tests")
-    if(NOT "${prefix}" STREQUAL "")
-        set(target "${prefix}.${target}")
+    if("${prefix}" STREQUAL "")
+        set(${OUTVAR} "tests" PARENT_SCOPE)
+    elseif("${prefix}" MATCHES "tests?")
+        set(${OUTVAR} "${prefix}" PARENT_SCOPE)
+    else()
+        set(${OUTVAR} "${prefix}.tests" PARENT_SCOPE)
     endif()
-    set(${OUTVAR} ${target} PARENT_SCOPE)
 endfunction()

 function(add_pytest)


lemon.cmake: - Use the hg repo instead of the tar download. - Skip the test step, which doesn't pass in the hg repo (yikes) - Require CMake 2.8.10, since earlier versions of ExternalProject_Add don't support hg

--- lemon.cmake
+++ lemon.cmake
@@ -4,7 +4,8 @@

 if (NOT lemon_NAME)

-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+# CMake 2.8.10 is required because we want to use ExternalProject_Add with a hg repo.
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)

 include (ExternalProject)
 include (ExternalSource)
@@ -14,17 +15,30 @@
 # From their issue tracker (#449), it looks like the next release (v1.3) will fix this.
 # For now, this means that we MUST use gcc for this package.
 # As soon as v1.3 is ready, we should try to upgrade.
-external_source (lemon
-    1.2.3
-    lemon-1.2.3.tar.gz
-    750251a77be450ddddedab14e5163afb
-    http://lemon.cs.elte.hu/pub/sources)
+
+#set (CMAKE_C_COMPILER /usr/bin/gcc)
+#set (CMAKE_CXX_COMPILER /usr/bin/g++)
+
+#external_source (lemon
+#    1.2.3
+#    lemon-1.2.3.tar.gz
+#    750251a77be450ddddedab14e5163afb
+#    http://lemon.cs.elte.hu/hg/lemon-main)
+
+message ("FIXME: Using a tag from the lemon mainline hg repo instead of a release.")
+message ("       The tests in this version don't pass.")
+message ("       As soon as lemon-1.3 is released, switch to it (and uncomment the test step)!")
+external_git_repo (lemon
+    473c71baff72
+    http://lemon.cs.elte.hu/hg/lemon-main)

 message ("Installing ${lemon_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${lemon_NAME}
     PREFIX              ${BUILDEM_DIR}
-    URL                 ${lemon_URL}
-    URL_MD5             ${lemon_MD5}
+    #URL                 ${lemon_URL}
+    #URL_MD5             ${lemon_MD5}
+    HG_REPOSITORY        ${lemon_URL}
+    HG_TAG               ${lemon_VERSION}
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ${BUILDEM_ENV_STRING} ${PATCH_EXE}
     	${lemon_SRC_DIR}/lemon/CMakeLists.txt ${PATCH_DIR}/lemon.patch
@@ -43,7 +57,9 @@

     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
-    TEST_COMMAND        ${BUILDEM_ENV_STRING} make check
+
+    # Sadly, the tests do not pass in this version that we are pulling.
+    #TEST_COMMAND        ${BUILDEM_ENV_STRING} make check
 )

 set_target_properties(${lemon_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)


- Last ditch effort to fix OpenSSL paths on Windows

--- cmake/Find_Windows/FindOpenSSL.cmake
+++ cmake/Find_Windows/FindOpenSSL.cmake
@@ -32,7 +32,8 @@
     ${OPENSSL_SEARCH_PATHS}
     )

-set ( OPENSSL_LIBRARIES "${SSL_LIBRARY_TMP};${SSL_CRYPTO_LIBRARY_TMP}" CACHE STRING "" )
+#set ( OPENSSL_LIBRARIES "${SSL_LIBRARY_TMP};${SSL_CRYPTO_LIBRARY_TMP}" CACHE STRING "" )
+set ( OPENSSL_LIBRARIES "C:/OpenSSL-Win64/lib/libssl.lib;C:/OpenSSL-Win64/lib/libcrypto.lib" CACHE STRING "" )
 set ( OPENSSL_INCLUDE_DIR "${SSL_INCLUDE_DIR_TMP}" CACHE PATH "" )

 INCLUDE(FindPackageHandleStandardArgs)
@@ -40,4 +41,5 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSSL
     REQUIRED_VARS
     OPENSSL_LIBRARIES
-    OPENSSL_INCLUDE_DIR)
+    OPENSSL_INCLUDE_DIR
+    )


Fix for ROOT-7862 - CMake Error: CMake can not determine linker language for target: g2root

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -96,7 +96,7 @@
 ROOT_BUILD_OPTION(explicitlink ON "Explicitly link with all dependent libraries")
 ROOT_BUILD_OPTION(fftw3 ON "Fast Fourier Transform support, requires libfftw3")
 ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio")
-ROOT_BUILD_OPTION(fortran ${fortran_defvalue} "Enable the Fortran components of ROOT")
+ROOT_BUILD_OPTION(fortran ON "Enable the Fortran components of ROOT")
 set(gcctoolchain "" CACHE PATH "Path for the gcctoolchain in case not the system gcc is used to build clang/LLVM")
 ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
 ROOT_BUILD_OPTION(gdml OFF "GDML writer and reader")


List build options in alphabetical order

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -67,29 +67,25 @@
 ROOT_BUILD_OPTION(astiff ON "Include tiff support in image processing")
 ROOT_BUILD_OPTION(bonjour ON "Bonjour support, requires libdns_sd and/or Avahi")
 ROOT_BUILD_OPTION(builtin_afterimage ON "Build included libAfterImage, or use system libAfterImage")
+ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build the FITSIO library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_davix OFF "Build the Davix library internally (downloading tarfile from the Web)")
 ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build the FFTW3 library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_freetype OFF "Build included libfreetype, or use system libfreetype")
 ROOT_BUILD_OPTION(builtin_ftgl ON "Build included libFTGL, or use system libftgl")
-ROOT_BUILD_OPTION(builtin_freetype OFF "Build included libfreetype, or use system libfreetype")
 ROOT_BUILD_OPTION(builtin_gl2ps OFF "Build included libgl2ps, or use system libgl2ps")
 ROOT_BUILD_OPTION(builtin_glew ON "Build included libGLEW, or use system libGLEW")
+ROOT_BUILD_OPTION(builtin_gsl OFF "Build the GSL library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_llvm ON "Build the LLVM internally")
+ROOT_BUILD_OPTION(builtin_lzma OFF "Build included liblzma, or use system liblzma")
 ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally, or use system OpenSSL")
 ROOT_BUILD_OPTION(builtin_pcre OFF "Build included libpcre, or use system libpcre")
+ROOT_BUILD_OPTION(builtin_tbb OFF "Build the TBB internally")
 ROOT_BUILD_OPTION(builtin_unuran OFF "Build included libunuran, or use system libunuran")
+ROOT_BUILD_OPTION(builtin_vc OFF "Build the Vc package internally")
+ROOT_BUILD_OPTION(builtin_vdt OFF "Build the VDT package internally")
+ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally")
+ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
 ROOT_BUILD_OPTION(builtin_zlib OFF "Build included libz, or use system libz")
-ROOT_BUILD_OPTION(builtin_lzma OFF "Build included liblzma, or use system liblzma")
-ROOT_BUILD_OPTION(builtin_davix OFF "Build the Davix library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_gsl OFF "Build the GSL library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build the FITSIO library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_llvm ON "Build the LLVM internally")
-ROOT_BUILD_OPTION(builtin_tbb OFF "Build the TBB internally")
-ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally")
-ROOT_BUILD_OPTION(builtin_vdt OFF "Build the VDT package internally")
-ROOT_BUILD_OPTION(builtin_vc OFF "Build the Vc package internally")
-ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
-ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
-ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
-ROOT_BUILD_OPTION(cxxmodules "Compile with C++ modules enabled." OFF)
 ROOT_BUILD_OPTION(castor ON "CASTOR support, requires libshift from CASTOR >= 1.5.2")
 if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
   ROOT_BUILD_OPTION(ccache ON "Enable ccache usage for speeding up builds")
@@ -100,6 +96,9 @@
 ROOT_BUILD_OPTION(cling ON "Enable new CLING C++ interpreter")
 ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
 ROOT_BUILD_OPTION(cuda OFF "Use CUDA if it is found in the system")
+ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
+ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
+ROOT_BUILD_OPTION(cxxmodules "Compile with C++ modules enabled." OFF)
 ROOT_BUILD_OPTION(davix ON "DavIx library for HTTP/WEBDAV access")
 ROOT_BUILD_OPTION(dcache ON "dCache support, requires libdcap from DESY")
 ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")
@@ -108,21 +107,22 @@
 ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio")
 ROOT_BUILD_OPTION(fortran ON "Enable the Fortran components of ROOT")
 set(gcctoolchain "" CACHE PATH "Path for the gcctoolchain in case not the system gcc is used to build clang/LLVM")
-ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
 ROOT_BUILD_OPTION(gdml OFF "GDML writer and reader")
+ROOT_BUILD_OPTION(genvector ON "Build the new libGenVector library")
 ROOT_BUILD_OPTION(geocad OFF "ROOT-CAD Interface")
-ROOT_BUILD_OPTION(genvector ON "Build the new libGenVector library")
 ROOT_BUILD_OPTION(gfal ON "GFAL support, requires libgfal")
 ROOT_BUILD_OPTION(glite ON "gLite support, requires libglite-api-wrapper v.3 from GSI (https://subversion.gsi.de/trac/dgrid/wiki)")
 ROOT_BUILD_OPTION(globus OFF "Globus authentication support, requires Globus toolkit")
 ROOT_BUILD_OPTION(gnuinstall OFF "Perform installation following the GNU guidelines")
 ROOT_BUILD_OPTION(gsl_shared OFF "Enable linking against shared libraries for GSL (default no)")
+ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
 ROOT_BUILD_OPTION(hdfs ON "HDFS support; requires libhdfs from HDFS >= 0.19.1")
 ROOT_BUILD_OPTION(http OFF "HTTP Server support")
 ROOT_BUILD_OPTION(imt ON "Implicit multi-threading support")
 ROOT_BUILD_OPTION(jemalloc OFF "Using the jemalloc allocator")
 ROOT_BUILD_OPTION(krb5 ON "Kerberos5 support, requires Kerberos libs")
 ROOT_BUILD_OPTION(ldap ON "LDAP support, requires (Open)LDAP libs")
+ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
 ROOT_BUILD_OPTION(macos_native OFF "Disable looking for libraries, includes and binaries in locations other than a native installation (MacOS only)")
 ROOT_BUILD_OPTION(mathmore ON "Build the new libMathMore extended math library, requires GSL (vers. >= 1.8)")
 ROOT_BUILD_OPTION(memstat ON "A memory statistics utility, helps to detect memory leaks")
@@ -141,12 +141,12 @@
 ROOT_BUILD_OPTION(python3 OFF "Python 3 ROOT bindings, requires python >= 3.1")
 ROOT_BUILD_OPTION(qt OFF "Qt graphics backend, requires libqt >= 4.8")
 ROOT_BUILD_OPTION(qtgsi OFF "GSI's Qt integration, requires libqt >= 4.8")
+ROOT_BUILD_OPTION(r OFF "R ROOT bindings, requires R, Rcpp and RInside")
+ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
 ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
 ROOT_BUILD_OPTION(root7 OFF "Build the ROOT 7 interface prototype, requires cxx14")
+ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
 ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
-ROOT_BUILD_OPTION(r OFF "R ROOT bindings, requires R, Rcpp and RInside")
-ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
-ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
 ROOT_BUILD_OPTION(sapdb ON "MaxDB/SapDB support, requires libsqlod and libsqlrte")
 ROOT_BUILD_OPTION(shadowpw ON "Shadow password support")
 ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible")
@@ -159,14 +159,14 @@
 ROOT_BUILD_OPTION(thread ON "Using thread library (cannot be disabled)")
 ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
 ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers")
+ROOT_BUILD_OPTION(vc OFF "Vc adds a few new types for portable and intuitive SIMD programming")
+ROOT_BUILD_OPTION(vdt OFF "VDT adds a set of fast and vectorisable mathematical functions")
 ROOT_BUILD_OPTION(veccore OFF "VecCore SIMD abstraction library")
 ROOT_BUILD_OPTION(vecgeom OFF "VecGeom is a vectorized geometry library enhancing the performance of geometry navigation.")
-ROOT_BUILD_OPTION(vc OFF "Vc adds a few new types for portable and intuitive SIMD programming")
-ROOT_BUILD_OPTION(vdt OFF "VDT adds a set of fast and vectorisable mathematical functions")
 ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
+ROOT_BUILD_OPTION(x11 ON "X11 support")
 ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
 ROOT_BUILD_OPTION(xml ON "XML parser interface")
-ROOT_BUILD_OPTION(x11 ON "X11 support")
 ROOT_BUILD_OPTION(xrootd ON "Build xrootd file server and its client (if supported)")

 option(fail-on-missing "Fail the configure step if a required external package is missing" OFF)
@@ -221,9 +221,9 @@
   set(builtin_xrootd_defvalue ON)
   set(builtin_llvm_defvalue ON)
   set(builtin_tbb_defvalue ON)
+  set(builtin_vc_defvalue ON)
+  set(builtin_vdt_defvalue ON)
   set(builtin_veccore_defvalue ON)
-  set(builtin_vdt_defvalue ON)
-  set(builtin_vc_defvalue ON)
 endif()

 #---VC does not support yet Arm and PPC processors----------------------------------------------


Removed disabling 'davix' on MacOS by default.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -178,7 +178,6 @@
 elseif(APPLE)
   set(x11_defvalue OFF)
   set(cocoa_defvalue ON)
-  set(davix_defvalue OFF)
 endif()

 #--- The 'all' option swithes ON major options---------------------------------------------------


*sigh*

*sigh*

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30874 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -261,7 +261,7 @@
   STRING(REGEX REPLACE " " "-" _compiler_id ${_compiler_id})
   IF( NOT "${_compiler_id}" STREQUAL "" OR
       _compiler_id MATCHES "CMAKE_CXX_COMPILER" )
-    SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_compiler_id}")
+    SET(CTEST_BUILD_NAME "${_compiler_id}")
   ENDIF()
 ENDIF()

@@ -288,7 +288,8 @@

 IF(NOT "${CONFIG_FILE}" STREQUAL "")
   GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE)
-  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${conf}")
+  STRING(REGEX REPLACE "#.*$" "" _conf ${_conf})
+  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_conf}")
 ENDIF()

 MESSAGE("-- CTEST_BUILD_NAME:       ${CTEST_BUILD_NAME}")


iox-#1308 Set SOVERSION for shared libraries

Setting the SOVERSION to a major project version
will prevent that libraries from different
major releases will try link against each other

Signed-off-by: Dietrich Krönke <ea45bc0219d3b6c3a6b9cf3abdfa172e6bfa16ff@apex.ai>

--- iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
+++ iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
@@ -317,6 +317,7 @@
     set_target_properties(${IOX_TARGET} PROPERTIES
         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
         VERSION ${PROJECT_VERSION}
+        SOVERSION ${PROJECT_VERSION_MAJOR}
     )

     set_target_properties( ${IOX_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON )


use binary directory for executable

use binary directory for executable

--- cmake/Sign.cmake
+++ cmake/Sign.cmake
@@ -5,7 +5,7 @@
 endif()

 set(_SIGNATURE_NAME ${REPO_NAME}-${APP_NAME}-${VERSION_SHORT})
-set(_SIGNATURE_EXE_RAW ${CMAKE_CURRENT_SOURCE_DIR}/${APP_NAME})
+set(_SIGNATURE_EXE_RAW ${CMAKE_BINARY_DIR}/${APP_NAME})
 set(SIGNATURE_EXE ${CMAKE_BINARY_DIR}/${_SIGNATURE_NAME})
 set(SIGNATURE_SIG ${CMAKE_BINARY_DIR}/${_SIGNATURE_NAME}.sig)
 get_filename_component(_SIGNATURE_KEY_PATH ${SIGNATURE_KEY} ABSOLUTE)


COMP: Ensure FindDCMTK module works with and without DCMTKConfig.cmake file

In the case the provided DCMTK build or install tree doesn't have a
DCMTKConfig.cmake file, the first call to "find_package" should fail
quietly so that it doesn't prevent the rest of discovery process from working
as expected.

Adapted from commontk/CTK@74b4b07b

Change-Id: I2edb9f8becf46aa208f56a909bc1ba84052db374

--- Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
+++ Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
@@ -34,28 +34,24 @@
 # Modified for EasyViz by Thomas Sondergaard.
 #

+set(_SAVED_DCMTK_DIR ${DCMTK_DIR})
+
 #
 # First, try to use NO_MODULE
-set(_DCMTK_REQUIRED)
-set(_DCMTK_QUIET)
-if(DCMTK_FIND_QUIETLY)
-  set(_DCMTK_QUIET QUIET)
-endif()
-if(DCMTK_FIND_REQUIRED)
-  set(_DCMTK_REQUIRED REQUIRED)
-endif()
-find_package(DCMTK ${_DCMTK_REQUIRED} ${_DCMTK_QUIET} NO_MODULE)
+find_package(DCMTK QUIET NO_MODULE)
 if(DCMTK_FOUND
-    AND NOT "SHRDLU" STREQUAL "SHRDLU${DCMTK_LIBRARIES}"
-    AND NOT "SHRDLU" STREQUAL "SHRDLU${DCMTK_INCLUDE_DIRS}")
+    AND NOT "x" STREQUAL "x${DCMTK_LIBRARIES}"
+    AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}")
   return()
 endif()
+
+# Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
+set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH "The directory containing a CMake configuration file for DCMTK." FORCE)

 # prefer DCMTK_DIR over default system paths like /usr/lib
 if(DCMTK_DIR)
   set(CMAKE_PREFIX_PATH ${DCMTK_DIR}/lib ${CMAKE_PREFIX_PATH}) # this is given to FIND_LIBRARY or FIND_PATH
 endif()
-

 # Find all libraries, store debug and release separately
 foreach(lib
@@ -101,6 +97,7 @@
     ${DCMTK_DIR}/dcmjpeg/lib${lib}/Debug
     NO_DEFAULT_PATH
     )
+
   mark_as_advanced(DCMTK_${lib}_LIBRARY_RELEASE)
   mark_as_advanced(DCMTK_${lib}_LIBRARY_DEBUG)

@@ -188,7 +185,6 @@
     ${DCMTK_DIR}/include/${dir}
     ${SOURCE_DIR_PATH}
     )
-
   mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR)
   list(APPEND DCMTK_INCLUDE_DIR_NAMES DCMTK_${dir}_INCLUDE_DIR)

@@ -225,4 +221,4 @@

 find_package_handle_standard_args(DCMTK
   REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
-  FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure" )
+  FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")


checking errors (#338)

checking errors (#338)

--- cmake/ClientMatrices.cmake
+++ cmake/ClientMatrices.cmake
@@ -146,11 +146,21 @@
     endif()

     execute_process(COMMAND tar xf ${mat}.tar.gz
+      RESULT_VARIABLE STATUS
       WORKING_DIRECTORY ${CMAKE_MATRICES_DIR})
+    if(STATUS AND NOT STATUS EQUAL 0)
+      message(FATAL_ERROR "uncompressing failed, aborting.")
+    endif()

     file(RENAME ${CMAKE_MATRICES_DIR}/${mat}/${mat}.mtx ${CMAKE_MATRICES_DIR}/${mat}.mtx)
     execute_process(COMMAND ${PROJECT_BINARY_DIR}/mtx2csr.exe ${mat}.mtx ${mat}.csr
+      RESULT_VARIABLE STATUS
       WORKING_DIRECTORY ${CMAKE_MATRICES_DIR})
+    if(STATUS AND NOT STATUS EQUAL 0)
+      message(FATAL_ERROR "mxt2csr.exe failed, aborting.")
+    else()
+      message(STATUS "${mat} success.")
+    endif()
     # TODO: add 'COMMAND_ERROR_IS_FATAL ANY' once cmake supported version is 3.19
     file(REMOVE_RECURSE ${CMAKE_MATRICES_DIR}/${mat}.tar.gz ${CMAKE_MATRICES_DIR}/${mat} ${CMAKE_MATRICES_DIR}/${mat}.mtx)


Cleanup output dir on reconfigure

Cleanup output dir on reconfigure

Avoids stalled header files staying around for too long.

--- cmake/Modules/UseODB.cmake
+++ cmake/Modules/UseODB.cmake
@@ -110,6 +110,7 @@
 		list(APPEND ODB_ARGS "-I${dir}")
 	endforeach()

+	file(REMOVE_RECURSE "${ODB_COMPILE_OUTPUT_DIR}")
 	file(MAKE_DIRECTORY "${ODB_COMPILE_OUTPUT_DIR}")

 	foreach(input ${PARAM_FILES})


CMake: Set treat error as errors as off by default

--- cmake/compileoptions.cmake
+++ cmake/compileoptions.cmake
@@ -31,7 +31,7 @@
 # Specify standard compile options
 # ivw_define_standard_properties(target1 [target2 ...])

-option(IVW_TREAT_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" ON)
+option(IVW_TREAT_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)

 function(ivw_define_standard_properties)
     foreach(target ${ARGN})


CMake: add ASAN build type (WIP)

CMake: add ASAN build type (WIP)

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -47,6 +47,18 @@
     CMAKE_EXE_LINKER_FLAGS_COVERAGE
     CMAKE_SHARED_LINKER_FLAGS_COVERAGE )

+SET(CMAKE_CXX_FLAGS_ASAN
+    "-fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE -fsanitize=address -fstack-protector-strong"
+    CACHE STRING "Flags used by the C++ compiler during ASAN builds."
+    FORCE )
+SET(CMAKE_C_FLAGS_ASAN
+    "-fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE -fsanitize=address -fstack-protector-strong"
+    CACHE STRING "Flags used by the C compiler during ASAN builds."
+    FORCE )
+MARK_AS_ADVANCED(
+    CMAKE_CXX_FLAGS_ASAN
+    CMAKE_C_FLAGS_ASAN )
+
 set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2")
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2")


use numgrid v1.0.2

use numgrid v1.0.2

--- cmake/custom/numgrid.cmake
+++ cmake/custom/numgrid.cmake
@@ -4,7 +4,7 @@
   numgrid
   PREFIX "${PROJECT_BINARY_DIR}/numgrid"
   GIT_REPOSITORY https://github.com/dftlibs/numgrid.git
-  GIT_TAG e4d16a3d8dc02541520c5975334567344d394916
+  GIT_TAG v1.0.2
   INSTALL_COMMAND true  # currently no install command
   CMAKE_ARGS
     -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}


Corrects test binary paths in the CMake build script.

git-svn-id: 2c9a99be47d0e569b9832cc4192b2d4c0ac487c7@436 861a406c-534a-0410-8894-cb66d6ee9925

--- cmake/internal_utils.cmake
+++ cmake/internal_utils.cmake
@@ -184,7 +184,7 @@
     # only at ctest runtime (by calling ctest -c <Configuration>), so
     # we have to escape $ to delay variable substitution here.
     add_test(${name}
-      ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/${name}.py
-          --build_dir=${CMAKE_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
+      ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+          --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
   endif()
 endfunction()


Fix: Boost filesystem v3 are supported starting 1.44 only

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -4,7 +4,7 @@
     set(Boost_USE_STATIC_LIBS ON)
 endif(NOT PCL_SHARED_LIBS)

-find_package(Boost 1.36.0 COMPONENTS system filesystem thread)
+find_package(Boost 1.44.0 COMPONENTS system filesystem thread)
 # TODO: What should the minimum version number be?
 include_directories(${Boost_INCLUDE_DIRS})
 link_directories(${Boost_LIBRARY_DIRS})


target: warn if a submodule is not found

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -66,6 +66,9 @@

   foreach(submodule ${ARG_SUBMODULE})
     string(TOUPPER "${submodule}" _upper_submodule)
+    if (NOT DEFINED "SUBMODULE_${_upper_submodule}_SRC")
+      qi_error("Submodule ${submodule} not defined")
+    endif()
     set(ARG_SRC     ${ARG_SRC}     ${SUBMODULE_${_upper_submodule}_SRC})
     set(ARG_DEPENDS ${ARG_DEPENDS} ${SUBMODULE_${_upper_submodule}_DEPENDS})
   endforeach()
@@ -162,6 +165,9 @@

   foreach(submodule ${ARG_SUBMODULE})
     string(TOUPPER "${submodule}" _upper_submodule)
+    if (NOT DEFINED "SUBMODULE_${_upper_submodule}_SRC")
+      qi_error("Submodule ${submodule} not defined")
+    endif()
     set(ARG_SRC     ${ARG_SRC}     ${SUBMODULE_${_upper_submodule}_SRC})
     set(ARG_DEPENDS ${ARG_DEPENDS} ${SUBMODULE_${_upper_submodule}_DEPENDS})
   endforeach()


Bump the default C++ mode to 14 (#1362)

Bump the default C++ mode to 14 (#1362)

This leaves the minimum C++ at 11, but bumps the default (if not set by
the user via CMAKE_CXX_STANDARD) from 11 to 14.

This is meant to start identifying any problems people have switching
to 14. We anticipate a hard switch to 14 minimum before the next OSL
major release. This change is in master only (i.e. future OSL), we would
never change minimum or default C++ standard in the supported release
branches (currently OSL 1.11.x).

Signed-off-by: Larry Gritz <f0a1ce6f80112d72f7276457fd261d671b827567@larrygritz.com>

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -27,7 +27,7 @@
 ###########################################################################
 # C++ language standard
 #
-set (CMAKE_CXX_STANDARD 11 CACHE STRING
+set (CMAKE_CXX_STANDARD 14 CACHE STRING
      "C++ standard to prefer (11, 14, 17, 20, etc.)")
 set (CMAKE_CXX_STANDARD_REQUIRED ON)
 set (CMAKE_CXX_EXTENSIONS OFF)


Really remove the svn:executable property from Source/WebCore/UseV8.cmake

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@131738 bbb929c8-8fbe-4397-9dbb-9b2b20218538


Check presence of gawk

Check presence of gawk

--- build/TestPcapCompare.cmake
+++ build/TestPcapCompare.cmake
@@ -17,6 +17,11 @@
 	message(FATAL_ERROR "Cannot find tshark command")
 endif(NOT TSHARK_COMMAND)

+#find_program(GAWK_COMMAND gawk)
+#if (NOT GAWK_COMMAND)
+#	message(FATAL_ERROR "Cannot find gawk command")
+#endif(NOT GAWK_COMMAND)
+
 macro(TEST_PCAP_COMPARE module name)
 	add_test(NAME ${module}-${name}-pcap-compare
 		COMMAND ${CMAKE_COMMAND}


setting product and upgrade GUI for WiX

setting product and upgrade GUI for WiX

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -171,6 +171,8 @@
     SET(CPACK_GENERATOR WIX)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}")
     SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree v${EMBREE_VERSION} ${ARCH}")
+	SET(CPACK_WIX_PRODUCT_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_NUMBER}")
+	SET(CPACK_WIX_UPGRADE_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_MAJOR}0000") # upgrade as long as major version is the same
     IF (EMBREE_TESTING_PACKAGE)
       ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_win.bat ${CPACK_PACKAGE_FILE_NAME}.exe ${CMAKE_BUILD_TYPE})
     ENDIF()


Some work towards dropping the Windows 32-bit and Linux 32-bit versions of OpenCOR (#843).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -290,18 +290,18 @@
         SET(PLATFORM_DIR linux)
     ENDIF()

-    SET(BUILD_TYPE_DIR .)
-
     IF(WIN32)
         IF(RELEASE_MODE)
-            SET(BUILD_TYPE_DIR release)
-        ELSE()
-            SET(BUILD_TYPE_DIR debug)
-        ENDIF()
-    ENDIF()
-
-    SET(REMOTE_EXTERNAL_BINARIES_DIR ${PLATFORM_DIR}/${BUILD_TYPE_DIR})
-    SET(LOCAL_EXTERNAL_BINARIES_DIR bin/${BUILD_TYPE_DIR})
+            SET(REMOTE_EXTERNAL_BINARIES_DIR ${PLATFORM_DIR}/release)
+            SET(LOCAL_EXTERNAL_BINARIES_DIR bin/release)
+        ELSE()
+            SET(REMOTE_EXTERNAL_BINARIES_DIR ${PLATFORM_DIR}/debug)
+            SET(LOCAL_EXTERNAL_BINARIES_DIR bin/debug)
+        ENDIF()
+    ELSE()
+        SET(REMOTE_EXTERNAL_BINARIES_DIR ${PLATFORM_DIR})
+        SET(LOCAL_EXTERNAL_BINARIES_DIR bin)
+    ENDIF()

     # Set the RPATH information on Linux and OS X

@@ -1165,8 +1165,7 @@
 MACRO(RETRIEVE_BINARY_FILE DIRNAME FILENAME SHA1_VALUE)
     # Create the destination folder, if needed

-    SET(REAL_DIRNAME ${CMAKE_SOURCE_DIR}/${DIRNAME})
-    STRING(REPLACE "${PLATFORM_DIR}" "bin" REAL_DIRNAME "${REAL_DIRNAME}")
+    STRING(REPLACE "${PLATFORM_DIR}" "bin" REAL_DIRNAME "${CMAKE_SOURCE_DIR}/${DIRNAME}")

     IF(NOT EXISTS ${REAL_DIRNAME})
         FILE(MAKE_DIRECTORY ${REAL_DIRNAME})


Can now once again run OpenCOR from Qt Creator on Windows [ci skip]. Indeed, now that we are using QCoreApplication::setLibraryPaths(), we need to provide the debug version of the Qt plugins (when building in debug mode of course, otherwise we need the release version of those files).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -828,13 +828,18 @@

         SET(PLUGIN_ORIG_DIRNAME ${QT_PLUGINS_DIR}/${PLUGIN_CATEGORY})
         SET(PLUGIN_DEST_DIRNAME plugins/${PLUGIN_CATEGORY})
-        SET(PLUGIN_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-        COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${PLUGIN_ORIG_DIRNAME} ${PLUGIN_DEST_DIRNAME} ${PLUGIN_FILENAME})
+        SET(PLUGIN_RELEASE_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+        SET(PLUGIN_DEBUG_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}d${CMAKE_SHARED_LIBRARY_SUFFIX})
+
+        IF(RELEASE_MODE)
+            COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${PLUGIN_ORIG_DIRNAME} ${PLUGIN_DEST_DIRNAME} ${PLUGIN_RELEASE_FILENAME})
+        ELSE()
+            COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${PLUGIN_ORIG_DIRNAME} ${PLUGIN_DEST_DIRNAME} ${PLUGIN_DEBUG_FILENAME})
+        ENDIF()

         # Deploy the Qt plugin

-        INSTALL(FILES ${PLUGIN_ORIG_DIRNAME}/${PLUGIN_FILENAME}
+        INSTALL(FILES ${PLUGIN_ORIG_DIRNAME}/${PLUGIN_RELEASE_FILENAME}
                 DESTINATION ${PLUGIN_DEST_DIRNAME})
     ENDFOREACH()
 ENDMACRO()


Document config.cmake

Document config.cmake

Add documentation to config.cmake in line with the documentation in the
other recently added utility files. Also, refactor MATLAB logic to be
slightly more streamlined.

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -2,6 +2,14 @@
 #       drake superbuild and drake proper. Keep logic that should only be in
 #       one or the other in separate functions.

+#------------------------------------------------------------------------------
+# Check compiler version.
+#
+# Arguments:
+#   <NAME> - Name of compiler to display in error message.
+#   <VERSION> - Required compiler version.
+#   [<DISPLAY_VERSION>]
+#       Version string to display in error message (defaults to `<VERSION>`).
 #------------------------------------------------------------------------------
 function(drake_check_compiler NAME VERSION)
   if(DEFINED ARGV2)
@@ -15,12 +23,22 @@
 endfunction()

 #------------------------------------------------------------------------------
-function(drake_get_matlab_jvm_version)
-  # Find matlab; this does not use find_package(Matlab) because we only want
-  # to enable matlab support if the matlab executable is in the user's PATH
+# Find MATLAB.
+#------------------------------------------------------------------------------
+function(drake_setup_matlab)
+  # Look for the MATLAB executable. This does not use find_package(Matlab)
+  # because that is "really good at finding MATLAB", and we only want to enable
+  # matlab support if the matlab executable is in the user's PATH.
   find_program(MATLAB_EXECUTABLE matlab)

-  if(MATLAB_EXECUTABLE AND NOT MATLAB_JVM_VERSION)
+  # TODO find_package(Matlab) and ensure no conflicts with mex_setup
+endfunction()
+
+#------------------------------------------------------------------------------
+# Determine the version of MATLAB's JVM and set Java build flags to match.
+#------------------------------------------------------------------------------
+function(drake_setup_java_for_matlab)
+  if(NOT MATLAB_JVM_VERSION)
     # Set arguments for running matlab
     set(_args -nodesktop -nodisplay -nosplash)
     if(WIN32)
@@ -61,6 +79,8 @@
 endfunction()

 #------------------------------------------------------------------------------
+# Verify minimum required compiler version and set compile options.
+#------------------------------------------------------------------------------
 macro(drake_setup_compiler)
   # Check minimum compiler requirements
   if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
@@ -79,6 +99,8 @@
 endmacro()

 #------------------------------------------------------------------------------
+# Find and set up Java, and import utilities for using it.
+#------------------------------------------------------------------------------
 macro(drake_setup_java)
   # Require Java at the super-build level since libbot cannot configure without
   # finding Java
@@ -88,14 +110,17 @@
   # If matlab is in use, try to determine its JVM version, as we need to build
   # all externals to the same version (on success, this will set the Java
   # compile flags)
-  if(NOT DISABLE_MATLAB)
-    drake_get_matlab_jvm_version()
+  if(MATLAB_EXECUTABLE AND NOT DISABLE_MATLAB)
+    drake_setup_java_for_matlab()
   endif()
 endmacro()

 #------------------------------------------------------------------------------
+# Set up basic platform properties for building Drake.
+#------------------------------------------------------------------------------
 macro(drake_setup_platform)
   drake_setup_compiler()
+  drake_setup_matlab()
   drake_setup_java()

   # Choose your python (major) version
@@ -110,6 +135,8 @@
 endmacro()

 #------------------------------------------------------------------------------
+# Set up properties for the Drake superbuild.
+#------------------------------------------------------------------------------
 macro(drake_setup_superbuild)
   # Set default install prefix
   if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)


Remove unused .cmake file

Remove unused .cmake file

Swift SVN r21665

--- cmake/macosx.cmake
+++ cmake/macosx.cmake
@@ -1,18 +0,0 @@
-# Minimal CMake toolchain file for OS X builds.
-include(CMakeForceCompiler)
-
-set(CMAKE_SYSTEM_NAME Darwin)
-
-execute_process(COMMAND xcrun -sdk macosx -toolchain XcodeDefault -find clang
-                OUTPUT_VARIABLE cc_path
-                OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND xcrun -sdk macosx -toolchain XcodeDefault -find clang++
-                OUTPUT_VARIABLE cxx_path
-                OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-CMAKE_FORCE_C_COMPILER("${cc_path}" Clang)
-CMAKE_FORCE_CXX_COMPILER("${cxx_path}" Clang)
-
-# Compiler forcing leaves the compiler version unset, which the llvm
-# build machinery doesn't like. Pacify it.
-set(LLVM_FORCE_USE_OLD_TOOLCHAIN ON)


require ICC when trying to compile KNL code

--- cmake/ospray.cmake
+++ cmake/ospray.cmake
@@ -48,7 +48,9 @@

 ## Macro check for compiler support of ISA ##
 MACRO(OSPRAY_CHECK_COMPILER_SUPPORT ISA)
-  IF (OSPRAY_EMBREE_ENABLE_${ISA} AND NOT OSPRAY_COMPILER_SUPPORTS_${ISA})
+  IF (${ISA} STREQUAL "AVX512" AND NOT OSPRAY)
+    OSPRAY_WARN_ONCE(MISSING_AVX512 "OSPRay Currently requires ICC for KNL support. Disabling KNL ISA target.")
+  ELSEIF (OSPRAY_EMBREE_ENABLE_${ISA} AND NOT OSPRAY_COMPILER_SUPPORTS_${ISA})
     OSPRAY_WARN_ONCE(MISSING_${ISA} "Need at least version ${GCC_VERSION_REQUIRED_${ISA}} of gcc for ${ISA}. Disabling ${ISA}.\nTo compile for ${ISA}, please switch to either 'ICC'-compiler, or upgrade your gcc version.")
     SET(OSPRAY_EMBREE_ENABLE_${ISA} false)
   ENDIF()
@@ -56,6 +58,8 @@

 ## Macro configure ISA targets for ispc ##
 MACRO(OSPRAY_CONFIGURE_ISPC_ISA)
+
+  OSPRAY_CONFIGURE_COMPILER()

   SET(OSPRAY_EMBREE_ENABLE_SSE    true)
   SET(OSPRAY_EMBREE_ENABLE_AVX    true)
@@ -90,11 +94,6 @@
   UNSET(OSPRAY_ISPC_TARGET_LIST)

   IF (OSPRAY_BUILD_ISA STREQUAL "ALL")
-    # ------------------------------------------------------------------
-    # in 'all' mode, we have a list of multiple targets for ispc,
-    # and enable all targets for embree (we may still disable some
-    # below if the compiler doesn't support them
-    # ------------------------------------------------------------------
     IF(OSPRAY_EMBREE_ENABLE_SSE)
       SET(OSPRAY_ISPC_TARGET_LIST ${OSPRAY_ISPC_TARGET_LIST} sse4)
     ENDIF()
@@ -385,7 +384,7 @@
 ## Compiler configuration macro ##

 MACRO(OSPRAY_CONFIGURE_COMPILER)
-  # enable ability for users to force a compiler using the pre-0.8.3 method
+  # enable ability for users to force a compiler using the pre-0.8.3 method (doesn't work right now!)
   SET(OSPRAY_COMPILER "" CACHE STRING "Force compiler: GCC, ICC, CLANG")
   SET_PROPERTY(CACHE OSPRAY_COMPILER PROPERTY STRINGS GCC ICC CLANG)
   MARK_AS_ADVANCED(OSPRAY_COMPILER)


Restore -msse3

Restore -msse3

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -69,6 +69,9 @@
     elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
     endif()
+  endif()
+  if (DEFINED HAVE_SSE3)
+    set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
   endif()
 endif()


Squashed '3rdparty/github/cmake-utils-remote/' changes from 09fb2f1..8923133

8923133 Install of export file bis

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 89231332a81d1e2fcbc01a191fedeb25d24c80dc

--- cmake/MyPackageExport.cmake
+++ cmake/MyPackageExport.cmake
@@ -11,6 +11,6 @@
     STATIC_DEFINE ${PROJECT_NAME}_STATIC)
   ADD_CUSTOM_TARGET(${PROJECT_NAME}Export SOURCES "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
   INSTALL(FILES ${_file} DESTINATION ${_dir})
-  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION ${PROJECT_NAME})
+  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION include/${PROJECT_NAME}/)

 ENDMACRO()


Mark the libs component required

Mark the libs component required

Everything else depends on it, after all.

(cherry picked from commit cf54e3b97ea13c0aeef5e94b5330a4b26a601d81)

Conflicts:
	cmake/OpenCVPackaging.cmake

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -68,6 +68,7 @@

 #depencencies
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
+set(CPACK_COMPONENT_LIBS_REQUIRED TRUE)
 set(CPACK_COMPONENT_SAMPLES_DEPENDS libs)
 set(CPACK_COMPONENT_DEV_DEPENDS libs)
 set(CPACK_COMPONENT_DOCS_DEPENDS libs)


AddLLVM: squelch CMP0007 by not adding empty elements to list

When configuring various llvm projects that use AddLLVM.cmake, this warning is
emitted many times, flooding the screen:

Policy CMP0007 is not set: list command no longer ignores empty elements.

The fix is removing an extra semicolon.

Differential Revision: http://reviews.llvm.org/D14339

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@252628 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -193,7 +193,7 @@
 # Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more,
 # or a certain builder, for eaxample, msbuild.exe, would be confused.
 function(set_output_directory target)
-  cmake_parse_arguments(ARG "" "BINARY_DIR;LIBRARY_DIR;" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "BINARY_DIR;LIBRARY_DIR" "" ${ARGN})

   # module_dir -- corresponding to LIBRARY_OUTPUT_DIRECTORY.
   # It affects output of add_library(MODULE).
@@ -1095,7 +1095,7 @@
       break()
     endif()
   endforeach()
-
+
   if(ARG_ALWAYS_GENERATE)
     set(component ${dest})
   else()
@@ -1159,4 +1159,3 @@
     endif()
   endif()
 endfunction()
-


Add ENABLE_gnome2 and ENABLE_pygcw information to summary.

svn path=/trunk/; revision=7404

--- cmake/modules/summary.cmake
+++ cmake/modules/summary.cmake
@@ -103,6 +103,7 @@
 ENABLE_tcl:		${ENABLE_tcl}		ENABLE_itcl:		${ENABLE_itcl}
 ENABLE_tk:		${ENABLE_tk}		ENABLE_itk:		${ENABLE_itk}
 ENABLE_pdl:		${ENABLE_pdl}		ENABLE_wxwidgets:	${ENABLE_wxwidgets}
+ENABLE_gnome2:		${ENABLE_gnome2}		ENABLE_pygcw:		${ENABLE_pygcw}
 ")
 message("${_output_results}")
 endmacro(summary)


updating FindEigen2.cmake for proper search order

--- bench/btl/cmake/FindEigen2.cmake
+++ bench/btl/cmake/FindEigen2.cmake
@@ -16,10 +16,10 @@
 else (EIGEN2_INCLUDE_DIR)

 find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
-     PATHS
+     PATH_SUFFIXES eigen2
+     HINTS
      ${INCLUDE_INSTALL_DIR}
      ${KDE4_INCLUDE_DIR}
-     PATH_SUFFIXES eigen2
    )

 include(FindPackageHandleStandardArgs)


Bump verison number again

Bump verison number again

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapSerial_VERSION 0.2.2)
+set(LeapSerial_VERSION 0.3.0)


Split off 7.6.8

Split off 7.6.8

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

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


Nagios Monitoring 8.2.0-rc1 Release Candidate 1

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

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


Split off 8.0.20

Split off 8.0.20

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

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


[control] removing for a while missing test file

--- control/control_tests.cmake
+++ control/control_tests.cmake
@@ -18,7 +18,7 @@
   NEW_TEST(tests)

   IF(WITH_FORTRAN)
-     NEW_TEST(PIDTest.cpp SMCTest.cpp ObserverTest.cpp TwistingTest.cpp)
+     NEW_TEST(PIDTest.cpp SMCTest.cpp ObserverTest.cpp )
   ENDIF(WITH_FORTRAN)

   END_TEST()


remove pre-Fuerte behavior

remove pre-Fuerte behavior

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -267,25 +267,11 @@
   rosbuild_invoke_rospack("" rostest path find rostest)

   # Create target for this test.
-  # First check version on ros_comm to see whether we can give
-  # roslaunch-check.py an output file name (first appears in 1.6.3/1.7.0)
-  # Related to #3674.
-  rosbuild_get_stack_version(ros_comm_version "ros_comm")
-  if(ros_comm_version VERSION_LESS "1.6.3")
-    add_custom_target(${targetname}
-                      COMMAND ${rostest_path}/scripts/roslaunch-check.py ${file} ${ARGN}
-                      DEPENDS ${file}
-                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                      VERBATIM)
-  else()
-    # It's the newer roslaunch-check.py, so we can pass the full path to
-    # the test result file.
-    add_custom_target(${targetname}
-                      COMMAND ${rostest_path}/scripts/roslaunch-check.py -o ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${targetname}.xml ${file} ${ARGN}
-                      DEPENDS ${file}
-                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                      VERBATIM)
-  endif()
+  add_custom_target(${targetname}
+                    COMMAND ${rostest_path}/scripts/roslaunch-check.py -o ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${targetname}.xml ${file} ${ARGN}
+                    DEPENDS ${file}
+                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+                    VERBATIM)

   # Make sure all test programs are built before running this test
   # but not if rosbuild_test_nobuild is set, #3008


Add missing dcmpmap to FindDCMTK include path

--- CMake/FindDCMTK.cmake
+++ CMake/FindDCMTK.cmake
@@ -264,6 +264,7 @@
     dcmsign
     dcmsr
     dcmtls
+    dcmpmap
     ofstd
     oflog)
   if(EXTDCMTK_SOURCE_DIR)


Add more information when rosboost-cfg --libs fails

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -765,7 +765,7 @@
                   OUTPUT_STRIP_TRAILING_WHITESPACE)

   if (_boostcfg_failed)
-    message(FATAL_ERROR "rosboost-cfg --libs failed")
+    message(FATAL_ERROR "[rosboost-cfg --libs ${_libs}] failed with output: ${BOOST_LIBS}")
   endif(_boostcfg_failed)

   separate_arguments(BOOST_LIBS)


ilastik-gui: Make sure all ilastik dependencies are installed before running the gui test.

--- ilastik-gui.cmake
+++ ilastik-gui.cmake
@@ -24,11 +24,11 @@
 set (ilastik-gui_NAME ilastik-gui-HEAD)

 # Add a few dependencies to GUI ilastik build
+add_dependencies( ${ilastik_NAME} ${qt4_NAME} ${pyqt4_NAME} ${qimage2ndarray_NAME} ) #${vtk_NAME})
+
 add_custom_target (${ilastik-gui_NAME} ALL
-    DEPENDS     ${ilastik_NAME} ${qt4_NAME} ${pyqt4_NAME} ${qimage2ndarray_NAME}
-                #${vtk_NAME}
+    DEPENDS     ${ilastik_NAME}
     COMMENT     "Building ilastik gui and all dependencies...")
-

 # Add environment setting script
 ExternalProject_add_step(${ilastik_NAME}  install_gui_env_script
@@ -68,7 +68,7 @@
 )

 # Run the gui test script
-ExternalProject_add_step(${ilastik_NAME}  test_ilastik_gui
+ExternalProject_add_step(${ilastik_NAME} test_ilastik_gui
     DEPENDEES   install_gui_test
     COMMAND     ${FLYEM_ENV_STRING} ${FLYEM_BUILD_DIR}/bin/ilastik_gui_test
     COMMENT     "Ran ilastik gui test"


Use cppcheck only if found wrt requested version

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -28,11 +28,11 @@

 include(CMakeParseArguments)

-if(NOT CPPCHECK_EXECUTABLE)
+if(NOT CPPCHECK_FOUND)
   find_package(cppcheck 1.66 QUIET)
 endif()

-if(NOT CPPCHECK_EXECUTABLE)
+if(NOT CPPCHECK_FOUND)
   add_custom_target(${PROJECT_NAME}-cppcheck
     COMMENT "cppcheck executable not found")
   set_target_properties(${PROJECT_NAME}-cppcheck PROPERTIES
@@ -46,7 +46,7 @@
 endif()

 function(add_cppcheck _name _files)
-  if(NOT CPPCHECK_EXECUTABLE)
+  if(NOT CPPCHECK_FOUND)
     return()
   endif()


COMP: Correctly consider current option value.

--- CMake/mitkFunctionAddExternalProject.cmake
+++ CMake/mitkFunctionAddExternalProject.cmake
@@ -49,8 +49,10 @@

   set(_use_var "MITK_USE_${EP_NAME}")
   set(_on 0)
-  if(EP_ON OR ${_use_var})
-    set(_on 1)
+  if(DEFINED ${_use_var})
+    set(_on ${${_use_var}})
+  else()
+    set(_on ${EP_ON})
   endif()

   if(_on AND EP_DEPENDS)


ENH: mark_as_advanced gdal version cmake variables

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -70,6 +70,10 @@
   SET(GDAL_VERSION_MAJOR_STRING "${GDAL_VERSION_MAJOR}" CACHE STRING "Major Version Number of GDAL package found")
   SET(GDAL_VERSION_MINOR_STRING "${GDAL_VERSION_MINOR}" CACHE STRING "Minor Version Number of GDAL package found")
   SET(GDAL_VERSION_PATCH_STRING "${GDAL_VERSION_PATCH}" CACHE STRING "Patch Version Number of GDAL package found")
+  MARK_AS_ADVANCED(GDAL_VERSION_MAJOR_STRING)
+  MARK_AS_ADVANCED(GDAL_VERSION_MINOR_STRING)
+  MARK_AS_ADVANCED(GDAL_VERSION_PATCH_STRING)
+
   MATH(EXPR GDAL_NUM_VERSION "((${GDAL_VERSION_MAJOR})*100+${GDAL_VERSION_MINOR})*100+${GDAL_VERSION_PATCH}")
   # MESSAGE(STATUS "GDAL Num version: ${GDAL_NUM_VERSION}")
   # ADD_DEFINITIONS(-DGDAL_VERSION=${GDAL_NUM_VERSION})


Added emscripten guard in glew/hunter.cmake

--- cmake/projects/glew/hunter.cmake
+++ cmake/projects/glew/hunter.cmake
@@ -1,5 +1,9 @@
 # Copyright (c) 2016, Ruslan Baratov, Alexandre Pretyman
 # All rights reserved.
+
+if(EMSCRIPTEN)
+  return()
+endif()

 include(hunter_add_version)
 include(hunter_cacheable)


Add bfs tests to auto testing

Add bfs tests to auto testing

--- test/testing.cmake
+++ test/testing.cmake
@@ -71,3 +71,18 @@
 mpi_test(testEdgeTree 2
   ./testEdgeTraversal
   "${GRAPHS}/tree.ebin")
+
+if (ENABLE_ZOLTAN)
+
+endif()
+
+if (ENABLE_KOKKOS)
+  mpi_test(bfsSearchRing 1
+    ./bfsSearch
+    "${GRAPHS}/ring.ebin")
+
+  mpi_test(bfsSearchTree 1
+    ./bfsSearch
+    "${GRAPHS}/tree.ebin")
+
+endif()


BUG: Fixed name of sln file of Applications.

--- SuperBuild/ExternalApplications.cmake
+++ SuperBuild/ExternalApplications.cmake
@@ -19,7 +19,7 @@

 set( proj Applications )

-UPDATE_SELX_SUPERBUILD_COMMAND(${proj})
+UPDATE_SELX_SUPERBUILD_COMMAND(SuperElastix${proj})

 ExternalProject_Add( ${proj}
   DOWNLOAD_COMMAND ""


Compile examples as default

Compile examples as default

--- options.cmake
+++ options.cmake
@@ -10,4 +10,4 @@
 option(WITH_PROTOBUF "Enable the use of protobuf" OFF)

 option(WITH_PERF     "Build perfomance tests"    OFF)
-option(WITH_EXAMPLES "Build examples"            OFF)
+option(WITH_EXAMPLES "Build examples"             ON)


Add openexr config stdlib flag to LDFLAGS

--- openexr.cmake
+++ openexr.cmake
@@ -50,7 +50,7 @@
         --prefix=${BUILDEM_DIR}
         --disable-ilmbasetest
         PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR}
-        "LDFLAGS=${BUILDEM_LDFLAGS}"
+        "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
         "LIBS=${BUILDEM_ADDITIONAL_CXX_FLAGS}"
         "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
@@ -59,4 +59,4 @@

 set_target_properties(${openexr_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

-endif (NOT openexr_NAME)+endif (NOT openexr_NAME)


Added the add_link_options() function to complement the add_compile_options() function.

--- build_options.cmake
+++ build_options.cmake
@@ -37,4 +37,20 @@
     endforeach()
 endfunction()

-TNUN_add_compile_options( Release ${TNUN_compiler_release_flags} )+TNUN_add_compile_options( Release ${TNUN_compiler_release_flags} )
+
+
+################################################################################
+#
+# add_link_options()
+#
+################################################################################
+
+function( TNUN_add_link_options configuration options )
+    # Implementation note:
+    # Function for symmetry/consistency with the TNUN_add_compile_options()
+    # function (with a major the difference: this function accepts a single
+    # string of options as opposed to a list).
+    #                                         (24.05.2016.) (Domagoj Saric)
+    set( CMAKE_EXE_LINKER_FLAGS_${configuration} "${CMAKE_EXE_LINKER_FLAGS_${configuration}} ${options}" PARENT_SCOPE )
+endfunction()


pgmlink.cmake: Use specific commit, and use the same one for mac and linux.

--- pgmlink.cmake
+++ pgmlink.cmake
@@ -31,17 +31,8 @@
     include (dlib)
     include (python)

-    if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-        # need other branch on macos
-        set(GIT_BRANCH "mac_os")
-        set(TEST_STRING "")
-    else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-         set(GIT_BRANCH "master")
-         set(TEST_STRING "${BUILDEM_ENV_STRING} $(MAKE) test")
-    endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-
     external_git_repo (pgmlink
-        ${GIT_BRANCH}
+        364bef9a809fc533fff292c99d1c8eb489a3c591
         https://github.com/ilastik/pgmlink)

     message ("Installing ${pgmlink_NAME} into FlyEM build aread: ${BUILDEM_DIR} ...")


cmake: fix ADE dependency handling

cmake: fix ADE dependency handling

--- modules/gapi/cmake/DownloadADE.cmake
+++ modules/gapi/cmake/DownloadADE.cmake
@@ -20,12 +20,26 @@
 set(ADE_root "${ade_src_dir}/${ade_subdir}/sources/ade")
 file(GLOB_RECURSE ADE_sources "${ADE_root}/source/*.cpp")
 file(GLOB_RECURSE ADE_include "${ADE_root}/include/ade/*.hpp")
-add_library(ade STATIC ${ADE_include} ${ADE_sources})
+add_library(ade STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL}
+    ${ADE_include}
+    ${ADE_sources}
+)
 target_include_directories(ade PUBLIC $<BUILD_INTERFACE:${ADE_root}/include>)
-set_target_properties(ade PROPERTIES POSITION_INDEPENDENT_CODE True)
+set_target_properties(ade PROPERTIES
+  POSITION_INDEPENDENT_CODE True
+  OUTPUT_NAME ade
+  DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+  COMPILE_PDB_NAME ade
+  COMPILE_PDB_NAME_DEBUG "ade${OPENCV_DEBUG_POSTFIX}"
+  ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
+)
+
+if(ENABLE_SOLUTION_FOLDERS)
+  set_target_properties(ade PROPERTIES FOLDER "3rdparty")
+endif()

 if(NOT BUILD_SHARED_LIBS)
-  ocv_install_target(ade EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
+  ocv_install_target(ade EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
 endif()

 ocv_install_3rdparty_licenses(ade "${ade_src_dir}/${ade_subdir}/LICENSE")


Change to compile the detector algorithms

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -112,7 +112,7 @@

   set(ALIROOTALIBS)

-  list(APPEND ALIROOTALIBS RAWDatabase-static RAWDatarec-static RAWDatasim-static STEERBase-static STEER-static CDB-static ESD-static STAT-static AOD-static )
+  list(APPEND ALIROOTALIBS RAWDatabase-static RAWDatarec-static RAWDatasim-static STEERBase-static STEER-static CDB-static ESD-static STAT-static AOD-static ANALYSIS-static ANALYSISalice-static )

   expand(ALIROOTALIBS2 "\${${DAMODULE}ALIBS}")
   expand(DAINCDIRS "\${${DAMODULE}INC}")