[Cmake-commits] CMake branch, next, updated. v3.8.0-rc4-676-g10cbfde
Kitware Robot
kwrobot at kitware.com
Tue Apr 4 10:55:05 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, next has been updated
via 10cbfde1c137f493fb15eaa53cdeeae55e25ce38 (commit)
via eb201aa001e187968b4977c4211ea13ada9ec991 (commit)
via 9f41bfd7b9e6e8a7545f741f872949d2ae801978 (commit)
via 87199ea66b171708736e85989bf9b0af89a805c1 (commit)
via c92fd25661c08ff991a2482b8a5e42c8490cb3c2 (commit)
from c42a6b5c9371cd4cf89b8827cac7b3c630760c5c (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=10cbfde1c137f493fb15eaa53cdeeae55e25ce38
commit 10cbfde1c137f493fb15eaa53cdeeae55e25ce38
Merge: eb201aa 87199ea
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 4 14:47:40 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Apr 4 10:47:43 2017 -0400
Stage topic 'CheckIPOSupported-Fortran'
Topic-id: 23445
Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/655
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb201aa001e187968b4977c4211ea13ada9ec991
commit eb201aa001e187968b4977c4211ea13ada9ec991
Merge: c42a6b5 9f41bfd
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 4 14:45:33 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Apr 4 10:45:39 2017 -0400
Stage topic 'FindCUDA-tll-keywords'
Topic-id: 23471
Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/663
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f41bfd7b9e6e8a7545f741f872949d2ae801978
commit 9f41bfd7b9e6e8a7545f741f872949d2ae801978
Author: Taylor Braun-Jones <taylor at braun-jones.org>
AuthorDate: Mon Apr 3 19:04:14 2017 -0400
Commit: Taylor Braun-Jones <taylor at braun-jones.org>
CommitDate: Tue Apr 4 09:43:05 2017 -0400
FindCUDA: Add option to use modern form of target_link_libraries
This adds the option CUDA_LINK_LIBRARIES_KEYWORD which can be set to PRIVATE,
PUBLIC, or INTERFACE or left empty (the default) to use the old form of
target_link_libraries internally in FindCUDA macros.
Fixes: #16772
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 6b76c25..e323430 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -67,6 +67,13 @@
# -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
# when CUDA_BUILD_EMULATION is TRUE.
#
+# CUDA_LINK_LIBRARIES_KEYWORD (Default "")
+# -- The <PRIVATE|PUBLIC|INTERFACE> keyword to use for internal
+# target_link_libraries calls. The default is to use no keyword which
+# uses the old "plain" form of target_link_libraries. Note that is matters
+# because whatever is used inside the FindCUDA module must also be used
+# outside - the two forms of target_link_libraries cannot be mixed.
+#
# CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
# -- Set to the path you wish to have the generated files placed. If it is
# blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
@@ -1740,12 +1747,12 @@ macro(CUDA_ADD_LIBRARY cuda_target)
# variable will have been defined.
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}")
- target_link_libraries(${cuda_target}
+ target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD}
${CUDA_LIBRARIES}
)
if(CUDA_SEPARABLE_COMPILATION)
- target_link_libraries(${cuda_target}
+ target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD}
${CUDA_cudadevrt_LIBRARY}
)
endif()
@@ -1790,7 +1797,7 @@ macro(CUDA_ADD_EXECUTABLE cuda_target)
# variable will have been defined.
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}")
- target_link_libraries(${cuda_target}
+ target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD}
${CUDA_LIBRARIES}
)
@@ -1876,9 +1883,9 @@ endmacro()
###############################################################################
macro(CUDA_ADD_CUFFT_TO_TARGET target)
if (CUDA_BUILD_EMULATION)
- target_link_libraries(${target} ${CUDA_cufftemu_LIBRARY})
+ target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufftemu_LIBRARY})
else()
- target_link_libraries(${target} ${CUDA_cufft_LIBRARY})
+ target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufft_LIBRARY})
endif()
endmacro()
@@ -1889,9 +1896,9 @@ endmacro()
###############################################################################
macro(CUDA_ADD_CUBLAS_TO_TARGET target)
if (CUDA_BUILD_EMULATION)
- target_link_libraries(${target} ${CUDA_cublasemu_LIBRARY})
+ target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublasemu_LIBRARY})
else()
- target_link_libraries(${target} ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY})
+ target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY})
endif()
endmacro()
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87199ea66b171708736e85989bf9b0af89a805c1
commit 87199ea66b171708736e85989bf9b0af89a805c1
Author: Ruslan Baratov <ruslan_baratov at yahoo.com>
AuthorDate: Sun Apr 2 21:41:33 2017 +0800
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 4 09:35:39 2017 -0400
CheckIPOSupported: Add Fortran support
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index f0e476a..712a95e 100644
--- a/Modules/CheckIPOSupported.cmake
+++ b/Modules/CheckIPOSupported.cmake
@@ -93,11 +93,14 @@ macro(_ipo_run_language_check language)
string(COMPARE EQUAL "${language}" "C" is_c)
string(COMPARE EQUAL "${language}" "CXX" is_cxx)
+ string(COMPARE EQUAL "${language}" "Fortran" is_fortran)
if(is_c)
set(copy_sources foo.c main.c)
elseif(is_cxx)
set(copy_sources foo.cpp main.cpp)
+ elseif(is_fortran)
+ set(copy_sources foo.f main.f)
else()
message(FATAL_ERROR "Language not supported")
endif()
@@ -204,12 +207,6 @@ function(check_ipo_supported)
endif()
endif()
- list(FIND languages "Fortran" result)
- if(NOT result EQUAL -1)
- _ipo_not_supported("Fortran is not supported")
- return()
- endif()
-
if(NOT _CMAKE_IPO_SUPPORTED_BY_CMAKE)
_ipo_not_supported("CMake doesn't support IPO for current compiler")
return()
diff --git a/Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in b/Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in
new file mode 100644
index 0000000..9fab077
--- /dev/null
+++ b/Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION "@CMAKE_VERSION@")
+project("@TRY_COMPILE_PROJECT_NAME@" LANGUAGES Fortran)
+
+cmake_policy(SET CMP0069 NEW)
+
+add_library(foo foo.f)
+add_executable(boo main.f)
+target_link_libraries(boo PUBLIC foo)
diff --git a/Modules/CheckIPOSupported/foo.f b/Modules/CheckIPOSupported/foo.f
new file mode 100644
index 0000000..945d2d5
--- /dev/null
+++ b/Modules/CheckIPOSupported/foo.f
@@ -0,0 +1,2 @@
+ SUBROUTINE FOO
+ END
diff --git a/Modules/CheckIPOSupported/main.f b/Modules/CheckIPOSupported/main.f
new file mode 100644
index 0000000..9d1de9f
--- /dev/null
+++ b/Modules/CheckIPOSupported/main.f
@@ -0,0 +1,3 @@
+ PROGRAM BOO
+ CALL FOO()
+ END
diff --git a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake
index 812f79b..588a75d 100644
--- a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake
@@ -2,7 +2,6 @@ include(RunCMake)
run_cmake(unparsed-arguments)
run_cmake(user-lang-unknown)
-run_cmake(user-lang-fortran)
run_cmake(default-lang-none)
run_cmake(not-supported-by-cmake)
run_cmake(not-supported-by-compiler)
diff --git a/Tests/RunCMake/CheckIPOSupported/user-lang-fortran-result.txt b/Tests/RunCMake/CheckIPOSupported/user-lang-fortran-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/CheckIPOSupported/user-lang-fortran-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/CheckIPOSupported/user-lang-fortran-stderr.txt b/Tests/RunCMake/CheckIPOSupported/user-lang-fortran-stderr.txt
deleted file mode 100644
index 2cb595d..0000000
--- a/Tests/RunCMake/CheckIPOSupported/user-lang-fortran-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\):
- IPO is not supported \(Fortran is not supported\)\.
-Call Stack \(most recent call first\):
- .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\)
- user-lang-fortran\.cmake:[0-9]+ \(check_ipo_supported\)
- CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CheckIPOSupported/user-lang-fortran.cmake b/Tests/RunCMake/CheckIPOSupported/user-lang-fortran.cmake
deleted file mode 100644
index 275dbd9..0000000
--- a/Tests/RunCMake/CheckIPOSupported/user-lang-fortran.cmake
+++ /dev/null
@@ -1 +0,0 @@
-check_ipo_supported(LANGUAGES "Fortran")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c92fd25661c08ff991a2482b8a5e42c8490cb3c2
commit c92fd25661c08ff991a2482b8a5e42c8490cb3c2
Author: Ruslan Baratov <ruslan_baratov at yahoo.com>
AuthorDate: Tue Apr 4 12:38:40 2017 +0800
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 4 09:35:31 2017 -0400
CheckIPOSupported: Move '_CMakeLTOTest-*' under 'CMakeFiles'
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index 31c1bd3..f0e476a 100644
--- a/Modules/CheckIPOSupported.cmake
+++ b/Modules/CheckIPOSupported.cmake
@@ -67,7 +67,7 @@ endmacro()
# Run IPO/LTO test
macro(_ipo_run_language_check language)
- set(testdir "${CMAKE_CURRENT_BINARY_DIR}/_CMakeLTOTest-${language}")
+ set(testdir "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/_CMakeLTOTest-${language}")
file(REMOVE_RECURSE "${testdir}")
file(MAKE_DIRECTORY "${testdir}")
-----------------------------------------------------------------------
Summary of changes:
Modules/CheckIPOSupported.cmake | 11 ++++------
...akeLists-C.txt.in => CMakeLists-Fortran.txt.in} | 6 +++---
Modules/CheckIPOSupported/foo.f | 2 ++
Modules/CheckIPOSupported/main.f | 3 +++
Modules/FindCUDA.cmake | 21 +++++++++++++-------
.../RunCMake/CheckIPOSupported/RunCMakeTest.cmake | 1 -
.../CheckIPOSupported/user-lang-fortran-result.txt | 1 -
.../CheckIPOSupported/user-lang-fortran-stderr.txt | 6 ------
.../CheckIPOSupported/user-lang-fortran.cmake | 1 -
9 files changed, 26 insertions(+), 26 deletions(-)
copy Modules/CheckIPOSupported/{CMakeLists-C.txt.in => CMakeLists-Fortran.txt.in} (53%)
create mode 100644 Modules/CheckIPOSupported/foo.f
create mode 100644 Modules/CheckIPOSupported/main.f
delete mode 100644 Tests/RunCMake/CheckIPOSupported/user-lang-fortran-result.txt
delete mode 100644 Tests/RunCMake/CheckIPOSupported/user-lang-fortran-stderr.txt
delete mode 100644 Tests/RunCMake/CheckIPOSupported/user-lang-fortran.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list