added MUMPS-5.2.1

added MUMPS-5.2.1

--- cmake/FindMumps.cmake
+++ cmake/FindMumps.cmake
@@ -21,6 +21,8 @@
 if($ENV{MUMPS_ROOT})
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} $ENV{MUMPS_ROOT}/lib)
 endif()
+set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.1/lib)
+set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.0/lib)
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.2/lib)
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.1/lib)
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.0/lib)
@@ -48,6 +50,8 @@
 find_path(MUMPS_INCLUDE_PATH
   NAMES mumps_compat.h
   HINTS $ENV{MUMPS_ROOT}/include
+    ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.1/include
+    ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.0/include
     ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.2/include
     ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.1/include
     ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.0/include


test commit

test commit

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -311,7 +311,7 @@
 # -msse3 flag is not valid for Mips therefore clang gives a warning
 # message with -msse3. But check_c_compiler_flags() checks only for
 # compiler error messages. Therefore COMPILER_RT_HAS_MSSE3_FLAG turns out to be
-# true on Mips. So we make it false here.
+# true on Mips, so we make it false here.
 if("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
   set(COMPILER_RT_HAS_MSSE3_FLAG FALSE)
 endif()


add RECURSE setting for SD library

add RECURSE setting for SD library

SD is part of the arduino installation and should be listed for recurse.
This is related to issue queezythegreat/arduino-cmake#22


Updated FindCMCSTL2.cmake to properly handle multiple find_package invocations.


ENH: Update IOSTL to 2019-01-16 master

ENH: Update IOSTL to 2019-01-16 master

 Jon Haitz Legarreta Gorroño (3):
       ENH: Improve the `README` file.
       ENH: Add CI.
       DOC: Re-use `README.rst` info in `itk-module.cmake`.

 Matt McCormick (1):
       ENH: Enable mesh module factory registration

--- Modules/Remote/IOSTL.remote.cmake
+++ Modules/Remote/IOSTL.remote.cmake
@@ -3,5 +3,5 @@
   "This module contains classes for reading and writing QuadEdgeMeshes using
   the STL (STereoLithography)file format. https://hdl.handle.net/10380/3452"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
-  GIT_TAG f4723954fdfe294f84f69907e964b50e48b60218
+  GIT_TAG e681a38aba1d89561eec89584d80f62dd2affa23
   )


Remove LIBIDN because it is not used

Remove LIBIDN because it is not used

--- config-kopete.h.cmake
+++ config-kopete.h.cmake
@@ -7,9 +7,6 @@

 /* Define to compile with GSM SMS support */
 /* #undef INCLUDE_SMSGSM */
-
-/* Define to 1 if you want IDN support. */
-#define LIBIDN 1

 /* Jingle support is enabled */
 /* #undef SUPPORT_JINGLE */


Use static linking when cross compiling for Windows under Linux.

	modified:   w64.cmake

--- w64.cmake
+++ w64.cmake
@@ -27,3 +27,8 @@

 # http://stackoverflow.com/questions/17721619/cmake-cross-compile-libraries-are-not-found
 # set(CMAKE_LIBRARY_PATH ../cross-tools/include/)
+
+set(CMAKE_CXX_FLAGS "-std=c++11 -static-libgcc -static-libstdc++ -static -O3 -s")
+set(CMAKE_C_FLAGS "-static-libgcc -static-libstdc++ -static -O3 -s")
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-static-libgcc -static-libstdc++ -static -O3 -s")
+set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-std=c++11 -static-libgcc -static-libstdc++ -static -O3 -s")


CMake: source ANDROID_* variables from environment

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -36,7 +36,7 @@
 set(IMPORT_URHO3D_VARIABLES_FROM_ENV BUILD_SHARED_LIBS)
 foreach(key ${ENVIRONMENT})
     list (FIND IMPORT_URHO3D_VARIABLES_FROM_ENV ${key} _index)
-    if ("${key}" MATCHES "^(URHO3D_|CMAKE_).+" OR ${_index} GREATER -1)
+    if ("${key}" MATCHES "^(URHO3D_|CMAKE_|ANDROID_).+" OR ${_index} GREATER -1)
         if (NOT DEFINED ${key})
             set (${key} $ENV{${key}} CACHE STRING "" FORCE)
         endif ()


CSharp: Make MacOS builds work again (swig binary had no executable flag).

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -266,7 +266,7 @@
         # Prebuilt files are mainly for windows/CI. If you run linux or macos you should probably build SWIG yourself.
         # A SWIG distribution built from code at https://github.com/rokups/swig/tree/Urho3D
         # You may build it yourself and set SWIG_EXECUTABLE in order to not use prebuilt binaries.
-        file(DOWNLOAD https://github.com/rokups/Urho3D/files/2340099/swig-dist.zip ${CMAKE_BINARY_DIR}/swig-dist.zip)
+        file(DOWNLOAD https://github.com/rokups/Urho3D/files/2343051/swig-dist.zip ${CMAKE_BINARY_DIR}/swig-dist.zip)
         execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf swig-dist.zip WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
         if (HOST_LINUX)
             set (SWIG_PLATFORM lin64)


Added support for Collada DOM-2.5

Added support for Collada DOM-2.5

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -67,14 +67,17 @@
     /usr/local/include
     /usr/local/include/colladadom
     /usr/local/include/collada-dom
+    /usr/local/include/collada-dom2.5
     /usr/local/include/collada-dom2.4
     /usr/local/include/collada-dom2.2
     /opt/local/include/collada-dom
+    /opt/local/include/collada-dom2.5
     /opt/local/include/collada-dom2.4
     /opt/local/include/collada-dom2.2
     /usr/include/
     /usr/include/colladadom
     /usr/include/collada-dom
+    /usr/include/collada-dom2.5
     /usr/include/collada-dom2.4
     /usr/include/collada-dom2.2
     /sw/include # Fink
@@ -86,7 +89,7 @@
 )

 FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
-    NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.4-dp collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt
+    NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.5-dp collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt collada-dom2.4-dp collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
     ${COLLADA_DOM_ROOT}
@@ -110,7 +113,7 @@
 )

 FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
-    NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d  collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d
+    NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d  collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
     ${COLLADA_DOM_ROOT}


Removed the need to Find glfw/glew from build_forge script

ArrayFire just needs to make sure the following variables are
set to build with glew and glfw.
* GLFW_DIR
* GLEW_ROOT_DIR

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -16,7 +16,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG 22eb2aeafc4547564e7d90234320cd65f2f859fb
+    GIT_TAG f9c27b1787ed1551b3aedb12749d4068606a97f9
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""
@@ -25,6 +25,9 @@
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+    -DUSE_GLEWmx_STATIC:STRING=${USE_GLEWmx_STATIC}
+    -DGLEW_ROOT_DIR:STRING=${GLEW_ROOT_DIR}
+    -DGLFW_ROOT_DIR:STRING=${GLFW_ROOT_DIR}
     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     -DBUILD_EXAMPLES:BOOL=OFF
     ${byproducts}


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -135,8 +135,8 @@
 #ctest_update (RETURN_VALUE count)
 update_test_models()
 ctest_configure()
-ctest_build()
-IF (NOT CTEST_SKIP_TESTING)
-  ctest_test()
-ENDIF()
-#ctest_submit()
+#ctest_build()
+#IF (NOT CTEST_SKIP_TESTING)
+#  ctest_test()
+#ENDIF()
+ctest_submit()


unix: remove install rules for lapack and blas

Using the numpy/scipy wheels makes building these ourselves unnecessary.

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -88,17 +88,6 @@
 )
 endif()

-# install blas and lapack (it is too slow to call the install dependencies script on numpy,
-# it causes the test to time out)
-install(CODE
-  "execute_process(COMMAND
-    ${CMAKE_COMMAND}
-    -E copy_if_different ${install_location}/lib/libblas.so \${CMAKE_INSTALL_PREFIX}/lib)
-   execute_process(COMMAND
-    ${CMAKE_COMMAND}
-    -E copy_if_different ${install_location}/lib/liblapack.so \${CMAKE_INSTALL_PREFIX}/lib)"
-)
-
 # install executables
 foreach(executable tomviz)
   install(PROGRAMS "${install_location}/bin/${executable}"


[UPD] By default Octave installer want to install the software in C:/Software/Octave-x.y.z. Try to find Octave in this path too.

--- CMake/FindOctave.cmake
+++ CMake/FindOctave.cmake
@@ -41,7 +41,9 @@
   SET(OCTAVE_PATHS_L1 )
   SET(OCTAVE_PATHS_L2 )
   # Level 0
-  FILE(GLOB OCTAVE_PATHS_L0 "c:/Octave*")
+  FILE(GLOB OCTAVE_PATHS_L0A "c:/Octave*")
+  FILE(GLOB OCTAVE_PATHS_L0B "c:/Software/Octave*")
+  SET(OCTAVE_PATHS_L0 ${OCTAVE_PATHS_L0A} ${OCTAVE_PATHS_L0B})
   # Level 1
   FOREACH(_file_ ${OCTAVE_PATHS_L0})
     FILE(GLOB OCTAVE_PATHS_TEMP "${_file_}/*")


ENH: better fix for flat_namespace (hopefully)

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -73,8 +73,22 @@
 ENDIF(CMAKE_COMPILER_IS_GNUCXX)

 IF(APPLE)
-  SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -Wl,-U,_environ")
-  SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-U,_environ")
+  # Darwin versions:
+  #   6.x == Mac OSX 10.2
+  #   7.x == Mac OSX 10.3
+  #   8.x == Mac OSX 10.4
+  #   9.x == Mac OSX 10.5
+  STRING(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_SYSTEM_VERSION}")
+  # Starting 10.4, Tcl/Tk now uses dlopen(RLTD_LOCAL) to load dylib libraries.
+  # While they could not be convinced to use the default RLTD_GLOBAL, they
+  # suggested the workaround was to stop using -flat_namespace.
+  # see https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1961211&group_id=10894
+  IF("${DARWIN_MAJOR_VERSION}" LESS 8)
+    SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
+      "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -Wl,-flat_namespace,-U,_environ")
+    SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
+      "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-flat_namespace,-U,_environ")
+  ENDIF("${DARWIN_MAJOR_VERSION}" LESS 8)
   IF(CMAKE_COMPILER_IS_GNUCXX)
     SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -no-cpp-precomp")
     SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -no-cpp-precomp")
@@ -123,11 +137,10 @@

 # Disable deprecation warnings for standard C and STL functions in VS2005
 # and later
-IF(MSVC80 OR MSVC90)
-  ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
-  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
+IF(CMAKE_COMPILER_2005)
+  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
   ADD_DEFINITIONS(-D_SCL_SECURE_NO_DEPRECATE)
-ENDIF(MSVC80 OR MSVC90)
+ENDIF(CMAKE_COMPILER_2005)

 #-----------------------------------------------------------------------------
 # Add compiler flags VTK needs to work on this platform.  This must be


Updated core/command_arguments.

Updated core/command_arguments.

--- core/command_arguments.cmake
+++ core/command_arguments.cmake
@@ -5,24 +5,76 @@
 # - Quated Argument
 # - Unquated Argument

+cmake_minimum_required(VERSION 3.0)
+
 set(variable 123)
+

 # Bracket Argument
 # see: http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#bracket-argument
 # memo: The bracket argument can be used when CMake version is greater than or equal to 3.0.

+message(\n)
+message("## Bracket Argument")
+
+# Multiple line
+# memo: Ignore a first blank line.
 message([[
 A first line.
 A second line.
-A third line.
-]])
+A third line.]])

+# Variable reference
 message([=[
 A variable reference is disabled: ${variable}
-]]
-]=])
+]]]=])

+# Escape sequence
 message([==[
-An escape sequence is disabled: \t
-]=]
-]==])
+An escape sequence is disabled: a\tb]=
+]]==])
+
+
+# Quated Argument
+# see: http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#quoted-argument
+
+message(\n)
+message("## Quated Argument")
+
+# Multiple line
+message("
+A second line.
+A third line.")
+
+# Value reference
+message("A variable reference is enabled: ${variable}")
+
+# Escape sequence
+message("An escape sequence is enabled: a\tb")
+
+# Continuation line
+message("A first line. \
+The same line.")
+
+
+# Unquated Argument
+# see: http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#unquoted-argument
+
+message(\n)
+message("## Unquated Argument")
+
+# Multiple line
+message(A\ first\ line.\n
+A\ second\ line.\n
+A\ third\ line.)
+
+# Value reference
+message(A\ variable\ reference\ is\ enabled:\ ${variable})
+
+# Escape sequence
+message(An\ escape\ sequence\ is\ enabled:\ a\tb)
+
+# List
+foreach(v The;list;elements Not\;List\;Element)
+  message(${v})
+endforeach()


rewritten PCH with object library - this now resolves all generator expressions correctly by default

--- pch.cmake
+++ pch.cmake
@@ -44,79 +44,7 @@
 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.

-macro(get_dependencies_compile_options target compileOptions compileDefinitions includeDirectories systemIncludeDirectories visited)
-    get_target_property( dependencies ${target} INTERFACE_LINK_LIBRARIES )
-    get_target_property( target_type ${target} TYPE )
-    if( NOT ${target_type} STREQUAL INTERFACE_LIBRARY )
-        get_target_property( private_dependencies ${target} LINK_LIBRARIES )
-        list( APPEND dependencies ${private_dependencies} )
-    endif()
-    foreach(dep ${dependencies})
-        if(TARGET ${dep} )
-            # check if we already processed this dependency
-            list(FIND ${visited} ${dep} pos)
-
-            if(${pos} EQUAL -1)
-                get_target_property(flags ${dep} INTERFACE_COMPILE_OPTIONS)
-                if(flags)
-                    list(APPEND ${compileOptions} ${flags})
-                endif()
-
-                get_target_property(def ${dep} INTERFACE_COMPILE_DEFINITIONS)
-                if(def)
-                    list( APPEND ${compileDefinitions} ${def} )
-                endif()
-
-                get_target_property(inc ${dep} INTERFACE_INCLUDE_DIRECTORIES)
-                if(inc)
-                    list( APPEND ${includeDirectories} ${inc} )
-                endif()
-
-                get_target_property(incSys ${dep} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
-                if(incSys)
-                    list( APPEND ${systemIncludeDirectories} )
-                endif()
-
-                list(APPEND ${visited} ${dep})
-
-                get_dependencies_compile_options(${dep} ${compileOptions} ${compileDefinitions} ${includeDirectories} ${systemIncludeDirectories} ${visited})
-            endif()
-        endif()
-    endforeach()
-endmacro()
-
-function( filter_item filtered_item item )
-   # message( STATUS "Filtering ${item}" )
-    set(append_item true)
-    if( ${item} MATCHES ".*COMPILE_LANGUAGE.*" )
-        if( ${item} MATCHES ".*\\\$<\\\$<COMPILE_LANGUAGE:CXX>:(.*)>$")
-            set( item ${CMAKE_MATCH_1} )
-        else()
-            set(append_item false)
-        endif()
-    endif()
-    if( ${item} MATCHES ".*(INSTALL_INTERFACE|BUILD_INTERFACE).*" )
-        set(append_item false)
-    endif()
-    # Adding CONFIG:DEBUG flags in Release and vice versa produces empty quotes to compiler command line
-    # which confuses GCC.
-    string( TOUPPER ${item} upper_item )
-    if(
-        ( ( ${upper_item} MATCHES ".*CONFIG:RELEASE.*" OR ${upper_item} MATCHES ".*NOT:\\\$<CONFIG:DEBUG.*" ) AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug" ) OR
-        ( ( ${upper_item} MATCHES ".*CONFIG:DEBUG.*" OR ${upper_item} MATCHES ".*NOT:\\\$<CONFIG:RELEASE.*" ) AND ${CMAKE_BUILD_TYPE} STREQUAL "Release" )
-    )
-        set(append_item false)
-    endif()
-    if( ${append_item} )
-        set( ${filtered_item} ${item} PARENT_SCOPE )
-       # message( STATUS "    -> filtered to ${item}" )
-    else()
-        unset( ${filtered_item} PARENT_SCOPE )
-       # message( STATUS "    -> filtered out" )
-    endif()
-endfunction()
-
-macro( ADD_PRECOMPILED_HEADER _targetName _input )
+macro( add_precompiled_header _targetName _input )
     get_filename_component( _inputWe ${_input} NAME_WE )
     set( pch_source ${_inputWe}.cpp )

@@ -160,103 +88,53 @@
         if( ${CMAKE_GENERATOR} STREQUAL "Xcode" )
             set_target_properties(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER ${_input} XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "Yes")
         else()
-            GET_FILENAME_COMPONENT(_name ${_input} NAME)
-            SET(GCH_PATH "${CMAKE_CURRENT_BINARY_DIR}/${_targetName}-pch" )
-            SET(_output "${GCH_PATH}/${_name}.gch")
-        #    SET(_output "${CMAKE_BINARY_DIR}/${_name}.gch")

-            string(REGEX REPLACE "[^a-zA-Z0-9]" "" OutputName ${_output})
+            add_library( ${_targetName}_PCH OBJECT ${_input} )
+            set_source_files_properties( ${_input} PROPERTIES OBJECT_DEPENDS "${PCH_LOCAL_DEPENDS}" COMPILE_OPTIONS -xc++-header LANGUAGE "CXX" COMPILE_DEFINITIONS "USING_PCH" )

-            if(NOT DEFINED ${OutputName}_CREATED)
-                # obtain optimization flags
-                STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
-                SET(_compiler_FLAGS ${${_flags_var_name}})
-                # obtain all other flags
-                list(APPEND _compiler_FLAGS ${CMAKE_CXX_FLAGS})
+            get_target_property( dependencies ${_targetName} INTERFACE_LINK_LIBRARIES )
+            target_link_libraries( ${_targetName}_PCH PRIVATE ${dependencies} )

-                # Obtain target dependencies flags (recursively)
-                set( visited "" )
-                set( depsCompileOptions "" )
-                set( depsCompileDefinitions "" )
-                set( depsIncludeDirectories "" )
-                set( depsSystemIncludeDirectories "" )
-                get_dependencies_compile_options( ${_targetName} depsCompileOptions depsCompileDefinitions depsIncludeDirectories depsSystemIncludeDirectories visited )
-    #            message("Additional compile flags for ${_targetName}: ${targetCompileFlags}")
+            get_filename_component( _name ${_input} NAME )
+            set( GCH_PATH "${CMAKE_CURRENT_BINARY_DIR}/${_targetName}-pch" )
+            set( _output "${GCH_PATH}/${_name}.gch" )

-                get_directory_property( _directory_flags INCLUDE_DIRECTORIES )
-                get_target_property( _target_include_dirs ${_targetName} INCLUDE_DIRECTORIES )
-                get_target_property( _target_interface_include_dirs ${_targetName} INTERFACE_INCLUDE_DIRECTORIES )
-                foreach( item ${_directory_flags} ${_target_include_dirs} ${_target_interface_include_dirs} ${depsIncludeDirectories} )
-                    filter_item( filtered_item ${item} )
-                    if( filtered_item )
-                        list( APPEND _compiler_FLAGS "-I${filtered_item}" )
-                    endif()
-                endforeach()
+            file( RELATIVE_PATH pch_relative_path ${CMAKE_CURRENT_SOURCE_DIR} ${_input} )

-                get_target_property( _target_system_include_dirs ${_targetName} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )
-                foreach( item ${_target_system_include_dirs} ${depsSystemIncludeDirectories} )
-                    filter_item( filtered_item ${item} )
-                    if( filtered_item )
-                        list( APPEND _compiler_FLAGS "-isystem ${filtered_item}" )
-                    endif()
-                endforeach()
+            add_custom_target( ${_targetName}_PCH_symlink
+                COMMAND
+                    ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${_targetName}_PCH.dir/${pch_relative_path}.o" "${_output}"
+            )
+            add_dependencies( ${_targetName}_PCH_symlink ${_targetName}_PCH )

-                get_directory_property( _directory_flags COMPILE_DEFINITIONS )
-                get_target_property( _target_compile_definitions ${_targetName} COMPILE_DEFINITIONS )
-                foreach( def ${_directory_flags} ${_target_compile_definitions} ${depsCompileDefinitions} )
-                    filter_item( filtered_item ${def} )
-                    if( filtered_item )
-                        list( APPEND _compiler_FLAGS "-D${filtered_item}" )
-                    endif()
-                endforeach()
+            get_target_property( _target_include_dirs ${_targetName} INCLUDE_DIRECTORIES )

-                get_directory_property( _compile_options COMPILE_OPTIONS )
-                get_target_property( _target_compile_options ${_targetName} COMPILE_OPTIONS )
-                foreach( option ${_compile_options} ${_target_compile_options} ${depsCompileOptions} )
-                    filter_item( filtered_item ${option} )
-                    if( filtered_item )
-                        list(APPEND _compiler_FLAGS ${filtered_item})
-                    endif()
-                endforeach()
+            if( _target_include_dirs )
+                target_include_directories( ${_targetName}_PCH PRIVATE ${_target_include_dirs} )
+            endif()

-    	    get_target_property( _target_pic ${_targetName} POSITION_INDEPENDENT_CODE )
-                if(_target_pic)
-                    list(APPEND _compiler_FLAGS "-fPIC")
-                endif()
+            get_target_property( _target_interface_include_dirs ${_targetName} INTERFACE_INCLUDE_DIRECTORIES )
+            if( _target_interface_include_dirs )
+                target_include_directories( ${_targetName}_PCH PRIVATE ${_target_interface_include_dirs} )
+            endif()

-                if( ANDROID )
-                    list( APPEND _compiler_FLAGS "--sysroot=${CMAKE_SYSROOT}" )
-                    foreach( sid ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES} )
-                        list( APPEND _compiler_FLAGS "-isystem ${sid}" )
-                    endforeach()
-                    list( APPEND _compiler_FLAGS "-target ${CMAKE_CXX_COMPILER_TARGET} " )
-                endif()
+            get_target_property( _target_system_include_dirs ${_targetName} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )

-                if( APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET )
-                    list(APPEND _compiler_FLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
-                endif()
+            if( _target_system_include_dirs )
+                target_include_directories( ${_targetName}_PCH SYSTEM PRIVATE ${_target_system_include_dirs} )
+            endif()

-                set(COMPILER ${CMAKE_CXX_COMPILER})
-                if(${COMPILER} MATCHES "ccache")
-                    string(STRIP ${CMAKE_CXX_COMPILER_ARG1} CARG1)
-                    set( COMPILER ${CARG1} )
-                endif()
+            get_target_property( _target_compile_definitions ${_targetName} COMPILE_DEFINITIONS )

-                list( REMOVE_DUPLICATES _compiler_FLAGS )
+            if( _target_compile_definitions )
+                target_compile_definitions( ${_targetName}_PCH PRIVATE ${_target_compile_definitions} )
+            endif()

-                SEPARATE_ARGUMENTS(_compiler_FLAGS)
+            get_target_property( _target_compile_options ${_targetName} COMPILE_OPTIONS )

-                ADD_CUSTOM_COMMAND(
-                  OUTPUT ${_output}
-                  COMMAND ${CMAKE_COMMAND} -E remove ${_output}
-                  COMMAND ${COMPILER} -x c++-header ${_compiler_FLAGS} -o ${_output} ${_input}
-                  DEPENDS ${_input} ${PCH_LOCAL_DEPENDS}
-                  COMMENT "Building precompiled header for ${_targetName}"
-                  VERBATIM)
-                set(${OutputName}_CREATED true)
-                # set(${OutputName}_CREATED true PARENT_SCOPE)
+            if( _target_compile_options )
+                target_compile_options( ${_targetName}_PCH PRIVATE ${_target_compile_options} )
             endif()
-            add_custom_target(${_targetName}_PCH DEPENDS ${_output} SOURCES ${_input})

             ## Implementation note:
             ## We always build single PCH for target. However, some source files in target can have different compile flags.
@@ -272,11 +150,10 @@
             foreach( source ${target_sources} )
                 get_source_file_property( old_flags ${source} COMPILE_FLAGS )
                 if( NOT old_flags AND ${source} MATCHES ".*\\.c.+" )
-                    set_source_files_properties( "${source}" PROPERTIES COMPILE_FLAGS "-include ${GCH_PATH}/${PCH_NAME}.h -Winvalid-pch" )
+                    set_source_files_properties( "${source}" PROPERTIES COMPILE_FLAGS "-include ${GCH_PATH}/${_name} -Winvalid-pch" )
                 endif()
             endforeach()
-    #        target_compile_options( ${_targetName} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-include ${GCH_PATH}/${PCH_NAME}.h -Winvalid-pch> )
-            ADD_DEPENDENCIES(${_targetName} ${_targetName}_PCH)
+            add_dependencies( ${_targetName} ${_targetName}_PCH_symlink )
         endif()
     endif( CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" )
 endmacro()


LibJpegTurbo fixes

LibJpegTurbo fixes

--- FindLibJpegTurbo.cmake
+++ FindLibJpegTurbo.cmake
@@ -26,6 +26,6 @@

 # Set the include dir variables and the libraries and let libfind_process do the rest.
 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(LibJpegTurbo_PROCESS_INCLUDES ${LibJpegTurbo_INCLUDE_DIR})
-set(LibJpegTurbo_PROCESS_LIBS ${LibJpegTurbo_LIBRARY})
+set(LibJpegTurbo_PROCESS_INCLUDES LibJpegTurbo_INCLUDE_DIR)
+set(LibJpegTurbo_PROCESS_LIBS LibJpegTurbo_LIBRARY)
 libfind_process(LibJpegTurbo)


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -19,6 +19,7 @@
 Name[el]=DirectShow9
 Name[es]=DirectShow9
 Name[et]=DirectShow9
+Name[fi]=DirectShow9
 Name[ga]=DirectShow9
 Name[gl]=DirectShow9
 Name[hu]=DirectShow9
@@ -56,6 +57,7 @@
 Comment[el]=Σύστημα υποστήριξης DirectShow9 του Phonon
 Comment[es]=Motor DirectShow9 para Phonon
 Comment[et]=Phononi DirectShow9 taustaprogramm
+Comment[fi]=Phonon DirectShow9 -taustaohjelma
 Comment[ga]=Inneall DirectShow9 Phonon
 Comment[gl]=Infraestrutura de DirectShow9 para Phonon
 Comment[hu]=Phonon DirectShow9-modul


tomviz: handle DESTDIR properly

tomviz: handle DESTDIR properly

--- projects/apple/tomviz.bundle.cmake
+++ projects/apple/tomviz.bundle.cmake
@@ -4,26 +4,26 @@
 include(CPack)

 install(CODE "
-     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
+     file(INSTALL DESTINATION \"\ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
           \"${install_location}/Applications/tomviz.app\")

-     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Resources/qt.conf\"
+     file(WRITE \"\ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Resources/qt.conf\"
                 \"\")

     # install all python modules/packages from paraview.
-    file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Python\"
+    file(INSTALL DESTINATION \"\ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Python\"
          USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/Applications/paraview.app/Contents/Python/\")

     # install all other libraries from paraview (this is needed for the PythonD-*.dylib files
     # which don't get copied over by the fixup_bundle.py
-    file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Libraries\"
+    file(INSTALL DESTINATION \"\ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Libraries\"
          USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/Applications/paraview.app/Contents/Libraries/\")

     execute_process(
        COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
-               \"\${CMAKE_INSTALL_PREFIX}/tomviz.app\"
+               \"\ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app\"
                \"${install_location}/lib\"
                \"${install_location}/plugins\")
    "


Revert "consider LOCATION property if IMPORTED_LOCATION is not set" (#83)

--- ament_cmake_export_libraries/cmake/ament_export_libraries.cmake
+++ ament_cmake_export_libraries/cmake/ament_export_libraries.cmake
@@ -93,20 +93,6 @@
                 list(APPEND _imported_libraries ${_imported_location_${_cfg}})
               endif()
             endforeach()
-            if(NOT _imported_libraries)
-              get_target_property(_location "${_lib}" LOCATION)
-              if(_location)
-                list(APPEND _imported_libraries ${_location})
-              else()
-                foreach(_cfg ${_imported_configurations})
-                  get_target_property(_location_${_cfg} "${_lib}"
-                    LOCATION_${_cfg})
-                  if(_location_${cfg})
-                    list(APPEND _imported_libraries ${_location_${_cfg}})
-                  endif()
-                endforeach()
-              endif()
-            endif()
           endif()
           foreach(_imported_library ${_imported_libraries})
             # verify that imported library is an existing absolute path


Fixed the rpath definition

Fixed the rpath definition

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -89,7 +89,7 @@
         # (but later on when installing)
         SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

-        SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+        SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}")

         # add the automatically determined parts of the RPATH
         # which point to directories outside the build tree to the install RPATH
@@ -100,7 +100,7 @@
         LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)

         IF("${isSystemDir}" STREQUAL "-1")
-           SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+           SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}")
         ENDIF("${isSystemDir}" STREQUAL "-1")
         SET(TEMP_CMAKE_OSX_ARCHITECTURES "")
         SET(CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")


posix_rpi_cross_no_shield.cmake: move -D__DF_RPI_SINGLE from commons to this file

--- cmake/configs/posix_rpi_cross_no_shield.cmake
+++ cmake/configs/posix_rpi_cross_no_shield.cmake
@@ -2,13 +2,18 @@
 # use this file to cross compile px4  for raspberry pi without any shield
 include(configs/posix_rpi_common)

+add_definitions(
+	-D__DF_RPI_SINGLE # For raspberry pi without shield accessory
+)
+
 if("$ENV{RPI_USE_CLANG}" STREQUAL "1")
-        set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake)
+	set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake)
 else()
-        set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
+	set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
 endif()

+
 set(CMAKE_PROGRAM_PATH
-        "${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
-        ${CMAKE_PROGRAM_PATH}
+	"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
+	${CMAKE_PROGRAM_PATH}
 )


Output the name of the artifact that has been found

Also remove a comment that has become somewhat misleading as
the output has changed when the downloading of the artifacts
was moved to support/scripts/artifactory-download.

--- Artifactory.cmake
+++ Artifactory.cmake
@@ -151,12 +151,7 @@
                 COMMAND cmake -E create_symlink ${file} ${binary_directory}/artifact-prebuilt/${file_name})
         endforeach()

-        # It's important to note that artifactory_fetch() and
-        # artifactory_add_artifact() don't *force* the underlying build
-        # rule to use a prebuilt artifact. So the word "suggesting" is used
-        # deliberately here -- at this point, we don't want to imply that the
-        # artifact will actually be used, because we can't know for sure.
-        message(STATUS "    - Found prebuilt artifact for ${ARTIFACT_NAME}")
+        message(STATUS "    - Found prebuilt artifact for ${ARTIFACT_NAME}: ${prebuilt_artifact_files}")
     else()
         message(STATUS "    - No prebuilt artifacts found for ${ARTIFACT_NAME}")
     endif()


CTestConfig.cmake

CTestConfig.cmake

  Use the SCI Dart server.

git-svn-id: 9e9401559e51101c165cdce4d49b411eb20436ed@3759 3d70eeeb-363e-0410-a505-8a46323a89f2

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,8 @@
 SET (CTEST_PROJECT_NAME "TEEM")
-SET (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
-SET (CTEST_DROP_METHOD "http")
-SET (CTEST_DROP_SITE "www.na-mic.org")
-SET (CTEST_DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
-SET (CTEST_TRIGGER_SITE "http://${CTEST_DROP_SITE}/cgi-bin/Submit-NAMIC.cgi")
+SET(CTEST_DROP_METHOD "xmlrpc")
+SET(CTEST_DROP_SITE "http://dashboard.sci.utah.edu:8081")
+SET(CTEST_DROP_LOCATION "Teem")
+# I'm not sure which one I need to set, so I'll both of these
+SET(NIGHTLY_START_TIME "21:00:00 MST")
+SET(CTEST_NIGHTLY_START_TIME "21:00:00 MST")


ENH: Prefer https vs http for ctest submission.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
 set(CTEST_PROJECT_NAME "ITK")
 set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "open.cdash.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=Insight")
 set(CTEST_DROP_SITE_CDASH TRUE)


ignore GCC 4.4 noise

ignore GCC 4.4 noise

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -4,6 +4,7 @@
    "call to .*Vc::Warnings::_operator_bracket_warning.* declared with attribute warning"
    "warning is a GCC extension"
    "^-- "  # Ignore output from cmake
+   "suggest parentheses around '\\&\\&' within '\\|\\|'" # GCC 4.4 gives bogus warnings
    "^\\*\\*\\* WARNING non-zero return value in ctest from: make") # Ignore output from ctest

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}


ENH: Update elastix

ENH: Update elastix

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -11,7 +11,7 @@
 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

 set( ELASTIX_GIT_REPOSITORY ${git_protocol}://github.com/kaspermarstal/elastix )
-set( ELASTIX_GIT_TAG e29be08c65ee4b204e89ddc144b1f6d931c41fe1 )
+set( ELASTIX_GIT_TAG 99251130b1d04841a1b94f7023be74124d9d9c43 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ELASTIX_BUILD_SHARED_LIBS ON )


Simplify clang-format call now that we include virtually everything (#1562)

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

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -473,29 +473,7 @@
 # is being built as a subproject.
 if (PROJECT_IS_TOP_LEVEL)
     set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
-    set (CLANG_FORMAT_INCLUDES  "src/*.cpp"
-                                "src/*.h"
-                                "src/*.cu"
-                                "src/include/*.h"
-                                "src/liboslcomp/*.cpp"
-                                "src/liboslcomp/*.h"
-                                "src/liboslexec/batch*.cpp"
-                                "src/liboslexec/wide/*.cpp"
-                                "src/liboslexec/wide/*.h"
-                                "src/liboslexec/rs_fallback.cpp"
-                                "src/liboslquery/*.cpp"
-                                "src/liboslnoise/*.cpp"
-                                "src/liboslquery/*.h"
-                                "src/oslinfo/*.cpp"
-                                "src/oslc/*.cpp"
-                                "src/osl.imageio/*.cpp"
-                                "src/osltoy/*.cpp"
-                                "src/osltoy/*.h"
-                                "src/testrender/*.h"
-                                "src/testrender/*.cpp"
-                                "src/testshade/*.h"
-                                # "src/testshade/*.cpp"
-                                "testsuite/*.cpp"
+    set (CLANG_FORMAT_INCLUDES  "src/*.cpp" "src/*.h" "src/*.cu"
         CACHE STRING "Glob patterns to include for clang-format")
     set (CLANG_FORMAT_EXCLUDES
             # Files "imported and modified" that we don't want to reformat, so
@@ -506,7 +484,6 @@
             "testsuite/*.h"
             # Header files in shaders are OSL, not C++
             "src/shaders/*.h"
-            ""
          CACHE STRING "Glob patterns to exclude for clang-format")
     find_program (CLANG_FORMAT_EXE
                   NAMES clang-format bin/clang-format


Added LibFindMacros.cmake

Added LibFindMacros.cmake

Prevent build errors from aravis


Be a bit more agressive with the mpi tests

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

--- tests/cmake/macros/macro_add_test.cmake
+++ tests/cmake/macros/macro_add_test.cmake
@@ -82,10 +82,11 @@
       IF("${_n_cpu}" STREQUAL "0")
         SET(_target ${_test_name}.${_build_lowercase}) # the target name for the executable
         SET(_run_command) # the first part of the command to issue
-        SET(_n_cpu 1) # set it to one, we'll still occupy one processor to run a test ;-)
+        SET(_processors 1)
       ELSE()
         SET(_target ${_test_name}.mpirun=${_n_cpu}.${_build_lowercase}) # the target name for the executable
         SET(_run_command mpirun -np ${_n_cpu}) # the first part of the command to issue
+        SET(_processors 2) # heuristically...
       ENDIF()

       SET(_test_full ${_category}/${_target}) # full test name
@@ -186,7 +187,7 @@
       SET_TESTS_PROPERTIES(${_test_full} PROPERTIES
         LABEL "${_category}"
         TIMEOUT ${TEST_TIME_LIMIT}
-        PROCESSORS ${_n_cpu} # 0 was changed to 1 above.
+        PROCESSORS ${_processors}
         )
     ENDIF()
   ENDFOREACH()


Increase debug.

Increase debug.

--- ModularDeps.cmake
+++ ModularDeps.cmake
@@ -18,10 +18,12 @@
   if(DEPENDENCY_${AD_NAME}_REPO)
     message(STATUS "Setting the repository for dependency '${AD_NAME}' to the value from cache '${DEPENDENCY_${AD_NAME}_REPO}'.")
     set(AD_REPO "${DEPENDENCY_${AD_NAME}_REPO}")
-  endif()
-  if(NOT AD_REPO)
+  elseif(AD_REPO)
+    message(STATUS "Setting the repository for dependency '${AD_NAME}' to the value '${AD_REPO}' specified to the add_dependency() call.")
+  else()
     message(FATAL_ERROR "The repository of the dependency was not specified in the add_dependency() call, nor it was found in the cached variables.")
   endif()
+  # Check the branch and commit arguments.
   if(AD_BRANCH AND AD_COMMIT)
     message(FATAL_ERROR "At most one of branch and commit must be specified when using add_dependency().")
   endif()


Remove c++ warning re: checking for "this" is null

We actually subvert the type system from time to time, and call non-static
methods with a null this.  Alas.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -1117,6 +1117,11 @@
 	endif(c_Wdeprecated_declarations)
 	endif()

+	check_c_compiler_flag(-Wnonnull-compare c_Wnonnull_compare)
+	if (c_Wnonnull_compare)
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nonnull-compare -Wno-error=nonnull-compare")
+	endif(c_Wnonnull_compare)
+
 	# gcc on our AIX machines recognizes -fstack-protector, but lacks
 	# the requisite library.
 	if (NOT AIX)


try to use system tar/unzip on unix like system(There is some problem when using cmake -E tar on macOS)

--- project/cmake/modules/FindConfigurePackage.cmake
+++ project/cmake/modules/FindConfigurePackage.cmake
@@ -75,6 +75,32 @@
 endfunction()

 function(FindConfigurePackageUnzip src work_dir)
+    if (CMAKE_HOST_UNIX)
+        find_program (FindConfigurePackage_UNZIP_BIN unzip)
+        if (FindConfigurePackage_UNZIP_BIN)
+            execute_process(COMMAND ${FindConfigurePackage_UNZIP_BIN} -uo ${src}
+                WORKING_DIRECTORY ${work_dir}
+            )
+            return()
+        endif ()
+    endif ()
+    # fallback
+    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ${src}
+        WORKING_DIRECTORY ${work_dir}
+    )
+endfunction()
+
+function(FindConfigurePackageTarXV src work_dir)
+    if (CMAKE_HOST_UNIX)
+        find_program (FindConfigurePackage_TAR_BIN tar)
+        if (FindConfigurePackage_TAR_BIN)
+            execute_process(COMMAND ${FindConfigurePackage_TAR_BIN} -xvf ${src}
+                WORKING_DIRECTORY ${work_dir}
+            )
+            return()
+        endif ()
+    endif ()
+    # fallback
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ${src}
         WORKING_DIRECTORY ${work_dir}
     )
@@ -131,9 +157,7 @@
                     FindConfigurePackageDownloadFile("${FindConfigurePackage_TAR_URL}" "${FindConfigurePackage_WORKING_DIRECTORY}/${DOWNLOAD_FILENAME}")
                 endif()

-                execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${FindConfigurePackage_WORKING_DIRECTORY}/${DOWNLOAD_FILENAME}"
-                    WORKING_DIRECTORY ${FindConfigurePackage_WORKING_DIRECTORY}
-                )
+                FindConfigurePackageTarXV("${FindConfigurePackage_WORKING_DIRECTORY}/${DOWNLOAD_FILENAME}" ${FindConfigurePackage_WORKING_DIRECTORY})

                 if (EXISTS ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR})
                     set (FindConfigurePackage_UNPACK_SOURCE YES)


Update CMake version of macOS post-install script


Revise the Urho3D version parsing logic to cater for pre-release id.

--- CMake/Modules/GetUrhoRevision.cmake
+++ CMake/Modules/GetUrhoRevision.cmake
@@ -40,14 +40,21 @@
     file (WRITE ${FILENAME} "const char* revision=\"${LIB_REVISION}\";\n")
 else ()
     # Output just major.minor.patch number to stdout
-    string (REGEX MATCH "[^.]+\\.[^-]+" VERSION ${LIB_REVISION})            # Assume release tag always has major.minor format
+    string (REGEX MATCH "[^.]+\\.[^-]+" VERSION ${LIB_REVISION})                    # Assume release tag always has major.minor format with possible pre-release identifier
     if (VERSION)
-        string (REGEX MATCH "${VERSION}-([^-]+)" PATCH ${LIB_REVISION})     # Subsequent commits count after a release tag is treated as patch number
+        string (REGEX MATCH "${VERSION}(-[A-Z]+)" PRE_ID ${LIB_REVISION})            # Workaround as CMake's regex does not support look around
+        if (PRE_ID)
+            set (PRE_ID ${CMAKE_MATCH_1})
+        endif ()
+        string (REGEX MATCH "${VERSION}${PRE_ID}-([^-]+)" PATCH ${LIB_REVISION})    # Subsequent commits count after a release tag is treated as patch number
         if (PATCH)
             set (VERSION ${VERSION}.${CMAKE_MATCH_1})
+            unset (PRE_ID)
+        else ()
+            set (VERSION ${VERSION}.0)
         endif ()
     else ()
-        set (VERSION 0.0)
+        set (VERSION 0.0.0)
     endif ()
-    execute_process (COMMAND ${CMAKE_COMMAND} -E echo ${VERSION})
+    execute_process (COMMAND ${CMAKE_COMMAND} -E echo ${VERSION}${PRE_ID})
 endif ()


Don't install sample dlls unless OGRE_INSTALL_SAMPLES is true

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -288,7 +288,9 @@
     # disable "lib" prefix on Unix
     set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
   endif (CMAKE_COMPILER_IS_GNUCXX)
-  ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
+  if (OGRE_INSTALL_SAMPLES)
+	ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
+  endif()

 endfunction(ogre_config_sample_common)


add arg for packing 64-bit build

add arg for packing 64-bit build

SVN-Revision: 1233

--- package.cmake
+++ package.cmake
@@ -37,6 +37,7 @@
 set(arg_outdir ".")    # directory in which to place deliverables
 set(arg_cacheappend "")# string to append to every build's cache
 set(arg_drmem_only OFF) # do not include Dr. Heapstat
+set(arg_x64_build OFF)  # do not include x64 build
 # also takes args parsed by runsuite_common_pre.cmake, in particular:
 set(arg_preload "")    # cmake file to include prior to each 32-bit build
 set(arg_preload64 "")  # cmake file to include prior to each 64-bit build
@@ -71,6 +72,9 @@
   if (${arg} MATCHES "^drmem_only" OR
       ${arg} MATCHES "^drmemory_only")
     set(arg_drmem_only ON)
+  endif ()
+  if (${arg} MATCHES "^x64_build")
+    set(arg_x64_build ON)
   endif ()
 endforeach (arg)

@@ -135,6 +139,16 @@
     TOOL_DR_HEAPSTAT:BOOL=ON
     CMAKE_BUILD_TYPE:STRING=Debug
     " OFF ON "")
+  if (arg_x64_build)
+    testbuild_ex("drheapstat-${name_sfx}release-64" ON "
+      TOOL_DR_HEAPSTAT:BOOL=ON
+      CMAKE_BUILD_TYPE:STRING=Release
+      " OFF ON "")
+    testbuild_ex("drheapstat-${name_sfx}debug-64" ON "
+      TOOL_DR_HEAPSTAT:BOOL=ON
+      CMAKE_BUILD_TYPE:STRING=Debug
+      " OFF ON "")
+  endif (arg_x64_build)
 endif (NOT arg_drmem_only)
 testbuild_ex("drmemory-${name_sfx}release-32" OFF "
   CMAKE_BUILD_TYPE:STRING=Release
@@ -142,6 +156,14 @@
 testbuild_ex("drmemory-${name_sfx}debug-32" OFF "
   CMAKE_BUILD_TYPE:STRING=Debug
   " OFF ON "")
+if (arg_x64_build)
+  testbuild_ex("drmemory-${name_sfx}release-64" ON "
+    CMAKE_BUILD_TYPE:STRING=Release
+    " OFF ON "")
+  testbuild_ex("drmemory-${name_sfx}debug-64" ON "
+    CMAKE_BUILD_TYPE:STRING=Debug
+    " OFF ON "")
+endif (arg_x64_build)

 if (arg_cpackappend)
   # ${last_package_build_dir} is a global var set in parent scope by


fix error of previous change

fix error of previous change

--- adm_local/cmake_files/FindPyQt4.cmake
+++ adm_local/cmake_files/FindPyQt4.cmake
@@ -56,6 +56,7 @@
 GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${PYQT_PYUIC_EXECUTABLE}" PATH)
 GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)

+
 # Typical locations of qobject.sip are:
 #   - /usr/share/sip/PyQt4/QtCore, for a system install
 #   - or <xyz>/sip/QtCore, for a custom install
@@ -69,18 +70,12 @@
 MARK_AS_ADVANCED(PYQT_SIP_MAIN_FILE)

 # Get PyQt compilation flags:
-SET(PYQT_PYTHONPATH "${_tmp_ROOT_DIR};${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
+SET(PYQT_PYTHONPATH ${_tmp_ROOT_DIR} ${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
 SET(PYQT_SIPFLAGS)

-IF(WIN32 AND NOT CYGWIN)
-  SET(_cmd set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH};%PYTHONPATH% && ${PYTHON_EXECUTABLE})
-ELSE()
-  SET(_cmd /usr/bin/env PYTHONPATH="${PYQT_PYTHONPATH}:${SIP_PYTHONPATH}:$$PYTHONPATH" ${PYTHON_EXECUTABLE})
-ENDIF()
-
-EXECUTE_PROCESS(COMMAND "${_cmd}" -c "import sys;
-sys.path[:0] = ['${PYQT_PYTHONPATH}']
-sys.path[:0] = ['${SIP_PYTHONPATH}']
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;
+sys.path[:0] = '${PYQT_PYTHONPATH}'.split(';');
+sys.path[:0] = '${SIP_PYTHONPATH}'.split(';');
 from PyQt4 import pyqtconfig;
 sys.stdout.write(pyqtconfig.Configuration().pyqt_sip_flags)"
   OUTPUT_VARIABLE PYQT_SIPFLAGS)
@@ -114,11 +109,13 @@
 #   PYQT_PYUIC_PATH - command to launch pyuic with the correct PYTHONPATH
 #   PYQT_PYRCC_PATH - command to launch pyrcc with the correct PYTHONPATH
 # TODO: should be done like Sphinx in KERNEL (i.e. generating a shell script)?
+
 IF(WIN32 AND NOT CYGWIN)
   MESSAGE(WARNING "PyQt4 command was not tested under Win32")
   SET(PYQT_PYUIC_PATH set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH};%PYTHONPATH% && ${PYQT_PYUIC_EXECUTABLE})
   SET(PYQT_PYRCC_PATH set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH};%PYTHONPATH% && ${PYQT_PYRCC_EXECUTABLE})
 ELSE()
+  STRING(REPLACE ";" ":" PYQT_PYTHONPATH "${PYQT_PYTHONPATH}")
   SET(PYQT_PYUIC_PATH /usr/bin/env PYTHONPATH="${PYQT_PYTHONPATH}:${SIP_PYTHONPATH}:$$PYTHONPATH" ${PYQT_PYUIC_EXECUTABLE})
   SET(PYQT_PYRCC_PATH /usr/bin/env PYTHONPATH="${PYQT_PYTHONPATH}:${SIP_PYTHONPATH}:$$PYTHONPATH" ${PYQT_PYRCC_EXECUTABLE})
 ENDIF()


- комменты надо писать через ';'

 - комменты надо писать через ';'

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12580 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/win32.install.iss.cmake
+++ rdo/packages/cmake/trunk/win32.install.iss.cmake
@@ -49,7 +49,7 @@
 Source: "icuuc51.dll";        DestDir: "{app}"
 Source: "icuin51.dll";        DestDir: "{app}"
 Source: "icudt51.dll";        DestDir: "{app}"
-#Source: "D3DCompiler_43.dll"; DestDir: "{app}"
+;Source: "D3DCompiler_43.dll"; DestDir: "{app}"

 Source: "msvcr100.dll"; DestDir: "{app}"
 Source: "msvcp100.dll"; DestDir: "{app}"


Bug 880: automatically preserves buildtool flags when modifying DartConfiguration.tcl file.

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -23,7 +23,12 @@
 # Recall that our unit tests are not in the "all" target, so we have to explicitely ask ctest to build our custom 'buildtests' target.
 # At this stage, we can also add custom flags to the build tool through the user defined EIGEN_TEST_BUILD_FLAGS variable.
 file(READ  "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" EIGEN_DART_CONFIG_FILE)
-string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config '' -- -i ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
+# try to grab the default flags
+string(REGEX MATCH "MakeCommand:.*-- (.*)DefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+if(NOT CMAKE_MATCH_1)
+string(REGEX MATCH "MakeCommand:.*gmake (.*)DefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+endif()
+string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config \"\${CTEST_CONFIGURATION_TYPE}\" -- ${CMAKE_MATCH_1} ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
        EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})
 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" ${EIGEN_DART_CONFIG_FILE2})


Bug 880: manually edit the DartConfiguration.tcl file to get it working with cmake 3.0.x

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -14,49 +14,18 @@
 # check whether /bin/bash exists
 find_file(EIGEN_BIN_BASH_EXISTS "/bin/bash" PATHS "/" NO_DEFAULT_PATH)

-# CMake/Ctest does not allow us to change the build command,
-# so we have to workaround by directly editing the generated DartConfiguration.tcl file
-# save CMAKE_MAKE_PROGRAM
-set(CMAKE_MAKE_PROGRAM_SAVE ${CMAKE_MAKE_PROGRAM})
-# and set a fake one
-set(CMAKE_MAKE_PROGRAM "@EIGEN_MAKECOMMAND_PLACEHOLDER@")
-
 # This call activates testing and generates the DartConfiguration.tcl
 include(CTest)

 set(EIGEN_TEST_BUILD_FLAGS "" CACHE STRING "Options passed to the build command of unit tests")

-# overwrite default DartConfiguration.tcl
-# The worarounds are different for each version of the MSVC IDE
-set(EIGEN_TEST_TARGET buildtests)
-if(MSVC_IDE)
-  if(CMAKE_MAKE_PROGRAM_SAVE MATCHES "devenv") # devenv
-    set(EIGEN_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM_SAVE} Eigen.sln /build Release /project ${EIGEN_TEST_TARGET}")
-  else() # msbuild
-    set(EIGEN_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM_SAVE} ${EIGEN_TEST_TARGET}.vcxproj /p:Configuration=\${CTEST_CONFIGURATION_TYPE}")
-  endif()
-
-  # append the build flags if provided
-  if(NOT "${EIGEN_TEST_BUILD_FLAGS}" MATCHES "^[ \t]*$")
-    set(EIGEN_BUILD_COMMAND "${EIGEN_BUILD_COMMAND} ${EIGEN_TEST_BUILD_FLAGS}")
-  endif()
-
-  # apply the dartconfig hack ...
-  set(EIGEN_MAKECOMMAND_PLACEHOLDER "${EIGEN_BUILD_COMMAND}\n#")
-else()
-  # for make and nmake
-  set(EIGEN_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM_SAVE} ${EIGEN_TEST_TARGET} ${EIGEN_TEST_BUILD_FLAGS}")
-  set(EIGEN_MAKECOMMAND_PLACEHOLDER "${EIGEN_BUILD_COMMAND}")
-endif()
-
-configure_file(${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
-
-# restore default CMAKE_MAKE_PROGRAM
-set(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM_SAVE})
-
-# un-set temporary variables so that it is like they never existed
-unset(CMAKE_MAKE_PROGRAM_SAVE)
-unset(EIGEN_MAKECOMMAND_PLACEHOLDER)
+# Overwrite default DartConfiguration.tcl such that ctest can build our unit tests.
+# Recall that our unit tests are not in the "all" target, so we have to explicitely ask ctest to build our custom 'buildtests' target.
+# At this stage, we can also add custom flags to the build tool through the user defined EIGEN_TEST_BUILD_FLAGS variable.
+file(READ  "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" EIGEN_DART_CONFIG_FILE)
+string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config '' -- -i ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
+       EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" ${EIGEN_DART_CONFIG_FILE2})

 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)


cmake: Add support for AddressSanitizer

cmake: Add support for AddressSanitizer

--- cmake/Modules/AddCMockaTest.cmake
+++ cmake/Modules/AddCMockaTest.cmake
@@ -1,7 +1,7 @@
-# - ADD_CMOCKA_TEST(test_name test_source linklib1 ... linklibN)
+# - add_cmocka_test(test_name test_source linklib1 ... linklibN)

 # Copyright (c) 2007      Daniel Gollub <dgollub@suse.de>
-# Copyright (c) 2007-2010 Andreas Schneider <asn@cynapses.org>
+# Copyright (c) 2007-2018 Andreas Schneider <asn@cryptomilk.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@@ -9,15 +9,24 @@
 enable_testing()
 include(CTest)

-if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
-    set(CMAKE_C_FLAGS_PROFILING "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wwrite-strings -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Compiler Flags")
-    set(CMAKE_SHARED_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
-    set(CMAKE_MODULE_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
-    set(CMAKE_EXEC_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
-endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
+if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang)") AND NOT MINGW)
+    # Activate with: -DCMAKE_BUILD_TYPE=Profiling
+    set(CMAKE_C_FLAGS_PROFILING "-g -O0 -fprofile-arcs -ftest-coverage")
+    set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "-fprofile-arcs -ftest-coverage")
+    set(CMAKE_MODULE_LINKER_FLAGS_PROFILING "-fprofile-arcs -ftest-coverage")
+    set(CMAKE_EXEC_LINKER_FLAGS_PROFILING "-fprofile-arcs -ftest-coverage")

-function (ADD_CMOCKA_TEST _testName _testSource)
+    # Activate with: -DCMAKE_BUILD_TYPE=AddressSanitizer
+    set(CMAKE_C_FLAGS_ADDRESSSANITIZER "-g -O1 -fsanitize=address -fno-omit-frame-pointer")
+    set(CMAKE_SHARED_LINKER_FLAGS_ADDRESSSANITIZER "-fsanitize=address")
+    set(CMAKE_MODULE_LINKER_FLAGS_ADDRESSSANITIZER "-fsanitize=address")
+    set(CMAKE_EXEC_LINKER_FLAGS_ADDRESSSANITIZER "-fsanitize=address")
+endif()
+
+function(ADD_CMOCKA_TEST _testName _testSource)
     add_executable(${_testName} ${_testSource})
+
     target_link_libraries(${_testName} ${ARGN})
+
     add_test(${_testName} ${CMAKE_CURRENT_BINARY_DIR}/${_testName})
-endfunction (ADD_CMOCKA_TEST)
+endfunction()


[cmake] try to force enable exp grid ext from dunegdtmacros

--- cmake/modules/DuneGdtMacros.cmake
+++ cmake/modules/DuneGdtMacros.cmake
@@ -7,4 +7,4 @@
 # Authors:
 #   Felix Schindler (2014, 2016 - 2017)

-message(AUTHOR_WARNING "TODO: Implement module test.")+set(DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS TRUE)


[Cmake] Look for FileCheck in well-known locations

--- cmake/modules/FindFileCheck.cmake
+++ cmake/modules/FindFileCheck.cmake
@@ -6,6 +6,7 @@

 find_program(FILECHECK_EXECUTABLE
              NAMES FileCheck
+             PATHS /usr/local/opt/llvm/bin /usr/lib/llvm-3.7/bin
              DOC "Path to 'FileCheck' executable")

 # Handle REQUIRED and QUIET arguments, this will also set FILECHECK_FOUND to true


Added a BUILD_BYPRODUCT to ImportPugiXML.cmake for compatibility with Ninja (#20)

Co-authored-by: Thomas Dresselhaus <5f50a84c1fa3bcff146405017f36aec1a10a9e38@entos.ai>

--- external/ImportPugiXML.cmake
+++ external/ImportPugiXML.cmake
@@ -17,6 +17,7 @@
     CMAKE_ARGS “-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>”
     UPDATE_COMMAND ""
     INSTALL_COMMAND ""
+    BUILD_BYPRODUCTS ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external-build/libpugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
   )

   set(PUGIXML_LIBRARY ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external-build/libpugixml${CMAKE_STATIC_LIBRARY_SUFFIX})


Remove one instance of com_common.cpp which was listed twice in the source files

--- src.cmake
+++ src.cmake
@@ -300,8 +300,6 @@
     ${ENGINE_DIR}/qcommon/surfaceflags.h
     ${ENGINE_DIR}/qcommon/translation.cpp
     ${ENGINE_DIR}/sys/con_log.cpp
-    ${ENGINE_DIR}/sys/con_common.h
-    ${ENGINE_DIR}/sys/con_common.cpp
 )

 if (USE_CURSES)


set proper dependencies for Monterverdi and force static build

--- CMake/External_Monteverdi.cmake
+++ CMake/External_Monteverdi.cmake
@@ -7,18 +7,13 @@
 set(MVD_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
 set(MVD_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)

-set(${proj}_DEPENDENCIES)# OTB)
+set(${proj}_DEPENDENCIES OTB)

 if(USE_SYSTEM_FLTK)
   message(STATUS "  Using FLTK system version")
 else()
     set(MVD_SB_FLTK_CONFIG)
     list(APPEND ${proj}_DEPENDENCIES FLTK)
-endif()
-
-set(MVD_SB_BUILD_SHARED ON)
-if(MSVC)
-  set(MVD_SB_BUILD_SHARED OFF)
 endif()

 ExternalProject_Add(${proj}
@@ -30,7 +25,8 @@
    DEPENDS ${${proj}_DEPENDENCIES}
    CMAKE_CACHE_ARGS
     -DCMAKE_BUILD_TYPE:STRING=Release
-    -DBUILD_SHARED_LIBS:BOOL=${MVD_SB_BUILD_SHARED}
+    -DBUILD_SHARED_LIBS:BOOL=${SB_BUILD_SHARED_LIBS}
+    -DBUILD_TESTING:BOOL=ON
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
     ${MVD_SB_FLTK_CONFIG}
 )


Fixed install path of dependency binaries in CMake script

--HG--
branch : v1-8

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -22,30 +22,30 @@
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)

 macro(install_debug INPUT)
-  if (EXISTS ${OGRE_DEP_DIR}/lib/debug/${INPUT})
-    if (IS_DIRECTORY ${OGRE_DEP_DIR}/lib/debug/${INPUT})
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
+  if (EXISTS ${OGRE_DEP_DIR}/bin/debug/${INPUT})
+    if (IS_DIRECTORY ${OGRE_DEP_DIR}/bin/debug/${INPUT})
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
     else ()
-      install(FILES ${OGRE_DEP_DIR}/lib/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
+      install(FILES ${OGRE_DEP_DIR}/bin/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
     endif ()
   else()
-    message(send_error "${OGRE_DEP_DIR}/lib/debug/${INPUT} did not exist, can't install!")
+    message(send_error "${OGRE_DEP_DIR}/bin/debug/${INPUT} did not exist, can't install!")
   endif ()
 endmacro()

 macro(install_release INPUT)
-  if (EXISTS ${OGRE_DEP_DIR}/lib/release/${INPUT})
-    if (IS_DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT})
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+  if (EXISTS ${OGRE_DEP_DIR}/bin/release/${INPUT})
+    if (IS_DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT})
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
     else ()
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
     endif ()
   else()
-    message(send_error "${OGRE_DEP_DIR}/lib/release/${INPUT} did not exist, can't install!")
+    message(send_error "${OGRE_DEP_DIR}/bin/release/${INPUT} did not exist, can't install!")
   endif ()
 endmacro()


fix to not always uppercase the export macro

--- CMake/vtkMakeInstantiator.cmake
+++ CMake/vtkMakeInstantiator.cmake
@@ -30,7 +30,7 @@

   # make the arguments available to the configured files
   SET (VTK_MAKE_INSTANTIATOR_CLASS_NAME ${className})
-  STRING(TOUPPER ${EXPORT_MACRO} VTK_MAKE_INSTANTIATOR_EXPORT_MACRO)
+  SET (VTK_MAKE_INSTANTIATOR_EXPORT_MACRO ${EXPORT_MACRO})

   # For each include
   FOREACH(FILE ${INCLUDES})


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -62,7 +62,7 @@
 Comment[el]=Σύστημα υποστήριξης Phonon VLC
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
-Comment[fi]=Phonon VLC-taustaohjelma
+Comment[fi]=Phonon VLC -taustaohjelma
 Comment[fr]=Module VLC de Phonon
 Comment[ga]=Inneall VLC Phonon
 Comment[gl]=Infraestrutura de VLC para Phonon


Fixed bug in GetVersion.cmake that was failing on a download (not clone) from GitHub.

--- CMake/GetVersion.cmake
+++ CMake/GetVersion.cmake
@@ -7,8 +7,9 @@
     execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --dirty RESULT_VARIABLE GIT_RES OUTPUT_VARIABLE GIT_DESCRIPTION )
     if( NOT ${GIT_RES} EQUAL 0 )
         message( WARNING "Git failed (not a repo, or no tags). Defaulting to static build number." )
-    endif()
-    string( REPLACE "\n" "" BUILD_VERSION ${GIT_DESCRIPTION} )
+    else( NOT ${GIT_RES} EQUAL 0 )
+        string( REPLACE "\n" "" BUILD_VERSION ${GIT_DESCRIPTION} )
+    endif( NOT ${GIT_RES} EQUAL 0 )
 endif( GIT_FOUND )
 message( STATUS "Version: ${BUILD_VERSION}" )


BUG: improper placement of quotes shows error in cmake3.0.0

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -33,7 +33,7 @@
     if( ${GDAL_FORMATS} MATCHES "hdf" )
        set(CHECK_GDAL_BUILT_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)
     else()
-       message(STATUS "CHECK_GDAL_BUILT_WITH_HDF test failed : GDAL is not built with hdf support. So the HDF tests will be deactivated. Formats supported by your GDAL: " [ ${GDAL_FORMATS} ] )
+       message(STATUS "CHECK_GDAL_BUILT_WITH_HDF test failed : GDAL is not built with hdf support. So the HDF tests will be deactivated. Formats supported by your GDAL: [ " ${GDAL_FORMATS} " ]")
        set(CHECK_GDAL_BUILT_WITH_HDF 0 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)
     endif()


Fix for ROOT-6751 (etcdir not set)

Fix for ROOT-6751 (etcdir not set)

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -26,41 +26,92 @@

 if(gnuinstall)
   set(prefix ${CMAKE_INSTALL_PREFIX})
-  set(etcdir ${CMAKE_INSTALL_FULL_SYSCONFDIR})
-  set(bindir ${CMAKE_INSTALL_FULL_BINDIR})
-  set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
-  set(incdir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
-  set(mandir ${CMAKE_INSTALL_FULL_MANDIR})
-  set(plugindir ${CMAKE_INSTALL_FULL_SYSCONFDIR}/plugins)
-  set(datadir ${CMAKE_INSTALL_FULL_DATADIR})
-  set(elispdir ${CMAKE_INSTALL_FULL_ELISPDIR})
-  set(ttffontdir ${CMAKE_INSTALL_FULL_FONTDIR})
-  set(macrodir ${CMAKE_INSTALL_FULL_MACRODIR})
-  set(srcdir ${CMAKE_INSTALL_FULL_SRCDIR})
-  set(iconpath ${CMAKE_INSTALL_FULL_ICONDIR})
-  set(cintincdir ${CMAKE_INSTALL_FULL_CINTINCDIR})
-  set(docdir ${CMAKE_INSTALL_FULL_DOCDIR})
-  set(testdir ${CMAKE_INSTALL_FULL_TESTDIR})
-  set(tutdir ${CMAKE_INSTALL_FULL_TUTDIR})
-  set(aclocaldir ${CMAKE_INSTALL_FULL_ACLOCALDIR})
 else()
   set(prefix $(ROOTSYS))
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_SYSCONFDIR})
+  set(etcdir ${CMAKE_INSTALL_SYSCONFDIR})
+else()
   set(etcdir ${prefix}/${CMAKE_INSTALL_SYSCONFDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_BINDIR})
+  set(bindir ${CMAKE_INSTALL_BINDIR})
+else()
   set(bindir ${prefix}/${CMAKE_INSTALL_BINDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
+  set(libdir ${CMAKE_INSTALL_LIBDIR})
+else()
   set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR})
+  set(incdir ${CMAKE_INSTALL_INCLUDEDIR})
+else()
   set(incdir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_MANDIR})
+  set(mandir ${CMAKE_INSTALL_MANDIR})
+else()
   set(mandir ${prefix}/${CMAKE_INSTALL_MANDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_SYSCONFDIR})
+  set(plugindir ${CMAKE_INSTALL_SYSCONFDIR}/plugins)
+else()
   set(plugindir ${prefix}/${CMAKE_INSTALL_SYSCONFDIR}/plugins)
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_DATADIR})
+  set(datadir ${CMAKE_INSTALL_DATADIR})
+else()
   set(datadir ${prefix}/${CMAKE_INSTALL_DATADIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_ELISPDIR})
+  set(elispdir ${CMAKE_INSTALL_ELISPDIR})
+else()
   set(elispdir ${prefix}/${CMAKE_INSTALL_ELISPDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_FONTDIR})
+  set(ttffontdir ${CMAKE_INSTALL_FONTDIR})
+else()
   set(ttffontdir ${prefix}/${CMAKE_INSTALL_FONTDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_MACRODIR})
+  set(macrodir ${CMAKE_INSTALL_MACRODIR})
+else()
   set(macrodir ${prefix}/${CMAKE_INSTALL_MACRODIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_SRCDIR})
+  set(srcdir ${CMAKE_INSTALL_SRCDIR})
+else()
   set(srcdir ${prefix}/${CMAKE_INSTALL_SRCDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_ICONDIR})
+  set(iconpath ${CMAKE_INSTALL_ICONDIR})
+else()
   set(iconpath ${prefix}/${CMAKE_INSTALL_ICONDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_CINTINCDIR})
+  set(cintincdir ${CMAKE_INSTALL_CINTINCDIR})
+else()
   set(cintincdir ${prefix}/${CMAKE_INSTALL_CINTINCDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_DOCDIR})
+  set(docdir ${CMAKE_INSTALL_DOCDIR})
+else()
   set(docdir ${prefix}/${CMAKE_INSTALL_DOCDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_TESTDIR})
+  set(testdir ${CMAKE_INSTALL_TESTDIR})
+else()
   set(testdir ${prefix}/${CMAKE_INSTALL_TESTDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_TUTDIR})
+  set(tutdir ${CMAKE_INSTALL_TUTDIR})
+else()
   set(tutdir ${prefix}/${CMAKE_INSTALL_TUTDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_ACLOCALDIR})
+  set(aclocaldir ${CMAKE_INSTALL_ACLOCALDIR})
+else()
   set(aclocaldir ${prefix}/${CMAKE_INSTALL_ACLOCALDIR})
 endif()

@@ -481,12 +532,9 @@

 #---Especial definitions for root-config et al.--------------------------------------------------------------
 if(prefix STREQUAL "$(ROOTSYS)")
-  set(prefix $ROOTSYS)
-  set(bindir $ROOTSYS/bin)
-  set(libdir $ROOTSYS/lib)
-  set(incdir $ROOTSYS/include)
-  set(etcdir $ROOTSYS/etc)
-  set(mandir $ROOTSYS/man/man1)
+  foreach(d prefix bindir libdir incdir etcdir mandir)
+    string(REPLACE "$(ROOTSYS)" "$ROOTSYS"  ${d} ${${d}})
+  endforeach()
 endif()


Upgraded OpenIGTLink version tag to

Upgraded OpenIGTLink version tag to

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8363 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 68b46acdf6)
+    SET(revision_tag 5eb292af9a)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Fix Open file dialog by enabling "Open" accept push button

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
     BINARY_DIR ${${proj}_DIR}
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Slicer.git"
-    GIT_TAG "91d4d64c4001921255d82206edc32c860f0c60d9"
+    GIT_TAG "989075360f1337764f1f52bc482e86f2e02d4a9c"
     ${bender_external_update}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


Added pthread package search

Added pthread package search

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -124,6 +124,15 @@

 endforeach()

+set(CMAKE_THREAD_LIBS_INIT)
+if( DCMTK_oflog_LIBRARY_RELEASE OR DCMTK_oflog_LIBRARY_DEBUG )
+  # Hack - Not having a DCMTKConfig.cmake file to read the settings from, we will attempt to
+  # find the library in all cases.
+  # Ideally, pthread library should be discovered only if DCMTK_WITH_THREADS is enabled.
+  set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+  find_package(Threads)
+endif()
+
 set(DCMTK_config_TEST_HEADER osconfig.h)
 set(DCMTK_dcmdata_TEST_HEADER dctypes.h)
 set(DCMTK_dcmimage_TEST_HEADER dicoimg.h)


ENH: No install step for QWT which is now compiled statically

--- FiberViewerLight.cmake
+++ FiberViewerLight.cmake
@@ -127,8 +127,6 @@
 ENDIF(BUILD_TESTING)

 if( EXTENSION_SUPERBUILD_BINARY_DIR )
-  get_filename_component( QWT_LIB_PATH ${QWT_LIBRARIES} PATH )
-  install(DIRECTORY ${QWT_LIB_PATH}/ DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_LIBRARY_DESTINATION} )
   install(PROGRAMS ${SlicerExecutionModel_DEFAULT_CLI_RUNTIME_OUTPUT_DIRECTORY}/FiberViewerLight DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION})
   install(PROGRAMS ${FiberViewerLight_SOURCE_DIR}/FiberLengthCleaning.py DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION})
   set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")


fixed lua linking

fixed lua linking

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -375,7 +375,7 @@
 		SET(LIBS ${LIBS} zip)
 	ENDIF (NOT LIBZIP_BUILTIN)
 	IF (NOT LIBLUA_BUILTIN)
-		EXEC_PROGRAM(pkg-config ARGS lua5.1 --libs OUTPUT_VARIABLE LIBLUA_NAME)
+		EXEC_PROGRAM(pkg-config ARGS lua --libs OUTPUT_VARIABLE LIBLUA_NAME)
 		IF(NOT LIBLUA_NAME)
 			SET(LIBLUA_NAME lua)
 		ENDIF(NOT LIBLUA_NAME)


package.json.cmake: Proper version requires for nodejs

Signed-off-by: Helio Chissini de Castro <92fa1fc5974653ef9307573a3d37f25bae9636e9@kde.org>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- src/javascript/package.json.cmake
+++ src/javascript/package.json.cmake
@@ -5,7 +5,7 @@
   "homepage": "http://github.com/intel-iot-devkit/mraa",
   "main" : "./mraa.node",
   "engines": {
-    "node": ">= 1.0.x"
+    "node": ">= 0.10.x"
   },
   "bugs": {
     "url" : "http://github.com/intel-iot-devkit/mraa/issues"


cmake: Only check for -Wno-gnu-zero-variadic-macro-arguments with clang

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- CompilerChecks.cmake
+++ CompilerChecks.cmake
@@ -51,7 +51,10 @@
     add_c_compiler_flag("-Werror=format-security" SUPPORTED_COMPILER_FLAGS)

     # Allow zero for a variadic macro argument
-    add_c_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" SUPPORTED_COMPILER_FLAGS)
+    string(TOLOWER "${CMAKE_C_COMPILER_ID}" _C_COMPILER_ID)
+    if ("${_C_COMPILER_ID}" STREQUAL "clang")
+        add_c_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" SUPPORTED_COMPILER_FLAGS)
+    endif()

     add_c_compiler_flag("-fno-common" SUPPORTED_COMPILER_FLAGS)


Fix FindHoudiniEngine to find the installed bin directory

--- cmake/Modules/FindHoudiniEngine.cmake
+++ cmake/Modules/FindHoudiniEngine.cmake
@@ -58,6 +58,7 @@
     if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
         list( APPEND _houdiniengine_include_search_dirs "${_houdiniengine_root}/toolkit/include/HAPI" )
         list( APPEND _houdiniengine_library_search_dirs "${_houdiniengine_root}/dsolib" )
+        list( APPEND _houdiniengine_binary_search_dirs "${_houdiniengine_root}/bin" )
     elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
         list( APPEND _houdiniengine_include_search_dirs "${_houdiniengine_root}/toolkit/include/HAPI" )
         list( APPEND _houdiniengine_library_search_dirs "${_houdiniengine_root}/custom/houdini/dsolib" )
@@ -65,6 +66,7 @@
     elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
         list( APPEND _houdiniengine_include_search_dirs "${_houdiniengine_root}/toolkit/include/HAPI" )
         list( APPEND _houdiniengine_library_search_dirs "${_houdiniengine_root}/../Libraries" )
+        list( APPEND _houdiniengine_binary_search_dirs "${_houdiniengine_root}/bin" )
     endif ()
 endif ()


fix: add support for building in non-git source dir

The git_version cmake macro uses git tags to determine the library
version number. However, if the source directory does not have a .git
repo, the cmake configuration step fails.

The git_versino macro will now look for a file named version.txt in the
root directory if the source dir is not a git repository. If the file
exists, its contents are used for the version number instead of git
describe.

Now we can have the tag-release.sh script update version.txt when
tagging new releases.

--- cmake/Modules/macro-git_version.cmake
+++ cmake/Modules/macro-git_version.cmake
@@ -18,8 +18,11 @@
                    RESULT_VARIABLE IsGitRepo
                    OUTPUT_VARIABLE OutputTrash
                    ERROR_VARIABLE ErrorTrash)
+else()
+  message( FATAL_ERROR "Could not find git command" )
+endif()

-  if( ${IsGitRepo} EQUAL 0 )
+if( ${IsGitRepo} EQUAL 0 )
     if( "${GIT_COMMIT_ID}" STREQUAL "" )
       execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --sq HEAD
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -50,11 +53,27 @@
                        OUTPUT_VARIABLE GIT_COMMIT_DESC
                        ERROR_VARIABLE Trash)
     endif()
+else()
+  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/version.txt")
+    message( WARNING "Source directory is not a git repo, but 'version.txt' was found. Using version number there." )
+    if( "${GIT_COMMIT_ID}" STREQUAL "" )
+      set( GIT_COMMIT_ID "UNKNOWN" )
+    endif()
+    if( "${GIT_COMMIT_AUTHOR}" STREQUAL "" )
+      set( GIT_COMMIT_AUTHOR "UNKNOWN" )
+    endif()
+    if( "${GIT_COMMIT_DATE}" STREQUAL "" )
+      set( GIT_COMMIT_DATE "UNKNOWN" )
+    endif()
+    if( "${GIT_COMMIT_BRANCH}" STREQUAL "" )
+      set( GIT_COMMIT_BRANCH "UNKNOWN" )
+    endif()
+    if( "${GIT_COMMIT_DESC}" STREQUAL "" )
+      file( READ "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" GIT_COMMIT_DESC )
+    endif()
   else()
     message( FATAL_ERROR "Source directory is not a git repo." )
-  endif()
-else()
-  message( FATAL_ERROR "Could not find git command" )
+endif()
 endif()

 # set defaults for any items that were not found


Revert "Turn on LLVM_ENABLE_PLUGINS by default on Windows"

This reverts r260262, it broke some LLVM tests (bugpoint).

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -671,7 +671,7 @@

 # Plugin support
 # FIXME: Make this configurable.
-if(CYGWIN)
+if(WIN32 OR CYGWIN)
   if(BUILD_SHARED_LIBS)
     set(LLVM_ENABLE_PLUGINS ON)
   else()


Android: fixed cmake try_compile() for case of STL features detection

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -169,8 +169,7 @@
 cmake_minimum_required( VERSION 2.6.3 )

 if( PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" )
- # all needed flags and variables are already inherited from the parent project
- return()
+ include( "${CMAKE_CURRENT_SOURCE_DIR}/../android.toolchain.config.cmake" OPTIONAL )
 endif()

 # this one is important
@@ -942,6 +941,20 @@
 endmacro()

+# export toolchain settings for the try_compile() command
+if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" )
+ set( __toolchain_config "")
+ foreach( __var ANDROID_ABI ANDROID_FORCE_ARM_BUILD ANDROID_NATIVE_API_LEVEL ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_SET_OBSOLETE_VARIABLES LIBRARY_OUTPUT_PATH_ROOT ANDROID_USE_STLPORT ANDROID_FORBID_SYGWIN ANDROID_NDK ANDROID_STANDALONE_TOOLCHAIN )
+  if( DEFINED ${__var} )
+   set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" )\n" )
+  endif()
+ endforeach()
+ file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/android.toolchain.config.cmake" "${__toolchain_config}" )
+ unset( __toolchain_config )
+endif()
+
+
+# set some obsolete variables for backward compatibility
 set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" )
 mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES )
 if( ANDROID_SET_OBSOLETE_VARIABLES )


cmake: Enable usage for ${package}_ROOT

cmake: Enable usage for ${package}_ROOT

--- src/CMakeLists.template.cmake
+++ src/CMakeLists.template.cmake
@@ -6,6 +6,10 @@
 if(POLICY CMP0065)
   cmake_policy(SET CMP0065 NEW)
 endif(POLICY CMP0065)
+if(POLICY CMP0074)
+  # Use package_ROOT environment variables
+  cmake_policy(SET CMP0074 NEW)
+endif(POLICY CMP0074)

 project(TPL_MODELNAME)


COMP: Fix installation of python packages on windows

This commit fixes the following error:

   Performing install step for 'python-ShapeVariationAnalyzer-requirements'
    CMake Error at D:/D/P/S-0-E-b/ShapeVariationAnalyzer-build/python-ShapeVariationAnalyzer-requirements-prefix/src/pyth
    on-ShapeVariationAnalyzer-requirements-stamp/python-ShapeVariationAnalyzer-requirements-install-Release.cmake:4 (set)
    :
      Syntax error in cmake code at

        D:/D/P/S-0-E-b/ShapeVariationAnalyzer-build/python-ShapeVariationAnalyzer-requirements-prefix/src/python-ShapeVar
    iationAnalyzer-requirements-stamp/python-ShapeVariationAnalyzer-requirements-install-Release.cmake:4

      when parsing string

        D:/D/P/Slicer-0-build/python-install/bin/PythonSlicer.exe;-m;pip;install;--require-hashes;-r;D:/D/P/S-0-E-b/Shape
    VariationAnalyzer-build/python-ShapeVariationAnalyzer-requirements-requirements.txt;--prefix;D:\D\P\S-0-E-b\ShapeVari
    ationAnalyzer-build\python-packages-install

      Invalid character escape '\D'.

--- SuperBuild/External_python-ShapeVariationAnalyzer-requirements.cmake
+++ SuperBuild/External_python-ShapeVariationAnalyzer-requirements.cmake
@@ -58,7 +58,12 @@
   if(NOT Slicer_SOURCE_DIR)
     # Alternative python prefix for installing extension python packages
     set(python_packages_DIR "${CMAKE_BINARY_DIR}/python-packages-install")
+
+    # Convert to native path to satisfy pip install command
     file(TO_NATIVE_PATH ${python_packages_DIR} python_packages_DIR_NATIVE_DIR)
+
+    # Escape command argument for pip install command
+    string(REGEX REPLACE "\\\\" "\\\\\\\\" python_packages_DIR_NATIVE_DIR "${python_packages_DIR_NATIVE_DIR}")

     list(APPEND pip_install_args
       --prefix ${python_packages_DIR_NATIVE_DIR}


update the vtx=edge>elm ctest call

update the vtx=edge>elm ctest call

--- test/testing.cmake
+++ test/testing.cmake
@@ -154,7 +154,9 @@
   ./vtxEdgeElmBalance
   "${MDIR}/afosr.dmg"
   "${MDIR}/4imb/"
-  "afosrBal4p/")
+  "afosrBal4p/"
+  "2"
+  "1.10")
 add_test(vtxElmBalance
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
   ./vtxElmBalance


More kokkos tests

More kokkos tests

--- test/testing.cmake
+++ test/testing.cmake
@@ -77,6 +77,17 @@
 endif()

 if (ENABLE_KOKKOS)
+  mpi_test(kokkosHelloWorld 1
+    ./kokkosHelloWorld)
+
+  mpi_test(kokkosForRing 1
+    ./kokkosFor
+    "${GRAPHS}/ring.ebin")
+
+  mpi_test(kokkosForTree 1
+    ./kokkosFor
+    "${GRAPHS}/tree.ebin")
+
   mpi_test(bfsSearchRing 1
     ./bfsSearch
     "${GRAPHS}/ring.ebin")


Bumpy pybind11's python version for apple

--- projects/tomviz.cmake
+++ projects/tomviz.cmake
@@ -12,6 +12,10 @@
   list(APPEND tomviz_extra_cmake_args
     -DQT_XMLPATTERNS_EXECUTABLE:FILEPATH=${QT_XMLPATTERNS_EXECUTABLE})
 endif()
+if (APPLE)
+  list(APPEND tomviz_extra_cmake_args
+    -DPYBIND11_PYTHON_VERSION:STRING=3.6)
+endif()

 add_external_project(tomviz
   DEPENDS paraview qt


ctkMacroCompilePythonScript - Message associated with copy command fixed

Since the "py" extension is added when needed,
it doesn't need anymore to be appended in the displayed message.

--- CMake/ctkMacroCompilePythonScript.cmake
+++ CMake/ctkMacroCompilePythonScript.cmake
@@ -49,7 +49,7 @@
     ADD_CUSTOM_COMMAND(DEPENDS ${src}
                         COMMAND ${CMAKE_COMMAND} -E copy ${src} ${tgt}
                         OUTPUT ${tgt}
-                        COMMENT "Copying python script: ${file}.py")
+                        COMMENT "Copying python script: ${file}")
   ENDFOREACH()

   IF(DEFINED MY_RESOURCES)


local merge

local merge

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -85,9 +85,15 @@
 #        "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
 #            sets VFPV3 as floating-point unit (has 32 registers instead of 16).
 #        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
+#        "arm64-v8a" - matches to the NDK ABI with the same name.
+#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #        "x86" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#        "x86_64" - matches to the NDK ABI with the same name.
+#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #        "mips" - matches to the NDK ABI with the same name.
+#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#        "mips64" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #
 #    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
@@ -181,13 +187,13 @@
 #    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
 #    variables to make necessary Android-specific configuration changes.
 #
-#    Also ARMEABI or ARMEABI_V7A or X86 or MIPS will be set true, mutually
+#    Also ARMEABI or ARMEABI_V7A or ARM64_V8A or X86 or X86_64 or MIPS or MIPS64 will be set true, mutually
 #    exclusive. NEON option will be set true if VFP is set to NEON.
 #
 #    LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android
 #    libraries will be installed.
 #    Default is ${CMAKE_SOURCE_DIR}, and the android libs will always be
-#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}
+#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_OUTPUT_ABI_NAME}
 #    (depending on the target ABI). This is convenient for Android packaging.
 #
 #  Change Log:
@@ -303,6 +309,9 @@
 #     [~] fix copying of shared STL
 #   - April 2014
 #     [+] updated for NDK r9d
+#   - July 2014
+#     [+] updated for NDK r10c
+#     [+] arm64_v8a, x86_64, mips64 toolchain support (experimental)
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -329,7 +338,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10c -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -344,13 +353,18 @@
 endif()

 set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
+set( ANDROID_SUPPORTED_ABIS_arm64 "arm64-v8a" )
 set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
+set( ANDROID_SUPPORTED_ABIS_x86_64 "x86_64" )
 set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )
+set( ANDROID_SUPPORTED_ABIS_mips64el "mips64" )

 set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )
-
+set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 "L" )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 "L" )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_mips64 "L" )

 macro( __LIST_FILTER listvar regex )
  if( ${listvar} )
@@ -653,10 +667,16 @@
    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
    if( __machine MATCHES i686 )
     set( __arch "x86" )
+   elseif( __machine MATCHES x86_64 )
+    set( __arch "x86_64" )
    elseif( __machine MATCHES arm )
     set( __arch "arm" )
+   elseif( __machine MATCHES aarch64 )
+    set( __arch "arm64" )
    elseif( __machine MATCHES mipsel )
     set( __arch "mipsel" )
+   elseif( __machine MATCHES mips64el )
+    set( __arch "mips64el" )
    endif()
    list( APPEND __availableToolchainMachines "${__machine}" )
    list( APPEND __availableToolchainArchs "${__arch}" )
@@ -740,6 +760,13 @@
  set( ANDROID_ARCH_FULLNAME "x86" )
  set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "i686" )
+elseif( ANDROID_ABI STREQUAL "x86_64" )
+ set( X86_64 true )
+ set( ANDROID_NDK_ABI_NAME "x86_64" )
+ set( ANDROID_ARCH_NAME "x86_64" )
+ set( ANDROID_ARCH_FULLNAME "x86_64" )
+ set( ANDROID_LLVM_TRIPLE "x86_64-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "x86_64" )
 elseif( ANDROID_ABI STREQUAL "mips" )
  set( MIPS true )
  set( ANDROID_NDK_ABI_NAME "mips" )
@@ -747,6 +774,13 @@
  set( ANDROID_ARCH_FULLNAME "mipsel" )
  set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "mips" )
+elseif( ANDROID_ABI STREQUAL "mips64" )
+ set( MIPS64 true )
+ set( ANDROID_NDK_ABI_NAME "mips64" )
+ set( ANDROID_ARCH_NAME "mips64" )
+ set( ANDROID_ARCH_FULLNAME "mips64el" )
+ set( ANDROID_LLVM_TRIPLE "mips64el-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "mips64" )
 elseif( ANDROID_ABI STREQUAL "armeabi" )
  set( ARMEABI true )
  set( ANDROID_NDK_ABI_NAME "armeabi" )
@@ -787,8 +821,23 @@
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
  set( VFPV3 true )
  set( NEON true )
+elseif( ANDROID_ABI STREQUAL "arm64-v8a" )
+ set( ARM64_V8A true )
+ set( ANDROID_NDK_ABI_NAME "arm64-v8a" )
+ set( ANDROID_ARCH_NAME "arm64" )
+ set( ANDROID_ARCH_FULLNAME "arm64" )
+ set( ANDROID_LLVM_TRIPLE "armv8-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "aarch64" )
+ set( VFPV3 true )
+ set( NEON true )
 else()
  message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." )
+endif()
+
+if( X86_64 )
+ set( ANDROID_NDK_OUTPUT_ABI_NAME "x86-64" )
+else()
+ set( ANDROID_NDK_OUTPUT_ABI_NAME ${ANDROID_NDK_ABI_NAME} )
 endif()

 if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" )
@@ -854,40 +903,40 @@
 unset( __availableToolchainArchs )
 unset( __availableToolchainCompilerVersions )

-# choose native API level
-__INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL )
-string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
-# adjust API level
-set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
-foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+if( NOT ANDROID_NATIVE_API_LEVEL STREQUAL "L" )
+ string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
+ # adjust API level
+ set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
+ foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
  if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level )
-  set( __real_api_level ${__level} )
- endif()
-endforeach()
-if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
+ set( __real_api_level ${__level} )
+ endif()
+ endforeach()
+ if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
  message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'")
  set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} )
-endif()
-unset(__real_api_level)
-# validate
-list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
-if( __levelIdx EQUAL -1 )
+ endif()
+ unset(__real_api_level)
+ # validate
+ list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
+ if( __levelIdx EQUAL -1 )
  message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
-else()
+ else()
  if( BUILD_WITH_ANDROID_NDK )
-  __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
-  if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL )
-   message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
-  endif()
-  unset( __realApiLevel )
+ __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
+ if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL )
+ message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
+ endif()
+ unset( __realApiLevel )
  endif()
  set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
  if( CMAKE_VERSION VERSION_GREATER "2.8" )
-  list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
-  set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- endif()
-endif()
+ list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
+ set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+ endif()
+  endif()
 unset( __levelIdx )
+endif()

 # remember target ABI
@@ -1208,7 +1257,13 @@
  set( CMAKE_C_COMPILER_ID Clang)
 endif()
 set( CMAKE_C_PLATFORM_ID Linux )
-set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+
+if( ARM64_V8A OR X86_64 OR MIPS64 )
+ set( CMAKE_C_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+endif()
+
 set( CMAKE_C_HAS_ISYSROOT 1 )
 set( CMAKE_C_COMPILER_ABI ELF )
 CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
@@ -1216,7 +1271,13 @@
  set( CMAKE_CXX_COMPILER_ID Clang)
 endif()
 set( CMAKE_CXX_PLATFORM_ID Linux )
-set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
+
+if( ARM64_V8A OR X86_64 OR MIPS64 )
+ set( CMAKE_C_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+endif()
+
 set( CMAKE_CXX_HAS_ISYSROOT 1 )
 set( CMAKE_CXX_COMPILER_ABI ELF )
 set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C )
@@ -1273,7 +1334,7 @@
    set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
   endif()
  endif()
-elseif( X86 )
+elseif( X86 OR X86_64 )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
  if( NOT ANDROID_COMPILER_IS_CLANG )
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
@@ -1282,7 +1343,7 @@
  endif()
  set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
  set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer -fno-strict-aliasing" )
-elseif( MIPS )
+elseif( MIPS OR MIPS64)
  set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" )
  set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" )
  set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer" )
@@ -1319,6 +1380,8 @@
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2
 elseif( ARMEABI )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" )
+elseif( ARM64_V8A )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv8-a" )
 endif()

 if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") )
@@ -1552,11 +1615,11 @@

 if(NOT _CMAKE_IN_TRY_COMPILE)
  if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
-  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
+   set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_OUTPUT_ABI_NAME}" CACHE PATH "Output directory for applications" )
  else()
   set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
  endif()
- set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
+  set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_OUTPUT_ABI_NAME}" CACHE PATH "path for android libs" )
 endif()

 # copy shaed stl library to build directory
@@ -1633,10 +1696,16 @@
   set( ${VAR} "armeabi" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" )
   set( ${VAR} "armeabi-v7a" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARM64_V8A" )
+  set( ${VAR} "arm64-v8a" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" )
   set( ${VAR} "x86" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86_64" )
+  set( ${VAR} "x86_64" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS" )
   set( ${VAR} "mips" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS64" )
+  set( ${VAR} "mips64" )
  else()
   set( ${VAR} "unknown" )
  endif()
@@ -1703,7 +1772,7 @@

 # Variables controlling behavior or set by cmake toolchain:
-#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
+#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "arm64-v8a", "x86", "x86_64", "mips", "mips64"
 #   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version)
 #   ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
 #   ANDROID_FORBID_SYGWIN : ON/OFF
@@ -1737,16 +1806,19 @@
 #   ARMEABI : TRUE for arm v6 and older devices
 #   ARMEABI_V6 : TRUE for arm v6
 #   ARMEABI_V7A : TRUE for arm v7a
+#   ARM64_V8A : TRUE for arm64 v8a
 #   NEON : TRUE if NEON unit is enabled
 #   VFPV3 : TRUE if VFP version 3 is enabled
 #   X86 : TRUE if configured for x86
+#   X86_64 : TRUE if configured for x86_64
+#   MIPS64 : TRUE if configured for mips64
 #   MIPS : TRUE if configured for mips
 #   BUILD_ANDROID : always TRUE
 #   BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d, r10d; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


CMake: missing endif()

CMake: missing endif()

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -155,4 +155,5 @@
       DEPENDEES patch update
       DEPENDERS configure
       )
+  endif()
 endmacro(SUPERBUILD_PATCH_SOURCE)


plugins/browser: cmake improvements for mac build

git-svn-id: af919ac7fdf0be26aaa017563ec94cac29b44150@2558 0d7e1ef0-d974-fc83-f0b3-ccc071561e0e

--- Mac/projectDef.cmake
+++ Mac/projectDef.cmake
@@ -10,6 +10,8 @@
 file (GLOB PLATFORM RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     Mac/*.cpp
     Mac/*.h
+    Mac/*.m
+    Mac/*.mm
     Mac/*.cmake
     )


fix warning by not using dot in target name

--- cmake/macros/macro_deal_ii_add_library.cmake
+++ cmake/macros/macro_deal_ii_add_library.cmake
@@ -52,7 +52,7 @@
     # Cuda specific target setup:
     #
     IF(DEAL_II_WITH_CUDA)
-      CUDA_WRAP_SRCS(${_library}.${_build_lowercase}
+      CUDA_WRAP_SRCS(${_library}_${_build_lowercase}
         OBJ _generated_cuda_files ${ARGN} SHARED
         )


[OpenMP][libomptarget] Suppress C++ 11 related warnings when building libomptarget-nvptx bitcode library, by Doru Bercea.

Summary: Pass -std=c++11 flag to compiler to suppress C++ 11 related warnings when building NVPTX bitcode library.

Reviewers: ABataev, caomhin, Hahnfeld

Reviewed By: ABataev, Hahnfeld

Subscribers: jdoerfert, Hahnfeld, jholewinski, mgorny, guansong, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D55772

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@366438 91177308-0d34-0410-b5e6-96231b3b80d8

--- libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
+++ libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
@@ -78,7 +78,7 @@

 # These flags are required to emit LLVM Bitcode. We check them together because
 # if any of them are not supported, there is no point in finding out which are.
-set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CUDA_TOOLKIT_ROOT_DIR})
+set(compiler_flags_required -emit-llvm -O1 --cuda-device-only -std=c++11 --cuda-path=${CUDA_TOOLKIT_ROOT_DIR})
 set(compiler_flags_required_src "extern \"C\" __device__ int thread() { return threadIdx.x; }")
 check_bitcode_compilation(LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED "${compiler_flags_required_src}" ${compiler_flags_required})