Bug #12607800 ADD HOOK TO INSTALL TESTS FROM IMPORTED FEATURE TREES Sets INSTALL_PLUGINTESTDIR if any plugin/*/tests exist

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -99,6 +99,13 @@
 ENDIF()

 #
+# plugin_tests's value should not be used by imported plugins,
+# just use if(INSTALL_PLUGINTESTDIR).
+# The plugin must set its own install path for tests
+#
+FILE(GLOB plugin_tests plugin/*/tests)
+
+#
 # STANDALONE layout
 #
 SET(INSTALL_BINDIR_STANDALONE           "bin")
@@ -122,6 +129,7 @@
 SET(INSTALL_SUPPORTFILESDIR_STANDALONE  "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_STANDALONE     "data")
+SET(INSTALL_PLUGINTESTDIR_STANDALONE    ${plugin_tests})

 #
 # RPM layout
@@ -152,6 +160,7 @@
 SET(INSTALL_SUPPORTFILESDIR_RPM         "share/mysql")
 #
 SET(INSTALL_MYSQLDATADIR_RPM            "/var/lib/mysql")
+SET(INSTALL_PLUGINTESTDIR_RPM           ${plugin_tests})

 #
 # DEB layout
@@ -177,6 +186,7 @@
 SET(INSTALL_SUPPORTFILESDIR_DEB         "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_DEB            "data")
+SET(INSTALL_PLUGINTESTDIR_DEB           ${plugin_tests})

 #
 # SVR4 layout
@@ -202,6 +212,7 @@
 SET(INSTALL_SUPPORTFILESDIR_SVR4        "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_SVR4           "/var/lib/mysql")
+SET(INSTALL_PLUGINTESTDIR_SVR4          ${plugin_tests})

 # Clear cached variables if install layout was changed
@@ -216,7 +227,7 @@
 # will be defined  as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
 # layout is chosen)
 FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
-  INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA)
+  INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST)
   SET(INSTALL_${var}DIR  ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
   CACHE STRING "${var} installation directory" ${FORCE})
   MARK_AS_ADVANCED(INSTALL_${var}DIR)


removed boost::filesystem as a dependency

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@833 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -4,7 +4,7 @@
     set(Boost_USE_STATIC_LIBS ON)
 endif(NOT PCL_SHARED_LIBS)

-find_package(Boost 1.40.0 COMPONENTS system filesystem thread date_time)
+find_package(Boost 1.40.0 COMPONENTS system thread date_time)

 include_directories(${Boost_INCLUDE_DIRS})
 link_directories(${Boost_LIBRARY_DIRS})


Depend on Boost chrono if needed (see issue #741)

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -25,8 +25,9 @@

 # Required boost modules
 find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)
-# Chrono doesn't seem to be available in < 1.47
-#find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time chrono iostreams)
+if(WIN32 AND Boost_VERSION VERSION_GREATER "1.49")
+  find_package(Boost 1.40.0 REQUIRED COMPONENTS chrono)
+endif(WIN32 AND Boost_VERSION VERSION_GREATER "1.49")

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


cmake: qi_create_lib did not honor NO_INSTALL argument

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -292,7 +292,9 @@
   )

   #make install rules
-  qi_install_target("${name}" SUBFOLDER "${ARG_SUBFOLDER}")
+  if (NOT ${ARG_NO_INSTALL})
+    qi_install_target("${name}" SUBFOLDER "${ARG_SUBFOLDER}")
+  endif()

   if(APPLE)
     set_target_properties("${name}"


Fix issue #4383

Fix issue #4383

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -330,6 +330,8 @@
     set_target_properties("${name}"
       PROPERTIES
         INSTALL_NAME_DIR "@executable_path/../lib"
+        BUILD_WITH_INSTALL_RPATH 1
+
     )
   endif()


[cmake] add support CC for cuda 11

[cmake] add support CC for cuda 11

fix #102

--- cmake/ChooseCudaCC.cmake
+++ cmake/ChooseCudaCC.cmake
@@ -65,7 +65,7 @@

   set(CC_LIST_BY_SYSTEM_PROCESSOR "")
   if(CMAKE_SYSTEM_PROCESSOR IN_LIST OTHER_SUPPORTED_PROCESSORS)
-    list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "20;21;30;35;50;52;60;61;70;75")
+    list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "20;21;30;35;50;52;60;61;70;75;80")
   endif()
   if(CMAKE_SYSTEM_PROCESSOR IN_LIST TEGRA_SUPPORTED_PROCESSORS)
     list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "32;53;62;72")
@@ -79,9 +79,12 @@
   # Shortening the lists saves a lot of compile time.
   #
   set(CUDA_MIN_CC 20)
-  set(CUDA_MAX_CC 75)
-  if(CUDA_VERSION_MAJOR GREATER_EQUAL 10)
+  set(CUDA_MAX_CC 80)
+  if(CUDA_VERSION_MAJOR GREATER_EQUAL 11)
+    set(CUDA_MIN_CC 35)
+  elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 10)
     set(CUDA_MIN_CC 30)
+    set(CUDA_MAX_CC 75)
   elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 9)
     set(CUDA_MIN_CC 30)
     set(CUDA_MAX_CC 72)


Fix indentation in CodeCoverage.cmake comments

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -47,7 +47,7 @@
 #
 # 3. Set compiler flags to turn off optimization and enable coverage:
 #    SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#	 SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+#    SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
 #
 # 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
 #    which runs your test executable and produces a lcov code coverage report:
@@ -55,8 +55,8 @@
 #	 SETUP_TARGET_FOR_COVERAGE(
 #				my_coverage_target  # Name for custom target.
 #				test_driver         # Name of the test driver executable that runs the tests.
-#									# NOTE! This should always have a ZERO as exit code
-#									# otherwise the coverage generation will not complete.
+#				                    # NOTE! This should always have a ZERO as exit code
+#				                    # otherwise the coverage generation will not complete.
 #				coverage            # Name of output directory.
 #				)
 #
@@ -114,8 +114,8 @@

 # Param _targetname     The name of new the custom make target
 # Param _testrunner     The name of the target which runs the tests.
-#						MUST return ZERO always, even on errors.
-#						If not, no coverage report will be created!
+#                       MUST return ZERO always, even on errors.
+#                       If not, no coverage report will be created!
 # Param _outputname     lcov output is generated as _outputname.info
 #                       HTML report is generated in _outputname/index.html
 # Optional fourth parameter is passed as arguments to _testrunner


Fix CUDA check for gcc > 5.

Fix CUDA check for gcc > 5.

Summary:
In response to https://github.com/caffe2/caffe2/pull/504 , this PR modifies the gcc compiler check for CUDA slightly. All ABI since [gcc-3](https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) are compatible with eachother. The check from https://github.com/caffe2/caffe2/pull/504 forced the 'regular' CXX / CC compiler to be set to gcc < 6 but this is not required.

According to the documentation for [FindCUDA](https://cmake.org/cmake/help/v3.0/module/FindCUDA.html), `CUDA_HOST_COMPILER` is set to `CMAKE_C_COMPILER` by default. This PR checks if `CMAKE_C_COMPILER` is too new for CUDA 8 and whether `CUDA_HOST_COMPILER` is set to `CMAKE_C_COMPILER`. It also modifies the message slightly.
Closes https://github.com/caffe2/caffe2/pull/525

Differential Revision: D5590749

Pulled By: Yangqing

fbshipit-source-id: 89f9ea7aecc787d6b74bf794da8aea82fc547ec1

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -285,14 +285,13 @@
   include(cmake/Cuda.cmake)
   # CUDA 8.0 requires GCC 5
   if(HAVE_CUDA)
-    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
-        NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
+    if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
+        NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0 AND
+        CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER)
       message(FATAL_ERROR
         "CUDA 8.0 is not compatible with GCC version >= 6. "
-        "Use the following options to use another version (for example): \n"
-        "  -DCMAKE_CXX_COMPILER=/usr/bin/g++-5\n"
-        "  -DCMAKE_C_COMPILER=/usr/bin/gcc-5\n"
-        "  -DCUDA_HOST_COMPILER:FILEPATH=/usr/bin/gcc-5\n")
+        "Use the following option to use another version (for example): \n"
+        "  -DCUDA_HOST_COMPILER=/usr/bin/gcc-5\n")
     endif()
   endif()
   # ---[ CUDNN


print opencv cflags

print opencv cflags

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -25,6 +25,8 @@
         pkg_check_modules(OpenCV opencv)

         message(STATUS "OpenCV_PREFIX=${OpenCV_PREFIX}")
+        message(STATUS "OpenCV_CFLAGS=${OpenCV_CFLAGS}")
+        message(STATUS "OpenCV_CFLAGS_OTHER=${OpenCV_CFLAGS_OTHER}")

     else(OpenCV_DIR_EXT STREQUAL ".pc")


Update TBB from 2019_U1 to 2019_U2. (#2154)

--- cmake/external_tbb.cmake
+++ cmake/external_tbb.cmake
@@ -20,7 +20,7 @@

 if(NGRAPH_TBB_ENABLE)
     set(TBB_GIT_REPO_URL https://github.com/01org/tbb)
-    set(TBB_GIT_TAG "2019_U1")
+    set(TBB_GIT_TAG "2019_U2")

     configure_file(${CMAKE_SOURCE_DIR}/cmake/tbb_fetch.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/tbb/CMakeLists.txt)
     execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .


CMake/C++11: Added cmake tag to force v120_CTP_Nov2012 compiler if MSVC 2012 is used. (Closes inviwo/inviwo-dev#781)

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -310,5 +310,12 @@
   else()
     message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
   endif()
-endif()
-
+else()
+  if( MSVC_VERSION LESS 1700 )       # VC10-/VS2010-
+    message(FATAL_ERROR "Inviwo requires C++11 features. "
+                        "You need at least Visual Studio 11 (Microsoft Visual Studio 2012), "
+                        "with Microsoft Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012).")
+  elseif( MSVC_VERSION EQUAL 1700 )  # VC11/VS2012
+    set(CMAKE_GENERATOR_TOOLSET "v120_CTP_Nov2012" CACHE STRING "Platform Toolset" FORCE)
+  endif()
+endif()


removed testing messages

removed testing messages

--- cmake/orol_targets.cmake
+++ cmake/orol_targets.cmake
@@ -152,9 +152,7 @@
     if(SUBSYS_OPT_DEPS)
         SET_IN_GLOBAL_MAP(OROL_SUBSYS_OPT_DEPS ${_name} "${SUBSYS_OPT_DEPS}")
     endif(SUBSYS_OPT_DEPS)
-    set(${test}  ("${subsys_status}" STREQUAL ""))
-          message(${test} " test")
-
+
     foreach(_dep ${SUBSYS_DEPS})
             OROL_GET_SUBSYS_INCLUDE_DIR(_include_dir ${_dep})
             include_directories(${PROJECT_SOURCE_DIR}/${_include_dir}/include)


marking ENABLE_CODE_PROFILING as advanced! if enabled, (make RTF_coverage) will execute lcov and generate html files!

--- conf/RTFOptions.cmake
+++ conf/RTFOptions.cmake
@@ -56,26 +56,8 @@

 if(CMAKE_COMPILER_IS_GNUCXX)
-#    set(RTF_DEBUG_CONFIGURATIONS "Debug" "RelWithDebInfo")
-#    set(CMAKE_C_FLAGS_PROFILE "-pg -g3 -ggdb -fno-inline -ftest-coverage -fprofile-arcs -DNDEBUG" CACHE STRING "Flags used by the compiler during profile builds.")
-#    set(CMAKE_CXX_FLAGS_PROFILE "-pg -g3 -ggdb -fno-inline -ftest-coverage -fprofile-arcs -DNDEBUG" CACHE STRING "Flags used by the compiler during profile builds.")
-#    set(CMAKE_EXE_LINKER_FLAGS_PROFILE "" CACHE STRING "Flags used by the linker during profile builds.")
-#    set(CMAKE_MODULE_LINKER_FLAGS_PROFILE "" CACHE STRING "Flags used by the linker during profile builds.")
-#    set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "" CACHE STRING "Flags used by the linker during profile builds.")
-#    set(CMAKE_STATIC_LINKER_FLAGS_PROFILE "" CACHE STRING "Flags used by the linker during profile builds.")
-
-#    mark_as_advanced(CMAKE_C_FLAGS_PROFILE
-#                   CMAKE_CXX_FLAGS_PROFILE)
-#                   CMAKE_EXE_LINKER_FLAGS_PROFILE
-#                   CMAKE_MODULE_LINKER_FLAGS_PROFILE
-#                   CMAKE_SHARED_LINKER_FLAGS_PROFILE
-#                   CMAKE_STATIC_LINKER_FLAGS_PROFILE)
-#    list(APPEND RTF_DEBUG_CONFIGURATIONS "Profile")
-# Let CMake know which configurations are the debug ones, so that it can
-# link the right library when both optimized and debug library are found
-# set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS ${RTF_DEBUG_CONFIGURATIONS})
-
     option(ENABLE_CODE_PROFILING "Enable code coverage profiling (only for GNUCXX)" OFF)
+    mark_as_advanced(ENABLE_CODE_PROFILING)
     if(ENABLE_CODE_PROFILING)
         set(CMAKE_BUILD_TYPE "Coverage" CACHE STRING "Choose the type of build, recommanded options are: Debug or Release" FORCE)
         include(CodeCoverage)


Fix path to documentation pdf.

Fix path to documentation pdf.

--- Superbuild/Projects/apple/velodyneviewer.bundle.cmake
+++ Superbuild/Projects/apple/velodyneviewer.bundle.cmake
@@ -3,13 +3,12 @@
 set (CPACK_GENERATOR DragNDrop)
 include(CPack)

-# we only to paraview explicitly.
 install(CODE "
      file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
           \"${install_location}/bin/VeloView.app\")

      file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE FILE FILES
-          \"${SuperBuild_BINARY_DIR}/velodyneviewer/src/velodyneviewer/Doc/VeloView_Developer_Guide.pdf\")
+          \"${VelodyneViewerSuperBuild_SOURCE_DIR}/../Documentation/VeloView_Developer_Guide.pdf\")

      file(WRITE \"\${CMAKE_INSTALL_PREFIX}/VeloView.app/Contents/Resources/qt.conf\"
                 \"\")


Some minor cleaning up.

Some minor cleaning up.

xcodebuild used to always generate an error message, even though
everything was fine. However, now, there is no such message anymore
(!?), so…

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -104,18 +104,14 @@
         ADD_DEFINITIONS(-D_UNICODE)
     ENDIF()

-    # Use the oldest SDK shipped with Xcode
-    # Note: xcodebuild always seems to generate an error message even though
-    #       everything works fine, hence we pass ERROR_QUIET to
-    #       EXECUTE_PROCESS()...
+    # On OS X, use the oldest SDK shipped with Xcode

     IF(APPLE)
         EXECUTE_PROCESS(COMMAND xcodebuild -showsdks
                         COMMAND grep --colour=never macosx
                         COMMAND head -1
                         OUTPUT_VARIABLE OLDEST_SDK_LINE
-                        OUTPUT_STRIP_TRAILING_WHITESPACE
-                        ERROR_QUIET)
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
         EXECUTE_PROCESS(COMMAND echo ${OLDEST_SDK_LINE}
                         COMMAND cut -f2
                         OUTPUT_VARIABLE OLDEST_OS_X_VERSION
@@ -136,8 +132,7 @@
                         OUTPUT_STRIP_TRAILING_WHITESPACE)
         EXECUTE_PROCESS(COMMAND xcodebuild -version -sdk ${OLDEST_SDK_NAME} Path
                         OUTPUT_VARIABLE OLDEST_SDK_PATH
-                        OUTPUT_STRIP_TRAILING_WHITESPACE
-                        ERROR_QUIET)
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)

         MESSAGE("Building for ${OLDEST_OS_X_VERSION} and above...")


Workaround buggy Linux dtrace - it fails on fedora if CC is set to 'ccache gcc'

--- cmake/dtrace.cmake
+++ cmake/dtrace.cmake
@@ -34,9 +34,15 @@
  FIND_PROGRAM(DTRACE dtrace)
  MARK_AS_ADVANCED(DTRACE)

+ IF(CMAKE_C_COMPILER MATCHES "ccache" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+   # dtrace fails on fedora if  CC='ccache gcc' is used
+   SET(BUGGY_LINUX_DTRACE 1)
+ ENDIF()
+
  # On FreeBSD, dtrace does not handle userland tracing yet
  IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
-     AND NOT BUGGY_GCC_NO_DTRACE_MODULES)
+     AND NOT BUGGY_GCC_NO_DTRACE_MODULES
+     AND NOT BUGGY_LINUX_DTRACE)
    SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
  ENDIF()
  SET(HAVE_DTRACE ${ENABLE_DTRACE})


Add another bunch of lapack 3.7 functions to cmake list

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -61,9 +61,9 @@
   sgeqp3.f DEPRECATED/sgeqpf.f sgeqr2.f sgeqr2p.f sgeqrf.f sgeqrfp.f sgerfs.f
   sgerq2.f sgerqf.f sgesc2.f sgesdd.f  sgesvd.f sgesvdx.f sgesvx.f
   sgetc2.f sgetri.f sgetrf2.f
-  sggbak.f sggbal.f sgghd3.f  sgges.f  sggesx.f sggev.f sggev3.f  sggevx.f
+  sggbak.f sggbal.f sgghd3.f  sgges.f  sgges3.f sggesx.f sggev.f sggev3.f  sggevx.f
   sggglm.f sgghrd.f sgglse.f sggqrf.f
-  sggrqf.f DEPRECATED/sggsvd.f DEPRECATED/sggsvp.f sgtcon.f sgtrfs.f sgtsv.f
+  sggrqf.f DEPRECATED/sggsvd.f sggsvd3.f DEPRECATED/sggsvp.f sggsvp3.f sgtcon.f sgtrfs.f sgtsv.f
   sgtsvx.f sgttrf.f sgttrs.f sgtts2.f shgeqz.f
   shsein.f shseqr.f slabrd.f slacon.f slacn2.f
   slaein.f slaexc.f slag2.f  slags2.f slagtm.f slagv2.f slahqr.f
@@ -80,7 +80,7 @@
   slatbs.f slatdf.f slatps.f slatrd.f slatrs.f slatrz.f DEPRECATED/slatzm.f
   sopgtr.f sopmtr.f sorg2l.f sorg2r.f
   sorgbr.f sorghr.f sorgl2.f sorglq.f sorgql.f sorgqr.f sorgr2.f
-  sorgrq.f sorgtr.f sorm2l.f sorm2r.f
+  sorgrq.f sorgtr.f sorm2l.f sorm2r.f sorm22.f
   sormbr.f sormhr.f sorml2.f sormlq.f sormql.f sormqr.f sormr2.f
   sormr3.f sormrq.f sormrz.f sormtr.f spbcon.f spbequ.f spbrfs.f
   spbstf.f spbsv.f  spbsvx.f
@@ -214,7 +214,7 @@
   dgeqp3.f DEPRECATED/dgeqpf.f dgeqr2.f dgeqr2p.f dgeqrf.f dgeqrfp.f dgerfs.f
   dgerq2.f dgerqf.f dgesc2.f dgesdd.f  dgesvd.f dgesvdx.f dgesvx.f
   dgetc2.f dgetri.f dgetrf2.f
-  dggbak.f dggbal.f dgges.f  dggesx.f dggev.f dggev3.f  dggevx.f
+  dggbak.f dggbal.f dgges.f  dgges3.f dggesx.f dggev.f dggev3.f  dggevx.f
   dggglm.f dgghd3.f dgghrd.f dgglse.f dggqrf.f
   dggrqf.f dggsvd3.f dggsvp3.f DEPRECATED/dggsvd.f DEPRECATED/dggsvp.f dgtcon.f dgtrfs.f dgtsv.f
   dgtsvx.f dgttrf.f dgttrs.f dgtts2.f dhgeqz.f
@@ -233,12 +233,12 @@
   dlatbs.f dlatdf.f dlatps.f dlatrd.f dlatrs.f dlatrz.f DEPRECATED/dlatzm.f
   dopgtr.f dopmtr.f dorg2l.f dorg2r.f
   dorgbr.f dorghr.f dorgl2.f dorglq.f dorgql.f dorgqr.f dorgr2.f
-  dorgrq.f dorgtr.f dorm2l.f dorm2r.f
+  dorgrq.f dorgtr.f dorm2l.f dorm2r.f dorm22.f
   dormbr.f dormhr.f dorml2.f dormlq.f dormql.f dormqr.f dormr2.f
   dormr3.f dormrq.f dormrz.f dormtr.f dpbcon.f dpbequ.f dpbrfs.f
   dpbstf.f dpbsv.f  dpbsvx.f
   dpbtf2.f dpbtrf.f dpbtrs.f dpocon.f dpoequ.f dporfs.f dposv.f
-  dposvx.f dpotrs.f dpstrf.f dpstf2.f
+  dposvx.f dpotrf2.f dpotrs.f dpstrf.f dpstf2.f
   dppcon.f dppequ.f
   dpprfs.f dppsv.f  dppsvx.f dpptrf.f dpptri.f dpptrs.f dptcon.f
   dpteqr.f dptrfs.f dptsv.f  dptsvx.f dpttrs.f dptts2.f drscl.f
@@ -289,6 +289,7 @@
   zggbak.f zggbal.f zgges.f zgges3.f zggesx.f zggev.f zggev3.f zggevx.f zggglm.f
   zgghd3.f zgghrd.f zgglse.f zggqrf.f zggrqf.f
   DEPRECATED/zggsvd.f zggsvd3.f DEPRECATED/zggsvp.f zggsvp3.f
+  zgsvj0.f zgsvj1.f
   zgtcon.f zgtrfs.f zgtsv.f  zgtsvx.f zgttrf.f zgttrs.f zgtts2.f zhbev.f
   zhbevd.f zhbevx.f zhbgst.f zhbgv.f  zhbgvd.f zhbgvx.f zhbtrd.f
   zhecon.f zheev.f  zheevd.f zheevr.f zheevx.f zhegs2.f zhegst.f
@@ -321,7 +322,7 @@
   zlatbs.f zlatdf.f zlatps.f zlatrd.f zlatrs.f zlatrz.f DEPRECATED/zlatzm.f
   zpbcon.f zpbequ.f zpbrfs.f zpbstf.f zpbsv.f
   zpbsvx.f zpbtf2.f zpbtrf.f zpbtrs.f zpocon.f zpoequ.f zporfs.f
-  zposv.f  zposvx.f zpotrs.f zpstrf.f zpstf2.f
+  zposv.f  zposvx.f zpotrf2.f zpotrs.f zpstrf.f zpstf2.f
   zppcon.f zppequ.f zpprfs.f zppsv.f  zppsvx.f zpptrf.f zpptri.f zpptrs.f
   zptcon.f zpteqr.f zptrfs.f zptsv.f  zptsvx.f zpttrf.f zpttrs.f zptts2.f
   zrot.f   zspcon.f zsprfs.f zspsv.f
@@ -338,7 +339,7 @@
   ztptrs.f ztrcon.f ztrevc.f ztrevc3.f ztrexc.f ztrrfs.f ztrsen.f ztrsna.f
   ztrsyl.f ztrtrs.f DEPRECATED/ztzrqf.f ztzrzf.f zung2l.f
   zung2r.f zungbr.f zunghr.f zungl2.f zunglq.f zungql.f zungqr.f zungr2.f
-  zungrq.f zungtr.f zunm2l.f zunm2r.f zunmbr.f zunmhr.f zunml2.f
+  zungrq.f zungtr.f zunm2l.f zunm2r.f zunmbr.f zunmhr.f zunm22.f zunml2.f
   zunmlq.f zunmql.f zunmqr.f zunmr2.f zunmr3.f zunmrq.f zunmrz.f
   zunmtr.f zupgtr.f
   zupmtr.f izmax1.f dzsum1.f zstemr.f
@@ -353,7 +354,7 @@
   zgelq.f zgelqt.f zgelqt3.f zgemlq.f zgemlqt.f zgemqr.f zgeqr.f zgetsls.f
   zlamswlq.f zlamtsqr.f zlaswlq.f zlatsqr.f ztplqt.f ztplqt2.f ztpmlqt.f
   zhesv_aa.f zhetrf_aa.f zhetrs_aa.f zlahef_aa.f zsytf2_rk.f zlasyf_rk.f
-  zsytrf_rk.f zsytrs_3.f zsycon_3.f zsytri_3.f zsytri_3x.f zsysv_rk.f
+  zsytrf_aa.f zsytrf_rk.f zsytrs_3.f zsycon_3.f zsytri_3.f zsytri_3x.f zsysv_rk.f
   zhetf2_rk.f zlahef_rk.f zhetrf_rk.f zhetrs_3.f zhecon_3.f zhetri_3.f
   zhetri_3x.f zhesv_rk.f zhb2st_kernels.f zhbev_2stage.f zhbevd_2stage.f
   zhbevx_2stage.f zheev_2stage.f zheevd_2stage.f zheevr_2stage.f


MDEV-85: Remove shared plugin library if build swtiches from shared to static with  e.g  cmake . -DWITH_XXXX_STORAGE_ENGINE=1

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -111,8 +111,27 @@
     SET(ARG_DEPENDENCIES)
   ENDIF()
   SET(BUILD_PLUGIN 1)
+
+  IF(NOT ARG_MODULE_OUTPUT_NAME)
+    IF(ARG_STORAGE_ENGINE)
+      SET(ARG_MODULE_OUTPUT_NAME "ha_${target}")
+    ELSE()
+      SET(ARG_MODULE_OUTPUT_NAME "${target}")
+    ENDIF()
+  ENDIF()
+
   # Build either static library or module
   IF (WITH_${plugin} AND NOT ARG_MODULE_ONLY)
+
+    IF(CMAKE_GENERATOR MATCHES "Makefiles")
+      # If there is a shared library from previous shared build,
+      # remove it. This is done just for mysql-test-run.pl
+      # so it does not try to use stale shared lib as plugin
+      # in test.
+      FILE(REMOVE
+        ${CMAKE_CURRENT_BINARY_DIR}/${ARG_MODULE_OUTPUT_NAME}${CMAKE_SHARED_MODULE_SUFFIX})
+    ENDIF()
+
     ADD_LIBRARY(${target} STATIC ${SOURCES})
     SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITONS "MYSQL_SERVER")
     DTRACE_INSTRUMENT(${target})
@@ -159,14 +178,7 @@
       PARENT_SCOPE)
     ENDIF()
   ELSEIF(NOT WITHOUT_${plugin} AND NOT ARG_STATIC_ONLY  AND NOT WITHOUT_DYNAMIC_PLUGINS)
-    IF(NOT ARG_MODULE_OUTPUT_NAME)
-      IF(ARG_STORAGE_ENGINE)
-        SET(ARG_MODULE_OUTPUT_NAME "ha_${target}")
-      ELSE()
-        SET(ARG_MODULE_OUTPUT_NAME "${target}")
-      ENDIF()
-    ENDIF()
-
+
     ADD_VERSION_INFO(${target} MODULE SOURCES)
     ADD_LIBRARY(${target} MODULE ${SOURCES})
     DTRACE_INSTRUMENT(${target})


Update clang toolchain for RVV.

Update clang toolchain for RVV.

--- platforms/linux/riscv64-clang.toolchain.cmake
+++ platforms/linux/riscv64-clang.toolchain.cmake
@@ -17,8 +17,8 @@
 # Don't run the linker on compiler check
 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

-set(CMAKE_C_FLAGS "-march=rv64gcv0p10 -menable-experimental-extensions --gcc-toolchain=${RISCV_GCC_INSTALL_ROOT} -w ${CMAKE_C_FLAGS}")
-set(CMAKE_CXX_FLAGS "-march=rv64gcv0p10 -menable-experimental-extensions --gcc-toolchain=${RISCV_GCC_INSTALL_ROOT} -w ${CXX_FLAGS}")
+set(CMAKE_C_FLAGS "-march=rv64gcv --gcc-toolchain=${RISCV_GCC_INSTALL_ROOT} -w ${CMAKE_C_FLAGS}")
+set(CMAKE_CXX_FLAGS "-march=rv64gcv --gcc-toolchain=${RISCV_GCC_INSTALL_ROOT} -w ${CXX_FLAGS}")

 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}  -O2")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}  -O2")


cmake: improved boost_python discovery

cmake: improved boost_python discovery

--- config/FindVIGRANUMPY_DEPENDENCIES.cmake
+++ config/FindVIGRANUMPY_DEPENDENCIES.cmake
@@ -91,11 +91,25 @@
     # 'FIND_PACKAGE(Boost COMPONENTS python)' is unreliable because it often selects
     # boost_python for the wrong Python version
     IF(Boost_FOUND)
+        IF(Boost_USE_MULTITHREADED)
+            # define names for thread-safe library variants
+            SET(BOOST_PYTHON_NAMES
+                    boost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-mt
+                    boost_python${PYTHON_VERSION_MAJOR}-mt
+                    boost_python-mt)
+        ENDIF()
+        # define names for boost_python library variants
+        # (may or may not be thread-safe)
+        SET(BOOST_PYTHON_NAMES ${BOOST_PYTHON_NAMES}
+                # Linux with multiple Python versions
+                boost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
+                # Mac with Python 3
+                boost_python${PYTHON_VERSION_MAJOR}
+                # default
+                boost_python)
+
         FIND_LIBRARY(Boost_PYTHON_LIBRARY
-                     NAMES boost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}   # Linux with multiple Python versions
-                           boost_python-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
-                           boost_python-mt                                                 # Mac
-                           boost_python                                                    # default
+                     NAMES ${BOOST_PYTHON_NAMES}
                      HINTS "${Boost_LIBRARY_DIR}"
                      DOC "boost_python libraries")
     ENDIF()


NO-JIRA: Make windows check symbols work more reliably

--- tools/cmake/Modules/WindowsC99CheckDef.cmake
+++ tools/cmake/Modules/WindowsC99CheckDef.cmake
@@ -26,6 +26,9 @@

 set(obj_dir ${CMAKE_CURRENT_BINARY_DIR}/qpid-proton.dir/${CMAKE_CFG_INTDIR})

-add_custom_command(TARGET qpid-proton PRE_LINK COMMAND ${PYTHON_EXECUTABLE}
-        ${CMAKE_MODULE_PATH}WindowsC99SymbolCheck.py ${obj_dir}
-        COMMENT "Checking for dangerous use of C99-violating functions")
+add_custom_command(
+    TARGET qpid-proton
+	PRE_LINK
+    COMMAND ${PYTHON_EXECUTABLE}
+	    ${CMAKE_MODULE_PATH}WindowsC99SymbolCheck.py $<TARGET_FILE_DIR:qpid-proton>
+    COMMENT "Checking for dangerous use of C99-violating functions")


Incomplete - task references #242: Ajout de Curl

--- CMake/DependenciesXsilium.cmake
+++ CMake/DependenciesXsilium.cmake
@@ -323,10 +323,10 @@
 set(XSILIUM_LIBRARY "XsiliumEngine")

 #Find Curl
-FIND_PACKAGE(CURL REQUIRED)
+#FIND_PACKAGE(CURL REQUIRED)

 #Find Curl
-set(CURL_INCLUDE "${CMAKE_SOURCE_DIR}/Library/Curl/include)
+set(CURL_INCLUDE "${CMAKE_SOURCE_DIR}/Library/Curl/include")

 #Find Librsync
 set(RSYNC_INCLUDE "${CMAKE_SOURCE_DIR}/Library/Librsync")


Need to include some more boost headers for boost 1.50+

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -180,7 +180,6 @@
       PATTERN "asio" EXCLUDE
       PATTERN "assign" EXCLUDE
       PATTERN "bimap" EXCLUDE
-      PATTERN "chrono" EXCLUDE
       PATTERN "circular_buffer" EXCLUDE
       PATTERN "compatibility" EXCLUDE
       PATTERN "concept_check" EXCLUDE
@@ -189,7 +188,6 @@
       PATTERN "filesystem" EXCLUDE
       PATTERN "flyweight" EXCLUDE
       PATTERN "format" EXCLUDE
-      PATTERN "functional" EXCLUDE
       PATTERN "fusion" EXCLUDE
       PATTERN "geometry" EXCLUDE
       PATTERN "gil" EXCLUDE
@@ -214,18 +212,15 @@
       PATTERN "ptr_container" EXCLUDE
       PATTERN "python" EXCLUDE
       PATTERN "random" EXCLUDE
-      PATTERN "ratio" EXCLUDE
       PATTERN "regex" EXCLUDE
       PATTERN "serialization" EXCLUDE
       PATTERN "signals" EXCLUDE
       PATTERN "signals2" EXCLUDE
       PATTERN "spirit" EXCLUDE
       PATTERN "statechart" EXCLUDE
-      PATTERN "system" EXCLUDE
       PATTERN "test" EXCLUDE
       PATTERN "timer" EXCLUDE
       PATTERN "tr1" EXCLUDE
-      PATTERN "typeof" EXCLUDE
       PATTERN "units" EXCLUDE
       PATTERN "unordered" EXCLUDE
       PATTERN "uuid" EXCLUDE


Download from mitk.org

Download from mitk.org

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -25,7 +25,8 @@
     set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
   else()
     set(download_step
-        SVN_REPOSITORY https://svn.inet.dkfz-heidelberg.de/sbr/Sources/SBR-Projects/MatchPoint/trunk
+        URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1372.tar.gz
+        URL_MD5 bfaabc06873a532c06bf9dfea173d3aa
         #SOURCE_DIR ${ep_prefix}/${proj}
        )
   endif()
@@ -55,6 +56,7 @@
   #  mitkFunctionInstallExternalCMakeProject(${proj})
   ExternalProject_Get_Property(${proj} binary_dir)
   set(MatchPoint_DIR ${binary_dir})
+  mitkFunctionInstallExternalCMakeProject(${proj})

 else()


hopefully fixed gtest dependency by really trigger building gtest when required

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -594,7 +594,6 @@
       if (NOT EXISTS "${CMAKE_BINARY_DIR}/_gtest_from_src")
         # for now, this would only work on Ubuntu
         add_subdirectory("/usr/src/gtest/" ${CMAKE_BINARY_DIR}/_gtest_from_src)
-        add_dependencies(${exe} gtest gtest_main)
       endif()
     else()
       message(WARNING "GTest not found; C++ tests will fail to build.")
@@ -608,6 +607,7 @@
   target_link_libraries(${exe} ${_gtest_LIBRARIES})
   rosbuild_add_link_flags(${exe} ${_gtest_LDFLAGS_OTHER})
   rosbuild_declare_test(${exe})
+  add_dependencies(${exe} gtest gtest_main)
 endmacro(rosbuild_add_gtest_build_flags)

 # Declare an executable to be a test harness, which excludes it from the


applied patch to use standard OpenMP detection, #3184

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -965,6 +965,15 @@
     _rosbuild_warn("because ROS_TEST_COVERAGE is set, OpenMP support is disabled")
   else("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")

+  # First, try to use the standard FindOpenMP module (#3184).  If that
+  # fails, fall back on manual detection.  I don't know why the standard
+  # detection would ever fail; it's possible that the manual
+  # detection is now vestigial and could be removed.
+  include(FindOpenMP)
+  if(${OPENMP_FOUND} STREQUAL "TRUE")
+      rosbuild_add_compile_flags(${target} ${OpenMP_C_FLAGS})
+      rosbuild_add_link_flags(${target} ${OpenMP_C_FLAGS})
+  else(${OPENMP_FOUND} STREQUAL "TRUE")
   # list of OpenMP flags to check
     set(_rospack_check_openmp_flags
       "-fopenmp" # gcc
@@ -987,7 +996,7 @@
       if(NOT _rospack_openmp_flag_found)
         set(CMAKE_REQUIRED_FLAGS ${_rospack_openmp_test_flag})
         check_function_exists(omp_set_num_threads _rospack_openmp_function_found${_rospack_openmp_test_flag})
-
+
         if(_rospack_openmp_function_found${_rospack_openmp_test_flag})
   	set(_rospack_openmp_flag_value ${_rospack_openmp_test_flag})
   	set(_rospack_openmp_flag_found TRUE)
@@ -1006,6 +1015,7 @@
       message("WARNING: OpenMP compile flag not found")
     endif(_rospack_openmp_flag_found)

+  endif(${OPENMP_FOUND} STREQUAL "TRUE")
   endif("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")
 endmacro(rosbuild_add_openmp_flags)


Update the custom targets

Update the custom targets

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

--- deal.II/cmake/setup_custom_targets.cmake
+++ deal.II/cmake/setup_custom_targets.cmake
@@ -10,7 +10,20 @@
 #

 ADD_CUSTOM_TARGET(library)
-ADD_DEPENDENCIES(library ${DEAL_II_BASE_NAME})
+
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+  ADD_CUSTOM_TARGET(debug)
+
+  ADD_DEPENDENCIES(library ${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX})
+  ADD_DEPENDENCIES(debug ${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX})
+ENDIF()
+
+IF(CMAKE_BUILD_TYPE MATCHES "Release")
+  ADD_CUSTOM_TARGET(release)
+
+  ADD_DEPENDENCIES(library ${DEAL_II_BASE_NAME})
+  ADD_DEPENDENCIES(release ${DEAL_II_BASE_NAME})
+ENDIF()

 IF(DEAL_II_COMPONENT_DOCUMENTATION)


COMP: disabled mitkNDIProtocolTest

COMP: disabled mitkNDIProtocolTest

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -13,7 +13,7 @@
    mitkNavigationDataToPointSetFilterTest.cpp
    mitkNavigationDataTransformFilterTest.cpp
    mitkNDIPassiveToolTest.cpp
-   mitkNDIProtocolTest.cpp
+   # mitkNDIProtocolTest.cpp
    mitkNDITrackingDeviceTest.cpp
    mitkTimeStampTest.cpp
    #mitkTrackingDeviceSourceTest.cpp


ctest memcheck: fix detection of memory problems

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -370,7 +370,7 @@
      CACHE STRING
 	   "Optional suffix to use on lib folders (e.g. 64 for lib64)")

-set (MEMORYCHECK_COMMAND_OPTIONS "--error-exitcode=1")
+set (MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --error-exitcode=1")
 set (MEMORYCHECK_SUPPRESSIONS_FILE
      "${CMAKE_SOURCE_DIR}/tests/valgrind.suppression"
      CACHE FILEPATH


Another small fix for FindGraphviz.cmake.

--- cmake/FindGraphviz.cmake
+++ cmake/FindGraphviz.cmake
@@ -94,7 +94,7 @@
     set(FIND_GRAPHVIZ_VERSION_ADD_INCLUDES
       "-DINCLUDE_DIRECTORIES:STRING=${GRAPHVIZ_INCLUDE_DIR}")

-    set(GRAPHVIZ_INCLUDE_DIRS "${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz")
+    set(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz)

     if(NOT CMAKE_CROSSCOMPILING)
     try_run(RUN_RESULT COMPILE_RESULT


force to use -stdlib=libc++

force to use -stdlib=libc++

--- cmake/InstallFolly.cmake
+++ cmake/InstallFolly.cmake
@@ -15,8 +15,8 @@
                             LIBRARY_PATH=<INSTALL_DIR>/lib
                             LDFLAGS=-L<INSTALL_DIR>/lib
                             PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig
-                            CFLAGS=-I<INSTALL_DIR>/include
-                            CXXFLAGS=-I<INSTALL_DIR>/include
+                            CFLAGS=-I<INSTALL_DIR>/include -stdlib=libc++
+                            CXXFLAGS=-I<INSTALL_DIR>/include -stdlib=libc++
                             LIBS=${CMAKE_THREAD_LIBS_INIT}
                             OPENSSL_CFLAGS=-I${OPENSSL_INCLUDE_DIR}
                             OPENSSL_LIBS=-L${OPENSSL_LIBRARY_DIR}


cmake: support OPENCV_ABI_SKIP_MODULES_LIST

backporting of commit f163778da7132304ad9f1bf3f3743660042ba406

--- cmake/OpenCVGenABI.cmake
+++ cmake/OpenCVGenABI.cmake
@@ -1,6 +1,8 @@
 if (NOT GENERATE_ABI_DESCRIPTOR)
   return()
 endif()
+
+set(OPENCV_ABI_SKIP_MODULES_LIST "" CACHE STRING "List of modules to exclude from ABI checker")

 set(filename "opencv_abi.xml")
 set(path1 "${CMAKE_BINARY_DIR}/${filename}")
@@ -28,6 +30,7 @@
   string(REGEX REPLACE "^opencv_" "" mod "${mod}")
   if(NOT OPENCV_MODULE_opencv_${mod}_CLASS STREQUAL "PUBLIC"
       OR NOT "${OPENCV_MODULE_opencv_${mod}_LOCATION}" STREQUAL "${OpenCV_SOURCE_DIR}/modules/${mod}" # opencv_contrib
+      OR ";${mod};" MATCHES ";${OPENCV_ABI_SKIP_MODULES_LIST};"
   )
     # headers
     foreach(h ${OPENCV_MODULE_opencv_${mod}_HEADERS})


Core: Cotire, potential fix for inviwo/inviwo-dev#903

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -815,6 +815,21 @@
     set(_pchDisabledForThisModule TRUE)
 endmacro()

+
+#--------------------------------------------------------------------
+# Set header ignore paths for cotire
+macro(cotire_ignore)
+    get_target_property(COTIRE_PREFIX_HEADER_IGNORE_PATH ${_projectName} COTIRE_PREFIX_HEADER_IGNORE_PATH)
+    if(NOT COTIRE_PREFIX_HEADER_IGNORE_PATH)
+        set(COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+    endif()
+
+    list(APPEND COTIRE_PREFIX_HEADER_IGNORE_PATH $IVW_COTIRE_EXCLUDES})
+    list(REMOVE_DUPLICATES COTIRE_PREFIX_HEADER_IGNORE_PATH)
+
+    set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${COTIRE_PREFIX_HEADER_IGNORE_PATH}")
+endmacro()
+
 #--------------------------------------------------------------------
 # Optimize compilation with pre-compilied headers from inviwo core
 macro(ivw_compile_optimize_inviwo_core)
@@ -823,8 +838,8 @@
 			set_target_properties(${_projectName} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
 		endif()

-        set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH
-            "${COTIRE_PREFIX_HEADER_IGNORE_PATH};$IVW_COTIRE_EXCLUDES}")
+        cotire_ignore()
+
         set_target_properties(${_projectName} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
         get_target_property(_prefixHeader inviwo-core COTIRE_CXX_PREFIX_HEADER)
         set_target_properties(${_projectName} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${_prefixHeader}")
@@ -836,8 +851,7 @@
 # Optimize compilation with pre-compilied headers
 macro(ivw_compile_optimize)
     if(PRECOMPILED_HEADERS)
-        set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH
-            "${COTIRE_PREFIX_HEADER_IGNORE_PATH};${IVW_COTIRE_EXCLUDES}")
+        cotire_ignore()
         set_target_properties(${_projectName} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
 		list(APPEND _allPchDirs ${IVW_EXTENSIONS_DIR})
 		set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_INCLUDE_PATH "${_allPchDirs}")


one more attempt to forward the objcopy binary

--- cmake/packages/deb.cmake
+++ cmake/packages/deb.cmake
@@ -123,7 +123,7 @@
 configure_file(cmake/packages/dbg/deb.txt ${DEBUG_BUILD_DIR}/CMakeLists.txt @ONLY)

 add_custom_target(package-arongodb-dbg
-  COMMAND ${CMAKE_COMMAND} .
+	COMMAND ${CMAKE_COMMAND} . -DCMAKE_OBJCOPY=${CMAKE_OBJCOPY}
   COMMAND ${CMAKE_CPACK_COMMAND} -G DEB
   COMMAND cp *.deb ${PROJECT_BINARY_DIR}
   WORKING_DIRECTORY ${DEBUG_BUILD_DIR})


Missing asio dependency.

Missing asio dependency.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -107,12 +107,14 @@
 set(HALLEY_PROJECT_LIBS
 	optimized halley-opengl
 	optimized halley-sdl
+	optimized halley-asio
 	optimized halley-core
 	optimized halley-entity
 	optimized halley-audio
 	optimized halley-net
 	optimized halley-lua
 	optimized halley-utils
+	debug halley-asio_d
 	debug halley-opengl_d
 	debug halley-sdl_d
 	debug halley-core_d


fixes

fixes

--- cmake/get-libvorbis.cmake
+++ cmake/get-libvorbis.cmake
@@ -5,10 +5,11 @@

 include(ExternalProject)

-set(LIBOGG_VERSION "1.3.5")
+set(LIBVORBIS_VERSION "1.3.5")

-set(LIBOGG_CMAKE_ARGS
+set(LIBVORBIS_CMAKE_ARGS
     ${COMMON_CMAKE_ARGS}
+      -G ${CMAKE_GENERATOR}
       -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
       -DCMAKE_INSTALL_PREFIX=${DEPENDENCY_INSTALL_DIR}
       -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
@@ -16,12 +17,12 @@
 )

 ExternalProject_Add(
-    libogg
+    libvorbis
     PREFIX          ${DEPENDENCY_EXTRACT_DIR}
     DOWNLOAD_DIR    ${DEPENDENCY_DOWNLOAD_DIR}
     DOWNLOAD_NAME   libvorbis-v${LIBOGG_VERSION}.zip
     URL             http://downloads.xiph.org/releases/vorbis/libvorbis-${LIBOGG_VERSION}.zip
     URL_MD5         1
     PATCH_COMMAND   ${CMAKE_COMMAND} -E copy ${CMAKE_MODULE_PATH}/patches/libvorbis/CMakeLists.txt  ${DEPENDENCY_EXTRACT_DIR}/src/libvorbis
-    CMAKE_ARGS      ${LIBOGG_CMAKE_ARGS}
+    CMAKE_ARGS      ${LIBVORBIS_CMAKE_ARGS}
 )


Avoid newline in date output.

Avoid newline in date output.

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -123,7 +123,7 @@
 #  EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE TMP_DATE)
 #  STRING(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" MYSQL_COPYRIGHT_YEAR ${TMP_DATE})
 IF(UNIX)
-  EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE MYSQL_COPYRIGHT_YEAR)
+  EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE MYSQL_COPYRIGHT_YEAR OUTPUT_STRIP_TRAILING_WHITESPACE)
 ENDIF()

 # Add version information to the exe and dll files


qi_sanitize_compile_flags(): disable MSVC warnings about dll interface and template usage.

Change-Id: I220aa4e37b8d0f9f63c7467914392c0d1991f3d4
Reviewed-on: http://gerrit.aldebaran.lan/57348
Reviewed-by: jlamotte <70353e7b0c7d18b7fc75605daf0ccba69fcd3222@aldebaran.com>
Approved: jlamotte <70353e7b0c7d18b7fc75605daf0ccba69fcd3222@aldebaran.com>
Tested-by: jlamotte <70353e7b0c7d18b7fc75605daf0ccba69fcd3222@aldebaran.com>

--- cmake/qibuild/flags.cmake
+++ cmake/qibuild/flags.cmake
@@ -5,6 +5,21 @@
 #! Handling compile flags
 # =======================

+
+# CMAKE_C_FLAGS and the like are _strings_, not lists
+macro(_qi_add_flags var flags)
+  string(FIND "${${var}}" ${flags} _res)
+  if(${_res} EQUAL "-1")
+    set(${var} "${${var}} ${flags}")
+  endif()
+endmacro()
+
+macro(_qi_disable_warnings_msvc)
+  foreach(_number ${ARGN})
+    _qi_add_flags(CMAKE_C_FLAGS "/wd${_number}")
+    _qi_add_flags(CMAKE_CXX_FLAGS "/wd${_number}")
+  endforeach()
+endmacro()

 #! Sanitize compile flags between different compilers
 # (gcc and cl.exe)
@@ -21,7 +36,7 @@
 #       for shared libraries.
 #       Note that in this case, you should use ``qi/macro.hpp``
 #       to export the symbols of your library.
-function(qi_sanitize_compile_flags)
+macro(qi_sanitize_compile_flags)
   cmake_parse_arguments(ARGS "HIDDEN_SYMBOLS" "" "" ${ARGN})
   # cl.exe :
   if(MSVC)
@@ -34,6 +49,8 @@
     # Activate warnings
     # note that wchar.h causes warnings when using /Wall or /W4 ...
     add_definitions("/W3")
+
+    _qi_disable_warnings_msvc(4251 4275)

     if(QI_WERROR)
       add_definitions("/WX")
@@ -65,15 +82,8 @@

   endif()

-endfunction()
+endmacro()

-# CMAKE_C_FLAGS and the like are _strings_, not lists
-function(_qi_add_flags var flags)
-  string(FIND "${${var}}" ${flags} _res)
-  if(${_res} EQUAL "-1")
-    set(${var} "${${var}} ${flags}" PARENT_SCOPE)
-  endif()
-endfunction()

 if (QI_WITH_COVERAGE)
   _qi_add_flags(CMAKE_C_FLAGS "--coverage")


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@789 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- cmake-modules/FindThirdPartyFabien.cmake
+++ cmake-modules/FindThirdPartyFabien.cmake
@@ -3,7 +3,7 @@
 # Adds library to target
 # Adds include path
 # ---------------------------------
-FIND_PATH(PATH_FABIEN_LIB include/Trial.h PATHS $ENV{OpenViBE_dependencies} /local/yrenard/Open-ViBE/repository/libBCI)
+FIND_PATH(PATH_FABIEN_LIB include/Trial.h PATHS $ENV{OpenViBE_dependencies} /local/yrenard/Open-ViBE/repository/libBCI_restricted /local/yrenard/Open-ViBE/repository/libBCI)
 IF(PATH_FABIEN_LIB)
 	MESSAGE(STATUS "  Found FABIEN_LIB...")
 	INCLUDE_DIRECTORIES(${PATH_FABIEN_LIB}/include)


Squashed '3rdparty/github/cmake-utils/' changes from 7780542dd..83bf5969c

83bf5969c cmake/MyPackageCheckCommonFeatures.cmake: Test function attributes only if compiler support the -Werror compilation flag

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 83bf5969c00e494151d0c7551fe13c671b0e67e5

--- cmake/MyPackageCheckCommonFeatures.cmake
+++ cmake/MyPackageCheckCommonFeatures.cmake
@@ -34,8 +34,18 @@
   FINDCOPYSIGNL()
   FIND__GNUC__()
   IF (C___GNUC__)
-    FOREACH (_attribute alias aligned alloc_size always_inline artificial cold const constructor_priority constructor deprecated destructor dllexport dllimport error externally_visible fallthrough flatten format gnu_format format_arg gnu_inline hot ifunc leaf malloc noclone noinline nonnull noreturn nothrow optimize pure sentinel sentinel_position returns_nonnull unused used visibility warning warn_unused_result weak weakref)
-      FINDGCCFUNCATTRIBUTE(${_attribute})
-    ENDFOREACH ()
+    #
+    # Usually GCC compilers just give a warning, we want to turn the warnings to errors
+    #
+    INCLUDE(CheckCCompilerFlag)
+    CHECK_C_COMPILER_FLAG(-Werror C_COMPILER_HAS_WERROR_OPTION)
+    IF (C_COMPILER_HAS_WERROR_OPTION)
+      SET (_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+      SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+      FOREACH (_attribute alias aligned alloc_size always_inline artificial cold const constructor_priority constructor deprecated destructor dllexport dllimport error externally_visible fallthrough flatten format gnu_format format_arg gnu_inline hot ifunc leaf malloc noclone noinline nonnull noreturn nothrow optimize pure sentinel sentinel_position returns_nonnull unused used visibility warning warn_unused_result weak weakref)
+        FINDGCCFUNCATTRIBUTE(${_attribute})
+      ENDFOREACH ()
+      SET (CMAKE_C_FLAGS ${_CMAKE_C_FLAGS})
     ENDIF ()
+  ENDIF ()
 ENDMACRO()


Link with hc_am lib for device memory allocation

--- cmake/modules/VisionarayHCCSupport.cmake
+++ cmake/modules/VisionarayHCCSupport.cmake
@@ -39,7 +39,7 @@
             OUTPUT_VARIABLE ldflags
             )

-        set(__VSNRAY_HCC_LINK_FLAGS "${ldflags} -lm")
+        set(__VSNRAY_HCC_LINK_FLAGS "${ldflags} -lhc_am -lm")
     endif()

 endif()


cmake/toolchain: Change to use riscv64 toolchain

Use the riscv64 built toolchain as it can build for both riscv32 and
riscv64 targets.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/toolchain/zephyr/0.10/target.cmake
+++ cmake/toolchain/zephyr/0.10/target.cmake
@@ -9,7 +9,7 @@

 set(CROSS_COMPILE_TARGET_arm         arm-zephyr-eabi)
 set(CROSS_COMPILE_TARGET_nios2     nios2-zephyr-elf)
-set(CROSS_COMPILE_TARGET_riscv   riscv32-zephyr-elf)
+set(CROSS_COMPILE_TARGET_riscv   riscv64-zephyr-elf)
 set(CROSS_COMPILE_TARGET_mips     mipsel-zephyr-elf)
 set(CROSS_COMPILE_TARGET_xtensa   xtensa-zephyr-elf)
 set(CROSS_COMPILE_TARGET_arc         arc-zephyr-elf)


Fix gcc link error on Solaris. (#33)

Fix gcc link error on Solaris. (#33)

--- cmake/toolchains/sunos/gcc-default.cmake
+++ cmake/toolchains/sunos/gcc-default.cmake
@@ -15,6 +15,7 @@
       )
 set(CMAKE_C_FLAGS   ${DEFAULT_C_FLAGS}   CACHE STRING "Default" FORCE)

+set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z -Wl,relax=comdat" CACHE INTERNAL "" FORCE)

 set(CMAKE_CXX_FLAGS_RELEASE         "-O2"
     CACHE STRING "Release"        FORCE)


Make configure_file COPYONLY (issue #160)

--- conan.cmake
+++ conan.cmake
@@ -409,7 +409,7 @@
   if(ARGUMENTS_CONANFILE)
     get_filename_component(_CONANFILE_NAME ${ARGUMENTS_CONANFILE} NAME)
     # configure_file will make sure cmake re-runs when conanfile is updated
-    configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
+    configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk COPYONLY)
     file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
   else()
     conan_cmake_generate_conanfile(${ARGV})


ENH: ITKv4 registration patches incorporated.

Include many patches that were in gerrit staging waiting
for ITKv4.2 tag to be finalized.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -73,7 +73,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git CACHE STRING "" FORCE)
-  set(${proj}_GIT_TAG 097e9e6a55f7843343c94bc080681a5c1f888b7d CACHE STRING "" FORCE) #2012-06-27
+  set(${proj}_GIT_TAG f2ec79de1ae03478aaa9a33e1f220b20f746646b CACHE STRING "" FORCE) #2012-07-06
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Revert weird cmake

Revert weird cmake

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

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

 string(REPLACE "." ";" USER_PYTHON_VERSION_LIST ${USER_PYTHON_VERSION})
 list(GET USER_PYTHON_VERSION_LIST 0 USER_PYTHON_VERSION_MAJOR)
@@ -65,17 +65,15 @@
 SET(python_WIN32_64BIT_DIR)
 SET(python_FRAMEWORK_ARCHIVE)

-ExternalProject_Get_Property(Python_external SOURCE_DIR)
-ExternalProject_Get_Property(Python_external INSTALL_DIR)
-
 IF(UNIX)
   # TODO: figure out pip package
   SET(python_CONFIGURE_FLAGS
-    "--prefix=${INSTALL_DIR}"
+    "--prefix=<INSTALL_DIR>"
+    "--with-ensurepip=yes"
   )
   IF(APPLE)
     # framework contains *.dylib
-    LIST(APPEND python_CONFIGURE_FLAGS "--enable-framework=${INSTALL_DIR}")
+    LIST(APPEND python_CONFIGURE_FLAGS "--enable-framework=<INSTALL_DIR>")
     SET(python_FRAMEWORK_ARCHIVE "framework.tar")
   ELSE()
     LIST(APPEND python_CONFIGURE_FLAGS "--enable-shared")
@@ -89,7 +87,6 @@
   SET(python_ABIFLAG_PYDEBUG "_d")
 ENDIF()

-message("python_CONFIGURE_FLAGS" "${python_CONFIGURE_FLAGS}")
 # If CMake ever allows overriding the checkout command or adding flags,
 # git checkout -q will silence message about detached head (harmless).
 IF(UNIX)
@@ -97,7 +94,7 @@
     GIT_REPOSITORY ${python_GIT_URL}
     GIT_TAG ${python_GIT_TAG}
     BUILD_IN_SOURCE ON
-    CONFIGURE_COMMAND ${SOURCE_DIR}/configure ${python_CONFIGURE_FLAGS}
+    CONFIGURE_COMMAND ./configure ${python_CONFIGURE_FLAGS}
     PATCH_COMMAND ""
   )
   IF(APPLE)
@@ -105,7 +102,7 @@
     ExternalProject_Add_Step(Python_external framework_tar_archive
       COMMAND "${CMAKE_COMMAND}" -E tar cf ${python_FRAMEWORK_ARCHIVE} Python.framework
 	DEPENDEES install
-	WORKING_DIRECTORY ${INSTALL_DIR}
+	WORKING_DIRECTORY <INSTALL_DIR>
     )
   ENDIF()
 ELSE()
@@ -117,17 +114,20 @@
     BUILD_IN_SOURCE ON
     BUILD_COMMAND ${CMAKE_BUILD_TOOL} PCbuild/pcbuild.sln /nologo /property:Configuration=Release /property:Platform=${python_WIN32_ARCH}
     INSTALL_COMMAND "${CMAKE_COMMAND}" -E copy_if_different
-      ${SOURCE_DIR}/PC/pyconfig.h
-      ${SOURCE_DIR}/Include/pyconfig.h
+      <SOURCE_DIR>/PC/pyconfig.h
+      <SOURCE_DIR>/Include/pyconfig.h
   )
   # build both Release and Debug versions
   ExternalProject_Add_Step(Python_external debug_build
     COMMAND ${CMAKE_BUILD_TOOL} PCbuild/pcbuild.sln /nologo /property:Configuration=Debug /property:Platform=${python_WIN32_ARCH}
       DEPENDEES build
       DEPENDERS install
-      WORKING_DIRECTORY ${SOURCE_DIR}
+      WORKING_DIRECTORY <SOURCE_DIR>
   )
 ENDIF()
+
+ExternalProject_Get_Property(Python_external SOURCE_DIR)
+ExternalProject_Get_Property(Python_external INSTALL_DIR)

 SET(SCI_PYTHON_MODULE_PARENT_PATH lib)


Workaround for Coverity scan which failed to compile code with PCH.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -664,14 +664,20 @@
                     COMMENT "Precompiling header file '${HEADER_FILENAME}' for ${CONFIG} configuration")
             endforeach ()
             # Use the precompiled header file
-            if (NOT XCODE)
-                set (PCH_DIR ${CMAKE_CURRENT_BINARY_DIR}/)
+            if ($ENV{COVERITY_SCAN_BRANCH})
+                # Coverity scan does not support PCH so workaround by including the actual header file
+                set (ABS_PATH_PCH ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_PATHNAME})
+            else ()
+                if (NOT XCODE)
+                    set (PCH_DIR ${CMAKE_CURRENT_BINARY_DIR}/)
+                endif ()
+                set (ABS_PATH_PCH ${PCH_DIR}${HEADER_FILENAME})
             endif ()
             foreach (FILE ${SOURCE_FILES})
                 if (FILE MATCHES \\.cpp$)
                     get_property (NO_PCH SOURCE ${FILE} PROPERTY NO_PCH)
                     if (NOT NO_PCH)
-                        set_property (SOURCE ${FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${PCH_DIR}${HEADER_FILENAME}")
+                        set_property (SOURCE ${FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${ABS_PATH_PCH}")
                     endif ()
                 endif ()
             endforeach ()


Update dashboard template script to use driver hosted on commontk.org

See http://public.kitware.com/pipermail/ctk-developers/2010-November/000406.html

--- CMake/ctkDashboardScript.TEMPLATE.cmake
+++ CMake/ctkDashboardScript.TEMPLATE.cmake
@@ -113,7 +113,7 @@
 #
 # Download and include dashboard driver script
 #
-set(url http://github.com/commontk/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake)
+set(url http://commontk.org/ctkDashboardDriverScript.cmake)
 set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
 downloadFile(${url} ${dest})
 INCLUDE(${dest})


ENH: ENH: MIDAS+CTest: allow the MIDAS arguments to be part of an arg rather than the entire arg

SVN-Revision: 3262

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -69,8 +69,9 @@

   # Substitute the downloaded file argument(s)
   foreach(arg ${ARGN})
-    if(arg MATCHES "^MIDAS{[^}]*}$")
-      string(REGEX REPLACE "^MIDAS{([^}]*)}$" "\\1" keyFile "${arg}")
+    if(arg MATCHES "MIDAS{[^}]*}")
+      string(REGEX MATCH "MIDAS{([^}]*)}" toReplace "${arg}")
+      string(REGEX REPLACE "MIDAS{([^}]*)}" "\\1" keyFile "${toReplace}")
       # Split up the checksum extension from the real filename
       string(REGEX MATCH "\\.[^\\.]*$" hash_alg "${keyFile}")
       string(REGEX REPLACE "\\.[^\\.]*$" "" base_file "${keyFile}")
@@ -125,10 +126,11 @@
 ")

       list(APPEND downloadScripts "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/download_${checksum}.cmake")
-      list(APPEND testArgs "${MIDAS_DATA_DIR}/${base_file}")
-    else(arg MATCHES "^MIDAS{[^}]*}$")
+      string(REGEX REPLACE toReplace "${MIDAS_DATA_DIR}/${base_file}" newArg "${arg}")
+      list(APPEND testArgs ${newArg})
+    else(arg MATCHES "MIDAS{[^}]*}")
       list(APPEND testArgs ${arg})
-    endif(arg MATCHES "^MIDAS{[^}]*}$")
+    endif(arg MATCHES "MIDAS{[^}]*}")
   endforeach(arg)

   file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake"
@@ -142,4 +144,4 @@
   # Finally, create the test
   add_test(${testName} ${testArgs})
   set_tests_properties(${testName} PROPERTIES DEPENDS ${testName}_fetchData)
-endfunction(midas_add_test)
+endfunction(midas_add_test)


Don't apply visibility settings to statically built samples.  Fixes linking problems with Xcode 4 and iOS.

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -293,14 +293,17 @@
       endif()
     endif(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
   endif (APPLE)
-  if (CMAKE_COMPILER_IS_GNUCXX)
-    # add GCC visibility flags to shared library build
-    set_target_properties(${SAMPLENAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
-    set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN}")
-    set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN}")
-    # disable "lib" prefix on Unix
-    set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
-  endif (CMAKE_COMPILER_IS_GNUCXX)
+  if (NOT OGRE_STATIC)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      # add GCC visibility flags to shared library build
+      set_target_properties(${SAMPLENAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
+      set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN}")
+      set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN}")
+      # disable "lib" prefix on Unix
+      set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
+    endif (CMAKE_COMPILER_IS_GNUCXX)
+  endif()
+
   if (OGRE_INSTALL_SAMPLES)
 	ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
   endif()


build: check js-config.h and don't check JS_THREADSAFE if that exists

--- CMakeModules/FindSpidermonkey.cmake
+++ CMakeModules/FindSpidermonkey.cmake
@@ -20,6 +20,9 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 #
+
+INCLUDE(CheckCXXSourceRuns)
+INCLUDE(CheckIncludeFileCXX)

 IF(SPIDERMONKEY_INCLUDE_DIR AND SPIDERMONKEY_LIBRARIES)
     SET(Spidermonkey_FIND_QUIETLY TRUE)
@@ -68,17 +71,24 @@
     SET(CMAKE_REQUIRED_INCLUDES ${SPIDERMONKEY_INCLUDE_DIR})
     SET(CMAKE_REQUIRED_DEFINITIONS ${SPIDERMONKEY_DEFINITIONS})
     SET(CMAKE_REQUIRED_LIBRARIES ${SPIDERMONKEY_LIBRARY})
-    CHECK_CXX_SOURCE_RUNS(
-        "extern \"C\" void js_GetCurrentThread();
-         int main() {
-             return ((void*)js_GetCurrentThread) != 0 ? 0 : 1;
-         }"
-        SPIDERMONKEY_THREADSAFE)
+    CHECK_INCLUDE_FILE_CXX("js/js-config.h" SPIDERMONKEY_JS_CONFIG_HEADER)

-    IF(SPIDERMONKEY_THREADSAFE)
-        SET(
-            SPIDERMONKEY_DEFINITIONS
-            ${SPIDERMONKEY_DEFINITIONS} -DJS_THREADSAFE)
+    IF(NOT SPIDERMONKEY_JS_CONFIG_HEADER)
+        SET(CMAKE_REQUIRED_INCLUDES ${SPIDERMONKEY_INCLUDE_DIR})
+        SET(CMAKE_REQUIRED_DEFINITIONS ${SPIDERMONKEY_DEFINITIONS})
+        SET(CMAKE_REQUIRED_LIBRARIES ${SPIDERMONKEY_LIBRARY})
+        CHECK_CXX_SOURCE_RUNS(
+            "extern \"C\" void js_GetCurrentThread();
+             int main() {
+                 return ((void*)js_GetCurrentThread) != 0 ? 0 : 1;
+             }"
+            SPIDERMONKEY_THREADSAFE)
+
+        IF(SPIDERMONKEY_THREADSAFE)
+            SET(
+                SPIDERMONKEY_DEFINITIONS
+                ${SPIDERMONKEY_DEFINITIONS} -DJS_THREADSAFE)
+        ENDIF()
     ENDIF()

     SET(CMAKE_REQUIRED_INCLUDES ${SPIDERMONKEY_INCLUDE_DIR})


Use rfc1034identifier modifier for the bundle name so that Urho3D samples build successfully for iOS out of the box.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -547,7 +547,7 @@
     if (IOS OR URHO3D_MACOSX_BUNDLE)
         # Only set the bundle properties to its default when they are not explicitly specified by user
         if (NOT MACOSX_BUNDLE_GUI_IDENTIFIER)
-            set (MACOSX_BUNDLE_GUI_IDENTIFIER com.github.urho3d.\${PRODUCT_NAME:bundleIdentifier:lower})
+            set (MACOSX_BUNDLE_GUI_IDENTIFIER com.github.urho3d.\${PRODUCT_NAME:rfc1034identifier:lower})
         endif ()
         if (NOT MACOSX_BUNDLE_BUNDLE_NAME)
             set (MACOSX_BUNDLE_BUNDLE_NAME \${PRODUCT_NAME})


Added some more paths to DRAKE_INCLUDE_DIRS as a quick build fix for Drake master.

--- software/ddapp/cmake/modules/FindDrake.cmake
+++ software/ddapp/cmake/modules/FindDrake.cmake
@@ -15,7 +15,9 @@
   )

 set(DRAKE_INCLUDE_DIRS
+  ${DRAKE_SOURCE_DIR}/util
   ${DRAKE_SOURCE_DIR}/systems/plants
+  ${DRAKE_SOURCE_DIR}/systems/plants/joints
   ${DRAKE_SOURCE_DIR}/systems/plants/tinyxml
   )


Include community board in cmake select (#595)

Added the community board in the select case to have the proper I2C version.

Signed-off-by: piwi1263 <994bae4cbd153cbc1b284e543355271e6af76bb5@gmail.com>

--- CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
+++ CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
@@ -70,7 +70,8 @@
                ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR
                ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
                ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF")
+               ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
+               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF")
                 ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
             else()
                 ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2
@@ -106,7 +107,8 @@
    ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR
    ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
    ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF")
+   ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
+   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF")
     list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
 else()
     list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2)


Created a source tarball (for distribution), leveraging Brian's package_source
target.

Request review from Brian and/or Dena -- is there a cleaner way?

git-svn-id: dcef21d3ff4cbd8dced82702dcaad637bf246ecc@1191 aa0779c3-6ec2-4b84-a212-a405c134cd8d


MANAGE_RELEASE_ADD_KOJI_TARGETS

--- Modules/ManageReleaseOnFedora.cmake
+++ Modules/ManageReleaseOnFedora.cmake
@@ -104,7 +104,13 @@

     FIND_PROGRAM(FEDPKG_CMD fedpkg)
     IF(FEDPKG_CMD STREQUAL "FEDPKG_CMD-NOTFOUND")
-	M_MSG(${M_OFF} "Program fedpkg is not found! fedpkg support disabled.")
+	M_MSG(${M_OFF} "Program fedpkg is not found! Fedora support disabled.")
+	SET(_manage_release_on_fedora_dependencies_missing 1)
+    ENDIF(FEDPKG_CMD STREQUAL "FEDPKG_CMD-NOTFOUND")
+
+    FIND_PROGRAM(GIT_CMD git)
+    IF(FEDPKG_CMD STREQUAL "FEDPKG_CMD-NOTFOUND")
+	M_MSG(${M_OFF} "Program git is not found! Fedora support disabled.")
 	SET(_manage_release_on_fedora_dependencies_missing 1)
     ENDIF(FEDPKG_CMD STREQUAL "FEDPKG_CMD-NOTFOUND")

@@ -145,7 +151,39 @@
 	SET(FEDORA_AUTO_KARMA "True" CACHE STRING "Fedora auto Karma")
     ENDIF(_manage_release_on_fedora_dependencies_missing  EQUAL 0)

-    FUNCTION(MANAGE_RELEASE_CREATE_FEDPKG_TARGETS prefix ver)
+    FUNCTION(MANAGE_RELEASE_ADD_KOJI_TARGETS prefix ver)
+	IF(_manage_release_on_fedora_dependencies_missing 0)
+	    FIND_PROGRAM(KOJI_CMD koji)
+	    IF(KOJI_CMD STREQUAL "KOJI_CMD-NOTFOUND")
+		M_MSG(${M_OFF} "Program koji is not found! Koji support disabled.")
+	    ELSE(KOJI_CMD STREQUAL "KOJI_CMD-NOTFOUND")
+
+		IF("${prefix}" STREQUAL "f")
+		    SET(_koji_target "f${ver}${FEDORA_KOJI_TAG_POSTFIX}")
+		ELSE("${prefix}" STREQUAL "f")
+		    SET(_koji_target "el${ver}${EPEL_KOJI_TAG_POSTFIX}")
+		ENDIF("${prefix}" STREQUAL "f")
+
+		SET(_koji_tag_path_abs_prefix
+		    "${CMAKE_FEDORA_TMP_DIR}")
+
+		SET(_koji_tag_name_prefix "${PRJ_VER}-${PRJ_RELEASE_NO}.${_koji_target}")
+
+		SET(_koji_tag_build_scratch_file
+		    "${_koji_tag_path_abs_prefix}/${_koji_tag_name_prefix}.build_scratch")
+
+		ADD_CUSTOM_TARGET_COMMAND(koji_${_branch}_build_scratch
+		    OUTPUT "${_koji_tag_build_scratch_file}"
+		    COMMAND ${KOJI_CMD} build "--scratch" "${_koji_target}" "${PRJ_SRPM}"
+		    DEPENDS "${PRJ_SRPM}"
+		    COMMENT "koji scratch build on ${_koji_target}"
+		    VERBATIM
+		    )
+	    ENDIF(KOJI_CMD STREQUAL "KOJI_CMD-NOTFOUND")
+	ENDIF(_manage_release_on_fedora_dependencies_missing 0)
+    ENDFUNCTION(MANAGE_RELEASE_ADD_KOJI_TARGETS prefix ver)
+
+    FUNCTION(MANAGE_RELEASE_ADD_FEDPKG_TARGETS prefix ver)
 	IF(_manage_release_on_fedora_dependencies_missing 0)
 	    SET(_tag "${prefix}${ver}")
 	    SET(_branch ${_tag})
@@ -156,7 +194,7 @@
 	    IF("${prefix}" STREQUAL "f")
 		SET(_bodhi_tag "fc${ver}")
 	    ELSE("${prefix}" STREQUAL "f")
-		SET(_bodhi_tag "el${ver}"
+		SET(_bodhi_tag "el${ver}")
 	    ENDIF("${prefix}" STREQUAL "f")

 	    SET(_fedpkg_tag_path_abs_prefix
@@ -186,13 +224,14 @@
 	    ADD_CUSTOM_TARGET_COMMAND(fedpkg_${_branch}_commit
 		OUTPUT "${_fedpkg_tag_commit_file}"
 		COMMAND ${FEDPKG_CMD} switch-branch ${_branch}
-		COMMAND git pull --tag
-		COMMAND ${FEDPKG_CMD} import ${PRJ_SRPM}
+		COMMAND ${GIT_CMD} pull --tag
+		COMMAND ${FEDPKG_CMD} import "${PRJ_SRPM}"
 		COMMAND ${FEDPKG_CMD} commit ${_commit_opt}
-		COMMAND git push --tags
-		DEPENDS ${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE} ${PRJ_SRPM}
+		COMMAND ${GIT_CMD} push --tags
+		DEPENDS ${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE} "${PRJ_SRPM}"
 		WORKING_DIRECTORY ${FEDPKG_DIR}
 		COMMENT "fedpkg commit on ${_branch} with ${PRJ_SRPM}"
+		VERBATIM
 		)

 	    ## Fedpkg build
@@ -203,11 +242,12 @@
 		OUTPUT "${_fedpkg_tag_build_file}"
 		COMMAND ${FEDPKG_CMD} switch-branch ${_branch}
 		COMMAND ${FEDPKG_CMD} build
-		COMMAND git tag -a -m "${_fedpkg_tag_name_prefix} built"
-		COMMAND git push --tags
+		COMMAND ${GIT_CMD} tag -a -m "${_fedpkg_tag_name_prefix} built"
+		COMMAND ${GIT_CMD} push --tags
 		DEPENDS ${_fedpkg_tag_commit_file}
 		WORKING_DIRECTORY ${FEDPKG_DIR}
-		COMMENT "fedpkg build on ${_branch} with ${PRJ_SRPM}"
+		COMMENT "fedpkg build on ${_branch}"
+		VERBATIM
 		)

 	    ## Fedpkg build
@@ -218,15 +258,16 @@
 		OUTPUT "${_fedpkg_tag_update_file}"
 		COMMAND ${FEDPKG_CMD} switch-branch ${_branch}
 		COMMAND ${FEDPKG_CMD} build
-		COMMAND git tag -a -m "${_fedpkg_tag_name_prefix} updated"
-		COMMAND git push --tags
+		COMMAND ${GIT_CMD} tag -a -m "${_fedpkg_tag_name_prefix} updated"
+		COMMAND ${GIT_CMD} push --tags
 		DEPENDS ${_fedpkg_tag_build_file}
 		WORKING_DIRECTORY ${FEDPKG_DIR}
-		COMMENT "fedpkg build on ${_branch} with ${PRJ_SRPM}"
+		COMMENT "fedpkg build on ${_branch}"
+		VERBATIM
 		)

 	ENDIF(_manage_release_on_fedora_dependencies_missing 0)
-    ENDFUNCTION(MANAGE_RELEASE_CREATE_TARGETS tag)
+    ENDFUNCTION(MANAGE_RELEASE_ADD_TARGETS tag)

     FUNCTION(MANAGE_RELEASE_ON_FEDORA)
 	IF(_manage_release_on_fedora_dependencies_missing 0)
@@ -242,7 +283,8 @@

 	    ## Create targets
 	    FOREACH(_ver ${_build_list})
-		MANAGE_RELEASE_CREATE_FEDPKG_TARGETS("f${_ver}")
+		MANAGE_RELEASE_ADD_FEDPKG_TARGETS("f${_ver}")
+		MANAGE_RELEASE_ADD_KOJI_TARGETS("f${_ver}")
 	    ENDFOREACH(_ver ${_build_list})
 	ENDIF(_manage_release_on_fedora_dependencies_missing 0)
     ENDFUNCTION(MANAGE_RELEASE_ON_FEDORA)
@@ -410,7 +452,7 @@
 		    COMMAND ${FEDPKG_CMD} pull
 		    COMMAND ${FEDPKG_CMD} import ${_import_opt} ${srpm}
 		    COMMAND ${FEDPKG_CMD} commit ${_commit_opt}
-		    COMMAND git push --tags
+		    COMMAND ${GIT_CMD} push --tags
 		    DEPENDS ${FEDPKG_WORKDIR} ${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE} ${srpm}
 		    WORKING_DIRECTORY ${FEDPKG_WORKDIR}
 		    COMMENT "fedpkg commit on ${_branch} with ${srpm}"
@@ -429,9 +471,9 @@
 		    ${_fedpkg_tag_path_abs_prefix}/${_fedpkg_tag_name_built}
 		    COMMAND ${FEDPKG_CMD} switch-branch ${_branch}
 		    COMMAND ${FEDPKG_CMD} build
-		    COMMAND git tag -a -m "${_fedpkg_tag_name_prefix} built"
+		    COMMAND ${GIT_CMD} tag -a -m "${_fedpkg_tag_name_prefix} built"
 		    ${_fedpkg_tag_name_built}
-		    COMMAND git push --tags
+		    COMMAND ${GIT_CMD} push --tags
 		    WORKING_DIRECTORY ${FEDPKG_WORKDIR}
 		    COMMENT "fedpkg build on ${_branch}"
 		    VERBATIM


Reactivated ToFImageRecorderFilterTest

Reactivated ToFImageRecorderFilterTest

--- Modules/ToFHardware/Testing/files.cmake
+++ Modules/ToFHardware/Testing/files.cmake
@@ -20,7 +20,7 @@
   mitkToFImageCsvWriterTest.cpp
   mitkToFImageGrabberTest.cpp
   mitkToFImageRecorderTest.cpp
-  #mitkToFImageRecorderFilterTest.cpp
+  mitkToFImageRecorderFilterTest.cpp
   mitkToFImageWriterTest.cpp
   #mitkToFNrrdImageWriterTest.cpp
   mitkToFOpenCVImageGrabberTest.cpp


Intermediate files generated by Android toolchain are moved into CMakeFiles subfolder

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -4,7 +4,7 @@
 #  See home page: http://code.google.com/p/android-cmake/
 #
 #  The file is mantained by the OpenCV project. And also can be found at
-#  http://code.opencv.org/svn/opencv/trunk/opencv/android/android.toolchain.cmake
+#  http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
 #
 #  Usage Linux:
 #   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@@ -182,6 +182,7 @@
 #     [+] added mips architecture support
 #   - modified August 2012
 #     [+] updated for NDK r8b
+#     [~] all intermediate files generated by toolchain are moved into CMakeFiles
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -854,45 +855,48 @@
 endif()

 #linker flags
-list( APPEND ANDROID_SYSTEM_LIB_DIRS "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}" "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" )
+if( NOT DEFINED __ndklibspath )
+ set( __ndklibspath "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/ndklibs/${ANDROID_NDK_ABI_NAME}" )
+endif()
+list( APPEND ANDROID_SYSTEM_LIB_DIRS "${__ndklibspath}" "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" )
 set( ANDROID_LINKER_FLAGS "" )
 #STL
 if( ANDROID_USE_STLPORT )
  if( EXISTS "${__stlLibPath}/libstlport_static.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/libstlport_static.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstlport_static.a" )
- endif()
- if( EXISTS "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstlport_static.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/libstlport_static.a" "${__ndklibspath}/libstlport_static.a" )
+ endif()
+ if( EXISTS "${__ndklibspath}/libstlport_static.a" )
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--start-group -lstlport_static" )
  endif()
 else( ANDROID_USE_STLPORT )
  if( EXISTS "${__stlLibPath}/libgnustl_static.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/libgnustl_static.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/libgnustl_static.a" "${__ndklibspath}/libstdc++.a" )
  elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" "${__ndklibspath}/libstdc++.a" )
  elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" "${__ndklibspath}/libstdc++.a" )
  elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${__stlLibPath}/thumb/libstdc++.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/thumb/libstdc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/thumb/libstdc++.a" "${__ndklibspath}/libstdc++.a" )
  elseif( EXISTS "${__stlLibPath}/libstdc++.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/libstdc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
- endif()
- if( EXISTS "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/libstdc++.a" "${__ndklibspath}/libstdc++.a" )
+ endif()
+ if( EXISTS "${__ndklibspath}/libstdc++.a" )
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -lstdc++" )
  endif()

  #gcc exception & rtti support
  if( EXISTS "${__stlLibPath}/libsupc++.a" )
-  __COPY_IF_DIFFERENT( "${__stlLibPath}/libsupc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
+  __COPY_IF_DIFFERENT( "${__stlLibPath}/libsupc++.a" "${__ndklibspath}/libsupc++.a" )
  elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" )
-  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
+  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" "${__ndklibspath}/libsupc++.a" )
  elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" )
-  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
+  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" "${__ndklibspath}/libsupc++.a" )
  elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" )
-  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
+  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" "${__ndklibspath}/libsupc++.a" )
  elseif( EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" )
-  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
- endif()
- if( EXISTS "${CMAKE_BINARY_DIR}/systemlibs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
+  __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" "${__ndklibspath}/libsupc++.a" )
+ endif()
+ if( EXISTS "${__ndklibspath}/libsupc++.a" )
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -lsupc++" )
  endif()
 endif( ANDROID_USE_STLPORT )
@@ -1038,13 +1042,14 @@
 # export toolchain settings for the try_compile() command
 if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" )
  set( __toolchain_config "")
- foreach( __var ANDROID_ABI ANDROID_FORCE_ARM_BUILD ANDROID_NATIVE_API_LEVEL ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_SET_OBSOLETE_VARIABLES LIBRARY_OUTPUT_PATH_ROOT ANDROID_USE_STLPORT ANDROID_FORBID_SYGWIN ANDROID_NDK ANDROID_STANDALONE_TOOLCHAIN ANDROID_FUNCTION_LEVEL_LINKING )
+ foreach( __var ANDROID_ABI ANDROID_FORCE_ARM_BUILD ANDROID_NATIVE_API_LEVEL ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_SET_OBSOLETE_VARIABLES LIBRARY_OUTPUT_PATH_ROOT ANDROID_USE_STLPORT ANDROID_FORBID_SYGWIN ANDROID_NDK ANDROID_STANDALONE_TOOLCHAIN ANDROID_FUNCTION_LEVEL_LINKING __ndklibspath )
   if( DEFINED ${__var} )
    set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" )\n" )
   endif()
  endforeach()
- file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/android.toolchain.config.cmake" "${__toolchain_config}" )
+ file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android.toolchain.config.cmake" "${__toolchain_config}" )
  unset( __toolchain_config )
+ unset( __ndklibspath )
 endif()

@@ -1073,6 +1078,7 @@
 # Can be set only at the first run:
 #   ANDROID_NDK
 #   ANDROID_STANDALONE_TOOLCHAIN
+#   ANDROID_TOOLCHAIN_NAME : "arm-linux-androideabi-4.4.3" or "arm-linux-androideabi-4.6" or "mipsel-linux-android-4.4.3" or "mipsel-linux-android-4.6" or "x86-4.4.3" or "x86-4.6"
 # Obsolete:
 #   ANDROID_API_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL
 #   ARM_TARGET : superseded by ANDROID_ABI
@@ -1105,7 +1111,6 @@
 #   ANDROID_COMPILER_VERSION : GCC version used
 #   ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform
 #   ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI
-#   ANDROID_TOOLCHAIN_NAME : "standalone", "arm-linux-androideabi-4.4.3" or "x86-4.4.3" or something similar.
 #   ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux"
 #   ANDROID_TOOLCHAIN_ROOT : path to the top level of toolchain (standalone or placed inside NDK)
 #   ANDROID_SUPPORTED_NATIVE_API_LEVELS : list of native API levels found inside NDK


Updating hunter for external repo

Updating hunter for external repo

--- scripts/AddHunter.cmake
+++ scripts/AddHunter.cmake
@@ -11,8 +11,8 @@
     if(ih_SHA1)
       message(FATAL_ERROR "URL AND SHA1 should be given together")
     endif()
-    set(ih_URL "https://github.com/ruslo/hunter/archive/v0.12.33.tar.gz")
-    set(ih_SHA1 "f64eda11326e12d84b6aa7f4aed80c09c182aa64")
+    set(ih_URL "https://github.com/mdavezac/hunter/archive/extrepo-v1.0.tar.gz")
+    set(ih_SHA1 "b2a37094bf181782c907335b89639b446226ff81")
   elseif(NOT ih_SHA1)
     message(FATAL_ERROR "URL AND SHA1 should be given together")
   endif()
@@ -25,7 +25,13 @@
   endif()
   HunterGate(URL ${ih_URL} SHA1 ${ih_SHA1})
   if(NOT ih_NO_COOKOFF_RECIPES)
-    list(APPEND HUNTER_RECIPE_DIRS ${GREAT_CMAKE_COOKOFF_HUNTER_RECIPES_DIR})
+    set(HUNTER_REPOSITORY_cookoff_DIRECTORY ${GREAT_CMAKE_COOKOFF_HUNTER_RECIPES_DIR})
+    set(HUNTER_REPOSITORY_cookoff_URL "local")
+    set(HUNTER_REPOSITORY_cookoff_SHA1 "none")
+    set(HUNTER_REPOSITORY_cookoff_NAME cookoff)
+    set(HUNTER_REPOSITORY_cookoff_VERSION "none")
+    list(APPEND HUNTER_REPOSITORIES cookoff)
+    list(APPEND HUNTER_RECIPE_DIRS "${HUNTER_REPOSITORY_cookoff_DIRECTORY}")
   endif()
 endmacro()


test avec add_dependencies

test avec add_dependencies

--- test/claw_reference_test.cmake
+++ test/claw_reference_test.cmake
@@ -361,7 +361,10 @@
     WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
     DEPENDS ${ORIGINAL_FILE}
     COMMENT "${CLAWFC} for CPU target on file ${ORIGINAL_FILE}"
-
+  )
+
+  # Execute the CLAW Compiler for GPU target with ACC directive
+  add_custom_command(
     OUTPUT  ${OUTPUT_FILE_ACC}
     COMMAND touch ${ORIGINAL_FILE} # to force new compilation
     COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -371,7 +374,10 @@
     WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
     DEPENDS ${ORIGINAL_FILE}
     COMMENT "${CLAWFC} for GPU target with ACC directive on file ${ORIGINAL_FILE}"
-
+  )
+
+  # Execute the CLAW Compiler for GPU target with OMP directive
+  add_custom_command(
     OUTPUT  ${OUTPUT_FILE_OMP}
     COMMAND touch ${ORIGINAL_FILE} # to force new compilation
     COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -396,7 +402,10 @@
       WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
       DEPENDS ${ORIGINAL_FILE_EXTRA} ${OUTPUT_FILE_CPU}
       COMMENT "${CLAWFC} for CPU target on file ${ORIGINAL_FILE_EXTRA}"
-
+    )
+
+    # Execute the CLAW Compiler for GPU target with ACC directive
+    add_custom_command(
       OUTPUT  ${OUTPUT_FILE_EXTRA_ACC}
       COMMAND touch ${ORIGINAL_FILE_EXTRA} # to force new compilation
       COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -407,7 +416,10 @@
       WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
       DEPENDS ${ORIGINAL_FILE_EXTRA} ${OUTPUT_FILE_ACC}
       COMMENT "${CLAWFC} for GPU target with ACC directive on file ${ORIGINAL_FILE_EXTRA}"
-
+    )
+
+    # Execute the CLAW Compiler for GPU target with OMP directive
+    add_custom_command(
       OUTPUT  ${OUTPUT_FILE_EXTRA_OMP}
       COMMAND touch ${ORIGINAL_FILE_EXTRA} # to force new compilation
       COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -431,7 +443,10 @@
       WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
       DEPENDS ${MAIN_F90} ${OUTPUT_FILE_CPU} ${OUTPUT_FILE_EXTRA_CPU}
       COMMENT "${CLAWFC} for CPU target on file ${MAIN_F90}"
-
+    )
+
+    # Execute the CLAW Compiler for GPU target with ACC directive
+    add_custom_command(
       OUTPUT  ${OUTPUT_MAIN_ACC}
       COMMAND touch ${MAIN_F90} # to force new compilation
       COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -441,7 +456,10 @@
       WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
       DEPENDS ${MAIN_F90} ${OUTPUT_FILE_ACC} ${OUTPUT_FILE_EXTRA_ACC}
       COMMENT "${CLAWFC} for GPU target with ACC directive on file ${MAIN_F90}"
-
+    )
+
+    # Execute the CLAW Compiler for GPU target with OMP directive
+    add_custom_command(
       OUTPUT  ${OUTPUT_MAIN_OMP}
       COMMAND touch ${MAIN_F90} # to force new compilation
       COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -465,7 +483,10 @@
       WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
       DEPENDS ${MAIN_F90} ${OUTPUT_FILE_CPU}
       COMMENT "${CLAWFC} for CPU target on file ${MAIN_F90}"
-
+    )
+
+    # Execute the CLAW Compiler for GPU target with ACC directive
+    add_custom_command(
       OUTPUT  ${OUTPUT_MAIN_ACC}
       #COMMAND touch ${MAIN_F90} # to force new compilation
       COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -475,7 +496,10 @@
       WORKING_DIRECTORY ${claw_add_advanced_test_WORKING_DIRECTORY}
       DEPENDS ${MAIN_F90} ${OUTPUT_FILE_ACC}
       COMMENT "${CLAWFC} for GPU target with ACC directive on file ${MAIN_F90}"
-
+    )
+
+    # Execute the CLAW Compiler for GPU target with OMP directive
+    add_custom_command(
       OUTPUT  ${OUTPUT_MAIN_OMP}
       #COMMAND touch ${MAIN_F90} # to force new compilation
       COMMAND ${CMAKE_COMMAND} -E env CLAW_TRANS_SET_PATH=${CLAW_TRANS_SET_PATH}
@@ -549,7 +573,8 @@
   add_dependencies(${EXECUTABLE_TRANSFORMED_ACC} ${EXECUTABLE_ORIGINAL})
   add_dependencies(${EXECUTABLE_TRANSFORMED_OMP} ${EXECUTABLE_ORIGINAL})
   add_dependencies(${EXECUTABLE_TRANSFORMED_CPU} ${EXECUTABLE_ORIGINAL})
-  add_dependencies(${EXECUTABLE_TRANSFORMED_CPU} ${EXECUTABLE_TRANSFORMED_ACC} ${EXECUTABLE_TRANSFORMED_OMP})
+  add_dependencies(${EXECUTABLE_TRANSFORMED_CPU} ${EXECUTABLE_TRANSFORMED_ACC})
+  add_dependencies(${EXECUTABLE_TRANSFORMED_ACC} ${EXECUTABLE_TRANSFORMED_OMP})

   # Set target specific compilation options
   if(OPENACC_ENABLE)


BUG: list sub-command REMOVE_DUPLICATES requires list to be present

When compiling without c++ enabled, some variables are not present.
This is a check enforced in recent Cmake versions.

CMake Error at CMakeModules/AddZstdCompilationFlags.cmake:54 (list):
  list sub-command REMOVE_DUPLICATES requires list to be present.
Call Stack (most recent call first):
  CMakeLists.txt:53 (ADD_ZSTD_COMPILATION_FLAGS)

--- build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
+++ build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
@@ -50,9 +50,11 @@
              CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
              CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
              CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
-        separate_arguments(${flag_var})
-        list(REMOVE_DUPLICATES ${flag_var})
-        string(REPLACE ";" " " ${flag_var} "${${flag_var}}")
+        if( ${flag_var} )
+            separate_arguments(${flag_var})
+            list(REMOVE_DUPLICATES ${flag_var})
+            string(REPLACE ";" " " ${flag_var} "${${flag_var}}")
+        endif()
     endforeach ()

     if (MSVC AND ZSTD_USE_STATIC_RUNTIME)
@@ -60,7 +62,9 @@
                  CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
                  CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
                  CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
-            string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+            if ( ${flag_var} )
+                string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+            endif()
         endforeach ()
     endif ()


now using target property type to set proper link flags. fixed behaviour for default library type using build_shared_libs. first skeleton for new macros

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -159,7 +159,7 @@
 # You need include and src in your hierarchy at least for this to work correctly
 #

-#WkBuild( target_name EXECUTABLE | LIBRARY [ STATIC|SHARED|MODULE ]  )
+#WkBuild( EXECUTABLE | LIBRARY [ STATIC|SHARED|MODULE ]  )

 macro (WkBuild project_type)
 CMAKE_POLICY(PUSH)
@@ -169,6 +169,20 @@
 	if ( ${ARGC} GREATER 1 )
 		set(${PROJECT_NAME}_load_type ${ARGV1} )
 	endif ( ${ARGC} GREATER 1 )
+
+    #adding usual BUIDL_SHARED_LIBS option
+    option(BUILD_SHARED_LIBS "Set this to ON to build shared libraries by default" off)
+
+	if(${project_type} STREQUAL "LIBRARY")
+		#handling default load type
+		if ( NOT ${PROJECT_NAME}_load_type )
+		    if( BUILD_SHARED_LIBS )
+    		    set(${PROJECT_NAME}_load_type "SHARED")
+    		else( BUILD_SHARED_LIBS )
+        		set(${PROJECT_NAME}_load_type "STATIC")
+        	endif( BUILD_SHARED_LIBS )
+        endif ( NOT ${PROJECT_NAME}_load_type )
+	endif(${project_type} STREQUAL "LIBRARY")

 	message ( STATUS "== Configuring ${PROJECT_NAME} as ${project_type} ${${PROJECT_NAME}_load_type}" )

@@ -279,8 +293,7 @@

 	if(${project_type} STREQUAL "LIBRARY")
 		add_library(${PROJECT_NAME} ${${PROJECT_NAME}_load_type} ${SOURCES})
-		if ( ${PROJECT_NAME}_load_type )
-		if(${${PROJECT_NAME}_load_type} STREQUAL "SHARED")
+		if ( ${${PROJECT_NAME}_load_type} STREQUAL "SHARED" )
 			set_target_properties(${PROJECT_NAME} PROPERTIES DEFINE_SYMBOL "WK_${PROJECT_NAME}_SHAREDLIB_BUILD")
 			#if on windows we need to care about run libraries ( Dlls )
 			if ( WIN32 )
@@ -288,8 +301,7 @@
 				set( ${PROJECT_NAME}_RUN_LIBRARIES "${${PROJECT_NAME}_LOCATION}")
 				#message( "Project run lib WkBuild : ${${PROJECT_NAME}_RUN_LIBRARIES} " )
 			endif( WIN32 )
-		endif(${${PROJECT_NAME}_load_type} STREQUAL "SHARED")
-		endif (${PROJECT_NAME}_load_type)
+		endif ( ${${PROJECT_NAME}_load_type} STREQUAL "SHARED" )
 	elseif (${project_type} STREQUAL "EXECUTABLE")
 		add_executable(${PROJECT_NAME} ${SOURCES})
 		#We also need to copy run libraries on windows
@@ -314,23 +326,22 @@
             set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${${PROJECT_NAME}_CXX_FLAGS} ${${PROJECT_NAME}_CXX_FLAGS_RELEASE}" )
         endif()
     endif()
- 	if(${project_type} STREQUAL "LIBRARY")
-     	if(${${PROJECT_NAME}_load_type} STREQUAL "SHARED")
-       	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS "${${PROJECT_NAME}_SHARED_LINKER_FLAGS}" )
- 	        if ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Debug" )
-         	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "${${PROJECT_NAME}_SHARED_LINKER_FLAGS_DEBUG}" )
-   	        elseif ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Release" )
-           	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "${${PROJECT_NAME}_SHARED_LINKER_FLAGS_RELEASE}" )
-            endif()
-        elseif(${${PROJECT_NAME}_load_type} STREQUAL "MODULE")
-       	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS "${${PROJECT_NAME}_MODULE_LINKER_FLAGS}" )
- 	        if ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Debug" )
-         	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "${${PROJECT_NAME}_MODULE_LINKER_FLAGS_DEBUG}" )
-   	        elseif ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Release" )
-           	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "${${PROJECT_NAME}_MODULE_LINKER_FLAGS_RELEASE}" )
-            endif()
+	get_target_property(${PROJECT_NAME}_TYPE ${PROJECT_NAME} TYPE)
+	if ( ${PROJECT_NAME}_TYPE STREQUAL "SHARED_LIBRARY" )
+        set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS "${${PROJECT_NAME}_SHARED_LINKER_FLAGS}" )
+ 	    if ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Debug" )
+     	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "${${PROJECT_NAME}_SHARED_LINKER_FLAGS_DEBUG}" )
+   	    elseif ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Release" )
+       	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "${${PROJECT_NAME}_SHARED_LINKER_FLAGS_RELEASE}" )
         endif()
-  	elseif(${project_type} STREQUAL "EXECUTABLE")
+    elseif( ${PROJECT_NAME}_TYPE STREQUAL "MODULE_LIBRARY" )
+   	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS "${${PROJECT_NAME}_MODULE_LINKER_FLAGS}" )
+        if ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Debug" )
+     	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "${${PROJECT_NAME}_MODULE_LINKER_FLAGS_DEBUG}" )
+        elseif ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Release" )
+       	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "${${PROJECT_NAME}_MODULE_LINKER_FLAGS_RELEASE}" )
+        endif()
+  	elseif( ${PROJECT_NAME}_TYPE STREQUAL "EXECUTABLE" )
   	    if ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Debug" )
      	    set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "${${PROJECT_NAME}_EXE_LINKER_FLAGS} ${${PROJECT_NAME}_EXE_LINKER_FLAGS_DEBUG}" )
         elseif ( ${PROJECT_NAME}_BUILD_TYPE STREQUAL "Release" )
@@ -403,6 +414,25 @@
 CMAKE_POLICY(POP)
 endmacro (WkBuild)

+#TODO :
+
+#macro (WkBuild project_type [load_type])
+#TODO for backward compat. must call :
+
+#WkTarget generates a target for the current project.
+#with same Language as Project and implicit dependency of main build target (check if always doable)
+macro (WkTarget target_name include_dir source_dir project_type [load_type])
+CMAKE_POLICY(PUSH)
+CMAKE_POLICY(VERSION 2.6)
+#TODO
+CMAKE_POLICY(POP)
+endmacro(WkTarget)
+
+macro (WkTargetOptions target_name compile_flags link_flags)
+#TODO : setting specific flags for this target ( override default target flags from project )
+endmacro (WkTargetOptions)
+
+
 #
 # WkExtData( [ datafile1 [ datafile2 [ ... ] ] ] )
 # Copy the external data ( not in WKCMAKE_DATA_DIR ) associated to the project from the path,


Use unix EOL

Use unix EOL

--- cmake/modules/hunter_set_cmake_default_generator.cmake
+++ cmake/modules/hunter_set_cmake_default_generator.cmake
@@ -1,63 +1,63 @@
-# Copyright (c) 2014, Ruslan Baratov
-# All rights reserved.
-
-include(hunter_fatal_error)
-include(hunter_get_temp_directory)
-include(hunter_status_debug)
-include(hunter_test_string_not_empty)
-
-function(hunter_set_cmake_default_generator)
-  hunter_test_string_not_empty("${HUNTER_BASE}")
-  hunter_test_string_not_empty("${HUNTER_INSTALL_TAG}")
-  hunter_test_string_not_empty("${PROJECT_BINARY_DIR}")
-
-  set(
-      generator_info
-      "${HUNTER_BASE}/Toolchains/${HUNTER_INSTALL_TAG}/default_generator.info"
-  )
-
-  if(EXISTS "${generator_info}")
-    hunter_status_debug("File `${generator_info}` exists")
-    return()
-  endif()
-
-  hunter_status_debug("File `${generator_info}` not found, run test...")
-
-  hunter_get_temp_directory(
-      "${PROJECT_BINARY_DIR}/_3rdParty/hunter/generator-info"
-      temp_project_dir
-  )
-  hunter_test_string_not_empty("${temp_project_dir}")
-  set(temp_build_dir "${temp_project_dir}/_builds")
-
-  file(
-      WRITE
-      "${temp_project_dir}/CMakeLists.txt"
-      "cmake_minimum_required(VERSION 2.8.12)\n"
-      "project(temp)\n"
-      "file(\n"
-      "    WRITE\n"
-      "    \"${generator_info}\"\n"
-      "    \"\${CMAKE_GENERATOR}\"\n"
-      ")\n"
-  )
-
-  execute_process(
-      COMMAND
-      "${CMAKE_COMMAND}"
-      "-H${temp_project_dir}"
-      "-B${temp_build_dir}"
-      RESULT_VARIABLE
-      generate_result
-  )
-
-  if(NOT generate_result EQUAL "0")
-    hunter_fatal_error("Generate failed: exit with code ${generate_result}")
-  endif()
-
-  if(NOT EXISTS "${generator_info}")
-    hunter_fatal_error("Internal error `${generator_info}` not exists")
-  endif()
-
-  file(REMOVE_RECURSE "${temp_project_dir}")
-endfunction()
+# Copyright (c) 2014, Ruslan Baratov
+# All rights reserved.
+
+include(hunter_fatal_error)
+include(hunter_get_temp_directory)
+include(hunter_status_debug)
+include(hunter_test_string_not_empty)
+
+function(hunter_set_cmake_default_generator)
+  hunter_test_string_not_empty("${HUNTER_BASE}")
+  hunter_test_string_not_empty("${HUNTER_INSTALL_TAG}")
+  hunter_test_string_not_empty("${PROJECT_BINARY_DIR}")
+
+  set(
+      generator_info
+      "${HUNTER_BASE}/Toolchains/${HUNTER_INSTALL_TAG}/default_generator.info"
+  )
+
+  if(EXISTS "${generator_info}")
+    hunter_status_debug("File `${generator_info}` exists")
+    return()
+  endif()
+
+  hunter_status_debug("File `${generator_info}` not found, run test...")
+
+  hunter_get_temp_directory(
+      "${PROJECT_BINARY_DIR}/_3rdParty/hunter/generator-info"
+      temp_project_dir
+  )
+  hunter_test_string_not_empty("${temp_project_dir}")
+  set(temp_build_dir "${temp_project_dir}/_builds")
+
+  file(
+      WRITE
+      "${temp_project_dir}/CMakeLists.txt"
+      "cmake_minimum_required(VERSION 2.8.12)\n"
+      "project(temp)\n"
+      "file(\n"
+      "    WRITE\n"
+      "    \"${generator_info}\"\n"
+      "    \"\${CMAKE_GENERATOR}\"\n"
+      ")\n"
+  )
+
+  execute_process(
+      COMMAND
+      "${CMAKE_COMMAND}"
+      "-H${temp_project_dir}"
+      "-B${temp_build_dir}"
+      RESULT_VARIABLE
+      generate_result
+  )
+
+  if(NOT generate_result EQUAL "0")
+    hunter_fatal_error("Generate failed: exit with code ${generate_result}")
+  endif()
+
+  if(NOT EXISTS "${generator_info}")
+    hunter_fatal_error("Internal error `${generator_info}` not exists")
+  endif()
+
+  file(REMOVE_RECURSE "${temp_project_dir}")
+endfunction()


Now just setting paths

Now just setting paths

--- build/macros.cmake
+++ build/macros.cmake
@@ -60,7 +60,7 @@
 macro(ork_pre_project_config)
 	set(CMAKE_SUPPRESS_REGENERATION OFF) #Projects can be run on machines without CMake installed
 	set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-	set_as_internal(ORK_USE_SOLUTION_FOLDERS ON)
+	set(ORK_USE_SOLUTION_FOLDERS ON)

 	if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
@@ -113,9 +113,9 @@

 macro(detect_path _var _val1 _val2)
 	if(EXISTS "${_val1}")
-		set_as_internal(${_var} "${_val1}")
+		set(${_var} "${_val1}")
 	elseif(EXISTS "${_val2}")
-		set_as_internal(${_var} "${_val2}")
+		set(${_var} "${_val2}")
 	else()
 		message(FATAL_ERROR "Cannot find path ${_val1} or ${_val2}")
 	endif()
@@ -340,8 +340,8 @@
 endmacro()

 macro(set_latest_language_versions)
-	set_as_internal(CMAKE_CXX_STANDARD 17)
-	set_as_internal(CMAKE_CXX_STANDARD_REQUIRED ON)
+	set(CMAKE_CXX_STANDARD 17)
+	set(CMAKE_CXX_STANDARD_REQUIRED ON)
 endmacro()

 macro(enable_fast_floating_point _enable)
@@ -514,6 +514,8 @@
 	set(CMAKE_SKIP_INSTALL_RPATH ON)
 	set(CMAKE_SKIP_RPATH ON)
 	set(CMAKE_VERBOSE_MAKEFILE OFF)
+
+	set(CMAKE_DEBUG_POSTFIX "d")
 endmacro()

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


physx support for vs 2017 round 2

physx support for vs 2017 round 2

--- Tools/CMake/modules/module_physx3.cmake
+++ Tools/CMake/modules/module_physx3.cmake
@@ -46,14 +46,11 @@
 # Windows/ Visual Studio
 if(MSVC)
 if(TORQUE_CPU_X32)
-   if(MSVC11)
-      set(PHYSX3_LIBPATH_PREFIX vc11win32)
-   elseif(MSVC12)
+   if(MSVC_VERSION EQUAL 1800 )
       set(PHYSX3_LIBPATH_PREFIX vc12win32)
-   elseif(MSVC14)
+   elseif(MSVC_VERSION EQUAL 1900)
       set(PHYSX3_LIBPATH_PREFIX vc14win32)
-   #VS 2017 uses 14.x toolchain so can't use MSVC15
-   elseif(MSVC_VERSION GREATER_OR_EQUAL_TO 1910)
+   elseif(MSVC_VERSION GREATER_EQUAL 1910)
       set(PHYSX3_LIBPATH_PREFIX vc15win32)
    else()
       message(FATAL_ERROR "This version of VS is not supported")
@@ -62,14 +59,11 @@
 set(PHYSX3_LIBNAME_POSTFIX _x86)

 elseif(TORQUE_CPU_X64)
-   if(MSVC11)
-      set(PHYSX3_LIBPATH_PREFIX vc11win64)
-   elseif(MSVC12)
+   if(MSVC_VERSION EQUAL 1800 )
       set(PHYSX3_LIBPATH_PREFIX vc12win64)
-   elseif(MSVC14)
+   elseif(MSVC_VERSION EQUAL 1900)
       set(PHYSX3_LIBPATH_PREFIX vc14win64)
-   #VS 2017 uses 14.x toolchain so can't use MSVC15
-   elseif(MSVC_VERSION GREATER_OR_EQUAL_TO 1910)
+   elseif(MSVC_VERSION GREATER_EQUAL 1910)
       set(PHYSX3_LIBPATH_PREFIX vc15win64)
    else()
       message(FATAL_ERROR "This version of VS is not supported")


fix typo

fix typo

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

--- kpilot/cmake/modules/FindPilotlink.cmake
+++ kpilot/cmake/modules/FindPilotlink.cmake
@@ -46,9 +46,9 @@
 ENDIF (NOT PILOTLINK_VERSION_OK)

 if (PILOTLINK_FOUND)
-   if (NOT PCRE_FIND_QUIETLY)
+   if (NOT Pilotlink_FIND_QUIETLY)
       message(STATUS "Found Pilotlink lib: ${PILOTLINK_LIBRARY}")
-   endif (NOT PCRE_FIND_QUIETLY)
+   endif (NOT Pilotlink_FIND_QUIETLY)
 else (PILOTLINK_FOUND)
    if (Pilotlink_FIND_REQUIRED)
        MESSAGE(STATUS "KPilot requires pilot-link 0.12.0 or later. Pilot-link is available from pilot-link.org and is packaged by most distributions. Remember to install the development package with the compilation headers as well.")


Fixed FindVL.cmake

Fixed FindVL.cmake

--- cmake/FindVL.cmake
+++ cmake/FindVL.cmake
@@ -28,8 +28,8 @@
 endmacro()

 macro(_vl_find_component _name)
-	_vl_find_library(VL_${_name}_LIBRARY "${_component_name}")
-	_vl_find_library(VL_${_name}_LIBRARY_DEBUG "${_component_name}-d")
+	_vl_find_library(VL_${_name}_LIBRARY ${_name})
+	_vl_find_library(VL_${_name}_LIBRARY_DEBUG ${_name}-d)

 	if(VL_${_name}_LIBRARY AND VL_${_name}_LIBRARY_DEBUG)
 		set(VL_${_name}_LIBRARIES optimized ${VL_${_name}_LIBRARY} debug ${VL_${_name}_LIBRARY_DEBUG})
@@ -57,7 +57,7 @@
 # Find the requested VL components
 foreach(component_name ${VL_FIND_COMPONENTS})
 	_vl_find_component(${component_name})
-	list(APPEND _vl_required_vars VL_${name}_LIBRARIES)
+	list(APPEND _vl_required_vars VL_${component_name}_LIBRARIES)
 endforeach(component_name)

 include( FindPackageHandleStandardArgs )


Remove pointless cmake_minimum_required(VERSION ...) statement

--- cmake/Plugin.cmake
+++ cmake/Plugin.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 2.8.6)
-
 function(add_plugin name)
   add_library(${name} MODULE ${ARGN})


libc++ for clang

libc++ for clang

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -23,7 +23,8 @@
 	message(STATUS "BUILD_SHARED_LIBS >>> ${BUILD_SHARED_LIBS}")

 	if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+		set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
 	elseif(MSVC)
 		add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
 		add_definitions(-D_SCL_SECURE_NO_WARNINGS=1)


use -visibility=hidden also for plugins linked statically into libmysqld (it was used only for plugins in mysqld)

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -128,6 +128,7 @@
       IF(ARG_RECOMPILE_FOR_EMBEDDED OR NOT _SKIP_PIC)
         # Recompile some plugins for embedded
         ADD_CONVENIENCE_LIBRARY(${target}_embedded ${SOURCES})
+        RESTRICT_SYMBOL_EXPORTS(${target}_embedded)
         DTRACE_INSTRUMENT(${target}_embedded)
         IF(ARG_RECOMPILE_FOR_EMBEDDED)
           SET_TARGET_PROPERTIES(${target}_embedded


Added a CMake function to return the intermediate output directory where the Generator html and stmt output will be placed. This allows a test to copy these files into its resource bundle.

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -1,3 +1,14 @@
+# This function returns the intermediate output directory where the Halide
+# generator output will be placed. This path is automatically added to the
+# library path and include path of the specified target. This function can be
+# used to determine the location of the other output files like the bit code and
+# html.
+function(halide_generator_output_path gen_name result_var)
+  file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/" NATIVE_INT_DIR)
+  set(${result_var} "${NATIVE_INT_DIR}scratch_${gen_name}" PARENT_SCOPE)
+  file(MAKE_DIRECTORY "${result_var}")
+endfunction(halide_generator_output_path)
+
 # This function adds custom build steps to invoke a Halide generator exectuable,
 # produce a static library containing the generated code, and then link that
 # static library to the specified target. The generator executable must be
@@ -6,9 +17,7 @@

   # Determine a scratch directory to build and execute the generator. ${target}
   # will include the generated header from this directory.
-  file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/" NATIVE_INT_DIR)
-  set(SCRATCH_DIR "${NATIVE_INT_DIR}scratch_${gen_name}")
-  file(MAKE_DIRECTORY "${SCRATCH_DIR}")
+  halide_generator_output_path(${gen_name} SCRATCH_DIR)

   # CMake 2.8 doesn't have string(CONCAT), so fake it like so:
   string(REPLACE ".lib" "${CMAKE_STATIC_LIBRARY_SUFFIX}" FILTER_LIB "${func_name}.lib" )


Workaround for doxygen bug with linebreaks in ALIASES

Using \_linebr is not ideal, as it's an internal command. But that
seems to be the most compatible way to specify line breaks in ALIASES
accross different doxygen versions at the moment.

--- doc/Doxyfile.cmake
+++ doc/Doxyfile.cmake
@@ -24,8 +24,8 @@
 INHERIT_DOCS = YES
 SEPARATE_MEMBER_PAGES = NO
 TAB_SIZE = 8
-ALIASES += startlifecycle{1}="\name Lifecycle Functions for \1\n@{"
-ALIASES += startlifecycle="\name Lifecycle Functions\n@{"
+ALIASES += startlifecycle{1}="\name Lifecycle Functions for \1\_linebr@{"
+ALIASES += startlifecycle="\name Lifecycle Functions\_linebr@{"
 ALIASES += endlifecycle="@}"
 ALIASES += setting{1}="\ref settings_\1"
 OPTIMIZE_OUTPUT_FOR_C = YES