Fix indentation

Fix indentation

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -11,47 +11,47 @@
     INCLUDE(ExternalProject)

     # Only build the libraries we need
-    SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
+    SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
                        --with-program_options --with-date_time --with-thread
                        --with-regex)
-
-	IF (NOT WIN32)
+
+        IF (NOT WIN32)
     # We need -fPIC for 64-bit builds
         IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
             SET(BOOST_FLAGS cxxflags=-fPIC cflags=-fPIC linkflags=-fPIC)
         ENDIF ()
     ENDIF()

-	# Build Boost
+        # Build Boost
     IF (APPLE)
         SET(TOOLSET darwin)
     ELSE(APPLE)
         SET(TOOLSET gcc)
     ENDIF(APPLE)

-	IF (NOT WIN32)
-    	EXTERNALPROJECT_ADD(
-	    boost
-	    PREFIX ${TPSRC}
-	    URL ${TPURL}/boost_1_55_0.tar.bz2
-	    URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
-	    STAMP_DIR ${TPBUILD}/stamp
-	    DOWNLOAD_DIR ${TPSRC}
-	    SOURCE_DIR ${TPBUILD}/boost
-	    BINARY_DIR ${TPBUILD}/boost
-	    TMP_DIR ${TPBUILD}/boost-tmp
-	    INSTALL_DIR ${TPDIST}
-	    CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ./bootstrap.sh --prefix=${TPDIST}
+        IF (NOT WIN32)
+        EXTERNALPROJECT_ADD(
+            boost
+            PREFIX ${TPSRC}
+            URL ${TPURL}/boost_1_55_0.tar.bz2
+            URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
+            STAMP_DIR ${TPBUILD}/stamp
+            DOWNLOAD_DIR ${TPSRC}
+            SOURCE_DIR ${TPBUILD}/boost
+            BINARY_DIR ${TPBUILD}/boost
+            TMP_DIR ${TPBUILD}/boost-tmp
+            INSTALL_DIR ${TPDIST}
+            CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ./bootstrap.sh --prefix=${TPDIST}
             BUILD_COMMAND NO_BZIP2=1 ./b2
                             variant=release
-                            link=shared
+                            link=shared
                             include=${TPDIST}/include
                             linkflags="-L${TPDIST}/lib"
-                            ${BOOST_FLAGS} ${BOOST_LIB_LIST}
+                            ${BOOST_FLAGS} ${BOOST_LIB_LIST}
                             --layout=system toolset=${TOOLSET} install
             INSTALL_COMMAND ""
         )
-	ELSE ()
+        ELSE ()
         EXTERNALPROJECT_ADD(
             boost
             PREFIX ${TPSRC}
@@ -67,16 +67,16 @@
             BUILD_COMMAND b2 variant=release
                              toolset=msvc-12.0
                              address-model=32
-	                     -s NO_BZIP2=1
-	                     -s ZLIB_BINARY=zlib
-	                     -s ZLIB_INCLUDE=${TPDIST}/include
-	                     -s ZLIB_LIBPATH=${TPDIST}/lib
-	                     ${BOOST_LIB_LIST}
-	                     --layout=system --prefix=${TPDIST} install
+                             -s NO_BZIP2=1
+                             -s ZLIB_BINARY=zlib
+                             -s ZLIB_INCLUDE=${TPDIST}/include
+                             -s ZLIB_LIBPATH=${TPDIST}/lib
+                             ${BOOST_LIB_LIST}
+                             --layout=system --prefix=${TPDIST} install
             INSTALL_COMMAND ""
         )
-	ENDIF()
-
+        ENDIF()
+
     IF (APPLE)
         EXTERNALPROJECT_ADD_STEP(boost patch-install-path
             COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPSRC}/boost/tools/build/v2/tools/darwin.jam
@@ -91,57 +91,57 @@

     # Set up CMake variables
     IF (WIN32)
-	SET(Boost_DATE_TIME_LIBRARY libboost_date_time)
-	SET(Boost_DATE_TIME_LIBRARY_DEBUG libboost_date_time)
-	SET(Boost_DATE_TIME_LIBRARY_RELEASE libboost_date_time)
-	SET(Boost_FILESYSTEM_LIBRARY libboost_filesystem)
-	SET(Boost_FILESYSTEM_LIBRARY_DEBUG libboost_filesystem)
-	SET(Boost_FILESYSTEM_LIBRARY_RELEASE libboost_filesystem)
-	SET(Boost_IOSTREAMS_LIBRARY libboost_iostreams)
-	SET(Boost_IOSTREAMS_LIBRARY_DEBUG libboost_iostreams)
-	SET(Boost_IOSTREAMS_LIBRARY_RELEASE libboost_iostreams)
-	SET(Boost_PROGRAM_OPTIONS_LIBRARY libboost_program_options)
-	SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG libboost_program_options)
-	SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE libboost_program_options)
-	SET(Boost_REGEX_LIBRARY libboost_regex)
-	SET(Boost_REGEX_LIBRARY_DEBUG libboost_regex)
-	SET(Boost_REGEX_LIBRARY_RELEASE libboost_regex)
-	SET(Boost_SYSTEM_LIBRARY libboost_system)
-	SET(Boost_SYSTEM_LIBRARY_DEBUG libboost_system)
-	SET(Boost_SYSTEM_LIBRARY_RELEASE libboost_system)
-	SET(Boost_THREAD_LIBRARY libboost_thread)
-	SET(Boost_THREAD_LIBRARY_DEBUG libboost_thread)
-	SET(Boost_THREAD_LIBRARY_RELEASE libboost_thread)
-	SET(Boost_INCLUDE_DIRS ${TPDIST}/include)
-	SET(Boost_LIBRARY_DIRS ${TPDIST}/lib)
-	MESSAGE(STATUS ${Boost_DATE_TIME_LIBRARY})
-	LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+        SET(Boost_DATE_TIME_LIBRARY libboost_date_time)
+        SET(Boost_DATE_TIME_LIBRARY_DEBUG libboost_date_time)
+        SET(Boost_DATE_TIME_LIBRARY_RELEASE libboost_date_time)
+        SET(Boost_FILESYSTEM_LIBRARY libboost_filesystem)
+        SET(Boost_FILESYSTEM_LIBRARY_DEBUG libboost_filesystem)
+        SET(Boost_FILESYSTEM_LIBRARY_RELEASE libboost_filesystem)
+        SET(Boost_IOSTREAMS_LIBRARY libboost_iostreams)
+        SET(Boost_IOSTREAMS_LIBRARY_DEBUG libboost_iostreams)
+        SET(Boost_IOSTREAMS_LIBRARY_RELEASE libboost_iostreams)
+        SET(Boost_PROGRAM_OPTIONS_LIBRARY libboost_program_options)
+        SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG libboost_program_options)
+        SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE libboost_program_options)
+        SET(Boost_REGEX_LIBRARY libboost_regex)
+        SET(Boost_REGEX_LIBRARY_DEBUG libboost_regex)
+        SET(Boost_REGEX_LIBRARY_RELEASE libboost_regex)
+        SET(Boost_SYSTEM_LIBRARY libboost_system)
+        SET(Boost_SYSTEM_LIBRARY_DEBUG libboost_system)
+        SET(Boost_SYSTEM_LIBRARY_RELEASE libboost_system)
+        SET(Boost_THREAD_LIBRARY libboost_thread)
+        SET(Boost_THREAD_LIBRARY_DEBUG libboost_thread)
+        SET(Boost_THREAD_LIBRARY_RELEASE libboost_thread)
+        SET(Boost_INCLUDE_DIRS ${TPDIST}/include)
+        SET(Boost_LIBRARY_DIRS ${TPDIST}/lib)
+        MESSAGE(STATUS ${Boost_DATE_TIME_LIBRARY})
+        LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
     ELSE()
-	SET(Boost_DATE_TIME_LIBRARY boost_date_time)
-	SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)
-	SET(Boost_DATE_TIME_LIBRARY_RELEASE boost_date_time)
-	SET(Boost_FILESYSTEM_LIBRARY boost_filesystem)
-	SET(Boost_FILESYSTEM_LIBRARY_DEBUG boost_filesystem)
-	SET(Boost_FILESYSTEM_LIBRARY_RELEASE boost_filesystem)
-	SET(Boost_IOSTREAMS_LIBRARY boost_iostreams)
-	SET(Boost_IOSTREAMS_LIBRARY_DEBUG boost_iostreams)
-	SET(Boost_IOSTREAMS_LIBRARY_RELEASE boost_iostreams)
-	SET(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
-	SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG boost_program_options)
-	SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE boost_program_options)
-	SET(Boost_REGEX_LIBRARY boost_regex)
-	SET(Boost_REGEX_LIBRARY_DEBUG boost_regex)
-	SET(Boost_REGEX_LIBRARY_RELEASE boost_regex)
-	SET(Boost_SYSTEM_LIBRARY boost_system)
-	SET(Boost_SYSTEM_LIBRARY_DEBUG boost_system)
-	SET(Boost_SYSTEM_LIBRARY_RELEASE boost_system)
-	SET(Boost_THREAD_LIBRARY boost_thread)
-	SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
-	SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
-	SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include
-	    ${TPSRC}/dist/include/boost-1_49)
-	SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
-	LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+        SET(Boost_DATE_TIME_LIBRARY boost_date_time)
+        SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)
+        SET(Boost_DATE_TIME_LIBRARY_RELEASE boost_date_time)
+        SET(Boost_FILESYSTEM_LIBRARY boost_filesystem)
+        SET(Boost_FILESYSTEM_LIBRARY_DEBUG boost_filesystem)
+        SET(Boost_FILESYSTEM_LIBRARY_RELEASE boost_filesystem)
+        SET(Boost_IOSTREAMS_LIBRARY boost_iostreams)
+        SET(Boost_IOSTREAMS_LIBRARY_DEBUG boost_iostreams)
+        SET(Boost_IOSTREAMS_LIBRARY_RELEASE boost_iostreams)
+        SET(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
+        SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG boost_program_options)
+        SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE boost_program_options)
+        SET(Boost_REGEX_LIBRARY boost_regex)
+        SET(Boost_REGEX_LIBRARY_DEBUG boost_regex)
+        SET(Boost_REGEX_LIBRARY_RELEASE boost_regex)
+        SET(Boost_SYSTEM_LIBRARY boost_system)
+        SET(Boost_SYSTEM_LIBRARY_DEBUG boost_system)
+        SET(Boost_SYSTEM_LIBRARY_RELEASE boost_system)
+        SET(Boost_THREAD_LIBRARY boost_thread)
+        SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
+        SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
+        SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include
+            ${TPSRC}/dist/include/boost-1_49)
+        SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
+        LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
     ENDIF()
 ELSE (THIRDPARTY_BUILD_BOOST)
     ADD_CUSTOM_TARGET(boost ALL)
@@ -160,8 +160,8 @@
             FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time
                 filesystem system program_options regex )
         ELSE ()
-	    SET(BOOST_ROOT ${TPDIST})
-	    FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
+            SET(BOOST_ROOT ${TPDIST})
+            FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
         ENDIF()
     ELSE()
         FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)


Tidy up CMake files.

Tidy up CMake files.

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -43,7 +43,6 @@
                             ${BOOST_FLAGS} ${BOOST_LIB_LIST}
                             --layout=system toolset=${TOOLSET} install
             INSTALL_COMMAND ""
-            #BUILD_IN_SOURCE 1
         )

         IF (APPLE)
@@ -99,7 +98,6 @@
             CONFIGURE_COMMAND bootstrap.bat --prefix=${TPDIST}/boost
             BUILD_COMMAND b2 --layout=system install
             INSTALL_COMMAND ""
-            #BUILD_IN_SOURCE 1
         )
     ENDIF ()
 ELSE (THIRDPARTY_BUILD_BOOST)
@@ -118,10 +116,6 @@
             FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time
                 filesystem system program_options regex )
         ELSE ()
-            #SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/boost)
-            #FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
-            #SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/../ThirdParty/boost)
-            #FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
             SET(BOOST_ROOT ${TPDIST})
             FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
         ENDIF()


Added dummy target to avoid CMake warning Policy CMP0046.

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -93,6 +93,7 @@
         )
     ENDIF ()
 ELSE (THIRDPARTY_BUILD_BOOST)
+    ADD_CUSTOM_TARGET(boost ALL)
     SET(Boost_DEBUG 0)
     SET(Boost_NO_BOOST_CMAKE ON)
     #If the user has not set BOOST_ROOT, look in a couple common places first.


cmake: Fixes for shields in multiple roots

* Reset SHIELD_LIST on each root loop, to avoid matching
  on shields from the previous iteration of the loop.

Signed-off-by: Pete Johanson <4b8373d016f277527198385ba72fda0feb5da015@peterjohanson.com>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -332,6 +332,7 @@
   # x_nucleo_iks01a1/x_nucleo_iks01a1.overlay;x_nucleo_iks01a2/x_nucleo_iks01a2.overlay
   # we construct a list of shield names by extracting file name and
   # removing the extension.
+  unset(SHIELD_LIST)
   foreach(shield_path ${shields_refs_list})
     get_filename_component(shield ${shield_path} NAME_WE)
     list(APPEND SHIELD_LIST ${shield})


use libevent 2.1.9

use libevent 2.1.9

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -83,7 +83,7 @@
 hunter_config(Leptonica VERSION 1.74.2-p4)
 hunter_config(Libcxx VERSION 3.6.2) # Clang
 hunter_config(Libcxxabi VERSION 3.6.2) # Clang
-hunter_config(Libevent VERSION 2.1.8)
+hunter_config(Libevent VERSION 2.1.9)
 hunter_config(libffi VERSION 3.2.1)
 hunter_config(librtmp VERSION 2.4.0-p0)
 hunter_config(Libssh2 VERSION 1.7.0)


gflags (#12928)

gflags (#12928)

--- cmake/external/gflags.cmake
+++ cmake/external/gflags.cmake
@@ -18,7 +18,7 @@
 SET(GFLAGS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gflags)
 SET(GFLAGS_INCLUDE_DIR "${GFLAGS_INSTALL_DIR}/include" CACHE PATH "gflags include directory." FORCE)
 IF(WIN32)
-  set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/gflags.lib" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE)
+  set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/libgflags.lib" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE)
 ELSE(WIN32)
   set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/libgflags.a" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE)
 ENDIF(WIN32)
@@ -45,7 +45,13 @@
                      -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
                      -DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
 )
-
+IF(WIN32)
+  IF(NOT EXISTS "${GFLAGS_INSTALL_DIR}/lib/libgflags.lib")
+    add_custom_command(TARGET extern_gflags POST_BUILD
+    COMMAND cmake -E rename ${GFLAGS_INSTALL_DIR}/lib/gflags_static.lib ${GFLAGS_INSTALL_DIR}/lib/libgflags.lib
+  )
+  ENDIF()
+ENDIF(WIN32)
 ADD_LIBRARY(gflags STATIC IMPORTED GLOBAL)
 SET_PROPERTY(TARGET gflags PROPERTY IMPORTED_LOCATION ${GFLAGS_LIBRARIES})
 ADD_DEPENDENCIES(gflags extern_gflags)
@@ -60,3 +66,4 @@
     INSTALL(FILES ${GFLAGS_LIBRARIES} DESTINATION third_party/gflags/lib)
   ENDIF()
 ENDIF()
+


bump up to oneDNN v2.3 (#33229)

bump up to oneDNN v2.3 (#33229)

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -20,7 +20,7 @@
 SET(MKLDNN_INSTALL_DIR    ${THIRD_PARTY_PATH}/install/mkldnn)
 SET(MKLDNN_INC_DIR        "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE)
 SET(MKLDNN_REPOSITORY     ${GIT_URL}/oneapi-src/oneDNN.git)
-SET(MKLDNN_TAG            f3999b71d8e4415c1985a0dfb812a3ed77ee21fa)
+SET(MKLDNN_TAG            748528a2d3204b5f401c14a9aacdec16accd5ead)

 # Introduce variables:


upgrade oneDNN to v2.3.2 (#35040)

upgrade oneDNN to v2.3.2 (#35040)

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -20,7 +20,7 @@
 SET(MKLDNN_INSTALL_DIR    ${THIRD_PARTY_PATH}/install/mkldnn)
 SET(MKLDNN_INC_DIR        "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE)
 SET(MKLDNN_REPOSITORY     ${GIT_URL}/oneapi-src/oneDNN.git)
-SET(MKLDNN_TAG            593e0de6267d2575f3e4c9e9818f0f11253d093a)
+SET(MKLDNN_TAG            e2d45252ae9c3e91671339579e3c0f0061f81d49)

 # Introduce variables:


Making the SO version major.minor instead of just major because ABI and API change between minor versions.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -341,7 +341,7 @@

     set_target_properties(${name}
       PROPERTIES
-      SOVERSION ${LLVM_VERSION_MAJOR}
+      SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}
       VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
   endif()


[CMake][Win32.DLL] Let llvm_add_library(SHARED) link dependent libraries as PRIVATE.

For example, c-index-test.exe requires just libclang.dll (its import library).
When libraries in libclang were not PRIVATE but PUBLIC, c-index-test required libraries transitive by libclang.

Note, on mingw with BUILD_SHARED_LIBS, library dependencies would become more strict.
In principle, required libraries should be "required in its source file".

This will help to detect missing dependencies.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -333,6 +333,13 @@
       ${lib_deps}
       ${llvm_libs}
       )
+  elseif((CYGWIN OR WIN32) AND ARG_SHARED)
+    # Win32's import library may be unaware of its dependent libs.
+    target_link_libraries(${name} PRIVATE
+      ${ARG_LINK_LIBS}
+      ${lib_deps}
+      ${llvm_libs}
+      )
   elseif(ARG_SHARED AND BUILD_SHARED_LIBS)
     # FIXME: It may be PRIVATE since SO knows its dependent libs.
     target_link_libraries(${name} PUBLIC


Test commit access

Test commit access

Remove trailing spaces

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1112,7 +1112,7 @@
   # executable must be linked with it in order to provide consistent
   # API for all shared libaries loaded by this executable.
   target_link_libraries(${test_name} PRIVATE gtest_main gtest ${LLVM_PTHREAD_LIB})
-
+
   add_dependencies(${test_suite} ${test_name})
   get_target_property(test_suite_folder ${test_suite} FOLDER)
   if (NOT ${test_suite_folder} STREQUAL "NOTFOUND")


make these checks work again

make these checks work again

svn path=/trunk/KDE/kdenetwork/cmake/modules/FindIDN.cmake; revision=702827

--- cmake/modules/FindIDN.cmake
+++ cmake/modules/FindIDN.cmake
@@ -30,7 +30,7 @@
   NO_DEFAULT_PATH
 )
 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(IDN DEFAULT_MSG IDN_INCLUDES AND IDN_LIBRARY )
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(IDN DEFAULT_MSG IDN_INCLUDES IDN_LIBRARY )

 MARK_AS_ADVANCED(IDN_INCLUDE_DIR IDN_LIBRARY)


[CMake] Disable release mode for Swift

[CMake] Disable release mode for Swift

Looks like release mode is broken in the Swift support, we need to
re-land it with a proper fix.

--- cmake/modules/Utility.cmake
+++ cmake/modules/Utility.cmake
@@ -153,15 +153,8 @@
       list(APPEND ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${source})
   endforeach()

-  # FIXME: Find a better way to handle build types.
-  if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-    list(APPEND ARGS -g)
-  endif()
-  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-    list(APPEND ARGS -Onone -g)
-  else()
-    list(APPEND ARGS -O -whole-module-optimization)
-  endif()
+  # FIXME: We need to support Release build type.
+  list(APPEND ARGS -Onone -g)

   foreach(arg ${additional_args})
     list(APPEND ARGS ${arg})


Fix version detection for out-of-source builds

--- cmake/project_version.cmake
+++ cmake/project_version.cmake
@@ -2,6 +2,7 @@
 if(GIT_EXECUTABLE)
   execute_process(
     COMMAND ${GIT_EXECUTABLE} describe --match "v[0-9]*.[0-9]*.[0-9]*" --always --tags --dirty
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     OUTPUT_VARIABLE PROJECT_VERSION
     ERROR_QUIET
   )


* glslc CI WIP. Ignore

* glslc CI WIP. Ignore

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

 macro(add_shader_vulkan)
 	# example: C:\VulkanSDK\1.2.170.0\Bin\glslc.exe
-	set(VK_BIN_DIR $ENV{VK_SDK_PATH}/Bin)
+	set(VK_BIN_DIR $ENV{VULKAN_SDK}/Bin)
 	set(VK_GLSLC_EXECUTABLE_PATH ${VK_BIN_DIR}/glslc)

 	set(shader_path ${PROJECT_SOURCE_DIR}/${SHADER})


ENH: Modification of the ITK version used

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -151,8 +151,8 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 20c05927f51d88b25429c6bd270e19c4b365b7e4)
-  set(ITK_VERSION_ID ITK-4.7)
+  set(${proj}_GIT_TAG v4.11.0)
+  set(ITK_VERSION_ID ITK-4.11)

   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}


Cosmetics

Cosmetics

--- revision.cmake
+++ revision.cmake
@@ -11,7 +11,7 @@
     EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-list -n 1 HEAD
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       OUTPUT_VARIABLE EQ_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
-    MESSAGE(STATUS "Equalizer Revision ${EQ_REVISION}")
+    MESSAGE(STATUS "git revision ${EQ_REVISION}")
   ELSE()
     MESSAGE(STATUS "No revision version support, git not found")
   ENDIF()


[numerics] timeout

[numerics] timeout

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -220,8 +220,9 @@

   # Oliverie
   IF(NOT DEV_MODE)
-   SET(NCP_NEWTON_FBLSA-NCP_ZI1_PROPERTIES WILL_FAIL TRUE TIMEOUT 60)
+   SET(NCP_NEWTON_FBLSA-NCP_ZI1_PROPERTIES WILL_FAIL TRUE)
   ENDIF(NOT DEV_MODE)
+  SET(NCP_NEWTON_FBLSA-NCP_ZI1_TIMEOUT 60)

   END_TEST() # NCP


add valgrind

add valgrind

--- cmaki.cmake
+++ cmaki.cmake
@@ -234,13 +234,40 @@
 		else()
 			if (BUILD_TYPE STREQUAL "Release")
 				message("-- Launch ${_TEST_NAME}__ with valgrind")
-				add_test(
-					NAME ${_TEST_NAME}__
-					# COMMAND valgrind --tool=callgrind ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${_TEST_NAME}
-					COMMAND ${_TEST_NAME}
-					WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
-					CONFIGURATIONS ${BUILD_TYPE}
-					)
+				find_program(VALGRIND "valgrind")
+				if(VALGRIND)
+					# add_custom_target(${_TEST_NAME}_memcheck COMMAND "${VALGRIND}" --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes $<TARGET_FILE:${_TEST_NAME}>)
+					add_test(
+						NAME ${_TEST_NAME}_memcheck
+						COMMAND "${VALGRIND}" --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes $<TARGET_FILE:${_TEST_NAME}>
+						WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+						CONFIGURATIONS ${BUILD_TYPE}
+						)
+					add_test(
+						NAME ${_TEST_NAME}_cachegrind
+						COMMAND "${VALGRIND}" --tool=cachegrind $<TARGET_FILE:${_TEST_NAME}>
+						WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+						CONFIGURATIONS ${BUILD_TYPE}
+						)
+					add_test(
+						NAME ${_TEST_NAME}_helgrind
+						COMMAND "${VALGRIND}" --tool=helgrind $<TARGET_FILE:${_TEST_NAME}>
+						WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+						CONFIGURATIONS ${BUILD_TYPE}
+						)
+					add_test(
+						NAME ${_TEST_NAME}_callgrind
+						COMMAND "${VALGRIND}" --tool=callgrind $<TARGET_FILE:${_TEST_NAME}>
+						WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+						CONFIGURATIONS ${BUILD_TYPE}
+						)
+					add_test(
+						NAME ${_TEST_NAME}_drd
+						COMMAND "${VALGRIND}" --tool=drd --read-var-info=yes $<TARGET_FILE:${_TEST_NAME}>
+						WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+						CONFIGURATIONS ${BUILD_TYPE}
+						)
+				endif()
 			else()
 				add_test(
 					NAME ${_TEST_NAME}__
@@ -258,8 +285,6 @@

 macro(common_linking)

-	message("CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
-	message("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
 	set(PARAMETERS ${ARGV})
 	list(GET PARAMETERS 0 TARGET)
 	# if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
@@ -414,19 +439,18 @@
 		SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} --coverage")
 	elseif ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
 		SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -pg")
-		SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
-	elseif ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
-		SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
+	# 	SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
+	# elseif ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
+	# 	SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
 	endif()
 	# linker flags
 	if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE STREQUAL "Debug"))
-		message("-- activate coverage")
 		SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} --coverage")
 	elseif ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
 		SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -pg")
-		SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
-	elseif ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
-		SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
+	# 	SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
+	# elseif ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
+	# 	SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
 	endif()

 endmacro()


refs #5368 fix dartconfig stuff for darwin

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

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,9 +1,10 @@
 if(BUILD_TESTING)
-  if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
+  if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
     # Valgrind on OSX 10.8 generally works but outputs some warning junk
     # that is hard to parse out, so we'll just let it run alone
     set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind")
   endif ()
   set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind")
   set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
+  set(UPDATE_COMMAND "svn")
 endif()


[FIX,INTERNAL] Making demo target auto-detection ignore hidden .dot files.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13981 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -452,9 +452,14 @@
     foreach (ENTRY ${ENTRIES})
         string (REPLACE "/" "_" BIN_NAME "${ENTRY}")
         string (REPLACE "\\" "_" BIN_NAME "${BIN_NAME}")
-        get_filename_component(BIN_NAME "${BIN_NAME}" NAME_WE)
-        add_executable(${PREFIX}${BIN_NAME} ${ENTRY})
-        target_link_libraries (${PREFIX}${BIN_NAME} ${SEQAN_LIBRARIES})
+        get_filename_component (BIN_NAME "${BIN_NAME}" NAME_WE)
+
+        get_filename_component (FILE_NAME "${ENTRY}" NAME)
+        message (STATUS "FILE_NAME ${FILE_NAME}")
+        if (NOT "${FILE_NAME}" MATCHES "^\\.")
+            add_executable(${PREFIX}${BIN_NAME} ${ENTRY})
+            target_link_libraries (${PREFIX}${BIN_NAME} ${SEQAN_LIBRARIES})
+        endif ()
     endforeach (ENTRY ${ENTRIES})
 endmacro (seqan_build_demos_develop)


[FIX] replace spaces with underscores for icc

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -498,6 +498,8 @@
   # Set SeqAn date of last commit.
   if (_SEQAN_WC_LAST_CHANGED_DATE)
     set (SEQAN_DATE "${_SEQAN_WC_LAST_CHANGED_DATE}")
+    # icc doesn't cope with spaces..
+    string(REPLACE " " "_" SEQAN_DATE "${SEQAN_DATE}")
     message (STATUS "  Determined repository date is ${SEQAN_DATE}")
   else ()
     message (STATUS "  Repository date not determined.")


Fixups to Doxygen CMake file

Fixups to Doxygen CMake file

Use CMAKE_CURRENT_LIST_DIR for path to file in local directory and fix
typo.

--- Utilities/Doxygen/Doxygen.cmake
+++ Utilities/Doxygen/Doxygen.cmake
@@ -24,8 +24,8 @@
       add_custom_command( OUTPUT "${ITK_DOXYGEN_TAGFILE}"
         COMMAND ${CMAKE_COMMAND} -D "PROJECT_SOURCE_DIR:PATH=${PROJECT_SOURCE_DIR}"
         -D "OUTPUT_PATH:PATH=${PROJECT_BINARY_DIR}/Documentation/Doxygen"
-        -P "${PROJECT_SOURCE_DIR}/Utilities/Doxygen/ITKDoxygenTags.cmake"
-        DEPENDS "${PROJECT_SOURCE_DIR}/Utilities/Doxygen/ITKDoxygenTags.cmake"
+        -P "${CMAKE_CURRENT_LIST_DIR}/ITKDoxygenTags.cmake"
+        DEPENDS "${CMAKE_CURRENT_LIST_DIR}/ITKDoxygenTags.cmake"
         )
     endif()

@@ -36,7 +36,7 @@

   set(DOXYGEN_MATHJAX_RELPATH
     "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/"
-    CACHE STRING "The destination or URK to contain the MathJax.js script")
+    CACHE STRING "The destination or URL to contain the MathJax.js script")

   set(SIMPLEITK_DOXYGEN_TAGFILE "${PROJECT_BINARY_DIR}/Utilities/Doxygen/SimpleITKDoxygen.tag")


BUG: clear FORMAT if none is specified.

BUG: clear FORMAT if none is specified.

--- Utilities/KWStyle/KWStyle.cmake
+++ Utilities/KWStyle/KWStyle.cmake
@@ -24,7 +24,7 @@
   ${PROJECT_BINARY_DIR}/Utilities/KWStyle/ITK.kws.xml)

 SET(KWSTYLE_EDITOR_FORMAT " ")
-
+SET(KWSTYLE_EDITOR_FORMAT "")
 IF(KWSTYLE_USE_VIM_FORMAT)
   SET(KWSTYLE_EDITOR_FORMAT -vim)
 ENDIF(KWSTYLE_USE_VIM_FORMAT)


env-vars with ENV arg

env-vars with ENV arg

--- conan.cmake
+++ conan.cmake
@@ -290,9 +290,10 @@

 macro(parse_arguments)
   set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS OUTPUT_QUIET)
-  set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE PROFILE ARCH BUILD_TYPE INSTALL_FOLDER)
-  set(multiValueArgs REQUIRES OPTIONS IMPORTS SETTINGS BUILD CONAN_COMMAND GENERATORS PROFILE_AUTO)
-  cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+  set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE
+                   PROFILE ARCH BUILD_TYPE INSTALL_FOLDER CONAN_COMMAND)
+  set(multiValueArgs REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO)
+  cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 endmacro()

 function(conan_cmake_install)
@@ -328,7 +329,7 @@
       set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE})
       # A conan file has been specified - apply specified options as well if provided
       foreach(ARG ${ARGUMENTS_OPTIONS})
-          set(CONAN_OPTIONS ${CONAN_OPTIONS} -o ${ARG})
+          set(CONAN_OPTIONS ${CONAN_OPTIONS} -o=${ARG})
       endforeach()
     else()
       set(CONANFILE ".")
@@ -338,12 +339,15 @@
     endif()
     set(CONAN_INSTALL_FOLDER "")
     if(ARGUMENTS_INSTALL_FOLDER)
-      set(CONAN_INSTALL_FOLDER -if ${ARGUMENTS_INSTALL_FOLDER})
+      set(CONAN_INSTALL_FOLDER -if=${ARGUMENTS_INSTALL_FOLDER})
     endif()
     foreach(ARG ${ARGUMENTS_GENERATORS})
-        set(CONAN_GENERATORS ${CONAN_GENERATORS} -g ${ARG})
-    endforeach()
-    set(conan_args install ${CONANFILE} ${settings} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER})
+        set(CONAN_GENERATORS ${CONAN_GENERATORS} -g=${ARG})
+    endforeach()
+    foreach(ARG ${ARGUMENTS_ENV})
+        set(CONAN_ENV_VARS ${CONAN_ENV_VARS} -e=${ARG})
+    endforeach()
+    set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER})

     string (REPLACE ";" " " _conan_args "${conan_args}")
     message(STATUS "Conan executing: ${conan_command} ${_conan_args}")


add easier msvc version detection

add easier msvc version detection

--- conan.cmake
+++ conan.cmake
@@ -1,5 +1,11 @@
 include(CMakeParseArguments)

+function(_get_msvc_version result)
+    set(${result} "" PARENT_SCOPE)
+    string(REGEX MATCHALL "[0-9]+" output "${CMAKE_GENERATOR}")
+    list(GET output 0 _msvc_version)
+    set(${result} ${_msvc_version} PARENT_SCOPE)
+endfunction()

 function(conan_cmake_settings result)
   #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER})
@@ -64,28 +70,11 @@
       set(_SETTINGS ${_SETTINGS} -s compiler=clang -s compiler.version=${MAJOR}.${MINOR} -s compiler.libcxx=libstdc++)
   elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
       set(_VISUAL "Visual Studio")
-      if (MSVC_VERSION EQUAL 1200)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=6)
-      elseif (MSVC_VERSION EQUAL 1300)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=7)
-      elseif (MSVC_VERSION EQUAL 1310)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=7)
-      elseif (MSVC_VERSION EQUAL 1400)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=8)
-      elseif (MSVC_VERSION EQUAL 1500)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=9)
-      elseif (MSVC_VERSION EQUAL 1600)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=10)
-      elseif (MSVC_VERSION EQUAL 1700)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=11)
-      elseif (MSVC_VERSION EQUAL 1800)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=12)
-      elseif (MSVC_VERSION EQUAL 1900)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=14)
-      elseif (MSVC_VERSION EQUAL 1910)
-          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=15)
-      else ()
+      _get_msvc_version(_VISUAL_VERSION)
+      if("{_VISUAL_VERSION}" STREQUAL "")
           message(FATAL_ERROR "Visual Studio not recognized")
+      else()
+          set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=${_VISUAL_VERSION})
       endif()

       if(${CMAKE_GENERATOR} MATCHES "Win64")


Made sure the junk file doesnt suddenly go out of tree if its source (#135)

* Made sure the junk file doesnt suddenly go out of tree if its source is ../../

* added NO_LOAD argument to allow INSTALL_FOLDER to work maybe INSTALL_FOLDER should activate the NO_LOAD

* Handle the error when INSTALL_FOLDER is specified that the conanbuildinfo.cmake might be in a different folder

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

 macro(parse_arguments)
-  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS)
+  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_LOAD NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS)
   set(oneValueArgs CONANFILE  ARCH BUILD_TYPE INSTALL_FOLDER CONAN_COMMAND)
   set(multiValueArgs DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE
                      PROFILE REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO
@@ -405,9 +405,10 @@
 function(conan_cmake_setup_conanfile)
   parse_arguments(${ARGV})
   if(ARGUMENTS_CONANFILE)
+    get_filename_component(_CONANFILE_NAME ${ARGUMENTS_CONANFILE} NAME)
     # configure_file will make sure cmake re-runs when conanfile is updated
-    configure_file(${ARGUMENTS_CONANFILE} ${ARGUMENTS_CONANFILE}.junk)
-    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${ARGUMENTS_CONANFILE}.junk)
+    configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
+    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
   else()
     conan_cmake_generate_conanfile(${ARGV})
   endif()
@@ -448,6 +449,9 @@
     if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${_CONANBUILDINFO}")
       message(STATUS "Conan: Loading ${_CONANBUILDINFO}")
       include(${CMAKE_CURRENT_BINARY_DIR}/${_CONANBUILDINFO})
+    elseif(EXISTS ${ARGUMENTS_INSTALL_FOLDER}/${_CONANBUILDINFO})
+      message(STATUS "Conan: Loading ${_CONANBUILDINFO}")
+      include(${ARGUMENTS_INSTALL_FOLDER}/${_CONANBUILDINFO})
     else()
       message(FATAL_ERROR "${_CONANBUILDINFO} doesn't exist in ${CMAKE_CURRENT_BINARY_DIR}")
     endif()
@@ -480,7 +484,9 @@
         endif()
     endif()

-    conan_load_buildinfo()
+    if (NOT ARGUMENTS_NO_LOAD)
+    	conan_load_buildinfo()
+    endif()

     if(ARGUMENTS_BASIC_SETUP)
         foreach(_option CMAKE_TARGETS KEEP_RPATHS NO_OUTPUT_DIRS)


Fixed Android compilation on Windows

Fixed Android compilation on Windows

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -320,8 +320,8 @@
 if( BUILD_WITH_ANDROID_NDK )
  set( CMAKE_CXX_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_CXX_FLAGS}" )
  set( CMAKE_C_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_C_FLAGS}" )
- if (ANDROID_NDK_SYSROOT MATCHES "[ ]")
-  # workaround for ugly cmake bug - compiler identification replaces all spaces in compiler flags with ; symbol
+ if (WIN32 OR ANDROID_NDK_SYSROOT MATCHES "[ ]")
+  # workaround for ugly cmake bug - compiler identification replaces all spaces (and somethimes " !!!) in compiler flags with ; symbol
   # as result identification fails if ANDROID_NDK_SYSROOT contain spaces
   include(CMakeForceCompiler)
   CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)


fix(tools): properly disable SIMD on ARM hosts

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -54,6 +54,10 @@
 			if(USE_POPCNT_INSTRUCTIONS)
 				target_compile_options(${_project_name} PRIVATE "-mpopcnt")
 			endif()
+		else()
+			if(NOT USE_SIMD_INSTRUCTIONS)
+				add_definitions(-DRTM_NO_INTRINSICS)
+			endif()
 		endif()

 		target_compile_options(${_project_name} PRIVATE -Wall -Wextra)		# Enable all warnings


Don't init DX11 by default on Windows

Don't init DX11 by default on Windows

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -60,10 +60,6 @@
 	set(USE_SDL2 0)
 	set(USE_ASIO 0)
 endif()
-
-if (MSVC)
-	set(USE_DX11 1)
-endif ()

 if (${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
 	set(USE_DX11 1)


updated link to xlink

updated link to xlink

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -13,7 +13,7 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2020.2tests1"
+    VERSION "luxonis-2020.2test2"
     URL  "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
     SHA1 "a7d978843ae819143405445a1e4e3337a9bc7f2c"
     CMAKE_ARGS


Fix shared library search during cross-compiling for aarch64

--- LinuxArm/aarch64-cross.cmake
+++ LinuxArm/aarch64-cross.cmake
@@ -19,6 +19,9 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

+# To fix link error related to BLAS and LAPACK
+add_link_options(-Wl,-rpath-link=${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/blas -Wl,-rpath-link=${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/lapack)
+
 # pkg-configがaarch64用のライブラリを検索するように設定
 # 参考：https://stackoverflow.com/questions/9221236/pkg-config-fails-to-find-package-under-sysroot-directory
 set(ENV{PKG_CONFIG_DIR} "")


CastXML 0.4.5

CastXML 0.4.5

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 4)
+set(CastXML_VERSION_PATCH 5)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


Replaced absolute paths with relative paths in WCDH.cmake module.

--- cmake/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake
+++ cmake/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake
@@ -253,8 +253,8 @@
 #=============================================================================

-include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/CMakeCompilerIdDetection.cmake)
+include(CMakeParseArguments)
+include(CMakeCompilerIdDetection)

 function(_load_compiler_variables CompilerId lang)
   include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-${lang}-FeatureTests.cmake" OPTIONAL)


Change the way that dart tests are named

--- test/ctest/test_setup.cmake
+++ test/ctest/test_setup.cmake
@@ -4,31 +4,35 @@
 # lets create a build name to idenfity all these options in a string. It will look like
 # Linux-gcc412-trunk-single-cuda (for a single precision build with cuda)
 # Linux-gcc412-hoomd-0.8-double (for a double precision build without cuda and in the hoomd-0.8 branch)
-SET (BUILDNAME "${SYSTEM_NAME}-${COMPILER_NAME}-${HOOMD_BRANCH}")
+SET (BUILDNAME "${SYSTEM_NAME}")
+
+if (NOT HOOMD_BRANCH MATCHES "master")
+    SET (BUILDNAME "${BUILDNAME}-${HOOMD_BRANCH}")
+endif ()

 if (ENABLE_STATIC MATCHES "ON")
     SET (BUILDNAME "${BUILDNAME}-static")
-else(ENABLE_STATIC MATCHES "ON")
-    SET (BUILDNAME "${BUILDNAME}-shared")
-endif(ENABLE_STATIC MATCHES "ON")
+endif()

-if (SINGLE_PRECISION MATCHES "ON")
-    SET (BUILDNAME "${BUILDNAME}-single")
-else (SINGLE_PRECISION MATCHES "ON")
+if (NOT SINGLE_PRECISION MATCHES "ON")
     SET (BUILDNAME "${BUILDNAME}-double")
-endif (SINGLE_PRECISION MATCHES "ON")
+endif ()

-if (ENABLE_CUDA MATCHES "ON")
-    SET (BUILDNAME "${BUILDNAME}-cuda")
-endif (ENABLE_CUDA MATCHES "ON")
+if (NOT ENABLE_CUDA MATCHES "ON")
+    SET (BUILDNAME "${BUILDNAME}-cpu")
+endif ()

 if (ENABLE_OPENMP MATCHES "ON")
     SET (BUILDNAME "${BUILDNAME}-openmp")
-endif (ENABLE_OPENMP MATCHES "ON")
+endif ()

 if (NOT BUILD_TYPE MATCHES "Release")
     SET (BUILDNAME "${BUILDNAME}-${BUILD_TYPE}")
-endif (NOT BUILD_TYPE MATCHES "Release")
+endif ()
+
+if (GPU_GENERATION)
+    SET (BUILDNAME "${BUILDNAME}-${GPU_GENERATION}")
+endif()

 if (ENABLE_COVERAGE)
     SET (COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage")


Update with KERNEL file.

Update with KERNEL file.

--- adm_local_without_kernel/cmake_files/FindSalomeDoxygen.cmake
+++ adm_local_without_kernel/cmake_files/FindSalomeDoxygen.cmake
@@ -23,6 +23,18 @@
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
+# Additional variables:
+#
+# DOXYGEN_SUPPORT_STL (string) [advanced] : set to YES if doxygen properly manages STL files
+#                     or to NO otherwise (version 1.4.4 or older); see description of
+#                     BUILTIN_STL_SUPPORT configuration variable in the doxygen documentation

 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Doxygen DOXYGEN_EXECUTABLE 2)
-#MARK_AS_ADVANCED()
+IF(DOXYGEN_FOUND)
+  IF(DOXYGEN_VERSION VERSION_LESS "1.4.5")
+    SET(DOXYGEN_SUPPORT_STL NO)
+  ELSE()
+    SET(DOXYGEN_SUPPORT_STL YES)
+  ENDIF()
+ENDIF()
+MARK_AS_ADVANCED(DOXYGEN_SUPPORT_STL)


Link OpenMP to python library

Link OpenMP to python library

--- src/pythonlib/pythonlib.cmake
+++ src/pythonlib/pythonlib.cmake
@@ -118,6 +118,7 @@
   ocl_geo
   ocl_algo
   ${Boost_LIBRARIES}
+  ${OpenMP_CXX_LIBRARIES}
   ${PYTHON_LIBRARIES}
 )


Shorten add_library target name to avoid MSB3491 (path too long)

--- rosidl_generator_java/cmake/rosidl_generator_java_generate_interfaces.cmake
+++ rosidl_generator_java/cmake/rosidl_generator_java_generate_interfaces.cmake
@@ -168,7 +168,9 @@
     LIBRARY_OUTPUT_DIRECTORY${_build_type} ${_output_path}/${_parent_folder}
     RUNTIME_OUTPUT_DIRECTORY${_build_type} ${_output_path}/${_parent_folder}
     C_STANDARD 11
-    CXX_STANDARD 14)
+    CXX_STANDARD 14
+    OUTPUT_NAME "${_library_path}"
+    )
 endmacro()

 set(_type_support_by_generated_cpp_files ${_type_support_by_generated_msg_cpp_files} ${_type_support_by_generated_srv_cpp_files})
@@ -185,10 +187,14 @@
   list(GET _type_support_by_generated_cpp_files ${_file_index} _typesupport_impl)
   find_package(${_typesupport_impl} REQUIRED)
   set(_generated_msg_cpp_common_file "${_full_folder}/${_base_msg_name}.cpp")
+  string(REGEX REPLACE "^rosidl_typesupport_" "" _short_typesupport_impl ${_typesupport_impl})
   set(_library_name
+    "${_base_msg_name}_${_short_typesupport_impl}"
+  )
+  set(_library_path
     "${_package_name}_${_parent_folder}_${_base_msg_name}__jni__${_typesupport_impl}"
   )
-  string_camel_case_to_lower_case_underscore(${_library_name} _library_name)
+  string_camel_case_to_lower_case_underscore(${_library_path} _library_path)
   add_library(${_library_name} SHARED
     ${_generated_cpp_file}
   )


rename "aot_scratch" to "generator_genfiles"

(it may not be used for just AOT in the future, and
“genfiles” is a more accurate and matches Bazel conventions.) Also
remove rogue MESSAGE().

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -1,10 +1,9 @@
 include(CMakeParseArguments)

-function(halide_aot_scratch_dir NAME OUTVAR)
-  set(SCRATCH_DIR "${CMAKE_BINARY_DIR}/aot_gen_scratch/${NAME}")
-  file(MAKE_DIRECTORY "${SCRATCH_DIR}")
-  MESSAGE("MAKE ${SCRATCH_DIR}")
-  set(${OUTVAR} "${SCRATCH_DIR}" PARENT_SCOPE)
+function(halide_generator_genfiles_dir NAME OUTVAR)
+  set(GENFILES_DIR "${CMAKE_BINARY_DIR}/generator_genfiles/${NAME}")
+  file(MAKE_DIRECTORY "${GENFILES_DIR}")
+  set(${OUTVAR} "${GENFILES_DIR}" PARENT_SCOPE)
 endfunction()

 # This function adds custom build steps to invoke a Halide generator exectuable
@@ -46,13 +45,13 @@
   endif()

   # Create a directory to contain generator specific intermediate files
-  halide_aot_scratch_dir(${AOT_LIBRARY_TARGET} SCRATCH_DIR)
+  halide_generator_genfiles_dir(${AOT_LIBRARY_TARGET} GENFILES_DIR)

   # Determine the name of the output files
   set(FILTER_LIB "${AOT_LIBRARY_TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(FILTER_HDR "${AOT_LIBRARY_TARGET}.h")

-  set(generator_exec_args "-o" "${SCRATCH_DIR}")
+  set(generator_exec_args "-o" "${GENFILES_DIR}")
   if (NOT ${args_GENERATED_FUNCTION} STREQUAL "")
     list(APPEND generator_exec_args "-f" "${args_GENERATED_FUNCTION}" )
   endif()
@@ -80,17 +79,17 @@
   # Add a custom target to invoke the GENERATOR_TARGET and output the Halide
   # generated library.
   add_custom_command(
-    OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
+    OUTPUT "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}"
     DEPENDS "${args_GENERATOR_TARGET}"
     COMMAND "${generator_exec}" ${generator_exec_args}
-    WORKING_DIRECTORY "${SCRATCH_DIR}"
+    WORKING_DIRECTORY "${GENFILES_DIR}"
   )

   # Use a custom target to force it to run the generator before the
   # object file for the runner.
   set(EXEC_GENERATOR_TARGET "${AOT_LIBRARY_TARGET}.exec_generator")
   add_custom_target(${EXEC_GENERATOR_TARGET}
-                    DEPENDS "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}")
+                    DEPENDS "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}")

   # Place the target in a special folder in IDEs
   set_target_properties(${EXEC_GENERATOR_TARGET} PROPERTIES FOLDER "generator")
@@ -100,15 +99,15 @@
 # Usage:
 #   halide_add_aot_library_dependency(TARGET AOT_LIBRARY_TARGET)
 function(halide_add_aot_library_dependency TARGET AOT_LIBRARY_TARGET)
-    halide_aot_scratch_dir(${AOT_LIBRARY_TARGET} SCRATCH_DIR)
+    halide_generator_genfiles_dir(${AOT_LIBRARY_TARGET} GENFILES_DIR)

     set(FILTER_LIB "${AOT_LIBRARY_TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}")

     set(EXEC_GENERATOR_TARGET "${AOT_LIBRARY_TARGET}.exec_generator")
     add_dependencies("${TARGET}" "${EXEC_GENERATOR_TARGET}")

-    target_link_libraries("${TARGET}" PRIVATE "${SCRATCH_DIR}/${FILTER_LIB}")
-    target_include_directories("${TARGET}" PRIVATE "${SCRATCH_DIR}")
+    target_link_libraries("${TARGET}" PRIVATE "${GENFILES_DIR}/${FILTER_LIB}")
+    target_include_directories("${TARGET}" PRIVATE "${GENFILES_DIR}")

     if (WIN32)
       if (MSVC)


Fix inclusion of ConfigurationManager (#1086)

--- CMake/Modules/FindNF_CoreCLR.cmake
+++ CMake/Modules/FindNF_CoreCLR.cmake
@@ -161,9 +161,6 @@
     # HAL
     nanoHAL_Time.cpp
     nanoHAL_Watchdog.c
-
-    # HAL stubs
-    nanoHAL_ConfigurationManager_stubs.c

     # PAL
     nanoPAL_BlockStorage.c
@@ -177,9 +174,13 @@
     GenericPort_stubs.c
 )

-# include configuration manager implementation, if feature is enabled
+# include configuration manager file
 if(NF_FEATURE_HAS_CONFIG_BLOCK)
+    # feature enabled, full support
     list(APPEND NF_CoreCLR_SRCS nanoHAL_ConfigurationManager.c)
+else()
+    # feature disabled, stubs only
+    list(APPEND NF_CoreCLR_SRCS nanoHAL_ConfigurationManager_stubs.c)
 endif()

 foreach(SRC_FILE ${NF_CoreCLR_SRCS})


Extend search path for Coin cmake test

Extend search path for Coin cmake test

--- cMake/FindCoin3D.cmake
+++ cMake/FindCoin3D.cmake
@@ -13,6 +13,7 @@
     FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
       /usr/include
       /usr/local/include
+      PATH_SUFFIXES Coin2
     )

     FIND_LIBRARY(COIN3D_LIBRARY Coin


rm 30

rm 30

--- caffe/cmake/Cuda.cmake
+++ caffe/cmake/Cuda.cmake
@@ -4,7 +4,7 @@

 # Known NVIDIA GPU achitectures Caffe can be compiled for.
 # This list will be used for CUDA_ARCH_NAME = All option
-set(Caffe_known_gpu_archs "30 35 50 60 61")
+set(Caffe_known_gpu_archs "35 50 60 61")

 ################################################################################################
 # A function for automatic detection of GPUs installed  (if autodetection is enabled)


Set Qwt branch

Set Qwt branch

--- Superbuild/QwtExternal.cmake
+++ Superbuild/QwtExternal.cmake
@@ -25,7 +25,11 @@
 #  DEALINGS IN THE SOFTWARE.

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
-SET(qwt_GIT_TAG "origin/qt5-static")
+IF(QT5_BUILD)
+  SET(qwt_GIT_TAG "origin/qt5-static")
+ELSE()
+  SET(qwt_GIT_TAG "origin/static-build")
+ENDIF()

 # If CMake ever allows overriding the checkout command or adding flags,
 # git checkout -q will silence message about detached head (harmless).


fix logic in configure_ros_middleware_library

--- ros_middleware_interface/cmake/configure_ros_middleware_library.cmake
+++ ros_middleware_interface/cmake/configure_ros_middleware_library.cmake
@@ -18,32 +18,20 @@
 # @public
 #
 macro(configure_ros_middleware_library library_target)
-  if(TARGET ros_middleware_opensplice_cpp)
-    # Set the visibility to hidden by default if possible
-    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
-       "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-      # Set the visibility of symbols to hidden by default for gcc and clang
-      # (this is already the default on Windows)
-      set_target_properties(ros_middleware_opensplice_cpp
-        PROPERTIES
-          COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden -std=c++11"
-      )
-    endif()
-    if(WIN32)
-      # Causes the visibility macros to use dllexport rather than dllimport
-      # which is appropriate when building the dll but not consuming it.
-      set_target_properties(ros_middleware_opensplice_cpp
-        PROPERTIES COMPILE_FLAGS "-DRMW_BUILDING_DLL")
-    endif()
-  elseif(TARGET ros_middleware_connext_cpp)
-    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
-       "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-      # Set the visibility of symbols to hidden by default for gcc and clang
-      # (this is already the default on Windows)
-      set_target_properties(ros_middleware_connext_cpp
-        PROPERTIES
-          COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden -std=c++11"
-      )
-    endif()
+  # Set the visibility to hidden by default if possible
+  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
+     "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    # Set the visibility of symbols to hidden by default for gcc and clang
+    # (this is already the default on Windows)
+    set_target_properties(library_target
+      PROPERTIES
+        COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden -std=c++11"
+    )
+  endif()
+  if(WIN32)
+    # Causes the visibility macros to use dllexport rather than dllimport
+    # which is appropriate when building the dll but not consuming it.
+    set_target_properties(library_target
+      PROPERTIES COMPILE_FLAGS "-DRMW_BUILDING_DLL")
   endif()
 endmacro()


updates

updates

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -13,7 +13,7 @@

 # set source and build directory
 set(CTEST_SOURCE_DIRECTORY "${TEST_ROOT_DIRECTORY1}")
-message("${TEST_ROOT_DIRECTORY1}")
+message("CTEST_SOURCE_DIRECTORY = ${CTEST_SOURCE_DIRECTORY}")
 set(CTEST_BINARY_DIRECTORY "${TEST_ROOT_DIRECTORY1}/build")

 # update external model repository


Disable warning C4201 because of glm 9.6.0

--- cmake/PlatformWindowsMSVC.cmake
+++ cmake/PlatformWindowsMSVC.cmake
@@ -35,6 +35,7 @@
       /wd4273       # -> Two definitions in a file differ in their use of dllimport.
     # /wd4100       # -> 'identifier' : unreferenced formal parameter
     # /wd4127       # -> conditional expression is constant
+      /wd4201       # -> nonstandard extension used : nameless struct/union because of glm
       /wd4251       # -> 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
       /wd4267       # -> 'var' : conversion from 'size_t' to 'type', possible loss of data


update

update

--- cmake/SetupProjectOptions.cmake
+++ cmake/SetupProjectOptions.cmake
@@ -12,7 +12,7 @@

 # unit testing
 OPTION(DCS0896X_BLD_UTEST "Enable unit-test building by default"                          ON)
-OPTION(DCS0896X_RUN_CTEST "Enable unit-test execution using CTest by default"            OFF)
+OPTION(DCS0896X_RUN_CTEST "Enable unit-test execution using CTest by default"             ON)
 OPTION(DCS0896X_RUN_UTEST "Enable unit-test execution using the build system by default" OFF)

 # tracing


Update Build-mysql.cmake

Update Build-mysql.cmake

--- cmake/modules/Build-mysql.cmake
+++ cmake/modules/Build-mysql.cmake
@@ -8,14 +8,25 @@
   ${MYSQL_INSTALL_DIR}/lib/libmysqlclient.a
 )

-ExternalProject_Add(
-  mysql
-  URL https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.12.tar.gz
-  URL_HASH MD5=82ba7cc22755f77635768c6e6d184161
-  CMAKE_ARGS -G${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${MYSQL_INSTALL_DIR} -DWITHOUT_SERVER=ON -DWITH_UNIT_TESTS=OFF -DWITH_BOOST=<SOURCE_DIR>/boost/boost_1_67_0
-  BUILD_BYPRODUCTS ${_byproducts}
-  INSTALL_DIR ${MYSQL_INSTALL_DIR}
-)
+if(WIN32)
+  ExternalProject_Add(
+    mysql
+    URL https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.17.zip
+    URL_HASH MD5=12ffebf5a1a2b2047c6044b9b0e5860b
+    CMAKE_ARGS -G${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${MYSQL_INSTALL_DIR} -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<SOURCE_DIR>/boost -DWITHOUT_SERVER=ON -DWITH_UNIT_TESTS=OFF
+    BUILD_BYPRODUCTS ${_byproducts}
+    INSTALL_DIR ${MYSQL_INSTALL_DIR}
+  )
+else()
+  ExternalProject_Add(
+    mysql
+    URL https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.17.tar.gz
+    URL_HASH MD5=82ba7cc22755f77635768c6e6d184161
+    CMAKE_ARGS -G${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${MYSQL_INSTALL_DIR} -DWITHOUT_SERVER=ON -DWITH_UNIT_TESTS=OFF -DWITH_BOOST=<SOURCE_DIR>/boost/boost_1_69_0
+    BUILD_BYPRODUCTS ${_byproducts}
+    INSTALL_DIR ${MYSQL_INSTALL_DIR}
+  )
+endif()
 ExternalProject_Get_Property(
   mysql
   install_dir
@@ -24,8 +35,8 @@
 set(MYSQL_INCLUDE_DIR "${install_dir}/include")
 if(WIN32)
   set(MYSQL_LIBRARY_DIR "${install_dir}/lib")
-  set(MYSQL_LIBRARY "${install_dir}/lib/libmysqlclient.lib")
-  set(MYSQL_LIBRARIES "${install_dir}/lib/libmysqlclient.lib" "${MYSQL_LIBRARIES}")
+  set(MYSQL_LIBRARY "${install_dir}/lib/mysqlclient.lib")
+  set(MYSQL_LIBRARIES "${install_dir}/lib/mysqlclient.lib" "${MYSQL_LIBRARIES}")
 else()
   set(MYSQL_LIBRARY_DIR "${install_dir}/lib")
   set(MYSQL_LIBRARY "${install_dir}/lib/libmysqlclient.a")
@@ -38,4 +49,4 @@
   set_target_properties(mysql::mysql PROPERTIES INTERFACE_LINK_LIBRARIES "${MYSQL_LIBRARIES}")
 endif()

-mark_as_advanced( MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_LIBRARY )+mark_as_advanced( MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_LIBRARY )


CMake: cmake/modules/LLVMLibDeps.cmake: Use unix line endings.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,79 +1,79 @@
-# This data is used to establish executable/library
-# dependencies.  Comes from the llvm-config script, which is built and
-# installed on the bin directory for MinGW or Linux. At the end of the
-# script, you'll see lines like this:
-
-# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a
-
-# This is translated to:
-
-# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget)
-
-# It is necessary to remove the `lib' prefix and the `.a'.
-
-# This 'sed' script should do the trick:
-# sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: ##' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt
-#
-
-# TODO: do this transformations on cmake.
-
-# It is very important that the LLVM built for extracting this data
-# must contain all targets, not just X86.
-
-
-set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMARMInfo LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
-set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMDebugger LLVMAnalysis LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
-set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMSP430 LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
-set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info)
-set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
-set(MSVC_LIB_DEPS_LLVMX86Info LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMXCore LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
+# This data is used to establish executable/library
+# dependencies.  Comes from the llvm-config script, which is built and
+# installed on the bin directory for MinGW or Linux. At the end of the
+# script, you'll see lines like this:
+
+# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a
+
+# This is translated to:
+
+# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget)
+
+# It is necessary to remove the `lib' prefix and the `.a'.
+
+# This 'sed' script should do the trick:
+# sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: ##' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt
+#
+
+# TODO: do this transformations on cmake.
+
+# It is very important that the LLVM built for extracting this data
+# must contain all targets, not just X86.
+
+
+set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMInfo LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
+set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMDebugger LLVMAnalysis LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
+set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMSP430 LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
+set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Info LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMXCore LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)


build: repair the build with VS2019 16.10.0

The newest VS2019 release updates CMake to 3.20, which picks up
`llvm-mt` as a preferred manifest tool.  However, we do not build
`llvm-mt` with libxml2 support currently, which prevents the use of the
just built manifest tool for building libdispatch.  Explicitly opt into
using the MSVC manifest-tool.

--- cmake/modules/Libdispatch.cmake
+++ cmake/modules/Libdispatch.cmake
@@ -86,6 +86,7 @@
                           -DCMAKE_INSTALL_LIBDIR=lib
                           -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
                           -DCMAKE_LINKER=${CMAKE_LINKER}
+                          -DCMAKE_MT=${CMAKE_MT}
                           -DCMAKE_RANLIB=${CMAKE_RANLIB}
                           -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
                           -DCMAKE_SYSTEM_NAME=${SWIFT_SDK_${sdk}_NAME}


Make the valgrind/callgrind output/log files have more useful names

--- cmake/modules/TpQt4Macros.cmake
+++ cmake/modules/TpQt4Macros.cmake
@@ -367,7 +367,7 @@
                 --child-silent-after-fork=yes
                 --num-callers=20
                 --gen-suppressions=all
-                --log-file=${CMAKE_CURRENT_BINARY_DIR}/test.valgrind.log.${_fancyName}
+                --log-file=${CMAKE_CURRENT_BINARY_DIR}/test-${_fancyName}.memcheck.log
                 ${ARGN}
         WORKING_DIRECTORY
                 ${CMAKE_CURRENT_BINARY_DIR}
@@ -382,7 +382,8 @@
         COMMAND valgrind
                 --tool=callgrind
                 --dump-instr=yes
-                --log-file=${CMAKE_CURRENT_BINARY_DIR}/test.callgrind.log.${_fancyName}
+                --log-file=${CMAKE_CURRENT_BINARY_DIR}/test-${_fancyName}.callgrind.log
+                --callgrind-out-file=${CMAKE_CURRENT_BINARY_DIR}/test-${_fancyName}.callgrind.out
                 ${ARGN}
         WORKING_DIRECTORY
             ${CMAKE_CURRENT_BINARY_DIR}


Added more descriptive messages to the CClient configuration params.

--- cmake_modules/FindCClient.cmake
+++ cmake_modules/FindCClient.cmake
@@ -14,7 +14,7 @@
   CCLIENT_INCLUDE
   NAMES linkage.c
   PATHS ${CCLIENT_LIBRARY_DIRS} /usr/include/imap
-  DOC "Include directory for the CCLient library linkage")
+  DOC "Include directory for the CCLient library linkage (the path to 'linkage.c' file)")
 mark_as_advanced(CCLIENT_INCLUDE)

 # Look for the library.
@@ -22,7 +22,7 @@
   CCLIENT_LIBRARY
   NAMES libc-client.a libc-client4.a
   PATHS ${CCLIENT_LIBRARY_DIRS} /opt/local/lib /usr/lib
-  DOC "Library to link against for the email support")
+  DOC "Library to link against for the email support (libc-client.a, libc-client4.a or cclient.lib)")

 if (CCLIENT_LIBRARY)
   MESSAGE(STATUS "Found CCLIENT library -- " ${CCLIENT_LIBRARY})


Revert "IMP-594: Impala binaries are embedding build-time locations of libraries"

This reverts commit 748659845303b9a23ee36fc50f81aee0f1082cb9.

--- cmake_modules/FindPICLibs.cmake
+++ cmake_modules/FindPICLibs.cmake
@@ -3,7 +3,6 @@
 # these libraries in the environment, or dynamic linking will be used instead.

 IF (DEFINED ENV{PIC_LIB_PATH})
-    set(CMAKE_SKIP_RPATH TRUE)
     set(Boost_USE_STATIC_LIBS ON)
     set(Boost_USE_STATIC_RUNTIME ON)
     set(LIBBZ2 $ENV{PIC_LIB_PATH}/lib/libbz2.a)


BUG: Address Shared Library issues with SCIFIO

Updates the SCIFIO remote module with the following:
caab429 ENH: Add library specific export specifier.
2744aaf BUG: Incorrect target link libraries specified as dependency
83de482 BUG: Fix bugs with CR removal in SCIFIOImageIO::WaitForNewLines

Change-Id: I346f3f7d91e7072f37b45c5674169be9fadb62aa

--- Modules/Remote/SCIFIO.remote.cmake
+++ Modules/Remote/SCIFIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(SCIFIO
   "SCIFIO (Bioformats) ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
-  GIT_TAG 3e76055918e70c8e97730d1e321ec59f15007f4c
+  GIT_TAG 19f2ca398d9565aef99ed739c14c7de1e3daacfa
   )


this file should be in repo

this file should be in repo

--- SIPLConfig.cmake
+++ SIPLConfig.cmake
@@ -1,24 +0,0 @@
-# Find the SIPL includes and library
-#
-# SIPL_INCLUDE_DIR - where to find include files.
-# SIPL_LIBRARIES - List of fully qualified libraries to link against.
-# SIPL_FOUND - set to 1 if found.
-#
-# Usage:
-# SIPL (SIPL)
-#----------
-# option(CX_USE_SIPL "use SIPL (SIPL)" OFF)
-# if (CX_USE_SIPL)
-#    ADD_DEFINITIONS(-DCX_USE_SIPL)
-#    find_package(SIPL REQUIRED)
-#    include()
-# endif()
-#
-
-set (SIPL_FOUND 1)
-
-set (SIPL_INCLUDE_DIRS "/home/smistad/Dropbox/Programmering/GPU-Narrow-Band-Level-Set-Segmentation/SIPL")
-set (SIPL_LIBRARY_DIRS "/home/smistad/Dropbox/Programmering/GPU-Narrow-Band-Level-Set-Segmentation/SIPL")
-
-set (SIPL_USE_FILE "/home/smistad/Dropbox/Programmering/GPU-Narrow-Band-Level-Set-Segmentation/SIPL/CMake/SIPLUse.cmake")
-


BUGsFIX: Slicer Extension Building

BUGsFIX: Slicer Extension Building

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -49,29 +49,34 @@
 set(EXTERNAL_PROJECT_BUILD_TYPE "Release" CACHE STRING "Default build type for support libraries")

 set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES )
+set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD )

 if(NOT DEFINED ITK_DIR)
   set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} ITKv4)
+  set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD} ITK)
 endif()

 if(NOT DEFINED SlicerExecutionModel_DIR)
   set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} SlicerExecutionModel)
+  set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD} SlicerExecutionModel)
 endif()

 if(NOT DEFINED QtToCppXML_DIR)
   set(${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} QtToCppXML)
+  set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD} QtToCppXML)
 endif()

 IF(Qt4_SUPPORT)
   message(STATUS "-----------------------------Qt4 Support------------------------------")
-  list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} Qt4 )
+  set(${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} Qt4 )
 ELSE()
   message(STATUS "-----------------------------Qt5 Support------------------------------")
-  list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} Qt5 )
+  set(${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} Qt5 )
 ENDIF()
-set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD  ITK SlicerExecutionModel QtToCppXML)
+#set( ${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD  ITK SlicerExecutionModel QtToCppXML)

 message(STATUS "------------------${${PRIMARY_PROJECT_NAME}_DEPENDENCIES}---------------")
+message(STATUS "------------------${${PRIMARY_PROJECT_NAME}_DEPENDENCIES_SUPERBUILD}---------------")

 #option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" OFF)


cmake dev+ [ci skip]

cmake dev+ [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -4,7 +4,7 @@
   URL "${PROJECT_SOURCE_DIR}/3rdparty/tar/pcre2-10.22.tar.gz"
   UPDATE_COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_SOURCE_DIR}/3rdparty/tar/pcre2-10.22/CMakeLists_fixed.txt" "${CMAKE_CURRENT_BINARY_DIR}/pcre2/src/pcre2/CMakeLists.txt"
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/pcre2"
-  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${3RDPARTY_OUTPUT_PATH} -DBUILD_SHARED_LIBS=N -DPCRE2_BUILD_PCRE2_8=Y -DPCRE2_BUILD_PCRE2_16=N -DPCRE2_BUILD_PCRE2_32=N -DPCRE2_BUILD_PCRE2GREP=N -DPCRE2_BUILD_TESTS=N -DPCRE_STATIC_RUNTIME=1
+  CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX:PATH=${3RDPARTY_OUTPUT_PATH}" "-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}" -DBUILD_SHARED_LIBS=N -DPCRE2_BUILD_PCRE2_8=Y -DPCRE2_BUILD_PCRE2_16=N -DPCRE2_BUILD_PCRE2_32=N -DPCRE2_BUILD_PCRE2GREP=N -DPCRE2_BUILD_TESTS=N -DPCRE_STATIC_RUNTIME=1
   )
 SET (PCRE2_INCLUDE_DIR "${3RDPARTY_OUTPUT_PATH}/include")
 IF ((WIN32) AND (CMAKE_BUILD_TYPE MATCHES Debug))


use adios_config -l and adios_config -c separately in FindADIOS1 script

--- cmake/FindADIOS1.cmake
+++ cmake/FindADIOS1.cmake
@@ -117,14 +117,13 @@

 # check `adios_config` program ################################################
 if(ADIOS1_CONFIG)
-  execute_process(COMMAND ${ADIOS1_CONFIG} ${adios1_config_opt}
+  execute_process(COMMAND ${ADIOS1_CONFIG} -c ${adios1_config_opt}
     OUTPUT_VARIABLE adios1_config_out
     RESULT_VARIABLE adios1_config_ret
     OUTPUT_STRIP_TRAILING_WHITESPACE
   )
   if(adios1_config_ret EQUAL 0)
-    string(REGEX MATCH "CFLAGS=([^\n]*)" adios1_match "${adios1_config_out}")
-    string(REPLACE " " ";" adios1_match "${CMAKE_MATCH_1}")
+    string(REPLACE " " ";" adios1_match "${adios1_config_out}")
     set(adios1_include_hints)
     set(ADIOS1_COMPILE_OPTIONS)
     foreach(OPT IN LISTS adios1_match)
@@ -134,8 +133,15 @@
         list(APPEND ADIOS1_COMPILE_OPTIONS ${OPT})
       endif()
     endforeach()
-    string(REGEX MATCH "LDFLAGS=([^\n]*)" adios1_match "${adios1_config_out}")
-    string(REPLACE " " ";" adios1_match "${CMAKE_MATCH_1}")
+  endif()
+
+  execute_process(COMMAND ${ADIOS1_CONFIG} -l ${adios1_config_opt}
+    OUTPUT_VARIABLE adios1_config_out
+    RESULT_VARIABLE adios1_config_ret
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+  if(adios1_config_ret EQUAL 0)
+    string(REPLACE " " ";" adios1_match "${adios1_config_out}")
     set(adios1_libs)
     set(adios1_lib_hints)
     set(adios1_lib_flags)


updated for CYCLUS_ROOT_DIR

updated for CYCLUS_ROOT_DIR

--- cmake/FindCyclus.cmake
+++ cmake/FindCyclus.cmake
@@ -16,14 +16,16 @@
         MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
     ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
 ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
-    FIND_PROGRAM(CYCLUS_BIN cyclus)
-    IF(CYCLUS_BIN)
-        EXECUTE_PROCESS(COMMAND cyclus --install-path
+    IF(NOT DEFINED CYCLUS_ROOT_DIR)
+        FIND_PROGRAM(CYCLUS_BIN cyclus)
+        IF(CYCLUS_BIN)
+            EXECUTE_PROCESS(COMMAND cyclus --install-path
             OUTPUT_VARIABLE CYCLUS_ROOT_DIR
             OUTPUT_STRIP_TRAILING_WHITESPACE)
-    ELSE(CYCLUS_BIN)
-        SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
-    ENDIF(CYCLUS_BIN)
+        ELSE(CYCLUS_BIN)
+            SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
+        ENDIF(CYCLUS_BIN)
+    ENDIF(DEFINED CYCLUS_ROOT_DIR)
 ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

 # Let the user know if we're using a hint


Revert "build: check libavcodec api version"

This reverts commit 06720e2a8dcf986af8ba8f14098afd2af6d0b4b8.

--- cmake/FindFFmpeg.cmake
+++ cmake/FindFFmpeg.cmake
@@ -4,9 +4,6 @@
 #  FFMPEG_FOUND        - all required ffmpeg components found on system
 #  FFMPEG_INCLUDE_DIRS  - combined include directories
 #  FFMPEG_LIBRARIES    - combined libraries to link
-
-set(REQUIRED_AVCODEC_VERSION 0.8)
-set(REQUIRED_AVCODEC_API_VERSION 53.25.0)

 include(FindPkgConfig)

@@ -34,14 +31,6 @@

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFmpeg DEFAULT_MSG AVUTIL_FOUND AVCODEC_FOUND)

-if (AVCODEC_VERSION)
-	if (${AVCODEC_VERSION} VERSION_LESS ${REQUIRED_AVCODEC_API_VERSION})
-		message(FATAL_ERROR "libavcodec version >= ${REQUIRED_AVCODEC_VERSION} (API >= ${REQUIRED_AVCODEC_API_VERSION}) is required")
-	endif()
-else()
-		message("Note: To build libavcodec version >= ${REQUIRED_AVCODEC_VERSION} (API >= ${REQUIRED_AVCODEC_API_VERSION}) is required")
-endif()
-
 if(FFMPEG_FOUND)
 	set(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR})
 	set(FFMPEG_LIBRARIES ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY})


[cmake] add 16b to findMATLAB

[cmake] add 16b to findMATLAB

--- cmake/FindMATLAB.cmake
+++ cmake/FindMATLAB.cmake
@@ -126,7 +126,7 @@
     IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))

     # Search for a version of Matlab available, starting from the most modern one to older versions
-      FOREACH(MATVER "R2016a" "R2015b" "R2015a" "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
+      FOREACH(MATVER "R2016b" "R2016a" "R2015b" "R2015a" "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
         SET(MATLAB_VERSION ${MATVER})
         IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))
           IF(EXISTS /Applications/MATLAB_${MATVER}.app)


Update RTfact detection and enable TBB by default.

--- cmake/FindRTfact.cmake
+++ cmake/FindRTfact.cmake
@@ -8,15 +8,15 @@
 	$ENV{RTFACT_ROOT_DIR}
 )

-## First, try to find the required header files (RTremote/Renderer.hpp)
+## First, try to find the required header files (RTpie/IRayTracer.hpp)
 FIND_PATH(RTFACT_INCLUDE_PATH
-	NAMES RTremote/Renderer.hpp
+	NAMES RTpie/IRayTracer.hpp
 	PATHS ${RTFACT_POSSIBLE_ROOT_DIRS}
 	PATH_SUFFIXES include
 	DOC "RTfact header include dir")

 IF (NOT RTFACT_INCLUDE_PATH)
-	MESSAGE(STATUS "Could not find RTfact header file (RTremote/Renderer.hpp)! Real time ray tracing will be disabled!")
+	MESSAGE(STATUS "Could not find RTfact header file (RTpie/IRayTracer.hpp)! Real time ray tracing will be disabled!")
 ELSE()
 	SET(RTFACT_INCLUDE_DIR ${RTFACT_INCLUDE_PATH} CACHE STRING "Full path to the RTfact headers")


bc target option for linking static libraries

--- cmake/LLVMIRUtil.cmake
+++ cmake/LLVMIRUtil.cmake
@@ -20,7 +20,7 @@
 # public (client) interface macros/functions

 function(llvmir_attach_bc_target)
-  set(options)
+  set(options LINK_STATIC_LIB)
   set(oneValueArgs TARGET DEPENDS)
   set(multiValueArgs)
   cmake_parse_arguments(LLVMIR_ATTACH
@@ -111,6 +111,33 @@
   # compile lang flags
   llvmir_extract_lang_flags(IN_LANG_FLAGS ${LINKER_LANGUAGE})

+  # Link static libraries
+  if(LLVMIR_ATTACH_LINK_STATIC_LIB)
+    message(STATUS "LINK_STATIC_LIB option is turned on. Linking static libraries.")
+
+    # Find statically linked libraries, and add the source files for IR generation
+    foreach(LINK_LIB ${LINK_LIBRARIES})
+      if(TARGET ${LINK_LIB})
+        get_target_property(type ${LINK_LIB} TYPE)
+
+        # Check the library is a static one. For shared libraries, we cannot get the source files for compiling.
+        if(${type} STREQUAL "STATIC_LIBRARY")
+          get_property(LINK_LIB_FILES TARGET ${LINK_LIB} PROPERTY SOURCES)
+          message(STATUS "Linking Static library: ${LINK_LIB}")
+
+          foreach(LINK_LIB_FILE ${LINK_LIB_FILES})
+            if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LINK_LIB_FILE}")
+              list(APPEND IN_FILES ${LINK_LIB_FILE})
+              message(STATUS "Add file from static library: ${LINK_LIB_FILE}")
+            endif()
+          endforeach()
+        endif()
+      endif()
+    endforeach()
+
+    list(REMOVE_DUPLICATES IN_FILES)
+  endif()
+
   set(header_exts ".h;.hh;.hpp;.h++;.hxx")
   set(temp_include_dirs "")

@@ -1007,6 +1034,6 @@
     set_property(SOURCE ${IN_FULL_LLVMIR_FILE} PROPERTY EXTERNAL_OBJECT TRUE)
   endforeach()

-  ## postamble
+# # postamble
 endfunction()


Generalise CMake versioning module

Generalise CMake versioning module

--- cmake/Versioning.cmake
+++ cmake/Versioning.cmake
@@ -2,7 +2,8 @@
 #
 # set_version()
 #   Set version string variable to value X.Y.Z defined in the file VERSION or
-#   Git branch and commit if that file does not exist.
+#   Git branch and commit if that file does not exist. If no VERSION file or Git
+#   information are present, the version is set to "dev".
 #
 # create_version_header(create_version_header output_version_file)
 #   Replace version string in template file and create output header file. If
@@ -35,6 +36,25 @@
 #   # build directory and will be named Version.h:
 #   create_version_header(Version.h.in)
 #
+
+# Set the DIRECTORY_IS_GIT_REPO variable
+function(is_directory_git_repo)
+  execute_process(
+    COMMAND           "${GIT_EXECUTABLE}" status
+    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    RESULT_VARIABLE   git_result
+    OUTPUT_VARIABLE   git_output
+    ERROR_VARIABLE    git_error
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    ERROR_STRIP_TRAILING_WHITESPACE
+  )
+
+  if(git_result EQUAL 0)
+    set(DIRECTORY_IS_GIT_REPO TRUE PARENT_SCOPE)
+  else()
+    set(DIRECTORY_IS_GIT_REPO FALSE PARENT_SCOPE)
+  endif()
+endfunction()

 # Set the GIT_BRANCH variable to the current Git branch.
 function(set_git_branch_variable)
@@ -117,7 +137,6 @@

 # Set VERSION_STRING to "<branch>-<commit>[-dirty]".
 macro(set_version_variables_from_git_branch_and_commit)
-  find_package(Git REQUIRED)
   set_git_branch_variable()
   set_git_short_ref_variable()
   set_git_dirty_variable()
@@ -127,13 +146,32 @@
   set(PATCH_VERSION "0" PARENT_SCOPE)
 endmacro()

-# Set version string variable to release version or Git branch and commit.
+# Set VERSION_STRING to "dev".
+macro(set_version_variables_to_constant_string)
+  set(VERSION_STRING "dev" PARENT_SCOPE)
+  set(MAJOR_VERSION "0" PARENT_SCOPE)
+  set(MINOR_VERSION "0" PARENT_SCOPE)
+  set(PATCH_VERSION "0" PARENT_SCOPE)
+endmacro()
+
+# Set version string variable to release version, Git branch and commit or
+# constant string.
 function(set_version)
   if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/VERSION")
     file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/VERSION" RELEASE_VERSION)
     match_and_set_version_variables("${RELEASE_VERSION}")
   else()
-    set_version_variables_from_git_branch_and_commit()
+    find_package(Git)
+    if(GIT_FOUND)
+      is_directory_git_repo()
+      if(DIRECTORY_IS_GIT_REPO)
+        set_version_variables_from_git_branch_and_commit()
+      else()
+        set_version_variables_to_constant_string()
+      endif()
+    else()
+      set_version_variables_to_constant_string()
+    endif()
   endif()
 endfunction()


Only attempt to find Qt4 if there is at least one qt device enabled.

svn path=/trunk/; revision=10091

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -50,12 +50,12 @@
 # PYQT_SIP_DIR		  - sip system directory
 # PYQT_SIP_FLAGS	  - sip command flags

-find_package(Qt4)
 if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt)
   set(ANY_QT_DEVICE ON)
 endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt)

 if(ANY_QT_DEVICE)
+  find_package(Qt4)
   if(QT4_FOUND)
     if(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2)
       set(QT_USE_QTSVG 1)


optional gmp

optional gmp

--- cmake/unit-tests.cmake
+++ cmake/unit-tests.cmake
@@ -2,6 +2,7 @@
 find_package(CryptoPP REQUIRED)
 find_package(EthKey REQUIRED)
 find_package(JsonCPP REQUIRED)
+find_package(GMP)

 file(GLOB TEST_SOURCES
     "test/*.cpp"
@@ -13,4 +14,8 @@
 add_executable(ethstealth-tests ${TEST_SOURCES})
 add_dependencies(ethstealth-tests ethstealth)

-target_link_libraries(ethstealth-tests ethstealth ${ETHKEY_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_RANDOM_LIBRARY} ${CRYPTOPP_LIBRARY} ${JSONCPP_LIBRARY} gmp)
+target_link_libraries(ethstealth-tests ethstealth ${ETHKEY_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_RANDOM_LIBRARY} ${CRYPTOPP_LIBRARY} ${JSONCPP_LIBRARY})
+
+if(GMP_LIBRARY)
+    target_link_libraries(ethstealth-tests ${GMP_LIBRARY})
+endif()


Shorten Python module target names

Shorten Python module target names

Visual Studio chokes on the generated names and CMake's generated
filepaths have names which are too long.

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

   set(python_sitepath)
-  set(python_arch arch)
+  set(python_arch x)

   if (WIN32)
     set(python_install_path bin)
@@ -96,25 +96,25 @@
     if (python_noarch)
       set(python_install_path lib)
       set(python_sitepath /site-packages)
-      set(python_arch noarch)
+      set(python_arch)
     else ()
       set(python_install_path "lib${LIB_SUFFIX}")
     endif ()
   endif ()

-  sprokit_configure_file("python-module-${python_arch}-${safe_modpath}-${module}"
+  sprokit_configure_file("python${python_arch}-${safe_modpath}-${module}"
     "${path}"
     "${sprokit_python_output_path}${sitepath}/${modpath}/${module}.py"
     PYTHON_EXECUTABLE)

   foreach (config ${CMAKE_CONFIGURATION_TYPES})
-    sprokit_configure_file("python-module-${python_arch}-${safe_modpath}-${module}-${config}"
+    sprokit_configure_file("python${python_arch}-${safe_modpath}-${module}-${config}"
       "${path}"
       "${sprokit_python_output_path}/${config}${sitepath}/${modpath}/${module}.py"
       PYTHON_EXECUTABLE)

     add_dependencies(python
-      "python-module-${python_arch}-${safe_modpath}-${module}-${config}")
+      "python${python_arch}-${safe_modpath}-${module}-${config}")
   endforeach ()

   sprokit_install(
@@ -123,7 +123,7 @@
     COMPONENT   runtime)

   add_dependencies(python
-    "python-module-${python_arch}-${safe_modpath}-${module}")
+    "python${python_arch}-${safe_modpath}-${module}")

   if (python_both_arch)
     set(python_both_arch)


COMP: Remove dead template dispatch code

Mechanism for dispatching template type based on file name was still present,
so it was removed

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -12,22 +12,12 @@
   set ( output_h "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.h" )
   set ( output_cxx "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.cxx" )

-  # Use the ImageFilterTemplate if specified
-  if ( ${TEMPLATE_TYPE} EQUAL ${image_filter_template} )
-    set ( input_json_file ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}.json )
-    set ( template_file_h ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.h.in )
-    set ( template_file_cxx ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.cxx.in )
-    # Make a global list of ImageFilter template filters
-    set ( IMAGE_FILTER_LIST ${IMAGE_FILTER_LIST} ${FILENAME} CACHE INTERNAL "" )
+  set ( input_json_file ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}.json )
+  set ( template_file_h ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.h.in )
+  set ( template_file_cxx ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.cxx.in )

-  # Use the RegionGrowingImageFilterTemplate if specified
-  elseif ( ${TEMPLATE_TYPE} EQUAL ${region_growing_image_filter_template} )
-    set ( input_json_file ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}_RegionGrowing.json )
-    set ( template_file_h ${CMAKE_CURRENT_SOURCE_DIR}/sitkRegionGrowingImageFilterTemplate.h.in )
-    set ( template_file_cxx ${CMAKE_CURRENT_SOURCE_DIR}/sitkRegionGrowingImageFilterTemplate.cxx.in )
-    # Make a global list of RegionGrowingImageFilter template filters
-    set ( REGION_GROWING_FILTER_LIST ${REGION_GROWING_FILTER_LIST} ${FILENAME} CACHE INTERNAL "" )
-  endif()
+  # Make a global list of ImageFilter template filters
+  set ( IMAGE_FILTER_LIST ${IMAGE_FILTER_LIST} ${FILENAME} CACHE INTERNAL "" )

   add_custom_command (
     OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.h" "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.cxx"


XDK: fix error on sucessful built of OTB_DEPENDS target

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -160,11 +160,15 @@
   -DCMAKE_STATIC_LINKER_FLAGS:STRING=${CMAKE_STATIC_LINKER_FLAGS}
   )

+ add_custom_command(OUTPUT otb_depends_done.txt
+ COMMAND cmake -E touch otb_depends_done.txt
+ DEPENDS ${OTB_DEPENDENCIES}
+ )
 add_custom_target(OTB_DEPENDS
-DEPENDS ${OTB_DEPENDENCIES}
-COMMAND -E echo "Building only otb dependencies: ${OTB_DEPENDENCIES}"
+DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/otb_depends_done.txt
 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 COMMENT "Built all otb dependencies: ${OTB_DEPENDENCIES}"
+VERBATIM
 )

 ExternalProject_Add(OTB


Update External_Gadgetron.cmake

Update External_Gadgetron.cmake

Ensure that Gadgetron is built using the same version of Python as Boost (and other libraries).

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -65,6 +65,9 @@
         -DCMAKE_INSTALL_PREFIX=${Gadgetron_Install_Dir}
         -DBOOST_INCLUDEDIR=${BOOST_ROOT}/include/
         -DBOOST_LIBRARYDIR=${BOOST_LIBRARY_DIR}
+	-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
+        -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
+        -DPYTHON_LIBRARY=${PYTHON_LIBRARY}
         -DGTEST_ROOT=${GTEST_ROOT}
         -DHDF5_ROOT=${HDF5_ROOT}
         -DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}


Just use the source dir to search the deps

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -961,7 +961,7 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "/" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )