FindLua52.cmake: Mark internal variables as advanced.

--- cmake/Modules/FindLua52.cmake
+++ cmake/Modules/FindLua52.cmake
@@ -124,4 +124,5 @@
                                   REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
                                   VERSION_VAR LUA_VERSION_STRING)

-MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY
+                 _LUA_LIBRARY_RELEASE _LUA_LIBRARY_DEBUG)


embedded: fix clang12 hash

embedded: fix clang12 hash

--- cmake/embed/embed_clang.cmake
+++ cmake/embed/embed_clang.cmake
@@ -13,7 +13,7 @@

 if(${LLVM_VERSION} VERSION_EQUAL "12.0.0")
   set(CLANG_DOWNLOAD_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz")
-  set(CLANG_URL_CHECKSUM "SHA256=1267b88d4590d638bab598cc5b54ba0b7520c9aa35d931206941b66f90e7e2f5")
+  set(CLANG_URL_CHECKSUM "SHA256=e26e452e91d4542da3ebbf404f024d3e1cbf103f4cd110c26bf0a19621cca9ed")
 elseif(${LLVM_VERSION} VERSION_EQUAL "8.0.1")
   set(CLANG_DOWNLOAD_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz")
   set(CLANG_URL_CHECKSUM "SHA256=70effd69f7a8ab249f66b0a68aba8b08af52aa2ab710dfb8a0fba102685b1646")


Store binary dir when installing NiftyReg

--- SuperBuild/External_NiftyReg.cmake
+++ SuperBuild/External_NiftyReg.cmake
@@ -71,6 +71,7 @@

     set(${proj}_ROOT        ${${proj}_SOURCE_DIR})
     set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})
+    set(${proj}_Binary_DIR  ${${proj}_SOURCE_DIR})

    else()
       if(${USE_SYSTEM_${externalProjName}})


Force travis to use gcov-7 for coverage

Force travis to use gcov-7 for coverage

--- Testing/script/travis_script.cmake
+++ Testing/script/travis_script.cmake
@@ -54,7 +54,7 @@
 set(MERCURY_DO_COVERAGE $ENV{MERCURY_DO_COVERAGE})
 if(MERCURY_DO_COVERAGE)
   message("Enabling Coverage")
-  # set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov")
+  set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov-7")
   # don't run parallel coverage tests, no matter what.
   set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)


Fix description of Plugins in installer.

--- source/EXTENSIONS/BALLPluginComponents.cmake
+++ source/EXTENSIONS/BALLPluginComponents.cmake
@@ -8,8 +8,8 @@

 IF (COMPONENT_PLUGINS)
 	SET_COMPONENT_NAME(${COMPONENT_PLUGINS}
-		"SpaceNavigator plugin"
-		"Plugin adding support for 3Dconnexion SpaceNavigator input device"
+		"BALLView plugins"
+		"Plugins extending BALLView's functionality"
 	)

 	SET_COMPONENT_DEPENDENCIES(${COMPONENT_PLUGINS} ${COMPONENT_LIBVIEW})


remove forgotten dot

remove forgotten dot

--- cmake/macros/macro_deal_ii_add_definitions.cmake
+++ cmake/macros/macro_deal_ii_add_definitions.cmake
@@ -24,10 +24,9 @@
   FOREACH(_build ${DEAL_II_BUILD_TYPES})
     STRING(TOLOWER ${_build} _build_lowercase)

-    SET_PROPERTY(TARGET ${_name}.${_build_lowercase}
+    SET_PROPERTY(TARGET ${_name}_${_build_lowercase}
       APPEND PROPERTY COMPILE_DEFINITIONS "${ARGN}"
       )
   ENDFOREACH()

 ENDMACRO()
-


Register new beamdyn tests with CTest

Register new beamdyn tests with CTest

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -121,8 +121,10 @@
 of_regression_linear("5MW_Land_BD_Linear"           "openfast;linear;beamdyn;servodyn")

 # BeamDyn regression tests
-bd_regression("bd_5MW_dynamic"            "beamdyn;dynamic")
-bd_regression("bd_curved_beam"            "beamdyn;static")
-bd_regression("bd_isotropic_rollup"       "beamdyn;static")
-bd_regression("bd_static_cantilever_beam" "beamdyn;static")
-bd_regression("bd_static_twisted_with_k1" "beamdyn;static")
+bd_regression("bd_5MW_dynamic"              "beamdyn;dynamic")
+bd_regression("bd_5MW_dynamic_gravity_Az00" "beamdyn;dynamic")
+bd_regression("bd_5MW_dynamic_gravity_Az90" "beamdyn;dynamic")
+bd_regression("bd_curved_beam"              "beamdyn;static")
+bd_regression("bd_isotropic_rollup"         "beamdyn;static")
+bd_regression("bd_static_cantilever_beam"   "beamdyn;static")
+bd_regression("bd_static_twisted_with_k1"   "beamdyn;static")


boards: intel_s1000: Fix runner invocation

Fix the runner invocation for intel_s1000 board by getting
rid of board-dir, gdb and kernel-elf parameters.

Signed-off-by: Rajavardhan Gundi <b08addc5b57f0413e0a4ff6bc495295037640485@intel.com>

--- boards/common/intel_s1000_crb.board.cmake
+++ boards/common/intel_s1000_crb.board.cmake
@@ -2,11 +2,8 @@
 set(BOARD_DEBUG_RUNNER intel_s1000)

 board_finalize_runner_args(intel_s1000
-  "--board-dir=${ZEPHYR_BASE}/boards/xtensa/intel_s1000_crb/"
   "--xt-ocd-dir=/opt/Tensilica/xocd-12.0.4/xt-ocd"
   "--ocd-topology=topology_dsp0_flyswatter2.xml"
   "--ocd-jtag-instr=dsp0_gdb.txt"
   "--gdb-flash-file=load_elf.txt"
-  "--gdb=${TOOLCHAIN_HOME}/bin/xt-gdb"
-  "--kernel-elf=zephyr/zephyr.elf"
 )


boost-python3 can be for Python 3.5, 3.6 or 3.7 too

--- cmake/qibuild/modules/boost_python3-config.cmake
+++ cmake/qibuild/modules/boost_python3-config.cmake
@@ -8,5 +8,5 @@

 # boost-python3 have different names depending on the distribution,
 # it's libboost_python3.so on archlinux but libboost_python-py33.so on ubuntu
-boost_flib(PYTHON3 "python3" "python-py34" "python-py33" "python-py32" "python-py31")
+boost_flib(PYTHON3 "python3" "python-py37" "python-py36" "python-py35" "python-py34" "python-py33" "python-py32" "python-py31")
 qi_persistent_set(BOOST_PYTHON3_DEPENDS "PYTHON3")


[CMake] Make gyb sources show up in Xcode's Open Quickly.

Swift SVN r28820

--- cmake/modules/SwiftHandleGybSources.cmake
+++ cmake/modules/SwiftHandleGybSources.cmake
@@ -74,6 +74,7 @@
           DEPENDS "${gyb_tool}" "${src}" "${gyb_extra_sources}"
           COMMENT "Generating ${src_sans_gyb} from ${src} with ptr size = ${ptr_size}"
           WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+          SOURCES "${src}"
           IDEMPOTENT)
       list(APPEND dependency_targets "${dependency_target}")
     endif()


Remove language selection compiler arguments, use CMAKE_CXX_STANDARD

--- cmake/DevBaseCompiler.cmake
+++ cmake/DevBaseCompiler.cmake
@@ -115,8 +115,6 @@
         "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -Wno-unused-parameter"
     )

-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
-
     set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -U_FORTIFY_SOURCE")

     # Make linker report any unresolved symbols.
@@ -128,8 +126,6 @@
 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     # Handle case where C++ compiler is gcc and not clang.

-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -U_FORTIFY_SOURCE")

     # Make linker report any unresolved symbols.
@@ -138,8 +134,6 @@

 elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     # Handle case where C++ compiler is clang and not gcc.
-
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")

     check_cxx_compiler_flag("-Wno-vla-extension"
         CXX_SUPPORTS_NO_VLA_EXTENSION)


build: begin working on supporting PGI

build: begin working on supporting PGI

PGI doesn't actually work yet; there are a few things to fix in Squash:

 * The splicing code relies on TLS, but PGI doesn't support it (!).
   It should be possible to tweak the code a bit to avoid TLS, which
   would be a good thing for portability in general; TCC doesn't
   support TLS either, though PGI is the only modern non-toy compiler
   I'm aware of which doesn't.
 * PGI doesn't like -fno-builtin, and it's not MSVC.

There also may be something we can fix in Hedley; I was getting an
error from the conformant array parameters (HEDLEY_ARRAY_PARAM).  It
should work in any C99-compliant compiler, but the error was
sufficiently cryptic that I want to take a closer look before pushing
a change.

Additionally, there are issues in libaries various plugins use.  IIRC
brotli, gipfeli, and libdeflate (and maybe others) have issues I
haven't looked at yet.

If anyone wants to take a stab, there is now a community edition:

  http://www.pgroup.com/products/community.htm

I'll try to get back to it soon (I'm curious about performance).  IIRC
brotli, gipfeli, libdeflate, and possibly others will need some
changes.

--- cmake/RequireStandard.cmake
+++ cmake/RequireStandard.cmake
@@ -1,7 +1,20 @@
 include (AddCompilerFlags)

 function (target_require_c_standard target standard)
-  if (${CMAKE_VERSION} VERSION_LESS 3.1 OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
+  if ("${CMAKE_C_COMPILER_ID}" STREQUAL "PGI")
+    get_target_property (sources ${target} SOURCES)
+    if ("${standard}" STREQUAL "c90")
+      set(standard "c89")
+    endif ()
+
+    foreach (source ${sources})
+      if ("${source}" MATCHES "\\.c$")
+        source_file_add_compiler_flags ("${source}" "-${standard}")
+      endif ()
+    endforeach (source)
+
+    unset (sources)
+  elseif (${CMAKE_VERSION} VERSION_LESS 3.1 OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
     get_target_property (sources ${target} SOURCES)

     foreach (source ${sources})
@@ -29,7 +42,17 @@
 endfunction ()

 function (target_require_cxx_standard target standard)
-  if (${CMAKE_VERSION} VERSION_LESS 3.1 OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
+    get_target_property (sources ${target} SOURCES)
+
+    foreach (source ${sources})
+      if ("${source}" MATCHES "\\.(cpp|cc|cxx)$")
+        source_file_add_compiler_flags ("${source}" "-${standard}")
+      endif ()
+    endforeach (source)
+
+    unset (sources)
+  elseif (${CMAKE_VERSION} VERSION_LESS 3.1 OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
     get_target_property (sources ${target} SOURCES)

     foreach (source ${sources})


Revert "shields: Modify overlay file order"

Fixes: #29074

This reverts commit fc8f639b9a6df12a024b0ee5b452db06d7b72609.

The suggestion provided in #27901 is impacting processing order of
overlay files in a non-logical way, see #29074 discussion for details.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -380,24 +380,6 @@
       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
@@ -408,6 +390,24 @@
         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)


Setting build type to Debug, if not set otherwise

Change-Id: Ic4d43202571ce13fdd9dad7a7cab9a321a6db574

--- cmake/internal/config.cmake
+++ cmake/internal/config.cmake
@@ -53,6 +53,12 @@
 SET(GLOBAL_EXTERNAL_LIBRARIES_INSTALL_DIR "${GLOBAL_TOP_LEVEL_BINARY_DIR}/externals")

 # Initialize CMAKE variables
+
+IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+    message(STATUS "Build = 'Debug' as default.")
+    set(CMAKE_BUILD_TYPE Debug CACHE STRING "BUILD_TYPE" FORCE)
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
+ENDIF()

 IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
     IF("${TARGET_OS}" STREQUAL "Windows")


Changed findJNI.cmake to work with the Ubuntu installers

--- cmake_modules/FindJNI.cmake
+++ cmake_modules/FindJNI.cmake
@@ -101,9 +101,11 @@
   ${_JAVA_HOME}/jre/lib
   ${_JAVA_HOME}/lib
   ${_JAVA_HOME}
+  /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
+  /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/{libarch}
+  /usr/lib/jvm/java-6-openjdk-i386/jre/lib/{libarch}
   /usr/lib
   /usr/local/lib
-  /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
   /usr/lib/jvm/java/lib
   /usr/lib/java/jre/lib/{libarch}
   /usr/local/lib/java/jre/lib/{libarch}


restored version check (VERSION_VAR)

restored version check (VERSION_VAR)

--- modules/gpu/FindNPP.cmake
+++ modules/gpu/FindNPP.cmake
@@ -108,6 +108,8 @@
 	REQUIRED_VARS
 		CUDA_NPP_INCLUDES
 		CUDA_NPP_LIBRARIES
+	# Don't remove!!! Please update your CMake.
+	VERSION_VAR
 		NPP_VERSION)

 if(APPLE)


fix cmake

fix cmake

Dependecy qxt modules were not pulled, which required requesting
explicitly all modules. Now only the required module can be requested,
and dependencies are automatically pulled

reviewed-by: Arvid E. Picciani <ebd737da1c9aa00c97e192a0aa7eb489397dcfe5@exys.org>

--- features/FindQxt.cmake
+++ features/FindQxt.cmake
@@ -146,8 +146,9 @@
             MESSAGE("Could not find Qxt Module ${module}")
             RETURN()
         ENDIF(QXT_FOUND_${U_MOD})
-        FOREACH(dep QXT_${U_MOD}_DEPENDSON)
-            SET(QXT_DEPENDS_${dep} TRUE)
+        FOREACH(dep ${QXT_${U_MOD}_DEPENDSON})
+            STRING(TOUPPER ${dep} U_DEP)
+            SET(QXT_DEPENDS_${U_DEP} TRUE)
         ENDFOREACH(dep)
     ENDIF(QXT_USE_${U_MOD} OR QXT_DEPENDS_${U_MOD})
 ENDFOREACH(module)


cmake: Prefer to find the raw lua library instead of a versioned one

The FindLua.cmake function prefers to find the lua library that is
formatted like lua<version>.<os suffix>. This leads to it picking
incompatible headers and libraries on certain distros (notably
Arch). Therefore, if we prefer to find lua.<os suffix> it is more
likely to match with the includes.

--- cmake/FindLua.cmake
+++ cmake/FindLua.cmake
@@ -111,7 +111,7 @@
 unset(_lua_include_subdirs)

 find_library(LUA_LIBRARY
-  NAMES ${_lua_library_names} lua
+  NAMES lua ${_lua_library_names}
   HINTS
     ENV LUA_DIR
   PATH_SUFFIXES lib


Fixed CGUL not installing dependencies (oops).

--- cmake/Install.cmake
+++ cmake/Install.cmake
@@ -205,7 +205,7 @@
                 # Install the library
                 if("${__FIND}" STREQUAL "-1")

-                    #install(FILES ${__LOCATION} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CGUL_LIB_DIR})
+                    install(FILES ${__LOCATION} DESTINATION ${CGUL_LIB_DIR})

                 endif()


Corrige ordem de links do OpenSSL

Corrige ordem de links do OpenSSL

--- cmake/openssl.cmake
+++ cmake/openssl.cmake
@@ -52,4 +52,4 @@

 set(OPENSSL_INCLUDE_DIRS ${OPENSSL_ROOT}/include)
 set(OPENSSL_LIB_PATH ${OPENSSL_ROOT})
-set(OPENSSL_LIBRARIES crypto ssl)
+set(OPENSSL_LIBRARIES ssl crypto)


r9921/sofa : cmake: some SOFA_HAVE_* missing macros fixed

Former-commit-id: 4ce480bad378f656a1071606a8d32355f863f19c

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -68,9 +68,15 @@

 ## ffmpeg
 option(SOFA-EXTERNAL_HAVE_FFMPEG "Use the FFMPEG library" OFF) # SOFA_HAVE_FFMPEG
+if(SOFA-EXTERNAL_HAVE_FFMPEG)
+	list(APPEND compilerDefines SOFA_HAVE_FFMPEG)
+endif()

 ## METIS
 option(SOFA-EXTERNAL_HAVE_METIS "Use Metis" OFF) # SOFA_HAVE_METIS
+if(SOFA-EXTERNAL_HAVE_METIS)
+	list(APPEND compilerDefines SOFA_HAVE_METIS)
+endif()

 ## CSPARSE
 option(SOFA-EXTERNAL_HAVE_CSPARSE "Use CSparse" OFF)
@@ -90,6 +96,14 @@
 else()
 	set(SOFA_VISUAL_LIB SofaOpenglVisual)
 endif()
+
+## SOFA_NO_UPDATE_BBOX
+option(SOFA-MISC_NO_UPDATE_BBOX "No BBOX update" OFF) # SOFA_NO_UPDATE_BBOX
+if(SOFA-MISC_NO_UPDATE_BBOX)
+	list(APPEND compilerDefines SOFA_NO_UPDATE_BBOX)
+endif()
+
+

 ## application
 option(SOFA-APPLICATION_GENERATEDOC "Build GenerateCoc application " OFF)


capture all flags, not only the first one

Thanks to Kai Gallmeister for the fix

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -53,7 +53,7 @@
       string(REGEX REPLACE ".*vendor_id[ \t]*:[ \t]+([a-zA-Z0-9_-]+).*" "\\1" _vendor_id "${_cpuinfo}")
       string(REGEX REPLACE ".*cpu family[ \t]*:[ \t]+([a-zA-Z0-9_-]+).*" "\\1" _cpu_family "${_cpuinfo}")
       string(REGEX REPLACE ".*model[ \t]*:[ \t]+([a-zA-Z0-9_-]+).*" "\\1" _cpu_model "${_cpuinfo}")
-      string(REGEX REPLACE ".*flags[ \t]*:[ \t]+([a-zA-Z0-9_-]+).*" "\\1" _cpu_flags "${_cpuinfo}")
+      string(REGEX REPLACE ".*flags[ \t]*:[ \t]+([^\n]+).*" "\\1" _cpu_flags "${_cpuinfo}")
    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       exec_program("/usr/sbin/sysctl -n machdep.cpu.vendor" OUTPUT_VARIABLE _vendor_id)
       exec_program("/usr/sbin/sysctl -n machdep.cpu.model"  OUTPUT_VARIABLE _cpu_model)


Failed to colorize diagnostic is status

Failed to colorize diagnostic is status

--- cmake/StandardProjectSettings.cmake
+++ cmake/StandardProjectSettings.cmake
@@ -34,6 +34,6 @@
 elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
   add_compile_options(-fdiagnostics-color=always)
 else()
-  message(AUTHOR_WARNING "No colored compiler diagnostic set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
+  message(STATUS "No colored compiler diagnostic set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
 endif()