Fix #150 linker errors with prebuilt WebRTC libraries

--- cmake/FindWebRTC.cmake
+++ cmake/FindWebRTC.cmake
@@ -17,6 +17,8 @@

 unset(WEBRTC_INCLUDE_DIR)
 unset(WEBRTC_INCLUDE_DIR CACHE)
+unset(WEBRTC_LIBRARY)
+unset(WEBRTC_LIBRARY CACHE)
 unset(WEBRTC_LIBRARIES)
 unset(WEBRTC_LIBRARIES CACHE)
 unset(WEBRTC_LIBRARIES_DEBUG)
@@ -61,11 +63,12 @@
       ${WEBRTC_ROOT_DIR}/out/Release)

   # Attempt to find the monolithic library built with `webrtcbuilds`
-  find_library_extended(WEBRTC
-    NAMES webrtc webrtc_full libwebrtc_full
-    PATHS_DEBUG ${debug_dir}
-    PATHS_RELEASE ${release_dir}
-  )
+  # find_library_extended(WEBRTC
+  #   NAMES webrtc webrtc_full libwebrtc_full
+  #   PATHS_DEBUG ${debug_dir}
+  #   PATHS_RELEASE ${release_dir}
+  # )
+  # message(FATAL_ERROR "DONEa: ${WEBRTC_LIBRARIES}")

   # # Otherwise generate a library from available .o objects
   # if(NOT WEBRTC_LIBRARY)
@@ -90,7 +93,7 @@
   # endif()

   # Otherwise fallback to library objects (slower and unreliable)
-  if(NOT WEBRTC_LIBRARY)
+  if(NOT WEBRTC_LIBRARIES)
     set(WEBRTC_LIBRARIES "")
     if(MSVC)
       set(lib_suffix "lib")
@@ -116,7 +119,7 @@
         endif()
         # endif()
       endforeach()
-      # message(FATAL_ERROR "DONE")
+      # message(FATAL_ERROR "DONE: ${WEBRTC_LIBRARIES_DEBUG}")
       foreach(lib ${WEBRTC_LIBRARIES_DEBUG})
         if(WIN32 AND (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE))
           list(APPEND WEBRTC_LIBRARIES "debug" ${lib})
@@ -151,6 +154,9 @@
     set(WEBRTC_DEPENDENCIES Secur32.lib Winmm.lib msdmo.lib dmoguids.lib wmcodecdspuuid.lib) # strmbase.lib
   elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     add_definitions(-DWEBRTC_POSIX)
+
+    # For ABI compatability between precompiled WebRTC libraries using clang and new GCC versions
+    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
     set(WEBRTC_DEPENDENCIES -lrt -lX11 -lGLU) # -lGL

     # Enable libstdc++ debugging if you build WebRTC with `enable_iterator_debugging=true`


#55 Add -s suffix when building static library

--- cmake/Properties.cmake
+++ cmake/Properties.cmake
@@ -7,12 +7,18 @@
   target_compile_options(${SFEMOVIE_LIB} PRIVATE "$<$<CONFIG:Debug>:-O0>")
 endif()

+if (SFEMOVIE_BUILD_STATIC)
+  set(STATIC_POSTFIX "-s")
+else()
+  set(STATIC_POSTFIX "")
+endif()
+
 set_target_properties(${SFEMOVIE_LIB} PROPERTIES
-                      DEBUG_POSTFIX "-d"
+                      DEBUG_POSTFIX "${STATIC_POSTFIX}-d"
+                      RELEASE_POSTFIX "${STATIC_POSTFIX}"
                       LINK_FLAGS "${LINKER_FLAGS}"
                       SOVERSION "${VERSION_MAJOR}.${VERSION_MINOR}.0"
                       VERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
-

 if (MACOSX)
     # edit target properties


[aot] Ship runtime *.bc files with C-API for LLVM AOT (#6285)

Issue: #

LLVM AOT rely on *.bc files (`runtime_cuda.bc`, ...) at runtime, thus we
have to ship those runtime files together with C-API once TI_WITH_LLVM
is enabled.

Under installed directory `{install_dir}/taichi-xxxx.egg/c_api/`:

Before:
```
include
lib/libtaichi_c_api.so
lib/cmake
```

After:
```
include
lib/libtaichi_c_api.so
lib/cmake
lib/runtime/*.bc
```

--- cmake/TaichiCAPI.cmake
+++ cmake/TaichiCAPI.cmake
@@ -110,3 +110,10 @@
     PATTERN *.h
     PATTERN *.hpp
     )
+
+if(TI_WITH_LLVM)
+# Install runtime .bc files for LLVM backend
+install(DIRECTORY
+      ${INSTALL_LIB_DIR}/runtime
+      DESTINATION c_api)
+endif()


try fix OS X build

try fix OS X build

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -96,6 +96,8 @@
         # Linux
         target_link_libraries(${CORE_LIBRARY_NAME} stdc++fs X11)
         target_link_libraries(${CORE_LIBRARY_NAME} -static-libgcc -static-libstdc++)
+        # Ask OS X to minic Linux dynamic linking hebavior
+        target_link_libraries(${CORE_LIBRARY_NAME} PRIVATE "-undefined dynamic_lookup")
     endif()
 endif ()
 message("PYTHON_LIBRARIES" ${PYTHON_LIBRARIES})


Made Eigen included by default in Windows to improve build reliability.

--- cmake/find/eigen.cmake
+++ cmake/find/eigen.cmake
@@ -1,11 +1,14 @@
 IF(IS_WINDOWS)
-	IF(EXISTS "C:/eigen")
+	SET(EIGEN3_INCLUDE_DIR "C:/eigen")
+	# TODO: Conditionally deactivate subprojects that depend on Eigen so you can make Eigen optional again
+	#IF(EXISTS ${EIGEN3_INCLUDE_DIR})
 		OPTION(USE_EIGEN "Build Eigen-dependent functions." TRUE)
-	ELSE()
-		OPTION(USE_EIGEN "Build Eigen-dependent functions." FALSE)
-	ENDIF()
+	#ELSE()
+	#	OPTION(USE_EIGEN "Build Eigen-dependent functions." FALSE)
+	#ENDIF()
 ELSE()
-	IF(EXISTS "/usr/include/eigen3")
+	SET(EIGEN3_INCLUDE_DIR "/usr/include/eigen3")
+	IF(EXISTS ${EIGEN3_INCLUDE_DIR})
 		OPTION(USE_EIGEN "Build Eigen-dependent functions." TRUE)
 	ELSE()
 		OPTION(USE_EIGEN "Build Eigen-dependent functions." FALSE)
@@ -13,14 +16,10 @@
 ENDIF()

 IF(USE_EIGEN)
-	IF(IS_WINDOWS)
-		SET(Eigen_DIR "C:/eigen" CACHE STRING "Location of Eigen directory containing <cmake> subdirectory." FORCE)
-	ELSE()
-		SET(Eigen_DIR "/usr/include/eigen3" CACHE STRING "Location of Eigen directory containing <cmake> subdirectory." FORCE)
-	ENDIF()
+	SET(Eigen_DIR ${EIGEN3_INCLUDE_DIR} CACHE STRING "Location of Eigen directory containing <cmake> subdirectory." FORCE)

 	IF(NOT EXISTS "${Eigen_DIR}")
-		MESSAGE(FATAL_ERROR "Provided path for Eigen directory does not appear to exist!")
+		MESSAGE(FATAL_ERROR "Provided path ${Eigen_DIR} for Eigen directory does not appear to exist! Have you installed Eigen?")
 	ENDIF()

 	IF(IS_WINDOWS)
@@ -39,6 +38,6 @@
 		SET(ADDITIONAL_INCLUDES ${ADDITIONAL_INCLUDES} ${EIGEN3_INCLUDE_DIR})
 	ELSE()
 		SET(eigen_FOUND FALSE)
-		MESSAGE(FATAL_ERROR "Eigen not found! Much of the libraries can be built without Eigen, however, so consider opting not to use it.")
+		MESSAGE(FATAL_ERROR "Eigen not found!") # Much of the libraries can be built without Eigen, however, so consider opting not to use it.
 	ENDIF()
 ENDIF()


unit tests includes

unit tests includes

--- cmake/unit-tests.cmake
+++ cmake/unit-tests.cmake
@@ -5,7 +5,9 @@
 )

-include_directories(${CMAKE_BINARY_DIR}/secp256k1/include ${CMAKE_SOURCE_DIR}/src)
+#include_directories(${CMAKE_BINARY_DIR}/secp256k1/include ${CMAKE_SOURCE_DIR}/src)
+
+include_directories(${CMAKE_BINARY_DIR}/include/bitcrypto)

 add_executable(unit-tests ${TEST_SOURCES})
 add_dependencies(unit-tests bitcrypto)


Fixing compilation errors

Fixing compilation errors

--- modules/HdrHistogram.cmake
+++ modules/HdrHistogram.cmake
@@ -3,9 +3,10 @@
   # Module library
   file(GLOB SOURCE_FILES "HdrHistogram/src/*.c")
   if(MSVC)
+    # C4057: 'operator' : 'identifier1' indirection to slightly different base types from 'identifier2'
     # C4146: unary minus operator applied to unsigned type, result still unsigned
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4146 /wd4244")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4057 /wd4146 /wd4244")
   else()
     set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-format -Wno-implicit-function-declaration -Wno-incompatible-pointer-types")
   endif()


build: disable some noisy warnings

build: disable some noisy warnings

--- build/Utils.cmake
+++ build/Utils.cmake
@@ -463,7 +463,9 @@
 		add_extra_compiler_option(-Wno-missing-declarations)
 		add_extra_compiler_option(-Wno-missing-prototypes)
 		add_extra_compiler_option(-Wno-missing-field-initializers)
+		add_extra_compiler_option(-Wno-unused-variable)
 		add_extra_compiler_option(-Wno-unused-local-typedefs)
+		add_extra_compiler_option(-Wno-delete-incomplete)
 		add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
 		add_extra_compiler_option(-Wno-unnamed-type-template-args)
 	  endif()


mingw appveyor debugging

mingw appveyor debugging

--- scripts/exec_test.cmake
+++ scripts/exec_test.cmake
@@ -28,7 +28,7 @@

 if("${TEST_MODE}" STREQUAL "COMPARE")
     if(NOT CMAKE_HOST_UNIX)
-        execute_process(COMMAND dos2unix ${TEST_TEMP_FILE})
+        #execute_process(COMMAND dos2unix ${TEST_TEMP_FILE})
     endif()

     execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_OUTPUT_FILE} ${TEST_TEMP_FILE} RESULT_VARIABLE cmp_result)


Adding USE_GLEW and GLEW_STATIC to the cmgui_congifure file https://tracker.physiomeproject.org/show_bug.cgi?id=1203

--- source/configure/cmgui_configure.h.cmake
+++ source/configure/cmgui_configure.h.cmake
@@ -36,6 +36,7 @@
 #cmakedefine USE_PERL_INTERPRETER
 #cmakedefine USE_XML2
 #cmakedefine USE_NETGEN
+#cmakedefine USE_GLEW
 #cmakedefine USE_PNG
 #cmakedefine USE_TIFF

@@ -43,6 +44,7 @@
 #cmakedefine NETSCAPE_HELP
 #cmakedefine FE_VALUE_IS_DOUBLE
 #cmakedefine HAVE_VFSCANF
+#cmakedefine GLEW_STATIC
 #cmakedefine OPTIMISED
 #cmakedefine DEBUG
 #cmakedefine MEMORY_CHECKING


build(*): update to make non-x86 target work

--- external/InitializeExternalComponents.cmake
+++ external/InitializeExternalComponents.cmake
@@ -14,7 +14,7 @@
 include_directories(${LLVM_INCLUDE_DIRS})
 add_definitions(${LLVM_DEFINITIONS})

-llvm_map_components_to_libnames(llvm_libs core support mcparser option bitreader profiledata irreader executionengine mcjit x86codegen x86asmparser)
+llvm_map_components_to_libnames(llvm_libs core support mcparser option bitreader profiledata irreader executionengine mcjit native)
 message(STATUS "Linking with: ${llvm_libs}")

 # cxxopts


* Adjustment: Minor formatting fix in basics.cmake.

--- Tools/CMake/basics.cmake
+++ Tools/CMake/basics.cmake
@@ -386,7 +386,7 @@
     else()
         add_executable("${PROJECT_NAME}" WIN32 ${${PROJECT_NAME}_files})
     endif()
-
+
     # Torque requires c++17
     target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)

@@ -483,8 +483,8 @@
 	set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${projectOutDir}")
 	SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${projectOutDir}")
 	set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${projectOutDir}")
-    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${projectOutDir}")
-    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${projectOutDir}")
+	SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${projectOutDir}")
+	set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${projectOutDir}")
 endif()

 # fix the debug/release subfolders on windows


Add COGCXX object text localization and section renaming

COGCXX object manipulation currently hard coded to blink cog example.

--- cmake/Modules/CMakeCOGCXXInformation.cmake
+++ cmake/Modules/CMakeCOGCXXInformation.cmake
@@ -27,4 +27,5 @@
 set(
     CMAKE_COGCXX_COMPILE_OBJECT
     "<CMAKE_COGCXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> <SOURCE>"
+    "${CMAKE_OBJCOPY} --localize-text --rename-section .text=led_blinker.cog <OBJECT>"
 )


Fixed handling of AMD64 processor architecture

Signed-off-by: Kim Topley <b240e9af83531ac049af314c640f722869aeb57d@apple.com>

--- cmake/modules/DispatchWindowsSupport.cmake
+++ cmake/modules/DispatchWindowsSupport.cmake
@@ -2,7 +2,7 @@
 function(dispatch_windows_arch_spelling arch var)
   if(${arch} STREQUAL i686)
     set(${var} x86 PARENT_SCOPE)
-  elseif(${arch} STREQUAL x86_64)
+  elseif(${arch} STREQUAL x86_64 OR ${arch} STREQUAL AMD64)
     set(${var} x64 PARENT_SCOPE)
   elseif(${arch} STREQUAL armv7)
     set(${var} arm PARENT_SCOPE)


Fixed test execution order

Fixed test execution order

--- test/test_driver.cmake
+++ test/test_driver.cmake
@@ -24,11 +24,17 @@
         TARGET ${test_target}
         POST_BUILD
         COMMAND ${test_target} #cmake 2.6 required
-        DEPENDS ${test_target}
+        DEPEND ${test_target}
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
-        COMMENT "Running Unit tests" VERBATIM
+        COMMENT "Running ${test_target} ..." VERBATIM
     )
-    add_dependencies(check ${test_target})
+    add_custom_command(
+        TARGET check
+        POST_BUILD
+        COMMAND make ${test_target} #TODO: Windows?
+        WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+        COMMENT "Running ${test_target} ..." VERBATIM
+    )
 endmacro()

 # We need thread support


Using platform family to determine whether to include platform/posix/ files. All files are getting included correctly on macOS now, but source files aren't being grouped correctly (even though headers are).

--- _cmake/AddLibrary/AddSource.cmake
+++ _cmake/AddLibrary/AddSource.cmake
@@ -26,13 +26,15 @@
 	file(GLOB_RECURSE source_files RELATIVE ${BASE_DIR} ${patterns})
 	filter_path_list(header_files SOURCES ${source_files} PATTERNS ${header_patterns})
 	filter_path_list(implementation_files SOURCES ${source_files} PATTERNS ${src_patterns})
-
+
 	remove_ignored_paths(header_files PATHS ${header_files} FILTER_DIRS ${filter_dirs} "platform")
 	remove_ignored_paths(implementation_files PATHS ${implementation_files} FILTER_DIRS ${filter_dirs} "platform")
 	remove_ignored_paths_regex(implementation_files PATHS ${implementation_files} FILTER_DIRS "platform")

 	# determine platform and add platform folder contents
 	determine_platform(platform)
+	determine_platform_family(platform_family)
+
 	if(EXISTS ${BASE_DIR}/src/platform/${platform})
 		file(GLOB_RECURSE platform_sources RELATIVE ${BASE_DIR}/src/platform/${platform} ${src_patterns})
 	endif()
@@ -41,18 +43,18 @@
 		file(GLOB_RECURSE platform_headers RELATIVE ${BASE_DIR}/platform/${platform} ${header_patterns})
 	endif()

-	if(EXISTS ${BASE_DIR}/platform/posix AND POSIX)
-		file(GLOB_RECURSE posix_headers RELATIVE ${BASE_DIR}/platform/posix ${header_patterns})
+	if(EXISTS ${BASE_DIR}/platform/${platform_family})
+		file(GLOB_RECURSE platform_family_headers RELATIVE ${BASE_DIR}/platform/${platform_family} ${header_patterns})
 	endif()

-	if(EXISTS ${BASE_DIR}/src/platform/posix AND POSIX)
-		file(GLOB_RECURSE posix_sources RELATIVE ${BASE_DIR}/src/platform/posix ${src_patterns})
+	if(EXISTS ${BASE_DIR}/src/platform/${platform_family})
+		file(GLOB_RECURSE platform_family_sources RELATIVE ${BASE_DIR}/src/platform/${platform_family} ${src_patterns})
 	endif()

 	remove_ignored_paths_regex(platform_headers PATHS ${platform_headers} FILTER_DIRS "\\.\\.")
 	remove_ignored_paths_regex(platform_sources PATHS ${platform_sources} FILTER_DIRS "\\.\\.")
-	remove_ignored_paths_regex(posix_headers PATHS ${posix_headers} FILTER_DIRS "\\.\\.")
-	remove_ignored_paths_regex(posix_sources PATHS ${posix_sources} FILTER_DIRS "\\.\\.")
+	remove_ignored_paths_regex(platform_family_headers PATHS ${platform_family_headers} FILTER_DIRS "\\.\\.")
+	remove_ignored_paths_regex(platform_family_sources PATHS ${platform_family_sources} FILTER_DIRS "\\.\\.")

 	# Setup Groups for Project Solutions
 	unset(header_groups)
@@ -68,10 +70,10 @@
 		list(APPEND platform_header_groups ${header_group})
 	endforeach(header)

-	foreach(header ${posix_headers})
-		get_group("platform/posix/${header}" "interface" header_group)
-		list(APPEND posix_header_group_${header_group} ${header})
-		list(APPEND posix_header_groups ${header_group})
+	foreach(header ${platform_family_headers})
+		get_group("platform/${platform_family}/${header}" "interface" header_group)
+		list(APPEND platform_family_header_group_${header_group} ${header})
+		list(APPEND platform_family_header_groups ${header_group})
 	endforeach(header)

 	# Setup Groups for Project Solutions
@@ -88,10 +90,10 @@
 		list(APPEND platform_source_groups ${source_group})
 	endforeach(source)

-	foreach(source ${posix_sources})
-		get_group("src/platform/posix/${source}" "source" source_group)
-		list(APPEND posix_source_group_${source_group} ${source})
-		list(APPEND posix_source_groups ${source_group})
+	foreach(source ${platform_family_sources})
+		get_group("src/platform/${platform_family}/${source}" "source" source_group)
+		list(APPEND platform_family_source_group_${source_group} ${source})
+		list(APPEND platform_family_source_groups ${source_group})
 	endforeach(source)

@@ -103,8 +105,8 @@
 		list(REMOVE_DUPLICATES platform_header_groups)
 	endif()

-	if(posix_header_groups)
-		list(REMOVE_DUPLICATES posix_header_groups)
+	if(platform_family_header_groups)
+		list(REMOVE_DUPLICATES platform_family_header_groups)
 	endif()

 	if(source_groups)
@@ -115,8 +117,8 @@
 		list(REMOVE_DUPLICATES platform_source_groups)
 	endif()

-	if(posix_source_groups)
-		list(REMOVE_DUPLICATES posix_source_groups)
+	if(platform_family_source_groups)
+		list(REMOVE_DUPLICATES platform_family_source_groups)
 	endif()

@@ -133,10 +135,10 @@
 		unset(platform_header_group_${header_group})
 	endforeach(header_group)

-	foreach(header_group ${posix_header_groups})
-		add_base_dir(posix_header_group_${header_group} PATHS ${posix_header_group_${header_group}} BASE_DIR "${BASE_DIR}/platform/posix")
-		source_group(${header_group} FILES ${posix_header_group_${header_group}})
-		unset(posix_header_group_${header_group})
+	foreach(header_group ${platform_family_header_groups})
+		add_base_dir(platform_family_header_group_${header_group} PATHS ${platform_family_header_group_${header_group}} BASE_DIR "${BASE_DIR}/platform/${platform_family}")
+		source_group(${header_group} FILES ${platform_family_header_group_${header_group}})
+		unset(platform_family_header_group_${header_group})
 	endforeach(header_group)

@@ -153,10 +155,10 @@
 		unset(platform_source_group_${source_group})
 	endforeach(source_group)

-	foreach(source_group ${posix_source_groups})
-		add_base_dir(posix_source_groups_${source_group} PATHS ${posix_source_group_${source_group}} BASE_DIR "${BASE_DIR}/src/platform/posix")
-		source_group(${source_group} FILES ${posix_source_group_${source_group}})
-		unset(posix_source_group_${source_group})
+	foreach(source_group ${platform_family_source_groups})
+		add_base_dir(platform_family_source_groups_${source_group} PATHS ${platform_family_source_group_${source_group}} BASE_DIR "${BASE_DIR}/src/platform/${platform_family}")
+		source_group(${source_group} FILES ${platform_family_source_group_${source_group}})
+		unset(platform_family_source_group_${source_group})
 	endforeach(source_group)

@@ -164,18 +166,19 @@
     set(fullpath_header_files ${header_files})
 	add_base_dir(header_files PATHS ${header_files} BASE_DIR ${BASE_DIR})
 	add_base_dir(platform_headers PATHS ${platform_headers} BASE_DIR ${BASE_DIR}/platform/${platform})
-	if(POSIX)
-		add_base_dir(posix_headers PATHS ${posix_headers} BASE_DIR ${BASE_DIR}/platform/posix)
+	if(EXISTS ${BASE_DIR}/platform/${platform_family})
+		message("Adding base dir to platform family headers")
+		add_base_dir(platform_family_headers PATHS ${platform_family_headers} BASE_DIR ${BASE_DIR}/platform/${platform_family})
 	endif()

 	add_base_dir(implementation_files PATHS ${implementation_files} BASE_DIR ${BASE_DIR})
 	add_base_dir(platform_sources PATHS ${platform_sources} BASE_DIR ${BASE_DIR}/src/platform/${platform})
-	if(POSIX)
-		add_base_dir(posix_sources PATHS ${posix_sources} BASE_DIR ${BASE_DIR}/src/platform/posix)
+	if(EXISTS ${BASE_DIR}/src/platform/${platform_family})
+		add_base_dir(platform_family_sources PATHS ${platform_family_sources} BASE_DIR ${BASE_DIR}/src/platform/${platform_family})
 	endif()

-	list(APPEND header_files ${platform_headers} ${posix_headers})
-	list(APPEND implementation_files ${platform_sources} ${posix_sources})
+	list(APPEND header_files ${platform_headers} ${platform_family_headers})
+	list(APPEND implementation_files ${platform_sources} ${platform_family_sources})

 	# return the found implementation files to the calling scope
 	set(${IMPLEMENTATION_FILES} ${implementation_files} PARENT_SCOPE)


Update CMake script for Tizen

Update CMake script for Tizen

--- toolchains/tizen.cmake
+++ toolchains/tizen.cmake
@@ -43,13 +43,6 @@
 # compile definitions (adds -DPLATFORM_LINUX)
 set(CORE_COMPILE_DEFS PLATFORM_TIZEN)

-if (USE_EXTERNAL_LIBS)
-include(${EXTERNAL_LIBS_DIR}/core-dependencies.cmake)
-include(${EXTERNAL_LIBS_DIR}/glfw.cmake)
-else()
-add_subdirectory(${PROJECT_SOURCE_DIR}/external)
-endif()
-
 # load core library
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)


ODE needs pthread

ODE needs pthread

--- CMakeModules/KlamptDependencies.cmake
+++ CMakeModules/KlamptDependencies.cmake
@@ -140,6 +140,9 @@
     SET(KLAMPT_DEFINITIONS ${KLAMPT_DEFINITIONS} ${ODE_DEFINITIONS})
     SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${ODE_INCLUDE_DIRS})
     SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${ODE_LIBRARIES})
+
+    #pthreads is needed -- but for some reason ODE does not report it
+    SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} -pthread)
   ENDIF(ODE_FOUND)

   # GL Extension Wrangler (GLEW)


small build correction, with non us timestamps

--- cmake/Utils.cmake
+++ cmake/Utils.cmake
@@ -28,7 +28,7 @@
         "__MADLIB_VERSION_MINOR__=${MADLIB_VERSION_MINOR}"
         "__MADLIB_VERSION_PATCH__=${MADLIB_VERSION_PATCH}"
         "__MADLIB_GIT_REVISION__=${MADLIB_GIT_REVISION}"
-        "__MADLIB_BUILD_TIME__=${MADLIB_BUILD_TIME}"
+        "__MADLIB_BUILD_TIME__=\"${MADLIB_BUILD_TIME}\""
         "__MADLIB_BUILD_TYPE__=${CMAKE_BUILD_TYPE}"
         "__MADLIB_BUILD_SYSTEM__=${CMAKE_SYSTEM}"
         "__MADLIB_C_COMPILER__=${MADLIB_C_COMPILER}"


Add gitignore to demos

Add gitignore to demos

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -277,7 +277,7 @@
             ${CMAKE_SOURCE_DIR}/.clang-format
             ${CMAKE_SOURCE_DIR}/.clang-tidy
             ${CMAKE_SOURCE_DIR}/.clang-tidy-ignore
-            )
+            ${CMAKE_SOURCE_DIR}/util/simulation-template/.gitignore)

     add_copy_directory(copy_files_bdm
             ${CMAKE_SOURCE_DIR}/third_party/cpplint


Fix cegui_dependent_option so it actually works with conditionals

--HG--
branch : v0-8

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -520,8 +520,9 @@
 macro (cegui_dependent_option OPTIONNAME DESC DEPS)
     set (${OPTIONNAME}_DEFAULT TRUE)
     foreach (DEP ${DEPS})
+        string(REGEX REPLACE " +" ";" _DEP "${DEP}")
         # Don't use NOT here, because conditions like 'NOT NOT foo' will break
-        if (${${DEP}})
+        if (${_DEP})
         else()
             set (${OPTIONNAME}_DEFAULT FALSE)
         endif()


Made sure qt used configure.bat when building on windows

--- cmake/ExternalQt5.cmake
+++ cmake/ExternalQt5.cmake
@@ -5,9 +5,10 @@
 if(WIN32)
 	#set(BUILD_COMMAND set CL=/MP; nmake)
 	set(BUILD_COMMAND nmake)
+	set(CONFIGURE_COMMAND ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure.bat)
 	set(URL "http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtbase-opensource-src-5.8.0.zip")
 	set(URL_HASH SHA256=4899c64c27249690a0a6b46208408d9dcc7043f42e175417e2f7634710f8f3fa)
-	set(OPTIONS
+	set(OPTIONS
             -opensource;
             -confirm-license;
             -release;
@@ -25,6 +26,7 @@
 	)
 else()
 	set(BUILD_COMMAND make -j4)
+	set(CONFIGURE_COMMAND ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure)
 	set(URL "http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtbase-opensource-src-5.8.0.tar.gz")
 	set(URL_HASH SHA256=0f6ecd94abd148f1ea4ad08905308af973c6fad9e8fca7491d68dbc8fbd88872)
     if(APPLE)
@@ -76,7 +78,7 @@
         URL ${URL}
         URL_HASH ${URL_HASH}
         CONFIGURE_COMMAND
-            ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure
+            ${CONFIGURE_COMMAND}
             -prefix ${FAST_EXTERNAL_INSTALL_DIR};
             ${OPTIONS}
         BUILD_COMMAND


-- Provide a path to 64-bit libary version of log4cpp

--- cmake/FindLog4cpp.cmake
+++ cmake/FindLog4cpp.cmake
@@ -20,7 +20,7 @@
 SET(Log4cpp_NAMES log4cpp)
 FIND_LIBRARY(Log4cpp_LIBRARY
   NAMES ${Log4cpp_NAMES}
-  PATHS /usr/lib /usr/local/lib /opt/local/lib
+  PATHS /usr/local/lib64/lib /usr/lib /usr/local/lib /opt/local/lib
 )

 IF (Log4cpp_INCLUDE_DIR AND Log4cpp_LIBRARY)


Fixed SWScale cmake find script.

Fixed SWScale cmake find script.

* Wrong name for pkg-config (thanks @floppym for pointing that out)
* Formatting issues, there were spaces in path and variables that
  should not have been there.

Signed-off-by: Armin Novak <f013646d3fdff49fb049ba510f2befb652cc893e@thincast.com>

--- cmake/FindSWScale.cmake
+++ cmake/FindSWScale.cmake
@@ -2,11 +2,11 @@
 include(FindPkgConfig)

 if (PKG_CONFIG_FOUND)
-	pkg_check_modules(SWScale swscale)
+	pkg_check_modules(SWScale libswscale)
 endif()

-find_path(SWScale_INCLUDE_DIR libswscale / swscale.h PATHS $ {SWScale_INCLUDE_DIRS})
-find_library(SWScale_LIBRARY swscale PATHS $ {SWScale_LIBRARY_DIRS})
+find_path(SWScale_INCLUDE_DIR libswscale/swscale.h PATHS ${SWScale_INCLUDE_DIRS})
+find_library(SWScale_LIBRARY swscale PATHS ${SWScale_LIBRARY_DIRS})

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWScale DEFAULT_MSG SWScale_INCLUDE_DIR SWScale_LIBRARY)


Add CMake dependency (related to #599)

Add CMake dependency (related to #599)

--- cmake/LIEFOptions.cmake
+++ cmake/LIEFOptions.cmake
@@ -25,10 +25,17 @@
 option(LIEF_PE             "Build LIEF with PE  module"                 ON)
 option(LIEF_MACHO          "Build LIEF with MachO module"               ON)

-option(LIEF_OAT            "Build LIEF with OAT module"                 ON)
 option(LIEF_DEX            "Build LIEF with DEX module"                 ON)
-option(LIEF_VDEX           "Build LIEF with VDEX module"                ON)
 option(LIEF_ART            "Build LIEF with ART module"                 ON)
+
+# OAT support relies on the ELF and DEX format.
+# Therefore, these options must be enabled to support use this format
+cmake_dependent_option(LIEF_OAT "Build LIEF with OAT module" ON
+                       "LIEF_ELF;LIEF_DEX" OFF)
+
+# VDEX format depends on the DEX module
+cmake_dependent_option(LIEF_VDEX "Build LIEF with DEX module" ON
+                       "LIEF_DEX" OFF)

 # Sanitizer
 option(LIEF_ASAN "Enable Address sanitizer"   OFF)


[VTA] Fix FSIM Compile Error. (#6070)

[VTA] Fix FSIM Compile Error. (#6070)

Issue:
when set vta target into "sim", vta compile would get fail and
show error message "fatal error: vta/driver.h: No such file or directory".

Solution:
set VTA_HW include path correctly.

--- cmake/modules/VTA.cmake
+++ cmake/modules/VTA.cmake
@@ -103,13 +103,13 @@
     # Target lib: vta
     add_library(vta SHARED ${FPGA_RUNTIME_SRCS})
     target_include_directories(vta PUBLIC vta/runtime)
+    target_include_directories(vta PUBLIC ${VTA_HW_PATH}/include)
     foreach(__def ${VTA_DEFINITIONS})
       string(SUBSTRING ${__def} 3 -1 __strip_def)
       target_compile_definitions(vta PUBLIC ${__strip_def})
     endforeach()
     if(${VTA_TARGET} STREQUAL "pynq" OR
        ${VTA_TARGET} STREQUAL "ultra96")
-      target_include_directories(vta PUBLIC ${VTA_HW_PATH}/include)
       target_link_libraries(vta ${__cma_lib})
     elseif(${VTA_TARGET} STREQUAL "de10nano")  # DE10-Nano rules
      #target_compile_definitions(vta PUBLIC VTA_MAX_XFER=2097152) # (1<<21)


added some helper cmake macros to enable:
 * two-step packaga structure (foo/bar with foo_bar as package name)
 * new pcl_cuda_add_library macro which uses cuda's cuda_add_library

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -47,7 +47,8 @@
                 set(${_var} FALSE)
                 PCL_SET_SUBSYS_STATUS(${_name} FALSE "Requires ${_dep}")
             else(NOT _status)
-                include_directories(${PROJECT_SOURCE_DIR}/${_dep}/include)
+                PCL_GET_SUBSYS_INCLUDE_DIR(_include_dir ${_dep})
+                include_directories(${PROJECT_SOURCE_DIR}/${_include_dir}/include)
             endif(NOT _status)
         endforeach(_dep)
     endif(${_var})
@@ -94,6 +95,37 @@
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
     install(EXPORT pcl DESTINATION ${LIB_INSTALL_DIR}/pcl FILE UsePCL.cmake)
 endmacro(PCL_ADD_LIBRARY)
+
+
+###############################################################################
+# Add a cuda library target.
+# _name The library name.
+# _component The part of PCL that this library belongs to.
+# ARGN The source files for the library.
+macro(PCL_CUDA_ADD_LIBRARY _name _component)
+    cuda_add_library(${_name} ${PCL_LIB_TYPE} ${ARGN})
+    # must link explicitly against boost.
+    target_link_libraries(${_name} ${Boost_LIBRARIES})
+    #
+    # Only link if needed
+    if(WIN32 AND MSVC)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+    else()
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+    endif()
+    #
+    set_target_properties(${_name} PROPERTIES
+        VERSION ${PCL_VERSION}
+        SOVERSION ${PCL_MAJOR_VERSION}
+        DEFINE_SYMBOL "PCLAPI_EXPORTS")
+    install(TARGETS ${_name} EXPORT pcl
+        RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT ${_component}
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component}
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
+    install(EXPORT pcl DESTINATION ${LIB_INSTALL_DIR}/pcl FILE UsePCL.cmake)
+endmacro(PCL_CUDA_ADD_LIBRARY)

 ###############################################################################
@@ -279,6 +311,28 @@

 ###############################################################################
+# Set the include directory name of a subsystem.
+# _name Subsystem name.
+# _includedir Name of subdirectory for includes
+# ARGN[0] Reason for not building.
+macro(PCL_SET_SUBSYS_INCLUDE_DIR _name _includedir)
+    SET_IN_GLOBAL_MAP(PCL_SUBSYS_INCLUDE ${_name} ${_includedir})
+endmacro(PCL_SET_SUBSYS_INCLUDE_DIR)
+
+
+###############################################################################
+# Get the include directory name of a subsystem - return _name if not set
+# _var Destination variable.
+# _name Name of the subsystem.
+macro(PCL_GET_SUBSYS_INCLUDE_DIR _var _name)
+    GET_IN_MAP(${_var} PCL_SUBSYS_INCLUDE ${_name})
+    if(NOT ${_var})
+      set (${_var} ${_name})
+    endif(NOT ${_var})
+endmacro(PCL_GET_SUBSYS_INCLUDE_DIR)
+
+
+###############################################################################
 # Write a report on the build/not-build status of the subsystems
 macro(PCL_WRITE_STATUS_REPORT)
     message(STATUS "The following subsystems will be built:")


added clang implementation note for -Qunused-arguments

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -18,6 +18,11 @@
 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
 set( TNUN_compiler_runtime_sanity_checks -fsanitize=undefined -fsanitize=integer -fsanitize=address -fno-omit-frame-pointer )

+# Implementation note:
+# When clang is used behind ccache, it throws a lot of "unused-argument" warnings.
+# I'm not sure why that happens (it also happens on clang for Android, both from ndk-build and cmake android build).
+# This causes lots of noisy compiler output which make it very difficult to see actual warnings/errors reported by compiler.
+#                                           ( 11.08.2016. Nenad Miksa )
 if( "${CMAKE_CXX_COMPILER}" MATCHES ".*ccache" )
     add_compile_options( -Qunused-arguments )
 endif()


Configure linux build to use c++14

Configure linux build to use c++14

--- toolchains/linux.cmake
+++ toolchains/linux.cmake
@@ -1,5 +1,5 @@
 # options
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++14")
 set(CXX_FLAGS_DEBUG "-g -O0")
 set(EXECUTABLE_NAME "tangram")


[cmake] fix Profiling build

[cmake] fix Profiling build

--- Numerics/cmake/SiconosCTest.cmake
+++ Numerics/cmake/SiconosCTest.cmake
@@ -77,10 +77,14 @@
   SET(CMAKE_BUILD_TYPE Debug)
   INCLUDE(TestCXXAcceptsFlag)
   INCLUDE(CheckCCompilerFlag)
-  CHECK_CXX_ACCEPTS_FLAG(-ftest-coverage CXX_HAVE_FTEST_COVERAGE)
-  CHECK_CXX_ACCEPTS_FLAG(-fprofile-arcs CXX_HAVE_PROFILE_ARCS)
-  CHECK_C_COMPILER_FLAG(-ftest-coverage C_HAVE_FTEST_COVERAGE)
-  CHECK_C_COMPILER_FLAG(-fprofile-arcs C_HAVE_PROFILE_ARCS)
+  IF(CMAKE_CXX_COMPILER_WORKS)
+    CHECK_CXX_ACCEPTS_FLAG(-ftest-coverage CXX_HAVE_FTEST_COVERAGE)
+    CHECK_CXX_ACCEPTS_FLAG(-fprofile-arcs CXX_HAVE_PROFILE_ARCS)
+  ENDIF(CMAKE_CXX_COMPILER_WORKS)
+  IF(CMAKE_C_COMPILER_WORKS)
+    CHECK_C_COMPILER_FLAG(-ftest-coverage C_HAVE_FTEST_COVERAGE)
+    CHECK_C_COMPILER_FLAG(-fprofile-arcs C_HAVE_PROFILE_ARCS)
+  ENDIF(CMAKE_C_COMPILER_WORKS)
   IF(CXX_HAVE_FTEST_COVERAGE AND CXX_HAVE_PROFILE_ARCS)
     MESSAGE("Adding test coverage flags to CXX compiler : -ftest-coverage -fprofile-arcs")
     SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ftest-coverage -fprofile-arcs")


Update static site download hash.

Update static site download hash.

--- build/cmake/versions.cmake
+++ build/cmake/versions.cmake
@@ -1,6 +1,6 @@
 # Define the versions of the various dependencies to build.
 set(API_UMBRELLA_STATIC_SITE_VERSION c02b8869cafb063deb7f9436d0137b0ea6e652aa)
-set(API_UMBRELLA_STATIC_SITE_HASH 8998cd6cab3708257e4d47e169802d2f)
+set(API_UMBRELLA_STATIC_SITE_HASH 07dbd5e6d96e62a9ad6b725b14f727a1)
 set(BUNDLER_VERSION 1.15.4)
 set(BUNDLER_HASH fad17ea3a1c15df2f2a7fcea052b35ebeab0dc87906cd762470637bef8c98472)
 set(ELASTICSEARCH_VERSION 2.4.5)


update FindGflags.cmake to work on CentOS 8.x (#1409)

Summary:
Update FindGflags.cmake to work on recent CentOS and RedHat distributions.

On these distributions the CMake package configuration installed by the
gflags-devel RPM is slightly broken, and sets `gflags_INCLUDE_DIR` to a
directory that does not exist.  This happens because `/lib64` is symlinked to
`/usr/lib64`, and CMake ends up searching `/lib64` before `/usr/lib64` by
default when searching for packages.  Therefore it finds `gflags-config.cmake`
via the `/lib64` symlink.  However, `gflags-config.cmake` computes the include
directory relative to where its config file was found, and this relative path
computation only works when using the actual `/usr/lib64` path where it was
installed.  When found via `/lib64` it returns a bogus `//include` path that
does not exist.

This updates `FindGflags.cmake` to verify if the `gflags_INCLUDE_DIR` path
actually exists, and set it to a sane location instead.

This also updates the code to use the `gflags-shared` target that is exported
by the default gflags package configuration if it was only built as a shared
library.

Pull Request resolved: https://github.com/facebook/folly/pull/1409

Reviewed By: yfeldblum

Differential Revision: D23588288

fbshipit-source-id: b68a717953ae0521f568d7bcfd05ca33cd6dc578

--- build/fbcode_builder/CMake/FindGflags.cmake
+++ build/fbcode_builder/CMake/FindGflags.cmake
@@ -41,6 +41,16 @@
   # Re-export the config-specified libs with our local names
   set(LIBGFLAGS_LIBRARY ${gflags_LIBRARIES})
   set(LIBGFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
+  if(NOT EXISTS "${gflags_INCLUDE_DIR}")
+    # The gflags-devel RPM on recent RedHat-based systems is somewhat broken.
+    # RedHat symlinks /lib64 to /usr/lib64, and this breaks some of the
+    # relative path computation performed in gflags-config.cmake.  The package
+    # config file ends up being found via /lib64, but the relative path
+    # computation it does only works if it was found in /usr/lib64.
+    # If gflags_INCLUDE_DIR does not actually exist, simply default it to
+    # /usr/include on these systems.
+    set(LIBGFLAGS_INCLUDE_DIR "/usr/include")
+  endif()
   set(LIBGFLAGS_FOUND ${gflags_FOUND})
   # cmake module compat
   set(GFLAGS_FOUND ${gflags_FOUND})
@@ -76,6 +86,20 @@
 # Compat with the gflags CONFIG based detection
 if (LIBGFLAGS_FOUND AND NOT TARGET gflags)
   add_library(gflags UNKNOWN IMPORTED)
-  set_target_properties(gflags PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}")
-  set_target_properties(gflags PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}")
+  if(TARGET gflags-shared)
+    # If the installed gflags CMake package config defines a gflags-shared
+    # target but not gflags, just make the gflags target that we define
+    # depend on the gflags-shared target.
+    target_link_libraries(gflags INTERFACE gflags-shared)
+    # Export LIBGFLAGS_LIBRARY as the gflags-shared target in this case.
+    set(LIBGFLAGS_LIBRARY gflags-shared)
+  else()
+    set_target_properties(
+      gflags
+      PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+        IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}"
+    )
+  endif()
 endif()


Update Eigen-pod to 3.2.6

Update Eigen-pod to 3.2.6

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

 set(Eigen_pod_url https://github.com/RobotLocomotion/eigen-pod.git)
-set(Eigen_pod_revision 3ec6bbfcb41a9ea74921720d62f86863fdf96217)
+set(Eigen_pod_revision 9061e9d5481fe0fdf55d5de322dfb1ed9d380a1c) # use newer Eigen - 3ec6bbfcb41a9ea74921720d62f86863fdf96217
 set(Eigen_pod_depends)

 set(opencv_url https://github.com/Itseez/opencv.git)


Remove reference to tf_contrib_metrics_set_ops stemming from merge conflict

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -494,8 +494,6 @@
   DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/contrib/factorization/python/ops/gen_factorization_ops.py)
 GENERATE_PYTHON_OP_LIB("contrib_framework_variable_ops"
   DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/contrib/framework/python/ops/gen_variable_ops.py)
-GENERATE_PYTHON_OP_LIB("contrib_metrics_set_ops"
-  DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/contrib/metrics/python/ops/gen_set_ops.py)

 add_custom_target(tf_python_ops SOURCES ${tf_python_ops_generated_files} ${PYTHON_PROTO_GENFILES})
 add_dependencies(tf_python_ops tf_python_op_gen_main)


Added VS 2008 Fbx SDK search path.

Added VS 2008 Fbx SDK search path.

--- FindFBX.cmake
+++ FindFBX.cmake
@@ -39,7 +39,7 @@
     find_library(${_name}
         NAMES ${ARGN}
         HINTS ${FBX_SEARCH_LOCATIONS}
-        PATH_SUFFIXES lib/gcc4/ub lib/vs2010/x64
+        PATH_SUFFIXES lib/gcc4/ub lib/vs2010/x64 lib/vs2008/x64
     )
     mark_as_advanced(${_name})
 endfunction()


fix: Remove VTK from list of dependencies, IO module used by tools only

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -35,17 +35,10 @@
   # ----------------------------------------------------------------------------
   # dependencies
   DEPENDS
-    MIRTK{Common,Numerics,Image,Transformation,IO}
-    "VTK-7|6{
-      vtkCommonCore,
-      vtkCommonDataModel,
-      vtkFiltersCore,
-      vtkFiltersGeneral,
-      vtkImagingCore
-    }"
+    MIRTK{Common,Numerics,Image}
     #<dependency>
   TOOLS_DEPENDS
-    #MIRTK{ImageIO}
+    MIRTK{IO}
   TEST_DEPENDS
     #<test-dependency>
   OPTIONAL_TEST_DEPENDS


add support for compiler launchers

add support for compiler launchers

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -833,7 +833,10 @@
 	endif()
 endmacro()

-function (cotire_init_compile_cmd _cmdVar _language _compilerExe _compilerArg1)
+function (cotire_init_compile_cmd _cmdVar _language _compilerLauncher _compilerExe _compilerArg1)
+	if (NOT _compilerLauncher)
+		set (_compilerLauncher ${CMAKE_${_language}_COMPILER_LAUNCHER})
+	endif()
 	if (NOT _compilerExe)
 		set (_compilerExe "${CMAKE_${_language}_COMPILER}")
 	endif()
@@ -841,7 +844,7 @@
 		set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})
 	endif()
 	string (STRIP "${_compilerArg1}" _compilerArg1)
-	set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE)
+	set (${_cmdVar} ${_compilerLauncher} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE)
 endfunction()

 macro (cotire_add_definitions_to_cmd _cmdVar _language)
@@ -1161,9 +1164,9 @@

 function (cotire_scan_includes _includesVar)
 	set(_options "")
-	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION LANGUAGE UNPARSED_LINES)
+	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_VERSION LANGUAGE UNPARSED_LINES)
 	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES
-		IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
+		IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
 	if (NOT _option_LANGUAGE)
@@ -1175,7 +1178,7 @@
 	if (NOT _option_COMPILER_VERSION)
 		set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}")
 	endif()
-	cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
+	cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_LAUNCHER}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
 	cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS})
 	cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})
 	cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)
@@ -1372,10 +1375,10 @@

 function (cotire_generate_prefix_header _prefixFile)
 	set(_options "")
-	set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION)
+	set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION)
 	set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS
 		INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH
-		IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
+		IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	if (NOT _option_COMPILER_ID)
 		set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}")
@@ -1408,7 +1411,9 @@
 	set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
 	cotire_scan_includes(_selectedHeaders ${_sourceFiles}
 		LANGUAGE "${_option_LANGUAGE}"
+		COMPILER_LAUNCHER "${_option_COMPILER_LAUNCHER}"
 		COMPILER_EXECUTABLE "${_option_COMPILER_EXECUTABLE}"
+		COMPILER_ARG1 "${_option_COMPILER_ARG1}"
 		COMPILER_ID "${_option_COMPILER_ID}"
 		COMPILER_VERSION "${_option_COMPILER_VERSION}"
 		COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS}
@@ -1766,8 +1771,8 @@

 function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile)
 	set(_options "")
-	set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION LANGUAGE)
-	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS)
+	set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION LANGUAGE)
+	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS COMPILER_LAUNCHER)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	if (NOT _option_LANGUAGE)
 		set (_option_LANGUAGE "CXX")
@@ -1778,7 +1783,7 @@
 	if (NOT _option_COMPILER_VERSION)
 		set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}")
 	endif()
-	cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
+	cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_LAUNCHER}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
 	cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS})
 	cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})
 	cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)
@@ -1829,8 +1834,8 @@
 	else()
 		set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE)
 	endif()
-	get_target_property(launcher ${_target} ${_language}_COMPILER_LAUNCHER)
-	if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR launcher MATCHES "ccache")
+	get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER)
+	if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR _launcher MATCHES "ccache")
 		if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros|pch_defines")
 			set (${_msgVar}
 				"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."
@@ -2094,6 +2099,7 @@
 		cotire_get_source_files_compile_definitions(
 			"${_config}" "${_language}" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${_targetSources})
 	endforeach()
+	get_target_property(COTIRE_TARGET_${_language}_COMPILER_LAUNCHER ${_target} ${_language}_COMPILER_LAUNCHER)
 	# set up COTIRE_TARGET_SOURCES
 	set (COTIRE_TARGET_SOURCES "")
 	foreach (_sourceFile ${_targetSources})
@@ -2121,7 +2127,7 @@
 	foreach (_var IN LISTS _matchVars ITEMS
 		XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES
 		CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION
-		CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
+		CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
 		CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP
 		CMAKE_INCLUDE_SYSTEM_FLAG_${_language}
 		CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG
@@ -3356,6 +3362,7 @@

 		cotire_generate_prefix_header(
 			"${COTIRE_ARGV3}" ${_files}
+			COMPILER_LAUNCHER "${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}"
 			COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}"
 			COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1}
 			COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}"
@@ -3382,6 +3389,7 @@

 		cotire_precompile_prefix_header(
 			"${COTIRE_ARGV3}" "${COTIRE_ARGV4}" "${COTIRE_ARGV5}"
+			COMPILER_LAUNCHER "${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}"
 			COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}"
 			COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1}
 			COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}"


use CMAKE_INCLUDE_FLAG_C and CMAKE_INCLUDE_FLAG_CXX

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -678,8 +678,23 @@
 	# parse target compile flags omitting compile definitions and include directives
 	set (_targetFlags "")
 	cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
+	set (_flagFilter "D")
+	if (CMAKE_INCLUDE_FLAG_${_language})
+		string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag)
+		string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}")
+		if (_includeFlag)
+			set (_flagFilter "${_flagFilter}|${_includeFlag}")
+		endif()
+	endif()
+	if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language})
+		string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag)
+		string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}")
+		if (_includeFlag)
+			set (_flagFilter "${_flagFilter}|${_includeFlag}")
+		endif()
+	endif()
 	set (_compilerFlags "")
-	cotire_filter_compile_flags("${_language}" "[ID]" _ignore _compilerFlags ${_targetFlags})
+	cotire_filter_compile_flags("${_language}" "${_flagFilter}" _ignore _compilerFlags ${_targetFlags})
 	if (COTIRE_DEBUG AND _compilerFlags)
 		message (STATUS "Target ${_target} compiler flags: ${_compilerFlags}")
 	endif()


Latest Gdal file

Latest Gdal file

--- external/UseGDAL.cmake
+++ external/UseGDAL.cmake
@@ -2,21 +2,33 @@
 set(NETCDF netcdf-4.3.0)
 set(NETCDF_TGZ ${NETCDF}.tar.gz)

-if(NOT EXISTS ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF_TGZ})
-  file(DOWNLOAD ftp://ftp.unidata.ucar.edu/pub/netcdf/${NETCDF_TGZ} ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF_TGZ} SHOW_PROGRESS)
-endif()

-if(NOT EXISTS ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF})
-  execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${NETCDF_TGZ} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth)
-endif()
+ExternalProject_Add(
+  netcdf
+  URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/${NETCDF_TGZ}"
+  CONFIGURE_COMMAND ""
+  BUILD_COMMAND ""
+  INSTALL_COMMAND ""
+)
+
+ExternalProject_Get_Property(netcdf SOURCE_DIR)
+
+  #if(NOT EXISTS ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF_TGZ})
+  #file(DOWNLOAD ftp://ftp.unidata.ucar.edu/pub/netcdf/${NETCDF_TGZ} ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF_TGZ} SHOW_PROGRESS)
+  #endif()
+
+  #if(NOT EXISTS ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF})
+  #execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${NETCDF_TGZ} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth)
+  #endif()

 ExternalProject_Add(
     gdal
+    DEPENDS netcdf
     URL "http://download.osgeo.org/gdal/1.10.1/gdal-1.10.1.tar.gz"
-    CONFIGURE_COMMAND <SOURCE_DIR>/configure --with-netcdf=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/${NETCDF} --prefix=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install
+    CONFIGURE_COMMAND <SOURCE_DIR>/configure --with-netcdf=${SOURCE_DIR} --prefix=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install
     BUILD_IN_SOURCE 1
-    BUILD_COMMAND make
-    INSTALL_COMMAND make install
+    #    BUILD_COMMAND make
+    INSTALL_COMMAND ${PLATFORM_INSTALL_COMMAND}
 )

 ExternalProject_Get_Property(gdal DOWNLOAD_DIR)


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -8,7 +8,7 @@
 set(CTEST_BUILD_OPTIONS "${JENKINS_BUILD_OPTIONS}")
 set(CTEST_BUILD_CONFIGURATION "${JENKINS_BUILD_CONFIGURATION}")

-set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "${CTEST_MEMORYCHECK_COMMAND_OPTIONS} -g --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --xml=yes --xml-file=test_%p_memcheck.xml")
+set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "${CTEST_MEMORYCHECK_COMMAND_OPTIONS} -q --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --xml=yes --xml-file=test_%p_memcheck.xml")

 set(CTEST_COVERAGE_CXX_FLAGS "-DCMAKE_CXX_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
 set(CTEST_COVERAGE_EXE_LD_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")


+ fixes #0001375: FreeCAD does not support of pivy and shiboken in Libpack8.x

--- cMake/UseLibPack8x.cmake
+++ cMake/UseLibPack8x.cmake
@@ -410,3 +410,22 @@
         TRUE
     )
 endif(FREECAD_USE_FREETYPE)
+
+
+#  SHIBOKEN_INCLUDE_DIR        - Directories to include to use SHIBOKEN
+#  SHIBOKEN_LIBRARY            - Files to link against to use SHIBOKEN
+#  SHIBOKEN_BINARY             - Executable name
+
+SET(SHIBOKEN_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/shiboken)
+SET(SHIBOKEN_LIBRARY     optimized ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.6.lib debug ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.6_d.lib)
+set(SHIBOKEN_BINARY      ${FREECAD_LIBPACK_DIR}/bin/shiboken)
+
+#  PYSIDE_INCLUDE_DIR   - Directories to include to use PySide
+#  PYSIDE_LIBRARY       - Files to link against to use PySide
+#  PYSIDE_PYTHONPATH    - Path to where the PySide Python module files could be found
+#  PYSIDE_TYPESYSTEMS   - Type system files that should be used by other bindings extending PySide
+
+SET(PYSIDE_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/PySide)
+SET(PYSIDE_LIBRARY     optimized ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.6.lib debug ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.6_d.lib)
+SET(PYSIDE_PYTHONPATH  ${FREECAD_LIBPACK_DIR}/pyside/Lib/site-packages)
+SET(PYSIDE_TYPESYSTEMS ${FREECAD_LIBPACK_DIR}/pyside/share/PySide/typesystems)


honor new target properties

honor new target properties

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3251,7 +3251,8 @@
 		INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)
 	# copy link stuff
 	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
-		BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
+		BUILD_WITH_INSTALL_RPATH BUILD_WITH_INSTALL_NAME_DIR
+		INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
 		LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED
 		LINK_FLAGS LINK_FLAGS_<CONFIG>
 		LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_<CONFIG>
@@ -3293,6 +3294,10 @@
 		ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES
 		ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH
 		ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE)
+	# copy CUDA platform specific stuff
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
+		CUDA_PTX_COMPILATION CUDA_SEPARABLE_COMPILATION CUDA_RESOLVE_DEVICE_SYMBOLS
+		CUDA_EXTENSIONS CUDA_STANDARD CUDA_STANDARD_REQUIRED)
 	# use output name from original target
 	get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME)
 	if (NOT _targetOutputName)


ccache gcc work-around

ccache gcc work-around

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -1863,13 +1863,12 @@
 	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 "Clang")
+	elseif (_option_COMPILER_ID MATCHES "GNU|Clang")
 		if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR
 			_option_COMPILER_EXECUTABLE MATCHES "ccache")
-			# Clang seems 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.
+			# 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()


start 1.7.9

start 1.7.9

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -43,7 +43,7 @@
 endif()

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

 # activate select policies
 if (POLICY CMP0025)


Updating version for patch to 0.5.1

Updating version for patch to 0.5.1

--- Version.cmake
+++ Version.cmake
@@ -1,7 +1,7 @@
 # Version info
 set(SimpleITK_Major 0)
 set(SimpleITK_Minor 5)
-set(SimpleITK_Patch 0)
+set(SimpleITK_Patch 1)

 include(GetGitRevisionDescription)
 get_git_head_revision(GIT_REFSPEC GIT_SHA1)


BUG: Flawed logic for NO_OUTPUT

BUG: Flawed logic for NO_OUTPUT

For python tests, the NO_OUTPUT was only present if NO_VALID was
0. This prevented tests that specified NO_VALID to fail if the
created output.

Change-Id: I48e83866b172091e7a70c84f763c2225ed6b2acb

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -192,9 +192,9 @@
       set(_V -V "DATA{${${vtk-module}_SOURCE_DIR}/Testing/Data/Baseline/${TName}.png,:}")
       set(_A -A ${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py)
     endif()
-    if(NOT no_output)
-      set(_T -T ${VTK_TEST_OUTPUT_DIR})
-    endif()
+  endif()
+  if(NOT no_output)
+    set(_T -T ${VTK_TEST_OUTPUT_DIR})
   endif()

   ExternalData_add_test(VTKData


Don't use CMake continue() yet

Don't use CMake continue() yet

--- CMakeModules/FCLMacros.cmake
+++ CMakeModules/FCLMacros.cmake
@@ -21,16 +21,12 @@
     string(LENGTH ${header} full_length)
     math(EXPR relative_path_length "${full_length} - ${suffix_length}")
     string(SUBSTRING ${header} ${suffix_length} ${relative_path_length} header)
-    if(${header} MATCHES "/detail/")
-      continue()
+    if(NOT ${header} MATCHES "/detail/" AND NOT ${header} MATCHES "-impl.h")
+      fcl_append_to_cached_string(
+        ${_var}
+        ${_cacheDesc}"_HEADER_NAMES"
+        "${header}\;")
     endif()
-    if(${header} MATCHES "-impl.h")
-      continue()
-    endif()
-    fcl_append_to_cached_string(
-      ${_var}
-      ${_cacheDesc}"_HEADER_NAMES"
-      "${header}\;")
   endforeach()
 endmacro()


cmake: export IDF_TARGET to menuconfig

cmake: export IDF_TARGET to menuconfig

Pass value of IDF_TARGET to menuconfig invocation.

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -205,6 +205,7 @@
         "COMPONENT_KCONFIGS_PROJBUILD=${kconfig_projbuilds}"
         "IDF_CMAKE=y"
         "KCONFIG_CONFIG=${sdkconfig}"
+        "IDF_TARGET=${idf_target}"
         ${mconf} ${root_kconfig}
         # VERBATIM cannot be used here because it cannot handle ${mconf}="winpty mconf-idf" and the escaping must be
         # done manually


Squashed '3rdparty/github/cmake-utils-remote/' changes from aaa7c50..3c115a5

3c115a5 Add test to check

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

--- cmake/MyPackageCheck.cmake
+++ cmake/MyPackageCheck.cmake
@@ -37,6 +37,7 @@
     ADD_TEST (NAME ${_name}
       COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" ${_name}
       WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
+    ADD_DEPENDENCIES(check ${_name})
   ENDFOREACH ()

 ENDMACRO()


attempting to make catkin_plugins work in install space as well as with catkin from source

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -241,11 +241,17 @@
     )
   endforeach()

-  execute_process(COMMAND ${catkin_SOURCE_DIR}/bin/catkin_plugins --depends ${CMAKE_CURRENT_SOURCE_DIR}
+
+  if (BUILDSPACE)
+    set(CATKIN_PLUGINS_PATH ${catkin_SOURCE_DIR}/bin/catkin_plugins)
+  else(BUILDSPACE)
+    set(CATKIN_PLUGINS_PATH ${CATKIN_GLOBAL_BIN_DESTINATION}/catkin_plugins)
+  endif(BUILDSPACE)
+  execute_process(COMMAND ${CATKIN_PLUGINS_PATH} --depends ${CMAKE_CURRENT_SOURCE_DIR}
     OUTPUT_VARIABLE EXTRA_PLUGIN_DEPENDS
     OUTPUT_STRIP_TRAILING_WHITESPACE)

-  execute_process(COMMAND ${catkin_SOURCE_DIR}/bin/catkin_plugins --exports ${CMAKE_CURRENT_SOURCE_DIR}
+  execute_process(COMMAND ${CATKIN_PLUGINS_PATH} --exports ${CMAKE_CURRENT_SOURCE_DIR}
     OUTPUT_VARIABLE EXTRA_PLUGIN_EXPORTS
     OUTPUT_STRIP_TRAILING_WHITESPACE)


Improved octave configuration for the Windows case.

Find path of hdf5.h.  (We got away with not finding the path to this
header on Linux because it is in a standard location, /usr/include.)

Take more care with PATH issues so that the native form is tranformed
to the CMake internal form.  (This is a no-op on Linux, but it
translates the native \ form to CMake / form of path on Windows.)

svn path=/trunk/; revision=11397

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -148,6 +148,29 @@
 	CACHE INTERNAL ""
 	)
       endif(NOT OCTAVE_INCLUDE_PATH_TRIMMED STREQUAL "${OCTAVE_INCLUDE_PATH}")
+      # Octave has a huge number of dependencies and therefore an
+      # impossible-to-untangle set of header #includes that depend on
+      # other packages headers.  And there is no information from
+      # mkoctfile or the octave octave_config_info command about where
+      # those header directories are located.  But from experiments
+      # with both the Linux and Windows binary versions of octave, it
+      # appears that hdf5.h is one external header that is necessary,
+      # and it is never part of the octave-${OCTAVE_VERSION}/octave
+      # hierarchy so that PATH_SUFFIXES signature is dropped.
+      find_path(
+	OCTAVE_INCLUDE_PATH_EXTERNAL
+	hdf5.h
+	)
+      if(OCTAVE_INCLUDE_PATH_EXTERNAL)
+        set(OCTAVE_INCLUDE_PATH
+	${OCTAVE_INCLUDE_PATH_EXTERNAL} ${OCTAVE_INCLUDE_PATH}
+	CACHE INTERNAL ""
+	)
+      else(OCTAVE_INCLUDE_PATH_EXTERNAL)
+	message(STATUS "WARNING: "
+	  "Required external octave header, hdf5.h, not found. Disabling octave bindings")
+	set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE)
+      endif(OCTAVE_INCLUDE_PATH_EXTERNAL)
     else(OCTAVE_INCLUDE_PATH AND OCTAVE_LIBRARIES AND OCTINTERP_LIBRARIES)
       message(STATUS "WARNING: "
       "octave headers and/or library not found. Disabling octave bindings")
@@ -188,6 +211,8 @@
   OUTPUT_VARIABLE OCTAVE_PREFIX
   )
   #message(STATUS "OCTAVE_PREFIX = ${OCTAVE_PREFIX}")
+  file(TO_CMAKE_PATH ${OCTAVE_PREFIX} OCTAVE_PREFIX)
+  #message(STATUS "(CMake) OCTAVE_PREFIX = ${OCTAVE_PREFIX}")

   # octave-2.1 (or higher) logic.
   #_OCTAVE_M_DIR
@@ -199,18 +224,25 @@
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
   OUTPUT_VARIABLE _OCTAVE_M_DIR
   )
+  #message(STATUS "_OCTAVE_M_DIR = ${_OCTAVE_M_DIR}")
+  file(TO_CMAKE_PATH ${_OCTAVE_M_DIR} _OCTAVE_M_DIR)
+  #message(STATUS "(CMake) _OCTAVE_M_DIR = ${_OCTAVE_M_DIR}")
+
   #OCTAVE_OCT_DIR
   if(NOT DEFINED OCTAVE_OCT_DIR)
-  file(WRITE ${CMAKE_BINARY_DIR}/octave_command
-  "printf(octave_config_info(\"localoctfiledir\"));"
-  )
-  execute_process(
-  COMMAND ${OCTAVE} -q -f octave_command
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-  OUTPUT_VARIABLE OCTAVE_OCT_DIR
-  )
+    file(WRITE ${CMAKE_BINARY_DIR}/octave_command
+      "printf(octave_config_info(\"localoctfiledir\"));"
+      )
+    execute_process(
+      COMMAND ${OCTAVE} -q -f octave_command
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+      OUTPUT_VARIABLE OCTAVE_OCT_DIR
+      )
+    #message(STATUS "OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}")
+    file(TO_CMAKE_PATH ${OCTAVE_OCT_DIR} OCTAVE_OCT_DIR)
+    #message(STATUS "(CMake) OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}")
   endif(NOT DEFINED OCTAVE_OCT_DIR)
-
+
   # Replace the OCTAVE_PREFIX with the PLplot prefix in OCTAVE_M_DIR
   string(REPLACE
   "${OCTAVE_PREFIX}"


Add command line arguments to Rscript to remove local options

The local user settings are suppressed, to ensure that the tests run
just what is intended without user setting having potential side
effects during test execution.

--- CMake/sitkAddTest.cmake
+++ CMake/sitkAddTest.cmake
@@ -229,7 +229,8 @@
     return()
   endif()

-  set(command "${RSCRIPT_EXECUTABLE}")
+  set(command "${RSCRIPT_EXECUTABLE}" "--no-save" "--no-restore"
+  "--no-site-file" "--no-init-file")

   # add extra command which may be needed on some systems
   if(CMAKE_OSX_ARCHITECTURES)


yet one bugfix for CMake macro add_wast_executable

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -136,7 +136,7 @@
   get_filename_component("${ARG_TARGET}_BC_FILENAME" "${CMAKE_CURRENT_SOURCE_DIR}/${ARG_TARGET}.bc" ABSOLUTE CACHE)
   #set("${ARG_TARGET}_BC_FILENAME" CACHE INTERNAL "${target} .bc file")

-  add_custom_command(OUTPUT ${target}.bc
+  add_custom_command(OUTPUT ${${ARG_TARGET}_BC_FILENAME}
     DEPENDS ${outfiles}
     COMMAND ${WASM_LLVM_LINK} -o ${${ARG_TARGET}_BC_FILENAME} ${outfiles}
     COMMENT "Linking LLVM bitcode library ${target}.bc"
@@ -157,7 +157,7 @@
      list(APPEND LIBRARIES ${${lib}_BC_FILENAME})
   endforeach()
   add_custom_command(OUTPUT ${target}.bc
-    DEPENDS ${outfiles} ${ARG_LIBRARIES} ${LIBRARIES}
+    DEPENDS ${outfiles} ${LIBRARIES}
     COMMAND ${WASM_LLVM_LINK} -only-needed -o ${target}.bc ${outfiles} ${LIBRARIES}
     COMMENT "Linking LLVM bitcode executable ${target}.bc"
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}


Add a standard path for lib dir

Add a standard path for lib dir

--- toolchain/Toolchain-Freescale-HC12.cmake
+++ toolchain/Toolchain-Freescale-HC12.cmake
@@ -11,6 +11,9 @@

 MESSAGE ("Loaded: Toolchain-Freescale-HC12.cmake")

+LIST(APPEND CMAKE_PROGRAM_PATH "C:/Program Files (x86)/Freescale/CWS12v5.1/Prog")
+
+SET (HC12_LIB_SEARCH_DIR "C:/Program Files (x86)/Freescale/CWS12v5.1/lib/hc12c/lib")

 SET (CMAKE_SYSTEM_NAME          "Freescale")
 SET (CMAKE_SYSTEM_VERSION       "0.0")


Address Python's pip upgrade warning

Address Python's pip upgrade warning

--- Wrapping/Python/LegacyPackaging.cmake
+++ Wrapping/Python/LegacyPackaging.cmake
@@ -101,7 +101,7 @@

   add_custom_command( TARGET PythonVirtualEnv
     POST_BUILD
-    COMMAND "${VIRTUAL_PYTHON_EXECUTABLE}" -m pip install numpy wheel
+    COMMAND "${VIRTUAL_PYTHON_EXECUTABLE}" -m pip --disable-pip-version-check install numpy wheel
 )
 endif()


Fixed handling of AMD64 processor architecture

--- cmake/modules/DispatchWindowsSupport.cmake
+++ cmake/modules/DispatchWindowsSupport.cmake
@@ -2,7 +2,7 @@
 function(dispatch_windows_arch_spelling arch var)
   if(${arch} STREQUAL i686)
     set(${var} x86 PARENT_SCOPE)
-  elseif(${arch} STREQUAL x86_64)
+  elseif(${arch} STREQUAL x86_64 OR ${arch} STREQUAL AMD64)
     set(${var} x64 PARENT_SCOPE)
   elseif(${arch} STREQUAL armv7)
     set(${var} arm PARENT_SCOPE)


bindings: fix inclusion of intercept

bindings: fix inclusion of intercept

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -85,11 +85,12 @@

 #compatibility for 0.8.18
 list (FIND BINDINGS "intercept" FINDEX)
-if (FINDEX GREATER -1 OR BINDINGS MATCHES "ALL")
+if (FINDEX GREATER -1)
 	set(BINDINGS_LIST_INTERCEPT
 		intercept_fs
 		intercept_env
 		)
+	set (BINDINGS_FORCE FORCE)
 endif()

 list (FIND BINDINGS "INTERCEPT" FINDEX)
@@ -98,12 +99,14 @@
 		intercept_fs
 		intercept_env
 		)
+	set (BINDINGS_FORCE FORCE)
 endif()

 if (BINDINGS MATCHES "ALL")
 	set(BINDINGS_LIST_ALL
 		jna
 		)
+	set (BINDINGS_FORCE FORCE)
 endif()

 set (BINDINGS_DOC "Which bindings should be added? ALL for all available, SWIG, GI for plugins based on respective technology, DEFAULT for minimal set.")


inside kdesupport the location for Automoc4Config.cmake has changed

svn path=/trunk/kdesupport/phonon/; revision=834172

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -20,7 +20,7 @@
 # check if we are inside KDESupport and automoc is enabled
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project as part of kdesupport
-   set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
+   set(AUTOMOC4_CONFIG_FILE "${KDESupport_BINARY_DIR}/automoc/Automoc4Config.cmake")
 else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project outside kdesupport


fix treatment of string variable as list

--- cmake/LLVM-IR-Util.cmake
+++ cmake/LLVM-IR-Util.cmake
@@ -256,10 +256,10 @@
 function(llvmir_extract_lang_flags out_lang_flags lang)
   set(lang_flags "")

-  list(APPEND lang_flags ${CMAKE_${lang}_FLAGS_${CMAKE_BUILD_TYPE}})
-  list(APPEND lang_flags ${CMAKE_${lang}_FLAGS})
-
-  list(REMOVE_DUPLICATES lang_flags)
+  set(lang_flags ${CMAKE_${lang}_FLAGS_${CMAKE_BUILD_TYPE}})
+  set(lang_flags "${lang_flags} ${CMAKE_${lang}_FLAGS}")
+
+  string(REPLACE "\ " ";" lang_flags ${lang_flags})

   debug("@llvmir_extract_lang_flags ${lang}: ${lang_flags}")


Revert "cmake: fixed incorrect usage of add_definitions() on Linux"

This reverts commit 286244efedd215600b6be72d4c25e48af0ed1c2d.

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -519,7 +519,11 @@

   if((NOT DEFINED OPENCV_MODULE_TYPE AND BUILD_SHARED_LIBS)
       OR (DEFINED OPENCV_MODULE_TYPE AND OPENCV_MODULE_TYPE STREQUAL SHARED))
-    set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
+    if(MSVC)
+      set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
+    else()
+      add_definitions(-DCVAPI_EXPORTS)
+    endif()
   endif()

   if(MSVC)


cmake: use `alpaka_set_compiler_options`

Use helper function `alpaka_set_compiler_options` to set compiler flags.

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -494,7 +494,7 @@
                 # nvidia bug id: 2448610
                 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
                     if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
-                        list(APPEND CUDA_NVCC_FLAGS -Dlinux)
+                        alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Dlinux)
                     endif()
                 endif()

@@ -503,23 +503,23 @@
                     alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS --expt-extended-lambda)
                 endif()
                 # This is mandatory because with c++14 many standard library functions we rely on are constexpr (std::min, std::multiplies, ...)
-                list(APPEND CUDA_NVCC_FLAGS --expt-relaxed-constexpr)
+                alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS --expt-relaxed-constexpr)

                 foreach(_CUDA_ARCH_ELEM ${ALPAKA_CUDA_ARCH})
                     # set flags to create device code for the given architecture
-                    list(APPEND CUDA_NVCC_FLAGS
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS
                         --generate-code=arch=compute_${_CUDA_ARCH_ELEM},code=sm_${_CUDA_ARCH_ELEM}
                         --generate-code=arch=compute_${_CUDA_ARCH_ELEM},code=compute_${_CUDA_ARCH_ELEM}
                     )
                 endforeach()

-                list(APPEND CUDA_NVCC_FLAGS -std=c++${ALPAKA_CXX_STANDARD})
+                alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -std=c++${ALPAKA_CXX_STANDARD})

                 set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})

                 if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
-                    list(APPEND CUDA_NVCC_FLAGS -g)
-                    list(APPEND CUDA_NVCC_FLAGS -lineinfo)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -g)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -lineinfo)
                 endif()

                 if(ALPAKA_FAST_MATH STREQUAL ON)
@@ -537,31 +537,29 @@
                 endif()

                 # Always add warning/error numbers which can be used for suppressions
-                list(APPEND CUDA_NVCC_FLAGS -Xcudafe=--display_error_number)
+                alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Xcudafe=--display_error_number)

                 # avoids warnings on host-device signatured, default constructors/destructors
-                list(APPEND CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored)
+                alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored)

                 # avoids warnings on host-device signature of 'std::__shared_count<>'
                 if(CUDA_VERSION EQUAL 10.0)
-                    list(APPEND CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=2905)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=2905)
                 elseif(CUDA_VERSION EQUAL 10.1)
-                    list(APPEND CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=2912)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=2912)
                 elseif(CUDA_VERSION EQUAL 10.2)
-                    list(APPEND CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=2976)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Xcudafe=--diag_suppress=2976)
                 endif()

                 if(ALPAKA_CUDA_KEEP_FILES STREQUAL ON)
-                    #file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/nvcc_tmp")
                     alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS --keep)
-                    #list(APPEND CUDA_NVCC_FLAGS --keep-dir="${PROJECT_BINARY_DIR}/nvcc_tmp")
                 endif()

                 option(ALPAKA_CUDA_SHOW_CODELINES "Show kernel lines in cuda-gdb and cuda-memcheck. If ALPAKA_CUDA_KEEP_FILES is enabled source code will be inlined in ptx." OFF)
                 if(ALPAKA_CUDA_SHOW_CODELINES)
-                    list(APPEND CUDA_NVCC_FLAGS --source-in-ptx -lineinfo)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS --source-in-ptx -lineinfo)
                     if(NOT MSVC)
-                        list(APPEND CUDA_NVCC_FLAGS -Xcompiler=-rdynamic)
+                        alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -Xcompiler=-rdynamic)
                     endif()
                 endif()
             endif()
@@ -628,31 +626,31 @@
                     set(HIP_VERBOSE_BUILD ON)
                 endif()

-                list(APPEND HIP_NVCC_FLAGS --expt-extended-lambda)
-                list(APPEND HIP_NVCC_FLAGS --expt-relaxed-constexpr)
+                alpaka_set_compiler_options(DEVICE list HIP_NVCC_FLAGS --expt-extended-lambda)
+                alpaka_set_compiler_options(DEVICE list HIP_NVCC_FLAGS --expt-relaxed-constexpr)
                 list(APPEND _ALPAKA_HIP_LIBRARIES "cudart")

                 foreach(_HIP_ARCH_ELEM ${ALPAKA_HIP_ARCH})
                     # set flags to create device code for the given architecture
-                    list(APPEND CUDA_NVCC_FLAGS
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS
                         --generate-code=arch=compute_${_HIP_ARCH_ELEM},code=sm_${_HIP_ARCH_ELEM}
                         --generate-code=arch=compute_${_HIP_ARCH_ELEM},code=compute_${_HIP_ARCH_ELEM}
                     )
                 endforeach()
                 # for CUDA cmake automatically adds compiler flags as nvcc does not do this,
                 # but for HIP we have to do this here
-                list(APPEND HIP_NVCC_FLAGS -D__CUDACC__)
-                list(APPEND HIP_NVCC_FLAGS -ccbin ${CMAKE_CXX_COMPILER})
+                alpaka_set_compiler_options(DEVICE list HIP_NVCC_FLAGS -D__CUDACC__)
+                alpaka_set_compiler_options(DEVICE list HIP_NVCC_FLAGS -ccbin ${CMAKE_CXX_COMPILER})

                 if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
-                    list(APPEND CUDA_NVCC_FLAGS -lineinfo)
-                    list(APPEND HIP_NVCC_FLAGS -Xcompiler=-g)
+                    alpaka_set_compiler_options(DEVICE list CUDA_NVCC_FLAGS -lineinfo)
+                    alpaka_set_compiler_options(DEVICE list HIP_NVCC_FLAGS -Xcompiler=-g)
                 endif()
                 # propage host flags
                 # SET(CUDA_PROPAGATE_HOST_FLAGS ON) # does not exist in HIP, so do it manually
                 string(TOUPPER "${CMAKE_BUILD_TYPE}" build_config)
                 foreach( _flag ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${build_config}})
-                    list(APPEND HIP_NVCC_FLAGS -Xcompiler=${_flag})
+                    alpaka_set_compiler_options(DEVICE list HIP_NVCC_FLAGS -Xcompiler=${_flag})
                 endforeach()

                 if(ALPAKA_FAST_MATH STREQUAL ON)
@@ -670,7 +668,7 @@
                 endif()

                 # avoids warnings on host-device signatured, default constructors/destructors
-                list(APPEND HIP_HIPCC_FLAGS -Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored)
+                alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS -Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored)

                 # random numbers library ( HIP(NVCC) ) /hiprand
                 # HIP_ROOT_DIR is set by FindHIP.cmake
@@ -718,7 +716,7 @@

                 foreach(_HIP_ARCH_ELEM ${ALPAKA_HIP_ARCH})
                     # set flags to create device code for the given architecture
-                    list(APPEND HIP_HIPCC_FLAGS --amdgpu-target=gfx${_HIP_ARCH_ELEM})
+                    alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS --amdgpu-target=gfx${_HIP_ARCH_ELEM})
                 endforeach()
             endif()

@@ -733,11 +731,11 @@
                 MESSAGE(FATAL_ERROR "Could not find hipRAND (also searched in: HIP_ROOT_DIR=${HIP_ROOT_DIR}/hiprand).")
             endif()

-            list(APPEND HIP_HIPCC_FLAGS -D__HIPCC__)
-            list(APPEND HIP_HIPCC_FLAGS -std=c++${ALPAKA_CXX_STANDARD})
+            alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS -D__HIPCC__)
+            alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS -std=c++${ALPAKA_CXX_STANDARD})

             if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
-                list(APPEND HIP_HIPCC_FLAGS -g)
+                alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS -g)
             endif()

             if(ALPAKA_HIP_KEEP_FILES STREQUAL ON)
@@ -823,7 +821,7 @@
                  TARGET alpaka
                  PROPERTY INTERFACE_COMPILE_DEFINITIONS)
     list_add_prefix("-D" _ALPAKA_COMPILE_DEFINITIONS_HIP)
-    list(APPEND HIP_HIPCC_FLAGS
+    alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS
         ${_ALPAKA_COMPILE_DEFINITIONS_HIP}
         )
     HIP_INCLUDE_DIRECTORIES(
@@ -895,20 +893,28 @@
                  TARGET alpaka
                  PROPERTY INTERFACE_COMPILE_OPTIONS)
     string(REPLACE ";" " " _ALPAKA_COMPILE_OPTIONS_STRING "${_ALPAKA_COMPILE_OPTIONS_PUBLIC}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_ALPAKA_COMPILE_OPTIONS_STRING}")
+    alpaka_set_compiler_options(HOST set CMAKE_CXX_FLAGS "${_ALPAKA_COMPILE_OPTIONS_STRING}")

     # Append CMAKE_CXX_FLAGS_[Release|Debug|RelWithDebInfo] to CMAKE_CXX_FLAGS
     # because FindCUDA only propagates the latter to nvcc.
     string(TOUPPER "${CMAKE_BUILD_TYPE}" build_config)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${build_config}}")
-endif()
-
-message("")
-message("List of compiler flags added by alpaka")
-message("host compiler:")
-message("    ${ALPAKA_COMPILER_OPTIONS_HOST}")
-message("device compiler:")
-message("    ${ALPAKA_COMPILER_OPTIONS_DEVICE}")
-message("host and device compiler:")
-message("    ${ALPAKA_COMPILER_OPTIONS_HOST_DEVICE}")
-message("")
+    alpaka_set_compiler_options(HOST set CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${build_config}}")
+endif()
+
+if(ALPAKA_COMPILER_OPTIONS_DEVICE OR ALPAKA_COMPILER_OPTIONS_DEVICE OR ALPAKA_COMPILER_OPTIONS_HOST_DEVICE)
+    message("")
+    message("List of compiler flags added by alpaka")
+    if(ALPAKA_COMPILER_OPTIONS_HOST)
+        message("host compiler:")
+        message("    ${ALPAKA_COMPILER_OPTIONS_HOST}")
+    endif()
+    if(ALPAKA_COMPILER_OPTIONS_DEVICE)
+        message("device compiler:")
+        message("    ${ALPAKA_COMPILER_OPTIONS_DEVICE}")
+    endif()
+    if(ALPAKA_COMPILER_OPTIONS_HOST_DEVICE)
+        message("host and device compiler:")
+        message("    ${ALPAKA_COMPILER_OPTIONS_HOST_DEVICE}")
+    endif()
+    message("")
+endif()


DOC: detect if OSSIM revision is 23537, and warn users if not

--- CMake/FindOssim.cmake
+++ CMake/FindOssim.cmake
@@ -28,6 +28,23 @@
   endif()
 endif()

+# Parse a certain header to check if SVN revision is 23537
+if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h")
+  file(STRINGS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h" _ossim_image_renderer_h_CONTENTS REGEX "^// \\$Id: ossimImageRenderer\\.h [0-9.]+ ")
+  string(REGEX REPLACE ".*ossimImageRenderer\\.h ([0-9.]+) .*" "\\1" _ossim_svn_revision_hint "${_ossim_image_renderer_h_CONTENTS}")
+  if(NOT "${_ossim_svn_revision_hint}" STREQUAL "23537")
+    message(WARNING "The OSSIM version found doesn't correspond to SVN revision 23537 (the recommended revision for OTB)."
+                      "There are known issues with version 1.8.16 (bugs in Sentinel1 "
+                      "calibration) and with official archive 1.8.20-1 (RpcModel returns "
+                      "nans outside the image extent)")
+  endif()
+  #message(STATUS "OSSIM SVN rev. hint : ${_ossim_svn_revision_hint}")
+else()
+  if(NOT Ossim_FIND_QUIETLY)
+    message(WARNING "ossimImageRenderer.h not found !")
+  endif()
+endif()
+
 find_library(OSSIM_LIBRARY
              NAMES ossim)


test build output

test build output

--- cmake/build_shared.cmake
+++ cmake/build_shared.cmake
@@ -55,7 +55,7 @@
   else()
     set_target_properties(${shared_target}
       PROPERTIES
-        PREFIX "lib"
+        PREFIX ""
     )
   endif()


Fix dependency information for the core tarball

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -24,8 +24,7 @@
     add_custom_command(
         COMMENT "Extracting ${core_tarball_name}"
         OUTPUT ${core_libraries}
-        DEPENDS ${core_temp_tarball}
-        COMMAND ${CMAKE_COMMAND} -E copy ${core_temp_tarball} ${core_directory_parent}
+        DEPENDS ${core_tarball}
         COMMAND ${CMAKE_COMMAND} -E tar xf ${core_tarball}
         COMMAND ${CMAKE_COMMAND} -E remove_directory ${core_directory}
         COMMAND ${CMAKE_COMMAND} -E rename core ${core_directory}


use xcfun v2.0.0

use xcfun v2.0.0

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -12,7 +12,7 @@
     GIT_REPOSITORY
       https://github.com/dftlibs/xcfun.git
     GIT_TAG
-      v2.0.0a6
+      v2.0.0
     )

   add_subdirectory(


cmake_force_c_compiler deprecation was pushed to cmake 3.6

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -74,7 +74,7 @@
 endif()

 # Set the compiler to ARM-GCC
-if(CMAKE_VERSION VERSION_LESS "3.5.0")
+if(CMAKE_VERSION VERSION_LESS "3.6.0")
     include(CMakeForceCompiler)
     cmake_force_c_compiler("${ARM_NONE_EABI_GCC}" GNU)
     cmake_force_cxx_compiler("${ARM_NONE_EABI_GPP}" GNU)


[cmake] silent process by default, use cmake cmd for other behavior.

--- cmake/externalFunc.cmake
+++ cmake/externalFunc.cmake
@@ -1,5 +1,3 @@
-set( CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT)
-
 include(ExternalInclude)

 macro(addExternalFolder NAME FOLDER )


Set CMAKE_UNIT_INVOKING_BINARY_DIR in header, not just Driver.cmake

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -286,6 +286,8 @@
          "set (CMAKE_UNIT_COVERAGE_FILE \"${CMAKE_UNIT_COVERAGE_FILE}\"\n"
          "     CACHE STRING \"\" FORCE)\n"
          "set (CMAKE_GENERATOR \"${CMAKE_GENERATOR}\")\n"
+         "set (CMAKE_UNIT_INVOKING_BINARY_DIR\n"
+         "     \"${CMAKE_CURRENT_BINARY_DIR}\")\n"
          ${DISPATCH_TABLE_PROP_LINE}
          ${DISCOVERED_TESTS_PROP_LINE}
          PARENT_SCOPE)
@@ -348,8 +350,6 @@
          "     CACHE BOOL \"\" FORCE)\n"
          "set (CMAKE_PROJECT_NAME\n"
          "     \"${CMAKE_PROJECT_NAME}\")\n"
-         "set (CMAKE_UNIT_INVOKING_BINARY_DIR\n"
-         "     \"${CMAKE_CURRENT_BINARY_DIR}\")\n"
          "set_property (GLOBAL PROPERTY\n"
          "              _CMAKE_UNIT_COVERAGE_LOGGING_FILES\n"
          "              ${COVERAGE_FILES})\n"


Link to ROS libs (ugly!)

Link to ROS libs (ugly!)

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

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -1,5 +1,15 @@
 # Look for ROS.
 # This is a temporary and ugly hack.
+
+macro(link_ros_libs _target)
+    if(USE_ROS)
+        target_link_libraries(${_target} sensor_msgs rosbag topic_tools ros
+            boost_thread-mt boost_signals-mt roscpp_serialization XmlRpc
+            rosconsole boost_thread-mt log4cxx rostime cpp_common roslib
+            rospack rosstack)
+    endif(USE_ROS)
+endmacro(link_ros_libs)
+

 macro(get_ros_inc_path _dest _pkg)
     execute_process(COMMAND rospack find ${_pkg}
@@ -10,6 +20,7 @@
         message(STATUS "Found ROS package ${_pkg} path: ${${_dest}}")
     endif(RESULT_VARIABLE)
 endmacro(get_ros_inc_path)
+

 if(ENV{ROS_ROOT})
     option(USE_ROS "Integrate with ROS rather than using native files" ON)


sphinx patch.

sphinx patch.

--- cmake/tools/sphinx.cmake
+++ cmake/tools/sphinx.cmake
@@ -30,12 +30,14 @@
   "Deploy destination for docs, or OFF.  Will be passed to rsync; may contain user@ syntax for ssh"
   )

-if (NOT TARGET doc)
+if (NOT TARGET sphinx-doc)
   add_custom_target(sphinx-doc)
 endif()

 if(CATKIN_DOCS_DEPLOY_DESTINATION)
-  add_custom_target(sphinx-deploy)
+    if (NOT TARGET sphinx-deploy)
+        add_custom_target(sphinx-deploy)
+    endif()
 endif()

 macro(find_sphinx)


--- common/cmake/clang.cmake
+++ common/cmake/clang.cmake
@@ -124,11 +124,15 @@
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG")  # configure TBB in debug mode
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")               # generate debug information
 <<<<<<< HEAD
+<<<<<<< HEAD
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")             # allow inlining of intrinsics
 >>>>>>> revery accidental commit of debug optimiazation level change
 =======
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")             # allow inlining of intrinsics
 >>>>>>> remove enabling/diabling functions - move scene stat counting to preCommit
+=======
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")             # allow inlining of intrinsics
+>>>>>>> revery accidental commit of debug optimiazation level change

   SET(CMAKE_CXX_FLAGS_RELEASE "")
   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")     # disable assertions


[R-package] characterize all cmake messages (#3105)

--- R-package/src/cmake/modules/FindLibR.cmake
+++ R-package/src/cmake/modules/FindLibR.cmake
@@ -30,7 +30,7 @@
 # https://docs.microsoft.com/en-us/cpp/build/reference/link-input-files?redirectedfrom=MSDN&view=vs-2019
 function(create_rlib_for_msvc)

-  message("Creating R.lib and R.def")
+  message(STATUS "Creating R.lib and R.def")

   # various checks and warnings
   if(NOT WIN32 OR NOT MSVC)
@@ -67,7 +67,7 @@
 # an R script (src/install.libs.R), that script uses R's built-ins to
 # find the version of R and pass it through as a CMake variable
 if(CMAKE_R_VERSION)
-  message("R version passed into FindLibR.cmake: ${CMAKE_R_VERSION}")
+  message(STATUS "R version passed into FindLibR.cmake: ${CMAKE_R_VERSION}")
 elseif(WIN32)
   message(FATAL_ERROR "Expected CMAKE_R_VERSION to be passed in on Windows but none was provided. Check src/install.libs.R")
 endif()


Update FW with stability fixes

Update FW with stability fixes

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "ddf12633822999475209293f5298fc1419b423ea")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "06e791bb9f6cefc968889a7ae7918ed0ff49e897")

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


update device side commit

update device side commit

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "5d00b3c373f7d7a69f7df9685acb9fe9fbe76763")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "ac2b4143d35f2b0e3cf933b2cc210654515f0880")

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


cmake px4fmu-v1 config: remove pwm_out_sim from build

To reduce flash space usage

--- cmake/configs/nuttx_px4fmu-v1_default.cmake
+++ cmake/configs/nuttx_px4fmu-v1_default.cmake
@@ -28,7 +28,7 @@
 	#drivers/ll40ls
 	drivers/trone
 	drivers/gps
-	drivers/pwm_out_sim
+	#drivers/pwm_out_sim
 	#drivers/hott
 	#drivers/hott/hott_telemetry
 	#drivers/hott/hott_sensors


px4fmu-v2 cmake config: disable team blacksheep telemetry driver

we're out of flash again :/

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -44,7 +44,7 @@
 	drivers/vmount
 	drivers/pwm_input
 	drivers/camera_trigger
-	drivers/bst
+	#drivers/bst
 	#drivers/snapdragon_rc_pwm
 	drivers/lis3mdl
 	#drivers/iridiumsbd


Sort and sync FMUv3 config

Sort and sync FMUv3 config

--- cmake/configs/nuttx_px4fmu-v3_default.cmake
+++ cmake/configs/nuttx_px4fmu-v3_default.cmake
@@ -8,46 +8,50 @@
 	#
 	# Board support modules
 	#
+	drivers/airspeed
+	drivers/blinkm
+	drivers/bmi160
+	drivers/bmp280
+	drivers/boards/px4fmu-v2
+	drivers/bst
+	drivers/camera_trigger
 	drivers/device
+	drivers/ets_airspeed
+	drivers/frsky_telemetry
+	drivers/gps
+	drivers/hmc5883
+	drivers/hott
+	drivers/hott/hott_sensors
+	drivers/hott/hott_telemetry
+	drivers/l3gd20
+	drivers/led
+	drivers/lis3mdl
+	drivers/ll40ls
+	drivers/lsm303d
+	drivers/mb12xx
+	drivers/meas_airspeed
+	drivers/mkblctrl
+	drivers/mpu6000
+	drivers/mpu9250
+	drivers/ms5611
+	drivers/oreoled
+	drivers/pwm_input
+	drivers/pwm_out_sim
+	drivers/px4flow
+	drivers/px4fmu
+	drivers/px4io
+	drivers/rgbled
+	drivers/sf0x
+	drivers/sf1xx
+	drivers/snapdragon_rc_pwm
+	drivers/srf02
 	drivers/stm32
 	drivers/stm32/adc
 	drivers/stm32/tone_alarm
-	drivers/led
-	drivers/px4fmu
-	drivers/px4io
-	drivers/boards/px4fmu-v2
-	drivers/rgbled
-	drivers/mpu6000
-	drivers/mpu9250
-	drivers/lsm303d
-	drivers/l3gd20
-	drivers/hmc5883
-	drivers/ms5611
-	#drivers/mb12xx
-	#drivers/srf02
-	drivers/sf0x
-	drivers/ll40ls
+	drivers/tap_esc
 	drivers/trone
-	drivers/gps
-	drivers/pwm_out_sim
-	#drivers/hott
-	#drivers/hott/hott_telemetry
-	#drivers/hott/hott_sensors
-	#drivers/blinkm
-	drivers/airspeed
-	drivers/ets_airspeed
-	drivers/meas_airspeed
-	drivers/frsky_telemetry
+	drivers/vmount
 	modules/sensors
-	#drivers/mkblctrl
-	drivers/px4flow
-	#drivers/oreoled
-	#drivers/vmount
-	drivers/pwm_input
-	drivers/camera_trigger
-	drivers/bst
-	drivers/snapdragon_rc_pwm
-	drivers/lis3mdl

 	#
 	# System commands
@@ -72,40 +76,41 @@
 	#
 	# Testing
 	#
-	#drivers/sf0x/sf0x_tests
-	#drivers/test_ppm
+	drivers/sf0x/sf0x_tests
+	drivers/test_ppm
 	#lib/rc/rc_tests
-	#modules/commander/commander_tests
-	#modules/controllib_test
-	#modules/mavlink/mavlink_tests
-	#modules/unit_test
-	#modules/uORB/uORB_tests
-	#systemcmds/tests
+	modules/commander/commander_tests
+	modules/controllib_test
+	modules/mavlink/mavlink_tests
+	modules/mc_pos_control/mc_pos_control_tests
+	modules/unit_test
+	modules/uORB/uORB_tests
+	systemcmds/tests

 	#
 	# General system control
 	#
 	modules/commander
+	modules/gpio_led
+	modules/land_detector
 	modules/load_mon
+	modules/mavlink
 	modules/navigator
-	modules/mavlink
-	modules/gpio_led
 	modules/uavcan
-	modules/land_detector

 	#
 	# Estimation modules
 	#
 	modules/attitude_estimator_q
+	modules/ekf2
+	modules/local_position_estimator
 	modules/position_estimator_inav
-	modules/local_position_estimator
-	modules/ekf2

 	#
 	# Vehicle Control
 	#
+	modules/fw_att_control
 	modules/fw_pos_control_l1
-	modules/fw_att_control
 	modules/mc_att_control
 	modules/mc_pos_control
 	modules/vtol_att_control
@@ -119,28 +124,28 @@
 	#
 	# Library modules
 	#
+	modules/dataman
 	modules/param
 	modules/systemlib
 	modules/systemlib/mixer
 	modules/uORB
-	modules/dataman

 	#
 	# Libraries
 	#
 	lib/controllib
-	lib/mathlib
-	lib/mathlib/math/filter
+	lib/conversion
+	lib/DriverFramework/framework
 	lib/ecl
 	lib/external_lgpl
 	lib/geo
 	lib/geo_lookup
-	lib/conversion
 	lib/launchdetection
-	lib/terrain_estimation
+	lib/mathlib
+	lib/mathlib/math/filter
 	lib/runway_takeoff
 	lib/tailsitter_recovery
-	lib/DriverFramework/framework
+	lib/terrain_estimation
 	platforms/nuttx

 	# had to add for cmake, not sure why wasn't in original config
@@ -150,12 +155,12 @@
 	#
 	# OBC challenge
 	#
-	#modules/bottle_drop
+	modules/bottle_drop

 	#
 	# Rover apps
 	#
-	#examples/rover_steering_control
+	examples/rover_steering_control

 	#
 	# Demo apps
@@ -163,7 +168,7 @@
 	#examples/math_demo
 	# Tutorial code from
 	# https://px4.io/dev/px4_simple_app
-	#examples/px4_simple_app
+	examples/px4_simple_app

 	# Tutorial code from
 	# https://px4.io/dev/daemon
@@ -179,6 +184,9 @@

 	# Hardware test
 	#examples/hwtest
+
+	# EKF
+	examples/ekf_att_pos_estimator
 )

 set(config_extra_builtin_cmds


Check the existence of GLU package to enable opengl

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -298,11 +298,11 @@
   else()
     find_package(OpenGL)
   endif()
-  if(NOT OPENGL_FOUND)
-    if(fail-on-missing)
-      message(FATAL_ERROR "OpenGL package not found and opengl option required")
-    else()
-      message(STATUS "OpenGL not found. Switching off opengl option")
+  if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND)
+    if(fail-on-missing)
+      message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required")
+    else()
+      message(STATUS "OpenGL (with GLU) not found. Switching off opengl option")
       set(opengl OFF CACHE BOOL "" FORCE)
     endif()
   endif()


More fixes for building netxng for CMake

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -587,11 +587,18 @@
                -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                -DCMAKE_CXX_FLAGS=${__cxxflags}
   )
+  # We cannot call find_package(XROOTD) becuase the package is not yet built. So, we need to emulate what it defines....
+  set(_LIBDIR_DEFAULT "lib")
+  if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version")
+    if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+      set(_LIBDIR_DEFAULT "lib64")
+    endif()
+  endif()
   set(XROOTD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include/xrootd ${CMAKE_BINARY_DIR}/include/xrootd/private)
-  set(XROOTD_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libXrdMain${CMAKE_SHARED_LIBRARY_SUFFIX}
-                       ${CMAKE_BINARY_DIR}/lib/libXrdUtils${CMAKE_SHARED_LIBRARY_SUFFIX}
-                       ${CMAKE_BINARY_DIR}/lib/libXrdClient${CMAKE_SHARED_LIBRARY_SUFFIX}
-                       ${CMAKE_BINARY_DIR}/lib/libXrdCl${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(XROOTD_LIBRARIES ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdMain${CMAKE_SHARED_LIBRARY_SUFFIX}
+                       ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdUtils${CMAKE_SHARED_LIBRARY_SUFFIX}
+                       ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdClient${CMAKE_SHARED_LIBRARY_SUFFIX}
+                       ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdCl${CMAKE_SHARED_LIBRARY_SUFFIX})
   set(XROOTD_CFLAGS "-DROOTXRDVERS=${xrootd_versionnum}")
   set(xrootd ON CACHE BOOL "" FORCE)
 endif()


[PyROOT][CMake] Change ERROR to a WARNING when pyroot_experimental flag is used

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1571,7 +1571,7 @@

 #---Check for deprecated PyROOT experimental ---------------------------------------------
 if(pyroot_experimental)
-  message(FATAL_ERROR "pyroot_experimental is now called pyroot! Please reconfigure with -Dpyroot=ON")
+  message(WARNING "pyroot_experimental is a deprecated flag from 6.22.00. To build the new PyROOT, just configure with -Dpyroot=ON.")
 endif()

 #---Check for MPI---------------------------------------------------------------------


Fixed Java language bindings.

Fixed Java language bindings.

--- copasi/bindings/java/compile-native-files.cmake
+++ copasi/bindings/java/compile-native-files.cmake
@@ -35,6 +35,7 @@
         "${BIN_DIRECTORY}/java-files/org/COPASI/CCopasiParameter.java"
         "${BIN_DIRECTORY}/java-files/org/COPASI/CReaction.java"
         "${BIN_DIRECTORY}/java-files/org/COPASI/CModel.java"
+        "${BIN_DIRECTORY}/java-files/org/COPASI/CUndoData.java"
      )

 foreach(broken_file ${SWIG_ENUM_FIX_FILES})


ql: cmake: install lib files if they exist

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

--- quicklogic/common/cmake/quicklogic_install.cmake
+++ quicklogic/common/cmake/quicklogic_install.cmake
@@ -218,8 +218,10 @@

   if(NOT "${DEVICE}" STREQUAL "ql-pp3e" AND NOT "${DEVICE}" STREQUAL "ql-eos-s3")
 	  # install lib files
-	  install(DIRECTORY ${QLF_FPGA_DATABASE_DIR}/${FAMILY}/lib/
-		  DESTINATION "share/symbiflow/arch/${DEVICE}_${PACKAGE}/lib")
+	  if(EXISTS "${QLF_FPGA_DATABASE_DIR}/${FAMILY}/lib" AND IS_DIRECTORY "${QLF_FPGA_DATABASE_DIR}/${FAMILY}/lib")
+		install(DIRECTORY ${QLF_FPGA_DATABASE_DIR}/${FAMILY}/lib/
+			DESTINATION "share/symbiflow/arch/${DEVICE}_${PACKAGE}/lib")
+	  endif()
   else()
 	  message(status ": workaround: skipping lib install for ${DEVICE} device")
   endif()


add 11.0 to list of supported versions

add 11.0 to list of supported versions

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -240,7 +240,7 @@
 	# Mathematica products in order of preference
 	set (_MathematicaApps "Mathematica" "gridMathematica Server")
 	# Mathematica product versions in order of preference
-	set (_MathematicaVersions "10.4" "10.3" "10.2" "10.1" "10.0" "9.0" "8.0" "7.0" "6.0" "5.2")
+	set (_MathematicaVersions "11.0" "10.4" "10.3" "10.2" "10.1" "10.0" "9.0" "8.0" "7.0" "6.0" "5.2")
 	# search for explicitly requested application version first
 	if (Mathematica_FIND_VERSION AND Mathematica_FIND_VERSION_EXACT)
 		foreach (_product IN LISTS _MathematicaApps)


Fix mt build.

Fix mt build.

--- src/inserts/generate.cmake
+++ src/inserts/generate.cmake
@@ -91,7 +91,7 @@
         # if turned on, build exe with the same configiguration (debug, relwithdebinfo etc.)
         add_variable(GEN_CHILD_VARS CPPAN_BUILD_EXECUTABLES_WITH_SAME_CONFIGURATION)
         add_variable(GEN_CHILD_VARS CPPAN_COMMAND)
-        if (EXECUTABLE)
+        if (NOT EXECUTABLE)
             add_variable(GEN_CHILD_VARS CPPAN_MT_BUILD) # not for exe
         endif()
         add_variable(GEN_CHILD_VARS CPPAN_CMAKE_VERBOSE)


Fix Boost detection on OS X when gcc command-line version is not 4.0 We use 4.0 currently so that we can maintain OS X 10.4 compatibility

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -121,6 +121,11 @@
 		# Statically linking boost to a dynamic Ogre build doesn't work on Linux 64bit
 		set(Boost_USE_STATIC_LIBS ${OGRE_STATIC})
 	endif ()
+	if (APPLE)
+	    # Boost tries to detect the gcc compiler version by calling the command-line
+	    # However we build with gcc 4.0 for OS X 10.4 compatibility, command-line default might be different
+		set(Boost_COMPILER "-xgcc40")
+	endif()
 	set(Boost_ADDITIONAL_VERSIONS "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
 	# Components that need linking (NB does not include header-only components like bind)
 	set(OGRE_BOOST_COMPONENTS thread date_time)


ENH: Quote names for spaces in paths

ENH: Quote names for spaces in paths

--- CMake/vtkExportKit.cmake
+++ CMake/vtkExportKit.cmake
@@ -5,14 +5,14 @@
   SET(KIT_EXCLUDE_LIST)
   FOREACH(src ${sources})
     STRING(REGEX REPLACE "\\.cxx$" "" CLASS "${src}")
-    SET(KIT_CLASS_LIST "${KIT_CLASS_LIST}\n  ${CLASS}")
+    SET(KIT_CLASS_LIST "${KIT_CLASS_LIST}\n  \"${CLASS}\"")
     GET_SOURCE_FILE_PROPERTY(IS_ABSTRACT ${src} ABSTRACT)
     IF(IS_ABSTRACT MATCHES "^1$")
-      SET(KIT_ABSTRACT_LIST "${KIT_ABSTRACT_LIST}\n  ${CLASS}")
+      SET(KIT_ABSTRACT_LIST "${KIT_ABSTRACT_LIST}\n  \"${CLASS}\"")
     ENDIF(IS_ABSTRACT MATCHES "^1$")
     GET_SOURCE_FILE_PROPERTY(IS_EXCLUDE ${src} WRAP_EXCLUDE)
     IF(IS_EXCLUDE MATCHES "^1$")
-      SET(KIT_EXCLUDE_LIST "${KIT_EXCLUDE_LIST}\n  ${CLASS}")
+      SET(KIT_EXCLUDE_LIST "${KIT_EXCLUDE_LIST}\n  \"${CLASS}\"")
     ENDIF(IS_EXCLUDE MATCHES "^1$")
   ENDFOREACH(src)
   SET(VTK_EXPORT_KIT ${kit})


Update PythonQt

Update PythonQt

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -90,7 +90,7 @@
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_DIR:PATH=${DCMTK_DIR}
         -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_c5e4c2a7_patched.tar.gz
-        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_a081f9d6.tar.gz
+        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_1660b8bd.tar.gz
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}
       CMAKE_CACHE_DEFAULT_ARGS