Allowing OPENBLAS_THREAD_COMMAND to be overridden

--- cmake/external_projects/ElMath/OpenBLAS.cmake
+++ cmake/external_projects/ElMath/OpenBLAS.cmake
@@ -106,10 +106,12 @@
     endif()
   endif()

-  if(EL_HYBRID)
-    set(OPENBLAS_THREAD_COMMAND)
-  else()
-    set(OPENBLAS_THREAD_COMMAND USE_THREAD=0)
+  if(NOT OPENBLAS_THREAD_COMMAND)
+    if(EL_HYBRID)
+      set(OPENBLAS_THREAD_COMMAND)
+    else()
+      set(OPENBLAS_THREAD_COMMAND USE_THREAD=0)
+    endif()
   endif()

   ExternalProject_Add(project_openblas


cmake: Check for inet functions.

cmake: Check for inet functions.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -111,6 +111,10 @@

 set(CMAKE_EXTRA_INCLUDE_FILES sys/stat.h)
 vlc_check_functions_exist(lstat fstat stat)
+set(CMAKE_EXTRA_INCLUDE_FILES)
+
+set(CMAKE_EXTRA_INCLUDE_FILES arpa/inet.h)
+vlc_check_functions_exist(inet_pton inet_aton inet_ntop inet_pton)
 set(CMAKE_EXTRA_INCLUDE_FILES)

 set(CMAKE_REQUIRED_LIBRARIES)


- Add interrupt and cpu driver for TI. - Startup and syscall for TI are now compiled with same optimizations as PROJECT_SOURCES.


EKF2 config: Do not build other estimators

--- cmake/configs/nuttx_px4fmu-v2_ekf2.cmake
+++ cmake/configs/nuttx_px4fmu-v2_ekf2.cmake
@@ -79,11 +79,7 @@
 	#
 	# Estimation modules (EKF/ SO3 / other filters)
 	#
-	# Too high RAM usage due to static allocations
-	# modules/attitude_estimator_ekf
-	modules/attitude_estimator_q
 	modules/ekf2
-	modules/position_estimator_inav

 	#
 	# Vehicle Control


enable leveraging pkg-config for extracting MATIO build info

--- cmake/DetectMATIO.cmake
+++ cmake/DetectMATIO.cmake
@@ -12,10 +12,13 @@

 set(MATIO_FOUND TRUE)

+status("MATIO_DIR:${MATIO_DIR}")
+
+find_package(PkgConfig)
+pkg_check_modules(PC_MATIO QUIET matio)
+set(MATIO_DEFINITIONS ${PC_MATIO_CFLAGS_OTHER})
+
 file(TO_CMAKE_PATH ${MATIO_DIR}/lib MATIO_TMP_LIB_DIR)
-
-status("MATIO_DIR:${MATIO_DIR}")
-status("MATIO_TMP_LIB_DIR:${MATIO_TMP_LIB_DIR}")

 find_library(MATIO_LIBS
              NAMES libmatio.a matio


CMake: remove FJ <= 3.0.6 lock

CMake: remove FJ <= 3.0.6 lock

Fixes ALPHY-23

--- cmake/FindFASTJET.cmake
+++ cmake/FindFASTJET.cmake
@@ -61,13 +61,9 @@
     string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" FASTJET_VERSION_PATCH "${FASTJET_VERSION}")

     if(FASTJET_VERSION_MAJOR LESS 3)
-        message(FATAL_ERROR "FastJet ${FASTJET_VERSION_MAJOR}.${FASTJET_VERSION_MINOR}.${FASTJET_VERSION_PATCH} version is not suported. Please install a version >= 3.0.*")
+        message(FATAL_ERROR "FastJet ${FASTJET_VERSION_MAJOR}.${FASTJET_VERSION_MINOR}.${FASTJET_VERSION_PATCH} not suported: install at least >= 3.0.*")
     endif()

-    if(FASTJET_VERSION_MINOR GREATER 0)
-        message(FATAL_ERROR "FastJet ${FASTJET_VERSION_MAJOR}.${FASTJET_VERSION_MINOR}.${FASTJET_VERSION_PATCH} version is not suported. Please install a version >= 3.0.*")
-    endif()
-
     # Extracting compilation flags
     execute_process(COMMAND ${FASTJET_CONFIG} --cxxflags OUTPUT_VARIABLE FASTJET_CXXFLAGS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE)
     if(error)


remove 'REQUIRED' from 'find_package(PkgConfig REQUIRED)'

--- cmake/FindJpegPkg.cmake
+++ cmake/FindJpegPkg.cmake
@@ -20,7 +20,7 @@
     set(IMPORTED_JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR})
     set(IMPORTED_JPEG_LIBRARIES ${JPEG_LIBRARIES})
   else()
-    find_package(PkgConfig REQUIRED)
+    find_package(PkgConfig)
     pkg_check_modules(JPEG libjpeg)
     if(JPEG_FOUND)
       message(STATUS "JPEG found by pkgconfig")


fix name

fix name

--- cmake/get-tinyxml.cmake
+++ cmake/get-tinyxml.cmake
@@ -21,7 +21,7 @@
   tinyxml
   PREFIX          ${DEPENDENCY_EXTRACT_DIR}
   DOWNLOAD_DIR    ${DEPENDENCY_DOWNLOAD_DIR}
-  DOWNLOAD_NAME   tinyxml-v${ZLIB_VERSION}.zip
+  DOWNLOAD_NAME   tinyxml-v${TINYXML_VERSION}.zip
   URL             https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.zip/download
   URL_MD5         2a0aaf609c9e670ec9748cd01ed52dae
   CMAKE_ARGS      ${TINYXML_CMAKE_ARGS}


Engine resources are installed in the Resources directory and linked to the buildtree so that an application might be executed from the buildtree or after install

--- cmake/installFunc.cmake
+++ cmake/installFunc.cmake
@@ -13,9 +13,12 @@
 #      -> install in bin/Shaders/foo.glsl
 # You must pass parameter using quotes
 macro( installLibShaders FILES )
+    # build configuration : link shaders to Resources/Shaders
+    file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../Resources")
+    file(CREATE_LINK ${RADIUM_SHADERS_DIR} "${CMAKE_CURRENT_BINARY_DIR}/../Resources/Shaders" COPY_ON_ERROR SYMBOLIC)
     foreach ( file ${FILES} )
         get_filename_component( file_dir ${file} DIRECTORY )
-        install( FILES ${RADIUM_SHADERS_DIR}/${file} DESTINATION bin/Shaders/${file_dir} )
-#        file( COPY ${RADIUM_SHADERS_DIR}/${file} DESTINATION ../../tests/ExampleApps/Shaders/${file_dir})
+        # installed library
+        install(FILES ${RADIUM_SHADERS_DIR}/${file} DESTINATION Resources/Shaders/${file_dir})
     endforeach()
 endmacro()


* fixed the issue with unit tests that are no longer being ran by TeamCity

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@3450 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -248,6 +248,7 @@
     set(multiValueArgs FILES ARGUMENTS LINK_WITH)
     cmake_parse_arguments(PCL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
     add_executable(${_exename} ${PCL_ADD_TEST_FILES})
+    set_target_properties(${_exename} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     PCL_ADD_OPENMP_FLAGS(${_exename})
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     #


Version message should be a "STATUS" to avoid going to stderr. (#6316)

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -25,4 +25,4 @@
   message(WARNING "git is not found")
 endif()

-message("Proceeding with version: ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT}")
+message(STATUS "Proceeding with version: ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT}")


Fix a regression in 1f21ab0.

Fix a regression in 1f21ab0.

Do no use regex replace for package name to define translation. Using
+ in a regex without escaping is wrong.

--- CommonPackage.cmake
+++ CommonPackage.cmake
@@ -131,8 +131,8 @@

     # for defines.h
     set(__use_package_define "${UPPER_PROJECT_NAME}_USE_${PACKAGE_NAME}")
-    string(REGEX REPLACE "-" "_" __use_package_define ${__use_package_define})
-    string(REGEX REPLACE "+" "P" __use_package_define ${__use_package_define})
+    string(REPLACE "-" "_" __use_package_define ${__use_package_define})
+    string(REPLACE "+" "P" __use_package_define ${__use_package_define})
     list(APPEND COMMON_PACKAGE_DEFINES ${__use_package_define})

     # for CommonPackageConfig.cmake


Fixed expr error in TbagBinary2CppArray.cmake script.

--- cmake/TbagScript/TbagBinary2CppArray.cmake
+++ cmake/TbagScript/TbagBinary2CppArray.cmake
@@ -12,7 +12,7 @@
     return ()
 endif ()

-math (EXPR __is_odd_number "${__content_length} & 0x1")
+math (EXPR __is_odd_number "${__content_length} % 2")
 if (__is_odd_number EQUAL 1)
     message (ERROR "The result must be an even number: (${__content_length})")
     return ()


updated socketio hash

updated socketio hash

--- cmake/projects/SocketIOClient/hunter.cmake
+++ cmake/projects/SocketIOClient/hunter.cmake
@@ -17,7 +17,7 @@
         URL
         "https://github.com/madmongo1/socket.io-client-cpp/archive/v1.6.1-hunter-1.tar.gz"
         SHA1
-        3e67677d8d0328c07c7a2d2c9e8ebda87c9ad583
+        00d6da0ce2301bdd362bd1c51dd2241019948a80
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


Adding create_fibre_axes test source file to cmake.  https://tracker.physiomeproject.org/show_bug.cgi?id=3625

--- fieldmodule/tests.cmake
+++ fieldmodule/tests.cmake
@@ -9,6 +9,7 @@
 	${CURRENT_TEST}/create_vectoroperators.cpp
 	${CURRENT_TEST}/region_io.cpp
 	${CURRENT_TEST}/create_image_processing.cpp
+	${CURRENT_TEST}/create_fibre_axes.cpp
 	)

 SET(FIELDMODULE_EXNODE_RESOURCE "${CMAKE_CURRENT_LIST_DIR}/nodes.exnode")


Fix ongoing ZMQ boken-ness

Fix ongoing ZMQ boken-ness

--- lib/FindAtomSpace.cmake
+++ lib/FindAtomSpace.cmake
@@ -38,7 +38,7 @@
    PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)

 find_library(ATOMSPACE_persist-zmq_LIBRARY persist-zmq
-   PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)
+	PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)

 find_library(ATOMSPACE_zmqatoms_LIBRARY zmqatoms
    PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)
@@ -63,12 +63,18 @@
 	${ATOMSPACE_lambda_LIBRARY}
 	${ATOMSPACE_persist_LIBRARY}
 	${ATOMSPACE_persist-sql_LIBRARY}
-	${ATOMSPACE_zmqatoms_LIBRARY}
 	${ATOMSPACE_query_LIBRARY}
 	${ATOMSPACE_execution_LIBRARY}
 	${ATOMSPACE_ruleengine_LIBRARY}
 	${ATOMSPACE_smob_LIBRARY}
 )
+
+IF (HAVE_ZMQ)
+	set(ATOMSPACE_LIBRARIES
+		${ATOMSPACE_LIBRARIES}
+		${ATOMSPACE_zmqatoms_LIBRARY}
+	)
+ENDIF (HAVE_ZMQ)

 INCLUDE (CheckIncludeFiles)


Add warning message when option ignored

Add warning message when option ignored

--- build-options.cmake
+++ build-options.cmake
@@ -52,7 +52,10 @@
 option(LOMSE_ENABLE_COMPRESSION "Enable compressed formats (requires zlib)" ON)
 option(LOMSE_ENABLE_PNG "Enable png format (requires pnglib and zlib)" ON)
 if (LOMSE_ENABLE_PNG)
-    set(LOMSE_ENABLE_COMPRESSION ON)
+	if (NOT LOMSE_ENABLE_COMPRESSION)
+        message(STATUS "**WARNING**: Enabling PNG requires enabling compression. LOMSE_ENABLE_COMPRESSION set to ON" )
+    	set(LOMSE_ENABLE_COMPRESSION ON)
+	endif()
 endif()


*** empty log message ***

*** empty log message ***

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

--- library/FindBoost.cmake
+++ library/FindBoost.cmake
@@ -1,85 +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 "")
-
-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)
+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 )
+
+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)


Fixing a HIP bug that causes DEBUG symbols to be dropped.

I've noticed that in the generated makefiles, we'd have

if(NOT build_configuration)
    set(build_configuration Debug)
endif()

However, only definitions with all capitals are provided.

e.g.

set(HIP_HCC_FLAGS_DEBUG -g)

This is because of lines 442 to 448. We capitalize the configuration ${config_upper}.

This PR fixes this bug.

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -380,7 +380,7 @@
 ###############################################################################
 macro(HIP_PREPARE_TARGET_COMMANDS _target _format _generated_files _source_files)
     set(_hip_flags "")
-    set(_hip_build_configuration "${CMAKE_BUILD_TYPE}")
+    string(TOUPPER _hip_build_configuration "${CMAKE_BUILD_TYPE}")
     if(HIP_HOST_COMPILATION_CPP)
         set(HIP_C_OR_CXX CXX)
     else()


Update FindLua.cmake

Update FindLua.cmake

--- cmake/FindLua.cmake
+++ cmake/FindLua.cmake
@@ -55,6 +55,7 @@
         /opt/csw # Blastwave
         /opt
         /usr/local
+        /usr/bin
         C:/Lua
         )


Minor typo fix

Minor typo fix

--- cmake/git-ver.cmake
+++ cmake/git-ver.cmake
@@ -1,4 +1,4 @@
-### Vetrrsion control policy
+### Version control policy
 ###
 ### Extract current version from version control if present.  If
 ### source is not under source control - take from .version


Remove the new git branching model from this pr

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -11,20 +11,6 @@
     RESULT_VARIABLE GIT_RESULT
     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
   if (NOT ${GIT_RESULT})
-    # Get current branch name
-    execute_process(
-      COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref ${tmp_version}
-      WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}
-      OUTPUT_VARIABLE GIT_BRANCH_NAME
-      RESULT_VARIABLE GIT_BRANCH_RESULT
-      ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-    # If current branch is develop, then version will be latest
-    if (NOT ${GIT_BRANCH_RESULT})
-      if (${GIT_BRANCH_NAME} MATCHES "develop")
-        set(PADDLE_VERSION "latest")
-        continue()
-      endif()
-    endif()
     # Check the tag is a correct version
     if (${GIT_TAG_NAME} MATCHES "${COMMIT_VERSION_REGEX}")
       # if no tag was found, set PADDLE_VERSION to latest


Manage the use of debug/release version of lib jpeg.

	* build-aux/cmake/modules/FindSdkRemote.cmake: .

--- build-aux/cmake/modules/FindSdkRemote.cmake
+++ build-aux/cmake/modules/FindSdkRemote.cmake
@@ -87,6 +87,12 @@
                      ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/mingw32/remote
                      ${${PACKAGE_NAME}_ROOT_DIR}/lib)

+# Search for the associated jpeg debug library.
+package_search(DEBUG LIBRARY ${PACKAGE_NAME}_JPEG_DEBUG_LIBRARY jpeg libjpeg
+               FULLNAME "SDK Remote's JPEG"
+               PATHS ${${PACKAGE_NAME}_ROOT_DIR}/Debug/lib
+                     ${${PACKAGE_NAME}_ROOT_DIR}/lib)
+
 # Search for URBI release library
 package_search(RELEASE LIBRARY ${PACKAGE_NAME}_URBI_RELEASE_LIBRARY urbi liburbi
                FULLNAME "SDK Remote for release"
@@ -99,10 +105,10 @@
                      ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/mingw32/remote
                      ${${PACKAGE_NAME}_ROOT_DIR}/lib)

-# Search for the associated jpeg library.
-package_search(LIBRARY ${PACKAGE_NAME}_JPEG_LIBRARY jpeg libjpeg
+# Search for the associated jpeg release library.
+package_search(RELEASE LIBRARY ${PACKAGE_NAME}_JPEG_RELEASE_LIBRARY jpeg libjpeg
                FULLNAME "SDK Remote's JPEG"
-               PATHS ${${PACKAGE_NAME}_ROOT_DIR}/Debug/lib
+               PATHS ${${PACKAGE_NAME}_ROOT_DIR}/Release/lib
                      ${${PACKAGE_NAME}_ROOT_DIR}/lib)

 # Add platform specific libraries.
@@ -118,4 +124,4 @@
     endif(NOT ${PACKAGE_FILENAME}_FIND_QUIETLY)
 endif(WIN32)

-package_foot(${${PACKAGE_NAME}_PARTS_LIST})+package_foot(${${PACKAGE_NAME}_PARTS_LIST})


Set SDK_REMOTE_LIBRARIES.

Set SDK_REMOTE_LIBRARIES.

	* build-aux/cmake/modules/FindSdkRemote.cmake: Do that.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/FindSdkRemote.cmake
+++ build-aux/cmake/modules/FindSdkRemote.cmake
@@ -17,6 +17,8 @@
 # This module set two variables:
 #
 #   SDK_REMOTE_LIBRARY: the path to the libraries found.
+#   SDK_REMOTE_LIBRARIES: the set of libraries of the remote sdk. Add this
+#                         variables to target_link_libraries.
 #   SDK_REMOTE_INCLUDE_DIR: the include path.
 #
 # These variables are set to <var-name>-NOTFOUND if an error occurs.
@@ -51,5 +53,13 @@
       set(SDK_REMOTE_FOUND FALSE)
     endif(SDK_REMOTE_INCLUDE_DIR)
   endif(NOT SDK_REMOTE_INCLUDE_DIR)
+
+  set(SDK_REMOTE_LIBRARIES ${SDK_REMOTE_LIBRARY})
+  # Add jpeg library
+  if(WIN32)
+    set(SDK_REMOTE_LIBRARIES ${SDK_REMOTE_LIBRARIES} libjpeg)
+  else()
+    set(SDK_REMOTE_LIBRARIES ${SDK_REMOTE_LIBRARIES} jpeg)
+  endif()
 endif(SDK_REMOTE_FOUND)


Update FW with clock related tweaks for feature tracker

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "4e63bce52514acfb7e808ffd6b9134b6868652be")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "22f00aeeec005de80c99084b23291a9f154bb84f")

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


CMake: Remove a dysfunctional workaround

This does not work.

--- cmake/checks/check_02_system_features.cmake
+++ cmake/checks/check_02_system_features.cmake
@@ -106,51 +106,6 @@
 ########################################################################

-IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
-    OR CMAKE_SYSTEM_NAME MATCHES "Windows" )
-  IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
-      CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" )
-
-    #
-    # Print a warning if we have a gcc port that is older than gcc-4.8:
-    #
-
-    MESSAGE(WARNING "\n"
-      "GCC ports (Cygwin, MinGW-w64, or MinGW) older than version 4.8 are unsupported on Windows\n\n"
-      )
-
-  ELSE()
-
-    #
-    # Workaround for a compiler bug on Windows platforms with modern gcc:
-    #
-    # GCC seems to have a hard time with
-    #
-    #   next_free_pair_object and next_free_single_object
-    #
-    # defined in tria_objects.h. It might explode in one ot the following ways:
-    #  a) Internal compiler error
-    #  b) emition of a truncated external symbol
-    #  c) "template <...>::dimension could not be converted to 'int'"
-    #
-    # It seems to help to specify "-ggdb" also for optimized mode.
-    #
-    # TODO: Track down bug and fix properly (just kidding).
-    #
-    # Maier, 2013
-    #
-
-    ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-g")
-    ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_RELEASE "-g")
-    REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-Og" "-O1")
-    REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1")
-    REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-ggdb" "-g")
-    REPLACE_FLAG(DEAL_II_LINKER_FALGS_DEBUG "-ggdb" "-g")
-
-  ENDIF()
-ENDIF()
-
-
 IF(CMAKE_SYSTEM_NAME MATCHES "Windows")

   #


Fix FMUv4 build

Fix FMUv4 build

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -98,7 +98,6 @@
 	# Estimation modules (EKF/ SO3 / other filters)
 	#
 	modules/attitude_estimator_q
-	modules/ekf_att_pos_estimator
 	modules/position_estimator_inav
 	modules/ekf2
 	modules/local_position_estimator
@@ -183,6 +182,9 @@

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

 set(config_extra_builtin_cmds


Fail to configure if fail-on-missing=ON and TBB is not found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1001,31 +1001,19 @@
 endif()

 #---Check for TBB---------------------------------------------------------------------
-if(imt)
-  if(NOT builtin_tbb)
-    message(STATUS "Looking for TBB")
-    find_package(TBB)
-    if(TBB_FOUND)
-      set(tbb_min_version 2018)
-      if(${TBB_VERSION} VERSION_LESS ${tbb_min_version})
-        if(fail-on-missing)
-          message(FATAL_ERROR "TBB version < ${tbb_min_version}. You can enable the option 'builtin_tbb' to build the library internally")
-        else()
-          message(STATUS "TBB version < ${tbb_min_version}. Switching on builtin_tbb option")
-          set(builtin_tbb ON CACHE BOOL "Enabled because imt requested and external TBB version < ${tbb_min_version} (${builtin_tbb})" FORCE)
-        endif()
-      endif()
-    endif()
+if(imt AND NOT builtin_tbb)
+  message(STATUS "Looking for TBB")
+  if(fail-on-missing)
+    find_package(TBB 2018 REQUIRED)
+  else()
+    find_package(TBB 2018)
     if(NOT TBB_FOUND)
-      if(fail-on-missing)
-        message(FATAL_ERROR "TBB not found. You can enable the option 'builtin_tbb' to build the library internally")
-      else()
-        message(STATUS "TBB not found. Switching on builtin_tbb option")
-        set(builtin_tbb ON CACHE BOOL "Enabled because TBB not found and imt requested (${builtin_tbb_description})" FORCE)
-      endif()
-    endif()
-  endif()
-endif()
+      message(WARNING "TBB not found, enabling 'builtin_tbb' option")
+      set(builtin_tbb ON CACHE BOOL "Enabled because imt is enabled, but TBB was not found" FORCE)
+    endif()
+  endif()
+endif()
+
 if(builtin_tbb)
   set(tbb_builtin_version 2019_U7)
   set(tbb_sha256 4204a93f4c0fd989fb6f79acae74feb02ee39725c93968773d9b6efeb75c7a6a)


Hardcode LZ4 tarball URL to point at GitHub.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -146,8 +146,8 @@
   set(LZ4_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lz4${CMAKE_STATIC_LIBRARY_SUFFIX})
   ExternalProject_Add(
     LZ4
-    URL ${CMAKE_SOURCE_DIR}/core/lz4/src/lz4-${lz4_version}.tar.gz
-    URL_MD5 0601f6b8477209d07db33d504feb6ac4
+    URL https://github.com/lz4/lz4/archive/v1.7.5.tar.gz
+    URL_MD5 c9610c5ce97eb431dddddf0073d919b9
     INSTALL_DIR ${CMAKE_BINARY_DIR}
     CONFIGURE_COMMAND  /bin/sh -c "PREFIX=<INSTALL_DIR> make cmake"
     BUILD_COMMAND /bin/sh -c "PREFIX=<INSTALL_DIR> MOREFLAGS=-fPIC make"


Log build steps of Vc external project

Log build steps of Vc external project

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1283,6 +1283,7 @@
     URL_MD5 ${Vc_SRC_MD5}
     BUILD_IN_SOURCE 0
     BUILD_BYPRODUCTS ${Vc_LIBRARY}
+    LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     CMAKE_ARGS -G ${CMAKE_GENERATOR}
                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}


cmake: remove unecessary info passed to bootloader build

--- components/bootloader/project_include.cmake
+++ components/bootloader/project_include.cmake
@@ -51,8 +51,7 @@
         # TODO: support overriding the bootloader in COMPONENT_PATHS
         SOURCE_DIR "${IDF_PATH}/components/bootloader/subproject"
         BINARY_DIR "${bootloader_build_dir}"
-        CMAKE_ARGS  -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH} -DEXTRA_COMPONENT_DIRS=${COMPONENT_DIRS}
-                    -DTESTS_ALL=0 -DTEST_COMPONENTS=""
+        CMAKE_ARGS  -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH}
                     -DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key}
         INSTALL_COMMAND ""
         BUILD_ALWAYS 1  # no easy way around this...


cmake: don't run crosstool-version-check for clang

We will likely need to check clang version as well, eventually.
However at the moment clang builds change too often for such check
to be maintainable. Disable it for clang.

--- components/esp_common/project_include.cmake
+++ components/esp_common/project_include.cmake
@@ -1,8 +1,12 @@
 #
 # Warn if the toolchain version doesn't match
 #
-if(NOT ${target} STREQUAL "linux")
+if(NOT (${target} STREQUAL "linux" OR CMAKE_C_COMPILER_ID MATCHES "Clang"))
     get_expected_ctng_version(expected_toolchain expected_gcc)
     gcc_version_check("${expected_gcc}")
     crosstool_version_check("${expected_toolchain}")
 endif()
+
+if(NOT ${target} STREQUAL "linux" AND CMAKE_C_COMPILER_ID MATCHES "Clang")
+    message(WARNING "Building ESP-IDF with clang is an experimental feature and is not yet officially supported.")
+endif()


Revert "What a bummer. Fix it properly..."

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

--- deal.II/cmake/macros/macro_strip_flag.cmake
+++ deal.II/cmake/macros/macro_strip_flag.cmake
@@ -20,10 +20,8 @@
 #

 MACRO(STRIP_FLAG _variable _flag)
-  SET(${_variable} " ${${_variable}} ")
-  STRING(REPLACE " " "  " "${_variable}" ${${_variable}})
-  STRING(REPLACE " ${_flag} " "" "${_variable}" ${${_variable}})
-  STRING(REPLACE "  " " " "${_variable}" ${${_variable}})
+  SET(${_variable} "${${_variable}} ")
+  STRING(REPLACE "${_flag} " "" "${_variable}" ${${_variable}})
   STRING(STRIP "${${_variable}}" ${_variable})
 ENDMACRO()


Update ios.toolchain.cmake

Update ios.toolchain.cmake

Fixed double outputs if manually specifying CMAKE_OSX_SYSROOT

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -192,8 +192,6 @@
     OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
     ERROR_QUIET
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-elseif(DEFINED CMAKE_OSX_SYSROOT)
-  message(STATUS "Using manually set SDK path: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
 endif()
 if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
   message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain"
@@ -202,6 +200,8 @@
   "and see if that fixes the problem for you.")
   message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} "
   "does not exist.")
+elseif(DEFINED CMAKE_OSX_SYSROOT)
+  message(STATUS "Using manually set SDK path: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
 else()
    message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
 endif()


Add comment

Add comment

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -114,7 +114,9 @@
 set ( CONFIGURE_OPTIONS
 "-DCMAKE_PREFIX_PATH=${XDK_PATH};\
 -DCMAKE_INSTALL_PREFIX=${CTEST_INSTALL_DIRECTORY};" )
-
+# TODO add option to enable all modules
+# Add this in the superbuild MR too
+# use external_otb.cmake
 # FIX ME this part might platform dependent
 set( GDAL_DATA "${XDK_PATH}/share/gdal" )
 set( GEOTIFF_CSV "${XDK_PATH}/share/epsg_csv" )


CMake: do not add sub-dependencies to list of features

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -95,7 +95,6 @@
 if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT EMSCRIPTEN)
   find_package(X11)
   macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "")
-  macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "")
   find_library(XAW_LIBRARY NAMES Xaw Xaw7 PATHS ${OGRE_DEP_SEARCH_PATH} ${DEP_LIB_SEARCH_DIR} ${X11_LIB_SEARCH_PATH})
   macro_log_feature(XAW_LIBRARY "Xaw" "X11 Athena widget set" "http://www.x.org" TRUE "" "")
   mark_as_advanced(XAW_LIBRARY)
@@ -209,15 +208,16 @@

 # Optional Boost libs (Boost_${COMPONENT}_FOUND
 macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" FALSE "" "")
+if(NOT Boost_DATE_TIME_FOUND)
+    set(Boost_THREAD_FOUND FALSE)
+endif()
+if(Boost_VERSION GREATER 104900 AND (NOT Boost_SYSTEM_FOUND OR NOT Boost_CHRONO_FOUND))
+    set(Boost_THREAD_FOUND FALSE)
+endif()
+if(Boost_VERSION GREATER 105300 AND NOT Boost_ATOMIC_FOUND)
+    set(Boost_THREAD_FOUND FALSE)
+endif()
 macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "")
-macro_log_feature(Boost_DATE_TIME_FOUND "boost-date_time" "Used for threading support" "http://boost.org" FALSE "" "")
-if(Boost_VERSION GREATER 104900)
-    macro_log_feature(Boost_SYSTEM_FOUND "boost-system" "Used for threading support" "http://boost.org" FALSE "" "")
-    macro_log_feature(Boost_CHRONO_FOUND "boost-chrono" "Used for threading support" "http://boost.org" FALSE "" "")
-	if(Boost_VERSION GREATER 105300)
-		macro_log_feature(Boost_ATOMIC_FOUND "boost-atomic" "Used for threading support" "http://boost.org" FALSE "" "")
-	endif()
-endif()

 # POCO
 find_package(POCO)


Fixed temporary CTK git url

Fixed temporary CTK git url

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -70,7 +70,7 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      GIT_URL https://github.com/saschazelzer/CTK
+      GIT_REPOSITORY https://github.com/saschazelzer/CTK
       GIT_TAG origin/improve-external-dependency-handling
       #URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
       #URL_MD5 a3ac62b6fdefc90966b52bc5b52c80e5


Define Coverage build type using define_build_type() function

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -34,36 +34,11 @@
     return()
 endif()

-# Note: C(XX) flags are also used in linker invocation
-if(CMAKE_CXX_FLAGS_DEBUG)
-    # No point to set it if it's C-only project
-    set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage"
-        CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE)
-    mark_as_advanced(CMAKE_CXX_FLAGS_COVERAGE)
-endif()
-if(CMAKE_C_FLAGS_DEBUG)
-    # No point to set it if it's C++-only project
-    set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG} --coverage"
-        CACHE STRING "Flags used by the C compiler during coverage builds." FORCE)
-    mark_as_advanced(CMAKE_C_FLAGS_COVERAGE)
-endif()
-
-if(CMAKE_CONFIGURATION_TYPES)
-    # Add 'Coverage' build type for multi-config generators
-    list(APPEND CMAKE_CONFIGURATION_TYPES Coverage)
-    list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
-    set(CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}"
-        CACHE STRING "List of supported configuration types" FORCE)
-else()
-    # Modify CMAKE_BUILD_TYPE enum values for cmake-gui
-    get_property(build_type_strings CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS)
-    list(LENGTH build_type_strings build_type_strings_length)
-    if(NOT build_type_strings_length EQUAL 0)
-        list(APPEND build_type_strings Coverage)
-        list(REMOVE_DUPLICATES build_type_strings)
-        set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${build_type_strings})
-    endif()
-endif()
+include(DefineBuildType)
+define_build_type(Coverage
+    BASE Debug
+    COMPILER_FLAGS "--coverage"
+)

 include(FindPackageHandleStandardArgs)


Set Codecov project root. (#501)

Set Codecov project root. (#501)

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -157,7 +157,7 @@
 		# Upload to Codecov (added by @brianhou)
 		COMMAND curl -s "https://codecov.io/bash" > ${codecov_script}
 		COMMAND chmod +x ${codecov_script}
-		COMMAND ${codecov_script} -X gcov -f ${coverage_cleaned}
+		COMMAND ${codecov_script} -R ${CMAKE_SOURCE_DIR} -X gcov -f ${coverage_cleaned}

 		# Clean up reports
 		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}


actually took the wrong version of rocPRIM - should work now

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -47,7 +47,7 @@
     message(STATUS "Downloading rocPRIM.")
     download_project(PROJ    rocPRIM
          GIT_REPOSITORY      https://github.com/ROCmSoftwarePlatform/rocPRIM.git
-         GIT_TAG             0702a4a797f021bf7098d6b8cca046c85f4cb22d # TODO change back to master once rocm docker image is updated
+         GIT_TAG             caef132d64b29a7d857eb68af5323fc302d26766 # TODO change back to master once rocm docker image is updated
          INSTALL_DIR         ${ROCPRIM_ROOT}
          CMAKE_ARGS          -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hcc
          LOG_DOWNLOAD        TRUE


Bug 914: fix compiler detection on windows (grafted from d0828c602f7a055cbe51459e936741b5ff8e414c)

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -359,22 +359,29 @@
       endif()
     else()
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
-    # supporting a "--version" flag
+    # supporting a "--version" or "/version" flag
+
+    if(WIN32 AND NOT CYGWIN)
+      set(EIGEN_CXX_FLAG_VERSION "/version")
+    else()
+      set(EIGEN_CXX_FLAG_VERSION "--version")
+    endif()

     # check whether the head command exists
     find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
     if(HEAD_EXE)
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
                       COMMAND head -n 1
                       OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
     else()
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER}  ${EIGEN_CXX_FLAG_VERSION}
                       OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
       string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
     endif()

     ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")
+
   endif()
 endmacro(ei_get_compilerver)


cache dgc package (#23941)

cache dgc package (#23941)

--- cmake/external/dgc.cmake
+++ cmake/external/dgc.cmake
@@ -14,17 +14,24 @@

 INCLUDE(ExternalProject)

-SET(DGC_SOURCES_DIR "${THIRD_PARTY_PATH}/dgc")
+SET(DGC_PREFIX_DIR  "${THIRD_PARTY_PATH}/dgc")
+SET(DGC_SOURCES_DIR "${THIRD_PARTY_PATH}/dgc/src/extern_dgc")
 SET(DGC_INSTALL_DIR "${THIRD_PARTY_PATH}/install/dgc")
 SET(DGC_INCLUDE_DIR "${DGC_INSTALL_DIR}/include" CACHE PATH "dgc include directory." FORCE)
 SET(DGC_LIBRARIES   "${DGC_INSTALL_DIR}/lib/libdgc.a" CACHE FILEPATH "dgc library." FORCE)
+SET(DGC_URL         "http://fleet.bj.bcebos.com/collective_ef2216a.tgz")
 INCLUDE_DIRECTORIES(${DGC_INCLUDE_DIR})
+
+cache_third_party(extern_dgc
+        URL       ${DGC_URL}
+        DIR       DGC_SOURCES_DIR)

 ExternalProject_Add(
     extern_dgc
     ${EXTERNAL_PROJECT_LOG_ARGS}
-    URL             "http://fleet.bj.bcebos.com/collective_ef2216a.tgz"
+    "${DGC_DOWNLOAD_CMD}"
     URL_MD5         "2f67549fd5f1262383d83289abc4f88f"
+    PREFIX          "${DGC_PREFIX_DIR}"
     SOURCE_DIR      "${DGC_SOURCES_DIR}"
     CONFIGURE_COMMAND ""
     BUILD_COMMAND make -j $(nproc)


CMake: globalconfig Added \ZI for VS 2015 to get edit and continue in debug, so you don't have to restart inviwo. And some minor cleanup and restructuring

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -32,6 +32,27 @@
 set(IVW_MINOR_VERSION 9)
 set(IVW_PATCH_VERSION 5)

+#--------------------------------------------------------------------
+# Requirement checks
+if(MSVC)
+    if(MSVC_VERSION LESS 1800)
+        message(FATAL_ERROR "Inviwo requires C++11 features. "
+                "You need at least Visual Studio 12 (Microsoft Visual Studio 2013)")
+    endif()
+else()
+    include(CheckCXXCompilerFlag)
+    CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+    if(COMPILER_SUPPORTS_CXX11)
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+    elseif(COMPILER_SUPPORTS_CXX0X)
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+    else()
+        ivw_message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+    endif()
+endif()
+
+
 set_property(GLOBAL PROPERTY USE_FOLDERS On)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER cmake)

@@ -86,45 +107,6 @@
 # Add own cmake modules
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/")
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/cmake/")
-
-#--------------------------------------------------------------------
-# Precompile headers
-
-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    option(PRECOMPILED_HEADERS "Create and use precompilied headers" OFF)
-else()
-    option(PRECOMPILED_HEADERS "Create and use precompilied headers" ON)
-endif()
-
-include(${CMAKE_CURRENT_LIST_DIR}/clean_library_list.cmake)
-if(PRECOMPILED_HEADERS)
-    include(${CMAKE_CURRENT_LIST_DIR}/cotire.cmake)
-endif()
-
-mark_as_advanced(
-    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS
-    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH
-    COTIRE_DEBUG
-    COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES
-    COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES
-    COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS
-    COTIRE_VERBOSE
-)
-
-# Exclude stuff from cotire
-set(IVW_COTIRE_EXCLUDES
-    "${IVW_EXTENSIONS_DIR}/warn"
-    "${IVW_MODULE_DIR}/unittests/ext"
-  )
-
-if(WIN32 AND MSVC)
-    if(DEFINED MSVC_ACRO)
-        list(APPEND IVW_COTIRE_EXCLUDES
-            "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/include/thread"
-            "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/include/thr/xthread")
-    endif()
-endif()
-

 #--------------------------------------------------------------------
 # Add globalmacros
@@ -256,74 +238,82 @@
 mark_as_advanced(FORCE GLM_DIR)
 mark_as_advanced(FORCE CMAKE_CONFIGURATION_TYPES)

-if(SHARED_LIBS)
-    set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libs, else static libs" FORCE)
-    if(WIN32)
-        if(MSVC)
-            set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
-            set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /Zi")
-            set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
-            set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /Zi")
-        endif(MSVC)
-    endif()
-else()
-    set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs, else static libs" FORCE)
-    if(WIN32)
-        if(MSVC)
+if(WIN32 AND MSVC)
+    if(SHARED_LIBS)
+        set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libs, else static libs" FORCE)
+        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
+        set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
+        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
+        set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd")
+    else()
+        set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs, else static libs" FORCE)
         set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+        set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
         set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
-        set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
         set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
-        endif(MSVC)
-    endif()
-endif()
-
-
-#--------------------------------------------------------------------
-# Disable deprecation warnings for standard C functions
-if(WIN32 AND MSVC)
+    endif()
+
+    if(MSVC_VERSION LESS 1900) # Pre visualstdio 2015
+        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi")
+        set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Zi")
+    else()
+        # For >=VS2015 enable edit and continue "ZI"
+        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")
+        set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /ZI")
+    endif()
+
+    # Disable deprecation warnings for standard C functions
     add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
     string(REGEX REPLACE "[/\\-]Zm[0-9]+" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ym0x20000000")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm512")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
-endif()
-
-
-#--------------------------------------------------------------------
-# MSVC Variable checks and include redist in packs
-if(WIN32)
-    if(MSVC)
-        if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-            if(MSVC_VERSION GREATER 1599)
-              # VS 10 and later:
-              set(CMAKE_MSVC_ARCH x64)
-            else()
-              # VS 9 and earlier:
-              set(CMAKE_MSVC_ARCH amd64)
-            endif()
+
+    # MSVC Variable checks and include redist in packs
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+        if(MSVC_VERSION GREATER 1599)
+          # VS 10 and later:
+          set(CMAKE_MSVC_ARCH x64)
         else()
-            set(CMAKE_MSVC_ARCH x86)
-        endif()
-        if(MSVC90)
-            set(MSVC_ACRO "9")
-        elseif(MSVC10)
-            set(MSVC_ACRO "10")
-        elseif(MSVC11)
-            set(MSVC_ACRO "11")
-        elseif(MSVC12)
-            set(MSVC_ACRO "12")
-        endif()
-        if(IVW_PACKAGE_PROJECT AND BUILD_SHARED_LIBS)
-            if(DEFINED MSVC_ACRO)
-                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
-                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcr${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
-                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
-                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcr${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
-            endif()
-        endif()
-    endif()
+          # VS 9 and earlier:
+          set(CMAKE_MSVC_ARCH amd64)
+        endif()
+    else()
+        set(CMAKE_MSVC_ARCH x86)
+    endif()
+    if(MSVC90)
+        set(MSVC_ACRO "9")
+    elseif(MSVC10)
+        set(MSVC_ACRO "10")
+    elseif(MSVC11)
+        set(MSVC_ACRO "11")
+    elseif(MSVC12)
+        set(MSVC_ACRO "12")
+    elseif(MSVC14)
+        set(MSVC_ACRO "14")
+    endif()
+    if(IVW_PACKAGE_PROJECT AND BUILD_SHARED_LIBS)
+        if(DEFINED MSVC_ACRO)
+            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugCRT/msvcr${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+            install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.CRT/msvcr${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
+        endif()
+    endif()
+
+    # Multicore builds
+    option(IVW_MULTI_PROCESSOR_BUILD "Build with multiple processors" ON)
+    set(IVW_MULTI_PROCESSOR_COUNT 0 CACHE STRING "Number of cores to use (defalt 0 = all)")
+    if(IVW_MULTI_PROCESSOR_BUILD)
+        if(IVW_MULTI_PROCESSOR_COUNT GREATER 1 AND IVW_MULTI_PROCESSOR_COUNT LESS 1024)
+            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${IVW_MULTI_PROCESSOR_COUNT}")
+            SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${IVW_MULTI_PROCESSOR_COUNT}")
+        else()
+            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
+            SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
+        endif()
+    endif()
 endif()

 #--------------------------------------------------------------------
@@ -336,13 +326,9 @@
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
         if(IVW_PACKAGE_PROJECT AND BUILD_SHARED_LIBS)
-            if(WIN32)
-                if(MSVC)
-                    if(DEFINED MSVC_ACRO)
-                        install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugOpenMP/vcomp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
-                        install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.OPENMP/vcomp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
-                    endif()
-                endif()
+            if(WIN32 AND MSVC AND DEFINED MSVC_ACRO)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.DebugOpenMP/vcomp${MSVC_ACRO}0d.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Debug)
+                install(FILES "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/redist/${CMAKE_MSVC_ARCH}/Microsoft.VC${MSVC_ACRO}0.OPENMP/vcomp${MSVC_ACRO}0.dll" DESTINATION bin COMPONENT core CONFIGURATIONS Release)
             endif()
         endif()
     endif()
@@ -352,22 +338,8 @@
 # Set preprocessor definition to indicate whether
 # to use the debug postfix
 # Add debug postfix if WIN32
-IF(WIN32)
-    IF(MSVC)
-        SET(CMAKE_DEBUG_POSTFIX "d")
-
-        option(IVW_MULTI_PROCESSOR_BUILD "Build with multiple processors" ON)
-        set(IVW_MULTI_PROCESSOR_COUNT 0 CACHE STRING "Number of cores to use (defalt 0 = all)")
-        if(IVW_MULTI_PROCESSOR_BUILD)
-            if(IVW_MULTI_PROCESSOR_COUNT GREATER 1 AND IVW_MULTI_PROCESSOR_COUNT LESS 1024)
-                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${IVW_MULTI_PROCESSOR_COUNT}")
-                SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${IVW_MULTI_PROCESSOR_COUNT}")
-            else()
-                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
-                SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
-            endif()
-        endif()
-    ENDIF(MSVC)
+IF(WIN32 AND MSVC)
+    SET(CMAKE_DEBUG_POSTFIX "d")
 ENDIF()

 if(DEBUG_POSTFIX)
@@ -388,26 +360,40 @@
     add_definitions(-DIVW_PROFILING)
 endif(IVW_PROFILING)

-IF(NOT MSVC)
-    include(CheckCXXCompilerFlag)
-    CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
-    if(COMPILER_SUPPORTS_CXX11)
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-    elseif(COMPILER_SUPPORTS_CXX0X)
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-    else()
-        ivw_message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
-    endif()
+
+#--------------------------------------------------------------------
+# Precompile headers
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    option(PRECOMPILED_HEADERS "Create and use precompilied headers" OFF)
 else()
-    if( MSVC_VERSION LESS 1700 )       # VC10-/VS2010-
-        ivw_message(FATAL_ERROR "Inviwo requires C++11 features. "
-                        "You need at least Visual Studio 11 (Microsoft Visual Studio 2012), "
-                        "with Microsoft Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012).")
-    elseif( MSVC_VERSION EQUAL 1700 )  # VC11/VS2012
-        set(CMAKE_GENERATOR_TOOLSET "v120_CTP_Nov2012" CACHE STRING "Platform Toolset" FORCE)
-    endif()
-endif()
-
-
-
+    option(PRECOMPILED_HEADERS "Create and use precompilied headers" ON)
+endif()
+
+include(${CMAKE_CURRENT_LIST_DIR}/clean_library_list.cmake)
+if(PRECOMPILED_HEADERS)
+    include(${CMAKE_CURRENT_LIST_DIR}/cotire.cmake)
+endif()
+
+mark_as_advanced(
+    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS
+    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH
+    COTIRE_DEBUG
+    COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES
+    COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES
+    COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS
+    COTIRE_VERBOSE
+)
+
+# Exclude stuff from cotire
+set(IVW_COTIRE_EXCLUDES
+    "${IVW_EXTENSIONS_DIR}/warn"
+    "${IVW_MODULE_DIR}/unittests/ext"
+)
+
+if(WIN32 AND MSVC AND DEFINED MSVC_ACRO)
+    list(APPEND IVW_COTIRE_EXCLUDES
+        "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/include/thread"
+        "C:/Program Files (x86)/Microsoft Visual Studio ${MSVC_ACRO}.0/VC/include/thr/xthread")
+endif()
+
+


CMake: correct-build-number

CMake: correct-build-number

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -30,7 +30,7 @@
 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
 set(IVW_PATCH_VERSION 9)
-set(IVW_BUILD_VERSION 0) # set to zero when doing a release, bump to 1 directly after the release.
+set(IVW_BUILD_VERSION 1) # set to zero when doing a release, bump to 1 directly after the release.

 if(${IVW_BUILD_VERSION})
     set(IVW_VERSION ${IVW_MAJOR_VERSION}.${IVW_MINOR_VERSION}.${IVW_PATCH_VERSION}.${IVW_BUILD_VERSION})


cmake: Auto-detect libgcc/rt on Linux

cmake: Auto-detect libgcc/rt on Linux

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -274,11 +274,6 @@
 target_link_libraries(service ${CRTI})
 target_link_libraries(service ${CRT1})

-add_library(libgcc STATIC IMPORTED)
-set_target_properties(libgcc PROPERTIES LINKER_LANGUAGE C)
-set_target_properties(libgcc PROPERTIES IMPORTED_LOCATION ${INSTALL_LOC}/${ARCH}/lib/libcompiler.a)
-
-
 add_library(libos STATIC IMPORTED)
 set_target_properties(libos PROPERTIES LINKER_LANGUAGE CXX)
 set_target_properties(libos PROPERTIES IMPORTED_LOCATION ${INSTALL_LOC}/${ARCH}/lib/libos.a)
@@ -333,8 +328,25 @@

 add_library(libpthread STATIC IMPORTED)
 set_target_properties(libpthread PROPERTIES LINKER_LANGUAGE C)
-set_target_properties(libpthread PROPERTIES IMPORTED_LOCATION ${INSTALL_LOC}/${ARCH}/lib/libpthread.a)
-
+set_target_properties(libpthread PROPERTIES IMPORTED_LOCATION "${INSTALL_LOC}/${ARCH}/lib/libpthread.a")
+
+# libgcc/compiler-rt detection
+if (UNIX)
+  execute_process(
+      COMMAND ${CMAKE_CXX_COMPILER} --target=${TRIPLE} --print-libgcc-file-name
+      RESULT_VARIABLE CC_RT_RES
+      OUTPUT_VARIABLE COMPILER_RT_FILE OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if (NOT ${CC_RT_RES} EQUAL 0)
+    message(AUTHOR_WARNING "Failed to detect libgcc/compiler-rt: ${COMPILER_RT_FILE}")
+  endif()
+endif()
+if (NOT COMPILER_RT_FILE)
+  set(COMPILER_RT_FILE "${INSTALL_LOC}/${ARCH}/lib/libcompiler.a")
+endif()
+
+add_library(libgcc STATIC IMPORTED)
+set_target_properties(libgcc PROPERTIES LINKER_LANGUAGE C)
+set_target_properties(libgcc PROPERTIES IMPORTED_LOCATION "${COMPILER_RT_FILE}")

 if ("${PLATFORM}" STREQUAL "x86_solo5")
   add_library(solo5 STATIC IMPORTED)
@@ -423,11 +435,6 @@
   target_link_libraries(service --whole-archive tarfile --no-whole-archive)
 endif(TARFILE)

-#add_library(crtn STATIC IMPORTED)
-#set_target_properties(crtn PROPERTIES LINKER_LANGUAGE CXX)
-#set_target_properties(crtn PROPERTIES IMPORTED_LOCATION ${INSTALL_LOC}/${ARCH}/lib/libcrtn.a)
-
-
 if ("${PLATFORM}" STREQUAL "x86_solo5")
   target_link_libraries(service solo5)
 endif()


cmake: Dont strip binary by default

cmake: Dont strip binary by default

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -242,12 +242,9 @@
 set(BUILD_SHARED_LIBRARIES OFF)
 set(CMAKE_EXE_LINKER_FLAGS "-static")

-set(STRIP_LV)
+set(LD_STRIP)
 if (NOT debug)
-  set(STRIP_LV "--strip-debug")
-endif()
-if (stripped)
-  set(STRIP_LV "--strip-all")
+  set(LD_STRIP "--strip-debug")
 endif()

 set(ELF ${ARCH})
@@ -261,7 +258,7 @@
   set(PRE_BSS_SIZE  "--defsym PRE_BSS_AREA=0x200000")
 endif()

-set(LDFLAGS "-nostdlib -melf_${ELF} --eh-frame-hdr ${STRIP_LV} --script=${INSTALL_LOC}/${ARCH}/linker.ld ${PRE_BSS_SIZE}")
+set(LDFLAGS "-nostdlib -melf_${ELF} --eh-frame-hdr ${LD_STRIP} --script=${INSTALL_LOC}/${ARCH}/linker.ld ${PRE_BSS_SIZE}")

 set_target_properties(service PROPERTIES LINK_FLAGS "${LDFLAGS}")

@@ -479,20 +476,18 @@
 # write binary location to known file
 file(WRITE ${CMAKE_BINARY_DIR}/binary.txt ${BINARY})

-set(STRIP_LV ${CMAKE_STRIP} --strip-all ${BINARY})
-if (debug)
-  unset(STRIP_LV)
-endif()
-
+# old behavior: remote all symbols after elfsym
 if (NOT debug)
-  add_custom_target(
-    pruned_elf_symbols ALL
-    COMMAND ${INSTALL_LOC}/bin/elf_syms ${BINARY}
-    COMMAND ${CMAKE_OBJCOPY} --update-section .elf_symbols=_elf_symbols.bin ${BINARY} ${BINARY}
-    COMMAND ${STRIP_LV}
-    DEPENDS service
-    )
-endif()
+  set(STRIP_LV ${CMAKE_STRIP} --strip-all ${BINARY})
+endif()
+
+add_custom_target(
+  pruned_elf_symbols ALL
+  COMMAND ${INSTALL_LOC}/bin/elf_syms ${BINARY}
+  COMMAND ${CMAKE_OBJCOPY} --update-section .elf_symbols=_elf_symbols.bin ${BINARY} ${BINARY}
+  #COMMAND ${STRIP_LV}
+  DEPENDS service
+  )

 # create bare metal .img: make legacy_bootloader
 add_custom_target(


update filelists

update filelists

--- test/FileList.cmake
+++ test/FileList.cmake
@@ -3,8 +3,8 @@
     test/src/BitLibTest.cpp
     test/src/EndianTest.cpp
     test/src/MolLookupTest.cpp
-    test/src/CircuitTester.cpp
-    test/src/PSFParserTest.cpp
+    #test/src/CircuitTester.cpp
+    #test/src/PSFParserTest.cpp
     test/src/ConsistentTrajectoryTest.cpp
     test/src/CheckpointTest.cpp
 )
@@ -29,9 +29,9 @@
    src/CheckpointOutput.cpp
    src/CheckpointSetup.cpp
    src/DCDlib.cpp
-   src/ExtendedSystemOutput.cpp
    src/EnPartCntSampleOutput.cpp
    src/ExtendedSystem.cpp
+   src/ExtendedSystemOutput.cpp
    src/Ewald.cpp
    src/EwaldCached.cpp
    src/FFConst.cpp
@@ -43,6 +43,7 @@
    src/Geometry.cpp
    src/HistOutput.cpp
    src/InputFileReader.cpp
+   #src/Main.cpp
    src/MoleculeKind.cpp
    src/MoleculeLookup.cpp
    src/Molecules.cpp
@@ -101,11 +102,11 @@
    src/CoordinateSetup.h
    src/CPUSide.h
    src/DCDlib.h
-   src/ExtendedSystemOutput.h
    src/EnergyTypes.h
    src/EnPartCntSampleOutput.h
    src/EnsemblePreprocessor.h
    src/ExtendedSystem.h
+   src/ExtendedSystemOutput.h
    src/Ewald.h
    src/EwaldCached.h
    src/FFAngles.h
@@ -241,4 +242,4 @@
 source_group("Header Files" FILES ${headers})
 source_group("Lib Headers" FILES ${libHeaders})
 source_group("CUDA Header Files" FILES ${cudaHeaders})
-source_group("CUDA Source Files" FILES ${cudaSources})
+source_group("CUDA Source Files" FILES ${cudaSources})


SVN_MERGE

SVN_MERGE

Merged revisions 1030650 via svnmerge from
https://vkrause@svn.kde.org/home/kde/branches/work/akonadi-ports/kdepim

........
  r1030650 | tmcguire | 2009-10-02 23:05:46 +0200 (Fri, 02 Oct 2009) | 1 line

  Name it 'Personal Calendar', to be more similar to the default contact resource.
........

svn path=/trunk/KDE/kdepim/; revision=1031495

--- akonadi/defaultsetup/defaultcalendar.cmake
+++ akonadi/defaultsetup/defaultcalendar.cmake
@@ -1,7 +1,7 @@
 [Agent]
 Id=defaultcalendar
 Type=akonadi_ical_resource
-Name=My Calendar
+Name=Personal Calendar

 [Settings]
 Path[$e]=~/${KDE_DEFAULT_HOME}/share/apps/korganizer/std.ics


fpta-cmake: fix check support for '%cI' for git < 2.0

--- cmake.fpta/utils.cmake
+++ cmake.fpta/utils.cmake
@@ -60,7 +60,7 @@
       OUTPUT_STRIP_TRAILING_WHITESPACE
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       RESULT_VARIABLE rc)
-    if(rc)
+    if(rc OR "${name}_GIT_TIMESTAMP" STREQUAL "%cI")
       message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%cI HEAD' failed)")
     endif()


edit description

edit description

--- cmake/BuildTests.cmake
+++ cmake/BuildTests.cmake
@@ -5,7 +5,7 @@
 #  And builds them as part of a single binary for push-button execution
 #  Args:
 #    test_project (string): test project name
-#    filter (string): source file filter to use with CMake's file (GLOB_RECURSE ...)
+#    filter (string): source file filter to use with CMake's file(GLOB_RECURSE ...) routine
 # ----------------------------------------------------------------------------

 FUNCTION(build_tests test_project filter)


Fix build paths for NaCl VMs

Fix build paths for NaCl VMs

--- cmake/DaemonGame.cmake
+++ cmake/DaemonGame.cmake
@@ -71,7 +71,7 @@
             set(vm nacl-vms)
             ExternalProject_Add(${vm}
                 SOURCE_DIR ${CMAKE_SOURCE_DIR}
-                BUILD_IN_SOURCE 0
+                BINARY_DIR ${CMAKE_BINARY_DIR}/${vm}
                 CMAKE_GENERATOR ${VM_GENERATOR}
                 CMAKE_ARGS
                     -DFORK=2
@@ -99,10 +99,8 @@
         endif()
     else()
         if (FORK EQUAL 2)
-            set(CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR}/..)
-            set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
-            set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
-            set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
+            # Put the .nexe and .pexe files in the same directory as the engine
+            set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/..)
         endif()

         add_executable(${GAMEMODULE_NAME}-nacl ${PCH_FILE} ${GAMEMODULE_FILES} ${SHAREDLIST} ${COMMONLIST})


Fix 64bit nacl suffix

Fix 64bit nacl suffix

--- cmake/DaemonGame.cmake
+++ cmake/DaemonGame.cmake
@@ -123,6 +123,6 @@

         # Generate NaCl executables for x86 and x86_64
         pnacl_translate(${GAMEMODULE_NAME}-nacl-exe i686 "-x86")
-        pnacl_translate(${GAMEMODULE_NAME}-nacl-exe x86-64 "-x86-64")
+        pnacl_translate(${GAMEMODULE_NAME}-nacl-exe x86-64 "-x86_64")
     endif()
 endfunction()


Updating FindGear2D.cmake to list gear2d-main.cc and to have gear2d_component macro

--- cmake/FindGear2D.cmake
+++ cmake/FindGear2D.cmake
@@ -7,6 +7,7 @@
 # Gear2D_INCLUDE_DIR, where to find gear2d.h
 # Gear2D_LINK_DIR, where to find gear2d.so/gear2d.dll
 # Gear2D_COMPONENT_PREFIX, prefix to install components
+

 if (NOT Gear2D_FOUND)

@@ -94,8 +95,6 @@
   )
 endif(WIN32)

-
-
 IF(Gear2D_INCLUDE_DIR)
   IF(Gear2D_LIBRARY)
     SET(Gear2D_FOUND TRUE)
@@ -108,9 +107,9 @@

 IF(Gear2D_FOUND)
   get_filename_component(Gear2D_LINK_DIR ${Gear2D_LIBRARY} PATH)
-    execute_process(COMMAND ${Gear2D_EXECUTABLE} -v OUTPUT_VARIABLE Gear2D_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-  SET(Gear2D_COMPONENT_PREFIX ${Gear2D_LINK_DIR}/../lib/gear2d/component)
-  SET(Gear2D_MAIN ${Gear2D_LINK_DIR}/../share/gear2d/main.cc)
+  execute_process(COMMAND ${Gear2D_EXECUTABLE} -v OUTPUT_VARIABLE Gear2D_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+  get_filename_component(Gear2D_COMPONENT_PREFIX ${Gear2D_LINK_DIR}/../lib/gear2d/component ABSOLUTE)
+  get_filename_component(Gear2D_MAIN ${Gear2D_LINK_DIR}/../share/gear2d/main.cc ABSOLUTE)
   IF (NOT Gear2D_FIND_QUIETLY)
     MESSAGE(STATUS "Found Gear2D: ${Gear2D_LIBRARY} version ${Gear2D_VERSION}")
     MESSAGE(STATUS "Guessed Gear2D component prefix: ${Gear2D_COMPONENT_PREFIX}")
@@ -121,4 +120,16 @@
   ENDIF (Gear2D_FIND_REQUIRED)
 ENDIF(Gear2D_FOUND)

+# Macro to help declare a component;
+# family is the family of the component, it defines where it will be installed;
+# type is the type of the component, it defines the library name;
+# sources keeps the source files for this component
+macro(gear2d_component family type sources)
+  message(STATUS "Component ${family}/${type} from sources ${sources}")
+  add_library(${type} MODULE ${sources})
+  add_library(${type}-static STATIC ${sources})
+  target_link_libraries(${type} ${Gear2D_LIBRARY})
+  install(TARGETS ${type} ${type}-static LIBRARY DESTINATION ${Gear2D_COMPONENT_PREFIX}/${family} ARCHIVE DESTINATION ${Gear2D_COMPONENT_PREFIX}/${family})
+endmacro()
+
 ENDIF(NOT Gear2D_FOUND)


fix warning message if gtest is not found (#458)

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -100,7 +100,7 @@
       message(STATUS "Found gtest sources under '${_CATKIN_GTEST_BASE_DIR}': gtests will be built")
     endif()
     if(NOT GTEST_FROM_SOURCE_FOUND)
-      message(WARNING "gtest not found, C++ tests can not be built. You can run 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the root of your workspace")
+      message(WARNING "gtest not found, C++ tests can not be built. You can run 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the source space '${CMAKE_SOURCE_DIR}' of your workspace")
     endif()
   endif()
   if(GTEST_FROM_SOURCE_FOUND)


Added mingw support. (2)

Added mingw support. (2)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -18,6 +18,14 @@

 # Compiler
 if(UNIX)
+    exec_program(uname ARGS -m OUTPUT_VARIABLE CC_ARCH)
+    if(${CC_ARCH} STREQUAL "x86_64" OR ${CC_ARCH} STREQUAL "amd64")
+        set(CC_ARCH "x86_64")
+    elseif(${CC_ARCH} STREQUAL "i386" OR ${CC_ARCH} STREQUAL "i486" OR ${CC_ARCH} STREQUAL "i586" OR ${CC_ARCH} STREQUAL "i686" OR ${CC_ARCH} STREQUAL "i786")
+        set(CC_ARCH "x86")
+    else()
+        message(FATAL_ERROR "Platform ${CC_ARCH} not yet supported.")
+    endif()
     if(DEFINED ENV{CC})
         find_program(CC_FOUND NAMES $ENV{CC})
         if(NOT CC_FOUND)
@@ -60,25 +68,16 @@
             else()
                 string(SUBSTRING "${CC_VERSION}" 0 3 CC_VERSION)
             endif()
+            if($ENV{CC} STREQUAL "x86_64-w64-mingw32-gcc" )
+                set(CC_ARCH "x86_64")
+            elseif($ENV{CC} STREQUAL "i686-w64-mingw32-gcc")
+                set(CC_ARCH "x86")
+            endif()
         endif()
     else()
         set(CC_NAME "gcc")
         exec_program(${CC_NAME} ARGS -dumpversion OUTPUT_VARIABLE CC_VERSION)
         string(SUBSTRING "${CC_VERSION}" 0 3 CC_VERSION)
-    endif()
-    if($ENV{CC} STREQUAL "x86_64-w64-mingw32-gcc" )
-        set(CC_ARCH "x86_64")
-    elseif($ENV{CC} STREQUAL "i686-w64-mingw32-gcc")
-        set(CC_ARCH "x86")
-    else()
-        exec_program(uname ARGS -m OUTPUT_VARIABLE CC_ARCH)
-        if(${CC_ARCH} STREQUAL "x86_64" OR ${CC_ARCH} STREQUAL "amd64")
-            set(CC_ARCH "x86_64")
-        elseif(${CC_ARCH} STREQUAL "i386" OR ${CC_ARCH} STREQUAL "i486" OR ${CC_ARCH} STREQUAL "i586" OR ${CC_ARCH} STREQUAL "i686" OR ${CC_ARCH} STREQUAL "i786")
-            set(CC_ARCH "x86")
-        else()
-            message(FATAL_ERROR "Platform ${CC_ARCH} not yet supported.")
-        endif()
     endif()
 else()
     set(CC_NAME "msvc")


removed -g from release mode

removed -g from release mode

--- common/cmake/icc.cmake
+++ common/cmake/icc.cmake
@@ -27,7 +27,7 @@
 SET(CMAKE_C_COMPILER "icc")
 SET(CMAKE_CXX_FLAGS "-Wall -fPIC -std=c++11 -no-ansi-alias -static-intel -fasm-blocks")
 SET(CMAKE_CXX_FLAGS_DEBUG          "-DDEBUG  -g -O0")
-SET(CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG    -O3 -restrict -g")
+SET(CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG    -O3 -restrict")
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG  -g -O3 -restrict")
 SET(CMAKE_EXE_LINKER_FLAGS "")


COMP: Fix install when bundled in Slicer custom application

See https://github.com/Kitware/SlicerSALT/issues/224

--- SuperBuild/External_python-ShapeVariationAnalyzer-requirements.cmake
+++ SuperBuild/External_python-ShapeVariationAnalyzer-requirements.cmake
@@ -2,6 +2,16 @@

 # Set dependency list
 set(${proj}_DEPENDENCIES "")
+if(Slicer_SOURCE_DIR)
+  set(${proj}_DEPENDENCIES
+    python
+    python-pip
+    python-setuptools
+    python-numpy
+    python-scipy
+    python-wheel
+    )
+endif()

 if(NOT DEFINED Slicer_USE_SYSTEM_${proj})
   set(Slicer_USE_SYSTEM_${proj} ${Slicer_USE_SYSTEM_python})


build: fix missing dependency for library

When building a VPP library out of tree using add_vpp_library, the build
sometimes fails because the library API files are not necessarily
generated before compiling this library.

This is fixed by adding the lib API files as dependencies of the
lib compilation.

Type: fix
Signed-off-by: Guillaume Solignac <ad0dc69dd6763c9854d3c18f1f698c31c2ec7259@cisco.com>
Change-Id: I69dffaecbfd547f10115504494a47358c4624258

--- src/cmake/library.cmake
+++ src/cmake/library.cmake
@@ -78,6 +78,10 @@

   if(NOT VPP_EXTERNAL_PROJECT)
     add_dependencies(${lo} api_headers)
+  endif()
+
+  if(VPP_EXTERNAL_PROJECT AND ARG_API_FILES)
+    add_dependencies(${lo} ${lib}_api_headers)
   endif()

   if(ARG_DEPENDS)


Testing: test both openexr old and core versions (#3604)

On any one platform, our testsuite was only testing the old C++ and
the new C core exr implementations.

Rig it to run the openexr-oriented tests twice -- once in each state
(when using OpenEXR new enough to support the core library).

Doing this cleanly required adding SUFFIX and ENVIRONMENT optional
parameters to the oiio_add_tests utility macro. Once that was added,
the texture batch testing could be implemented that way as well,
removing a bunch of hackier special purpose code.

--- src/cmake/testing.cmake
+++ src/cmake/testing.cmake
@@ -22,28 +22,6 @@

-# oiio_set_testenv() - add environment variables to a test
-#
-# Usage:
-#   oiio_set_testenv ( testname
-#                      testsuite  - The root of all tests ${CMAKE_SOURCE_DIR}/testsuite
-#                      testsrcdir - Current test directory in ${CMAKE_SOURCE_DIR}
-#                      testdir    - Current test sandbox in ${CMAKE_BINARY_DIR}
-#                      IMAGEDIR   - Optional path to image reference/compare directory)
-#
-macro (oiio_set_testenv testname testsuite testsrcdir testdir IMAGEDIR)
-    set_property(TEST ${testname} PROPERTY ENVIRONMENT
-                "OIIO_TESTSUITE_ROOT=${testsuite}"
-                ";OIIO_TESTSUITE_SRC=${testsrcdir}"
-                ";OIIO_TESTSUITE_CUR=${testdir}")
-    if (NOT ${IMAGEDIR} STREQUAL "")
-        set_property(TEST ${testname} APPEND PROPERTY ENVIRONMENT
-                     "OIIO_TESTSUITE_IMAGEDIR=${IMAGEDIR}")
-    endif()
-endmacro ()
-
-
-
 # oiio_add_tests() - add a set of test cases.
 #
 # Usage:
@@ -52,6 +30,8 @@
 #                    [ URL http://find.reference.cases.here.com ]
 #                    [ FOUNDVAR variable_name ... ]
 #                    [ ENABLEVAR variable_name ... ]
+#                    [ SUFFIX suffix ]
+#                    [ ENVIRONMENT "VAR=value" ... ]
 #                  )
 #
 # The optional argument IMAGEDIR is used to check whether external test images
@@ -65,8 +45,13 @@
 # The optional ENABLEVAR introduces variables (typically ENABLE_Foo) that
 # if existing and yet false, will skip the test.
 #
+# The optional SUFFIX is appended to the test name.
+#
+# The optinonal ENVIRONMENT is a list of environment variables to set for the
+# test.
+#
 macro (oiio_add_tests)
-    cmake_parse_arguments (_ats "" "" "URL;IMAGEDIR;LABEL;FOUNDVAR;ENABLEVAR;TESTNAME" ${ARGN})
+    cmake_parse_arguments (_ats "" "SUFFIX;TESTNAME" "URL;IMAGEDIR;LABEL;FOUNDVAR;ENABLEVAR;ENVIRONMENT" ${ARGN})
        # Arguments: <prefix> <options> <one_value_keywords> <multi_value_keywords> args...
     set (_ats_testdir "${OIIO_TESTSUITE_IMAGEDIR}/${_ats_IMAGEDIR}")
     # If there was a FOUNDVAR param specified and that variable name is
@@ -95,12 +80,15 @@
     else ()
         # Add the tests if all is well.
         set (_has_generator_expr TRUE)
+        set (_testsuite "${CMAKE_SOURCE_DIR}/testsuite")
         foreach (_testname ${_ats_UNPARSED_ARGUMENTS})
-            set (_testsuite "${CMAKE_SOURCE_DIR}/testsuite")
             set (_testsrcdir "${_testsuite}/${_testname}")
-            set (_testdir "${CMAKE_BINARY_DIR}/testsuite/${_testname}")
+            set (_testdir "${CMAKE_BINARY_DIR}/testsuite/${_testname}${_ats_SUFFIX}")
             if (_ats_TESTNAME)
                 set (_testname "${_ats_TESTNAME}")
+            endif ()
+            if (_ats_SUFFIX)
+                set (_testname "${_testname}${_ats_SUFFIX}")
             endif ()
             if (_ats_LABEL MATCHES "broken")
                 set (_testname "${_testname}-broken")
@@ -114,32 +102,17 @@

             file (MAKE_DIRECTORY "${_testdir}")

-            add_test ( NAME ${_testname}
-                       COMMAND ${_runtest} )
-
-            oiio_set_testenv("${_testname}" "${_testsuite}"
-                             "${_testsrcdir}" "${_testdir}" "${_ats_testdir}")
-
-            # For texture tests, add a second test using batch mode as well.
-            if (_testname MATCHES "texture")
-                set (_testname ${_testname}.batch)
-                set (_testdir ${_testdir}.batch)
-                set (_runtest ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/testsuite/runtest.py" ${_testdir})
-                if (MSVC_IDE)
-                    set (_runtest ${_runtest} --devenv-config $<CONFIGURATION>
-                                          --solution-path "${CMAKE_BINARY_DIR}" )
-                endif ()
-                file (MAKE_DIRECTORY "${_testdir}")
-                add_test ( NAME "${_testname}"
-                           COMMAND env TESTTEX_BATCH=1 ${_runtest} )
-
-                oiio_set_testenv("${_testname}" "${_testsuite}"
-                                 "${_testsrcdir}" "${_testdir}.batch" "${_ats_testdir}")
-            endif ()
-
-            #if (VERBOSE)
-            #    message (STATUS "TEST ${_testname}: ${_runtest}")
-            #endif ()
+            add_test ( NAME ${_testname} COMMAND ${_runtest} )
+            set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT
+                             "OIIO_TESTSUITE_ROOT=${_testsuite}"
+                             "OIIO_TESTSUITE_SRC=${_testsrcdir}"
+                             "OIIO_TESTSUITE_CUR=${_testdir}"
+                             ${_ats_ENVIRONMENT})
+            if (NOT ${_ats_testdir} STREQUAL "")
+                set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT
+                             "OIIO_TESTSUITE_IMAGEDIR=${_ats_testdir}")
+            endif()
+
         endforeach ()
         if (VERBOSE)
            message (STATUS "TESTS: ${_ats_UNPARSED_ARGUMENTS}")
@@ -172,6 +145,9 @@
                     missingcolor
                     null
                     rational
+                   )
+
+    set (all_texture_tests
                     texture-derivs texture-fill
                     texture-flipt texture-gettexels texture-gray
                     texture-interp-bicubic
@@ -195,6 +171,11 @@
                     texture-wrapfill
                     texture-fat texture-skinny
                    )
+    oiio_add_tests (${all_texture_tests})
+    # Duplicate texture tests with batch mode
+    oiio_add_tests (${all_texture_tests}
+                    SUFFIX ".batch"
+                    ENVIRONMENT TESTTEX_BATCH=1)

     # Tests that require oiio-images:
     oiio_add_tests (gpsread
@@ -276,17 +257,31 @@
                     FOUNDVAR OPENJPEG_FOUND
                     IMAGEDIR j2kp4files_v1_5
                     URL http://www.itu.int/net/ITU-T/sigdb/speimage/ImageForm-s.aspx?val=10100803)
-    oiio_add_tests (openexr-suite openexr-multires openexr-chroma
-                    openexr-v2 openexr-window perchannel
-                    oiiotool-deep
+    set (all_openexr_tests
+         openexr-suite openexr-multires openexr-chroma
+         openexr-v2 openexr-window perchannel oiiotool-deep)
+    oiio_add_tests (${all_openexr_tests}
+                    ENVIRONMENT OPENIMAGEIO_OPTIONS="openexr:core=0"
                     IMAGEDIR openexr-images
                     URL http://github.com/AcademySoftwareFoundation/openexr-images)
-    if (NOT DEFINED ENV{${PROJECT_NAME}_CI})
-        oiio_add_tests (openexr-damaged
+    if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.1)
+        # For OpenEXR >= 3.1, be sure to test with the core option on
+        oiio_add_tests (${all_openexr_tests}
+                        SUFFIX ".core"
+                        ENVIRONMENT OPENIMAGEIO_OPTIONS="openexr:core=1"
                         IMAGEDIR openexr-images
                         URL http://github.com/AcademySoftwareFoundation/openexr-images)
     endif ()
+    # if (NOT DEFINED ENV{${PROJECT_NAME}_CI})
+    #     oiio_add_tests (openexr-damaged
+    #                     IMAGEDIR openexr-images
+    #                     URL http://github.com/AcademySoftwareFoundation/openexr-images)
+    # endif ()
     oiio_add_tests (openvdb texture-texture3d
+                    FOUNDVAR OpenVDB_FOUND ENABLEVAR ENABLE_OpenVDB)
+    oiio_add_tests (openvdb texture-texture3d
+                    SUFFIX ".batch"
+                    ENVIRONMENT TESTTEX_BATCH=1
                     FOUNDVAR OpenVDB_FOUND ENABLEVAR ENABLE_OpenVDB)
     oiio_add_tests (png png-damaged
                     ENABLEVAR ENABLE_PNG


Prevent CMake choking on empty vars

Prevent CMake choking on empty vars

--- src/version.cmake
+++ src/version.cmake
@@ -40,6 +40,8 @@
 else()
 	message(STATUS "You are currently on commit ${COMMIT}")

+	# Give our output variable a default value, because CMake likes to choke on empty variables
+	set(TAGGEDCOMMITOUT "a")
 	# Get all the tags
 	execute_process(COMMAND "${GIT}" show-ref --tags -d --abbrev RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMITOUT OUTPUT_STRIP_TRAILING_WHITESPACE)


* Bug fix: Module won't load.  tcl syntax error.

--- scripts/project.mod.cmake
+++ scripts/project.mod.cmake
@@ -23,11 +23,11 @@
 module load roms
 module load stm

-if {![info exists env{CMT_PROJECT_DIALOG_PATH}]} {
-  setenv CMT_PROJECT_DIALOG_PATH @CONFIG_DIR@
-}
 if {![info exists env{CMT_PROJECT_TEMPLATE_PATH}]} {
-{
-  setenv CMT_PROJECT_TEMPLATE_PATH @TEMPLATE_DIR@
+  setenv CMT_PROJECT_TEMPLATE_PATH "@TEMPLATE_DIR@"
 }

+if {![info exists env{CMT_PROJECT_DIALOG_PATH}]} {
+  setenv CMT_PROJECT_DIALOG_PATH "@CONFIG_DIR@"
+}
+


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   13)
+SET(KWSYS_DATE_STAMP_DAY   14)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   30)
+SET(KWSYS_DATE_STAMP_DAY   31)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   11)
+SET(KWSYS_DATE_STAMP_DAY   12)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   15)
+SET(KWSYS_DATE_STAMP_DAY   16)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2010)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 05)
+SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   31)
+SET(KWSYS_DATE_STAMP_DAY   01)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   11)
+SET(KWSYS_DATE_STAMP_DAY   12)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


remove .cmake

remove .cmake

--- src/plate_r/cmake_install.cmake
+++ src/plate_r/cmake_install.cmake
@@ -1,44 +0,0 @@
-# Install script for directory: /home/synod/Desktop/CV/CV_demos/Chapter5_NumberPlateRecognition
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  IF(BUILD_TYPE)
-    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  ELSE(BUILD_TYPE)
-    SET(CMAKE_INSTALL_CONFIG_NAME "")
-  ENDIF(BUILD_TYPE)
-  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
-  IF(COMPONENT)
-    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
-    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  ELSE(COMPONENT)
-    SET(CMAKE_INSTALL_COMPONENT)
-  ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
-# Install shared libraries without execute permission?
-IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-  SET(CMAKE_INSTALL_SO_NO_EXE "1")
-ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-
-IF(CMAKE_INSTALL_COMPONENT)
-  SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-ELSE(CMAKE_INSTALL_COMPONENT)
-  SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-ENDIF(CMAKE_INSTALL_COMPONENT)
-
-FILE(WRITE "/home/synod/Desktop/CV/CV_demos/Chapter5_NumberPlateRecognition/${CMAKE_INSTALL_MANIFEST}" "")
-FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
-  FILE(APPEND "/home/synod/Desktop/CV/CV_demos/Chapter5_NumberPlateRecognition/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
-ENDFOREACH(file)


Remove /RTC1 on non-Debug builds when using MSVC

--- build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
+++ build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
@@ -81,6 +81,10 @@
             STRING(REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
             STRING(REGEX REPLACE "/O2" "/Ox" ${flag_var} "${${flag_var}}")
         ENDFOREACH (flag_var)
+        FOREACH (flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL
+                 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL)
+            LIST(REMOVE_AT ${flag_var} "/RTC1")
+        ENDFOREACH (flag_var)
     endif ()

 ENDMACRO(ADD_ZSTD_COMPILATION_FLAGS)


Minor cleaning up (#57).

Minor cleaning up (#57).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -211,9 +211,12 @@
             # We are dealing with a third-party plugin, so disable all warnings
             # since it may generate some and this is not something we can or
             # should have control over
+            # Note: for some reasons, MSVC eventually uses /W1, so we can't
+            #       replace /W3 /WX with /w since this would conflict with
+            #       /W1 and generate a warning, so...

             IF(WIN32)
-                STRING(REPLACE "/W3 /WX" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+                STRING(REPLACE "/W3 /WX" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
             ELSE()
                 STRING(REPLACE "-Wall -Werror" "-w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
             ENDIF()


Aesthetic update.

Aesthetic update.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -302,10 +302,10 @@
     # libraries on which it depends

     IF(APPLE)
-        FOREACH(LIBRARY ${QT_DEPENDENCIES})
+        FOREACH(QT_LIBRARY ${QT_DEPENDENCIES})
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                               COMMAND install_name_tool -change ${LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${LIBRARY}
-                                                                 @executable_path/../Frameworks/${LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${LIBRARY}
+                               COMMAND install_name_tool -change ${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
+                                                                 @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
                                                                  ${MAC_OS_X_PROJECT_BINARY_DIR}/Contents/PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
         ENDFOREACH()
     ENDIF()


Make sure that any third-party library that is to be used as part of a test is properly 'deployed' in the build directory.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -515,6 +515,15 @@

             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND ${CMAKE_COMMAND} -E copy ${DIR}/${LIBRARY_NAME} ${LIBRARY_LIB_FILEPATH})
+
+            # In the case of a third-party library, we must also copy the
+            # library to the build directory, so that we can test any plugin
+            # that has a dependency on it
+
+            SET(LIBRARY_LIB_TEST_FILEPATH ${CMAKE_BINARY_DIR}/${LIBRARY_NAME})
+
+            ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                               COMMAND ${CMAKE_COMMAND} -E copy ${DIR}/${LIBRARY_NAME} ${LIBRARY_LIB_TEST_FILEPATH})
         ENDIF()
     ELSE()
         # We must deploy a library which is bundled in a Qt framework
@@ -565,14 +574,21 @@
                                                                  ${LIBRARY_LIB_FILEPATH})
         ENDFOREACH()
     ELSE()
-        # Make sure that the library refers to our embedded version of the
-        # libraries on which it depends
+        # Make sure that the third-party library refers to our embedded version
+        # of the libraries on which it depends
+        # Note: we need to do that for both the deployed and 'test' versions of
+        #       the third-party library...

         FOREACH(LIBRARY ${LIBRARIES})
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND install_name_tool -change ${LIBRARY}
                                                                  @executable_path/../Frameworks/${LIBRARY}
                                                                  ${LIBRARY_LIB_FILEPATH})
+
+            ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                               COMMAND install_name_tool -change ${LIBRARY}
+                                                                 ${CMAKE_BINARY_DIR}/${LIBRARY}
+                                                                 ${LIBRARY_LIB_TEST_FILEPATH})
         ENDFOREACH()
     ENDIF()
 ENDMACRO()


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].


CMake: properly support CMake 3.2 and above [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -337,11 +337,8 @@
     #       Ninja needs to know about those files (see CMake policy CMP0058),
     #       which we do through the below...

-    STRING(SHA1 SHA1_VALUE ${FILE_NAME})
-
-    ADD_CUSTOM_TARGET(KEEP_TRACK_OF_FILE_${SHA1_VALUE}
-                      COMMAND ${CMAKE_COMMAND} -E touch ${FILE_NAME}
-                      BYPRODUCTS ${FILE_NAME})
+    ADD_CUSTOM_COMMAND(OUTPUT ${FILE_NAME}
+                       COMMAND ${CMAKE_COMMAND} -E sleep 0)
 ENDMACRO()

 #===============================================================================


[cmake] increment version

[cmake] increment version

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -1,8 +1,8 @@

 set(VERSION_MAJOR 1)
 set(VERSION_MINOR 1)
-set(VERSION_PATCH 0)
-set(VERSION_SUFFIX "-rc2")
+set(VERSION_PATCH 1)
+set(VERSION_SUFFIX "-beta")
 set(VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}")

 add_definitions("-DVERSION_STR=\"${VERSION_STR}\"")


Issue #44: Tidy up Python finding stuff.

--- CMake/mpAddPythonBindings.cmake
+++ CMake/mpAddPythonBindings.cmake
@@ -37,14 +37,10 @@
               OUTPUT_VARIABLE Py_INCLUDE_FILE)
     get_filename_component(PYTHON_INCLUDE_DIR ${Py_INCLUDE_FILE} DIRECTORY)
     message("Found python include dirs from python: ${PYTHON_INCLUDE_DIR}")
-    execute_process(
-      COMMAND "${PYTHON_EXECUTABLE}" -c
-              "from __future__ import print_function\ntry: import sysconfig; print(sysconfig.get_path('stdlib'), end='')\nexcept:pass\n"
-              OUTPUT_VARIABLE Py_LIB_DIR)
-    message("Found python lib dirs from python: ${Py_LIB_DIR}")
-    find_package(PythonLibs)
   endif()

+  find_package(PythonLibs)
+
   message("Found python interpreter: ${PYTHON_EXECUTABLE}")
   message("Found python library version: ${PYTHONLIBS_VERSION_STRING}")
   message("Found python include dirs: ${PYTHON_INCLUDE_DIRS}")


PrintableOptions.cmake: Correct variable name comparison

CMake 3.20.1 errors out with:

CMake Error at cmake/modules/PrintableOptions.cmake:38 (message):
   variable name cannot be empty
 Call Stack (most recent call first):
   CMakeLists.txt:152 (add_printable_variable)

Change how the parameter value is compared, to fix it.

--- cmake/modules/PrintableOptions.cmake
+++ cmake/modules/PrintableOptions.cmake
@@ -19,40 +19,40 @@
 #    prints all the build options previously added with the above functions

 macro(add_printable_variable_bare _name)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	list(APPEND _printable_options ${_name})
 endmacro()

 macro(add_printable_option _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "option name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	option(${_name} ${_description} ${_default_value})
 	add_printable_variable_bare(${_name})
 endmacro()

 macro(add_printable_variable _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	set(${_name} ${_default_value} CACHE STRING ${_description})
 	add_printable_variable_bare(${_name})
 endmacro()

 macro(add_printable_variable_path _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "path variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	set(${_name} ${_default_value} CACHE PATH ${_description})
 	add_printable_variable_bare(${_name})
 endmacro()

 macro(add_printable_variable_filepath _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "filepath variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	set(${_name} ${_default_value} CACHE FILEPATH ${_description})
 	add_printable_variable_bare(${_name})
 endmacro()


Enabling option 'r' (R) when enabling all (-Dall=ON)

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -73,6 +73,7 @@
  set(qtgsi_defvalue ON)
  set(roofit_defvalue ON)
  set(minuit2_defvalue ON)
+ set(r_defvalue ON)
  set(table_defvalue ON)
  set(unuran_defvalue ON)
  set(vc_defvalue ON)
@@ -83,6 +84,7 @@
  set(qtgsi_defvalue OFF)
  set(roofit_defvalue OFF)
  set(minuit2_defvalue OFF)
+ set(r_defvalue OFF)
  set(table_defvalue OFF)
  set(unuran_defvalue OFF)
  set(vc_defvalue OFF)
@@ -163,7 +165,7 @@
 ROOT_BUILD_OPTION(qtgsi ${qtgsi_defvalue} "GSI's Qt integration, requires libqt >= 4.8")
 ROOT_BUILD_OPTION(roofit ${roofit_defvalue} "Build the libRooFit advanced fitting package")
 ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
-ROOT_BUILD_OPTION(r OFF "R ROOT bindings, requires R, Rcpp and RInside")
+ROOT_BUILD_OPTION(r ${r_defvalue} "R ROOT bindings, requires R, Rcpp and RInside")
 ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
 ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
 ROOT_BUILD_OPTION(sapdb ON "MaxDB/SapDB support, requires libsqlod and libsqlrte")


Avoid using the CMake command 'continue()' since it is only available from version 3.X

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -197,13 +197,12 @@

 #---Apply minimal or gminimal------------------------------------------------------------------
 foreach(opt ${root_build_options})
-  if(opt MATCHES "thread|cxx11|cling|builtin_llvm|builtin_ftgl|explicitlink")
-    continue()
-  endif()
-  if(minimal)
-    set(${opt} OFF CACHE BOOL "" FORCE)
-  elseif(gminimal AND NOT opt MATCHES "x11|cocoa")
-    set(${opt} OFF CACHE BOOL "" FORCE)
+  if(NOT opt MATCHES "thread|cxx11|cling|builtin_llvm|builtin_ftgl|explicitlink")
+    if(minimal)
+      set(${opt} OFF CACHE BOOL "" FORCE)
+    elseif(gminimal AND NOT opt MATCHES "x11|cocoa")
+      set(${opt} OFF CACHE BOOL "" FORCE)
+    endif()
   endif()
 endforeach()


More reliable source for MPIR

More reliable source for MPIR

--- source/cmake/Modules/msvc_fetch_mpir.cmake
+++ source/cmake/Modules/msvc_fetch_mpir.cmake
@@ -34,7 +34,7 @@
 					set(MPIR_DL_FILENAME "${MPIR_DL_BASENAME}.tar.bz2")
 					set(MPIR_DL_LOCATION "${DOWNLOADS_DIR}\\${MPIR_DL_FILENAME}")
 					if(NOT EXISTS "${MPIR_DL_LOCATION}")
-						set(MPIR_DL_SERVER "http://mpir.org")
+						set(MPIR_DL_SERVER "https://web.archive.org/web/20160617183355/http://mpir.org")
 						set(MPIR_DL_URI "${MPIR_DL_SERVER}/${MPIR_DL_FILENAME}")
 						message(STATUS "Downloading ${MPIR_DL_URI} to ${MPIR_DL_LOCATION}")
 						file(DOWNLOAD "${MPIR_DL_URI}" "${MPIR_DL_LOCATION}")


Dependencies: bump zlib to 1.2.11 to fix build

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -97,10 +97,10 @@

     if(MSVC OR EMSCRIPTEN) # other platforms ship zlib
         message(STATUS "Building zlib")
-        file(DOWNLOAD
-            http://zlib.net/zlib-1.2.10.tar.gz
-        ./zlib-1.2.10.tar.gz)
-        execute_process(COMMAND cmake -E tar xf zlib-1.2.10.tar.gz)
+        file(DOWNLOAD http://zlib.net/zlib-1.2.11.tar.gz
+            EXPECTED_MD5 1c9f62f0778697a09d36121ead88e08e
+            ./zlib-1.2.11.tar.gz)
+        execute_process(COMMAND cmake -E tar xf zlib-1.2.11.tar.gz)
         execute_process(COMMAND cmake
             -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
             -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
@@ -108,8 +108,8 @@
             -G ${CMAKE_GENERATOR}
             ${CROSS}
             .
-            WORKING_DIRECTORY zlib-1.2.10)
-        execute_process(COMMAND cmake --build zlib-1.2.10 --target install)
+            WORKING_DIRECTORY zlib-1.2.11)
+        execute_process(COMMAND cmake --build zlib-1.2.11 --target install)
     endif()

     message(STATUS "Building ZZIPlib")


Fix checking if a variable is defined before adding to cache

The variable `var` was not being de-referenced to check the existence
of the intended variable.

Change-Id: Ic4b12d0240af431b544d9e2d83be111f66cb24bb

--- CMake/VariableList.cmake
+++ CMake/VariableList.cmake
@@ -7,7 +7,7 @@
 #
 function( VariableListToCache var_list cache )
   foreach( var IN LISTS ${var_list} )
-    if( DEFINED var )
+    if( DEFINED ${var} )
       set( value "${${var}}" )
       get_property( type CACHE ${var} PROPERTY TYPE )
       get_property( advanced CACHE ${var} PROPERTY ADVANCED )


Reject application requests for missing modules

When an application writes

  find_package(VTK ... vtkMissingModule)

vtk_module_config (invoked from VTKConfig.cmake) should reject the
missing module if it is not enabled.  The current vtk_module_load check
incorrectly accepts modules that have been previously enabled in a build
tree but are no longer available.  Test against VTK_MODULES_ENABLED.

Change-Id: If0769b6192bf9c5878b7ef1e581d04df18b6bbef

--- CMake/vtkModuleAPI.cmake
+++ CMake/vtkModuleAPI.cmake
@@ -67,6 +67,18 @@
 #  <namespace>_LIBRARY_DIRS = Library search path (for outside dependencies)
 # Do not name a module as the namespace.
 macro(vtk_module_config ns)
+  set(_${ns}_MISSING ${ARGN})
+  if(_${ns}_MISSING)
+    list(REMOVE_ITEM _${ns}_MISSING ${VTK_MODULES_ENABLED})
+  endif()
+  if(_${ns}_MISSING)
+    set(msg "")
+    foreach(mod ${_${ns}_MISSING})
+      set(msg "${msg}\n  ${mod}")
+    endforeach()
+    message(FATAL_ERROR "Requested modules not available:${msg}")
+  endif()
+
   set(${ns}_DEFINITIONS "")
   set(${ns}_LIBRARIES "")
   set(${ns}_INCLUDE_DIRS "")