fix cmake files

fix cmake files

--- test/files.cmake
+++ test/files.cmake
@@ -13,6 +13,7 @@
               ./allocator/allocator_test.cpp
               ./allocator/allocator_traits_test.cpp
               ./any/any_test.cpp
+              ./container/container_traits/container_traits_test.cpp
               ./container/function/at_test.cpp
               ./container/function/back_test.cpp
               ./container/function/clear_test.cpp


[CMake] Update Platform Specific Linux script.

--- EMULATOR/PLATFORM/Linux.cmake
+++ EMULATOR/PLATFORM/Linux.cmake
@@ -0,0 +1,24 @@
+if(LINUX)
+
+Message("Compiling for Linux!")
+
+#Find libs
+find_package(SDL2 REQUIRED)
+find_package(OpenGL REQUIRED)
+find_package(GLEW REQUIRED)
+
+#We want to link GLEW statically
+set(GLEW_USE_STATIC_LIBS ON)
+
+#Setup project include directories
+include_directories(${GLEW_INCLUDE_DIR})
+include_directories(${SDL2_INCLUDE_DIR})
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-narrowing -std=c++11")
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-narrowing -std=c++11")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wno-narrowing -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing -std=c++11")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-narrowing -std=c++11")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wno-narrowing -std=c++11")
+
+endif()


fix HDF5_MD5 for HDF5 1.8.12

fix HDF5_MD5 for HDF5 1.8.12

--- version_config.cmake
+++ version_config.cmake
@@ -87,7 +87,7 @@
 endif()

 if (${HDF5_DOWNLOAD_VERSION} STREQUAL 1.8.12)
-  set(HDF5_MD5 4711e0d6b87d442f194c5d29ba7fbe62 )
+  set(HDF5_MD5 d804802feb99b87fc668a90e6fa34411 )
 elseif (${HDF5_DOWNLOAD_VERSION} STREQUAL 1.10.1)
   set(HDF5_MD5 43a2f9466702fb1db31df98ae6677f15 )
 else()


build: silence `-Wassign-enum`

build: silence `-Wassign-enum`

Silence the enum assignment warning from clang.  It is triggered by use
of constants in macros that are not part of an enumeration when the
parameter is of an enumerated type.  This shows up when building for
Windows.  Rather than clutter the codebase with compiler specific macros
to silence the warning, disable it.

--- cmake/modules/DispatchCompilerWarnings.cmake
+++ cmake/modules/DispatchCompilerWarnings.cmake
@@ -74,5 +74,6 @@
       add_compile_options(-Wno-int-conversion)
       add_compile_options(-Wno-shorten-64-to-32)
     endif()
+    add_compile_options(-Wno-error=assign-enum)
   endmacro()
 endif()


build: drop default enabled options

build: drop default enabled options

Signed-off-by: Daniel A. Steffen <bc823475b60dbcbd7be1bbdfe095b5f1939d5bd2@apple.com>

--- cmake/modules/DispatchCompilerWarnings.cmake
+++ cmake/modules/DispatchCompilerWarnings.cmake
@@ -13,14 +13,9 @@
     add_compile_options(-Wunreachable-code)
     add_compile_options(-Wshadow)
     add_compile_options(-Wconversion)
-    add_compile_options(-Wconstant-conversion)
-    add_compile_options(-Wint-conversion)
-    add_compile_options(-Wbool-conversion)
-    add_compile_options(-Wenum-conversion)
     add_compile_options(-Wassign-enum)
     add_compile_options(-Wshorten-64-to-32)
     add_compile_options(-Wnewline-eof)
-    add_compile_options(-Wdeprecated-declarations)
     add_compile_options(-Wsign-conversion)
     add_compile_options(-Winfinite-recursion)
     add_compile_options(-Warray-bounds-pointer-arithmetic)


Disable pin feasiblity filter to restore packing efficiency.

Appears to work around https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/553

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -23,6 +23,7 @@
       --place_algorithm bounding_box
       --enable_timing_computations off
       --allow_unrelated_clustering on
+      --clustering_pin_feasibility_filter off
     RR_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_routing_import.py
     RR_PATCH_CMD "${CMAKE_COMMAND} -E env \


PERF: Prevent HeaderTest re-building with CMake configuration.

Previously, the header tests were always rebuilt with every CMake configuration
in case the headers moved to different modules.  However, the modularization
effort has stabilized, and this as great of a concern.

Change-Id: I8347f90a9f413e1606026938a927d19922120977

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -40,13 +40,6 @@
         ${${_name}_BINARY_DIR}/test/${_name}HeaderTest${_test_num}.cxx )
     endwhile()

-    # Delete the outputs.  These should be regenerated when the header files
-    # move around, but adding the header files to the add_custom_command DEPENDS
-    # does not solve the problem.  So, they get nuked at CMake configuration
-    # time for robustness.  Eventually it should show be considered if this
-    # should be removed once the the toolkit stabilizes following the 4.0 release.
-    file( REMOVE ${_outputs} )
-
     add_custom_target( ${_name}HeaderTestClean
       ${CMAKE_COMMAND} -E remove ${_outputs} )
     add_dependencies( ITKHeaderTests ${_name}HeaderTestClean )


Don't attempt to copy OIS dll files on Windows when not required to (CMake)

--HG--
branch : v2-0

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -242,12 +242,14 @@

   if (WIN32)
     # copy the required DLLs to the build directory (configure_file is the only copy-like op I found in CMake)
-    if(NOT OGRE_BUILD_PLATFORM_WINRT)
-      file(COPY ${OIS_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
-    	file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
-    	file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
-    	file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
-    endif ()
+	if( OGRE_BUILD_SAMPLES OR OGRE_BUILD_TESTS )
+		if(NOT OGRE_BUILD_PLATFORM_WINRT)
+		  file(COPY ${OIS_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
+			file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
+			file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
+			file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
+		endif ()
+	endif()

     if (OGRE_BUILD_PLUGIN_CG)
       # if MinGW or NMake, the release/debug cg.dll's would conflict, so just pick one


BUG: allow to disable remote modules already cloned

--- CMake/OTBModuleEnablement.cmake
+++ CMake/OTBModuleEnablement.cmake
@@ -39,6 +39,14 @@
     set(${otb-module-test}_IS_TEST 1)
     set(${otb-module}_TESTED_BY ${otb-module-test})
     set(${otb-module-test}_TESTS_FOR ${otb-module})
+  endif()
+
+  # Exclude remote modules from default modules so that they are
+  # enabled/disabled using their variable Module_XXXX
+  get_filename_component(_group ${${otb-module}_BASE} PATH)
+  get_filename_component(_group ${_group} NAME)
+  if("${_group}" STREQUAL "Remote")
+    set(OTB_MODULE_${otb-module}_EXCLUDE_FROM_DEFAULT 1)
   endif()

   # Reject bad dependencies.


forgot closing parenthesis

forgot closing parenthesis

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -47,7 +47,7 @@
             "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE> -o <OBJECT>")

         # hipcc can write dependencies (undocumented CMake option)
-        set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <OBJECT> -MF <DEPFILE>"
+        set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <OBJECT> -MF <DEPFILE>")

         # don't let CMake examine the compiler, because it will fail
         SET(CMAKE_CUDA_COMPILER_FORCED TRUE)


Add missing Java variables to the language options files

The correct version of javadoc was not getting propagated.

Change-Id: Ib399449144e331850388c13302138b5fdaef9b7d

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -91,6 +91,8 @@
     Java_JAVA_EXECUTABLE
     Java_JAVAC_EXECUTABLE
     Java_JAR_EXECUTABLE
+    Java_JAVADOC_EXECUTABLE
+    Java_JAVAH_EXECUTABLE
     Java_VERSION_STRING
     Java_VERSION_MAJOR
     Java_VERSION_MINOR


From Jean-Christophe Lombardo, "On Fedora 14, dcmtk libs are under /usr/lib/dcmtk. I've added a PATH_SUFFIX to take that into account"

--- CMakeModules/FindOurDCMTK.cmake
+++ CMakeModules/FindOurDCMTK.cmake
@@ -44,18 +44,20 @@
 )

 FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
-    ${DCMTK_DIR}/ofstd/libsrc
-    ${DCMTK_DIR}/ofstd/libsrc/Release
-    ${DCMTK_DIR}/ofstd/libsrc/Debug
-    ${DCMTK_DIR}/ofstd/Release
-    ${DCMTK_DIR}/ofstd/Debug
-    ${DCMTK_DIR}/lib
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/ofstd/libsrc
+        ${DCMTK_DIR}/ofstd/libsrc/Release
+        ${DCMTK_DIR}/ofstd/libsrc/Debug
+        ${DCMTK_DIR}/ofstd/Release
+        ${DCMTK_DIR}/ofstd/Debug
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

@@ -70,18 +72,20 @@
 )

 FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
-    ${DCMTK_DIR}/dcmdata/libsrc
-    ${DCMTK_DIR}/dcmdata/libsrc/Release
-    ${DCMTK_DIR}/dcmdata/libsrc/Debug
-    ${DCMTK_DIR}/dcmdata/Release
-    ${DCMTK_DIR}/dcmdata/Debug
-    ${DCMTK_DIR}/lib
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/dcmdata/libsrc
+        ${DCMTK_DIR}/dcmdata/libsrc/Release
+        ${DCMTK_DIR}/dcmdata/libsrc/Debug
+        ${DCMTK_DIR}/dcmdata/Release
+        ${DCMTK_DIR}/dcmdata/Debug
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

@@ -96,18 +100,20 @@
 )

 FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
-    ${DCMTK_DIR}/dcmimgle/libsrc
-    ${DCMTK_DIR}/dcmimgle/libsrc/Release
-    ${DCMTK_DIR}/dcmimgle/libsrc/Debug
-    ${DCMTK_DIR}/dcmimgle/Release
-    ${DCMTK_DIR}/dcmimgle/Debug
-    ${DCMTK_DIR}/lib
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/dcmimgle/libsrc
+        ${DCMTK_DIR}/dcmimgle/libsrc/Release
+        ${DCMTK_DIR}/dcmimgle/libsrc/Debug
+        ${DCMTK_DIR}/dcmimgle/Release
+        ${DCMTK_DIR}/dcmimgle/Debug
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

 FIND_PATH( DCMTK_dcmimage_INCLUDE_DIR diregist.h
@@ -121,66 +127,80 @@
 )

 FIND_LIBRARY( DCMTK_dcmimage_LIBRARY dcmimage
-    ${DCMTK_DIR}/dcmimage/libsrc
-    ${DCMTK_DIR}/dcmimage/libsrc/Release
-    ${DCMTK_DIR}/dcmimage/libsrc/Debug
-    ${DCMTK_DIR}/dcmimage/Release
-    ${DCMTK_DIR}/dcmimage/Debug
-    ${DCMTK_DIR}/lib
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/dcmimage/libsrc
+        ${DCMTK_DIR}/dcmimage/libsrc/Release
+        ${DCMTK_DIR}/dcmimage/libsrc/Debug
+        ${DCMTK_DIR}/dcmimage/Release
+        ${DCMTK_DIR}/dcmimage/Debug
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

 FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
-    ${DCMTK_DIR}/imagectn/libsrc/Release
-    ${DCMTK_DIR}/imagectn/libsrc/
-    ${DCMTK_DIR}/imagectn/libsrc/Debug
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/imagectn/libsrc/Release
+        ${DCMTK_DIR}/imagectn/libsrc/
+        ${DCMTK_DIR}/imagectn/libsrc/Debug
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

 FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
-    ${DCMTK_DIR}/dcmnet/libsrc/Release
-    ${DCMTK_DIR}/dcmnet/libsrc/Debug
-    ${DCMTK_DIR}/dcmnet/libsrc/
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/dcmnet/libsrc/Release
+        ${DCMTK_DIR}/dcmnet/libsrc/Debug
+        ${DCMTK_DIR}/dcmnet/libsrc/
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

 FIND_LIBRARY(DCMTK_oflog_LIBRARY oflog
-    ${DCMTK_DIR}/dcmnet/libsrc/Release
-    ${DCMTK_DIR}/dcmnet/libsrc/Debug
-    ${DCMTK_DIR}/dcmnet/libsrc/
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/dcmnet/libsrc/Release
+        ${DCMTK_DIR}/dcmnet/libsrc/Debug
+        ${DCMTK_DIR}/dcmnet/libsrc/
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

 FIND_LIBRARY(DCMTK_ofstd_LIBRARY ofstd
-    ${DCMTK_DIR}/dcmnet/libsrc/Release
-    ${DCMTK_DIR}/dcmnet/libsrc/Debug
-    ${DCMTK_DIR}/dcmnet/libsrc/
-    /usr/local/dicom/lib
-    /usr/local/lib64
-    /usr/lib64
-    /usr/local/lib
-    /usr/lib
-    /usr/local/dicom/lib
+    PATHS
+        ${DCMTK_DIR}/dcmnet/libsrc/Release
+        ${DCMTK_DIR}/dcmnet/libsrc/Debug
+        ${DCMTK_DIR}/dcmnet/libsrc/
+        ${DCMTK_DIR}/lib
+        /usr/local/dicom/lib
+        /usr/local/lib64
+        /usr/lib64
+        /usr/local/lib
+        /usr/lib
+        /usr/local/dicom/lib
+    PATH_SUFFIXES dcmtk
 )

 IF( DCMTK_config_INCLUDE_DIR


refs #4871 use lex1:8080 to submit results to, lets us use /etc/hosts to submit from other machines

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

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "23:59:00 EDT")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "192.168.1.114")
+set(CTEST_DROP_SITE "lex1:8080")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=tokudb")
 set(CTEST_DROP_SITE_CDASH TRUE)


Add CTest files

Add CTest files

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,13 +1,5 @@
-## This file should be placed in the root directory of your project.
-## Then modify the CMakeLists.txt file in the root directory of your
-## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
-##   ENABLE_TESTING()
-##   INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "ProjectB")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
-
+set(CTEST_PROJECT_NAME "ProjectC")
 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=ProjectB")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "submit.php?project=PublicDashboard")
 set(CTEST_DROP_SITE_CDASH TRUE)


updated models hash

updated models hash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,7 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
-set(TEST_MODELS_HASH a5a19e4db2920c5dc8179cc808f1b87076c86bd9)
+set(TEST_MODELS_HASH 60d4f3119759f0125c2b2ea2b6a4b8c00ea23fe9)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


[t:4814] don't run valgrind on tests that crash

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -44,6 +44,19 @@
   try-leak-reachable
   try-leak-uninit
   )
+
+## tests that are supposed to crash will generate memcheck failures
+set(tests_that_should_fail
+  try-assert0
+  try-assert-zero
+  test-assertA
+  test-assertB
+  test_truncate_txn_abort.tdb
+  test_db_no_env.tdb
+  recover-missing-dbfile.abortrecover
+  recover-missing-dbfile-2.abortrecover
+  )
+list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${tests_that_should_fail})

 ## don't run drd stress tests with valgrind either (because that would do valgrind twice)
 set(stress_tests


fix warning suppression

fix warning suppression

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -1,2 +1,4 @@
-set(CTest_CUSTOM_WARNING_EXCEPTION ${CTest_CUSTOM_WARNING_EXCEPTION} "(expandandmerge.cpp:(41|64|76)|gather.cpp:(39|40)|load.cpp:(65|90)): warning: ...(c|ii|castedMask|b)... (is|may be) used uninitialized in this function")
-set(CTest_CUSTOM_WARNING_EXCEPTION ${CTest_CUSTOM_WARNING_EXCEPTION} "warning is a GCC extension")
+set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "expandandmerge.cpp:(41|64|76): warning: .+c.+ (is|may be) used uninitialized in this function")
+set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "gather.cpp:(39|40): warning: .+(ii|castedMask).+ (is|may be) used uninitialized in this function")
+set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "load.cpp:(65|90): warning: .+b.+ (is|may be) used uninitialized in this function")
+set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "warning is a GCC extension")


Fixes in unified CPack configuration

Fixes in unified CPack configuration

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -29,7 +29,7 @@
   set(CPACK_COMPONENTS_ALL lib dev)
 else()
   set(CPACK_COMPONENTS_ALL unspecified lib dev)
-endif
+endif()

 set(CPACK_COMPONENT_UNSPECIFIED_DISPLAY_NAME "Unspecified")
 set(CPACK_COMPONENT_UNSPECIFIED_DESCRIPTION
@@ -101,6 +101,7 @@
   if(CPACK_GENERATOR STREQUAL "DEB")
     # dpkg requires lowercase package names
     string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
+    set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "/sbin/ldconfig")

     if(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
       set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_CONTACT}")


Tweak API generation

Tweak API generation

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -20,8 +20,8 @@
 add_dependencies(doxygen doxygen_install)

 add_custom_target(github
-  ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/doc/html
-  ${CMAKE_SOURCE_DIR}/../eyescale/${PROJECT_NAME}-${VERSION}
+  ${CMAKE_COMMAND} -E remove_directory ${CMAKE_SOURCE_DIR}/../eyescale/${PROJECT_NAME}-${VERSION}
+  ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/doc/html ${CMAKE_SOURCE_DIR}/../eyescale/${PROJECT_NAME}-${VERSION}
   COMMENT "Copying API documentation to eyescale.github.com/${PROJECT_NAME}-${VERSION}"
   VERBATIM)
 add_dependencies(github doxygen)


set Fortran OMP flags only if OpenMP_Fortran_FLAGS are not set; fixes #177

also fix Intel Fortran OMP depending on the version of the compiler
thanks to Lori A. Burns for the changeset

--- modules/omp.cmake
+++ modules/omp.cmake
@@ -21,25 +21,6 @@
 option(ENABLE_OPENMP "Enable OpenMP parallelization" OFF)

 if(ENABLE_OPENMP)
-    if(DEFINED CMAKE_Fortran_COMPILER_ID)
-        # we do this in a pedestrian way because the Fortran support is relatively recent
-        if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
-            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
-        endif()
-        if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
-            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
-        endif()
-        if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
-            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp")
-        endif()
-        if(CMAKE_Fortran_COMPILER_ID MATCHES XL)
-            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp")
-        endif()
-        if(CMAKE_Fortran_COMPILER_ID MATCHES Cray)
-            # do nothing in this case
-        endif()
-        set(OPENMP_FOUND TRUE)
-    endif()

     if(NOT OPENMP_FOUND)
         find_package(OpenMP)
@@ -53,5 +34,35 @@
         if(DEFINED CMAKE_CXX_COMPILER_ID)
             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
         endif()
+        if(DEFINED CMAKE_Fortran_COMPILER_ID)
+            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
+        endif()
+    endif()
+
+    if(DEFINED CMAKE_Fortran_COMPILER_ID AND NOT DEFINED OpenMP_Fortran_FLAGS)
+        # we do this in a pedestrian way because the Fortran support is relatively recent
+        if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
+            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
+        endif()
+        if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
+            if(WIN32)
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Qopenmp")
+            elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" AND
+                   "${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
+            else()
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp")
+            endif()
+        endif()
+        if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
+            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp")
+        endif()
+        if(CMAKE_Fortran_COMPILER_ID MATCHES XL)
+            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp")
+        endif()
+        if(CMAKE_Fortran_COMPILER_ID MATCHES Cray)
+            # do nothing in this case
+        endif()
+        set(OPENMP_FOUND TRUE)
     endif()
 endif()


Discover and fixup all executables before verifying the bundle on macOS

--- CMake/BundleUtilities.cmake
+++ CMake/BundleUtilities.cmake
@@ -883,7 +883,7 @@
       message(FATAL_ERROR "Command failed:\n ${msg}")
     endif()
   endif()
-
+
 endfunction()

@@ -969,6 +969,22 @@
     message("fixup_bundle: cleaning up...")
     clear_bundle_keys(keys)

+    # START OF T26976
+    # Discover and fix remaining executables (e.g. Python exec in Resources
+    # folder of Python.framework).
+    #
+    if(APPLE)
+      get_bundle_all_executables("${bundle}" file_list)
+      list(REMOVE_ITEM file_list "${app}" ${CFG_IGNORE_ITEM})
+      list(LENGTH file_list num_executables)
+      if(${num_executables} GREATER 0)
+        list(GET file_list 0 f)
+        message("fixup_bundle: fixing newly discovered executables ${f}...")
+        fixup_bundle("${f}" "" "${dirs}" IGNORE_ITEM ${CFG_IGNORE_ITEM} ${app})
+      endif()
+    endif()
+    # END OF T26976
+
     message("fixup_bundle: verifying...")
     verify_app("${app}" IGNORE_ITEM "${CFG_IGNORE_ITEM}")
   else()


Pass ABI and STL settings to libusb CMake

--- CMake/external_libusb.cmake
+++ CMake/external_libusb.cmake
@@ -15,6 +15,9 @@
     SOURCE_DIR "third-party/libusb/"
     CMAKE_ARGS -DCMAKE_CXX_STANDARD_LIBRARIES=${CMAKE_CXX_STANDARD_LIBRARIES}
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
+            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+            -DANDROID_ABI=${ANDROID_ABI}
+            -DANDROID_STL=${ANDROID_STL}
             -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/libusb_install
     TEST_COMMAND ""
 )


Prefer CXX_VISIBILITY_PRESET over add_compiler_export_flags.

When building with CMake 3.0+ the add_compiler_export_flags function has
been marked as deprecated, so lets use target based properties instead.

(cherry picked from commit 2b5d0da50c1e49dac29a6c599c81de422060bcaf)

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -704,15 +704,21 @@
     set(${vtk-module}${target_suffix}_EXPORT_CODE
       ${${vtk-module}_EXPORT_CODE})
   endif()
-  generate_export_header(${vtk-module}${export_symbol_object} EXPORT_FILE_NAME ${vtk-module}Module.h)
+  vtk_generate_export_header(${vtk-module}${export_symbol_object} EXPORT_FILE_NAME ${vtk-module}Module.h)
   if (BUILD_SHARED_LIBS)
     # export flags are only added when building shared libs, they cause
     # mismatched visibility warnings when building statically since not all
     # libraries that VTK builds don't set visibility flags. Until we get a
     # time to do that, we skip visibility flags for static libraries.
-    add_compiler_export_flags(my_abi_flags)
-    set_property(TARGET ${vtk-module}${target_suffix} APPEND
-      PROPERTY COMPILE_FLAGS "${my_abi_flags}")
+    if(CMAKE_VERSION VERSION_LESS 3.0)
+      #CMake 3.0 deprecates add_compiler_export_flags
+      add_compiler_export_flags(my_abi_flags)
+      set_property(TARGET ${vtk-module}${target_suffix} APPEND
+        PROPERTY COMPILE_FLAGS "${my_abi_flags}")
+    else()
+      set_property(TARGET ${vtk-module}${target_suffix}
+        PROPERTY CXX_VISIBILITY_PRESET "hidden")
+    endif()
   endif()

   if(BUILD_TESTING AND PYTHON_EXECUTABLE AND NOT ${vtk-module}_NO_HeaderTest AND VTK_SOURCE_DIR)


ManageEnviroment: Correct typo

ManageEnviroment: Correct typo

--- Modules/ManageEnvironment.cmake
+++ Modules/ManageEnvironment.cmake
@@ -139,7 +139,7 @@
 M_MSG(${M_INFO1} "CMAKE_HOST_SYSTEM=${CMAKE_HOST_SYSTEM}")
 M_MSG(${M_INFO1} "CMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR}")
 M_MSG(${M_INFO1} "CMAKE_SYSTEM=${CMAKE_SYSTEM}")
-M_MSG(${M_INFO1} "CMAKE_HOST_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
+M_MSG(${M_INFO1} "CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")

 ## Set compile flags
 SET_COMPILE_ENV(BIN_DIR)


Update Version.cmake

Update Version.cmake

--- src/Version.cmake
+++ src/Version.cmake
@@ -2,4 +2,4 @@
 # Boilerplate package Version.cmake file for BootsOnTheGround PACKAGE.
 # (NOTE: This version number is loaded by the package and the project.)
 #
-SET( VERSION "0.5.0" )
+SET( VERSION "0.4.0" )


removed from files.cmake

removed from files.cmake

--- Plugins/org.mitk.gui.qt.candystore/files.cmake
+++ Plugins/org.mitk.gui.qt.candystore/files.cmake
@@ -1,6 +1,9 @@
 set(SRC_CPP_FILES
   QmitkCandyStoreWidget.cpp
   QmitkNewPerspectiveDialog.cpp
+
+#  mitkQtPerspectiveItem.h
+#  mitkQtViewItem.h
 )

 set(INTERNAL_CPP_FILES
@@ -18,8 +21,6 @@
   src/internal/CandyStoreView.h

   src/QmitkCandyStoreWidget.h
-  src/mitkQtPerspectiveItem.h
-  src/mitkQtViewItem.h
   src/QmitkNewPerspectiveDialog.h
 )


Clean up available versions

Clean up available versions

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -34,7 +34,7 @@
 ENDIF()

 set(USER_PYTHON_VERSION ${DEFAULT_PYTHON_VERSION} CACHE STRING "Branch name corresponding to Python version number")
-set_property(CACHE USER_PYTHON_VERSION PROPERTY STRINGS 3.4.3 3.5.6 3.6.7 3.7.9 3.8.2 3.8.7 3.9.1)
+set_property(CACHE USER_PYTHON_VERSION PROPERTY STRINGS 3.6.7 3.7.9 3.8.7 3.9.1)

 string(REPLACE "." ";" USER_PYTHON_VERSION_LIST ${USER_PYTHON_VERSION})
 list(GET USER_PYTHON_VERSION_LIST 0 USER_PYTHON_VERSION_MAJOR)


Add "pure gcc" variable (ie not clang "gcc")

--- Common.cmake
+++ Common.cmake
@@ -78,6 +78,8 @@

 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
   set(CMAKE_COMPILER_IS_CLANG ON)
+elseif(CMAKE_COMPILER_IS_GNUCXX)
+  set(CMAKE_COMPILER_IS_GNUCXX_PURE ON)
 endif()

 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)


#1276 - Update OpenIGTLink version to the latest

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

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -34,7 +34,7 @@

 IF(NOT DEFINED OpenIGTLink_DIR)
 #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 6cf82567a9)
+    SET(revision_tag 9beb7581f6)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Increase timeout for mitkPackage test

Increase timeout for mitkPackage test

Summary: On our current test setup, mitkPackageTest runs into a timeout on OS X, so we can't see if there are maybe other problems. This commit increases the timeout as a first measure to fix the test.

Test Plan: Look at CI results, mitkPackageTest should pass on all primary platforms

Reviewers: O1 MITK Reviewer Group I, kislinsk

Reviewed By: O1 MITK Reviewer Group I, kislinsk

Subscribers: kislinsk

Maniphest Tasks: T27344

Differential Revision: https://phabricator.mitk.org/D278

--- CMake/mitkPackageTest.cmake
+++ CMake/mitkPackageTest.cmake
@@ -9,14 +9,14 @@
                COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config Release --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
-                          TIMEOUT 6000
+                          TIMEOUT 14400
                           LABELS "MITK;MITK-Plugins;PACKAGE_TESTS")
     elseif(CMAKE_BUILD_TYPE)
       add_test( NAME mitkPackageTest
                 COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
-                          TIMEOUT 6000
+                          TIMEOUT 14400
                           LABELS "MITK;MITK-Plugins;PACKAGE_TESTS"
                           RUN_SERIAL TRUE)
     endif()


abicheck UPDATE do not perform strict check

--- CMakeModules/ABICheck.cmake
+++ CMakeModules/ABICheck.cmake
@@ -58,7 +58,7 @@
             COMMAND bash ./abibase.sh
             COMMAND ${ABI_CHECKER} -l lib${LIB_TARGET}${CMAKE_SHARED_LIBRARY_SUFFIX}
             -old abibase/build/lib${LIB_TARGET}.*.dump
-            -new ./lib${LIB_TARGET}.${LIB_SOVERSION_FULL}.dump -s
+            -new ./lib${LIB_TARGET}.${LIB_SOVERSION_FULL}.dump
             DEPENDS ${LIB_TARGET} abi-dump
             BYPRODUCTS ${CMAKE_BINARY_DIR}/compat_reports/lib${LIB_TARGET}${CMAKE_SHARED_LIBRARY_SUFFIX}/*_to_${LIB_SOVERSION_FULL}/compat_report.html
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -1,23 +1,29 @@
 [Desktop Entry]
 Encoding=UTF-8
 Comment=Custom account configuration user interface for accounts using the sipe connection manager.
+Comment[cs]=Vlastní uživatelské rozhraní nastavení účtů pro účty používající správce spojení sipe.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
 Comment[fi]=Sipe-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
+Comment[ia]=Interfacie de usator pro configuration de conto personalisate pro contos usante le gerente de connexion Sipe.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
 Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
+Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Sipe.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
 Icon=blockdevice
 Name=Sipe Account Configuration User Interface
+Name[cs]=Uživatelské rozhraní nastavení účtu Sipe
 Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen
 Name[fi]=Sipe-tilinmäärityksen käyttöliittymä
+Name[ia]=Interfacie de usator de configuration de conto de Sipe
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
 Name[pt]=Interface de Configuração de Contas do Sipe
 Name[pt_BR]=Interface de configuração de contas do Sipe
 Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe
+Name[sl]=Uporabniški vmesnik za nastavitev računov Sipe
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx


clang compatibility in pedantic flag

clang compatibility in pedantic flag

--- src/csapex/cmake/csapex-extras.cmake
+++ src/csapex/cmake/csapex-extras.cmake
@@ -3,7 +3,7 @@
 else()
 add_definitions(-W -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -Wno-unused-function
     -Wno-deprecated-register -Wno-deprecated-register
-    -Wpedantic)
+    -pedantic)
 endif()


Add support for ccache

Add support for ccache

--- cmake/DefaultOptions.cmake
+++ cmake/DefaultOptions.cmake
@@ -15,3 +15,10 @@
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
 set_property(GLOBAL PROPERTY CXX_STANDARD 17)
+
+if (NOT MSVC)
+  find_program(CCACHE_PROGRAM ccache)
+  if (CCACHE_PROGRAM)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
+  endif ()
+endif ()


cmake/Findluaunpanic.cmake: typo LUAunpanic -> luaunpanic

--- cmake/Findluaunpanic.cmake
+++ cmake/Findluaunpanic.cmake
@@ -1,287 +1,287 @@
 # Module for locating luaunpanic, based on ICU module.
 #
 # Cutomizable variables:
-#   LUAunpanic_ROOT_DIR
+#   luaunpanic_ROOT_DIR
 #     This variable points to the luaunpanic root directory. On Windows the
 #     library location typically will have to be provided explicitly using the
 #     -D command-line option. Alternatively, an environment variable can be set.
 #
 # Read-Only variables:
-#   LUAunpanic_FOUND
+#   luaunpanic_FOUND
 #     Indicates whether the library has been found.
 #
-#   LUAunpanic_INCLUDE_DIRS
+#   luaunpanic_INCLUDE_DIRS
 #     Points to the luaunpanic include directory.
 #
-#   LUAunpanic_LIBRARIES
+#   luaunpanic_LIBRARIES
 #     Points to the luaunpanic libraries that should be passed to
 #     target_link_libraries in dynamic mode.
 #
-#   LUAunpanic_STATIC_LIBRARIES
+#   luaunpanic_STATIC_LIBRARIES
 #     Points to the luaunpanic libraries static that should be passed to
 #     target_link_libraries in static mode.
 #
-#   LUAunpanic_LINK_FLAGS
+#   luaunpanic_LINK_FLAGS
 #     Linker flags when building linking against luaunpanic. Defaults to "libluaunpanic". Take care, this is a list.
 #
-#   LUAunpanic_STATIC_LINK_FLAGS
+#   luaunpanic_STATIC_LINK_FLAGS
 #     Linker flags when building linking against static luaunpanic. Defaults to "libluaunpanic_static". Take care, this is a list.
 #
-#   LUAunpanic_LDFLAGS
-#     Stringified version of LUAunpanic_LINK_FLAGS
-#
-#   LUAunpanic_STATIC_LDFLAGS
-#     Stringified version of LUAunpanic_STATIC_LINK_FLAGS
+#   luaunpanic_LDFLAGS
+#     Stringified version of luaunpanic_LINK_FLAGS
+#
+#   luaunpanic_STATIC_LDFLAGS
+#     Stringified version of luaunpanic_STATIC_LINK_FLAGS
 #
 INCLUDE (CMakeParseArguments)
 INCLUDE (FindPackageHandleStandardArgs)

 SET (_PF86 "ProgramFiles(x86)")
-SET (_LUAunpanic_POSSIBLE_DIRS
-  ${LUAunpanic_ROOT_DIR}
-  "$ENV{LUAunpanic_ROOT_DIR}"
+SET (_luaunpanic_POSSIBLE_DIRS
+  ${luaunpanic_ROOT_DIR}
+  "$ENV{luaunpanic_ROOT_DIR}"
   "C:/luaunpanic"
   "$ENV{PROGRAMFILES}/luaunpanic"
   "$ENV{${_PF86}}/luaunpanic")

-SET (_LUAunpanic_POSSIBLE_INCLUDE_SUFFIXES include)
+SET (_luaunpanic_POSSIBLE_INCLUDE_SUFFIXES include)

 IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
-  SET (_LUAunpanic_POSSIBLE_LIB_SUFFIXES lib64)
-  SET (_LUAunpanic_POSSIBLE_BIN_SUFFIXES bin64)
+  SET (_luaunpanic_POSSIBLE_LIB_SUFFIXES lib64)
+  SET (_luaunpanic_POSSIBLE_BIN_SUFFIXES bin64)

   IF (NOT WIN32)
-    LIST (APPEND _LUAunpanic_POSSIBLE_LIB_SUFFIXES lib)
-    LIST (APPEND _LUAunpanic_POSSIBLE_BIN_SUFFIXES bin)
+    LIST (APPEND _luaunpanic_POSSIBLE_LIB_SUFFIXES lib)
+    LIST (APPEND _luaunpanic_POSSIBLE_BIN_SUFFIXES bin)
   ENDIF (NOT WIN32)
 ELSE (CMAKE_SIZEOF_VOID_P EQUAL 8)
-  SET (_LUAunpanic_POSSIBLE_LIB_SUFFIXES lib)
-  SET (_LUAunpanic_POSSIBLE_BIN_SUFFIXES bin)
+  SET (_luaunpanic_POSSIBLE_LIB_SUFFIXES lib)
+  SET (_luaunpanic_POSSIBLE_BIN_SUFFIXES bin)
 ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 8)

-FIND_PATH (LUAunpanic_ROOT_DIR
+FIND_PATH (luaunpanic_ROOT_DIR
   NAMES include/luaunpanic.h
-  PATHS ${_LUAunpanic_POSSIBLE_DIRS}
+  PATHS ${_luaunpanic_POSSIBLE_DIRS}
   DOC "luaunpanic root directory")

-IF (LUAunpanic_ROOT_DIR)
+IF (luaunpanic_ROOT_DIR)
   # Re-use the previous path:
-  FIND_PATH (LUAunpanic_INCLUDE_DIR
+  FIND_PATH (luaunpanic_INCLUDE_DIR
     NAMES luaunpanic.h
-    PATHS ${LUAunpanic_ROOT_DIR}
-    PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_INCLUDE_SUFFIXES}
+    PATHS ${luaunpanic_ROOT_DIR}
+    PATH_SUFFIXES ${_luaunpanic_POSSIBLE_INCLUDE_SUFFIXES}
     DOC "luaunpanic include directory"
     # NO_DEFAULT_PATH
     )
-ELSE (LUAunpanic_ROOT_DIR)
+ELSE (luaunpanic_ROOT_DIR)
   # Use default path search
-  FIND_PATH (LUAunpanic_INCLUDE_DIR
+  FIND_PATH (luaunpanic_INCLUDE_DIR
     NAMES luaunpanic.h
     DOC "luaunpanic include directory"
     )
-ENDIF (LUAunpanic_ROOT_DIR)
-
-IF (NOT LUAunpanic_FIND_COMPONENTS)
-  SET (LUAunpanic_FIND_COMPONENTS luaunpanic)
-ENDIF (NOT LUAunpanic_FIND_COMPONENTS)
-
-IF (LUAunpanic_INCLUDE_DIR)
+ENDIF (luaunpanic_ROOT_DIR)
+
+IF (NOT luaunpanic_FIND_COMPONENTS)
+  SET (luaunpanic_FIND_COMPONENTS luaunpanic)
+ENDIF (NOT luaunpanic_FIND_COMPONENTS)
+
+IF (luaunpanic_INCLUDE_DIR)
   # Loop over each components
-  FOREACH (_LUAunpanic_COMPONENT ${LUAunpanic_FIND_COMPONENTS})
-    SET (_LUAunpanic_COMPONENT_BASE ${_LUAunpanic_COMPONENT})
-    SET (_LUAunpanic_COMPONENT_POSSIBLE_DEBUG_NAMES ${_LUAunpanic_COMPONENT_BASE}d)
-    SET (_LUAunpanic_COMPONENT_POSSIBLE_RELEASE_NAMES ${_LUAunpanic_COMPONENT_BASE})
-
-    SET (_LUAunpanic_STATIC_COMPONENT_BASE "${_LUAunpanic_COMPONENT}_static")
-    SET (_LUAunpanic_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES ${_LUAunpanic_STATIC_COMPONENT_BASE}d)
-    SET (_LUAunpanic_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES ${_LUAunpanic_STATIC_COMPONENT_BASE})
-
-    STRING (TOUPPER ${_LUAunpanic_COMPONENT} _LUAunpanic_COMPONENT_UPPER)
-    SET (_LUAunpanic_LIBRARY_BASE LUAunpanic_${_LUAunpanic_COMPONENT_UPPER}_LIBRARY)
-    SET (_LUAunpanic_STATIC_LIBRARY_BASE LUAunpanic_STATIC_${_LUAunpanic_COMPONENT_UPPER}_LIBRARY)
-
-    IF (LUAunpanic_ROOT_DIR)
-      FIND_LIBRARY (${_LUAunpanic_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUAunpanic_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATHS ${LUAunpanic_ROOT_DIR} PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-      FIND_LIBRARY (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUAunpanic_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATHS ${LUAunpanic_ROOT_DIR} PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-    ELSE (LUAunpanic_ROOT_DIR)
-      FIND_LIBRARY (${_LUAunpanic_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUAunpanic_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	)
-      FIND_LIBRARY (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUAunpanic_COMPONENT_STATIC_POSSIBLE_DEBUG_NAMES}
-	PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	)
-    ENDIF (LUAunpanic_ROOT_DIR)
-
-    IF (LUAunpanic_ROOT_DIR)
-      FIND_LIBRARY (${_LUAunpanic_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUAunpanic_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATHS ${LUAunpanic_ROOT_DIR} PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-      FIND_LIBRARY (${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUAunpanic_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATHS ${LUAunpanic_ROOT_DIR} PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
+  FOREACH (_luaunpanic_COMPONENT ${luaunpanic_FIND_COMPONENTS})
+    SET (_luaunpanic_COMPONENT_BASE ${_luaunpanic_COMPONENT})
+    SET (_luaunpanic_COMPONENT_POSSIBLE_DEBUG_NAMES ${_luaunpanic_COMPONENT_BASE}d)
+    SET (_luaunpanic_COMPONENT_POSSIBLE_RELEASE_NAMES ${_luaunpanic_COMPONENT_BASE})
+
+    SET (_luaunpanic_STATIC_COMPONENT_BASE "${_luaunpanic_COMPONENT}_static")
+    SET (_luaunpanic_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES ${_luaunpanic_STATIC_COMPONENT_BASE}d)
+    SET (_luaunpanic_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES ${_luaunpanic_STATIC_COMPONENT_BASE})
+
+    STRING (TOUPPER ${_luaunpanic_COMPONENT} _luaunpanic_COMPONENT_UPPER)
+    SET (_luaunpanic_LIBRARY_BASE luaunpanic_${_luaunpanic_COMPONENT_UPPER}_LIBRARY)
+    SET (_luaunpanic_STATIC_LIBRARY_BASE luaunpanic_STATIC_${_luaunpanic_COMPONENT_UPPER}_LIBRARY)
+
+    IF (luaunpanic_ROOT_DIR)
+      FIND_LIBRARY (${_luaunpanic_LIBRARY_BASE}_DEBUG
+	NAMES ${_luaunpanic_COMPONENT_POSSIBLE_DEBUG_NAMES}
+	PATHS ${luaunpanic_ROOT_DIR} PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	# NO_DEFAULT_PATH
+	)
+      FIND_LIBRARY (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG
+	NAMES ${_luaunpanic_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES}
+	PATHS ${luaunpanic_ROOT_DIR} PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	# NO_DEFAULT_PATH
+	)
+    ELSE (luaunpanic_ROOT_DIR)
+      FIND_LIBRARY (${_luaunpanic_LIBRARY_BASE}_DEBUG
+	NAMES ${_luaunpanic_COMPONENT_POSSIBLE_DEBUG_NAMES}
+	PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	)
+      FIND_LIBRARY (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG
+	NAMES ${_luaunpanic_COMPONENT_STATIC_POSSIBLE_DEBUG_NAMES}
+	PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	)
+    ENDIF (luaunpanic_ROOT_DIR)
+
+    IF (luaunpanic_ROOT_DIR)
+      FIND_LIBRARY (${_luaunpanic_LIBRARY_BASE}_RELEASE
+	NAMES ${_luaunpanic_COMPONENT_POSSIBLE_RELEASE_NAMES}
+	PATHS ${luaunpanic_ROOT_DIR} PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	# NO_DEFAULT_PATH
+	)
+      FIND_LIBRARY (${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE
+	NAMES ${_luaunpanic_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
+	PATHS ${luaunpanic_ROOT_DIR} PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
 	# NO_DEFAULT_PATH
 	)
     ELSE (ICU_ROOT_DIR)
-      FIND_LIBRARY (${_LUAunpanic_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUAunpanic_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	)
-      FIND_LIBRARY (${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUAunpanic_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATH_SUFFIXES ${_LUAunpanic_POSSIBLE_LIB_SUFFIXES}
-	)
-    ENDIF (LUAunpanic_ROOT_DIR)
-
-    SET (LUAunpanic_${_LUAunpanic_COMPONENT_UPPER}_FOUND TRUE)
+      FIND_LIBRARY (${_luaunpanic_LIBRARY_BASE}_RELEASE
+	NAMES ${_luaunpanic_COMPONENT_POSSIBLE_RELEASE_NAMES}
+	PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	)
+      FIND_LIBRARY (${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE
+	NAMES ${_luaunpanic_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
+	PATH_SUFFIXES ${_luaunpanic_POSSIBLE_LIB_SUFFIXES}
+	)
+    ENDIF (luaunpanic_ROOT_DIR)
+
+    SET (luaunpanic_${_luaunpanic_COMPONENT_UPPER}_FOUND TRUE)

     # Debug and release
-    IF (${_LUAunpanic_LIBRARY_BASE}_DEBUG AND ${_LUAunpanic_LIBRARY_BASE}_RELEASE)
-      SET (${_LUAunpanic_LIBRARY_BASE}
-        debug ${${_LUAunpanic_LIBRARY_BASE}_DEBUG}
-        optimized ${${_LUAunpanic_LIBRARY_BASE}_RELEASE})
+    IF (${_luaunpanic_LIBRARY_BASE}_DEBUG AND ${_luaunpanic_LIBRARY_BASE}_RELEASE)
+      SET (${_luaunpanic_LIBRARY_BASE}
+        debug ${${_luaunpanic_LIBRARY_BASE}_DEBUG}
+        optimized ${${_luaunpanic_LIBRARY_BASE}_RELEASE})
       # Debug only
-    ELSEIF (${_LUAunpanic_LIBRARY_BASE}_DEBUG)
-      SET (${_LUAunpanic_LIBRARY_BASE} ${${_LUAunpanic_LIBRARY_BASE}_DEBUG})
+    ELSEIF (${_luaunpanic_LIBRARY_BASE}_DEBUG)
+      SET (${_luaunpanic_LIBRARY_BASE} ${${_luaunpanic_LIBRARY_BASE}_DEBUG})
       # Release only
-    ELSEIF (${_LUAunpanic_LIBRARY_BASE}_RELEASE)
-      SET (${_LUAunpanic_LIBRARY_BASE} ${${_LUAunpanic_LIBRARY_BASE}_RELEASE})
-    ELSE (${_LUAunpanic_LIBRARY_BASE}_DEBUG AND ${_LUAunpanic_LIBRARY_BASE}_RELEASE)
+    ELSEIF (${_luaunpanic_LIBRARY_BASE}_RELEASE)
+      SET (${_luaunpanic_LIBRARY_BASE} ${${_luaunpanic_LIBRARY_BASE}_RELEASE})
+    ELSE (${_luaunpanic_LIBRARY_BASE}_DEBUG AND ${_luaunpanic_LIBRARY_BASE}_RELEASE)
       # Component missing: record it for a later report
-      LIST (APPEND _LUAunpanic_MISSING_COMPONENTS ${_LUAunpanic_COMPONENT})
-      SET (LUAunpanic_${__COMPONENT_UPPER}_FOUND FALSE)
-    ENDIF (${_LUAunpanic_LIBRARY_BASE}_DEBUG AND ${_LUAunpanic_LIBRARY_BASE}_RELEASE)
-
-    IF (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG AND ${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE)
-      SET (${_LUAunpanic_STATIC_LIBRARY_BASE}
-        debug ${${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG}
-        optimized ${${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE})
+      LIST (APPEND _luaunpanic_MISSING_COMPONENTS ${_luaunpanic_COMPONENT})
+      SET (luaunpanic_${__COMPONENT_UPPER}_FOUND FALSE)
+    ENDIF (${_luaunpanic_LIBRARY_BASE}_DEBUG AND ${_luaunpanic_LIBRARY_BASE}_RELEASE)
+
+    IF (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG AND ${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE)
+      SET (${_luaunpanic_STATIC_LIBRARY_BASE}
+        debug ${${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG}
+        optimized ${${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE})
       # Debug only
-    ELSEIF (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG)
-      SET (${_LUAunpanic_STATIC_LIBRARY_BASE} ${${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG})
+    ELSEIF (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG)
+      SET (${_luaunpanic_STATIC_LIBRARY_BASE} ${${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG})
       # Release only
-    ELSEIF (${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE)
-      SET (${_LUAunpanic_STATIC_LIBRARY_BASE} ${${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE})
-    ELSE (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG AND ${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE)
+    ELSEIF (${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE)
+      SET (${_luaunpanic_STATIC_LIBRARY_BASE} ${${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE})
+    ELSE (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG AND ${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE)
       # Component missing: record it for a later report
-      LIST (APPEND _LUAunpanic_STATIC_MISSING_COMPONENTS ${_LUAunpanic_COMPONENT})
-      SET (LUAunpanic_STATIC_${__COMPONENT_UPPER}_FOUND FALSE)
-    ENDIF (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG AND ${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE)
-
-    MARK_AS_ADVANCED (${_LUAunpanic_LIBRARY_BASE}_DEBUG ${_LUAunpanic_LIBRARY_BASE}_RELEASE)
-    MARK_AS_ADVANCED (${_LUAunpanic_STATIC_LIBRARY_BASE}_DEBUG ${_LUAunpanic_STATIC_LIBRARY_BASE}_RELEASE)
+      LIST (APPEND _luaunpanic_STATIC_MISSING_COMPONENTS ${_luaunpanic_COMPONENT})
+      SET (luaunpanic_STATIC_${__COMPONENT_UPPER}_FOUND FALSE)
+    ENDIF (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG AND ${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE)
+
+    MARK_AS_ADVANCED (${_luaunpanic_LIBRARY_BASE}_DEBUG ${_luaunpanic_LIBRARY_BASE}_RELEASE)
+    MARK_AS_ADVANCED (${_luaunpanic_STATIC_LIBRARY_BASE}_DEBUG ${_luaunpanic_STATIC_LIBRARY_BASE}_RELEASE)

     # Make sure only libraries that have been actually found are registered
-    IF (${_LUAunpanic_LIBRARY_BASE})
-      LIST (APPEND _LUAunpanic_LIBRARIES ${${_LUAunpanic_LIBRARY_BASE}})
-    ENDIF (${_LUAunpanic_LIBRARY_BASE})
-
-    IF (${_LUAunpanic_STATIC_LIBRARY_BASE})
-      LIST (APPEND _LUAunpanic_STATIC_LIBRARIES ${${_LUAunpanic_STATIC_LIBRARY_BASE}})
-    ENDIF (${_LUAunpanic_STATIC_LIBRARY_BASE})
-
-  ENDFOREACH (_LUAunpanic_COMPONENT)
-
-  IF (NOT DEFINED _LUAunpanic_MISSING_COMPONENTS AND NOT DEFINED _LUAunpanic_STATIC_MISSING_COMPONENTS)
+    IF (${_luaunpanic_LIBRARY_BASE})
+      LIST (APPEND _luaunpanic_LIBRARIES ${${_luaunpanic_LIBRARY_BASE}})
+    ENDIF (${_luaunpanic_LIBRARY_BASE})
+
+    IF (${_luaunpanic_STATIC_LIBRARY_BASE})
+      LIST (APPEND _luaunpanic_STATIC_LIBRARIES ${${_luaunpanic_STATIC_LIBRARY_BASE}})
+    ENDIF (${_luaunpanic_STATIC_LIBRARY_BASE})
+
+  ENDFOREACH (_luaunpanic_COMPONENT)
+
+  IF (NOT DEFINED _luaunpanic_MISSING_COMPONENTS AND NOT DEFINED _luaunpanic_STATIC_MISSING_COMPONENTS)
     # Success: all components were found
-    SET (LUAunpanic_INCLUDE_DIRS "${LUAunpanic_INCLUDE_DIR}")
-    SET (LUAunpanic_LIBRARIES ${_LUAunpanic_LIBRARIES})
-    SET (LUAunpanic_STATIC_LIBRARIES ${_LUAunpanic_STATIC_LIBRARIES} ${CMAKE_DL_LIBS})
+    SET (luaunpanic_INCLUDE_DIRS "${luaunpanic_INCLUDE_DIR}")
+    SET (luaunpanic_LIBRARIES ${_luaunpanic_LIBRARIES})
+    SET (luaunpanic_STATIC_LIBRARIES ${_luaunpanic_STATIC_LIBRARIES} ${CMAKE_DL_LIBS})
   ELSE ()
-    MESSAGE (STATUS "Several LUAunpanic components were not found:")
+    MESSAGE (STATUS "Several luaunpanic components were not found:")

     # Display missing components indented, each on a separate line
-    FOREACH (_LUAunpanic_MISSING_COMPONENT ${_LUAunpanic_MISSING_COMPONENTS})
-      MESSAGE (STATUS "  " ${_LUAunpanic_MISSING_COMPONENT})
+    FOREACH (_luaunpanic_MISSING_COMPONENT ${_luaunpanic_MISSING_COMPONENTS})
+      MESSAGE (STATUS "  " ${_luaunpanic_MISSING_COMPONENT})
     ENDFOREACH ()
-    FOREACH (_LUAunpanic_STATIC_MISSING_COMPONENT ${_LUAunpanic_STATIC_MISSING_COMPONENTS})
-      MESSAGE (STATUS "  " ${_LUAunpanic_STATIC_MISSING_COMPONENT})
+    FOREACH (_luaunpanic_STATIC_MISSING_COMPONENT ${_luaunpanic_STATIC_MISSING_COMPONENTS})
+      MESSAGE (STATUS "  " ${_luaunpanic_STATIC_MISSING_COMPONENT})
     ENDFOREACH ()
   ENDIF ()

   #
   # Simulate hopefully correct flags based on heuristic discovery
   #
-  IF (NOT _LUAunpanic_C_FLAGS_SHARED)
-    SET (_LUAunpanic_C_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
-  ENDIF ()
-
-  IF (NOT _LUAunpanic_CXX_FLAGS_SHARED)
-    SET (_LUAunpanic_CXX_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
-  ENDIF ()
-
-  IF (NOT _LUAunpanic_LINK_FLAGS)
-    SET (_LUAunpanic_LINK_FLAGS ${LUAunpanic_LIBRARIES})
-  ENDIF ()
-
-  IF (NOT _LUAunpanic_STATIC_LINK_FLAGS)
-    SET (_LUAunpanic_STATIC_LINK_FLAGS ${LUAunpanic_STATIC_LIBRARIES})
-  ENDIF ()
-
-ENDIF (LUAunpanic_INCLUDE_DIR)
-
-SET (_LUAunpanic_LDFLAGS " ")
-FOREACH (_luaunpanic_link_flag ${_LUAunpanic_LINK_FLAGS})
-  SET (_LUAunpanic_LDFLAGS "${_LUAunpanic_LDFLAGS} ${_luaunpanic_link_flag}")
+  IF (NOT _luaunpanic_C_FLAGS_SHARED)
+    SET (_luaunpanic_C_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
+  ENDIF ()
+
+  IF (NOT _luaunpanic_CXX_FLAGS_SHARED)
+    SET (_luaunpanic_CXX_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
+  ENDIF ()
+
+  IF (NOT _luaunpanic_LINK_FLAGS)
+    SET (_luaunpanic_LINK_FLAGS ${luaunpanic_LIBRARIES})
+  ENDIF ()
+
+  IF (NOT _luaunpanic_STATIC_LINK_FLAGS)
+    SET (_luaunpanic_STATIC_LINK_FLAGS ${luaunpanic_STATIC_LIBRARIES})
+  ENDIF ()
+
+ENDIF (luaunpanic_INCLUDE_DIR)
+
+SET (_luaunpanic_LDFLAGS " ")
+FOREACH (_luaunpanic_link_flag ${_luaunpanic_LINK_FLAGS})
+  SET (_luaunpanic_LDFLAGS "${_luaunpanic_LDFLAGS} ${_luaunpanic_link_flag}")
 ENDFOREACH ()

-SET (_LUAunpanic_STATIC_LDFLAGS " ")
-FOREACH (_luaunpanic_static_link_flag ${_LUAunpanic_STATIC_LINK_FLAGS})
-  SET (_LUAunpanic_STATIC_LDFLAGS "${_LUAunpanic_STATIC_LDFLAGS} ${_luaunpanic_static_link_flag}")
+SET (_luaunpanic_STATIC_LDFLAGS " ")
+FOREACH (_luaunpanic_static_link_flag ${_luaunpanic_STATIC_LINK_FLAGS})
+  SET (_luaunpanic_STATIC_LDFLAGS "${_luaunpanic_STATIC_LDFLAGS} ${_luaunpanic_static_link_flag}")
 ENDFOREACH ()

-MARK_AS_ADVANCED (LUAunpanic_ROOT_DIR LUAunpanic_INCLUDE_DIR)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS (LUAunpanic
+MARK_AS_ADVANCED (luaunpanic_ROOT_DIR luaunpanic_INCLUDE_DIR)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (luaunpanic
   REQUIRED_VARS
-  LUAunpanic_INCLUDE_DIR
-  LUAunpanic_LIBRARIES)
-
-IF (_LUAunpanic_LINK_FLAGS AND _LUAunpanic_STATIC_LINK_FLAGS)
-  SET (LUAunpanic_FOUND 1 CACHE STRING "LUAunpanic is found")
+  luaunpanic_INCLUDE_DIR
+  luaunpanic_LIBRARIES)
+
+IF (_luaunpanic_LINK_FLAGS AND _luaunpanic_STATIC_LINK_FLAGS)
+  SET (luaunpanic_FOUND 1 CACHE STRING "luaunpanic is found")
 ENDIF ()

-SET (LUAunpanic_C_FLAGS_SHARED    "${_LUAunpanic_C_FLAGS_SHARED}"    CACHE STRING "C flags when compiling against shared LUAunpanic")
-SET (LUAunpanic_CXX_FLAGS_SHARED  "${_LUAunpanic_CXX_FLAGS_SHARED}"  CACHE STRING "C flags when compiling against shared LUAunpanic")
-SET (LUAunpanic_LINK_FLAGS        "${_LUAunpanic_LINK_FLAGS}"        CACHE STRING "Linker flags when linking against LUAunpanic")
-SET (LUAunpanic_LDFLAGS           "${_LUAunpanic_LDFLAGS}"           CACHE STRING "Stringified version of LUAunpanic_LINK_FLAGS")
-SET (LUAunpanic_STATIC_LINK_FLAGS "${_LUAunpanic_STATIC_LINK_FLAGS}" CACHE STRING "Linker flags when linking against static LUAunpanic")
-SET (LUAunpanic_STATIC_LDFLAGS    "${_LUAunpanic_STATIC_LDFLAGS}"    CACHE STRING "Stringified version of LUAunpanic_STATIC_LINK_FLAGS")
-
-IF(LUAunpanic_FOUND)
+SET (luaunpanic_C_FLAGS_SHARED    "${_luaunpanic_C_FLAGS_SHARED}"    CACHE STRING "C flags when compiling against shared luaunpanic")
+SET (luaunpanic_CXX_FLAGS_SHARED  "${_luaunpanic_CXX_FLAGS_SHARED}"  CACHE STRING "C flags when compiling against shared luaunpanic")
+SET (luaunpanic_LINK_FLAGS        "${_luaunpanic_LINK_FLAGS}"        CACHE STRING "Linker flags when linking against luaunpanic")
+SET (luaunpanic_LDFLAGS           "${_luaunpanic_LDFLAGS}"           CACHE STRING "Stringified version of luaunpanic_LINK_FLAGS")
+SET (luaunpanic_STATIC_LINK_FLAGS "${_luaunpanic_STATIC_LINK_FLAGS}" CACHE STRING "Linker flags when linking against static luaunpanic")
+SET (luaunpanic_STATIC_LDFLAGS    "${_luaunpanic_STATIC_LDFLAGS}"    CACHE STRING "Stringified version of luaunpanic_STATIC_LINK_FLAGS")
+
+IF(luaunpanic_FOUND)
   MESSAGE(STATUS "-----------------------------------------")
-  MESSAGE(STATUS "Setup LUAunpanic:")
+  MESSAGE(STATUS "Setup luaunpanic:")
   MESSAGE(STATUS "")
-  MESSAGE(STATUS "           ROOT_DIR: ${LUAunpanic_ROOT_DIR}")
-  MESSAGE(STATUS "     C_FLAGS_SHARED: ${LUAunpanic_C_FLAGS_SHARED}")
-  MESSAGE(STATUS "   CXX_FLAGS_SHARED: ${LUAunpanic_CXX_FLAGS_SHARED}")
-  MESSAGE(STATUS "        INCLUDE_DIR: ${LUAunpanic_INCLUDE_DIR}")
-  MESSAGE(STATUS "          LIBRARIES: ${LUAunpanic_LIBRARIES}")
-  MESSAGE(STATUS "   STATIC LIBRARIES: ${LUAunpanic_STATIC_LIBRARIES}")
-  MESSAGE(STATUS "         LINK_FLAGS: ${LUAunpanic_LINK_FLAGS}")
-  MESSAGE(STATUS "  STATIC LINK_FLAGS: ${LUAunpanic_STATIC_LINK_FLAGS}")
-  MESSAGE(STATUS "            LDFLAGS: ${LUAunpanic_LDFLAGS}")
-  MESSAGE(STATUS "     STATIC LDFLAGS: ${LUAunpanic_STATIC_LDFLAGS}")
+  MESSAGE(STATUS "           ROOT_DIR: ${luaunpanic_ROOT_DIR}")
+  MESSAGE(STATUS "     C_FLAGS_SHARED: ${luaunpanic_C_FLAGS_SHARED}")
+  MESSAGE(STATUS "   CXX_FLAGS_SHARED: ${luaunpanic_CXX_FLAGS_SHARED}")
+  MESSAGE(STATUS "        INCLUDE_DIR: ${luaunpanic_INCLUDE_DIR}")
+  MESSAGE(STATUS "          LIBRARIES: ${luaunpanic_LIBRARIES}")
+  MESSAGE(STATUS "   STATIC LIBRARIES: ${luaunpanic_STATIC_LIBRARIES}")
+  MESSAGE(STATUS "         LINK_FLAGS: ${luaunpanic_LINK_FLAGS}")
+  MESSAGE(STATUS "  STATIC LINK_FLAGS: ${luaunpanic_STATIC_LINK_FLAGS}")
+  MESSAGE(STATUS "            LDFLAGS: ${luaunpanic_LDFLAGS}")
+  MESSAGE(STATUS "     STATIC LDFLAGS: ${luaunpanic_STATIC_LDFLAGS}")
   MESSAGE(STATUS "-----------------------------------------")
 ENDIF()

 MARK_AS_ADVANCED (
-  LUAunpanic_FOUND
-  LUAunpanic_C_FLAGS_SHARED
-  LUAunpanic_CXX_FLAGS_SHARED
-  LUAunpanic_LINK_FLAGS
-  LUAunpanic_LDFLAGS
-  LUAunpanic_STATIC_LINK_FLAGS
-  LUAunpanic_STATIC_LDFLAGS
+  luaunpanic_FOUND
+  luaunpanic_C_FLAGS_SHARED
+  luaunpanic_CXX_FLAGS_SHARED
+  luaunpanic_LINK_FLAGS
+  luaunpanic_LDFLAGS
+  luaunpanic_STATIC_LINK_FLAGS
+  luaunpanic_STATIC_LDFLAGS
   )


update doc for catkin_package() (fix #421)

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -5,10 +5,10 @@
 # about include directories, libraries, further dependencies and
 # CMake variables are used.
 #
-# .. note:: It must be called once for each package.  Best practice
-#   is to call this macro early in your root CMakeLists.txt,
-#   immediately after calling ``project()`` and
-#   ``find_package(catkin REQUIRED)``.
+# .. note:: It must be called once for each package.  It is indirectly
+#   calling``catkin_destinations()`` which will provide additional
+#   output variables.  Please make sure to call ``catkin_package()``
+#   before using those variables.
 #
 # :param INCLUDE_DIRS: ``CMAKE_CURRENT_SOURCE_DIR``-relative paths to
 #   C/C++ includes


cmake px4_add_git_submodule set USES_TERMINAL

 - this allows interacting with the submodules check

--- cmake/common/px4_git.cmake
+++ cmake/common/px4_git.cmake
@@ -81,6 +81,7 @@
 		DEPENDS ${PX4_SOURCE_DIR}/.gitmodules ${PATH}/.git
 		COMMENT "git submodule ${PATH}"
 		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+		USES_TERMINAL
 		)

 	add_custom_target(${TARGET} DEPENDS git_init_${NAME}.stamp)


xc7/boards.cmake: enabling zybo and basys3

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc7/boards.cmake
+++ xc7/boards.cmake
@@ -1,19 +1,18 @@
 get_target_property_required(OPENOCD env OPENOCD)
 get_target_property_required(OPENOCD_TARGET env OPENOCD_TARGET)

-#define_board(
-#  BOARD basys3
-#  DEVICE xc7a50t
-#  PACKAGE test
-#  PROG_TOOL ${OPENOCD_TARGET}
-#  PROG_CMD "${OPENOCD} -f ${PRJXRAY_DIR}/utils/openocd/board-digilent-basys3.cfg -c \\\"init $<SEMICOLON> pld load 0 \${OUT_BIN} $<SEMICOLON> exit\\\""
-#)
-
+define_board(
+  BOARD basys3
+  DEVICE xc7a50t
+  PACKAGE test
+  PROG_TOOL ${OPENOCD_TARGET}
+  PROG_CMD "${OPENOCD} -f ${PRJXRAY_DIR}/utils/openocd/board-digilent-basys3.cfg -c \\\"init $<SEMICOLON> pld load 0 \${OUT_BIN} $<SEMICOLON> exit\\\""
+)

 define_board(
   BOARD zybo
   DEVICE xc7z010
   PACKAGE test
   PROG_TOOL ${OPENOCD_TARGET}
-  #  PROG_CMD "${OPENOCD} -f ${PRJXRAY_DIR}/utils/openocd/board-digilent-basys3.cfg -c \\\"init $<SEMICOLON> pld load 0 \${OUT_BIN} $<SEMICOLON> exit\\\""
+  PROG_CMD "${OPENOCD} -f ${PRJXRAY_DIR}/utils/openocd/board-digilent-basys3.cfg -c \\\"init $<SEMICOLON> pld load 0 \${OUT_BIN} $<SEMICOLON> exit\\\""
 )


xc7: tests: Add arty-full board

xc7: tests: Add arty-full board

Signed-off-by: Tomasz Michalak <a2fdaa543b4cc5e3d6cd8672ec412c0eb393b86e@antmicro.com>

--- xc7/boards.cmake
+++ xc7/boards.cmake
@@ -46,6 +46,15 @@
   PART xc7a35tcsg324-1
 )

+add_xc7_board(
+  BOARD arty-full
+  DEVICE xc7a50t
+  PACKAGE test
+  PROG_TOOL ${OPENOCD_TARGET}
+  PROG_CMD "${OPENOCD} -f ${PRJXRAY_DIR}/utils/openocd/board-digilent-basys3.cfg -c \\\"init $<SEMICOLON> pld load 0 \${OUT_BIN} $<SEMICOLON> exit\\\""
+  PART xc7a35tcsg324-1
+)
+
 # TODO: https://github.com/SymbiFlow/symbiflow-arch-defs/issues/344
 add_xc7_board(
   BOARD zybo


Fixed a bug where starting to add unix support broke iOS and needed tweaking.

--- scripts/generator-key.cmake
+++ scripts/generator-key.cmake
@@ -2,12 +2,12 @@
   SET(GENERATOR_KEY android)
 elseif (MINGW)
   SET(GENERATOR_KEY mingw)
-elseif (UNIX)
-  SET(GENERATOR_KEY linux)
 elseif (MSVC)
   SET(GENERATOR_KEY msvc)
 elseif (IOS)
   SET(GENERATOR_KEY ios)
+  elseif (UNIX) # Caution: this also seems to be set to true on Mac.
+    SET(GENERATOR_KEY linux)
 else ()
   message(FATAL_ERROR "Unsupported Generator.")
 endif ()


Added boost::chrono to dependency list

Added boost::chrono to dependency list

* Chrono was added in boost 1.47.0, so changed minimum version to match.

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -23,7 +23,7 @@
 set(Boost_NO_BOOST_CMAKE ON)

 # Optional boost modules
-find_package(Boost 1.40.0 QUIET COMPONENTS serialization mpi)
+find_package(Boost 1.47.0 QUIET COMPONENTS serialization mpi)
 if(Boost_MPI_FOUND)
   set(BOOST_MPI_FOUND TRUE)
 endif(Boost_MPI_FOUND)
@@ -32,15 +32,9 @@
 endif(Boost_SERIALIZATION_FOUND)

 # Required boost modules
-set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams)
-# Starting with Boost 1.50, boost_thread depends on chrono. As this is not
-# taken care of automatically on Windows, we add an explicit dependency as a
-# workaround.
-if(WIN32 AND Boost_VERSION VERSION_GREATER "104900")
-  set(BOOST_REQUIRED_MODULES ${BOOST_REQUIRED_MODULES} chrono)
-endif(WIN32 AND Boost_VERSION VERSION_GREATER "104900")
+set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams chrono)

-find_package(Boost 1.40.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})
+find_package(Boost 1.47.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


improve catkin_add_nosetests docblock

improve catkin_add_nosetests docblock

--- cmake/test/nosetests.cmake
+++ cmake/test/nosetests.cmake
@@ -20,7 +20,8 @@
 #   (default: 60)
 # :type TIMEOUT: integer
 # :param WORKING_DIRECTORY: the working directory when executing the
-#   tests
+#   tests (this option can only be used when the ``path`` argument is a
+#   file  but not when it is a directory)
 # :type WORKING_DIRECTORY: string
 #
 # @public


Linearize lookahead/place-delay targets.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -653,6 +653,7 @@
     )

     add_file_target(FILE ${OUT_RRBIN_REAL_FILENAME} GENERATED)
+    get_file_target(RRBIN_REAL_TARGET ${OUT_RRBIN_REAL_FILENAME})

     set_target_properties(
       ${DEFINE_DEVICE_DEVICE}
@@ -662,17 +663,18 @@

     if(${DEFINE_DEVICE_CACHE_LOOKAHEAD})
       add_file_target(FILE ${LOOKAHEAD_FILENAME} GENERATED)
-    endif()
+
+      # Linearize target dependency.
+      get_file_target(LOOKAHEAD_TARGET ${LOOKAHEAD_FILENAME})
+      add_dependencies(${LOOKAHEAD_TARGET} ${RRBIN_REAL_TARGET})
+    endif()
+
     if(${DEFINE_DEVICE_CACHE_PLACE_DELAY})
       add_file_target(FILE ${PLACE_DELAY_FILENAME} GENERATED)

-      if(${DEFINE_DEVICE_CACHE_LOOKAHEAD})
-          get_file_target(LOOKAHEAD_TARGET ${LOOKAHEAD_FILENAME})
-          get_file_target(PLACE_DELAY_TARGET ${PLACE_DELAY_FILENAME})
-
-          # Linearize target dependency.
-          add_dependencies(${PLACE_DELAY_TARGET} ${LOOKAHEAD_TARGET})
-      endif()
+      # Linearize target dependency.
+      get_file_target(PLACE_DELAY_TARGET ${PLACE_DELAY_FILENAME})
+      add_dependencies(${PLACE_DELAY_TARGET} ${RRBIN_REAL_TARGET})
     endif()

     if(${DEFINE_DEVICE_CACHE_LOOKAHEAD} OR ${DEFINE_DEVICE_CACHE_PLACE_DELAY})


Fix forgotten change

Fix forgotten change


[FIX] Code cleanup in FindBTK.

[FIX] Code cleanup in FindBTK.

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@1133 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindBTK.cmake
+++ CMake/FindBTK.cmake
@@ -35,8 +35,6 @@
     SET(BTK_DIR_SEARCH ${BTK_DIR_SEARCH} ${dir}/../share/CMake)
   ENDFOREACH(dir)

-  MESSAGE(STATUS "${BTK_DIR_SEARCH}")
-
   #
   # Look for an installation or build tree.
   #


FindMPI: support newer MSMPI

FindMPI: support newer MSMPI

Change-Id: Id06ec96d1b03cf2a185fe57417a39faffa2a34a2

--- CMake/FindMPI.cmake
+++ CMake/FindMPI.cmake
@@ -409,16 +409,18 @@

       # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
       if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
-        set(MS_MPI_ARCH_DIR amd64)
+        set(MS_MPI_ARCH_DIR x64)
+        set(MS_MPI_ARCH_DIR2 amd64)
       else()
-        set(MS_MPI_ARCH_DIR i386)
+        set(MS_MPI_ARCH_DIR x86)
+        set(MS_MPI_ARCH_DIR2 i386)
       endif()

       set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
       find_library(MPI_LIB
         NAMES         mpi mpich mpich2 msmpi
         HINTS         ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
-        PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
+        PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR} Lib/${MS_MPI_ARCH_DIR2})
       set(MPI_LIBRARIES_WORK ${MPI_LIB})

       # Right now, we only know about the extra libs for C++.


Update package version and set the right dependencies for Fedora/Debian

Contributes to #42

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -3,9 +3,31 @@
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Uranium 3D Application Framework")
 set(CPACK_PACKAGE_VERSION_MAJOR 15)
 set(CPACK_PACKAGE_VERSION_MINOR 05)
-set(CPACK_PACKAGE_VERSION_PATCH 90)
+set(CPACK_PACKAGE_VERSION_PATCH 93)

-set(CPACK_RPM_PACKAGE_REQUIRES "python >= 3.3.0, python-arcus >= 15.05.90, python-qt5 >= 5.4.0")
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3 >= 3.3.0, python3-arcus >= 15.05.90, python-qt5 >= 5.4.0")
+set(RPM_REQUIRES
+    "python3 >= 3.4.0"
+    "python3-qt5 >= 5.4.0"
+    "qt5-qtquickcontrols >= 5.4.0"
+    "python3-arcus >= 15.05.90"
+)
+string(REPLACE ";" "," RPM_REQUIRES "${RPM_REQUIRES}")
+set(CPACK_RPM_PACKAGE_REQUIRES ${RPM_REQUIRES})
+
+set(DEB_DEPENDS
+    "python3 >= 3.4.0"
+    "python3-pyqt5 >= 5.4.0"
+    "python3-pyqt5.qtopengl >= 5.4.0"
+    "python3-pyqt5.qtquick >= 5.4.0"
+    "python3-pyqt5.qtsvg >= 5.4.0"
+    "qml-module-qtquick2 >= 5.4.0"
+    "qml-module-qtquick-window2 >= 5.4.0"
+    "qml-module-qtquick-layouts >= 5.4.0"
+    "qml-module-qtquick-dialogs >= 5.4.0"
+    "qml-module-qtquick-controls >= 5.4.0"
+    "python3-arcus >= 15.05.90"
+)
+string(REPLACE ";" "," DEB_DEPENDS "${DEB_DEPENDS}")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})

 include(CPack)


change the day switch time to 5:00 UTC

change the day switch time to 5:00 UTC

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -5,7 +5,7 @@
 ##   ENABLE_TESTING()
 ##   INCLUDE(Dart)
 set(CTEST_PROJECT_NAME "Eigen")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "www.cdash.org")


ignore ICC noise

ignore ICC noise

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -12,7 +12,9 @@
    "AVX disabled per default because of old/broken compiler" # This warning is meant for users not the dashboard
    "GCC 4.7.0 miscompiles at -O3, adding -fno-predictive-commoning to the" # This warning is meant for users not the dashboard
    "warning: the mangled name of .*typename Vc::{anonymous}::Decltype.* will change in a future version of GCC"
-   "^\\*\\*\\* WARNING non-zero return value in ctest from: make") # Ignore output from ctest
+   "^\\*\\*\\* WARNING non-zero return value in ctest from: make" # Ignore output from ctest
+   "ipo: warning #11010:" # Ignore warning about incompatible libraries with ICC -m32 on 64-bit system
+   )

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}
    "^make\\[[1-9]\\]: "


add warning exceptions where the warnings are from me to the user - no need to see them on the dashboard

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -4,7 +4,11 @@
    "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
+   "GCC 4.6.0 is broken.  The following tests are therefore disabled" # This warning is meant for users not the dashboard
+   "Your GCC is older than 4.4.6.  This is known to cause problems/bugs" # This warning is meant for users not the dashboard
+   "GCC 4.4.x shows false positives for -Wparentheses, thus we rather disable" # This warning is meant for users not the dashboard
+   "AVX disabled per default because of old/broken compiler" # This warning is meant for users not the dashboard
+   "GCC 4.7.0 miscompiles at -O3, adding -fno-predictive-commoning to the" # This warning is meant for users not the dashboard
    "^\\*\\*\\* WARNING non-zero return value in ctest from: make") # Ignore output from ctest

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}


Correctly obsolete old packages

Correctly obsolete old packages

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -18,12 +18,16 @@

   string(TOLOWER ${CPACK_PACKAGE_NAME} LOWER_PACKAGE_NAME_PREFIX)
   set(CPACK_PACKAGE_NAME "${LOWER_PACKAGE_NAME_PREFIX}${VERSION_ABI}")
+
   set(OLD_PACKAGES)
-  foreach(i RANGE ${VERSION_ABI})
-    list(APPEND OLD_PACKAGES "${LOWER_PACKAGE_NAME_PREFIX}${i},")
-  endforeach()
-  list(APPEND OLD_PACKAGES "${LOWER_PACKAGE_NAME_PREFIX}")
-  string(REGEX REPLACE ";" " " OLD_PACKAGES ${OLD_PACKAGES})
+  if(VERSION_ABI)
+    math(EXPR NUM_OLD_PACKAGES "${VERSION_ABI} - 1")
+    foreach(i RANGE ${NUM_OLD_PACKAGES})
+      list(APPEND OLD_PACKAGES "${LOWER_PACKAGE_NAME_PREFIX}${i},")
+    endforeach()
+    list(APPEND OLD_PACKAGES "${LOWER_PACKAGE_NAME_PREFIX}")
+    string(REGEX REPLACE ";" " " OLD_PACKAGES ${OLD_PACKAGES})
+  endif()
 endif()

 if(NOT APPLE)


fix bugs due to cmake syntax, add option for user libraries

--- FindArduino.cmake
+++ FindArduino.cmake
@@ -1,7 +1,7 @@
 set(Arduino_FOUND False)

 # find root path
-if(NOT "${Arduino_ROOT_DIR}")
+if(NOT DEFINED Arduino_ROOT_DIR)
 	if(IS_DIRECTORY /usr/share/arduino)
 		set(Arduino_ROOT_DIR /usr/share/arduino CACHE PATH "Arduino root directory")
 	else(IS_DIRECTORY /usr/share/arduino)
@@ -11,17 +11,21 @@
 			set(Arduino_ROOT_DIR NOTFOUND CACHE PATH "Arduino root directory")
 		endif(IS_DIRECTORY /usr/local/share/arduino)
 	endif(IS_DIRECTORY /usr/share/arduino)
-endif(NOT "${Arduino_ROOT_DIR}")
+endif(NOT DEFINED Arduino_ROOT_DIR)

 # default component (arduino core)
-if(NOT "${Arduino_FIND_COMPONENTS}")
+if(NOT DEFINED Arduino_FIND_COMPONENTS)
 	set(Arduino_FIND_COMPONENTS core_arduino)
-endif(NOT "${Arduino_FIND_COMPONENTS}")
+endif(NOT DEFINED Arduino_FIND_COMPONENTS)
+
+if(NOT DEFINED Arduino_USER_LIBRARIES_DIR)
+	set(Arduino_USER_LIBRARIES_DIR $ENV{HOME}/Arduino CACHE PATH "Arduino user libraries directory")
+endif(NOT DEFINED Arduino_USER_LIBRARIES_DIR)

 # default variant
-if(NOT "${Arduino_VARIANT}")
+if(NOT DEFINED Arduino_VARIANT)
 	set(Arduino_VARIANT standard CACHE STRING "Arduino variant (see ${Arduino_ROOT}/hardware/arduino/variants)")
-endif(NOT "${Arduino_VARIANT}")
+endif(NOT DEFINED Arduino_VARIANT)

 # check if all component are founds
 set(Arduino_FOUND True)
@@ -45,7 +49,14 @@
 			set(Arduino_INCLUDE_DIRS ${Arduino_INCLUDE_DIRS} "${Arduino_ROOT_DIR}/libraries/${COMPONENT}")
 			set(Arduino_LIBRARIES ${Arduino_LIBRARIES} "${COMPONENT}")
 		else(IS_DIRECTORY ${Arduino_ROOT_DIR}/libraries/${COMPONENT})
-			set(Arduino_FOUND_${COMPONENT} False)
+			if(IS_DIRECTORY ${Arduino_USER_LIBRARIES_DIR}/${COMPONENT})
+				set(Arduino_FOUND_${COMPONENT} True)
+				set(Arduino_${COMPONENT}_ROOT_DIR ${Arduino_USER_LIBRARIES_DIR}//${COMPONENT})
+				set(Arduino_INCLUDE_DIRS ${Arduino_INCLUDE_DIRS} "${Arduino_USER_LIBRARIES_DIR}/${COMPONENT}")
+				set(Arduino_LIBRARIES ${Arduino_LIBRARIES} "${COMPONENT}")
+			else(IS_DIRECTORY ${Arduino_USER_LIBRARIES_DIR}/${COMPONENT})
+				set(Arduino_FOUND_${COMPONENT} False)
+			endif(IS_DIRECTORY ${Arduino_USER_LIBRARIES_DIR}/${COMPONENT})
 		endif(IS_DIRECTORY ${Arduino_ROOT_DIR}/libraries/${COMPONENT})
 	endif(${COMPONENT} MATCHES core_.*)


set dir for continuous build

set dir for continuous build

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3494 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -56,8 +56,9 @@
 ENDIF(${CTEST_SCRIPT_ARG} MATCHES Continuous)

 IF(${MODEL} MATCHES Continuous)
-	set(OV-ROOT-DIR              "${CMAKE_CURRENT_SOURCE_DIR}/con.ov")
-	file(MAKE_DIRECTORY ${OV-ROOT-DIR})
+#	set(OV-ROOT-DIR              "${CMAKE_CURRENT_SOURCE_DIR}/con.ov")
+	set(OV-ROOT-DIR              "/tmp/con.ov")
+#	file(MAKE_DIRECTORY ${OV-ROOT-DIR})
 ELSE(${MODEL} MATCHES Continuous)
 	# create a temporary directory with very short name to host build
 	exec_program("mktemp" ARGS "--tmpdir -d ov.XXX" OUTPUT_VARIABLE OV-ROOT-DIR)


Don't disable update by default

Don't disable update by default

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -35,7 +35,7 @@
 endif()

 include(CMakeParseArguments)
-option(GIT_EXTERNAL_DISABLE_UPDATE "Disable update of cloned repositories" ON)
+option(GIT_EXTERNAL_DISABLE_UPDATE "Disable update of cloned repositories" OFF)
 option(GIT_EXTERNAL_VERBOSE "Print git commands as they are executed" OFF)

 set(GIT_EXTERNAL_USER $ENV{GIT_EXTERNAL_USER})


Do not rely on the uni_revision.h file in the CMake script.

It just emitted an error, but did not prevent from building.

--- FindUniMRCP.cmake
+++ FindUniMRCP.cmake
@@ -254,12 +254,14 @@
 	string (REGEX REPLACE ".*[ \t]UNI_PATCH_VERSION[ \t]+([0-9]+).*" "\\1" _uni_patch "${_uni_ver}")
 	set (UNIMRCP_VERSION_STRING "${_uni_major}.${_uni_minor}.${_uni_patch}")

-	file (STRINGS "${UNIMRCP_INCLUDE_DIR}/uni_revision.h" _uni_rev
-		REGEX "^#define[ \t]+UNI_REVISION[ \t]+[0-9]+")
-	if (_uni_rev)
-		string (REGEX REPLACE ".*[ \t]UNI_REVISION[ \t]+([0-9]+).*" "\\1" _uni_rev "${_uni_rev}")
-		set (UNIMRCP_VERSION_STRING "${UNIMRCP_VERSION_STRING}.${_uni_rev}")
-	endif (_uni_rev)
+	if (EXISTS "${UNIMRCP_INCLUDE_DIR}/uni_revision.h")
+		file (STRINGS "${UNIMRCP_INCLUDE_DIR}/uni_revision.h" _uni_rev
+			REGEX "^#define[ \t]+UNI_REVISION[ \t]+[0-9]+")
+		if (_uni_rev)
+			string (REGEX REPLACE ".*[ \t]UNI_REVISION[ \t]+([0-9]+).*" "\\1" _uni_rev "${_uni_rev}")
+			set (UNIMRCP_VERSION_STRING "${UNIMRCP_VERSION_STRING}.${_uni_rev}")
+		endif (_uni_rev)
+	endif (EXISTS "${UNIMRCP_INCLUDE_DIR}/uni_revision.h")
 endif (UNIMRCP_INCLUDE_DIR)

 unset (UNIMRCP_FOUND)


added wrapping library and tools

added wrapping library and tools

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -3,42 +3,49 @@

 find_package(VTK REQUIRED)

+# Wrapping tools
+set(_VTK_PYTHON_TARGETS vtkWrappingPythonCore vtkWrappingTools)
+
+# find all vtk python wrapped targets
 foreach(_lib ${VTK_LIBRARIES})
   # exclude system libs
   if(${_lib} MATCHES "^vtk.+")
     # use only python wrapped targets
     if(TARGET ${_lib}PythonD)
+      list(APPEND _VTK_PYTHON_TARGETS ${_lib}PythonD)
+    endif()
+  endif()
+endforeach()

-      # get target properties
-      get_target_property(_target_lib_debug  ${_lib}PythonD IMPORTED_LOCATION_DEBUG)
-      get_target_property(_target_lib_release ${_lib}PythonD IMPORTED_LOCATION_RELEASE)
-      get_filename_component(_target_filename_debug "${_target_lib_debug}" NAME)
-      get_filename_component(_target_filename_release "${_target_lib_release}" NAME)
+foreach(_lib ${_VTK_PYTHON_TARGETS})
+  # get target properties
+  get_target_property(_target_lib_debug  ${_lib} IMPORTED_LOCATION_DEBUG)
+  get_target_property(_target_lib_release ${_lib} IMPORTED_LOCATION_RELEASE)
+  get_filename_component(_target_filename_debug "${_target_lib_debug}" NAME)
+  get_filename_component(_target_filename_release "${_target_lib_release}" NAME)

-      if(_target_lib_debug)
-        install(FILES ${_target_lib_debug}
-                      DESTINATION bin
-                      CONFIGURATIONS Debug)
-      endif()
+  if(_target_lib_debug)
+    install(FILES ${_target_lib_debug}
+                  DESTINATION bin
+                  CONFIGURATIONS Debug)
+  endif()

-      if(_target_lib_release)
-        install(FILES ${_target_lib_release}
-                      DESTINATION bin
-                      CONFIGURATIONS Release)
-      endif()
-      # remove rpath
-      if(UNIX AND NOT APPLE)
-         if(_target_filename_debug)
-           install(CODE "file(RPATH_REMOVE
-                                 FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename_debug}\")")
-         endif()
+  if(_target_lib_release)
+    install(FILES ${_target_lib_release}
+                  DESTINATION bin
+                  CONFIGURATIONS Release)
+  endif()
+  # remove rpath
+  if(UNIX AND NOT APPLE)
+     if(_target_filename_debug)
+       install(CODE "file(RPATH_REMOVE
+                             FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename_debug}\")")
+     endif()

-         if(_target_filename_release)
-           install(CODE "file(RPATH_REMOVE
-                                   FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename_release}\")")
-        endif()
-      endif()
-    endif()
+     if(_target_filename_release)
+       install(CODE "file(RPATH_REMOVE
+                               FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename_release}\")")
+     endif()
   endif()
 endforeach()


Doxygit: Fix order of versions per project

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -51,60 +51,53 @@
   file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html" "Status	")
 endif()

+macro(DOXYGIT_WRITE_ROW)
+  # start row
+  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+    "
${LAST_PROJECT}	${CONTENT}")
+
+  # fill unused versions
+  math(EXPR FILL_VERSIONS "${MAX_VERSIONS} - ${VERSIONS}")
+  if(FILL_VERSIONS)
+    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+      "	")
+  endif()
+
+  # CI status
+  if(DOXYGIT_PROJECT_EXTRA AND LAST_PROJECT)
+    string(REPLACE "[PROJECT]" "${LAST_PROJECT}" DOXYGIT_PROJECT_EXTRA_
+      ${DOXYGIT_PROJECT_EXTRA})
+    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+      "${DOXYGIT_PROJECT_EXTRA_}	")
+  endif()
+
+  # finish row
+  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html" "
\n")
+endmacro()
+
 foreach(ENTRY ${ENTRIES})
   string(REGEX REPLACE "^(.+)-.+$" "\\1" PROJECT ${ENTRY})
   string(REGEX REPLACE "^.+-(.+)$" "\\1" VERSION ${ENTRY})

   if(NOT PROJECT STREQUAL LAST_PROJECT) # finish and start new table row
     if(LAST_PROJECT)
-      # fill unused versions
-      math(EXPR FILL_VERSIONS "${MAX_VERSIONS} - ${VERSIONS}")
-      if(FILL_VERSIONS)
-        file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-          "	")
-      endif()
-
-      # CI status
-      if(DOXYGIT_PROJECT_EXTRA AND LAST_PROJECT)
-        string(REPLACE "[PROJECT]" "${LAST_PROJECT}" DOXYGIT_PROJECT_EXTRA_
-          ${DOXYGIT_PROJECT_EXTRA})
-        file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-          "${DOXYGIT_PROJECT_EXTRA_}	")
-      endif()
+      doxygit_write_row()
     endif()
-
-    # next row
-    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-      "
\n"
-      "
${PROJECT}	")
-
+    # reset
     set(VERSIONS 0)
     set(LAST_PROJECT ${PROJECT})
+    set(CONTENT)
   endif()

   math(EXPR VERSIONS "${VERSIONS} + 1")
-  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-    "${VERSION}	")
+  set(CONTENT
+    "${VERSION}	${CONTENT}")
   list(APPEND GIT_DOCUMENTATION_INSTALL ${ENTRY})
 endforeach()

-# fill unused versions
-math(EXPR FILL_VERSIONS "${MAX_VERSIONS} - ${VERSIONS}")
-if(FILL_VERSIONS)
-  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-    "	")
-endif()
-
-# CI status
-if(DOXYGIT_PROJECT_EXTRA AND LAST_PROJECT)
-  string(REPLACE "[PROJECT]" "${LAST_PROJECT}" DOXYGIT_PROJECT_EXTRA_
-    ${DOXYGIT_PROJECT_EXTRA})
-  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-    "${DOXYGIT_PROJECT_EXTRA_}	")
-endif()
+doxygit_write_row()

 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-"
\n"
 "
\n"
 "
Project Dependencies
"
 "  "


Fixed win program files path.

Fixed win program files path.

--- FindFBX.cmake
+++ FindFBX.cmake
@@ -16,8 +16,10 @@
     /Applications/Autodesk/FBXSDK20131
 )

+string(REGEX REPLACE "\\\\" "/" WIN_PROGRAM_FILES_X64_DIRECTORY $ENV{ProgramW6432})
+
 set(FBX_WIN_LOCATIONS
-    "$ENV{ProgramW6432}/Autodesk/FBX/FbxSdk/2013.1"
+    "${WIN_PROGRAM_FILES_X64_DIRECTORY}/Autodesk/FBX/FbxSdk/2013.1"
 )

 set(FBX_SEARCH_LOCATIONS


[cmake] Add support for exporting frameworks/libraries into cmake export files.

I think this was just an oversight. The new cmake 3.16 seems to choke if we do
not add SourceKit to the exports file since there are dependencies upon it in
other swift libraries.

--- tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+++ tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
@@ -198,6 +198,13 @@
                              COMPONENT "${SOURCEKITLIB_INSTALL_IN_COMPONENT}")
   set_target_properties(${name} PROPERTIES FOLDER "SourceKit libraries")
   add_sourcekit_default_compiler_flags("${name}")
+
+  swift_is_installing_component("${SOURCEKITLIB_INSTALL_IN_COMPONENT}" is_installing)
+  if(NOT is_installing)
+    set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name})
+  else()
+    set_property(GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${name})
+  endif()
 endmacro()

 # Add a new SourceKit executable.
@@ -323,7 +330,6 @@
         COMMAND ${CMAKE_COMMAND} -E copy "${modulemap}" "${modules_dir}/module.modulemap")
     endif()
   endif()
-

   if (SOURCEKIT_DEPLOYMENT_OS MATCHES "^macosx")
     set_output_directory(${name}
@@ -374,6 +380,14 @@
         COMMAND ${CMAKE_COMMAND} -E copy "${hdr}" "${framework_location}/Headers/${hdrname}")
     endforeach()
   endif()
+
+  swift_is_installing_component("${SOURCEKITFW_INSTALL_IN_COMPONENT}" is_installing)
+  if(NOT is_installing)
+    set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name})
+  else()
+    set_property(GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${name})
+  endif()
+
   add_sourcekit_default_compiler_flags("${name}")
 endmacro(add_sourcekit_framework)


[cmake] Move install() after set_target_properties() to workaround crash

Calling install() on a framework target before setting the FRAMEWORK
property triggers a [crash](https://gitlab.kitware.com/cmake/cmake/issues/18848). Workaround by changing the call order.

--- tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+++ tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
@@ -323,11 +323,6 @@

   if (SOURCEKIT_DEPLOYMENT_OS MATCHES "^macosx")
-    swift_install_in_component(${SOURCEKITFW_INSTALL_IN_COMPONENT}
-        TARGETS ${name}
-        LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-        ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-        RUNTIME DESTINATION bin)
     set_output_directory(${name}
         BINARY_DIR ${SOURCEKIT_RUNTIME_OUTPUT_INTDIR}
         LIBRARY_DIR ${SOURCEKIT_LIBRARY_OUTPUT_INTDIR})
@@ -341,11 +336,13 @@
                           MACOSX_FRAMEWORK_SHORT_VERSION_STRING "1.0"
                           MACOSX_FRAMEWORK_BUNDLE_VERSION "${SOURCEKIT_VERSION_STRING}"
                           PUBLIC_HEADER "${headers}")
+    swift_install_in_component(${SOURCEKITFW_INSTALL_IN_COMPONENT}
+        TARGETS ${name}
+        FRAMEWORK DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+        LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+        ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+        RUNTIME DESTINATION bin)
   else()
-    swift_install_in_component(${SOURCEKITFW_INSTALL_IN_COMPONENT}
-        DIRECTORY ${framework_location}
-        DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-        USE_SOURCE_PERMISSIONS)
     set_output_directory(${name}
         BINARY_DIR ${framework_location}
         LIBRARY_DIR ${framework_location})
@@ -355,6 +352,10 @@
                           INSTALL_NAME_DIR "@rpath/${name}.framework"
                           PREFIX ""
                           SUFFIX "")
+    swift_install_in_component(${SOURCEKITFW_INSTALL_IN_COMPONENT}
+        DIRECTORY ${framework_location}
+        DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+        USE_SOURCE_PERMISSIONS)

     foreach(hdr ${headers})
       get_filename_component(hdrname ${hdr} NAME)


Fix Superbuild variable

Fix Superbuild variable

GTEST_ROOT is not user editable when using the super build. And don't
pass VAR list.

Change-Id: I69ed8a8e6d5cdd5e5be7053f01ae48b1adc5dabf

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -286,9 +286,7 @@
     list(APPEND SimpleITK_VARS GTEST_LIBRARIES GTEST_INCLUDE_DIRS GTEST_MAIN_LIBRARIES)
   else()
     include(External_GTest)
-    set( GTEST_ROOT ${GTEST_ROOT} CACHE PATH "The root directory of the gtest install prefix" )
-    mark_as_advanced(GTEST_ROOT)
-    list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES GTest)
+    set( GTEST_ROOT ${GTEST_ROOT} )
     list(APPEND SimpleITK_VARS GTEST_ROOT)
   endif()
 endif()
@@ -319,7 +317,9 @@

 foreach (_varName ${_varNames})
   if(_varName MATCHES "^SimpleITK_" OR _varName MATCHES "^SITK_" )
-    if (NOT _varName MATCHES "^SITK_LANGUAGES_VARS")
+    if (NOT _varName MATCHES "^SITK_LANGUAGES_VARS"
+          AND
+        NOT _varName MATCHES "^SimpleITK_VARS")
       message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to SimpleITK external project.")
       list(APPEND SimpleITK_VARS ${_varName})
     endif()


"BUG: Prefix USE_SYSTEM_ELASTIX with SimpleITK_"

SimpleITK updated its naming scheme for v1.0.0. This brings SimpleITK_USE_SYSTEM_ELASTIX on par with the Travis CI configuration and the rest of the build system.

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -366,17 +366,22 @@
 # Elastix
 #------------------------------------------------------------------------------

-option( USE_SYSTEM_ELASTIX "Use system install of elastix." OFF )
-mark_as_advanced( USE_SYSTEM_ELASTIX )
-
-if(USE_SYSTEM_ELASTIX)
+option(SimpleITK_USE_SYSTEM_ELASTIX "Use system install of elastix." OFF)
+sitk_legacy_naming(SimpleITK_USE_SYSTEM_ELASTIX USE_SYSTEM_ELASTIX)
+mark_as_advanced(SimpleITK_USE_SYSTEM_ELASTIX)
+
+if(SimpleITK_USE_SYSTEM_ELASTIX)
   if(NOT EXISTS ${ELASTIX_USE_FILE})
     set(ELASTIX_USE_FILE ${ELASTIX_DIR}/UseElastix.cmake)
   endif()

   if(NOT EXISTS ${ELASTIX_USE_FILE})
+    set(ELASTIX_USE_FILE ${ELASTIX_DIR}/src/UseElastix.cmake)
+  endif()
+
+  if(NOT EXISTS ${ELASTIX_USE_FILE})
     set(ELASTIX_DIR "" CACHE PATH "Path to folder containing UseElastix.cmake")
-    message(FATAL_ERROR "Could not find UseElastix.cmake. Point ELASTIX_DIR to folder containing UseElastix.cmake or set USE_SYSTEM_ELASTIX to OFF.")
+    message(FATAL_ERROR "Could not find UseElastix.cmake. Point ELASTIX_DIR to folder containing UseElastix.cmake or set SimpleITK_USE_SYSTEM_ELASTIX to OFF.")
   endif()
 else()
   mark_as_advanced( SimpleITK_OPENMP )
@@ -462,6 +467,7 @@
     -DWRAP_TCL:BOOL=${WRAP_TCL}
     -DWRAP_CSHARP:BOOL=${WRAP_CSHARP}
     -DWRAP_R:BOOL=${WRAP_R}
+    -DWRAP_NODE:BOOL=${WRAP_NODE}
     -DBUILD_EXAMPLES:BOOL=${BUILD_TESTING}
   DEPENDS ${${CMAKE_PROJECT_NAME}_DEPENDENCIES}
   ${External_Project_USES_TERMINAL}


update

update

--- VERSION.cmake
+++ VERSION.cmake
@@ -46,5 +46,5 @@

 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "0")
-SET(LIBSATSOLVER_PATCH "19")
+SET(LIBSATSOLVER_PATCH "20")


Fixed install order.

Fixed install order.

The bug was that the fftw/numpy were being placed in the package before
fixup_bundle was being run. That script then attempted to fixup these
numpy/fftw shared libraries too. The fixup_bundle is not designed for
that.

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

 install(CODE "
-     file(INSTALL DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
-          \"${install_location}/Applications/tomviz.app\")
-
-     file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Resources/qt.conf\"
-                \"\")
-
-    # install all python modules/packages for numpy and pyfftw.
-    file(INSTALL DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Python/\"
-         USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
-         \"${install_location}/lib/python2.7/site-packages/\")
+    # Install the app first.
+    file(INSTALL DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
+         \"${install_location}/Applications/tomviz.app\")
+    file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Resources/qt.conf\"
+               \"\")

     # install all python modules/packages from paraview.
     file(INSTALL DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Python/\"
@@ -21,15 +16,22 @@
          \"${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
+    # which don't get copied over by the fixup_bundle.py)
     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/\")

+    # at this point, the installed bundle should have the libraries that need to
+    # be 'fixed' using otool.
     execute_process(
        COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
                \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app\"
                \"${install_location}/lib\"
                \"${install_location}/plugins\")
+
+    # install all python modules/packages for numpy and pyfftw.
+    file(INSTALL DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Python/\"
+         USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
+         \"${install_location}/lib/python2.7/site-packages/\")
    "
    COMPONENT superbuild)


Install Qt5 dlls

Install Qt5 dlls

--- projects/win32/qt.use.system.cmake
+++ projects/win32/qt.use.system.cmake
@@ -6,37 +6,37 @@
 if (NOT PACKAGE_SYSTEM_QT)
   return()
 endif()
-
-# for Windows, we add rules to pacakge system Qt.
-function(__query_qmake VAR RESULT)
-  execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
-    RESULT_VARIABLE return_code
-    OUTPUT_VARIABLE output ERROR_VARIABLE output
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
-  if(NOT return_code)
-    file(TO_CMAKE_PATH "${output}" output)
-    set(${RESULT} ${output} PARENT_SCOPE)
-  endif(NOT return_code)
-endfunction(__query_qmake)
-
-# locate the bin dir and the plugins dir.
-if (EXISTS "${QT_QMAKE_EXECUTABLE}")
-  __query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir)
-  __query_qmake(QT_INSTALL_BINS qt_bin_dir)
-  install(DIRECTORY "${qt_plugins_dir}/"
-          DESTINATION "bin"
-          USE_SOURCE_PERMISSIONS
-          COMPONENT Qt_Runtime
-          # skip debug dlls
-          FILES_MATCHING REGEX "^.*d4.dll$" EXCLUDE
-          PATTERN "*.dll")
-
-  install(DIRECTORY "${qt_bin_dir}/"
-          DESTINATION "bin"
-          USE_SOURCE_PERMISSIONS
-          COMPONENT Qt_Runtime
-
-          # skip debug dlls
-          FILES_MATCHING REGEX "^.*d4.dll$" EXCLUDE
-          PATTERN "*.dll")
-endif()
+set(tomvizQt5Libs
+  Core
+  Gui
+  Help
+  Network
+  Widgets
+  Sql
+  Test
+  UiTools
+  Xml)
+find_package(Qt5 COMPONENTS ${tomvizQt5Libs})
+list(APPEND tomvizQt5Libs QWindowsIntegrationPlugin)
+set(qt5_libs_file_string "set(qt5_libdirs)\n")
+foreach (lib IN LISTS tomvizQt5Libs)
+  set(qt5_libs_file_string
+    "${qt5_libs_file_string}list(APPEND qt5_libdirs $<TARGET_FILE_DIR:Qt5::${lib}>)\n")
+endforeach()
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cpack/qt5_bundle.cmake"
+  CONTENT "${qt5_libs_file_string}")
+install(CODE "
+set(CMAKE_MODULE_PATH \"${CMAKE_CURRENT_BINARY_DIR}/cpack\" \${CMAKE_MODULE_PATH})
+include(qt5_bundle)
+list(REMOVE_DUPLICATES qt5_libdirs)
+foreach(dir IN LISTS qt5_libdirs)
+  file(GLOB qt_libs \"\${dir}/*.dll\")
+  foreach (lib IN LISTS qt_libs)
+    if(NOT lib MATCHES \"d.dll\$\")
+      file(INSTALL \${lib}
+        DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin\"
+        USE_SOURCE_PERMISSIONS)
+    endif()
+  endforeach()
+endforeach()
+")


BUG: Fix location of CMakeOutput.log and CMakeError.log.

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -8,11 +8,11 @@
       OUTPUT_VARIABLE OUTPUT)
     IF(${var}_COMPILED)
       FILE(APPEND
-        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "${description} compiled with the following output:\n${OUTPUT}\n\n")
     ELSE(${var}_COMPILED)
       FILE(APPEND
-        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
     ENDIF(${var}_COMPILED)
     IF(${invert} MATCHES INVERT)


New version: 0.3.11

New version: 0.3.11

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "10")
+SET(HAWKEY_PATCH "11")


PNG improvements.

PNG improvements.

--- VAD_PNG.cmake
+++ VAD_PNG.cmake
@@ -1,19 +1,32 @@
+include(VigraAddDep)
+
 set(GIT_REPO "https://github.com/glennrp/libpng.git")

 function(vad_live)
+  # Clone and add the subdirectory.
   git_clone(PNG)
   add_subdirectory("${VAD_EXTERNAL_ROOT}/PNG" "${VAD_EXTERNAL_ROOT}/PNG/build_external_dep")

   # We are now going to reconstruct the targets/variables provided by the standard FindPNG module,
   add_library(_VAD_PNG_STUB INTERFACE)
-  # TODO shared/static?
+  # Include dirs.
   list(APPEND _PNG_INCLUDE_DIRS "${VAD_EXTERNAL_ROOT}/PNG" "${VAD_EXTERNAL_ROOT}/PNG/build_external_dep")
   set_property(TARGET _VAD_PNG_STUB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_PNG_INCLUDE_DIRS})
+  # By default PNG is build in both static and shared variants. So, we associate to our PNG target
+  # the preferred library type.
   if(VAD_PREFER_STATIC OR VAD_PNG_PREFER_STATIC)
       set_target_properties(_VAD_PNG_STUB PROPERTIES INTERFACE_LINK_LIBRARIES pngstatic)
   else()
       set_target_properties(_VAD_PNG_STUB PROPERTIES INTERFACE_LINK_LIBRARIES png)
   endif()
+  # According to FindPNG.cmake, the only case in which we need special definitions is when compiling
+  # the static library in cygwin.
+  if(CYGWIN)
+    if(VAD_PREFER_STATIC OR VAD_PNG_PREFER_STATIC)
+      set(PNG_DEFINITIONS PNG_STATIC CACHE INTERNAL)
+    endif()
+  endif()
+  set_target_properties(_VAD_PNG_STUB PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${PNG_DEFINITIONS}")
   add_library(PNG::PNG ALIAS _VAD_PNG_STUB)
   set(PNG_FOUND TRUE CACHE INTERNAL "")


now exporting multiple targets

now exporting multiple targets

--- WkBuild.cmake
+++ WkBuild.cmake
@@ -127,7 +127,7 @@

 #
 # Generate a config file for the project.
-#
+# GenConfig( target1 [ target2 [...]] )
 # Automatically called during WkBuild
 #

@@ -136,7 +136,7 @@
 	CMAKE_POLICY(VERSION 2.6)

 	#Exporting targets
-	export(TARGETS ${target_name} FILE ${PROJECT_NAME}Export.cmake)
+	export(TARGETS ${target_name} ${ARGN} FILE ${PROJECT_NAME}Export.cmake)

 	#Generating config file
 	file( WRITE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "### Config file for ${PROJECT_NAME} auto generated by WkCmake ###


[CMake] add PYTHONQT_LIBRARIES_SUFFIX_MAJOR

For Archlinux, where pythonqt lib only has the python major version
number.

--- cmake-module/FindPythonQt.cmake
+++ cmake-module/FindPythonQt.cmake
@@ -28,15 +28,17 @@
 SET(PYTHONQT_LIBRARIES)
 IF(PROJECT_USE_QT4)
   SET(PYTHONQT_LIBRARIES_SUFFIX "-Qt4-Python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+  SET(PYTHONQT_LIBRARIES_SUFFIX_MAJOR "-Qt4-Python${PYTHON_VERSION_MAJOR}")
 ELSE(PROJECT_USE_QT4)
   SET(PYTHONQT_LIBRARIES_SUFFIX "-Qt5-Python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+  SET(PYTHONQT_LIBRARIES_SUFFIX_MAJOR "-Qt5-Python${PYTHON_VERSION_MAJOR}")
 ENDIF(PROJECT_USE_QT4)

 MACRO(_SEARCH_FOR COMPONENT)
   STRING(TOUPPER ${COMPONENT} _COMP_UPPERCASE)
   FIND_LIBRARY(${_COMP_UPPERCASE}_LIBRARY
-    NAMES ${COMPONENT} "${COMPONENT}${PYTHONQT_LIBRARIES_SUFFIX}"
+    NAMES ${COMPONENT} "${COMPONENT}${PYTHONQT_LIBRARIES_SUFFIX}" "${COMPONENT}${PYTHONQT_LIBRARIES_SUFFIX_MAJOR}"
     PATHS "${PYTHONQT_INSTALL_DIR}/lib"
     DOC "The ${COMPONENT} library.")
   IF(NOT ${${_COMP_UPPERCASE}_LIBRARY} STREQUAL "${_COMP_UPPERCASE}_LIBRARY-NOTFOUND")


Investigating eigenvalue bug on cluster

Investigating eigenvalue bug on cluster

Former-commit-id: 1e4e36cca3b8513b2819445ebf45be529e575aad

--- cmake-modules/FindLAPACKE.cmake
+++ cmake-modules/FindLAPACKE.cmake
@@ -34,6 +34,7 @@

     find_path(LAPACKE_INCLUDE_DIRS
             NAMES lapacke.h
+            PATHS
             ${LAPACKE_LAPACK_INCLUDE}
             $ENV{BLAS_DIR}/include
             $ENV{HOME}/.conda/include


Make sure Curl EP configure script is executable. Closes #790.

--- cmake/Modules/FindCurl_EP.cmake
+++ cmake/Modules/FindCurl_EP.cmake
@@ -78,8 +78,15 @@
   set(TILEDB_CURL_LIBS "-ldl -lpthread")
   configure_file(
     "${TILEDB_CMAKE_INPUTS_DIR}/configure-curl.sh.in"
-    "${CMAKE_CURRENT_BINARY_DIR}/configure-curl.sh"
+    "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/configure-curl.sh"
     @ONLY
+  )
+  file(COPY
+    "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/configure-curl.sh"
+    DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
+    FILE_PERMISSIONS
+      OWNER_READ OWNER_WRITE OWNER_EXECUTE
+      GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
   )

   ExternalProject_Add(ep_curl