[Cmake-commits] CMake branch, master, updated. v3.8.0-1002-g2911d47

Kitware Robot kwrobot at kitware.com
Fri Apr 28 09:55:04 EDT 2017


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, master has been updated
       via  2911d4701675d17b817f8fbe607bb5a493cacf0c (commit)
       via  b61e9f8382de26ffe8cc137dfd6d63556d0bf66f (commit)
       via  12512bdb518ca1278a59997c959272625d7f6b6b (commit)
       via  f320907b3d288930c80411a8e97f63eef0e8ec8b (commit)
       via  28d83837978aefc7f6e467b41ff792817da9ec95 (commit)
       via  2a207aaca1d8414624dd4cfe8fcb19d03fe84546 (commit)
       via  81841426fc12864008999893c11e555df06df292 (commit)
       via  4c2ae38b0b25e7908c25ae939ba235dcaf336c39 (commit)
      from  34a083a1951306aa9d0c0a5f14ac17706f475546 (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=2911d4701675d17b817f8fbe607bb5a493cacf0c
commit 2911d4701675d17b817f8fbe607bb5a493cacf0c
Merge: b61e9f8 f320907
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 28 13:53:44 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Apr 28 09:53:50 2017 -0400

    Merge topic 'fix-qhalt-for-xl'
    
    f320907b XL: Fix the use of the -qhalt flag for varying OSs
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !771


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b61e9f8382de26ffe8cc137dfd6d63556d0bf66f
commit b61e9f8382de26ffe8cc137dfd6d63556d0bf66f
Merge: 12512bd 4c2ae38
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 28 13:52:22 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Apr 28 09:52:41 2017 -0400

    Merge topic 'FindBoost-compile-features'
    
    4c2ae38b Boost Fiber actually require at least C++11.
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !749


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12512bdb518ca1278a59997c959272625d7f6b6b
commit 12512bdb518ca1278a59997c959272625d7f6b6b
Merge: 34a083a 28d8383
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 28 13:51:56 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Apr 28 09:52:07 2017 -0400

    Merge topic 'separgs-native'
    
    28d83837 separgs: Use NATIVE_COMMAND where appropriate
    2a207aac separgs: Add a NATIVE_COMMAND mode
    81841426 separgs: Migrate tests to RunCMake tests
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !753


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f320907b3d288930c80411a8e97f63eef0e8ec8b
commit f320907b3d288930c80411a8e97f63eef0e8ec8b
Author:     Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Thu Apr 27 10:12:18 2017 -0400
Commit:     Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Thu Apr 27 13:29:28 2017 -0400

    XL: Fix the use of the -qhalt flag for varying OSs
    
    The valid settings to pass to the IBM XL compiler for the -qhalt flag
    vary widely by language and platform.  Based on existing documentation,
    the following table shows which error levels are valid to pass to
    -qhalt= since -qhalt=e is not always available.
    
    OS       |  xlc  |  xlC  |   xlf   |
    ---------|-------|------------------
    AIX      | iwes  | iw s  | ilwesu  |
    BlueGene | iwes  | iwes  | ilwesu  |
    OS X     | iwesu | iwesu | ilwesu  |
    Linux    |  w    |  w    | ilwesu  |

diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake
index f976c99..f14373d 100644
--- a/Modules/Compiler/XL-C.cmake
+++ b/Modules/Compiler/XL-C.cmake
@@ -4,5 +4,4 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
 string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
 
 # -qthreaded     = Ensures that all optimizations will be thread-safe
-# -qhalt=e       = Halt on error messages (rather than just severe errors)
-string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded -qhalt=e")
+string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded")
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 545d657..4fdc43e 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -4,8 +4,7 @@ string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
 string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
 
 # -qthreaded     = Ensures that all optimizations will be thread-safe
-# -qhalt=e       = Halt on error messages (rather than just severe errors)
-string(APPEND CMAKE_CXX_FLAGS_INIT " -qthreaded -qhalt=e")
+string(APPEND CMAKE_CXX_FLAGS_INIT " -qthreaded")
 
 set(CMAKE_CXX_COMPILE_OBJECT
   "<CMAKE_CXX_COMPILER> -+ <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
diff --git a/Modules/Platform/AIX-XL-C.cmake b/Modules/Platform/AIX-XL-C.cmake
index 5e437fa..cbfd58b 100644
--- a/Modules/Platform/AIX-XL-C.cmake
+++ b/Modules/Platform/AIX-XL-C.cmake
@@ -1,2 +1,5 @@
 include(Platform/AIX-XL)
 __aix_compiler_xl(C)
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")
diff --git a/Modules/Platform/AIX-XL-CXX.cmake b/Modules/Platform/AIX-XL-CXX.cmake
index ef38a5f..78baef5 100644
--- a/Modules/Platform/AIX-XL-CXX.cmake
+++ b/Modules/Platform/AIX-XL-CXX.cmake
@@ -1,2 +1,5 @@
 include(Platform/AIX-XL)
 __aix_compiler_xl(CXX)
+
+# -qhalt=s       = Halt on severe error messages
+string(APPEND CMAKE_CXX_FLAGS_INIT " -qhalt=s")
diff --git a/Modules/Platform/BlueGeneP-dynamic-XL-C.cmake b/Modules/Platform/BlueGeneP-dynamic-XL-C.cmake
index f13b517..918ee70 100644
--- a/Modules/Platform/BlueGeneP-dynamic-XL-C.cmake
+++ b/Modules/Platform/BlueGeneP-dynamic-XL-C.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneP_set_dynamic_flags(XL C)
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")
diff --git a/Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake b/Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake
index 80c05a1..cfefb0b 100644
--- a/Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake
+++ b/Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneP_set_dynamic_flags(XL CXX)
+
+# -qhalt=s       = Halt on severe error messages
+string(APPEND CMAKE_CXX_FLAGS_INIT " -qhalt=s")
diff --git a/Modules/Platform/BlueGeneP-static-XL-C.cmake b/Modules/Platform/BlueGeneP-static-XL-C.cmake
index a990b5c..7d4fc13 100644
--- a/Modules/Platform/BlueGeneP-static-XL-C.cmake
+++ b/Modules/Platform/BlueGeneP-static-XL-C.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneP_set_static_flags(XL C)
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")
diff --git a/Modules/Platform/BlueGeneP-static-XL-CXX.cmake b/Modules/Platform/BlueGeneP-static-XL-CXX.cmake
index 116c0bb..1df276e 100644
--- a/Modules/Platform/BlueGeneP-static-XL-CXX.cmake
+++ b/Modules/Platform/BlueGeneP-static-XL-CXX.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneP_set_static_flags(XL CXX)
+
+# -qhalt=s       = Halt on severe error messages
+string(APPEND CMAKE_CXX_FLAGS_INIT " -qhalt=s")
diff --git a/Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake b/Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake
index f46fa95..c51dacb 100644
--- a/Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake
+++ b/Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneQ_setup_dynamic(XL C)
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")
diff --git a/Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake b/Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake
index c463379..5dbc836 100644
--- a/Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake
+++ b/Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneQ_setup_dynamic(XL CXX)
+
+# -qhalt=s       = Halt on severe error messages
+string(APPEND CMAKE_CXX_FLAGS_INIT " -qhalt=s")
diff --git a/Modules/Platform/BlueGeneQ-static-XL-C.cmake b/Modules/Platform/BlueGeneQ-static-XL-C.cmake
index 465128f..67cd57d 100644
--- a/Modules/Platform/BlueGeneQ-static-XL-C.cmake
+++ b/Modules/Platform/BlueGeneQ-static-XL-C.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneQ_setup_static(XL C)
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")
diff --git a/Modules/Platform/BlueGeneQ-static-XL-CXX.cmake b/Modules/Platform/BlueGeneQ-static-XL-CXX.cmake
index abd4ebf..a171e7f 100644
--- a/Modules/Platform/BlueGeneQ-static-XL-CXX.cmake
+++ b/Modules/Platform/BlueGeneQ-static-XL-CXX.cmake
@@ -3,3 +3,6 @@
 
 
 __BlueGeneQ_setup_static(XL CXX)
+
+# -qhalt=s       = Halt on severe error messages
+string(APPEND CMAKE_CXX_FLAGS_INIT " -qhalt=s")
diff --git a/Modules/Platform/Darwin-XL-C.cmake b/Modules/Platform/Darwin-XL-C.cmake
index 42e94a9..2aeb132 100644
--- a/Modules/Platform/Darwin-XL-C.cmake
+++ b/Modules/Platform/Darwin-XL-C.cmake
@@ -3,3 +3,6 @@ set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
 
 # Enable shared library versioning.
 set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")
diff --git a/Modules/Platform/Darwin-XL-CXX.cmake b/Modules/Platform/Darwin-XL-CXX.cmake
index 65c76f8..f8e1906 100644
--- a/Modules/Platform/Darwin-XL-CXX.cmake
+++ b/Modules/Platform/Darwin-XL-CXX.cmake
@@ -3,3 +3,6 @@ set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
 
 # Enable shared library versioning.
 set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
+
+# -qhalt=e       = Halt on error messages (rather than just severe errors)
+string(APPEND CMAKE_C_FLAGS_INIT " -qhalt=e")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28d83837978aefc7f6e467b41ff792817da9ec95
commit 28d83837978aefc7f6e467b41ff792817da9ec95
Author:     Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Wed Apr 26 20:34:23 2017 +0200
Commit:     Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Wed Apr 26 20:34:23 2017 +0200

    separgs: Use NATIVE_COMMAND where appropriate

diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 3273443..ad3c00f 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -38,11 +38,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
           set(line "${xline}")
         endif()
       endif()
-      if(UNIX)
-        separate_arguments(args UNIX_COMMAND "${line}")
-      else()
-        separate_arguments(args WINDOWS_COMMAND "${line}")
-      endif()
+      separate_arguments(args NATIVE_COMMAND "${line}")
       list(GET args 0 cmd)
     endif()
     set(is_msvc 0)
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 1e2ea69..5962c5b 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -354,11 +354,7 @@ macro( _HDF5_parse_compile_line
     libraries
     libraries_hl)
 
-  if(UNIX)
-    separate_arguments(_HDF5_COMPILE_ARGS UNIX_COMMAND "${${compile_line_var}}")
-  else()
-    separate_arguments(_HDF5_COMPILE_ARGS WINDOWS_COMMAND "${${compile_line_var}}")
-  endif()
+  separate_arguments(_HDF5_COMPILE_ARGS NATIVE_COMMAND "${${compile_line_var}}")
 
   foreach(arg IN LISTS _HDF5_COMPILE_ARGS)
     if("${arg}" MATCHES "^-I(.*)$")
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index fab53cb..37f3255 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -645,8 +645,7 @@ foreach (lang C CXX Fortran)
         add_library(MPI::MPI_${lang} INTERFACE IMPORTED)
       endif()
       if(MPI_${lang}_COMPILE_FLAGS)
-        set(_MPI_${lang}_COMPILE_OPTIONS "${MPI_${lang}_COMPILE_FLAGS}")
-        separate_arguments(_MPI_${lang}_COMPILE_OPTIONS)
+        separate_arguments(_MPI_${lang}_COMPILE_OPTIONS NATIVE_COMMAND "${MPI_${lang}_COMPILE_FLAGS}")
         set_property(TARGET MPI::MPI_${lang} PROPERTY
           INTERFACE_COMPILE_OPTIONS "${_MPI_${lang}_COMPILE_OPTIONS}")
       endif()
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 8c1b018..e7d9d5f 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -411,11 +411,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
         add_library(OpenMP::OpenMP_${LANG} INTERFACE IMPORTED)
       endif()
       if(OpenMP_${LANG}_FLAGS)
-        if(CMAKE_HOST_WIN32)
-          separate_arguments(_OpenMP_${LANG}_OPTIONS WINDOWS_COMMAND "${OpenMP_${LANG}_FLAGS}")
-        else()
-          separate_arguments(_OpenMP_${LANG}_OPTIONS UNIX_COMMAND "${OpenMP_${LANG}_FLAGS}")
-        endif()
+        separate_arguments(_OpenMP_${LANG}_OPTIONS NATIVE_COMMAND "${OpenMP_${LANG}_FLAGS}")
         set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY
           INTERFACE_COMPILE_OPTIONS "${_OpenMP_${LANG}_OPTIONS}")
         unset(_OpenMP_${LANG}_OPTIONS)
diff --git a/Tests/FindOpenMP/Test/CMakeLists.txt b/Tests/FindOpenMP/Test/CMakeLists.txt
index 4ba0e5c..6313ef6 100644
--- a/Tests/FindOpenMP/Test/CMakeLists.txt
+++ b/Tests/FindOpenMP/Test/CMakeLists.txt
@@ -39,11 +39,7 @@ foreach(c C CXX Fortran)
   add_test(NAME test_tgt_${c} COMMAND test_tgt_${c})
 
   add_executable(test_var_${c} ${OpenMPTEST_SOURCE_FILE})
-  if(CMAKE_HOST_WIN32)
-    separate_arguments(_OpenMP_${c}_OPTIONS WINDOWS_COMMAND "${OpenMP_${c}_FLAGS}")
-  else()
-    separate_arguments(_OpenMP_${c}_OPTIONS UNIX_COMMAND "${OpenMP_${c}_FLAGS}")
-  endif()
+  separate_arguments(_OpenMP_${c}_OPTIONS NATIVE_COMMAND "${OpenMP_${c}_FLAGS}")
   target_compile_options(test_var_${c} PRIVATE "${_OpenMP_${c}_OPTIONS}")
   target_link_libraries(test_var_${c} PRIVATE "${OpenMP_${c}_FLAGS}")
   set_property(TARGET test_var_${c} PROPERTY LINKER_LANGUAGE ${c})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a207aaca1d8414624dd4cfe8fcb19d03fe84546
commit 2a207aaca1d8414624dd4cfe8fcb19d03fe84546
Author:     Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Wed Apr 26 20:34:06 2017 +0200
Commit:     Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Wed Apr 26 20:34:06 2017 +0200

    separgs: Add a NATIVE_COMMAND mode

diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim
index 1f19cb7..aca7c41 100644
--- a/Auxiliary/vim/syntax/cmake.vim
+++ b/Auxiliary/vim/syntax/cmake.vim
@@ -320,7 +320,7 @@ syn keyword cmakeKWremove
             \ contained
 
 syn keyword cmakeKWseparate_arguments
-            \ MSDN UNIX_COMMAND VARIABLE WINDOWS WINDOWS_COMMAND _COMMAND
+            \ MSDN NATIVE_COMMAND UNIX_COMMAND VARIABLE WINDOWS WINDOWS_COMMAND _COMMAND
             \ contained
 
 syn keyword cmakeKWset
diff --git a/Help/command/separate_arguments.rst b/Help/command/separate_arguments.rst
index 1fd3cd1..47982a5 100644
--- a/Help/command/separate_arguments.rst
+++ b/Help/command/separate_arguments.rst
@@ -5,9 +5,9 @@ Parse space-separated arguments into a semicolon-separated list.
 
 ::
 
-  separate_arguments(<var> <UNIX|WINDOWS>_COMMAND "<args>")
+  separate_arguments(<var> <NATIVE|UNIX|WINDOWS>_COMMAND "<args>")
 
-Parses a unix- or windows-style command-line string "<args>" and
+Parses a UNIX- or Windows-style command-line string "<args>" and
 stores a semicolon-separated list of the arguments in ``<var>``.  The
 entire command line must be given in one "<args>" argument.
 
@@ -16,12 +16,15 @@ recognizes both single-quote and double-quote pairs.  A backslash
 escapes the next literal character (``\"`` is ``"``); there are no special
 escapes (``\n`` is just ``n``).
 
-The ``WINDOWS_COMMAND`` mode parses a windows command-line using the same
+The ``WINDOWS_COMMAND`` mode parses a Windows command-line using the same
 syntax the runtime library uses to construct argv at startup.  It
 separates arguments by whitespace that is not double-quoted.
 Backslashes are literal unless they precede double-quotes.  See the
 MSDN article `Parsing C Command-Line Arguments`_ for details.
 
+The ``NATIVE_COMMAND`` mode parses a Windows command-line if the host
+system is Windows, and a UNIX command-line otherwise.
+
 .. _`Parsing C Command-Line Arguments`: https://msdn.microsoft.com/library/a1y7w461.aspx
 
 ::
diff --git a/Help/release/dev/separgs-native.rst b/Help/release/dev/separgs-native.rst
new file mode 100644
index 0000000..943f08e
--- /dev/null
+++ b/Help/release/dev/separgs-native.rst
@@ -0,0 +1,5 @@
+separgs-native
+-------------------
+
+* A ``NATIVE_COMMAND`` mode was added to :command:`separate_arguments`
+  performing argument separation depening on the host operating system.
diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx
index b27d227..7b222a0 100644
--- a/Source/cmSeparateArgumentsCommand.cxx
+++ b/Source/cmSeparateArgumentsCommand.cxx
@@ -40,6 +40,13 @@ bool cmSeparateArgumentsCommand::InitialPass(
     if (doing == DoingVariable) {
       var = args[i];
       doing = DoingMode;
+    } else if (doing == DoingMode && args[i] == "NATIVE_COMMAND") {
+#ifdef _WIN32
+      mode = ModeWindows;
+#else
+      mode = ModeUnix;
+#endif
+      doing = DoingCommand;
     } else if (doing == DoingMode && args[i] == "UNIX_COMMAND") {
       mode = ModeUnix;
       doing = DoingCommand;
diff --git a/Tests/RunCMake/separate_arguments/NativeCommand.cmake b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
new file mode 100644
index 0000000..1cb009e
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
@@ -0,0 +1,19 @@
+set(unix_cmd "a \"b c\" 'd e' \";\" \\ \\'\\\" '\\'' \"\\\"\"")
+set(unix_exp "a;b c;d e;\;; '\";';\"")
+
+set(windows_cmd "a \"b c\" 'd e' \";\" \\ \"c:\\windows\\path\\\\\" \\\"")
+set(windows_exp "a;b c;'d;e';\;;\\;c:\\windows\\path\\;\"")
+
+if(CMAKE_HOST_WIN32)
+  set(native_cmd "${windows_cmd}")
+  set(native_exp "${windows_exp}")
+else()
+  set(native_cmd "${unix_cmd}")
+  set(native_exp "${unix_exp}")
+endif()
+separate_arguments(native_out NATIVE_COMMAND "${native_cmd}")
+
+if(NOT "${native_out}" STREQUAL "${native_exp}")
+  message(FATAL_ERROR "separate_arguments native-style failed.  "
+    "Expected\n  [${native_exp}]\nbut got\n  [${native_out}]\n")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake b/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
index 0917d87..07951bb 100644
--- a/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
+++ b/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
@@ -4,3 +4,4 @@ run_cmake(EmptyCommand)
 run_cmake(PlainCommand)
 run_cmake(UnixCommand)
 run_cmake(WindowsCommand)
+run_cmake(NativeCommand)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81841426fc12864008999893c11e555df06df292
commit 81841426fc12864008999893c11e555df06df292
Author:     Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Wed Apr 26 20:26:47 2017 +0200
Commit:     Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Wed Apr 26 20:26:47 2017 +0200

    separgs: Migrate tests to RunCMake tests

diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index 1cca35d..1619081 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -19,7 +19,6 @@ AddCMakeTest(GetFilenameComponentRealpath "")
 AddCMakeTest(Version "")
 AddCMakeTest(Message "")
 AddCMakeTest(File "")
-AddCMakeTest(SeparateArguments "")
 AddCMakeTest(ImplicitLinkInfo "")
 AddCMakeTest(ModuleNotices "")
 AddCMakeTest(GetProperty "")
diff --git a/Tests/CMakeTests/SeparateArgumentsTest.cmake.in b/Tests/CMakeTests/SeparateArgumentsTest.cmake.in
deleted file mode 100644
index 48964b8..0000000
--- a/Tests/CMakeTests/SeparateArgumentsTest.cmake.in
+++ /dev/null
@@ -1,25 +0,0 @@
-set(old_out "a b  c")
-separate_arguments(old_out)
-set(old_exp "a;b;;c")
-
-set(unix_cmd "a \"b c\" 'd e' \";\" \\ \\'\\\" '\\'' \"\\\"\"")
-set(unix_exp "a;b c;d e;\;; '\";';\"")
-separate_arguments(unix_out UNIX_COMMAND "${unix_cmd}")
-
-set(windows_cmd "a \"b c\" 'd e' \";\" \\ \"c:\\windows\\path\\\\\" \\\"")
-set(windows_exp "a;b c;'d;e';\;;\\;c:\\windows\\path\\;\"")
-separate_arguments(windows_out WINDOWS_COMMAND "${windows_cmd}")
-
-foreach(mode old unix windows)
-  if(NOT "${${mode}_out}" STREQUAL "${${mode}_exp}")
-    message(FATAL_ERROR "separate_arguments ${mode}-style failed.  "
-      "Expected\n  [${${mode}_exp}]\nbut got\n  [${${mode}_out}]\n")
-  endif()
-endforeach()
-
-set(nothing)
-separate_arguments(nothing)
-if(DEFINED nothing)
-  message(FATAL_ERROR "separate_arguments null-case failed: "
-    "nothing=[${nothing}]")
-endif()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 7db5243..0e17bb3 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -216,6 +216,7 @@ add_RunCMake_test(list)
 add_RunCMake_test(message)
 add_RunCMake_test(project -DCMake_TEST_RESOURCES=${CMake_TEST_RESOURCES})
 add_RunCMake_test(return)
+add_RunCMake_test(separate_arguments)
 add_RunCMake_test(set_property)
 add_RunCMake_test(string)
 foreach(var
diff --git a/Tests/RunCMake/separate_arguments/CMakeLists.txt b/Tests/RunCMake/separate_arguments/CMakeLists.txt
new file mode 100644
index 0000000..2897109
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/separate_arguments/EmptyCommand.cmake b/Tests/RunCMake/separate_arguments/EmptyCommand.cmake
new file mode 100644
index 0000000..895b6ac
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/EmptyCommand.cmake
@@ -0,0 +1,6 @@
+set(nothing)
+separate_arguments(nothing)
+if(DEFINED nothing)
+  message(FATAL_ERROR "separate_arguments null-case failed: "
+    "nothing=[${nothing}]")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/PlainCommand.cmake b/Tests/RunCMake/separate_arguments/PlainCommand.cmake
new file mode 100644
index 0000000..311a993
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/PlainCommand.cmake
@@ -0,0 +1,8 @@
+set(old_out "a b  c")
+separate_arguments(old_out)
+set(old_exp "a;b;;c")
+
+if(NOT "${old_out}" STREQUAL "${old_exp}")
+  message(FATAL_ERROR "separate_arguments old-style failed.  "
+    "Expected\n  [${old_exp}]\nbut got\n  [${old_out}]\n")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake b/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
new file mode 100644
index 0000000..0917d87
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
@@ -0,0 +1,6 @@
+include(RunCMake)
+
+run_cmake(EmptyCommand)
+run_cmake(PlainCommand)
+run_cmake(UnixCommand)
+run_cmake(WindowsCommand)
diff --git a/Tests/RunCMake/separate_arguments/UnixCommand.cmake b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
new file mode 100644
index 0000000..0b5767a
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
@@ -0,0 +1,8 @@
+set(unix_cmd "a \"b c\" 'd e' \";\" \\ \\'\\\" '\\'' \"\\\"\"")
+set(unix_exp "a;b c;d e;\;; '\";';\"")
+separate_arguments(unix_out UNIX_COMMAND "${unix_cmd}")
+
+if(NOT "${unix_out}" STREQUAL "${unix_exp}")
+  message(FATAL_ERROR "separate_arguments unix-style failed.  "
+    "Expected\n  [${unix_exp}]\nbut got\n  [${unix_out}]\n")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
new file mode 100644
index 0000000..86aa14a
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
@@ -0,0 +1,8 @@
+set(windows_cmd "a \"b c\" 'd e' \";\" \\ \"c:\\windows\\path\\\\\" \\\"")
+set(windows_exp "a;b c;'d;e';\;;\\;c:\\windows\\path\\;\"")
+separate_arguments(windows_out WINDOWS_COMMAND "${windows_cmd}")
+
+if(NOT "${windows_out}" STREQUAL "${windows_exp}")
+  message(FATAL_ERROR "separate_arguments windows-style failed.  "
+    "Expected\n  [${windows_exp}]\nbut got\n  [${windows_out}]\n")
+endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c2ae38b0b25e7908c25ae939ba235dcaf336c39
commit 4c2ae38b0b25e7908c25ae939ba235dcaf336c39
Author:     Alex Turbov <i.zaufi at gmail.com>
AuthorDate: Sun Apr 23 21:19:37 2017 +0700
Commit:     Alex Turbov <i.zaufi at gmail.com>
CommitDate: Sun Apr 23 21:19:37 2017 +0700

    Boost Fiber actually require at least C++11.
    
    Some boost libraries may require particular set of compler features.
    The very first one was `boost::fiber` introduced in Boost 1.62.
    One can check required compiler features of it in
    `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 093d8c9..b2fb4b7 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -889,6 +889,33 @@ function(_Boost_MISSING_DEPENDENCIES componentvar extravar)
 endfunction()
 
 #
+# Some boost libraries may require particular set of compler features.
+# The very first one was `boost::fiber` introduced in Boost 1.62.
+# One can check required compiler features of it in
+# `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+#
+function(_Boost_COMPILER_FEATURES component _ret)
+  # Boost >= 1.62 and < 1.65
+  if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106500)
+    set(_Boost_FIBER_COMPILER_FEATURES
+        cxx_alias_templates
+        cxx_auto_type
+        cxx_constexpr
+        cxx_defaulted_functions
+        cxx_final
+        cxx_lambdas
+        cxx_noexcept
+        cxx_nullptr
+        cxx_rvalue_references
+        cxx_thread_local
+        cxx_variadic_templates
+    )
+  endif()
+  string(TOUPPER ${component} uppercomponent)
+  set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE)
+endfunction()
+
+#
 # Update library search directory hint variable with paths used by prebuilt boost binaries.
 #
 # Prebuilt windows binaries (https://sourceforge.net/projects/boost/files/boost-binaries/)
@@ -1640,6 +1667,9 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
 
   _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
 
+  # Check if component requires some compiler features
+  _Boost_COMPILER_FEATURES(${COMPONENT} _Boost_${UPPERCOMPONENT}_COMPILER_FEATURES)
+
 endforeach()
 
 # Restore the original find library ordering
@@ -1811,6 +1841,10 @@ if(Boost_FOUND)
           set_target_properties(Boost::${COMPONENT} PROPERTIES
             INTERFACE_LINK_LIBRARIES "${_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES}")
         endif()
+        if(_Boost_${UPPERCOMPONENT}_COMPILER_FEATURES)
+          set_target_properties(Boost::${COMPONENT} PROPERTIES
+            INTERFACE_COMPILE_FEATURES "${_Boost_${UPPERCOMPONENT}_COMPILER_FEATURES}")
+        endif()
       endif()
     endif()
   endforeach()

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

Summary of changes:
 Auxiliary/vim/syntax/cmake.vim                     |    2 +-
 Help/command/separate_arguments.rst                |    9 ++++--
 Help/release/dev/separgs-native.rst                |    5 +++
 Modules/CMakeParseImplicitLinkInfo.cmake           |    6 +---
 Modules/Compiler/XL-C.cmake                        |    3 +-
 Modules/Compiler/XL-CXX.cmake                      |    3 +-
 Modules/FindBoost.cmake                            |   34 ++++++++++++++++++++
 Modules/FindHDF5.cmake                             |    6 +---
 Modules/FindMPI.cmake                              |    3 +-
 Modules/FindOpenMP.cmake                           |    6 +---
 Modules/Platform/AIX-XL-C.cmake                    |    3 ++
 Modules/Platform/AIX-XL-CXX.cmake                  |    3 ++
 Modules/Platform/BlueGeneP-dynamic-XL-C.cmake      |    3 ++
 Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake    |    3 ++
 Modules/Platform/BlueGeneP-static-XL-C.cmake       |    3 ++
 Modules/Platform/BlueGeneP-static-XL-CXX.cmake     |    3 ++
 Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake      |    3 ++
 Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake    |    3 ++
 Modules/Platform/BlueGeneQ-static-XL-C.cmake       |    3 ++
 Modules/Platform/BlueGeneQ-static-XL-CXX.cmake     |    3 ++
 Modules/Platform/Darwin-XL-C.cmake                 |    3 ++
 Modules/Platform/Darwin-XL-CXX.cmake               |    3 ++
 Source/cmSeparateArgumentsCommand.cxx              |    7 ++++
 Tests/CMakeTests/CMakeLists.txt                    |    1 -
 Tests/CMakeTests/SeparateArgumentsTest.cmake.in    |   25 --------------
 Tests/FindOpenMP/Test/CMakeLists.txt               |    6 +---
 Tests/RunCMake/CMakeLists.txt                      |    1 +
 .../{CMP0054 => separate_arguments}/CMakeLists.txt |    0
 .../RunCMake/separate_arguments/EmptyCommand.cmake |    6 ++++
 .../separate_arguments/NativeCommand.cmake         |   19 +++++++++++
 .../RunCMake/separate_arguments/PlainCommand.cmake |    8 +++++
 .../RunCMake/separate_arguments/RunCMakeTest.cmake |    7 ++++
 .../RunCMake/separate_arguments/UnixCommand.cmake  |    8 +++++
 .../separate_arguments/WindowsCommand.cmake        |    8 +++++
 34 files changed, 153 insertions(+), 56 deletions(-)
 create mode 100644 Help/release/dev/separgs-native.rst
 delete mode 100644 Tests/CMakeTests/SeparateArgumentsTest.cmake.in
 copy Tests/RunCMake/{CMP0054 => separate_arguments}/CMakeLists.txt (100%)
 create mode 100644 Tests/RunCMake/separate_arguments/EmptyCommand.cmake
 create mode 100644 Tests/RunCMake/separate_arguments/NativeCommand.cmake
 create mode 100644 Tests/RunCMake/separate_arguments/PlainCommand.cmake
 create mode 100644 Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
 create mode 100644 Tests/RunCMake/separate_arguments/UnixCommand.cmake
 create mode 100644 Tests/RunCMake/separate_arguments/WindowsCommand.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list