[Cmake-commits] CMake branch, next, updated. v3.6.2-2503-g4994d67
Brad King
brad.king at kitware.com
Mon Sep 26 14:13:00 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 4994d675cfc9cc52c180dcf7b7fb1b0c8ec9bf40 (commit)
via 33ec71f343f8b508b16437cc282607d77b996df1 (commit)
from 930dec1e95061983dac19004e0bf5740339fe46b (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=4994d675cfc9cc52c180dcf7b7fb1b0c8ec9bf40
commit 4994d675cfc9cc52c180dcf7b7fb1b0c8ec9bf40
Merge: 930dec1 33ec71f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 26 14:12:59 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 26 14:12:59 2016 -0400
Merge topic 'find-matlab-pthread' into next
33ec71f3 FindMatlab: Fix -pthread check for projects with only C enabled
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33ec71f343f8b508b16437cc282607d77b996df1
commit 33ec71f343f8b508b16437cc282607d77b996df1
Author: Jamie Snape <jamie.snape at kitware.com>
AuthorDate: Mon Sep 26 13:59:37 2016 -0400
Commit: Jamie Snape <jamie.snape at kitware.com>
CommitDate: Mon Sep 26 13:59:37 2016 -0400
FindMatlab: Fix -pthread check for projects with only C enabled
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 8b41bb9..d016848 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -225,6 +225,7 @@ set(_FindMatlab_SELF_DIR "${CMAKE_CURRENT_LIST_DIR}")
include(FindPackageHandleStandardArgs)
include(CheckCXXCompilerFlag)
+include(CheckCCompilerFlag)
# The currently supported versions. Other version can be added by the user by
@@ -871,7 +872,11 @@ function(matlab_add_mex)
if(NOT WIN32)
# we do not need all this on Windows
# pthread options
- check_cxx_compiler_flag(-pthread HAS_MINUS_PTHREAD)
+ if(CMAKE_CXX_COMPILER_LOADED)
+ check_cxx_compiler_flag(-pthread HAS_MINUS_PTHREAD)
+ elseif(CMAKE_C_COMPILER_LOADED)
+ check_c_compiler_flag(-pthread HAS_MINUS_PTHREAD)
+ endif()
# we should use try_compile instead, the link flags are discarded from
# this compiler_flag function.
#check_cxx_compiler_flag(-Wl,--exclude-libs,ALL HAS_SYMBOL_HIDING_CAPABILITY)
-----------------------------------------------------------------------
Summary of changes:
Modules/FindMatlab.cmake | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list