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  23a450044d4d5b3cb314085daf8c42e657b4e132 (commit)
       via  847ae3882e04e5d5e350da8944e6ed0cf896769d (commit)
       via  4edf0d68eef8849a1c352488e0c42d855d0e8213 (commit)
       via  2da36984475678858885ab35c2711726c710f4e1 (commit)
      from  13f19f747230fa2ce414084d1e3a94eb225dbaa1 (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=23a450044d4d5b3cb314085daf8c42e657b4e132
commit 23a450044d4d5b3cb314085daf8c42e657b4e132
Merge: 847ae38 4edf0d6
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Apr 9 15:19:43 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Apr 9 11:20:19 2018 -0400

    Merge topic 'test-CompileFeatures-simplify'
    
    4edf0d68ee Tests: Simplify CompileFeatures expectation logic
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1939


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=847ae3882e04e5d5e350da8944e6ed0cf896769d
commit 847ae3882e04e5d5e350da8944e6ed0cf896769d
Merge: 13f19f7 2da3698
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Apr 9 15:19:32 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Apr 9 11:19:44 2018 -0400

    Merge topic 'FindCUDA-nvcc-clcache-support'
    
    2da3698447 FindCUDA: Add support for clcache
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1933


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4edf0d68eef8849a1c352488e0c42d855d0e8213
commit 4edf0d68eef8849a1c352488e0c42d855d0e8213
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Apr 6 13:32:11 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Apr 6 14:45:58 2018 -0400

    Tests: Simplify CompileFeatures expectation logic
    
    Rather than repeating compiler version checks for feature availability,
    generate genex expectations using the detect list of features.  We
    already separately verify that the list of features is correct.

diff --git a/Tests/CompileFeatures/CMakeLists.txt 
b/Tests/CompileFeatures/CMakeLists.txt
index e94473f..b0bc656 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -224,69 +224,22 @@ if (C_expected_features)
   add_executable(CompileFeaturesGenex_C genex_test.c)
   set_property(TARGET CompileFeaturesGenex_C PROPERTY C_STANDARD 11)
 
-  if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
-    if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
-      list(APPEND expected_defs
-        EXPECT_C_RESTRICT=1
-        EXPECT_C_STATIC_ASSERT=1
-      )
-    else()
-      list(APPEND expected_defs
-        EXPECT_C_RESTRICT=1
-        EXPECT_C_STATIC_ASSERT=0
-      )
-    endif()
-  elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang"
-      OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
-    list(APPEND expected_defs
-      EXPECT_C_RESTRICT=1
-      EXPECT_C_STATIC_ASSERT=1
-    )
-  elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel")
-    if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15)
-      list(APPEND expected_defs
-        EXPECT_C_RESTRICT=1
-        EXPECT_C_STATIC_ASSERT=1
-        )
-    else()
-      list(APPEND expected_defs
-        EXPECT_C_RESTRICT=1
-        EXPECT_C_STATIC_ASSERT=0
-        )
-    endif()
-  elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
-    list(APPEND expected_defs
-      EXPECT_C_RESTRICT=0
-      EXPECT_C_STATIC_ASSERT=0
+  foreach(f
+      c_restrict
+      c_static_assert
+      c_function_prototypes
       )
-  elseif (CMAKE_C_COMPILER_ID STREQUAL "SunPro")
-    if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.13)
-      list(APPEND expected_defs
-        EXPECT_C_RESTRICT=1
-        EXPECT_C_STATIC_ASSERT=1
-        )
+    if(${f} IN_LIST C_expected_features)
+      set(expect_${f} 1)
     else()
-      list(APPEND expected_defs
-        EXPECT_C_RESTRICT=1
-        EXPECT_C_STATIC_ASSERT=0
-        )
+      set(expect_${f} 0)
     endif()
-  else()
-    list(APPEND expected_defs
-      EXPECT_C_RESTRICT=1
+    string(TOUPPER "${f}" F)
+    target_compile_definitions(CompileFeaturesGenex_C PRIVATE
+      EXPECT_${F}=${expect_${f}}
+      HAVE_${F}=$<COMPILE_FEATURES:${f}>
       )
-  endif()
-
-  list(APPEND expected_defs
-    EXPECT_C_FUNCTION_PROTOTYPES=1
-  )
-
-  target_compile_definitions(CompileFeaturesGenex_C PRIVATE
-    HAVE_C_FUNCTION_PROTOTYPES=$<COMPILE_FEATURES:c_function_prototypes>
-    HAVE_C_RESTRICT=$<COMPILE_FEATURES:c_restrict>
-    HAVE_C_STATIC_ASSERT=$<COMPILE_FEATURES:c_static_assert>
-    ${expected_defs}
-  )
+  endforeach()
 endif()
 
 if (CMAKE_CXX_COMPILE_FEATURES)
@@ -334,118 +287,43 @@ else()
   add_executable(IfaceCompileFeatures main.cpp)
   target_link_libraries(IfaceCompileFeatures iface)
 
-  if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=1
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
-      )
-    elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
+  foreach(f
+      cxx_final
+      cxx_override
+      cxx_auto_type
+      cxx_inheriting_constructors
       )
+    if(${f} IN_LIST CXX_expected_features)
+      set(expect_${f} 1)
     else()
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=0
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=0
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
-      )
-    endif()
-  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    add_definitions(
-      -DEXPECT_OVERRIDE_CONTROL=1
-      -DEXPECT_INHERITING_CONSTRUCTORS=1
-      -DEXPECT_FINAL=1
-      -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
-    )
-  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=1
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
-      )
-    else()
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
-      )
-    endif()
-  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=1
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
-      )
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
-      )
-    else()
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=0
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=0
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
-      )
-    endif()
-  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
-    add_definitions(
-      -DEXPECT_OVERRIDE_CONTROL=1
-      -DEXPECT_INHERITING_CONSTRUCTORS=1
-      -DEXPECT_FINAL=1
-      -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
-    )
-  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=1
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
-      )
-    elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=1
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
-      )
-    else()
-      add_definitions(
-        -DEXPECT_OVERRIDE_CONTROL=0
-        -DEXPECT_INHERITING_CONSTRUCTORS=0
-        -DEXPECT_FINAL=0
-        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
-      )
+      set(expect_${f} 0)
     endif()
+  endforeach()
+
+  if(expect_cxx_final AND expect_cxx_override)
+    set(expect_override_control 1)
+  else()
+    set(expect_override_control 0)
+  endif()
+  if(expect_cxx_inheriting_constructors AND expect_cxx_final)
+    set(expect_inheriting_constructors_and_final 1)
+  else()
+    set(expect_inheriting_constructors_and_final 0)
   endif()
 
-  add_executable(CompileFeaturesGenex genex_test.cpp)
-  set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11)
-  target_compile_definitions(CompileFeaturesGenex PRIVATE
+  set(genex_test_defs
     HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
     HAVE_AUTO_TYPE=$<COMPILE_FEATURES:cxx_auto_type>
     
HAVE_INHERITING_CONSTRUCTORS=$<COMPILE_FEATURES:cxx_inheriting_constructors>
     HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
     
HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
-  )
+    EXPECT_OVERRIDE_CONTROL=${expect_override_control}
+    EXPECT_INHERITING_CONSTRUCTORS=${expect_cxx_inheriting_constructors}
+    EXPECT_FINAL=${expect_cxx_final}
+    
EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=${expect_inheriting_constructors_and_final}
+    )
   if (CMAKE_CXX_STANDARD_DEFAULT)
-    target_compile_definitions(CompileFeaturesGenex PRIVATE
+    list(APPEND genex_test_defs
       TEST_CXX_STD
       HAVE_CXX_STD_11=$<COMPILE_FEATURES:cxx_std_11>
       HAVE_CXX_STD_14=$<COMPILE_FEATURES:cxx_std_14>
@@ -454,25 +332,17 @@ else()
     )
   endif()
 
+  add_executable(CompileFeaturesGenex genex_test.cpp)
+  set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11)
+  target_compile_definitions(CompileFeaturesGenex PRIVATE ${genex_test_defs})
+
   add_executable(CompileFeaturesGenex2 genex_test.cpp)
   target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_std_11)
-  target_compile_definitions(CompileFeaturesGenex2 PRIVATE
-    HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
-    HAVE_AUTO_TYPE=$<COMPILE_FEATURES:cxx_auto_type>
-    
HAVE_INHERITING_CONSTRUCTORS=$<COMPILE_FEATURES:cxx_inheriting_constructors>
-    HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
-    
HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
-  )
+  target_compile_definitions(CompileFeaturesGenex2 PRIVATE ${genex_test_defs})
 
   add_library(std_11_iface INTERFACE)
   target_compile_features(std_11_iface INTERFACE cxx_std_11)
   add_executable(CompileFeaturesGenex3 genex_test.cpp)
   target_link_libraries(CompileFeaturesGenex3 PRIVATE std_11_iface)
-  target_compile_definitions(CompileFeaturesGenex3 PRIVATE
-    HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
-    HAVE_AUTO_TYPE=$<COMPILE_FEATURES:cxx_auto_type>
-    
HAVE_INHERITING_CONSTRUCTORS=$<COMPILE_FEATURES:cxx_inheriting_constructors>
-    HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
-    
HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
-  )
+  target_compile_definitions(CompileFeaturesGenex3 PRIVATE ${genex_test_defs})
 endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2da36984475678858885ab35c2711726c710f4e1
commit 2da36984475678858885ab35c2711726c710f4e1
Author:     Edward Z. Yang <ezy...@fb.com>
AuthorDate: Wed Apr 4 15:07:16 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Apr 6 11:21:34 2018 -0400

    FindCUDA: Add support for clcache
    
    When `CMAKE_C_COMPILER` is `clcache`, pass plain `cl` as the host
    compiler to `nvcc`.  Otherwise, `nvcc` does not accept it.
    
    Signed-off-by: Edward Z. Yang <ezy...@fb.com>

diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 6f6f349..a0e4aa9 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -557,6 +557,11 @@ else()
       set(c_compiler_realpath "")
     endif()
     set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side 
compiler used by NVCC")
+  elseif(MSVC AND "${CMAKE_C_COMPILER}" MATCHES "clcache")
+    # NVCC does not think it will work if it is passed clcache.exe as the host
+    # compiler, which means that builds with CC=cl.exe won't work.  Best to 
just
+    # feed it whatever the actual cl.exe is as the host compiler.
+    set(CUDA_HOST_COMPILER "cl.exe" CACHE FILEPATH "Host side compiler used by 
NVCC")
   else()
     set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}"
       CACHE FILEPATH "Host side compiler used by NVCC")

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

Summary of changes:
 Modules/FindCUDA.cmake               |    5 +
 Tests/CompileFeatures/CMakeLists.txt |  218 +++++++---------------------------
 2 files changed, 49 insertions(+), 174 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to