diff options
-rw-r--r-- | CONTRIBUTING.rst | 14 | ||||
-rw-r--r-- | Help/dev/testing.rst | 3 | ||||
-rw-r--r-- | Help/release/dev/FindMatlab-mcc.rst | 5 | ||||
-rw-r--r-- | Modules/Compiler/XL.cmake | 1 | ||||
-rw-r--r-- | Modules/FindCUDA/select_compute_arch.cmake | 5 | ||||
-rw-r--r-- | Modules/FindMatlab.cmake | 25 | ||||
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/Checks/cm_cxx14_check.cmake | 2 | ||||
-rw-r--r-- | Source/Checks/cm_cxx14_check.cpp | 5 | ||||
-rw-r--r-- | Source/Checks/cm_cxx17_check.cmake | 2 | ||||
-rw-r--r-- | Source/Checks/cm_cxx17_check.cpp | 4 | ||||
-rw-r--r-- | Source/cmFileCommand.cxx | 14 | ||||
-rw-r--r-- | Source/cmWriteFileCommand.cxx | 14 |
14 files changed, 79 insertions, 21 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 01987be..9e67703 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -47,6 +47,20 @@ The merge request will enter the `CMake Review Process`_ for consideration. .. _`commit messages`: Help/dev/review.rst#commit-messages .. _`CMake Review Process`: Help/dev/review.rst +CMake Dashboard Client +====================== + +The *integration testing* step of the `CMake Review Process`_ uses a set of +testing machines that follow an integration branch on their own schedule to +drive testing and submit results to the `CMake CDash Page`_. Anyone is +welcome to provide testing machines in order to help keep support for their +platforms working. + +See documentation on `CMake Testing Process`_ for more information. + +.. _`CMake CDash Page`: https://open.cdash.org/index.php?project=CMake +.. _`CMake Testing Process`: Help/dev/testing.rst + License ======= diff --git a/Help/dev/testing.rst b/Help/dev/testing.rst index 1b29acf..23d0ca3 100644 --- a/Help/dev/testing.rst +++ b/Help/dev/testing.rst @@ -26,13 +26,14 @@ commands to set up a new integration testing client: $ git clone https://gitlab.kitware.com/cmake/dashboard-scripts.git CMakeScripts $ cd CMakeScripts -The ``cmake_common.cmake`` script contains comments at the top with +The `cmake_common.cmake`_ script contains comments at the top with instructions to set up a testing client. As it instructs, create a CTest script with local settings and include ``cmake_common.cmake``. .. _`CMake Review Process`: review.rst .. _`CMake CDash Page`: https://open.cdash.org/index.php?project=CMake .. _`CMake Dashboard Scripts Repository`: https://gitlab.kitware.com/cmake/dashboard-scripts +.. _`cmake_common.cmake`: https://gitlab.kitware.com/cmake/dashboard-scripts/blob/master/cmake_common.cmake Nightly Start Time ------------------ diff --git a/Help/release/dev/FindMatlab-mcc.rst b/Help/release/dev/FindMatlab-mcc.rst new file mode 100644 index 0000000..71387f3 --- /dev/null +++ b/Help/release/dev/FindMatlab-mcc.rst @@ -0,0 +1,5 @@ +FindMatlab-mcc +-------------- + +* The :module:`FindMatlab` module gained a new ``MCC_COMPILER`` + component to request finding the Matlab Compiler add-on. diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake index a1d7ca1..21fe5e8 100644 --- a/Modules/Compiler/XL.cmake +++ b/Modules/Compiler/XL.cmake @@ -20,6 +20,7 @@ macro(__compiler_xl lang) # Feature flags. set(CMAKE_${lang}_VERBOSE_FLAG "-V") set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic") + set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-qpic") set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-qoptfile=") set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-qoptfile=") diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake index 22c04df..cf4fc39 100644 --- a/Modules/FindCUDA/select_compute_arch.cmake +++ b/Modules/FindCUDA/select_compute_arch.cmake @@ -18,8 +18,9 @@ # if(CMAKE_CUDA_COMPILER_LOADED) # CUDA as a language - if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") - set(CUDA_VERSION "${CMAKE_CUDA_COMPILER_VERSION}") + if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" + AND CMAKE_CUDA_COMPILER_VERSION MATCHES "^([0-9]+\\.[0-9]+)") + set(CUDA_VERSION "${CMAKE_MATCH_1}") endif() endif() diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 54e62db..9e13fc3 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -25,6 +25,7 @@ # available on the MCR version, and will yield an error if the MCR is found # instead of the regular Matlab installation. # * ``MEX_COMPILER`` the MEX compiler. +# * ``MCC_COMPILER`` the MCC compiler, included with the Matlab Compiler add-on. # * ``SIMULINK`` the Simulink environment. # # .. note:: @@ -110,7 +111,10 @@ # the whole set of libraries of Matlab # ``Matlab_MEX_COMPILER`` # the mex compiler of Matlab. Currently not used. -# Available only if the component ``MEX_COMPILER`` is asked +# Available only if the component ``MEX_COMPILER`` is requested. +# ``Matlab_MCC_COMPILER`` +# the mcc compiler of Matlab. Included with the Matlab Compiler add-on. +# Available only if the component ``MCC_COMPILER`` is requested. # # Cached variables # """""""""""""""" @@ -1369,7 +1373,7 @@ else() # if the user does not specify the possible installation root, we look for # one installation using the appropriate heuristics. # There is apparently no standard way on Linux. - if(WIN32) + if(CMAKE_HOST_WIN32) _Matlab_find_instances_win32(_matlab_possible_roots_win32) list(APPEND _matlab_possible_roots ${_matlab_possible_roots_win32}) elseif(APPLE) @@ -1420,6 +1424,7 @@ if(DEFINED Matlab_ROOT_DIR_LAST_CACHED) Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY Matlab_MEX_COMPILER + Matlab_MCC_COMPILER Matlab_MAIN_PROGRAM Matlab_MX_LIBRARY Matlab_ENG_LIBRARY @@ -1660,6 +1665,22 @@ if(_matlab_find_simulink GREATER -1) endif() unset(_matlab_find_simulink) +# component MCC Compiler +list(FIND Matlab_FIND_COMPONENTS MCC_COMPILER _matlab_find_mcc_compiler) +if(_matlab_find_mcc_compiler GREATER -1) + find_program( + Matlab_MCC_COMPILER + "mcc" + PATHS ${Matlab_BINARIES_DIR} + DOC "Matlab MCC compiler" + NO_DEFAULT_PATH + ) + if(Matlab_MCC_COMPILER) + set(Matlab_MCC_COMPILER_FOUND TRUE) + endif() +endif() +unset(_matlab_find_mcc_compiler) + unset(_matlab_lib_dir_for_search) set(Matlab_LIBRARIES ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} ${Matlab_ENG_LIBRARY} ${Matlab_MAT_LIBRARY}) @@ -6,10 +6,12 @@ Introduction CMake is a cross-platform, open-source build system generator. For full documentation visit the `CMake Home Page`_ and the -`CMake Documentation Page`_. +`CMake Documentation Page`_. The `CMake Community Wiki`_ also +references useful guides and recipes. .. _`CMake Home Page`: https://cmake.org .. _`CMake Documentation Page`: https://cmake.org/cmake/help/documentation.html +.. _`CMake Community Wiki`: https://gitlab.kitware.com/cmake/community/wikis/home CMake is maintained and supported by `Kitware`_ and developed in collaboration with a productive community of contributors. diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7e3e33b..209769e 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 12) -set(CMake_VERSION_PATCH 20180801) +set(CMake_VERSION_PATCH 20180806) #set(CMake_VERSION_RC 1) diff --git a/Source/Checks/cm_cxx14_check.cmake b/Source/Checks/cm_cxx14_check.cmake index a78ba35..38606b9 100644 --- a/Source/Checks/cm_cxx14_check.cmake +++ b/Source/Checks/cm_cxx14_check.cmake @@ -1,5 +1,5 @@ set(CMake_CXX14_BROKEN 0) -if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI") if(NOT CMAKE_CXX14_STANDARD_COMPILE_OPTION) set(CMake_CXX14_WORKS 0) endif() diff --git a/Source/Checks/cm_cxx14_check.cpp b/Source/Checks/cm_cxx14_check.cpp index f5806a9..9369ba2 100644 --- a/Source/Checks/cm_cxx14_check.cpp +++ b/Source/Checks/cm_cxx14_check.cpp @@ -1,5 +1,8 @@ #include <cstdio> +#include <memory> + int main() { - return 0; + std::unique_ptr<int> u(new int(0)); + return *u; } diff --git a/Source/Checks/cm_cxx17_check.cmake b/Source/Checks/cm_cxx17_check.cmake index 83d3971..4da2fd7 100644 --- a/Source/Checks/cm_cxx17_check.cmake +++ b/Source/Checks/cm_cxx17_check.cmake @@ -1,5 +1,5 @@ set(CMake_CXX17_BROKEN 0) -if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI") if(NOT CMAKE_CXX17_STANDARD_COMPILE_OPTION) set(CMake_CXX17_WORKS 0) endif() diff --git a/Source/Checks/cm_cxx17_check.cpp b/Source/Checks/cm_cxx17_check.cpp index 2cbf1d5..4e89184 100644 --- a/Source/Checks/cm_cxx17_check.cpp +++ b/Source/Checks/cm_cxx17_check.cpp @@ -1,7 +1,9 @@ #include <cstdio> +#include <memory> #include <unordered_map> int main() { - return 0; + std::unique_ptr<int> u(new int(0)); + return *u; } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 4c288f5..402ceb2 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -208,16 +208,20 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args, cmSystemTools::MakeDirectory(dir); mode_t mode = 0; + bool writable = false; // Set permissions to writable if (cmSystemTools::GetPermissions(fileName.c_str(), mode)) { - cmSystemTools::SetPermissions(fileName.c_str(), #if defined(_MSC_VER) || defined(__MINGW32__) - mode | S_IWRITE + writable = mode & S_IWRITE; + mode_t newMode = mode | S_IWRITE; #else - mode | S_IWUSR | S_IWGRP + writable = mode & S_IWUSR; + mode_t newMode = mode | S_IWUSR | S_IWGRP; #endif - ); + if (!writable) { + cmSystemTools::SetPermissions(fileName.c_str(), newMode); + } } // If GetPermissions fails, pretend like it is ok. File open will fail if // the file is not writable @@ -242,7 +246,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args, return false; } file.close(); - if (mode) { + if (mode && !writable) { cmSystemTools::SetPermissions(fileName.c_str(), mode); } return true; diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index d3d2db0..c504ef4 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -45,16 +45,20 @@ bool cmWriteFileCommand::InitialPass(std::vector<std::string> const& args, cmSystemTools::MakeDirectory(dir); mode_t mode = 0; + bool writable = false; // Set permissions to writable if (cmSystemTools::GetPermissions(fileName.c_str(), mode)) { - cmSystemTools::SetPermissions(fileName.c_str(), #if defined(_MSC_VER) || defined(__MINGW32__) - mode | S_IWRITE + writable = mode & S_IWRITE; + mode_t newMode = mode | S_IWRITE; #else - mode | S_IWUSR | S_IWGRP + writable = mode & S_IWUSR; + mode_t newMode = mode | S_IWUSR | S_IWGRP; #endif - ); + if (!writable) { + cmSystemTools::SetPermissions(fileName.c_str(), newMode); + } } // If GetPermissions fails, pretend like it is ok. File open will fail if // the file is not writable @@ -69,7 +73,7 @@ bool cmWriteFileCommand::InitialPass(std::vector<std::string> const& args, } file << message << std::endl; file.close(); - if (mode) { + if (mode && !writable) { cmSystemTools::SetPermissions(fileName.c_str(), mode); } |