fix boost flags

fix boost flags

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -133,13 +133,11 @@
 	"/opt/boost-1.48" CACHE STRING
 	"" )

-FIND_PACKAGE(Boost 1.48.0 REQUIRED)
-INCLUDE_DIR(${Boost_INCLUDE_DIR})
 FIND_PACKAGE( PkgConfig )
+FIND_PACKAGE(Boost 1.42.0 REQUIRED)
 pkg_check_modules( CCGNU REQUIRED libccgnu2 )
-ADD_CXX_FLAGS( "${CCGNU_CFLAGS}")
-ADD_CXX_FLAGS( "-DHAVE_GRIDTYPE" )
-INCLUDE_SYS_DIR(${Boost_INCLUDE_DIR})
+ADD_CXX_FLAGS( "${CCGNU_CFLAGS}" -DHAVE_BOOST=1)
+INCLUDE_SYS_DIR(${Boost_INCLUDE_DIRS})

 #try to enable link-time-optimisation
 # if (CMAKE_COMPILER_IS_GNUCC)


fix(cmake): remove warning

fix(cmake): remove warning

--- cmake/FindElina.cmake
+++ cmake/FindElina.cmake
@@ -16,7 +16,7 @@
   set (ELINA_ROOT "" CACHE PATH "Root of Elina install.")

   find_package (Gmp QUIET)
-  find_package (Mpfr QUIET)
+  find_package (MPFR QUIET)

   find_path(ELINA_INCLUDE_DIR NAMES elina_abstract0.h PATHS ${ELINA_ROOT}/include)


Add imgui_tables.cpp to build

Add imgui_tables.cpp to build

--- cmake/FindImGui.cmake
+++ cmake/FindImGui.cmake
@@ -28,6 +28,7 @@
   ${IMGUI_INCLUDE_DIR}/imgui_draw.cpp
   ${IMGUI_INCLUDE_DIR}/imgui_widgets.cpp
   ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.cpp
+  ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_tables.cpp
 )

 set(IMGUI_DEMO_SOURCES


Increase jupyter nbconvert timeout to 180

--- cmake/Notebooks.cmake
+++ cmake/Notebooks.cmake
@@ -34,7 +34,7 @@
     set(LAUNCHER ${CMAKE_BINARY_DIR}/launcher.sh)
   endif()
   add_custom_target(notebook-${NB_NAME}
-      COMMAND bash -c "${LAUNCHER} jupyter nbconvert --to=html --ExecutePreprocessor.timeout=60 --execute ${CMAKE_BINARY_DIR}/notebook/${NB_NAME}.ipynb")
+      COMMAND bash -c "${LAUNCHER} jupyter nbconvert --to=html --ExecutePreprocessor.timeout=180 --execute ${CMAKE_BINARY_DIR}/notebook/${NB_NAME}.ipynb")
   add_dependencies(notebook-${NB_NAME} biodynamo)
   add_dependencies(notebook-${NB_NAME} copy_files_bdm)
 endfunction(GenerateNotebookTarget)


CMake misses a check for sbrk on NetBSD.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -86,6 +86,7 @@
 check_symbol_exists(mkstemp unistd.h HAVE_MKSTEMP)
 check_symbol_exists(mktemp unistd.h HAVE_MKTEMP)
 check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
+check_symbol_exists(sbrk unistd.h HAVE_SBRK)
 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
 check_symbol_exists(strerror string.h HAVE_STRERROR)
 check_symbol_exists(strerror_r string.h HAVE_STRERROR_R)


CMake: package fix

CMake: package fix

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -32,6 +32,7 @@
     # component namnes which we can't for some of the externals like HDF5
     set(CPACK_MONOLITHIC_INSTALL TRUE)
     set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
+    set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
     if(OpenMP_ON)
         set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
     endif()


Spelling fix.

Spelling fix.

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

--- deal.II/cmake/modules/FindNETCDF.cmake
+++ deal.II/cmake/modules/FindNETCDF.cmake
@@ -33,7 +33,7 @@
 # TODO: netcdf might externally depend on hdf5. Check and fix this.
 #

-FIND_LIBRARY(NETCDF_CPLUSCPLUS_LIBRARY NAMES netcdf_c++ netcdf_cpp
+FIND_LIBRARY(NETCDF_CPLUSPLUS_LIBRARY NAMES netcdf_c++ netcdf_cpp
   HINTS
     ${NETCDF_DIR}
   PATH_SUFFIXES
@@ -48,14 +48,14 @@
   )

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETCDF DEFAULT_MSG
-  NETCDF_CPLUSCPLUS_LIBRARY
+  NETCDF_CPLUSPLUS_LIBRARY
   NETCDF_C_LIBRARY
   NETCDF_INCLUDE_DIR
   )

 IF(NETCDF_FOUND)
   MARK_AS_ADVANCED(
-    NETCDF_CPLUSCPLUS_LIBRARY
+    NETCDF_CPLUSPLUS_LIBRARY
     NETCDF_C_LIBRARY
     NETCDF_INCLUDE_DIR
     NETCDF_DIR


Make sure export map and associated lists are updated.

--- CPM.cmake
+++ CPM.cmake
@@ -496,23 +496,25 @@

   # Build the appropriate definition for the module. We stored the unique ID
   _cpm_build_preproc_name(${name} __CPM_TMP_VAR)
-  if (DEFINED CPM_UNIQUE_ID)
-    add_definitions("-D${__CPM_TMP_VAR}=${CPM_UNIQUE_ID}")
-  else()
-    add_definitions("-D${__CPM_TMP_VAR}=CPM_TESTING_UPPER_LEVEL_NAMESPACE")
-  endif()
+  if (NOT DEFINED CPM_UNIQUE_ID)
+    set(CPM_UNIQUE_ID CPM_TESTING_UPPER_LEVEL_NAMESPACE)
+  endif()
+  add_definitions("-D${__CPM_TMP_VAR}=${CPM_UNIQUE_ID}")
   set(__CPM_TMP_VAR) # Clean up

   # Propogate our exported modules up.
   if (DEFINED CPM_EXPORTED_MODULES)
     set(CPM_EXPORTED_MODULES ${CPM_EXPORTED_MODULES} PARENT_SCOPE)
   endif()
+
+  # Setup the export map.
+  set(CPM_KV_EXPORT_MAP_${CPM_UNIQUE_ID} ${CPM_EXPORTED_MODULES})
+  set(CPM_KV_LIST_EXPORT_MAP ${CPM_KV_LIST_EXPORT_MAP} ${CPM_UNIQUE_ID})

   _cpm_propogate_version_map_up()
   _cpm_propogate_include_map_up()
   _cpm_propogate_definition_map_up()
   _cpm_propogate_export_map_up()
-

   # Setup the module with appropriate definitions and includes.
   # We can do this because we are not in a new scope; instead, we are in a macro
@@ -945,6 +947,22 @@
     # Add ${__CPM_MODULE_SOURCE_DIR} to our include directory map.
     set(${INCLUDE_MAP_NAME} ${${INCLUDE_MAP_NAME}} "${__CPM_MODULE_SOURCE_DIR}")

+    # Check to see if the module exported any of its modules. If so, then export each
+    # of the exported modules into our parents includes / definitions.
+    if (DEFINED CPM_EXPORTED_MODULES)
+      foreach(module IN LISTS CPM_EXPORTED_MODULES)
+        set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
+        set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
+
+        set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
+        set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
+      endforeach()
+    endif()
+
+    # Make sure there are entries for us in the include and definition lists.
+    set(CPM_KV_LIST_INCLUDE_MAP ${CPM_KV_LIST_INCLUDE_MAP} ${__CPM_FULL_UNID})
+    set(CPM_KV_LIST_DEFINITION_MAP ${CPM_KV_LIST_DEFINITION_MAP} ${__CPM_FULL_UNID})
+
   else()
     # We don't need the following line since we are adding the preprocessor definition in the definition map.
     #_cpm_check_and_add_preproc(${name} ${CPM_KV_SOURCE_ADDED_MAP_${__CPM_FULL_UNID}} ${__CPM_FULL_UNID})
@@ -957,22 +975,21 @@
     if (DEFINED ${DEFINITION_MAP_NAME})
       set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${DEFINITION_MAP_NAME}})
     endif()
-  endif()
-
-  # Check to see if the module exported any of its modules. If so, then export each
-  # of the exported modules into our parents includes / definitions.
-  if (DEFINED CPM_EXPORTED_MODULES)
-    foreach(module IN LISTS CPM_EXPORTED_MODULES)
-      set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
-      set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
-
-      set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
-      set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
-    endforeach()
+
+    if (DEFINED CPM_KV_EXPORT_MAP_${__CPM_FULL_UNID})
+      foreach(module IN LISTS ${CPM_KV_EXPORT_MAP_${__CPM_FULL_UNID}})
+        set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
+        set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
+
+        set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
+        set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
+      endforeach()
+    endif()
+
   endif()

   # If we are exporting this module, be sure the parent knows.
-  if (_CPM_EXPORT_MODULE)
+  if ((DEFINED _CPM_EXPORT_MODULE) AND (_CPM_EXPORT_MODULE))
     set(CPM_EXPORTED_MODULES ${CPM_EXPORTED_MODULES} ${__CPM_FULL_UNID} PARENT_SCOPE)
   endif()


updated default SIRF_TAG

updated default SIRF_TAG

need fix in library dependencies (will be needed to get SIRFReg to compile)

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

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG 311e5252142e64ffb4de682a6963c90782dfeed4)
+  set(DEFAULT_STIR_TAG 9e62872c74cbcea1886d107cb22ab28a5a33083e)

   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )


- Add EMSCRIPTEN as flag in CMake toolchain

--- cmake/Toolchains/js-emscripten.toolchain.cmake
+++ cmake/Toolchains/js-emscripten.toolchain.cmake
@@ -19,6 +19,8 @@
 # The following variable describes the target OS we are building to.
 set(CMAKE_SYSTEM_NAME Emscripten)
 set(CMAKE_SYSTEM_VERSION 1)
+
+set( EMSCRIPTEN ON CACHE BOOL "" )

 option ( COFFEE_GENERATE_HTML "Generate HTML wrapper document for Emscripten" ON )
 option ( COFFEE_GENERATE_WASM "Generate WASM version of code, not asm.js" OFF )


- Fix Emscripten builds for WASM

- Fix Emscripten builds for WASM

--- cmake/Toolchains/js-emscripten.toolchain.cmake
+++ cmake/Toolchains/js-emscripten.toolchain.cmake
@@ -26,8 +26,10 @@
 option ( COFFEE_GENERATE_WASM "Generate WASM version of code, not asm.js" OFF )

 if(COFFEE_GENERATE_WASM)
-    set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1" )
-    set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s WASM=1" )
+    message ( STATUS "Generating WASM assembly" )
+    set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1 -O2" CACHE STRING "" )
+    set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s WASM=1 -O2" CACHE STRING "" )
+    set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1 -O2" CACHE STRING "" )
 endif()

 set(CMAKE_CROSSCOMPILING TRUE)
@@ -232,22 +234,22 @@
 set(CMAKE_WORDS_BIGENDIAN 0)
 set(CMAKE_DL_LIBS)

-set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELEASE")
-set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_MINSIZEREL")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELWITHDEBINFO")
-set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE")
-set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_MINSIZEREL")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELWITHDEBINFO")
-
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELEASE")
-set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_MINSIZEREL")
-set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO")
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELEASE")
-set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL")
-set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO")
-set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELEASE")
-set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL")
-set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELEASE")
+set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_MINSIZEREL")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELWITHDEBINFO")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE")
+set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_MINSIZEREL")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELWITHDEBINFO")
+
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} -O2" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELEASE")
+set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS} -Os" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_MINSIZEREL")
+set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} -O2 -g" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} -O2" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELEASE")
+set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS} -Os" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL")
+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} -O2 -g" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO")
+set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} -O2" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELEASE")
+set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS} -Os" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL")
+set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} -O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO")

 function(em_validate_asmjs_after_build target)
 	add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo Validating build output for asm.js... COMMAND "python" ARGS "${EMSCRIPTEN_ROOT_PATH}/tools/validate_asmjs.py" "$<TARGET_FILE:${target}>")


Made debugger tools optional.

Made debugger tools optional.

--- cmake/toolchains/Toolchain-arm-none-eabi.cmake
+++ cmake/toolchains/Toolchain-arm-none-eabi.cmake
@@ -37,12 +37,18 @@
 cmake_force_cxx_compiler(${CXX_COMPILER} GNU)

 # compiler tools
-foreach(tool objcopy nm ld gdb gdbtui)
+foreach(tool objcopy nm ld)
 	string(TOUPPER ${tool} TOOL)
 	find_program(${TOOL} arm-none-eabi-${tool})
 	if(NOT ${TOOL})
 		message(FATAL_ERROR "could not find ${tool}")
 	endif()
+endforeach()
+
+# optional compiler tools
+foreach(tool gdb gdbtui)
+	string(TOUPPER ${tool} TOOL)
+	find_program(${TOOL} arm-none-eabi-${tool})
 endforeach()

 # os tools


BUG: Reducing Windows path length was not consistent

To reduce Windows path length requirements, ITKExamples-build was changed tp
ITKEx-build in ExternalProject_Add() but not consistently in the entire file.

Change-Id: I1cd4e1e6c974f79676e08ebf791d4ef144db6dda

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -18,7 +18,7 @@
   -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
   -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
   -DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR}
-  -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/ITKExamples-build/bin
+  -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/ITKEx-build/bin
   )

 # Compute -G arg for configuring external projects with the same CMake generator:
@@ -96,6 +96,7 @@

 ExternalProject_Add(ITKExamples
   DEPENDS ${ITKExamples_DEPENDENCIES}
+  PREFIX ITKEx-prefix
   DOWNLOAD_COMMAND ""
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..
   BINARY_DIR ITKEx-build


Fix CMake missing header inclusion

Fix CMake missing header inclusion

--- toolchains/iOS.framework.cmake
+++ toolchains/iOS.framework.cmake
@@ -43,14 +43,14 @@
     ${PROJECT_SOURCE_DIR}/ios/src/Helpers.mm
     ${PROJECT_SOURCE_DIR}/ios/src/TGMapViewController.mm)

+set(FRAMEWORK_HEADERS
+    ${PROJECT_SOURCE_DIR}/ios/framework/TangramMap.h
+    ${PROJECT_SOURCE_DIR}/ios/src/Helpers.h
+    ${PROJECT_SOURCE_DIR}/ios/src/TGMapViewController.h)
+
 set(HEADERS
     ${PROJECT_SOURCE_DIR}/ios/src/platform_ios.h
-    ${PROJECT_SOURCE_DIR}/ios/framework/TangramMap.h
-    ${PROJECT_SOURCE_DIR}/ios/src/TGMapViewController.h)
-
-set(FRAMEWORK_HEADERS
-    ${PROJECT_SOURCE_DIR}/ios/framework/TangramMap.h
-    ${PROJECT_SOURCE_DIR}/ios/src/TGMapViewController.h)
+    ${FRAMEWORK_HEADERS})

 add_bundle_resources(RESOURCES "${PROJECT_SOURCE_DIR}/scenes/fonts" "./fonts")
 add_bundle_resources(RESOURCES "${PROJECT_SOURCE_DIR}/ios/framework/Modules" "./Modules")


update warning suppression flags to completely suprpess warnings from this module

--- source/suppress-warnings.cmake
+++ source/suppress-warnings.cmake
@@ -15,5 +15,5 @@
 message("suppressing warnings from mbed-hal-st-stm32cubef4")

 set_target_properties(mbed-hal-st-stm32cubef4
-    PROPERTIES COMPILE_FLAGS "-Wno-implicit-function-declaration -Wno-unused-parameter"
+    PROPERTIES COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter"
 )


Reduced armel tizen tryrun.cmake to only needed

--- cross/armel/tryrun.cmake
+++ cross/armel/tryrun.cmake
@@ -1,100 +1,4 @@
-SET( REALPATH_SUPPORTS_NONEXISTENT_FILES_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( SSCANF_SUPPORT_ll_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_SCHED_GET_PRIORITY_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_WORKING_GETTIMEOFDAY_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_WORKING_CLOCK_GETTIME_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_CLOCK_MONOTONIC_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_MMAP_DEV_ZERO_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( PTHREAD_CREATE_MODIFIES_ERRNO_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( SEM_INIT_MODIFIES_ERRNO_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_COMPATIBLE_ACOS_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_COMPATIBLE_ASIN_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_COMPATIBLE_POW_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_VALID_NEGATIVE_INF_POW_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_VALID_POSITIVE_INF_POW_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_COMPATIBLE_ATAN2_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_COMPATIBLE_LOG_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_COMPATIBLE_LOG10_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( UNGETC_NOT_RETURN_EOF_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAS_POSIX_SEMAPHORES_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( GETPWUID_R_SETS_ERRNO_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_CLOCK_THREAD_CPUTIME_EXITCODE
+SET( HAVE_CLOCK_MONOTONIC_EXITCODE
      0
      CACHE STRING "Result from TRY_RUN" FORCE)

@@ -105,19 +9,3 @@
 SET( HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE
      0
      CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_PROCFS_CTL_EXITCODE
-     1
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_PROCFS_MAPS_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_PROCFS_STAT_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)
-
-SET( HAVE_PROCFS_STATUS_EXITCODE
-     0
-     CACHE STRING "Result from TRY_RUN" FORCE)


fix(FindJose.cmake): use jose/jose.h instead of jose.h to search includes

--- cmake/FindJose.cmake
+++ cmake/FindJose.cmake
@@ -30,7 +30,7 @@
 pkg_check_modules(PC_JOSE QUIET jose)

 find_path(JOSE_INCLUDE_DIR
-	NAMES jose.h
+	NAMES jose/jose.h
 	HINTS ${PC_JOSE_INCLUDE_DIRS}
 )
 find_library(JOSE_LIBRARY


Fixes FindOTF2 script

Fixes FindOTF2 script

--- cmake/FindOTF2.cmake
+++ cmake/FindOTF2.cmake
@@ -29,7 +29,8 @@
     STRING(STRIP ${OTF2_VERSION} OTF2_VERSION)

     execute_process(COMMAND ${OTF2_CONFIG} "--cppflags" OUTPUT_VARIABLE OTF2_INCLUDE_DIRS)
-    STRING(REPLACE "-I" "" OTF2_INCLUDE_DIRS ${OTF2_INCLUDE_DIRS})
+    STRING(REPLACE "\n" "" OTF2_INCLUDE_DIRS ${OTF2_INCLUDE_DIRS})
+    STRING(REPLACE "-I" ";" OTF2_INCLUDE_DIRS ${OTF2_INCLUDE_DIRS})

     execute_process(COMMAND ${OTF2_CONFIG} "--ldflags" OUTPUT_VARIABLE _LINK_LD_ARGS)
     STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} )


Don't look for GCCXML as it will not be used.

--- cmake/FindROOT.cmake
+++ cmake/FindROOT.cmake
@@ -99,7 +99,7 @@
   HINTS "$ENV{ROOTSYS}/bin" "$ENV{BDM_ROOT_DIR}/bin" "${CMAKE_THIRD_PARTY_DIR}/root/bin")
 find_program(GENREFLEX_EXECUTABLE genreflex
   HINTS "$ENV{ROOTSYS}/bin" "$ENV{BDM_ROOT_DIR}/bin" "${CMAKE_THIRD_PARTY_DIR}/root/bin")
-find_package(GCCXML)
+#find_package(GCCXML)

 # We use the launcher script to emulate a `source thisbdm.sh` call
 if(NOT BDM_OUT_OF_SOURCE)


build: add the closing "-Wl,--no-whole-archive" to the ldflags

this should address the link failure

Signed-off-by: Kefu Chai <cdc92d111bae0ed1ee3b3c8a1f849fcffc6b44f7@gmail.com>
Message-Id: <20211019001334.127440-3-cdc92d111bae0ed1ee3b3c8a1f849fcffc6b44f7@gmail.com>

--- cmake/Finddpdk.cmake
+++ cmake/Finddpdk.cmake
@@ -43,7 +43,7 @@
     if (begin EQUAL -1 OR end EQUAL -1)
       message(FATAL_ERROR "failed to parse dpdk LDFLAGS: ${dpdk_PC_STATIC_LDFLAGS}")
     endif ()
-    math(EXPR length "${end} - ${begin}")
+    math(EXPR length "${end} - ${begin} + 1")
     list(SUBLIST dpdk_PC_STATIC_LDFLAGS ${begin} ${length} archives)
     list(FILTER dpdk_PC_STATIC_LDFLAGS INCLUDE REGEX "-L.*")
     set(dpdk_LIBRARIES


fix wording in warning

fix wording in warning

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -223,7 +223,7 @@
             UserWarning("Your GCC is older than 4.4.1. This is known to cause problems/bugs. Please update to the latest GCC if you can.")
             macro_ensure_version("4.3.0" "${Vc_GCC_VERSION}" GCC_4_3_0)
             if(NOT GCC_4_3_0)
-               UserWarning("Your GCC is older than 4.3.0. It is unable to handle all SSE2 intrinsics. All SSE code will be disabled. Please update to the latest GCC if you can.")
+               UserWarning("Your GCC is older than 4.3.0. It is unable to handle the full set of SSE2 intrinsics. All SSE code will be disabled. Please update to the latest GCC if you can.")
                set(Vc_SSE_INTRINSICS_BROKEN true)
             endif()
          endif()


warnings.cmake enable/disable specific warnings + documentation

--- cmake/Warnings.cmake
+++ cmake/Warnings.cmake
@@ -1,3 +1,50 @@
+# Helper script to set warnings
+# Usage :
+#  target_set_warnings(target
+#    [ENABLE [ALL] [list of warning names]]
+#    [DISABLE [ALL/Annoying] [list of warning names]]
+#    [AS_ERROR ALL]
+#  )
+#
+#  ENABLE
+#    * ALL: means all the warnings possible to enable through a one parameter switch.
+#      Note that for some compilers, this does not mean every single warning will be enabled (GCC for instance).
+#    * Any other name: enable the warning with the given name
+#
+#  DISABLE
+#    * ALL: will override any other settings and this target INTERFACE includes will be considered as system includes by targets linking it.
+#    * Annoying: Warnings that the author thinks should only be used as static analysis tools not in production. On MSVC, also sets _CRT_SECURE_NO_WARNINGS.
+#    * Any other name: disable the warning with the given name
+#
+#  AS_ERROR
+#    * ALL: is the only option available as not all compilers let us set specific warnings as error from command line (MSVC).
+#
+#
+# License:
+#
+# Copyright (C) 2019 Lectem <lectem@gmail.com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation files
+# (the 'Software') deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge,
+# publish, distribute, sublicense, and/or sell copies of the Software,
+# and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+
 cmake_minimum_required(VERSION 3.1)

 option(ENABLE_WARNINGS_SETTINGS "Allow target_set_warnings to add flags and defines. Set this to OFF if you want to provide your own warning parameters." ON)
@@ -8,10 +55,16 @@
     endif()
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
       set(WMSVC TRUE)
+      set(WARNING_ENABLE_PREFIX "/w1") # Means the warning will be available at all levels that do emit warnings
+      set(WARNING_DISABLE_PREFIX "/wd")
     elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
       set(WGCC TRUE)
+      set(WARNING_ENABLE_PREFIX "-W")
+      set(WARNING_DISABLE_PREFIX "-Wno-")
     elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
       set(WCLANG TRUE)
+      set(WARNING_ENABLE_PREFIX "-W")
+      set(WARNING_DISABLE_PREFIX "-Wno-")
     endif()
     set(multiValueArgs ENABLE DISABLE AS_ERROR)
     cmake_parse_arguments(this "" "" "${multiValueArgs}" ${ARGN})
@@ -67,6 +120,22 @@
         list(APPEND WarningFlags "-Werror")
       endif()
     endif()
+
+    if(this_ENABLE)
+      list(REMOVE_ITEM this_ENABLE ALL)
+      foreach(warning-name IN LISTS this_ENABLE)
+        list(APPEND WarningFlags "${WARNING_ENABLE_PREFIX}${warning-name}")
+      endforeach()
+    endif()
+
+
+    if(this_DISABLE)
+      list(REMOVE_ITEM this_DISABLE ALL Annoying)
+      foreach(warning-name IN LISTS this_DISABLE)
+        list(APPEND WarningFlags "${WARNING_DISABLE_PREFIX}${warning-name}")
+      endforeach()
+    endif()
+
     foreach(target IN LISTS this_UNPARSED_ARGUMENTS)
       if(WarningFlags)
         target_compile_options(${target} PRIVATE ${WarningFlags})


System libraries such as rt, dl, aio and etc. should be put last.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -307,7 +307,12 @@
             else()
                 set(TEMP_LIBS dsn.dev.cpp dsn.core)
             endif()
-            set(MY_PROJ_LIBS ${DSN_SYSTEM_LIBS} ${MY_PROJ_LIBS} ${MY_BOOST_LIBS} ${TEMP_LIBS})
+            set(MY_PROJ_LIBS ${MY_PROJ_LIBS} ${MY_BOOST_LIBS} ${TEMP_LIBS})
+            if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+                set(MY_PROJ_LIBS ${MY_PROJ_LIBS} ${DSN_SYSTEM_LIBS})
+            else()
+                set(MY_PROJ_LIBS ${DSN_SYSTEM_LIBS} ${MY_PROJ_LIBS})
+            endif()
             #message(STATUS "MY_PROJ_LIBS = ${MY_PROJ_LIBS}")
         endif()
      endif()


Fix CMake 2.8.12 warnings

Fix CMake 2.8.12 warnings

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -69,7 +69,7 @@
   "      find_library(\${_component}_libraryname ${CMAKE_PROJECT_NAME}_\${_component} NO_DEFAULT_PATH\n"
   "        PATHS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
   "\n"
-  "      if(\${_component}_libraryname MATCHES "\${_component}_libraryname-NOTFOUND")\n"
+  "      if(\${_component}_libraryname MATCHES \"\${_component}_libraryname-NOTFOUND\")\n"
   "        if(${CMAKE_PROJECT_NAME}_FIND_REQUIRED_\${_component})\n"
   "          set(_fail \"Component library \${_component} not found\")\n"
   "          message(FATAL_ERROR \"   ${CMAKE_PROJECT_NAME}_\${_component} \"\n"
@@ -88,12 +88,12 @@
   "    endforeach()\n"
   "  else()\n"
 # if no component was specified, find all produced libraries
-  "    set(${UPPER_PROJECT_NAME}_LIBRARY_NAMES "@LIBRARY_NAMES@")\n"
+  "    set(${UPPER_PROJECT_NAME}_LIBRARY_NAMES \"@LIBRARY_NAMES@\")\n"
   "    foreach(_libraryname \${${UPPER_PROJECT_NAME}_LIBRARY_NAMES})\n"
   "      string(TOUPPER \${_libraryname} _LIBRARYNAME)\n"
   "      find_library(\${_LIBRARYNAME}_LIBRARY \${_libraryname} NO_DEFAULT_PATH\n"
   "                   PATHS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
-  "      if(\${_LIBRARYNAME}_LIBRARY MATCHES "\${_LIBRARYNAME}_LIBRARY-NOTFOUND")\n"
+  "      if(\${_LIBRARYNAME}_LIBRARY MATCHES \"\${_LIBRARYNAME}_LIBRARY-NOTFOUND\")\n"
   "        set(_fail \"\${_libraryname} not found\")\n"
   "        if(_out)\n"
   "          message(\${_output_type} \"   Missing the ${CMAKE_PROJECT_NAME} \"\n"


ENH: ossim already included above

ENH: ossim already included above

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -114,37 +114,21 @@
       ${OTB_SOURCE_DIR}/Utilities/otbmuparser)
 ENDIF(OTB_USE_EXTERNAL_MUPARSER)

-#-----------------------------------------------------------------------------
-# Include directories from the ossim build tree
-SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-        ${OTB_BINARY_DIR}/Utilities/otbossim/include
-)
-
-
-
-#-----------------------------------------------------------------------------
-# Include directories from the CURL build tree.
 IF(OTB_USE_CURL)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   	${CURL_INCLUDE_DIR} )
 ENDIF(OTB_USE_CURL)

-#-----------------------------------------------------------------------------
-# Include directories from the MAPNIK build tree.
 IF(OTB_USE_MAPNIK)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   	${MAPNIK_INCLUDE_DIR} ${FREETYPE2_INCLUDE_DIR})
 ENDIF(OTB_USE_MAPNIK)

-#-----------------------------------------------------------------------------
-# Include directories from the GETTEXT build tree.
 IF(OTB_USE_GETTEXT)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   	${GETTEXT_INCLUDE_DIR})
 ENDIF(OTB_USE_GETTEXT)

-#-----------------------------------------------------------------------------
-# Include directories from the PQXX build tree.
 IF(OTB_USE_PQXX)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   	${PQXX_INCLUDE_DIR})


Remove spurious newline

Remove spurious newline

--- Modules/CetCompilerSettings.cmake
+++ Modules/CetCompilerSettings.cmake
@@ -435,8 +435,7 @@
 if(CMAKE_C_COMPILER_ID MATCHES "GNU|(Apple)+Clang|Intel")
   set(CMAKE_C_FLAGS_RELEASE        "-O3 -g ${CET_COMPILER_C_DWARF_FLAGS}")
   set(CMAKE_C_FLAGS_DEBUG          "-O0 -g ${CET_COMPILER_C_DWARF_FLAGS}")
-  set(CMAKE_C_FLAGS_MINSIZEREL     "-O3 -g ${CET_COMPILER_C_DWARF_FLAGS} -fno-om
-it-frame-pointer")
+  set(CMAKE_C_FLAGS_MINSIZEREL     "-O3 -g ${CET_COMPILER_C_DWARF_FLAGS} -fno-omit-frame-pointer")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
 endif()


ENH: added lorensen at home to email notification.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -30,7 +30,7 @@
 # Continuous email delivery variables
 SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
 SET (SMTP_MAILHOST "public.kitware.com")
-SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com")
+SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com lorensen@nycap.rr.com")
 SET (CONTINUOUS_BASE_URL "http://www.itk.org/Testing")

 MARK_AS_ADVANCED(BUILD_DOXYGEN)


Update hunter.gate file

Update hunter.gate file

--- HunterGate.cmake
+++ HunterGate.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Ruslan Baratov
+# Copyright (c) 2013-2014, Ruslan Baratov
 # All rights reserved.

 # This is a gate file to Hunter package manager.
@@ -14,8 +14,8 @@

 cmake_minimum_required(VERSION 2.8.10)

-set(HUNTER_MINIMUM_VERSION "0.2.2")
-set(HUNTER_MINIMUM_VERSION_HASH 2d538ede36c2cf24c526a5d4c452209faa89d536)
+set(HUNTER_MINIMUM_VERSION "0.2.11")
+set(HUNTER_MINIMUM_VERSION_HASH ffb6e90dfeae6d804517d9d5a34700db1eda59a6)

 # Set HUNTER_ROOT cmake variable to suitable value.
 # Info about variable can be found in HUNTER_ROOT_INFO.
@@ -92,10 +92,13 @@
     )
   endif()

+  set(TEMP_DIR "${PROJECT_BINARY_DIR}/Hunter-activity/gate")
+  set(TEMP_BUILD "${TEMP_DIR}/_builds")
+
   set(URL_BASE "https://github.com/ruslo/hunter/archive")
   file(
       WRITE
-      "${PROJECT_BINARY_DIR}/Hunter-prefix/CMakeLists.txt"
+      "${TEMP_DIR}/CMakeLists.txt"
       "cmake_minimum_required(VERSION 2.8.10)\n"
       "include(ExternalProject)\n"
       "ExternalProject_Add(\n"
@@ -119,9 +122,9 @@

   execute_process(
       COMMAND
-      "${CMAKE_COMMAND}" .
+      "${CMAKE_COMMAND}" "-H${TEMP_DIR}" "-B${TEMP_BUILD}"
       WORKING_DIRECTORY
-      "${PROJECT_BINARY_DIR}/Hunter-prefix"
+      "${TEMP_DIR}"
       RESULT_VARIABLE
       HUNTER_DOWNLOAD_RESULT
   )
@@ -132,9 +135,9 @@

   execute_process(
       COMMAND
-      "${CMAKE_COMMAND}" --build .
+      "${CMAKE_COMMAND}" --build "${TEMP_BUILD}"
       WORKING_DIRECTORY
-      "${PROJECT_BINARY_DIR}/Hunter-prefix"
+      "${TEMP_DIR}"
       RESULT_VARIABLE
       HUNTER_DOWNLOAD_RESULT
   )


Enable -fPIC for all builds. #5184

Enable -fPIC for all builds. #5184

-fPIC is needed for libraries to be dynamically loaded *or if the
executable is going to perform dynamic loading*.  The classad
mechanism for loading user-defined functions indeed performs
dynamic loading, meaning we'll have to use -fPIC for basically all
of HTCondor (as almost everything links against classad in the end).

The trigger in ticket #5184 is the CLASSAD_USER_PYTHON_MODULES feature,
but I suspect there are other places where this could have bitten us.
The ticket itself contains an analysis of how no -fPIC interacts poorly
with libstdc++3 due to its implementation of std::string.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -717,9 +717,11 @@
     # I've seen a reference to '-z bind_now', but all the
     # versions I can find actually use just '-z now':
     set(cxx_full_relro_arg "-Wl,-z,now")
-    # compiling everything with -fPIC is important for PIE
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-endif()
+endif()
+
+# compiling everything with -fPIC is needed to dynamically load libraries
+# linked against libstdc++
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

 #####################################


Switch off SSE for 64-bit arm platforms as well. [ci only: Android, OSX, Coverity]

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -59,7 +59,7 @@
     set (URHO3D_DEFAULT_64BIT ${URHO3D_DEFAULT_64BIT} CACHE INTERNAL "Default value for URHO3D_64BIT build option")
     # The 'ANDROID' CMake variable is already set by android.toolchain.cmake when it is being used for cross-compiling Android
     # When ANDROID is true and ARM is not then we are targeting Android on Intel Atom
-    string (REGEX MATCH "#define +__arm__ +1" matched "${PREDEFINED_MACROS}")
+    string (REGEX MATCH "#define +__(arm|arm64|aarch64)__ +1" matched "${PREDEFINED_MACROS}")
     if (matched)
         set (ARM TRUE)
     else ()


Fix: Search for jsonrpc locally.

Fix: Search for jsonrpc locally.

--- cmake/EthDependenciesDeprecated.cmake
+++ cmake/EthDependenciesDeprecated.cmake
@@ -128,6 +128,7 @@
 	find_path( JSONRPC_ID jsonrpc/rpc.h
 		/usr/include
 		/usr/local/include
+                ../libjson-rpc-cpp/src
 		)
 	if ( JSONRPC_ID )
 		message(STATUS "Found jsonrpc headers")
@@ -137,6 +138,7 @@
 			/usr/local/lib
 			/opt/local/lib
 			/usr/lib/*/
+			../libjson-rpc-cpp/build/out
 			)
 		if ( JSONRPC_LS )
 			message(STATUS "Found jsonrpc library: ${JSONRPC_LS}")


Update UbiTrackDetectCXXCompiler.cmake

Update UbiTrackDetectCXXCompiler.cmake

update the gcc version retrieval code to get full version numbers for old and new gcc in a uniform way.
the trick is based on:
https://stackoverflow.com/questions/45168516/gcc-7-1-1-on-fedora-26-dumpversion-now-only-includes-major-version-by-default

--- cmake/UbiTrackDetectCXXCompiler.cmake
+++ cmake/UbiTrackDetectCXXCompiler.cmake
@@ -66,7 +66,7 @@
   string(REGEX MATCH "[0-9]+\\.[0-9]+" CMAKE_CLANG_REGEX_VERSION "${CMAKE_UBITRACK_CLANG_VERSION_FULL}")

 elseif(CMAKE_COMPILER_IS_GNUCXX)
-  execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpfullversion -dumpversion
                 OUTPUT_VARIABLE CMAKE_UBITRACK_GCC_VERSION_FULL
                 OUTPUT_STRIP_TRAILING_WHITESPACE)

@@ -74,7 +74,7 @@
                 ERROR_VARIABLE CMAKE_UBITRACK_GCC_INFO_FULL
                 OUTPUT_STRIP_TRAILING_WHITESPACE)

-  # Typical output in CMAKE_UBITRACK_GCC_VERSION_FULL: "c+//0 (whatever) 4.2.3 (...)"
+  # Typical output in CMAKE_UBITRACK_GCC_VERSION_FULL: "7.2.0"
   # Look for the version number
   string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_UBITRACK_GCC_VERSION_FULL}")
   if(NOT CMAKE_GCC_REGEX_VERSION)


epa_build: Full licensing text inserted into
cmake/epa_build/ExternalProject.cmake

This is a condition of the license when independently
distributing CMake components such as this module file.

--- cmake/epa_build/ExternalProject.cmake
+++ cmake/epa_build/ExternalProject.cmake
@@ -185,15 +185,33 @@
 #=============================================================================
 # Copyright 2008-2013 Kitware, Inc.
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 # Pre-compute a regex to match documented keywords for each command.
 math(EXPR _ep_documentation_line_count "${CMAKE_CURRENT_LIST_LINE} - 16")


installing manifest files for unary stacks fails to detect package name

--- cmake/install_matching_to_share.cmake
+++ cmake/install_matching_to_share.cmake
@@ -5,9 +5,15 @@

   foreach(file ${globbed})
     get_filename_component(pathonly ${file} PATH)
-    get_filename_component(package ${pathonly} NAME)
-    install(FILES ${file}
-      DESTINATION share/${package}
-      )
+    if(NOT LENGTH ${pathonly})
+      install(FILES ${file}
+	DESTINATION share/${CATKIN_CURRENT_STACK}
+	)
+    else()
+      get_filename_component(package ${pathonly} NAME)
+      install(FILES ${file}
+	DESTINATION share/${package}
+	)
+    endif()
   endforeach()
-endfunction()+endfunction()


One more fix for cmake/modules/FindPsiPluginsApi.cmake

--- cmake/modules/FindPsiPluginsApi.cmake
+++ cmake/modules/FindPsiPluginsApi.cmake
@@ -41,9 +41,9 @@
 if(EXISTS "${ABS_PLUGINS_ROOT_DIR}/cmake/modules/variables.cmake")
     set(PLUGINS_DIRECTORY "${ABS_PLUGINS_ROOT_DIR}")
 elseif(EXISTS "${ABS_CURRENT_DIR}/plugins/cmake/modules/variables.cmake")
-    set(PLUGINS_DIRECTORY "${ABS_CURRENT_DIR}/src/plugins")
-elseif(EXISTS "${ABS_PARENT_DIR}/plugins/cmake/modules/variables.cmake")
-    set(PLUGINS_DIRECTORY "${ABS_CURRENT_DIR}/src/plugins")
+    set(PLUGINS_DIRECTORY "${ABS_CURRENT_DIR}/plugins")
+elseif(EXISTS "${ABS_PARENT_DIR}/psi/plugins/cmake/modules/variables.cmake")
+    set(PLUGINS_DIRECTORY "${ABS_PARENT_DIR}/psi/plugins")
 endif()

 if(CMAKE_CROSSCOMPILING OR CMAKE_CROSS_COMPILING OR (EXISTS "${ABS_PLUGINS_ROOT_DIR}/include"))


Don't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied by the driver

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -252,8 +252,6 @@
     elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
       append_common_sanitizer_flags()
       add_flag_or_print_warning("-fsanitize=memory")
-      # -pie is required for MSan.
-      set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
       if(LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")
         add_flag_or_print_warning("-fsanitize-memory-track-origins")
       endif()


PS-6966: Fix compilation flags

PS-6966: Fix compilation flags

1. Fix `set_cflags_if_supported` macro (add missing `STRING (REGEX REPLACE "-" "_" temp_flag ${flag})`)
2. Remove unused flags

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -46,31 +46,20 @@
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)

-## adds a compiler flag if the compiler supports it
-macro(set_cflags_if_supported_named flag flagname)
-  check_c_compiler_flag("${flag}" HAVE_C_${flagname})
-  if (HAVE_C_${flagname})
-    set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
-  endif ()
-  check_cxx_compiler_flag("${flag}" HAVE_CXX_${flagname})
-  if (HAVE_CXX_${flagname})
-    set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}")
-  endif ()
-endmacro(set_cflags_if_supported_named)
-
-## adds a compiler flag if the compiler supports it
-macro(set_cflags_if_supported)
-  foreach(flag ${ARGN})
-    check_c_compiler_flag(${flag} HAVE_C_${flag})
-    if (HAVE_C_${flag})
-      set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
-    endif ()
-    check_cxx_compiler_flag(${flag} HAVE_CXX_${flag})
-    if (HAVE_CXX_${flag})
-      set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}")
-    endif ()
-  endforeach(flag)
-endmacro(set_cflags_if_supported)
+## prepends a compiler flag if the compiler supports it
+MACRO (prepend_cflags_if_supported)
+  FOREACH (flag ${ARGN})
+    STRING (REGEX REPLACE "-" "_" temp_flag ${flag})
+    check_c_compiler_flag (${flag} HAVE_C_${temp_flag})
+    IF (HAVE_C_${temp_flag})
+      SET (CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
+    ENDIF ()
+    check_cxx_compiler_flag (${flag} HAVE_CXX_${temp_flag})
+    IF (HAVE_CXX_${temp_flag})
+      SET (CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}")
+    ENDIF ()
+  ENDFOREACH (flag)
+ENDMACRO (prepend_cflags_if_supported)

 ## adds a linker flag if the compiler supports it
 macro(set_ldflags_if_supported)
@@ -83,33 +72,18 @@
   endforeach(flag)
 endmacro(set_ldflags_if_supported)

-if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
-  set (OPTIONAL_CFLAGS "${OPTIONAL_CFLAGS} -Wmissing-format-attribute")
-endif()
-
 ## disable some warnings
-## missing-format-attribute causes warnings in some MySQL include files
-## if the library is built as a part of TokuDB MySQL storage engine
-set_cflags_if_supported(
+prepend_cflags_if_supported(
   -Wno-missing-field-initializers
   -Wstrict-null-sentinel
   -Winit-self
   -Wswitch
   -Wtrampolines
   -Wlogical-op
-  ${OPTIONAL_CFLAGS}
-  -Wno-error=missing-format-attribute
-  -Wno-error=address-of-array-temporary
-  -Wno-error=tautological-constant-out-of-range-compare
-  -Wno-error=maybe-uninitialized
-  -Wno-ignored-attributes
-  -Wno-error=extern-c-compat
-  -Wno-pointer-bool-conversion
   -fno-rtti
   -fno-exceptions
   -Wno-error=nonnull-compare
   )
-## set_cflags_if_supported_named("-Weffc++" -Weffcpp)

 if (CMAKE_CXX_FLAGS MATCHES -fno-implicit-templates)
   # must append this because mysql sets -fno-implicit-templates and we need to override it
@@ -121,26 +95,17 @@

 ## Clang has stricter POD checks.  So, only enable this warning on our other builds (Linux + GCC)
 if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
-  set_cflags_if_supported(
+  prepend_cflags_if_supported(
     -Wpacked
     )
 endif ()

 option (PROFILING "Allow profiling and debug" ON)
 if (PROFILING)
-  set_cflags_if_supported(
+  prepend_cflags_if_supported(
     -fno-omit-frame-pointer
   )
 endif ()
-
-## this hits with optimized builds somewhere in ftleaf_split, we don't
-## know why but we don't think it's a big deal
-set_cflags_if_supported(
-  -Wno-error=strict-overflow
-  )
-set_ldflags_if_supported(
-  -Wno-error=strict-overflow
-  )

 # new flag sets in MySQL 8.0 seem to explicitly disable this
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
@@ -179,7 +144,7 @@
 endif ()

 ## set warnings
-set_cflags_if_supported(
+prepend_cflags_if_supported(
   -Wextra
   -Wbad-function-cast
   -Wno-missing-noreturn
@@ -188,7 +153,7 @@
   -Wmissing-declarations
   -Wpointer-arith
   -Wshadow
-  ${OPTIONAL_CFLAGS}
+  -Wmissing-format-attribute
   ## other flags to try:
   #-Wunsafe-loop-optimizations
   #-Wpointer-arith
@@ -202,7 +167,7 @@

 if (NOT CMAKE_CXX_COMPILER_ID STREQUAL Clang)
   # Disabling -Wcast-align with clang.  TODO: fix casting and re-enable it, someday.
-  set_cflags_if_supported(-Wcast-align)
+  prepend_cflags_if_supported(-Wcast-align)
 endif ()

 ## always want these


[t:4871] remove -Wcast-align on darwin

[t:4871] remove -Wcast-align on darwin

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -119,7 +119,6 @@
   ## set gcc warnings
   set(CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
   set(WARN_CFLAGS
-    -Wcast-align
     -Wbad-function-cast
     -Wno-missing-noreturn
     -Wstrict-prototypes
@@ -129,9 +128,9 @@
     -Wmissing-format-attribute
     )
   if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
-    message(WARNING "Disabling -Wshadow on osx.  TODO: fix shadowed declarations and re-enable it.")
+    message(WARNING "Disabling -Wcast-align and -Wshadow on osx.  TODO: fix casting and shadowed declarations and re-enable them.")
   else ()
-    list(APPEND WARN_CFLAGS -Wshadow)
+    list(APPEND WARN_CFLAGS -Wcast-align -Wshadow)
   endif ()
 endif()


[CMake] Allow passing extra CMake arguments to custom libc++

This can be used to customize the libc++ build.

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

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -469,7 +469,7 @@
     message(FATAL_ERROR "libcxx not found!")
   endif()

-  cmake_parse_arguments(LIBCXX "" "" "DEPS;CFLAGS" ${ARGN})
+  cmake_parse_arguments(LIBCXX "" "" "DEPS;CFLAGS;CMAKE_ARGS" ${ARGN})
   foreach(flag ${LIBCXX_CFLAGS})
     set(flagstr "${flagstr} ${flag}")
   endforeach()
@@ -491,6 +491,7 @@
                -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                -DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
                -DLIBCXX_STANDALONE_BUILD=On
+               ${LIBCXX_CMAKE_ARGS}
     LOG_BUILD 1
     LOG_CONFIGURE 1
     LOG_INSTALL 1


making the comment less ambigous

making the comment less ambigous

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -47,7 +47,7 @@
   endif()
 endmacro()

-# some OpenCV tests fail when 'char' is 'unsigned' by default
+# OpenCV fails some tests when 'char' is 'unsigned' by default
 add_extra_compiler_option(-fsigned-char)

 if(MINGW)


[CMake] Use the correct spelling for armv7 in Fuchsia's toolchain

We need to explicitly specify the architecture version.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@347021 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -33,7 +33,7 @@
   list(APPEND RUNTIME_TARGETS "default")
 endif()

-foreach(target i386-linux-gnu;x86_64-linux-gnu;arm-linux-gnueabi;aarch64-linux-gnu)
+foreach(target aarch64-linux-gnu;armv7-linux-gnueabihf;i386-linux-gnu;x86_64-linux-gnu)
   if(LINUX_${target}_SYSROOT)
     # Set the per-target builtins options.
     list(APPEND BUILTIN_TARGETS "${target}")


Fix problem on Windows with pervious commit

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -95,11 +95,12 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DR__HAVE_CONFIG")
 endif()

-#---Check whether libc++ is used or not---------------------------------------------------------------
-include(CheckCXXSourceCompiles)
-set(CMAKE_REQUIRED_FLAGS -v -x c++ -E)
-CHECK_CXX_SOURCE_COMPILES("" _not_libcxx FAIL_REGEX -stdlib=libc[+][+])
-if(NOT _not_libcxx)
+#---Check whether libc++ is used or not---------------------------------------------------------------
+file(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/empty.cxx "")
+set(_command ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -v -x c++ -E ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/empty.cxx)
+separate_arguments(_command)
+execute_process(COMMAND ${_command} OUTPUT_QUIET ERROR_VARIABLE _output)
+if(_output MATCHES "-stdlib=libc[+][+]")
   set(USING_LIBCXX 1)
 endif()


Replace CXX_STANDARD with STANDARD_COMPILE_OPTION

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -121,7 +121,7 @@
 endif()

 # needed by roottest, to be removed once roottest is fixed
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}")

 #---Check for libcxx option------------------------------------------------------------
 if(libcxx)


Suppress an annoying CMake warning in ChooseMSVCCRT.cmake

Warning was:
  Argument not separated from preceding token by whitespace.

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

--- cmake/modules/ChooseMSVCCRT.cmake
+++ cmake/modules/ChooseMSVCCRT.cmake
@@ -71,7 +71,7 @@
 	CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations."
 	FORCE)
       set_property(CACHE LLVM_USE_CRT_${build}
-	PROPERTY STRINGS "";${${MSVC_CRT}})
+	PROPERTY STRINGS ;${${MSVC_CRT}})
     endif(NOT LLVM_USE_CRT_${build})
   endforeach(build_type)


fixed semver_isvalid

fixed semver_isvalid

--- cmake/semver/semver_isvalid.cmake
+++ cmake/semver/semver_isvalid.cmake
@@ -8,6 +8,10 @@
   # get version object
   semver("${version}")
   ans(version)
+
+  if(NOT version)
+    return(false)
+  endif()

 #  nav(version.major)
   map_tryget(${version} major)


Reland "[CMake][compiler-rt] Mark libcxx build  for tsan as standalone"

This relands commit r291722.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -380,6 +380,7 @@
                -DCMAKE_BUILD_TYPE=Release
                -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                -DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
+               -DLIBCXX_STANDALONE_BUILD=On
     LOG_BUILD 1
     LOG_CONFIGURE 1
     LOG_INSTALL 1


cmake: clang: Fix comment

cmake: clang: Fix comment

Fix comment, llvm -> clang.

Signed-off-by: Oleg Zhurakivskyy <cdb82bfa180f8df716a77d2c2557196a597a233c@intel.com>

--- cmake/compiler/clang/target.cmake
+++ cmake/compiler/clang/target.cmake
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: Apache-2.0

-# Configuration for host installed llvm
+# Configuration for host installed clang
 #

 set(NOSTDINC "")


Additional cmake changes for OpenVINO build (#7579)

->unsetting the CMAKE_MAP_IMPORTED_CONFIG that was
set for OpenVINO EP for Relwithdebinfo build on
windows.

Signed-off-by: MaajidKhan <c6b54bb1da2ed38335accd20ff17d695144938c9@gmail.com>

Co-authored-by: suryasidd <d1d52aa482a9027de902bb18022388514d5d30b7@intel.com>


Eigen: add build argument BUILD_TESTING=OFF

--- cmake/projects/Eigen/hunter.cmake
+++ cmake/projects/Eigen/hunter.cmake
@@ -25,7 +25,7 @@
 )

 # disable Eigen tests. Testcreation tries to find package 'Boost'
-hunter_cmake_args(Eigen CMAKE_ARGS EIGEN_ENABLE_TESTS=OFF)
+hunter_cmake_args(Eigen CMAKE_ARGS BUILD_TESTING=OFF)

 # Pick a download scheme
 hunter_pick_scheme(DEFAULT url_sha1_cmake)


Update the cmake file to set the good flags under MVSC and so profit of differences in sdlut between debug mode & rlz mode (logger for example)

--- RageCommon.cmake
+++ RageCommon.cmake
@@ -138,9 +138,19 @@
 #
 IF(MSVC)
 	MESSAGE( STATUS "Visual Studio Compiler detected. Adjusting C++ flags...")
-	SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} /wd4290" CACHE STRING "Flags used by the compiler during all build types")
-	#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
-	#MODULE and SHARED also ??
+
+	IF (CMAKE_BUILD_TYPE STREQUAL Debug)
+		ADD_DEFINITIONS(-D_DEBUG)
+		SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4100 /wd4290 /wd4512")
+		SET(CMAKE_CXX_WARNING_LEVEL 4)
+	ENDIF (CMAKE_BUILD_TYPE STREQUAL Debug)
+
+	IF (CMAKE_BUILD_TYPE STREQUAL Release)
+		ADD_DEFINITIONS(-DNDEBUG)
+		SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /NODEFAULTLIB:msvcrt.lib" )
+		SET(CMAKE_CXX_WARNING_LEVEL 2)
+	ENDIF (CMAKE_BUILD_TYPE STREQUAL Release)
+
 ENDIF(MSVC)
 IF(CMAKE_COMPILER_IS_GNUCXX)
 	MESSAGE( STATUS "GCC Compiler detected. Adjusting C++ flags...")


fixed the execution of rtiddsgen2 on Linux

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -192,7 +192,7 @@
     set(Connext_DDSGEN2 "rtiddsgen2.bat")
   else()
     set(Connext_DEFINITIONS "-DRTI_LINUX" "-DRTI_UNIX")
-    set(Connext_DDSGEN2 "${Connext_LIBRARY_DIRS}/rtiddsgen2")
+    set(Connext_DDSGEN2 "${Connext_HOME}/scripts/rtiddsgen2")
   endif()
   set(Connext_FOUND TRUE)
 else()


use rtiddsgen_server.bat on Windows if available

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -243,6 +243,10 @@
     set(Connext_DEFINITIONS "RTI_WIN32" "NDDS_DLL_VARIABLE")
     # This will be a .bat file and it will be on the PATH.
     set(Connext_DDSGEN "rtiddsgen.bat")
+    find_program(_found "rtiddsgen_server.bat")
+    if(_found)
+      set(Connext_DDSGEN_SERVER "rtiddsgen_server.bat")
+    endif()
   else()
     set(Connext_DEFINITIONS "RTI_LINUX" "RTI_UNIX")
     set(Connext_DDSGEN "${Connext_HOME}/bin/rtiddsgen")


Remove Fermi from cmake (#10486)

Remove Fermi from cmake (#10486)

--- cmake/FirstClassLangCuda.cmake
+++ cmake/FirstClassLangCuda.cmake
@@ -102,7 +102,7 @@

 # This list will be used for CUDA_ARCH_NAME = All option
-set(CUDA_KNOWN_GPU_ARCHITECTURES "Fermi" "Kepler" "Maxwell")
+set(CUDA_KNOWN_GPU_ARCHITECTURES "Kepler" "Maxwell")

 # This list will be used for CUDA_ARCH_NAME = Common option (enabled by default)
 set(CUDA_COMMON_GPU_ARCHITECTURES "3.0" "3.5" "5.0")


fix message sent to user during cross_compilation

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -84,11 +84,9 @@
       if(CMAKE_CROSSCOMPILING)
         message(STATUS "Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)")
         message(STATUS "If you want to enable Python/Numpy support, set the following variables:")
-        message(STATUS "  PYTHON_EXECUTABLE")
-        message(STATUS "  PYTHON_INCLUDE_DIR")
-        message(STATUS "  PYTHON_LIBRARY")
+        message(STATUS "  PYTHON_INCLUDE_PATH")
+        message(STATUS "  PYTHON_LIBRARIES")
         message(STATUS "  PYTHON_NUMPY_INCLUDE_DIR")
-        message(STATUS "  PYTHON_NUMPY_VERSION")
       else()
         # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
         execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"


Improve Eigen search

Improve Eigen search

Should now automatically detect it during Android build

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -29,7 +29,8 @@
   find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
             PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
             PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2
-            DOC "The path to Eigen3/Eigen2 headers")
+            DOC "The path to Eigen3/Eigen2 headers"
+            CMAKE_FIND_ROOT_PATH_BOTH)

   if(EIGEN_INCLUDE_PATH)
     ocv_include_directories(${EIGEN_INCLUDE_PATH})


Using ALICE_TARGET to define the system

Using ALICE_TARGET to define the system

--- cmake/modules/FindGEANT3.cmake
+++ cmake/modules/FindGEANT3.cmake
@@ -26,12 +26,12 @@
 )

 FIND_PATH(GEANT3_LIBRARY_DIR NAMES libgeant321.so PATHS
-  $ENV{ALICE}/geant3/lib/tgt_macosx64
+  $ENV{ALICE}/geant3/lib/tgt_${ALICE_TARGET}
   NO_DEFAULT_PATH
 )

 FIND_LIBRARY(GEANT3_LIB NAMES geant321 PATHS
-  $ENV{ALICE}/geant3/lib/tgt_macosx64
+  $ENV{ALICE}/geant3/lib/tgt_${ALICE_TARGET}
   NO_DEFAULT_PATH
 )


Disable the strict-aliasing warnings produced by gcc

GCC produce a lot of strict-aliasing warning for the LLDB codebase
what makes reading the compile output very difficult. This change
disable these warnings to reduce the noise as we already ignore them.

We should consider re-enabling the warning if we fix all (or most)
strict-aliasing violation first.

Differential revision: http://reviews.llvm.org/D13981

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@251107 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -210,6 +210,12 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
 endif ()

+check_cxx_compiler_flag("-Wno-strict-aliasing"
+                        CXX_SUPPORTS_NO_STRICT_ALIASING)
+if (CXX_SUPPORTS_NO_STRICT_ALIASING)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
+endif ()
+
 # Disable Clang warnings
 check_cxx_compiler_flag("-Wno-deprecated-register"
                         CXX_SUPPORTS_NO_DEPRECATED_REGISTER)


Patch cmake to allow detection of python 2.7.9+

Some distributions of python have their version defined as follows in patchlevel.h (note the '+'):
#define PY_VERSION "2.7.9+"
The '+' char needs to be stripped by the cmake regex so that LLDBs python lib detection is successful.

Differential Revision: http://reviews.llvm.org/D15566

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@255893 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
     file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
          REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
-                         PYTHONLIBS_VERSION_STRING "${python_version_str}")
+    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1"
+         PYTHONLIBS_VERSION_STRING "${python_version_str}")
     message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
     string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
     unset(python_version_str)


Use dictionary object file as dependency for the PCH

Adding the dictionary target as a dependency for the PCH will not
cause the PCH to regenerate even when the dictionary itself is
regenerated and recompiled. This is due to the fact that CMake does
not create a file-level dependency between the dictionary source and
the PCH. However, adding the dictionary source as dependency creates
a race condition on the custom command that generates the dictionary
source, since both the library owning the dictionary and the PCH can
trigger the custom command independently. Now that we moved to use
object libraries for the dictionaries to workaround another bug in
CMake (namely, https://cmake.org/Bug/view.php?id=14633), we can use
the output object file to create a file-level dependency between the
PCH and the dictionary without introducing a race condition.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -527,12 +527,27 @@

     target_include_directories(${dictionary} PRIVATE
       ${includedirs} $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
+
+    # We must depend on $<TARGET_OBJECTS:${dictionary}> here to create a
+    # file-level dependency between the dictionary and the PCH. If we depend on
+    # the source file, there is a race condition between the library and the PCH
+    # on the custom command that generates the dictionary, and if we use the
+    # ${dictionary} target, there is no file-level dependency and the PCH does
+    # not regenerate when the dictionary changes.
+    if(PROJECT_NAME STREQUAL "ROOT")
+      set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES $<TARGET_OBJECTS:${dictionary}>)
+    endif()
   else()
     add_custom_target(${dictionary} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
-  endif()
-
-  if(PROJECT_NAME STREQUAL "ROOT")
-    set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES ${dictionary})
+
+    # Error out if this dictionary should be part of the PCH but won't cause
+    # it to regenerate it when it changes, due to the missing file-level dependency.
+    # We cannot add a dependency on the dictionary source since that creates a race
+    # condition on the custom command that generates the dictionary. Any target that
+    # triggers this error should be moved to use the object library as intermediate.
+    if(PROJECT_NAME STREQUAL "ROOT" AND NOT "${ARG_MODULE}" STREQUAL "")
+      message(FATAL_ERROR "Target ${dictionary} will not cause PCH to regenerate!")
+    endif()
   endif()

   if(ARG_MULTIDICT)


removed default Gadgetron configuration

removed default Gadgetron configuration

at the start of the superbuild the gadgetron configuration example is not there as gadgetron has not yet been cloned. If needed the configuration file should be copied after the gadgetron install.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -110,9 +110,9 @@
 configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)

 #Create a default Gadgetron configuration if not present
-if(NOT EXISTS "${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml")
-   configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)
-endif()
+#if(NOT EXISTS "${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml")
+#   configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)
+#endif()

 # add tests
 enable_testing()


Fixed compilation error when building on CMake. computed_field_vector_opertions.h  has been renamed to computed_field_vector_operations.hpp. https://tracker.physiomeproject.org/show_bug.cgi?id=3030

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@8848 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/cmake/computed_field_source_files.cmake
+++ source/cmake/computed_field_source_files.cmake
@@ -45,7 +45,7 @@
 	source/computed_field/computed_field_subobject_group.hpp
 	source/computed_field/computed_field_string_constant.h
 	source/computed_field/computed_field_trigonometry.h
-	source/computed_field/computed_field_vector_operators.h
+	source/computed_field/computed_field_vector_operators.hpp
 	source/computed_field/computed_field_wrappers.h
 	source/computed_field/differential_operator.hpp
 	source/computed_field/field_cache.hpp


Include code in the 3rdPartyBuild.cmake header to allow the user to choose with dependencies to build.

--- 3rdPartyBuild.cmake
+++ 3rdPartyBuild.cmake
@@ -1,8 +1,18 @@
 cmake_minimum_required(VERSION 2.8.12)

-message("Creating 3rdparty library folder for Visual Studio 2011 Win64")
+# Possible generators for Windows, choose one
+set(GENERATOR "Visual Studio 12 2013 Win64")
+#set(GENERATOR "Visual Studio 11 2012 Win64")

-set(GENERATOR "Visual Studio 11 Win64")
+# Comment lines below to enable/disable download/build of 3rdParty modules
+set(BUILD_LIB3DS ON)
+set(BUILD_FTLLIB ON)
+set(BUILD_BOOST ON)
+set(BUILD_TINYXML ON)
+set(BUILD_DEVIL ON)
+set(BUILD_FREEGLUT ON)
+set(BUILD_GLEW ON)
+
 set(BUILD_ARCH x64)
 set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty" CACHE PATH "default install path" FORCE)
 set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/temp/sources")
@@ -10,7 +20,8 @@
 set(PATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/patches")
 set(BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/temp/build")

-message("Install prefix: ${CMAKE_INSTALL_PREFIX} ${ARGC} ${ARGV}")
+message("Creating 3rdparty library folder for ${GENERATOR}")
+message("Install prefix: ${CMAKE_INSTALL_PREFIX}")

 file(MAKE_DIRECTORY ${SOURCE_DIR})
 file(MAKE_DIRECTORY ${BUILD_DIR})
@@ -23,7 +34,7 @@
     endif()
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOAD_DIR}/${FILENAME} WORKING_DIRECTORY "${SOURCE_DIR}")
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${PATCH_DIR}/${FILENAME} WORKING_DIRECTORY "${SOURCE_DIR}")
-
+
     set(BUILD_DIRECTORY "${BUILD_DIR}/lib3ds")
     if (EXISTS "${BUILD_DIRECTORY}")
       execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUILD_DIRECTORY}")
@@ -42,7 +53,7 @@
     endif()
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/${FILENAME}" WORKING_DIRECTORY "${SOURCE_DIR}")
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${PATCH_DIR}/${FILENAME}" WORKING_DIRECTORY "${SOURCE_DIR}")
-
+
     set(BUILD_DIRECTORY "${BUILD_DIR}/fltlib")
     if (EXISTS "${BUILD_DIRECTORY}")
       execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUILD_DIRECTORY}")
@@ -61,7 +72,7 @@
     endif()
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/${FILENAME}" WORKING_DIRECTORY "${SOURCE_DIR}")
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${PATCH_DIR}/${FILENAME}" WORKING_DIRECTORY "${SOURCE_DIR}")
-
+
     set(BUILD_DIRECTORY "${BUILD_DIR}/tinyxml")
     if (EXISTS "${BUILD_DIRECTORY}")
       execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUILD_DIRECTORY}")
@@ -74,55 +85,90 @@

 macro(boost)
     message("Building Boost.")
-    if (NOT EXISTS "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2")
+    set(BOOST_VERSION "1.57.0")
+    string(REPLACE "." "_" BOOST_VERSION_NAME ${BOOST_VERSION}) #replace "." with "_" in BOOST_VERSION variable
+    if (NOT EXISTS "${DOWNLOAD_DIR}/boost_1_57_0.tar.bz2")
       message("Downloading Boost. This might take a while.")
-      file(DOWNLOAD "http://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.bz2" "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2" STATUS downloaded)
+      file(DOWNLOAD "http://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2" "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2" STATUS downloaded)
     endif()
-    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2" WORKING_DIRECTORY "${SOURCE_DIR}")
-
-    execute_process(COMMAND cmd.exe "/C" "bootstrap.bat" WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_56_0")
-    execute_process(COMMAND cmd.exe /C b2 -j "$ENV{NUMBER_OF_PROCESSORS}" --toolset=msvc-11.0 address-model=64 install --prefix=${CMAKE_INSTALL_PREFIX}/boost/ WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_56_0")
+    message("Extracting Boost")
+    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/boost_1_57_0.tar.bz2" WORKING_DIRECTORY "${SOURCE_DIR}")
+    execute_process(COMMAND cmd.exe "/C" "bootstrap.bat" WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_57_0")
+
+    # select the boost toolset according to the compiler being used
+    if ("${GENERATOR}" MATCHES "^(Visual Studio 12).*")
+      set(BOOST_TOOLSET msvc-12.0)
+    else()
+      set(BOOST_TOOLSET msvc-11.0)
+    endif()
+
+    execute_process(COMMAND cmd.exe /C b2 -j "$ENV{NUMBER_OF_PROCESSORS}" --toolset=${BOOST_TOOLSET} address-model=64 install --prefix=${CMAKE_INSTALL_PREFIX}/boost/ WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_57_0")
 endmacro()

 macro(devil)
     if (NOT EXISTS "${DOWNLOAD_DIR}/DevIL-SDK-x64-1.7.8.zip")
+      message("Downloading DeVIL")
       file(DOWNLOAD "http://downloads.sourceforge.net/project/openil/DevIL%20Windows%20SDK/1.7.8/DevIL-SDK-x64-1.7.8.zip" "${DOWNLOAD_DIR}/DevIL-SDK-x64-1.7.8.zip" STATUS downloaded)
     endif()
+    message("Installing DeVIL")
     file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/devil")
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/DevIL-SDK-x64-1.7.8.zip" WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/devil")
 endmacro()

 macro(freeglut)
-    message("downloading freeglut")
+    message("Downloading freeglut")
     if (NOT EXISTS "${DOWNLOAD_DIR}/freeglut-MSVC.zip")
         file(DOWNLOAD "http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MSVC.zip" "${DOWNLOAD_DIR}/freeglut-MSVC.zip" STATUS downloaded)
     endif()
+    message("Installing freeglut")
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/freeglut-MSVC.zip" WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
 endmacro()

 macro(glew)
-    message("downloading GLEW")
-    set(FILENAME "glew-1.11.0-win32.zip")
+    message("Downloading GLEW")
+    set(GLEW_VERSION "1.12.0")
+    set(FILENAME "glew-${GLEW_VERSION}-win32.zip")
     if (NOT EXISTS "${DOWNLOAD_DIR}/${FILENAME}")
-        file(DOWNLOAD "http://downloads.sourceforge.net/project/glew/glew/1.11.0/${FILENAME}" "${DOWNLOAD_DIR}/${FILENAME}" STATUS downloaded)
+        file(DOWNLOAD "http://downloads.sourceforge.net/project/glew/glew/${GLEW_VERSION}/${FILENAME}" "${DOWNLOAD_DIR}/${FILENAME}" STATUS downloaded)
     endif()
+    message("Installing GLEW")
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/${FILENAME}" WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
-
+
     # remove old glew directory
     if (EXISTS "${CMAKE_INSTALL_PREFIX}/glew")
       execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_INSTALL_PREFIX}/glew")
     endif()
-
-    file(RENAME "${CMAKE_INSTALL_PREFIX}/glew-1.11.0" "${CMAKE_INSTALL_PREFIX}/glew")
+
+    file(RENAME "${CMAKE_INSTALL_PREFIX}/glew-${GLEW_VERSION}" "${CMAKE_INSTALL_PREFIX}/glew")
 endmacro()

-lib3ds()
-#fltlib()
-tinyxml()
-boost()
-devil()
-freeglut()
-glew()
+if(BUILD_LIB3DS)
+  lib3ds()
+endif(BUILD_LIB3DS)

-#message("Cleaning up")
-#execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_SOURCE_DIR}/temp")
+if(BUILD_FTLLIB)
+  fltlib()
+endif(BUILD_FTLLIB)
+
+if(BUILD_TINYXML)
+  tinyxml()
+endif(BUILD_TINYXML)
+
+if(BUILD_BOOST)
+  boost()
+endif(BUILD_BOOST)
+
+if(BUILD_DEVIL)
+  devil()
+endif(BUILD_DEVIL)
+
+if(BUILD_FREEGLUT)
+  freeglut()
+endif(BUILD_FREEGLUT)
+
+if(BUILD_GLEW)
+  glew()
+endif(BUILD_GLEW)
+
+message("Cleaning up")
+execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_SOURCE_DIR}/temp")


add leack-check=full to report errors when memory leaks exist

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -118,7 +118,7 @@
   "-DMESHES=/lore/diamog/cdash/repos/EnGPar/pumi-meshes/"
   "-DGRAPHS=/lore/diamog/cdash/repos/EnGPar/EnGPar-graphs/"
   "-DVALGRIND=valgrind"
-  "-DVALGRIND_ARGS=--log-file=vg.%p;--error-exitcode=1;--suppressions=/lore/diamog/cdash/repos/EnGPar/mpich3.supp"
+  "-DVALGRIND_ARGS=--log-file=vg.%p;--leak-check=full;--error-exitcode=1;--suppressions=/lore/diamog/cdash/repos/EnGPar/mpich3.supp"
   )

 message(STATUS "configure options ${CONFIGURE_OPTIONS}")


Bugfix: CommonLibrary error with multiple library types

When XXX_LIBRARY_TYPE is a list, e.g. STATIC;SHARED, CMake
fails on line 94.

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -91,7 +91,7 @@
       LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT lib)
   endforeach()

-  if(MSVC AND ${${NAME}_LIBRARY_TYPE} STREQUAL "SHARED")
+  if(MSVC AND "${${NAME}_LIBRARY_TYPE}" MATCHES "SHARED")
     install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${Name}.pdb
       DESTINATION bin COMPONENT lib CONFIGURATIONS Debug)
     install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/${Name}.pdb


ENH: Added setting of VTK_JAVA_HOME for installed VTKConfig.cmake.

--- GenerateVTKConfig.cmake
+++ GenerateVTKConfig.cmake
@@ -172,7 +172,7 @@
 IF(VTK_WRAP_JAVA)
   SET(VTK_PARSE_JAVA_EXE_CONFIG ${CMAKE_INSTALL_PREFIX}/bin/vtkParseJava)
   SET(VTK_WRAP_JAVA_EXE_CONFIG ${CMAKE_INSTALL_PREFIX}/bin/vtkWrapJava)
-  #SET(VTK_JAVA_HOME_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/vtk/java})
+  SET(VTK_JAVA_HOME_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/vtk/java)
 ENDIF(VTK_WRAP_JAVA)

 # VTK style script locations.


fix cmake plugin to use correct config file argument keyword (#181)

Signed-off-by: Ted Kern <89b5fd2cdcfc9dffc7e5020c725086dee1d5b126@canonical.com>

--- ament_cmake_mypy/cmake/ament_mypy.cmake
+++ ament_cmake_mypy/cmake/ament_mypy.cmake
@@ -38,7 +38,7 @@
   set(result_file "${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${ARG_TESTNAME}.xunit.xml")
   set(cmd "${ament_mypy_BIN}" "--xunit-file" "${result_file}")
   if(ARG_CONFIG_FILE)
-    list(APPEND cmd "--config-file" "${ARG_CONFIG_FILE}")
+    list(APPEND cmd "--config" "${ARG_CONFIG_FILE}")
   endif()
   list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})


Fix spelling/typo error.

Fix spelling/typo error.

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -16,7 +16,7 @@
 #     to remove from the list of exported libraries
 #   ${UPPER_PROJECT_NAME}_CONFIG_VERSION_IN - If set, use this template in
 #     preference to CMake's BasicConfigVersion-SameMajorVersion.cmake.in.
-#     The PACKAGE_VERSION variable is set before perforiming the instantiation.
+#     The PACKAGE_VERSION variable is set before performing the instantiation.
 #
 # Output variables
 #   ${UPPER_PROJECT_NAME}_FOUND - Was the project and all of the specified


Fix PackageConfig for projects without libraries

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -154,11 +154,15 @@
 string(REGEX REPLACE ";" " " TRANSIENTS ${TRANSIENTS})

 # create ProjectConfig.cmake
+if(LIBRARY_NAMES)
+  set(HAS_LIBRARY_NAMES LIBRARY_NAMES)
+endif()
+
 configure_package_config_file(
   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
   INSTALL_DESTINATION ${CMAKE_MODULE_INSTALL_PATH}
-  PATH_VARS INCLUDE_INSTALL_DIR LIBRARY_NAMES TRANSIENTS
+  PATH_VARS INCLUDE_INSTALL_DIR ${HAS_LIBRARY_NAMES} TRANSIENTS
   NO_CHECK_REQUIRED_COMPONENTS_MACRO)

 # create ProjectConfigVersion.cmake


py: Expand lists in core cmake custom commands.

The core cmake rules use custom commands to invoke qstr processing
scripts. For the zephyr port, it's possible that list arguments to these
commands may contain generator expressions, therefore we need to expand
them properly.

Signed-off-by: Maureen Helm <87a696db5547fa477bda9f9e0f00013c839c14d3@nxp.com>

--- py/mkrules.cmake
+++ py/mkrules.cmake
@@ -73,6 +73,7 @@
     DEPENDS ${MICROPY_MODULEDEFS}
         ${MICROPY_SOURCE_QSTR}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -81,6 +82,7 @@
     COMMAND touch ${MICROPY_QSTR_DEFS_SPLIT}
     DEPENDS ${MICROPY_QSTR_DEFS_LAST}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -88,6 +90,7 @@
     COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat qstr _ ${MICROPY_GENHDR_DIR}/qstr ${MICROPY_QSTR_DEFS_COLLECTED}
     DEPENDS ${MICROPY_QSTR_DEFS_SPLIT}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -95,6 +98,7 @@
     COMMAND cat ${MICROPY_PY_QSTRDEFS} ${MICROPY_QSTR_DEFS_COLLECTED} | sed "s/^Q(.*)/\"&\"/" | ${CMAKE_C_COMPILER} -E ${MICROPY_CPP_FLAGS} - | sed "s/^\\\"\\(Q(.*)\\)\\\"/\\1/" > ${MICROPY_QSTR_DEFS_PREPROCESSED}
     DEPENDS ${MICROPY_QSTR_DEFS_COLLECTED}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -102,6 +106,7 @@
     COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdata.py ${MICROPY_QSTR_DEFS_PREPROCESSED} > ${MICROPY_QSTR_DEFS_GENERATED}
     DEPENDS ${MICROPY_QSTR_DEFS_PREPROCESSED}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 # Build frozen code if enabled


Use per-project unique prefix dir to not confuse with installed subset of dependencies

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -37,6 +37,7 @@
 # add helper stuff from CMakePackageConfigHelpers
   "@PACKAGE_INIT@\n"
   "\n"
+  "set(${CMAKE_PROJECT_NAME}_PREFIX_DIR ${PACKAGE_PREFIX_DIR})\n"
 # reset before using them
   "set(_output_type)\n"
   "set(_out)\n"
@@ -57,20 +58,20 @@
 # find components if specified
   "  if(${CMAKE_PROJECT_NAME}_FIND_COMPONENTS)\n"
   "    find_library(\${UPPER_PROJECT_NAME}_LIBRARY ${CMAKE_PROJECT_NAME} NO_DEFAULT_PATH\n"
-  "                 PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
+  "                 PATHS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
   "    list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${UPPER_PROJECT_NAME}_LIBRARY})\n"
   "    foreach(_component \${${CMAKE_PROJECT_NAME}_FIND_COMPONENTS})\n"
   "      find_library(\${_component}_libraryname ${CMAKE_PROJECT_NAME}_\${_component} NO_DEFAULT_PATH\n"
-  "        PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
+  "        PATHS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
   "\n"
   "      if(\${_component}_libraryname MATCHES "\${_component}_libraryname-NOTFOUND")\n"
   "        if(${CMAKE_PROJECT_NAME}_FIND_REQUIRED_\${_component})\n"
   "          set(_fail \"Component library \${_component} not found\")\n"
   "          message(FATAL_ERROR \"   ${CMAKE_PROJECT_NAME}_\${_component} \"\n"
-  "            \"not found in \${PACKAGE_PREFIX_DIR}/lib\")\n"
+  "            \"not found in \${${CMAKE_PROJECT_NAME}_PREFIX_DIR}/lib\")\n"
   "        elseif(NOT _quiet)\n"
   "          message(STATUS \"   ${CMAKE_PROJECT_NAME}_\${_component} \"\n"
-  "            \"not found in \${PACKAGE_PREFIX_DIR}/lib\")\n"
+  "            \"not found in \${${CMAKE_PROJECT_NAME}_PREFIX_DIR}/lib\")\n"
   "        endif()\n"
   "      else()\n"
   "        string(TOUPPER \${_component} _COMPONENT)\n"
@@ -86,12 +87,12 @@
   "    foreach(_libraryname \${${UPPER_PROJECT_NAME}_LIBRARY_NAMES})\n"
   "      string(TOUPPER \${_libraryname} _LIBRARYNAME)\n"
   "      find_library(\${_LIBRARYNAME}_LIBRARY \${_libraryname} NO_DEFAULT_PATH\n"
-  "                   PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
+  "                   PATHS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
   "      if(\${_LIBRARYNAME}_LIBRARY MATCHES "\${_LIBRARYNAME}_LIBRARY-NOTFOUND")\n"
   "        set(_fail \"\${_libraryname} not found\")\n"
   "        if(_out)\n"
   "          message(\${_output_type} \"   Missing the ${CMAKE_PROJECT_NAME} \"\n"
-  "            \"library in \${PACKAGE_PREFIX_DIR}/lib.\")\n"
+  "            \"library in \${${CMAKE_PROJECT_NAME}_PREFIX_DIR}/lib.\")\n"
   "        endif()\n"
   "      else()\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_LIBRARYNAME}_LIBRARY})\n"
@@ -104,8 +105,8 @@
   "  endif()\n"
   "\n"
 # include options.cmake if existing
-  "  if(EXISTS \${PACKAGE_PREFIX_DIR}/${CMAKE_MODULE_INSTALL_PATH}/options.cmake)\n"
-  "    include(\${PACKAGE_PREFIX_DIR}/${CMAKE_MODULE_INSTALL_PATH}/options.cmake)\n"
+  "  if(EXISTS \${${CMAKE_PROJECT_NAME}_PREFIX_DIR}/${CMAKE_MODULE_INSTALL_PATH}/options.cmake)\n"
+  "    include(\${${CMAKE_PROJECT_NAME}_PREFIX_DIR}/${CMAKE_MODULE_INSTALL_PATH}/options.cmake)\n"
   "  endif()\n"
   "endif()\n"
   "\n"


PackageConfig: Don't overwrite existing component libraries already found for a package dependency

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -195,11 +195,15 @@
     set(_FIND_VERSION)
   endif()
   list(APPEND DEPENDENTS
+    "set(_library_backups \${${${_dependent}_name}_LIBRARIES})\n"
     "find_package(${_dependent} ${_FIND_VERSION} \${_req} \${_quiet})\n"
-    "if(${${_dependent}_name}_FOUND)\n")
+    "if(${${_dependent}_name}_FOUND)\n"
+    "list(APPEND ${${_dependent}_name}_LIBRARIES \${_library_backups})\n"
+    "list(REMOVE_DUPLICATES ${${_dependent}_name}_LIBRARIES)\n"
+    )
   if(_FIND_VERSION)
     list(APPEND DEPENDENTS
-      "  if(\"${${${_dependent}_name}_VERSION}\" MATCHES \"^([0-9]+\\\\.[0-9]+)\")\n"
+      "  if(\"\${${${_dependent}_name}_VERSION}\" MATCHES \"^([0-9]+\\\\.[0-9]+)\")\n"
       "    if(CMAKE_MATCH_1 VERSION_GREATER ${_FIND_VERSION})\n"
       "      message(FATAL_ERROR \"${${_dependent}_name} ${${${_dependent}_name}_VERSION} not compatible with ${_FIND_VERSION}\")\n"
       "    endif()\n"


adding copyright header

adding copyright header

Summary: as in the title

Reviewed By: Croohand

Differential Revision: D30041822

fbshipit-source-id: 923158fcba241f5cd2ace8f87fa12083fd22356c

--- build/fbcode_builder/CMake/RustStaticLibrary.cmake
+++ build/fbcode_builder/CMake/RustStaticLibrary.cmake
@@ -1,3 +1,5 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+
 include(FBCMakeParseArgs)

 set(
@@ -286,4 +288,4 @@
     RENAME ${staticlib_output_name}
     DESTINATION ${ARG_INSTALL_DIR}
   )
-endfunction()+endfunction()


CMake: Bugfix. Don't rename header destination in an in-source build

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29195 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -105,11 +105,12 @@
   SET_IF_EMPTY(DEAL_II_DOCHTML_RELDIR "doc")
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "examples")
   SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin")
-  IF("${CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_BINARY_DIR}")
+  IF( "${CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_BINARY_DIR}" AND
+      (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") )
     #
-    # Ensure that always BINARY_DIR/include != INSTALL_PREFIX/include.
-    # Otherwise stale headers might get included resulting in a failing
-    # build.
+    # Ensure that in case of an out of source build BINARY_DIR/include !=
+    # INSTALL_PREFIX/include us always true. Otherwise stale headers might
+    # get included resulting in a failing build.
     #
     SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include/install")
   ELSE()


[FEATURE] Allowing to use up to date contribs.

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

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -35,62 +35,67 @@
 # ============================================================================

 if (WIN32)
-    # The contrib version we look for.
-	set (_SEQAN_CONTRIB_VERSION D20111031)
-	set (_SEQAN_CONTRIB_DIR "seqan-contrib-${_SEQAN_CONTRIB_VERSION}")
-
-	# Determine architecture for the precompiled contribs.
-	if (CMAKE_GENERATOR MATCHES ".*Win64")
+    # For all contrib versions...
+	foreach (_SEQAN_CONTRIB_VERSION D20111031 D20130710)
+	  set (_SEQAN_CONTRIB_DIR "seqan-contrib-${_SEQAN_CONTRIB_VERSION}")
+
+	  # Determine architecture for the precompiled contribs.
+	  if (CMAKE_GENERATOR MATCHES ".*Win64")
 		set (CONTRIB_ARCH "x64")
-	else ()
+	  else ()
 		set (CONTRIB_ARCH "x86")
-	endif ()
+	  endif ()

-	# Try to figure out where the user installed the contrib.  We expect
-	# it to be either in C:\, or one of the Program Files dirs.
-	#
-	# First, look into Program Files on 64 bit.
-	if (DEFINED ENV{ProgramW6432})
+	  # Try to figure out where the user installed the contrib.  We expect
+	  # it to be either in C:\, or one of the Program Files dirs.
+	  #
+	  # First, look into Program Files on 64 bit.
+	  if (DEFINED ENV{ProgramW6432})
 		if (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-			set (SEQAN_CONTRIB_BASE "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		  set (SEQAN_CONTRIB_BASE "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		endif (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-	endif (DEFINED ENV{ProgramW6432})
-	# Try out Program Files for 32bit Windows.
-	if (NOT DEFINED SEQAN_CONTRIB_BASE)
+	  endif (DEFINED ENV{ProgramW6432})
+	  # Try out Program Files for 32bit Windows.
+	  if (NOT DEFINED SEQAN_CONTRIB_BASE)
 		if (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-			set (SEQAN_CONTRIB_BASE "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		  set (SEQAN_CONTRIB_BASE "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		endif (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-	endif (NOT DEFINED SEQAN_CONTRIB_BASE)
-	# Try out on C:/.
-	if (NOT DEFINED SEQAN_CONTRIB_BASE)
+	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+	  # Try out on C:/.
+	  if (NOT DEFINED SEQAN_CONTRIB_BASE)
 		if (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		  set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		elseif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		  set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		endif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-	endif (NOT DEFINED SEQAN_CONTRIB_BASE)
-    # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
-    set (CONTRIB_ARCH "x64")
-    if (NOT DEFINED SEQAN_CONTRIB_BASE)
+	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+      # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
+      set (CONTRIB_ARCH "x64")
+      if (NOT DEFINED SEQAN_CONTRIB_BASE)
         if (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-            set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+          set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
         endif ()
-    endif ()
+      endif ()

-	# Debug help.
-    #if (NOT DEFINED SEQAN_CONTRIB_BASE)
-    #	message("SEQAN_CONTRIB_BASE is undefined!")
-    #else (NOT DEFINED SEQAN_CONTRIB_BASE)
-    #	message("SEQAN_CONTRIB_BASE is ${SEQAN_CONTRIB_BASE}")
-    #endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+      # Break out if contribs could be found.
+      if (DEFINED SEQAN_CONTRIB_BASE)
+        break ()  # found contribs at current path
+      else (DEFINED SEQAN_CONTRIB_BASE)

-	# Try to figure out the generator.
-	if (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
+	  # Debug help.
+      #if (NOT DEFINED SEQAN_CONTRIB_BASE)
+      #	message("SEQAN_CONTRIB_BASE is undefined!")
+      #else (NOT DEFINED SEQAN_CONTRIB_BASE)
+      #	message("SEQAN_CONTRIB_BASE is ${SEQAN_CONTRIB_BASE}")
+      #endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+
+	  # Try to figure out the generator.
+	  if (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
 		if (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
-			string (REGEX REPLACE "^Visual Studio ([0-9]+).*$" "\\1" SEQAN_CONTRIB_VARIANT ${CMAKE_GENERATOR})
-			set (SEQAN_CONTRIB_VARIANT "vs${SEQAN_CONTRIB_VARIANT}")
+		  string (REGEX REPLACE "^Visual Studio ([0-9]+).*$" "\\1" SEQAN_CONTRIB_VARIANT ${CMAKE_GENERATOR})
+		  set (SEQAN_CONTRIB_VARIANT "vs${SEQAN_CONTRIB_VARIANT}")
 		elseif (CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
-			set (SEQAN_CONTRIB_VARIANT mingw)
+		  set (SEQAN_CONTRIB_VARIANT mingw)
 		endif (CMAKE_GENERATOR MATCHES "^Visual Studio .*")

         #message(STATUS "SEQAN_CONTRIB_BASE    is ${SEQAN_CONTRIB_BASE}")
@@ -101,10 +106,11 @@

 		# Extend CMAKE_FIND_ROOT_PATH.
 		if (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
-			set (CMAKE_FIND_ROOT_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_FIND_ROOT_PATH})
+		  set (CMAKE_FIND_ROOT_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_FIND_ROOT_PATH})
 		endif (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
-	endif (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
+	  endif (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})

-    message(STATUS "CMAKE_FIND_ROOT_PATH is \"${CMAKE_FIND_ROOT_PATH}\".")
+      message(STATUS "CMAKE_FIND_ROOT_PATH is \"${CMAKE_FIND_ROOT_PATH}\".")
+    endforeach ()  # all contrib versions.
 endif (WIN32)


small windows fix

small windows fix

--- cmake/EthDependencies.cmake
+++ cmake/EthDependencies.cmake
@@ -87,7 +87,7 @@
 find_package (Qt5WebKit REQUIRED)
 find_package (Qt5WebKitWidgets REQUIRED)

-if (${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
+if (WIN32)
 	# TODO hanlde other msvc versions or it will fail find them
 	set(Boost_COMPILER -vc120)
 	set(Boost_USE_STATIC_LIBS ON)


remove qt deps

remove qt deps

--- cmake/EthDependencies.cmake
+++ cmake/EthDependencies.cmake
@@ -125,39 +125,6 @@
 		message (FATAL_ERROR "JSONRPC is required for GUI client")
 	endif()

-# find all of the Qt packages
-# remember to use 'Qt' instead of 'QT', cause unix is case sensitive
-# TODO make headless client optional
-
-	set (ETH_QT_VERSION 5.4)
-
-	find_package (Qt5Core ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5Gui ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5Quick ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5Qml ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5Network ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5Widgets ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5WebEngine ${ETH_QT_VERSION} REQUIRED)
-	find_package (Qt5WebEngineWidgets ${ETH_QT_VERSION} REQUIRED)
-
-	# we need to find path to macdeployqt on mac
-	if (APPLE)
-		set (MACDEPLOYQT_APP ${Qt5Core_DIR}/../../../bin/macdeployqt)
-		message(" - macdeployqt path: ${MACDEPLOYQT_APP}")
-	endif()
-	# we need to find path to windeployqt on windows
-	if (WIN32)
-		set (WINDEPLOYQT_APP ${Qt5Core_DIR}/../../../bin/windeployqt)
-		message(" - windeployqt path: ${WINDEPLOYQT_APP}")
-	endif()
-
-	if (APPLE)
-		find_program(ETH_APP_DMG appdmg)
-		message(" - appdmg location : ${ETH_APP_DMG}")
-	endif()
-
-endif() #GUI
-
 # use multithreaded boost libraries, with -mt suffix
 set(Boost_USE_MULTITHREADED ON)


Delete FindGirCompiler.cmake

Delete FindGirCompiler.cmake

--- cmake/FindGirCompiler.cmake
+++ cmake/FindGirCompiler.cmake
@@ -1,56 +0,0 @@
-##
-# Copyright 2009-2010 Jakob Westhoff. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-#    1. Redistributions of source code must retain the above copyright notice,
-#       this list of conditions and the following disclaimer.
-#
-#    2. Redistributions in binary form must reproduce the above copyright notice,
-#       this list of conditions and the following disclaimer in the documentation
-#       and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# The views and conclusions contained in the software and documentation are those
-# of the authors and should not be interpreted as representing official policies,
-# either expressed or implied, of Jakob Westhoff
-##
-
-##
-# Find module for the Gir compiler (g-ir-compiler)
-#
-# This module determines wheter a Gir compiler is installed on the current
-# system and where its executable is.
-#
-# Call the module using "find_package(GirCompiler) from within your CMakeLists.txt.
-#
-# The following variables will be set after an invocation:
-#
-#  G_IR_COMPILER_FOUND       Whether the g-ir-compiler compiler has been found or not
-#  G_IR_COMPILER_EXECUTABLE  Full path to the g-ir-compiler executable if it has been found
-##
-
-
-# Search for the g-ir-compiler executable in the usual system paths.
-find_program (G_IR_COMPILER_EXECUTABLE
-  NAMES g-ir-compiler)
-
-# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call.
-# Furthermore set G_IR_COMPILER_FOUND to TRUE if the g-ir-compiler has been found (aka.
-# G_IR_COMPILER_EXECUTABLE is set)
-
-include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (GirCompiler DEFAULT_MSG G_IR_COMPILER_EXECUTABLE)
-
-mark_as_advanced (G_IR_COMPILER_EXECUTABLE)


default to sim parasolid 270, allow users to set version with SIM_PARASOLID_VERSION var

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -44,9 +44,10 @@

 option(SIM_PARASOLID "Use Parasolid through Simmetrix" OFF)
 if (SIM_PARASOLID)
+  set(SIM_PARASOLID_VERSION "270" CACHE STRING "Simmetrix Parasolid version number")
   set(SIM_LIB_NAMES
       ${SIM_LIB_NAMES}
-      SimParasolid260
+      SimParasolid${SIM_PARASOLID_VERSION}
       pskernel)
 endif()
 option(SIM_ACIS "Use Acis through Simmetrix" OFF)


Remove useless CPACK_*_COMPONENT_INSTALL variables

They don't actually do anything. And even if they did, all components are
enabled by default, anyway.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -126,15 +126,6 @@
   set(CPACK_COMPONENT_tests_SECTION "misc")
 endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)

-if(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT)
-  set(CPACK_libs_COMPONENT_INSTALL TRUE)
-  set(CPACK_dev_COMPONENT_INSTALL TRUE)
-  set(CPACK_docs_COMPONENT_INSTALL TRUE)
-  set(CPACK_python_COMPONENT_INSTALL TRUE)
-  set(CPACK_java_COMPONENT_INSTALL TRUE)
-  set(CPACK_samples_COMPONENT_INSTALL TRUE)
-endif(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT)
-
 if(CPACK_GENERATOR STREQUAL "DEB")
   find_program(GZIP_TOOL NAMES "gzip" PATHS "/bin" "/usr/bin" "/usr/local/bin")
   if(NOT GZIP_TOOL)


Updates to search for boost in environment BOOST_HOME. Disable use of multi-threaded boost.

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -85,12 +85,14 @@
     ENDIF ()
 ELSE (THIRDPARTY_BUILD_BOOST)
     SET(Boost_DEBUG 1)
-    SET(Boost_USE_MULTITHREAD ON)
-    SET(Boost_ADDITIONAL_VERSIONS "1.49" "1.49.0" "1.48" "1.48.0" "1.47.0" "1.47" "1.46" "1.46. 1" "1.40" "1.40.0" "1.35.0" "1.35")
+    SET(Boost_USE_MULTITHREADED OFF)
+    SET(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47.0" "1.47" "1.46" "1.46. 1" "1.40" "1.40.0" "1.35.0" "1.35")
     SET(Boost_NO_BOOST_CMAKE ON)

     IF( NOT BOOST_ROOT )
         #If the user has not set BOOST_ROOT, look in a couple common places first.
+        SET(BOOST_ROOT $ENV{BOOST_HOME})
+        FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
         SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/boost)
         FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
         SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/../ThirdParty/boost)


shields: Modify overlay file order

shields: Modify overlay file order

Shield overlay file has to be taken into account after board overlay
file.
ex: When a new node need to be created for a specific board (in
boards/shields/shield_name/boards/board_name/*.overlay) and used by the
shield (in boards/shields/*.overlay), the order of the overlay files is
important

Signed-off-by: Ismael Fillonneau <442d9750715ea95535a4e2a8f6ddf109988eab86@stimio.fr>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -356,6 +356,24 @@
       list(GET shields_refs_list ${_idx} s_path)
       get_filename_component(s_dir ${s_path} DIRECTORY)

+      # search for shield/boards/board.overlay file
+      if(EXISTS ${shield_dir}/${s_dir}/boards/${BOARD}.overlay)
+        # add shield/board overlay to the shield overlays list
+        list(APPEND
+          shield_dts_files
+          ${shield_dir}/${s_dir}/boards/${BOARD}.overlay
+          )
+      endif()
+
+      # search for shield/boards/shield/board.overlay file
+      if(EXISTS ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay)
+        # add shield/board overlay to the shield overlays list
+        list(APPEND
+          shield_dts_files
+          ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay
+          )
+      endif()
+
       # if shield config flag is on, add shield overlay to the shield overlays
       # list and dts_fixup file to the shield fixup file
       list(APPEND
@@ -366,24 +384,6 @@
         shield_dts_fixups
         ${shield_dir}/${s_dir}/dts_fixup.h
         )
-
-      # search for shield/boards/board.overlay file
-      if(EXISTS ${shield_dir}/${s_dir}/boards/${BOARD}.overlay)
-        # add shield/board overlay to the shield overlays list
-        list(APPEND
-          shield_dts_files
-          ${shield_dir}/${s_dir}/boards/${BOARD}.overlay
-          )
-      endif()
-
-      # search for shield/boards/shield/board.overlay file
-      if(EXISTS ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay)
-        # add shield/board overlay to the shield overlays list
-        list(APPEND
-          shield_dts_files
-          ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay
-          )
-      endif()

       # search for shield/shield.conf file
       if(EXISTS ${shield_dir}/${s_dir}/${s}.conf)