[Cmake-commits] CMake branch, next, updated. v3.6.2-2426-g4d7b5dc

Brad King brad.king at kitware.com
Fri Sep 23 09:40:08 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  4d7b5dceb90d80e650ed64af491d8a1765d1c60d (commit)
       via  b36408a092b946568abbe935062e14aedadc161b (commit)
       via  7274fd9c1934d617464b752210ff16ee4f3c96fb (commit)
       via  ccd1341ac935d6ba479f3dc27b6041bff0c1c970 (commit)
       via  aaf4014c28d0d0bf5180dffd5c4a628406a5e7a1 (commit)
      from  e32d2f7b343eb697ac7ddcdcff68d3dd4234d767 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d7b5dceb90d80e650ed64af491d8a1765d1c60d
commit 4d7b5dceb90d80e650ed64af491d8a1765d1c60d
Merge: e32d2f7 b36408a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 23 09:40:07 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 23 09:40:07 2016 -0400

    Merge topic 'FindMatlab-simulink' into next
    
    b36408a0 FindMatlab: Add notes for topic 'FindMatlab-simulink'
    7274fd9c FindMatlab: Add EXECUTABLE, MODULE, and SHARED options to matlab_add_mex
    ccd1341a FindMatlab: Add SIMULINK component
    aaf4014c FindMatlab: Fix documentation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b36408a092b946568abbe935062e14aedadc161b
commit b36408a092b946568abbe935062e14aedadc161b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 23 09:36:05 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 23 09:36:05 2016 -0400

    FindMatlab: Add notes for topic 'FindMatlab-simulink'

diff --git a/Help/release/dev/FindMatlab-simulink.rst b/Help/release/dev/FindMatlab-simulink.rst
new file mode 100644
index 0000000..cd25412
--- /dev/null
+++ b/Help/release/dev/FindMatlab-simulink.rst
@@ -0,0 +1,4 @@
+FindMatlab-simulink
+-------------------
+
+* The :module:`FindMatlab` module learned to find a SIMULINK component.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7274fd9c1934d617464b752210ff16ee4f3c96fb
commit 7274fd9c1934d617464b752210ff16ee4f3c96fb
Author:     Jamie Snape <jamie.snape at kitware.com>
AuthorDate: Thu Sep 22 09:09:58 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 23 09:28:27 2016 -0400

    FindMatlab: Add EXECUTABLE, MODULE, and SHARED options to matlab_add_mex

diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 548d298..8b41bb9 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -821,12 +821,13 @@ endfunction()
 #   order to produce a MEX file. The final name of the produced output may be
 #   specified, as well as additional link libraries, and a documentation entry
 #   for the MEX file. Remaining arguments of the call are passed to the
-#   :command:`add_library` command.
+#   :command:`add_library` or :command:`add_executable` command.
 #
 #   ::
 #
 #      matlab_add_mex(
 #          NAME <name>
+#          [EXECUTABLE | MODULE | SHARED]
 #          SRC src1 [src2 ...]
 #          [OUTPUT_NAME output_name]
 #          [DOCUMENTATION file.txt]
@@ -853,6 +854,10 @@ endfunction()
 #     mex file, and with extension `.m`. In that case, typing ``help <name>``
 #     in Matlab prints the documentation contained in this file.
 #
+#   ``MODULE`` or ``SHARED`` may be given to specify the type of library to be
+#     created. ``EXECUTABLE`` may be given to create an executable instead of
+#     a library. If no type is given explicitly, the type is ``SHARED``.
+#
 #   The documentation file is not processed and should be in the following
 #   format:
 #
@@ -861,7 +866,7 @@ endfunction()
 #     % This is the documentation
 #     function ret = mex_target_output_name(input1)
 #
-function(matlab_add_mex )
+function(matlab_add_mex)
 
   if(NOT WIN32)
     # we do not need all this on Windows
@@ -873,6 +878,7 @@ function(matlab_add_mex )
 
   endif()
 
+  set(options EXECUTABLE MODULE SHARED)
   set(oneValueArgs NAME DOCUMENTATION OUTPUT_NAME)
   set(multiValueArgs LINK_TO SRC)
 
@@ -887,11 +893,25 @@ function(matlab_add_mex )
     set(${prefix}_OUTPUT_NAME ${${prefix}_NAME})
   endif()
 
-  add_library(${${prefix}_NAME}
-    SHARED
+  if(${prefix}_EXECUTABLE)
+    add_executable(${${prefix}_NAME}
+      ${${prefix}_SRC}
+      ${${prefix}_DOCUMENTATION}
+      ${${prefix}_UNPARSED_ARGUMENTS})
+  else()
+    if(${prefix}_MODULE)
+      set(type MODULE)
+    else()
+      set(type SHARED)
+    endif()
+
+    add_library(${${prefix}_NAME}
+      ${type}
       ${${prefix}_SRC}
       ${${prefix}_DOCUMENTATION}
       ${${prefix}_UNPARSED_ARGUMENTS})
+  endif()
+
   target_include_directories(${${prefix}_NAME} PRIVATE ${Matlab_INCLUDE_DIRS})
 
   if(DEFINED Matlab_MX_LIBRARY)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccd1341ac935d6ba479f3dc27b6041bff0c1c970
commit ccd1341ac935d6ba479f3dc27b6041bff0c1c970
Author:     Jamie Snape <jamie.snape at kitware.com>
AuthorDate: Thu Sep 22 09:05:35 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 23 09:28:18 2016 -0400

    FindMatlab: Add SIMULINK component

diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index c8dd612..548d298 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -19,6 +19,7 @@
 #   ENG and MAT libraries of Matlab
 # * ``MAIN_PROGRAM`` the Matlab binary program.
 # * ``MEX_COMPILER`` the MEX compiler.
+# * ``SIMULINK`` the Simulink environment.
 #
 # .. note::
 #
@@ -1464,6 +1465,21 @@ if(_matlab_find_mat GREATER -1)
 endif()
 unset(_matlab_find_mat)
 
+# Component Simulink
+list(FIND Matlab_FIND_COMPONENTS SIMULINK _matlab_find_simulink)
+if(_matlab_find_simulink GREATER -1)
+  find_path(
+    Matlab_SIMULINK_INCLUDE_DIR
+    simstruc.h
+    PATHS "${Matlab_ROOT_DIR}/simulink/include"
+    NO_DEFAULT_PATH
+    )
+  if(Matlab_SIMULINK_INCLUDE_DIR)
+    set(Matlab_SIMULINK_FOUND TRUE)
+    list(APPEND Matlab_INCLUDE_DIRS "${Matlab_SIMULINK_INCLUDE_DIR}")
+  endif()
+endif()
+unset(_matlab_find_simulink)
 
 unset(_matlab_lib_dir_for_search)
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaf4014c28d0d0bf5180dffd5c4a628406a5e7a1
commit aaf4014c28d0d0bf5180dffd5c4a628406a5e7a1
Author:     Jamie Snape <jamie.snape at kitware.com>
AuthorDate: Thu Sep 22 09:03:56 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 23 09:28:09 2016 -0400

    FindMatlab: Fix documentation

diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index c813f8f..c8dd612 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -18,6 +18,7 @@
 # * ``MX_LIBRARY``, ``ENG_LIBRARY`` and ``MAT_LIBRARY``: respectively the MX,
 #   ENG and MAT libraries of Matlab
 # * ``MAIN_PROGRAM`` the Matlab binary program.
+# * ``MEX_COMPILER`` the MEX compiler.
 #
 # .. note::
 #
@@ -835,7 +836,7 @@ endfunction()
 #   ``NAME``
 #     name of the target.
 #   ``SRC``
-#     list of tje source files.
+#     list of source files.
 #   ``LINK_TO``
 #     a list of additional link dependencies.  The target links to ``libmex``
 #     by default. If ``Matlab_MX_LIBRARY`` is defined, it also

-----------------------------------------------------------------------

Summary of changes:
 Help/release/dev/FindMatlab-simulink.rst |    4 +++
 Modules/FindMatlab.cmake                 |   47 ++++++++++++++++++++++++++----
 2 files changed, 46 insertions(+), 5 deletions(-)
 create mode 100644 Help/release/dev/FindMatlab-simulink.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list