To avoid getting multiple times dependencies of a dependency propagated into the current project.

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -89,18 +89,13 @@
 #all required target should be defined there... no need to specify all targets in ${PROJECT_NAME}_LIBRARIES, they will be linked automatically
 include(\${SELF_DIR}/${PROJECT_NAME}Export.cmake)
 get_filename_component(${PROJECT_NAME}_INCLUDE_DIR \"\${SELF_DIR}/${WKCMAKE_INCLUDE_DIR}/\" ABSOLUTE)
-if ( NOT ${PROJECT_NAME}_INCLUDE_DIRS )
-	set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIR}\")
-endif ( NOT ${PROJECT_NAME}_INCLUDE_DIRS )
+set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIR}\")
 	")

 	file( APPEND ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "
 #however we still want to have ${PROJECT_NAME}_LIBRARIES available
 set(${PROJECT_NAME}_LIBRARY ${PROJECT_NAME} )
-if ( NOT ${PROJECT_NAME}_LIBRARIES )
-	set(${PROJECT_NAME}_LIBRARIES \"\${${PROJECT_NAME}_LIBRARY}\")
-endif ( NOT ${PROJECT_NAME}_LIBRARIES )
-
+set(${PROJECT_NAME}_LIBRARIES \"\${${PROJECT_NAME}_LIBRARY}\")
 	" )

 	get_target_property(${PROJECT_NAME}_LOCATION ${PROJECT_NAME} LOCATION)


Added update functionality to DownloadModules.cmake script

--- modules/DownloadModules.cmake
+++ modules/DownloadModules.cmake
@@ -24,7 +24,9 @@
 #               modules into (will be created if necessary)
 #      notags = if true: ignore tags, check out HEAD revision of module(s)
 #               (bzr only - svn uses different URLs for tags)
-
+#      overwrite = if true: if module(s) is already in directory,
+#                  then erases first to create a new copy of module(s)
+#
 # Figure out what directory we're running in - ExternalModules.txt is here too
 get_filename_component (cwd ${CMAKE_CURRENT_LIST_FILE} PATH)

@@ -32,8 +34,7 @@
 FIND_PROGRAM(svn svn DOC "subversion command line client")

 # Find BZR
-FIND_PROGRAM(bzr bzr DOC "bazaar command line client")
-
+FIND_PROGRAM(bzr bzr DOC "bazaar command line client" PATH ${BZR_PATH})
 # Check parameters
 if (NOT outdir)
   message (FATAL_ERROR "Please pass -Doutdir.")
@@ -78,10 +79,22 @@
     if ("${_getmod}" EQUAL 1)
       message ("Downloading module '${_modname}'...")
       # We try three times, to account for network weirdnesses
-      foreach (i 1 2 3)
-	# First delete the output directory, in case there's a partial
-	# download from a previous attempt
-	file (REMOVE_RECURSE "${outdir}/${_modname}")
+      foreach (attempt 1 2 3)
+
+  #Initial directory status
+  if (${attempt} EQUAL 1)
+    if (NOT EXISTS "${outdir}/${_modname}" OR overwrite)
+      MESSAGE (STATUS "Creating module..." )
+      set(overwrite TRUE)
+    else (NOT EXISTS "${outdir}/${_modname}" OR overwrite)
+      MESSAGE (STATUS "Updating module..." )
+    endif (NOT EXISTS "${outdir}/${_modname}" OR overwrite)
+  endif (${attempt} EQUAL 1)
+
+  # Deleting the output directory if indicated
+  if (overwrite)
+	  file (REMOVE_RECURSE "${outdir}/${_modname}")
+  endif (overwrite)

 	set (_status)

@@ -90,8 +103,13 @@
             message (FATAL_ERROR
               "Subversion client not found - required for ${_modname} module!")
           endif (NOT svn)
-          execute_process (COMMAND "${svn}" checkout "${_modurl}" "${_modname}"
-            WORKING_DIRECTORY "${outdir}" TIMEOUT 60 RESULT_VARIABLE _status)
+          if (overwrite)
+            execute_process (COMMAND "${svn}" checkout "${_modurl}" "${_modname}"
+              WORKING_DIRECTORY "${outdir}" TIMEOUT 120 RESULT_VARIABLE _status)
+          else (overwrite)
+            execute_process (COMMAND "${svn}" update "${_modurl}" "${_modname}"
+              WORKING_DIRECTORY "${outdir}" TIMEOUT 120 RESULT_VARIABLE _status)
+          endif (overwrite)

 	elseif (${_modvc} STREQUAL "bzr")
           if (NOT bzr)
@@ -103,9 +121,16 @@
           if (_modtag AND NOT notags)
             set (_modtagargs "-r" "${_modtag}")
           endif (_modtag AND NOT notags)
-          execute_process (COMMAND "${bzr}" branch "${_modurl}" "${_modname}"
-            ${_modtagargs} WORKING_DIRECTORY "${outdir}" TIMEOUT 60
-	    RESULT_VARIABLE _status)
+          if (overwrite)
+            execute_process (COMMAND "${bzr}" branch "${_modurl}" "${_modname}"
+              ${_modtagargs} WORKING_DIRECTORY "${outdir}" TIMEOUT 120
+              RESULT_VARIABLE _status)
+          else (overwrite)
+            execute_process (COMMAND "${bzr}" pull
+              ${_modtagargs} WORKING_DIRECTORY "${outdir}/${_modname}" TIMEOUT 120
+              RESULT_VARIABLE _status)
+          endif (overwrite)
+

 	else (${_modvc} STREQUAL "svn")
           message (FATAL_ERROR "Unknown vc-type '${_modvc}' for module "
@@ -117,10 +142,10 @@
 	  # Success
 	  break ()
 	else ("${_status}" EQUAL 0)
-	  message (WARNING "Attempt ${i}: Failed to download '${_modname}' (${_status})")
+	  message (WARNING "Attempt ${attempt}: Failed to download '${_modname}' (${_status})")
 	endif ("${_status}" EQUAL 0)

-      endforeach (i)
+      endforeach (attempt)

       # Ensure we successfully downloaded something good
       if (NOT EXISTS "${outdir}/${_modname}/CMakeLists.txt")


CMake: Ensure that CMakeFiles/Dictionaries/ exist

This is workaround for older CMake not creating target directory
for custom commands.

--- cmake/JPetFramework-Utilities.cmake
+++ cmake/JPetFramework-Utilities.cmake
@@ -41,6 +41,7 @@
     endif()
     if(NOT skip)
       # output dictionary file will be kept in CMake build folder
+      file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Dictionaries)
       set(dictionary
         ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Dictionaries/${name}Dictionary)
       if(EXISTS ${linkdef})


[CMake] Silence unused variable warning in compiler check

This is breaking the compiler check.

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

--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -131,11 +131,11 @@
   if(SANITIZER_CXX_ABI_INTREE)
     # We're using in tree C++ ABI, only test the C compiler for now.
     set(TARGET_${arch}_FILENAME "${TARGET_${arch}_NAME}/CheckTarget.c")
-    file(WRITE "${TARGET_${arch}_FILENAME}" "#include <stdlib.h>\nint main() { void *p = malloc(1); return 0; }\n")
+    file(WRITE "${TARGET_${arch}_FILENAME}" "#include <stdlib.h>\nint main() { (void)malloc(sizeof(int)); return 0; }\n")
   else()
     # We're using the system C++ ABI, test that we can build C++ programs.
     set(TARGET_${arch}_FILENAME "${TARGET_${arch}_NAME}/CheckTarget.cpp")
-    file(WRITE "${TARGET_${arch}_FILENAME}" "#include <new>\nint main() { int *p = new int; return 0; }\n")
+    file(WRITE "${TARGET_${arch}_FILENAME}" "#include <new>\nint main() { (void) new int; return 0; }\n")
   endif()

   set(TARGET_${arch}_CFLAGS ${ARGN})


[CMake] Install C++ ABI headers into the right location

This is a follow-up to r335809 and r337118. While libc++ headers are now
installed into the right location in both standard as well as multiarch
runtimes layout, turned out C++ ABI headers are still installed into the
old location in the latter case. This change addresses that.

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

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@337630 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleLibCXXABI.cmake
+++ cmake/Modules/HandleLibCXXABI.cmake
@@ -32,14 +32,6 @@
   set(LIBCXX_CXX_ABI_LIBRARY ${abilib})
   set(LIBCXX_ABILIB_FILES ${abifiles})

-  # The place in the build tree where we store out-of-source headers.
-  file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}")
-  file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1")
-  foreach(_d ${abidirs})
-    file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}/${_d}")
-    file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/${_d}")
-  endforeach()
-
   foreach(fpath ${LIBCXX_ABILIB_FILES})
     set(found FALSE)
     foreach(incpath ${LIBCXX_CXX_ABI_INCLUDE_PATHS})
@@ -56,7 +48,7 @@
             COMMENT "Copying C++ ABI header ${fpath}...")
         list(APPEND abilib_headers "${dst}")

-        set(dst "${CMAKE_BINARY_DIR}/include/c++/v1/${dstdir}/${fpath}")
+        set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}")
         add_custom_command(OUTPUT ${dst}
             DEPENDS ${src}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
@@ -65,7 +57,7 @@

         if (LIBCXX_INSTALL_HEADERS)
           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
-            DESTINATION ${LIBCXX_INSTALL_PATH}include/c++/v1/${dstdir}
+            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
             COMPONENT cxx-headers
             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
             )


Family 6, Model 47 is Intel Westmere

Family 6, Model 47 is Intel Westmere

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -73,6 +73,8 @@
          # Any recent Intel CPU except NetBurst
          if(_cpu_model EQUAL 58)
             set(TARGET_ARCHITECTURE "ivy-bridge")
+         elseif(_cpu_model EQUAL 47) # Xeon E7 4860
+            set(TARGET_ARCHITECTURE "westmere")
          elseif(_cpu_model EQUAL 46) # Xeon 7500 series
             set(TARGET_ARCHITECTURE "westmere")
          elseif(_cpu_model EQUAL 45) # Xeon TNG


Linux missing dependency

Linux missing dependency

--- cmake/Qt5Qml_ZZZ_HunterPlugin.cmake
+++ cmake/Qt5Qml_ZZZ_HunterPlugin.cmake
@@ -23,7 +23,7 @@
 if(TARGET Qt5::QTcpServerConnection)
   # No Qt5::QTcpServerConnection target in Qt 5.6

-  if(IOS OR APPLE)
+  if(IOS OR APPLE OR UNIX)
     _qt_cmake_extra_helpers_add_interface(Qt5::Qml Qt5::QTcpServerConnection)
   endif()
 endif()


fix(build): use consistent 7-character build abbrev sha

Signed-off-by: Luca Guerra <a05bd890c4868ea1807f8564055d1fba77c6ba81@guerra.sh>

--- cmake/modules/GetFalcoVersion.cmake
+++ cmake/modules/GetFalcoVersion.cmake
@@ -21,7 +21,7 @@
   git_get_exact_tag(FALCO_TAG)
   if(NOT FALCO_TAG)
     # Obtain the closest tag
-    git_describe(FALCO_VERSION "--always" "--tags")
+    git_describe(FALCO_VERSION "--always" "--tags" "--abbrev=7")
     # Fallback version
     if(FALCO_VERSION MATCHES "NOTFOUND$")
       set(FALCO_VERSION "0.0.0")


Correct how extra compiler warnings are used in the maintainer mode

...and address the newly shown warnings as well.

--- cmake/modules/SetupBuildFlags.cmake
+++ cmake/modules/SetupBuildFlags.cmake
@@ -20,22 +20,23 @@
 		-Wredundant-decls
 		-Wundef
 		-Wwrite-strings
+		-Wno-cast-function-type
 		-no-undefined
 		-fno-strict-aliasing
 	)

-	if(_maintainer_mode)
+	if(${_maintainer_mode})
 		list(APPEND proposed_flags
 			-Wall
 			-Wextra
 			-Wdeprecated-declarations
 			-Wmissing-include-dirs
 		)
-	else(_maintainer_mode)
+	else(${_maintainer_mode})
 		list(APPEND proposed_flags
 			-Wno-deprecated-declarations
 			-Wno-missing-include-dir)
-	endif(_maintainer_mode)
+	endif(${_maintainer_mode})

 	list(APPEND proposed_c_flags
 		${proposed_flags}
@@ -62,7 +63,7 @@
 	foreach(flag IN LISTS proposed_c_flags)
 		check_c_compiler_flag(${flag} c_flag_${flag}_supported)
 		if(c_flag_${flag}_supported)
-			set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+			set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
 		endif(c_flag_${flag}_supported)
 		unset(c_flag_${flag}_supported)
 	endforeach()
@@ -71,7 +72,7 @@
 		foreach(flag IN LISTS proposed_cxx_flags)
 			check_cxx_compiler_flag(${flag} cxx_flag_${flag}_supported)
 			if(cxx_flag_${flag}_supported)
-				set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+				set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}")
 			endif(cxx_flag_${flag}_supported)
 			unset(cxx_flag_${flag}_supported)
 		endforeach()


Build System: Don't track dependencies.lock

--- tools/cmake/component.cmake
+++ tools/cmake/component.cmake
@@ -434,9 +434,8 @@
     __component_check_target()
     __component_add_sources(sources)

-    # Add component manifest and lock files to list of dependencies
+    # Add component manifest to the list of dependencies
     set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${COMPONENT_DIR}/idf_component.yml")
-    set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${COMPONENT_DIR}/dependencies.lock")

     # Create the final target for the component. This target is the target that is
     # visible outside the build system.


Clean up iOS build script

Clean up iOS build script

Also, make device and simulator libs a dependency of framework script.

Change-Id: I9ec0e8f685d836b6d99c4f8689d14bc0a8842ecc

--- CMake/vtkiOS.cmake
+++ CMake/vtkiOS.cmake
@@ -88,14 +88,14 @@

 macro(crosscompile target toolchain_file archs)
   ExternalProject_Add(
-    vtk-${target}
+    ${target}
     SOURCE_DIR ${CMAKE_SOURCE_DIR}
-    PREFIX ${PREFIX_DIR}/vtk-${target}
-    BINARY_DIR ${BUILD_DIR}/vtk-${target}
-    INSTALL_DIR ${INSTALL_DIR}/vtk-${target}
+    PREFIX ${PREFIX_DIR}/${target}
+    BINARY_DIR ${BUILD_DIR}/${target}
+    INSTALL_DIR ${INSTALL_DIR}/${target}
     DEPENDS vtk-compile-tools
     CMAKE_ARGS
-      -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/vtk-${target}
+      -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target}
       -DCMAKE_CROSSCOMPILING:BOOL=ON
       #-DCMAKE_OSX_ARCHITECTURES:STRING=${archs}
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -104,11 +104,11 @@
       ${ios_cmake_flags}
   )
 endmacro()
-crosscompile(ios-simulator
+crosscompile(vtk-ios-simulator
   ios.simulator.toolchain.cmake
   "${IOS_SIMULATOR_ARCHITECTURES}"
  )
-crosscompile(ios-device
+crosscompile(vtk-ios-device
   ios.device.toolchain.cmake
   "${IOS_DEVICE_ARCHITECTURES}"
 )
@@ -123,5 +123,6 @@
 configure_file(CMake/MakeFramework.cmake.in
                ${CMAKE_CURRENT_BINARY_DIR}/CMake/MakeFramework.cmake
                @ONLY)
-add_custom_target(vtk-framework ALL COMMAND ${CMAKE_COMMAND} -P
-                  ${CMAKE_CURRENT_BINARY_DIR}/CMake/MakeFramework.cmake)
+add_custom_target(vtk-framework ALL
+  COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/CMake/MakeFramework.cmake
+  DEPENDS vtk-ios-device vtk-ios-simulator)


include built headers dir

include built headers dir

--- ext_build/boz-build.cmake
+++ ext_build/boz-build.cmake
@@ -2,6 +2,8 @@
 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DEFAULT_INSTALL_DIR}/lib)
 #     set(LINK_FLAGS -Xlinker -rpath-link -Xlinker ${DEFAULT_INSTALL_DIR}/lib )
 set (EXECUTABLE_OUTPUT_PATH ${DEFAULT_INSTALL_DIR}/bin)
+
+include_directories (${DEFAULT_INSTALL_DIR}/include)
 link_directories (${CMAKE_LIBRARY_OUTPUT_DIRECTORY})

 set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)


fix swig path

fix swig path

--- external/nupic_core.cmake
+++ external/nupic_core.cmake
@@ -117,7 +117,7 @@
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(SWIG_DIR "${NUPIC_CORE_INSTALL_DIR}/share/swig/Lib")
 else()
-    set(SWIG_DIR "${NUPIC_CORE_INSTALL_DIR}/share/swig/3.0.12")
+    set(SWIG_DIR "${NUPIC_CORE_INSTALL_DIR}/share/swig/3.0.2")
 endif()
 add_custom_target(Swig
     COMMENT "Using Swig installation from nupic.core dependency"


Add transient dependencies to FindMonsteer

--- FindMonsteer.cmake
+++ FindMonsteer.cmake
@@ -71,7 +71,8 @@
 include(FindLibraryPackage)
 include(FindPackageHandleStandardArgs)

-find_library_package(Monsteer INCLUDE monsteer)
+find_library_package(Monsteer INCLUDE monsteer TRANSIENT Collage DASH
+                                                         CODASH Lunchbox)
 find_package_handle_standard_args(Monsteer DEFAULT_MSG
                                   MONSTEER_LIBRARIES MONSTEER_INCLUDE_DIRS)
 if(MONSTEER_FOUND)


Fix bogus warning for VC++ 2010

Fix bogus warning for VC++ 2010

--- test/MakeTestTarget.cmake
+++ test/MakeTestTarget.cmake
@@ -204,6 +204,9 @@
     if( MSVC )
         list( APPEND localOptions "/WX" "/W4" )
         list( APPEND localDefinitions "_SCL_SECURE_NO_WARNINGS" )
+        if( CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0 ) # VC++ 2010 and earlier
+            list( APPEND localOptions "/wd4275" ) # suppress C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
+        endif()
     elseif( CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang" )
         list( APPEND localOptions
             "-Werror"


add zlib1.dll to Windows package

add zlib1.dll to Windows package

--- Toolchain-mingw32.cmake
+++ Toolchain-mingw32.cmake
@@ -25,6 +25,7 @@
 # libogg-0.dll
 # libvorbis-0.dll
 # libvorbisfile-3.dll
+# zlib1.dll
 # SDL2.dll
 # SDL2_image.dll
 # SDL2_ttf.dll


*** empty log message ***

*** empty log message ***

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@437 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/FindBoost.cmake
+++ library/FindBoost.cmake
@@ -1,91 +1,85 @@
-SET(BOOST_INCLUDE_SEARCH_PATH /usr/include /usr/local/include /sw/include ${CMAKE_SOURCE_DIR}/../ThirdParty/include )
-
-IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
-    SET(BOOST_INCLUDE_SEARCH_PATH ${BOOST_INCLUDE_SEARCH_PATH}
-    "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include"
-    c:\\Boost\\include )
-ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
-
-IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" )
-    SET(BOOST_INCLUDE_SEARCH_PATH ${BOOST_INCLUDE_SEARCH_PATH}
-        "C:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\include"
-        "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include"
-        c:\\Boost\\include)
-ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" )
-
-FIND_PATH(BOOST_BASE_DIR boost/weak_ptr.hpp ${BOOST_INCLUDE_SEARCH_PATH} )
-SET(BOOST_INCLUDE_DIR ${BOOST_BASE_DIR})
-
-SET(BoostFileSystemName "")
-SET(BoostFileSystemDebugName "")
-
-IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
-    SET(BoostFileSystemName "libboost_filesystem-vc71-mt")
-    SET(BoostFileSystemDebugName "libboost_filesystem-vc71-mt-gd")
-    SET(BoostThreadName "boost_thread-vc71-mt")
-    SET(BoostThreadDebugName "boost_thread-vc71-mt-gd")
-ELSEIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" )
-    SET(BoostFileSystemName "libboost_filesystem-vc80-mt")
-    SET(BoostFileSystemDebugName "libboost_filesystem-vc80-mt-gd")
-    SET(BoostThreadName "boost_thread-vc80-mt")
-    SET(BoostThreadDebugName "boost_thread-vc80-mt-gd")
-ELSE( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
-    IF( ${CMAKE_COMPILER_IS_GNUCXX} )
-        SET(BoostFileSystemName boost_filesystem-gcc boost_filesystem )
-        SET(BoostFileSystemDebugName boost_filesystem-gcc-d boost_filesystem-d )
-#        SET(BoostThreadName boost_thread-gcc-mt boost_thread-gcc boost_thread-mt boost_thread  )
-#        SET(BoostThreadDebugName boost_thread-gcc-mt-d  boost_thread-mt-d boost_thread-d )
-        SET(BoostThreadName boost_thread-gcc boost_thread  )
-        SET(BoostThreadDebugName  boost_thread-d )
-    ENDIF( ${CMAKE_COMPILER_IS_GNUCXX} )
-ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
-
-FIND_LIBRARY( BOOST_FILESYSTEM_LIB NAMES ${BoostFileSystemName}
-          PATHS
-          ${BOOST_BASE_DIR}/lib
-	    ${BOOST_BASE_DIR}/../lib
-          /usr/local/lib
-          /usr/lib
-          C:\\Boost\\lib )
-
-FIND_LIBRARY( BOOST_FILESYSTEM_DEBUG_LIB NAMES ${BoostFileSystemDebugName}
-          PATHS
-          ${BOOST_BASE_DIR}/lib
-          ${BOOST_BASE_DIR}/../lib
-          /usr/local/lib
-          /usr/lib
-          C:\\Boost\\lib )
-
-FIND_LIBRARY( BOOST_THREAD_LIB NAMES ${BoostThreadName}
-          PATHS
-          ${BOOST_BASE_DIR}/lib
-	    ${BOOST_BASE_DIR}/../lib
-          /usr/local/lib
-          /usr/lib
-          C:\\Boost\\lib )
-
-FIND_LIBRARY( BOOST_THREAD_DEBUG_LIB NAMES ${BoostThreadDebugName}
-          PATHS
-          ${BOOST_BASE_DIR}/lib
-          ${BOOST_BASE_DIR}/../lib
-          /usr/local/lib
-          /usr/lib
-          C:\\Boost\\lib )
-
-IF (BOOST_INCLUDE_DIR)
-  SET(BOOST_FOUND TRUE)
-ENDIF (BOOST_INCLUDE_DIR)
-
-#SET (BOOST_LIB_DIR ${BOOST_BASE_DIR}/lib )
-GET_FILENAME_COMPONENT(BOOST_LIB_DIR ${BOOST_THREAD_LIB} PATH CACHE)
-LINK_DIRECTORIES(${BOOST_LIB_DIR})
-
-IF (BOOST_FOUND)
-  IF (NOT Boost_FIND_QUIETLY)
-     MESSAGE(STATUS "Found Boost: ${BOOST_INCLUDE_DIR}")
-  ENDIF (NOT Boost_FIND_QUIETLY)
-ELSE(BOOST_FOUND)
-  IF (Boost_FIND_REQUIRED)
-     MESSAGE(FATAL_ERROR "Could not find Boost")
-  ENDIF (Boost_FIND_REQUIRED)
-ENDIF (BOOST_FOUND)
+SET(BOOST_INCLUDE_SEARCH_PATH /usr/include /usr/local/include /sw/include ${CMAKE_SOURCE_DIR}/../ThirdParty/include )
+
+IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
+    SET(BOOST_INCLUDE_SEARCH_PATH ${BOOST_INCLUDE_SEARCH_PATH}
+    "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include"
+    c:\\Boost\\include )
+ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
+
+IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" )
+    SET(BOOST_INCLUDE_SEARCH_PATH ${BOOST_INCLUDE_SEARCH_PATH}
+        "C:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\include"
+        "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include"
+        c:\\Boost\\include)
+ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" )
+
+FIND_PATH(BOOST_BASE_DIR boost/weak_ptr.hpp ${BOOST_INCLUDE_SEARCH_PATH} )
+SET(BOOST_INCLUDE_DIR ${BOOST_BASE_DIR})
+
+SET(BoostFileSystemName "")
+SET(BoostFileSystemDebugName "")
+
+SET(BoostFileSystemName "libboost_filesystem-vc71-mt" "libboost_filesystem-vc80-mt"
+ 				boost_filesystem-gcc boost_filesystem)
+
+SET(BoostFileSystemDebugName "libboost_filesystem-vc71-mt-gd" "libboost_filesystem-vc80-mt-gd"
+					boost_filesystem-gcc-d
+					boost_filesystem-d
+					${BoostFileSystemName} )
+
+SET(BoostThreadName "boost_thread-vc71-mt" "boost_thread-vc80-mt"
+			boost_thread-gcc-mt boost_thread-gcc boost_thread-mt boost_thread)
+
+SET(BoostThreadDebugName "boost_thread-vc71-mt-gd" "boost_thread-vc80-mt-gd"
+				boost_thread-gcc-mt-d  boost_thread-mt-d
+				boost_thread-d ${BoostThreadName} )
+
+FIND_LIBRARY( BOOST_FILESYSTEM_LIB NAMES ${BoostFileSystemName}
+          PATHS
+          ${BOOST_BASE_DIR}/lib
+	    ${BOOST_BASE_DIR}/../lib
+          /usr/local/lib
+          /usr/lib
+          C:\\Boost\\lib )
+MESSAGE(${BOOST_FILESYSTEM_LIB})
+FIND_LIBRARY( BOOST_FILESYSTEM_DEBUG_LIB NAMES ${BoostFileSystemDebugName}
+          PATHS
+          ${BOOST_BASE_DIR}/lib
+          ${BOOST_BASE_DIR}/../lib
+          /usr/local/lib
+          /usr/lib
+          C:\\Boost\\lib )
+
+FIND_LIBRARY( BOOST_THREAD_LIB NAMES ${BoostThreadName}
+          PATHS
+          ${BOOST_BASE_DIR}/lib
+	    ${BOOST_BASE_DIR}/../lib
+          /usr/local/lib
+          /usr/lib
+          C:\\Boost\\lib )
+
+FIND_LIBRARY( BOOST_THREAD_DEBUG_LIB NAMES ${BoostThreadDebugName}
+          PATHS
+          ${BOOST_BASE_DIR}/lib
+          ${BOOST_BASE_DIR}/../lib
+          /usr/local/lib
+          /usr/lib
+          C:\\Boost\\lib )
+
+IF (BOOST_INCLUDE_DIR)
+  SET(BOOST_FOUND TRUE)
+ENDIF (BOOST_INCLUDE_DIR)
+
+#SET (BOOST_LIB_DIR ${BOOST_BASE_DIR}/lib )
+GET_FILENAME_COMPONENT(BOOST_LIB_DIR ${BOOST_THREAD_LIB} PATH CACHE)
+LINK_DIRECTORIES(${BOOST_LIB_DIR})
+
+IF (BOOST_FOUND)
+  IF (NOT Boost_FIND_QUIETLY)
+     MESSAGE(STATUS "Found Boost: ${BOOST_INCLUDE_DIR}")
+  ENDIF (NOT Boost_FIND_QUIETLY)
+ELSE(BOOST_FOUND)
+  IF (Boost_FIND_REQUIRED)
+     MESSAGE(FATAL_ERROR "Could not find Boost")
+  ENDIF (Boost_FIND_REQUIRED)
+ENDIF (BOOST_FOUND)


Fixed prop bug.

Fixed prop bug.

--- CPM.cmake
+++ CPM.cmake
@@ -406,6 +406,7 @@
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
     foreach(_cpm_kvName IN LISTS CPM_KV_LIST_MOD_VERSION_MAP)
       set(CPM_KV_MOD_VERSION_MAP_${_cpm_kvName} ${CPM_KV_MOD_VERSION_MAP_${_cpm_kvName}} PARENT_SCOPE)
+      message("Propogating Version: CPM_KV_MOD_VERSION_MAP_${_cpm_kvName}: ${CPM_KV_MOD_VERSION_MAP_${_cpm_kvName}}")
     endforeach()
     set(_cpm_kvName) # Clear kvName

@@ -422,8 +423,8 @@
   message("PROPOGATING")
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
     foreach(_cpm_kvName IN LISTS CPM_KV_LIST_SOURCE_ADDED_MAP)
-      set(CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName} ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}} PARENT_SCOPE)
-      message("Propogating: CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}: ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}}")
+      set(${_cpm_kvName} ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}} PARENT_SCOPE)
+      message("Propogating: ${_cpm_kvName}: ${${_cpm_kvName}}")
     endforeach()
     set(_cpm_kvName) # Clear kvName


Bugfix

Bugfix

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26606 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -27,7 +27,7 @@
   SET(DEAL_II_EXAMPLES_RELDIR "examples")
   SET(DEAL_II_INCLUDE_RELDIR "include")
   SET(DEAL_II_LIBRARY_RELDIR "lib")
-  SET(DEAL_II_PROJECT_CONFIG_RELDIR "lib/cmake")
+  SET(DEAL_II_PROJECT_CONFIG_RELDIR "")

 ELSE()
   #
@@ -38,7 +38,7 @@
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "share/doc/deal.II/examples")
   SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
   SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}")
-  SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake")
+  SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/deal.II")
 ENDIF()

 SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")


VS2008 support: has a subdir named x64 instead of amd64

SVN-Revision: 548

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -157,7 +157,8 @@
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(CTEST_PROJECT_NAME "DynamoRIO")
 find_program(MAKE_COMMAND make DOC "make command")
-set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j5")
+# XXX: with -j5 I see weird build failures on VS2008, but can't repro w/ VERBOSE=1.
+set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j4")
 set(CTEST_COMMAND "${CTEST_EXECUTABLE_NAME}")

 if (UNIX)
@@ -249,6 +250,10 @@
         set(ENV{PATH} "${newpath}")
         string(REGEX REPLACE "([/\\\\])([Ll][Ii][Bb])" "\\1\\2\\1amd64"
           newlib "$ENV{LIB}")
+        # VS2008's SDKs/Windows/v6.0A uses "x64" instead of "amd64": grrr
+        string(REGEX REPLACE "(6.0A[/\\\\][Ll][Ii][Bb][/\\\\])[Aa][Mm][Dd]64"
+          "\\1x64"
+          newlib "${newlib}")
         set(ENV{LIB} "${newlib}")
         string(REGEX REPLACE "([/\\\\])([Ll][Ii][Bb])" "\\1\\2\\1amd64"
           newlibpath "$ENV{LIBPATH}")
@@ -261,6 +266,8 @@
         set(ENV{PATH} "${newpath}")
         string(REGEX REPLACE "([Ll][Ii][Bb])[/\\\\][Aa][Mm][Dd]64" "\\1"
           newlib "$ENV{LIB}")
+        string(REGEX REPLACE "([Ll][Ii][Bb])[/\\\\][Xx]64" "\\1"
+          newlib "${newlib}")
         set(ENV{LIB} "${newlib}")
         string(REGEX REPLACE "([Ll][Ii][Bb])[/\\\\][Aa][Mm][Dd]64" "\\1"
           newlibpath "$ENV{LIBPATH}")


Updated master version to 2012.12.99

Updated master version to 2012.12.99

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -6,7 +6,7 @@

 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2012")
-set(MITK_VERSION_MINOR "09")
+set(MITK_VERSION_MINOR "12")
 set(MITK_VERSION_PATCH "99")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")


Update CTestCustom to show more error contexts

--- CMakeModules/CTestCustom.cmake
+++ CMakeModules/CTestCustom.cmake
@@ -5,8 +5,11 @@
 # The complete license agreement can be obtained at:
 # http://arrayfire.com/licenses/BSD-3-Clause

-set(CTEST_CUSTOM_ERROR_POST_CONTEXT 50)
-set(CTEST_CUSTOM_ERROR_PRE_CONTEXT 50)
+set(CTEST_CUSTOM_ERROR_POST_CONTEXT 200)
+set(CTEST_CUSTOM_ERROR_PRE_CONTEXT 200)
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 300)
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
+
 if(WIN32)
   if(CMAKE_GENERATOR MATCHES "Ninja")
     set(CTEST_CUSTOM_POST_TEST ./bin/print_info.exe)


FindGROMACS.cmake: tweaks for BUILD_GROMACS option

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -42,7 +42,7 @@
 pkg_check_modules(PC_GROMACS libgromacs)

 find_library(GROMACS_LIBRARY NAMES gromacs_d gromacs HINTS ${PC_GROMACS_D_LIBRARY_DIRS} ${PC_GROMACS_LIBRARY_DIRS})
-if (GROMACS_LIBRARY)
+if (GROMACS_LIBRARY AND NOT GROMACS_LIBRARY STREQUAL "gromacs")
   include(CheckCXXLibraryExists)
   check_cxx_library_exists("${GROMACS_LIBRARY}" gmx_version "" FOUND_GROMACS_VERSION_CXX)
   if(NOT FOUND_GROMACS_VERSION_CXX)
@@ -57,10 +57,11 @@
   elseif(NOT FOUND_GMX_IS_SINGLE_PRECISION)
     message(FATAL_ERROR "Could not find a suitable gromacs library. Neither gmx_is_single_precision nor gmx_is_double_precision is defined in the gromacs library, that is very very strange, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. This most likely means that your gromacs version is too old, we need at least gromacs 2016!")
   endif()
-endif (GROMACS_LIBRARY)
+endif()

 find_path(GROMACS_INCLUDE_DIR gromacs/version.h HINTS ${PC_GROMACS_D_INCLUDE_DIRS} ${PC_GROMACS_INCLUDE_DIRS})
-if(GROMACS_INCLUDE_DIR AND EXISTS ${GROMACS_INCLUDE_DIR}/gromacs/version.h)
+if(GROMACS_VERSION)
+elseif(GROMACS_INCLUDE_DIR AND EXISTS ${GROMACS_INCLUDE_DIR}/gromacs/version.h)
   _GROMACS_GET_VERSION(GROMACS_VERSION ${GROMACS_INCLUDE_DIR}/gromacs/version.h)
 else()
   set(GROMACS_VERSION 0)


Updating forge tag to fix build issuess with ninja

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -16,7 +16,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG af3.0.1
+    GIT_TAG d58557f130548980af32fc562830c119f9bf71ef
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


ENH: Filters/FlowPaths should be in StandAlone

Filters/Flowpaths should be in the StandAlone group. There are no
external packages required.

Change-Id: I2893c0ed5e5cd7467c2a9cad2b611329e60a9b90

--- Filters/FlowPaths/module.cmake
+++ Filters/FlowPaths/module.cmake
@@ -1,4 +1,6 @@
 vtk_module(vtkFiltersFlowPaths
+  GROUPS
+    StandAlone
   DEPENDS
     vtkCommonExecutionModel
     vtkFiltersAMR


BUG: Fix bug for remote AdaptiveDenoising

The AdaptiveDenoising project had a bug when processing images with small floating point
values (i.e. images with range of 0-1).

--- Modules/Remote/AdaptiveDenoising.remote.cmake
+++ Modules/Remote/AdaptiveDenoising.remote.cmake
@@ -56,5 +56,5 @@
   "
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/ntustison/ITKAdaptiveDenoising.git
-  GIT_TAG a31fc7dbed78260abb3832b908fd2b6a52cf189e
+  GIT_TAG 674218fae611184d4168bd0c7b027f1a0d1a8a18
 )


Don't link declarative plugins against KDE libs. It is not needed and somehow breaks plugin loading in qmlviewer.

svn path=/trunk/KDE/kdeedu/marble/; revision=1213214

--- MarbleMacros.cmake
+++ MarbleMacros.cmake
@@ -87,10 +87,9 @@

 macro( marble_add_declarative_plugin _target_name )
 set( _src ${ARGN} )
-if( QTONLY )
-    qt4_automoc( ${_src} )
-    add_library( ${_target_name} MODULE ${_src} )
-    target_link_libraries( ${_target_name} ${QT_QTCORE_LIBRARY}
+qt4_automoc( ${_src} )
+add_library( ${_target_name} MODULE ${_src} )
+target_link_libraries( ${_target_name} ${QT_QTCORE_LIBRARY}
                                            ${QT_QTDBUS_LIBRARY}
                                            ${QT_QTGUI_LIBRARY}
                                            ${QT_QTXML_LIBRARY}
@@ -99,23 +98,7 @@
                                            ${QT_QTMAIN_LIBRARY}
                                            ${${_target_name}_LIBS}
                                            marblewidget )
-    install( TARGETS ${_target_name} DESTINATION ${MARBLE_PLUGIN_INSTALL_PATH}/org/kde/edu/marble )
-else( QTONLY )
-    kde4_add_plugin( ${_target_name} ${_src} )
-    target_link_libraries( ${_target_name} ${QT_QTCORE_LIBRARY}
-                                           ${QT_QTDBUS_LIBRARY}
-                                           ${QT_QTGUI_LIBRARY}
-                                           ${QT_QTXML_LIBRARY}
-                                           ${QT_QTSVG_LIBRARY}
-                                           ${QT_QTNETWORK_LIBRARY}
-                                           ${KDE4_KDECORE_LIBRARY}
-                                           ${KDE4_KDEUI_LIBRARY}
-                                           ${KDE4_KIO_LIBRARY}
-                                           ${QT_QTMAIN_LIBRARY}
-                                           ${${_target_name}_LIBS}
-                                           marblewidget )
-    install( TARGETS ${_target_name} DESTINATION ${MARBLE_PLUGIN_INSTALL_PATH}/org/kde/edu/marble )
-endif( QTONLY )
+install( TARGETS ${_target_name} DESTINATION ${MARBLE_PLUGIN_INSTALL_PATH}/org/kde/edu/marble )

 set_target_properties( ${_target_name} PROPERTIES
                        INSTALL_RPATH_USE_LINK_PATH TRUE


Clean up Urho3D-CMake-magic cmake module.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -241,10 +241,10 @@
         set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG -D_DEBUG")
         set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -D_DEBUG")
     endif ()
-    if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_GENERATOR STREQUAL "Ninja")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
-    endif()
+    if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_GENERATOR STREQUAL Ninja)
+      set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
+      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
+    endif ()
 endif ()

 # Include CMake builtin module for building shared library support


Removes old AMD GPU target to fix HCC issue with time test.

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -962,7 +962,7 @@
     ENDIF()
     IF(HIP_PLATFORM MATCHES "hcc")
         # GFX600, GFX601, GFX700, GFX701, GFX702, GFX703, GFX704, GFX801, GFX802, GFX803, GFX810, GFX900, GFX902
-        SET(_ALPAKA_LINK_LIBRARIES_PUBLIC "${_ALPAKA_LINK_LIBRARIES_PUBLIC}" "--amdgpu-target=gfx701 --amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906")
+        SET(_ALPAKA_LINK_LIBRARIES_PUBLIC "${_ALPAKA_LINK_LIBRARIES_PUBLIC}" "--amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906")
     ENDIF()
 ENDIF()


Added a macro for source listing

Added a macro for source listing

--- build/macros.cmake
+++ build/macros.cmake
@@ -336,6 +336,17 @@
 	replace_or_append_all_flag_compilers("/arch:[AVX|SSE][0-9]" "-m[avx|sse][0-9]" "/arch:AVX2" "-mavx2")
 endmacro()

+macro(set_source_listing)
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_all_flag("/FA[c|s|u]" "/FAs")
+	elseif(COMPILER MATCHES "gcc")
+		message(FATAL_ERROR "TODO:  Implement source listing for GCC")
+	else()
+		message(FATAL_ERROR "Compiler not recognized: ${COMPILER}")
+	endif()
+endmacro()
+
 #MSVC exception logic
 set(EH_STRINGS "EH{a|s}{c|r}?\-?")
 macro(enable_structured_exceptions)


Fixed flaoting poitn flags on gcc

Fixed flaoting poitn flags on gcc

--- build/macros.cmake
+++ build/macros.cmake
@@ -381,9 +381,9 @@
 macro(enable_fast_floating_point _enable)
 	get_compiler_name(COMPILER)
 	if(${_enable})
-		replace_or_append_all_flag_compilers("/fp:[fast|precise]" "-ffast-math" "/fp:fast" "-ffast-math")
-	else()
-		replace_or_append_all_flag_compilers("/fp:[fast|precise]" "-ffast-math" "/fp:precise" "")
+		replace_or_append_all_flag_compilers("/fp:[fast|precise]" "-f[fast|rounding]-math" "/fp:fast" "-ffast-math")
+	else()
+		replace_or_append_all_flag_compilers("/fp:[fast|precise]" "-f[fast|rounding]-math" "/fp:precise" "-frounding-math")
 	endif()
 endmacro()


COMP: switching the use of CUDA of for now.   ITK4 has a problem with it: the nvcc command line is too long, even if i try to build elastix against an installed version of ITK4 (which was a recommended workaround). Currently, this means that ITK4 cannot be used with CUDA, so effectively elastix' CUDA functionality is not functional.

--- src/Testing/Dashboard/elxDashboard_LKEB_win7-64_VS2008.cmake
+++ src/Testing/Dashboard/elxDashboard_LKEB_win7-64_VS2008.cmake
@@ -35,6 +35,10 @@
   SET( dashboard_model Continuous )
 ENDIF()

+# Note:
+# ITK4 can currently not be used in combination with CUDA
+# The commandline for nvcc is too long
+# A bug is outstanding: http://www.itk.org/Bug/view.php?id=12198
 SET( dashboard_cache "
 // Which ITK to use:
 ITK_DIR:PATH=D:/toolkits/ITK/4.0.0/binVS2008
@@ -42,7 +46,7 @@
 // Some elastix settings, defining the configuration:
 ELASTIX_BUILD_TESTING:BOOL=ON
 ELASTIX_ENABLE_PACKAGER:BOOL=ON
-ELASTIX_USE_CUDA:BOOL=ON
+//ELASTIX_USE_CUDA:BOOL=ON
 ELASTIX_USE_MEVISDICOMTIFF:BOOL=OFF
 ELASTIX_IMAGE_DIMENSION:STRING=2;3;4
 ELASTIX_IMAGE_2D_PIXELTYPES:STRING=float


add_javascript_style_test: Ensure .jshintignore is considered for plugins

By setting the working directory to match input directory, this commit
allows .jshintignore located in the input directory to automatically be
found and used.

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -31,6 +31,7 @@
   endif()
   add_test(
     NAME "jshint_${name}"
+    WORKING_DIRECTORY ${input}
     COMMAND "${JSHINT_EXECUTABLE}" --config "${PROJECT_SOURCE_DIR}/tests/jshint.cfg" "${input}"
   )
   add_test(


FindANTLR: Fix version RegEx

FindANTLR: Fix version RegEx

The currently used RegEx only allowed for single-digit version components for
everything but the major version. Thus, when parsing e.g. the version 4.10.1,
only the part 4.1 would be matched and thus, the determined ANTLR version
would be wrong.

Signed-off-by: Robert Adam <34c6fceca75e456f25e7e99531e2425c6c1de443@robert-adam.de>

--- runtime/Cpp/cmake/FindANTLR.cmake
+++ runtime/Cpp/cmake/FindANTLR.cmake
@@ -14,7 +14,7 @@
       OUTPUT_STRIP_TRAILING_WHITESPACE)

   if(ANTLR_COMMAND_RESULT EQUAL 0)
-    string(REGEX MATCH "Version [0-9]+(\\.[0-9])*" ANTLR_VERSION ${ANTLR_COMMAND_OUTPUT})
+    string(REGEX MATCH "Version [0-9]+(\\.[0-9]+)*" ANTLR_VERSION ${ANTLR_COMMAND_OUTPUT})
     string(REPLACE "Version " "" ANTLR_VERSION ${ANTLR_VERSION})
   else()
     message(


OSX Installer: Get Forge version information from the tag in build_forge.cmake

This is because in the older version, forge version was being computed
from the forge library which is unavailable at CMake time and hence the
variable is empty.

Neither is it possible to fetch the Forge version from forge version
files as the clone happens at build time rather than at CMake time.

Happy to listen to any ideas about how to fix this better.

--- CMakeModules/osx_install/OSXInstaller.cmake
+++ CMakeModules/osx_install/OSXInstaller.cmake
@@ -93,11 +93,7 @@
 IF(BUILD_GRAPHICS)
     MAKE_DIRECTORY("${OSX_TEMP}/Forge")

-    # Forge Library
-    FILE(GLOB FORGE_LIB "${CMAKE_INSTALL_PREFIX}/${AF_INSTALL_LIB_DIR}/libforge.*.*.*.dylib")
-
-    GET_FILENAME_COMPONENT(LIBFORGE_NAME ${FORGE_LIB} NAME_WE) # Will return libforge
-    STRING(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" FORGE_VERSION ${FORGE_LIB}) # Will return x.y.z
+    # Forge library versions for setting up symlinks
     STRING(SUBSTRING ${FORGE_VERSION} 0 1 FORGE_VERSION_MAJOR) # Will return x

     ADD_CUSTOM_TARGET(OSX_INSTALL_SETUP_FORGE_LIB)


cmake: workaround a bug in OpenSuse's libgsl

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -25,16 +25,24 @@
 pkg_check_modules(PC_GSL gsl)
 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})
 find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )
+find_library(GSL_LIBRARY NAMES HINTS ${PC_GSL_LIBRARY_DIRS} )

 #added gsl depends
-if (NOT BUILD_SHARED_LIBS)
+#BUG in OpenSuse (missing libgslcblas.so link libgsl.so)
+#if (NOT BUILD_SHARED_LIBS)
   list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
   foreach (LIB ${PC_GSL_LIBRARIES})
     find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
     list(APPEND GSL_LIBRARY ${GSL_${LIB}})
     unset(GSL_${LIB} CACHE)
   endforeach(LIB)
-endif (NOT BUILD_SHARED_LIBS)
+#endif (NOT BUILD_SHARED_LIBS)
+
+include(CheckLibraryExists)
+check_library_exists("${GSL_LIBRARY}" gsl_linalg_QR_decomp "" FOUND_QR_DECOMP)
+if(NOT FOUND_QR_DECOMP)
+  message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GSL_LIBRARY by hand and include 'libgslcblas' in there!")
+endif(NOT FOUND_QR_DECOMP)

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE


fixed cmake linker errors appearing on cmake 3.4.1, need to verify compatibility with earlier versions

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -106,7 +106,7 @@
     ZeroMQ
 	AZMQ
 	FlatBuffers
-	Boost{program_options,filesystem,unit_test_framework,system}
+	Boost{program_options,filesystem,unit_test_framework,system,log}
 	Eigen3
     #<dependency>
   OPTIONAL_DEPENDS


COMP: change name of target to match convention

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -64,8 +64,8 @@
 endforeach()

 # Make target for generated code
-add_custom_target(generate_filter_source_code ALL DEPENDS ${SimpleITKBasicFiltersSource})
-add_dependencies(Documentation generate_filter_source_code)
+add_custom_target(FilterSourceCode ALL DEPENDS ${SimpleITKBasicFiltersSource})
+add_dependencies(Documentation FilterSourceCode)

 # clear the include files
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "" )


use DIRECTORY instead of PATH with get_filename_component

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -802,7 +802,7 @@
 		set (_frameWorkDirs "")
 		foreach (_include ${ARGN})
 			if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$")
-				get_filename_component(_frameWorkDir "${_include}" PATH)
+				get_filename_component(_frameWorkDir "${_include}" DIRECTORY)
 				list (APPEND _frameWorkDirs "${_frameWorkDir}")
 			endif()
 		endforeach()
@@ -1508,7 +1508,7 @@
 			# -Kc++ process all source or unrecognized file types as C++ source files
 			# -fsyntax-only check only for correct syntax
 			# -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)
-			get_filename_component(_pchDir "${_pchFile}" PATH)
+			get_filename_component(_pchDir "${_pchFile}" DIRECTORY)
 			get_filename_component(_pchName "${_pchFile}" NAME)
 			set (_xLanguage_C "c-header")
 			set (_xLanguage_CXX "c++-header")
@@ -1634,7 +1634,7 @@
 			# -include process include file as the first line of the primary source file
 			# -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)
 			if (_pchFile)
-				get_filename_component(_pchDir "${_pchFile}" PATH)
+				get_filename_component(_pchDir "${_pchFile}" DIRECTORY)
 				get_filename_component(_pchName "${_pchFile}" NAME)
 				if (_flags)
 					# append to list
@@ -3032,7 +3032,7 @@
 	# filter files in intermediate directory
 	set (_filesToRemove "")
 	foreach (_file ${_cotireFiles})
-		get_filename_component(_dir "${_file}" PATH)
+		get_filename_component(_dir "${_file}" DIRECTORY)
 		get_filename_component(_dirName "${_dir}" NAME)
 		if ("${_dirName}" STREQUAL "${_cotireIntermediateDirName}")
 			list (APPEND _filesToRemove "${_file}")


Revert "CMake: use -O3 as default"

Revert "CMake: use -O3 as default"

This reverts commit b7be0726054f14c3c4b99cc51d0fdb0bea2d2f11.

As O3 would require aditional fixes (compiler annoyance), O2 still good

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -208,8 +208,9 @@
 # try compiling without them.
 #
 if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
-  set(optimization_flags_cc "-pipe ${optimization_flags_cc} -O3") #TODO use -Ofast instead of -O3
-  set(optimization_flags_lt "-O3 ${optimization_flags_lt}")
+  set(optimization_flags_cc "${optimization_flags_cc} -O2")
+  set(optimization_flags_cc "-pipe ${optimization_flags_cc}") #TODO use -Ofast instead of -O3
+  set(optimization_flags_lt "-O2 ${optimization_flags_lt}")

   if(NOT ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l")
     set(optimization_flags_cc "${optimization_flags_cc} -mtune=generic")


Modified FindTBB.cmake to cope with TBB 3 paths

--- CMake/Packages/FindTBB.cmake
+++ CMake/Packages/FindTBB.cmake
@@ -62,13 +62,21 @@
   foreach (dir ${TBB_PREFIX_PATH})
     if (CMAKE_CL_64)
       list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX}/lib)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX})
       list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX}/lib)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX})
     else ()
       list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX}/lib)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX})
     endif ()
   endforeach ()
 endif ()

+foreach (dir ${TBB_PREFIX_PATH})
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/$ENV{TBB_ARCH_PLATFORM}/lib)
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/$ENV{TBB_ARCH_PLATFORM})
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib)
+endforeach ()

 set(TBB_LIBRARY_NAMES tbb)


Get rid of Google cpplint's warnings about streams.

To make the warnings go away, make sure to remove CMake's settings
cache after applying this change.  (Otherwise the old setting of
SURGSIM_CPPLINT_FILTERS will persist.)

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -305,7 +305,7 @@
 	# (it claims <unordered_map> is a C header!?):
 	-build/include_order
 	# things disallowed by Google's coding standards, but not ours:
-	-runtime/rtti
+	-runtime/rtti -readability/streams
 )
 string(REPLACE ";" "," CPPLINT_DEFAULT_FILTERS
 	"--filter=${CPPLINT_DEFAULT_FILTER_LIST}")


Refine default cpplint filter settings.

Refine default cpplint filter settings.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -140,11 +140,23 @@
 )
 mark_as_advanced(SURGSIM_CPPLINT_EXTRA_FLAGS)

-# Filter settings for cpplint
+# Default filter settings for cpplint
 set(CPPLINT_DEFAULT_FILTER_LIST
-	-whitespace
+	# our coding standards differ from Google's when it comes to whitespace:
+	-whitespace/tab -whitespace/braces -whitespace/line_length
+	-whitespace/ending_newline
+	# these flag some useful stuff, but also currently produce a lot of noise:
+	-whitespace/operators -whitespace/newline -whitespace/blank_line
+	-whitespace/comma -whitespace/parens -whitespace/comments
+	# this is just broken if a comment is preceded by a tab and ends in ":":
+	-whitespace/labels
+	# our preferred include guard format differs from Google's:
 	-build/header_guard
+	# potentially useful, but generates a lot of noise:
 	-build/include_what_you_use
+	# potentially useful, but generates some crazy false positives
+	# (it claims <unordered_map> is a C header!?):
+	-build/include_order
 )
 string(REPLACE ";" "," CPPLINT_DEFAULT_FILTERS
 	"--filter=${CPPLINT_DEFAULT_FILTER_LIST}")


Enable Valgrind's leak checking separately from other checks.

We should move towards a leak-free code base, but many of the detected
checks seem to be triggered by the OS and/or GTest.  In the likely
case we can't do anything about those, they will need suppressions,
so I want to be able to disable leak checks for the time being.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -23,18 +23,33 @@
 if(NOT WIN32)
 	option(SURGSIM_TESTS_RUN_WITH_VALGRIND
 		"Run the unit tests using Valgrind's memcheck tool." OFF)
+	option(SURGSIM_TESTS_RUN_WITH_VALGRIND_VERBOSE
+		"When running the unit tests using Valgrind, add verbose info." OFF)
+	mark_as_advanced(SURGSIM_TESTS_RUN_WITH_VALGRIND_VERBOSE)
+	option(SURGSIM_TESTS_RUN_WITH_VALGRIND_LEAK_CHECK
+		"When running the unit tests using Valgrind, also check for leaks." OFF)
+	mark_as_advanced(SURGSIM_TESTS_RUN_WITH_VALGRIND_LEAK_CHECK)
 endif(NOT WIN32)
 option(SURGSIM_TESTS_ALL_IN_ONE
 	"Build a single binary with all unit tests.  [Does not work yet!]" OFF)
+mark_as_advanced(SURGSIM_TESTS_ALL_IN_ONE)  # hide it as long as it's broken
 option(SURGSIM_EXAMPLES_BUILD "Include the examples in the build" ON)
-mark_as_advanced(SURGSIM_TESTS_ALL_IN_ONE)  # hide it as long as it's broken

 set(SURGSIM_COPY_WARNING_ONCE TRUE)
 set(SURGSIM_TEST_RUN_PREFIX)
 if(NOT WIN32)
 	if(SURGSIM_TESTS_RUN_WITH_VALGRIND)
-		set(SURGSIM_TEST_RUN_PREFIX valgrind -v --tool=memcheck --error-exitcode=1
-			--fullpath-after= --leak-check=full)
+		set(SURGSIM_TEST_RUN_PREFIX valgrind --tool=memcheck --error-exitcode=1
+			--fullpath-after=)
+		if(SURGSIM_TESTS_RUN_WITH_VALGRIND_VERBOSE)
+			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX} -v)
+		endif(SURGSIM_TESTS_RUN_WITH_VALGRIND_VERBOSE)
+		if(SURGSIM_TESTS_RUN_WITH_VALGRIND_LEAK_CHECK)
+			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX}
+				--leak-check=full --show-reachable=yes)
+		else()
+			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX} --leak-check=none)
+		endif()
 	endif(SURGSIM_TESTS_RUN_WITH_VALGRIND)
 endif(NOT WIN32)


BUG: HDF5 is clobbering ctest TIMEOUT variables

Comment out HDF5 override so ITK configured variables can be used.

--- Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake
+++ Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake
@@ -45,10 +45,10 @@
 set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
 set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")

-set (CTEST_TEST_TIMEOUT 600 CACHE STRING
-    "Maximum time allowed before CTest will kill the test.")
-set (DART_TESTING_TIMEOUT 600 CACHE STRING
-    "Maximum time allowed before CTest will kill the test." FORCE)
+#set (CTEST_TEST_TIMEOUT 600 CACHE STRING
+#    "Maximum time allowed before CTest will kill the test.")
+#set (DART_TESTING_TIMEOUT 600 CACHE STRING
+#    "Maximum time allowed before CTest will kill the test." FORCE)

 SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
     "How long to wait between timed-out CTest submissions.")


Update

Update

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -69,6 +69,36 @@
             set(${VARNAME} ${STDVERSION})
         endif ()
     endmacro(try_set_compiler_lang_standard)
+
+    function(add_target_properties)
+        list(GET ARGV 0 TARGET_NAME)
+        list(GET ARGV 1 PROPERTY_NAME)
+        list(SUBLIST ARGV 2 -1 PROPERTY_VALUES)
+        if (TARGET ${TARGET_NAME} AND PROPERTY_VALUES)
+            get_target_property(PROPERTY_OLD_VALUES ${TARGET_NAME} ${PROPERTY_NAME})
+            if (PROPERTY_OLD_VALUES)
+                list(APPEND PROPERTY_OLD_VALUES ${PROPERTY_VALUES})
+            else ()
+                set(PROPERTY_OLD_VALUES ${PROPERTY_VALUES})
+            endif ()
+            set_target_properties(${TARGET_NAME} PROPERTIES ${PROPERTY_NAME} ${PROPERTY_OLD_VALUES})
+        endif ()
+    endfunction(add_target_properties)
+
+    function(remove_target_properties)
+        list(GET ARGV 0 TARGET_NAME)
+        list(GET ARGV 1 PROPERTY_NAME)
+        list(SUBLIST ARGV 2 -1 PROPERTY_VALUES)
+        if (TARGET ${TARGET_NAME} AND PROPERTY_VALUES)
+            get_target_property(PROPERTY_OLD_VALUES ${TARGET_NAME} ${PROPERTY_NAME})
+            if (PROPERTY_OLD_VALUES)
+                foreach(def ${PROPERTY_VALUES})
+                    list(REMOVE_ITEM PROPERTY_OLD_VALUES ${def})
+                    endforeach()
+                set_target_properties(${TARGET_NAME} PROPERTIES ${PROPERTY_NAME} ${PROPERTY_OLD_VALUES})
+            endif ()
+        endif ()
+    endfunction(remove_target_properties)

     # Auto compiler options, support gcc,MSVC,Clang,AppleClang
     if( ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")


[efr32] switch NAME_WLE to NAME_WE to be CMake 3.10 compatible (#6328)

NAME_WLE was added in CMake 3.14 and isn't available in 3.10, which is
the default requirement for openthread.

This switches imported_libs.cmake to NAME_WL, which is in 3.10.

--- third_party/silabs/cmake/imported_libs.cmake
+++ third_party/silabs/cmake/imported_libs.cmake
@@ -35,7 +35,7 @@
 foreach(lib_file ${rail_libs})

     # Parse lib name, stripping .a extension
-    get_filename_component(lib_name ${lib_file} NAME_WLE)
+    get_filename_component(lib_name ${lib_file} NAME_WE)
     set(imported_lib_name "silabs-${lib_name}")

     # Add as an IMPORTED lib
@@ -58,7 +58,7 @@
 foreach(lib_file ${nvm3_libs})

     # Parse lib name, stripping .a extension
-    get_filename_component(lib_name ${lib_file} NAME_WLE)
+    get_filename_component(lib_name ${lib_file} NAME_WE)
     set(imported_lib_name "silabs-${lib_name}")

     # Add as an IMPORTED lib


DTIPrepTools: Remove reference to retired data server

midas.kitware.com is retired
See https://discourse.slicer.org/t/retiring-midas-kitware-com-data-repository/2243

--- DTIPrepTools.cmake
+++ DTIPrepTools.cmake
@@ -171,8 +171,6 @@
   ## This server is now obsolete "http://www.psychiatry.uiowa.edu/users/brainstestdata/ctestdata/%(algo)/%(hash)"
   ## The primary new home for data
   "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)"
-  # Data published by MIDAS
-  "http://midas.kitware.com/api/rest/midas.bitstream.by.hash?hash=%(hash)&algorithm=%(algo)"
   # Data published by developers using git-gerrit-push.
   "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
 )


Update paths.cmake

Update paths.cmake

--- gitenv/paths.cmake
+++ gitenv/paths.cmake
@@ -1,10 +1,10 @@
 # Copyright (c) 2013, Ruslan Baratov
 # All rights reserved.

-if(DEFINED GITENV_GITENV_GITENV_PATHS_CMAKE)
+if(DEFINED GITENV_GITENV_PATHS_CMAKE_)
   return()
 else()
-  set(GITENV_GITENV_GITENV_PATHS_CMAKE 1)
+  set(GITENV_GITENV_PATHS_CMAKE_ 1)
 endif()

 if(NOT GITENV_ROOT)


[CMake] Passthrough CFLAGS when checking the compiler-rt path

This is needed when cross-compiling for a different target since
CFLAGS may contain additional flags like -resource-dir which
change the location in which compiler-rt builtins are found.

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

git-svn-id: 62ef012455b6b8fcec9c41ca270ebf409aae1006@346820 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleCompilerRT.cmake
+++ cmake/Modules/HandleCompilerRT.cmake
@@ -8,6 +8,9 @@
   if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET)
     list(APPEND CLANG_COMMAND "--target=${CMAKE_CXX_COMPILER_TARGET}")
   endif()
+  get_property(LIBUNWIND_CXX_FLAGS CACHE CMAKE_CXX_FLAGS PROPERTY VALUE)
+  string(REPLACE " " ";" LIBUNWIND_CXX_FLAGS "${LIBUNWIND_CXX_FLAGS}")
+  list(APPEND CLANG_COMMAND ${LIBUNWIND_CXX_FLAGS})
   execute_process(
       COMMAND ${CLANG_COMMAND}
       RESULT_VARIABLE HAD_ERROR


fixed logic for compiler warnings, -Werror should be disabled if one of the -Wno flags is not available

--- cmake/modules/CompilerWarnings.cmake
+++ cmake/modules/CompilerWarnings.cmake
@@ -23,19 +23,29 @@
     endforeach(flag ${desirable_flags})

     check_lang_compiler_flag(${lang} -Werror error_${lang}_result)
+
     if(${error_${lang}_result})
         set(error_flags "-Werror")
     endif(${error_${lang}_result})

+    set(all_nowarning_flags_supported 1)
+
     foreach(flag ${undesirable_flags})
         check_lang_compiler_flag(${lang} -Wno-${flag} ${flag}_${lang}_result)
+
         if(${${flag}_${lang}_result})
             set(warning_flags "${warning_flags} -Wno-${flag}")
+        else(${${flag}_${lang}_result})
+            set(all_nowarning_flags_supported 0)
+            break()
         endif(${${flag}_${lang}_result})
+
         check_lang_compiler_flag(${lang} -Wno-error=${flag} noerror_${flag}_${lang}_result)
+
         if(${noerror_${flag}_${lang}_result})
             set(error_flags "${error_flags} -Wno-error=${flag}")
         endif(${noerror_${flag}_${lang}_result})
+
     endforeach(flag ${undesirable_flags})

     if(${DISABLE_WERROR} STREQUAL ON)
@@ -44,10 +54,10 @@
         set(enable_werror 1)
     endif(${DISABLE_WERROR} STREQUAL ON)

-    if(${werror_by_default} AND ${enable_werror})
+    if(${werror_by_default} AND ${enable_werror} AND ${all_nowarning_flags_supported})
         set(${ret} "${warning_flags} ${error_flags}")
-    else(${werror_by_default} AND ${enable_werror})
+    else(${werror_by_default} AND ${enable_werror} AND ${all_nowarning_flags_supported})
         set(${ret} "${warning_flags}")
-    endif(${werror_by_default} AND ${enable_werror})
+    endif(${werror_by_default} AND ${enable_werror} AND ${all_nowarning_flags_supported})

 endmacro(compiler_warnings ret lang werror_by_default desirable_flags undesirable_flags)


cmake: fix qt.conf generation on mac

cmake: fix qt.conf generation on mac

Change-Id: I9e2a383a9d6cb06ab592cf04b01d06e6e3c5f10e

--- cmake/qibuild/modules/qt-tools.cmake
+++ cmake/qibuild/modules/qt-tools.cmake
@@ -62,9 +62,14 @@

   # Then, generate and install a qt.conf
   # containing relative paths
+  if(APPLE)
+    set(_relative_plugins_path "../../lib/qt4/plugins")
+  else()
+    set(_relative_plugins_path "../lib/qt4/plugins")
+  endif()
   file(WRITE "${CMAKE_BINARY_DIR}/qt.conf"
 "[Paths]
-Plugins = ../lib/qt4/plugins
+Plugins = ${_relative_plugins_path}
 ")
   install(FILES "${CMAKE_BINARY_DIR}/qt.conf" DESTINATION bin COMPONENT runtime)


Update common.cmake

Update common.cmake

(Actually just making a commit to trigger a buildbot request.)

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -37,6 +37,8 @@
 endfunction()

 function(HIDE_DISTRACTING_VARIABLES)
+  # Mark cache variables that aren't libCellML configuration variables as advanced
+  # to hide them from the user in a CMake GUI.
   mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
   mark_as_advanced(CMAKE_CODEBLOCKS_EXECUTABLE)
   mark_as_advanced(QT_QMAKE_EXECUTABLE)