endif()
set(cuda_tools "CUDA ${CMAKE_VS_PLATFORM_TOOLSET_CUDA}")
set(id_compile "CudaCompile")
- set(id_ItemDefinitionGroup_entry "<CudaCompile><AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions></CudaCompile>")
+ if(CMAKE_VS_PLATFORM_NAME STREQUAL x64)
+ set(cuda_target "<TargetMachinePlatform>64</TargetMachinePlatform>")
+ endif()
+ foreach(arch ${CMAKE_CUDA_ARCHITECTURES})
+ string(REGEX MATCH "[0-9]+" arch_name "${arch}")
+ string(APPEND cuda_codegen "compute_${arch_name},sm_${arch_name};")
+ endforeach()
+ set(id_ItemDefinitionGroup_entry "<CudaCompile>${cuda_target}<AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions><CodeGeneration>${cuda_codegen}</CodeGeneration></CudaCompile>")
set(id_PostBuildEvent_Command [[echo CMAKE_CUDA_COMPILER=$(CudaToolkitBinDir)\nvcc.exe]])
if(CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR)
set(id_CudaToolkitCustomDir "<CudaToolkitCustomDir>${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}nvcc</CudaToolkitCustomDir>")
string(CONCAT id_Import_props [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.props" />]])
string(CONCAT id_Import_targets [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.targets" />]])
endif()
- if(CMAKE_VS_PLATFORM_NAME STREQUAL x64)
- set(id_ItemDefinitionGroup_entry "<CudaCompile><TargetMachinePlatform>64</TargetMachinePlatform><AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions></CudaCompile>")
- endif()
if(CMAKE_CUDA_FLAGS MATCHES "(^| )-cudart +shared( |$)")
set(id_Link_AdditionalDependencies "<AdditionalDependencies>cudart.lib</AdditionalDependencies>")
else()
list (REMOVE_DUPLICATES _values)
elseif (NAME STREQUAL "SOABI")
# clean-up: remove prefix character and suffix
- string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
+ if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$")
+ set(_values "")
+ else()
+ string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
+ endif()
endif()
endif()
endif()
endforeach()
if (_values)
# clean-up: remove prefix character and suffix
- string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
+ if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$")
+ set(_values "")
+ else()
+ string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
+ endif()
endif()
endif()
else()
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 18)
-set(CMake_VERSION_PATCH 5)
+set(CMake_VERSION_PATCH 6)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
- set(git_info [==[1a059d91af CMake 3.18.5]==])
+ set(git_info [==[0e1dba36c3 CMake 3.18.6]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
// Skip some ninja tools if they need 'build.ninja' but it is missing.
bool const missingBuildManifest = expectBuildManifest &&
- (this->NinjaSupportsCleanDeadTool ||
- this->NinjaSupportsUnconditionalRecompactTool) &&
+ this->NinjaSupportsUnconditionalRecompactTool &&
!cmSystemTools::FileExists("build.ninja");
- // The `cleandead` tool needs to know about all outputs in the build we just
- // wrote out. Ninja-Multi doesn't have a single `build.ninja` we can use that
- // is the union of all generated configurations, so we can't run it reliably
- // in that case.
- if (this->NinjaSupportsCleanDeadTool && expectBuildManifest &&
- !missingBuildManifest) {
- run_ninja_tool({ "cleandead" });
- }
// The `recompact` tool loads the manifest. As above, we don't have a single
// `build.ninja` to load for this in Ninja-Multi. This may be relaxed in the
// future pending further investigation into how Ninja works upstream
}
}
}
- this->NinjaSupportsCleanDeadTool = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForCleanDeadTool().c_str());
this->NinjaSupportsUnconditionalRecompactTool =
!cmSystemTools::VersionCompare(
cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
{
return "1.10";
}
- static std::string RequiredNinjaVersionForCleanDeadTool() { return "1.10"; }
bool SupportsConsolePool() const;
bool SupportsImplicitOuts() const;
bool SupportsManifestRestat() const;
bool NinjaSupportsDyndeps = false;
bool NinjaSupportsRestatTool = false;
bool NinjaSupportsUnconditionalRecompactTool = false;
- bool NinjaSupportsCleanDeadTool = false;
private:
void InitOutputPathPrefix();
/* Needed for glibc < 2.12 */
# define _XOPEN_SOURCE 600
#endif
-#if !defined(_WIN32) && !defined(__sun)
+#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)
/* POSIX APIs are needed */
# define _POSIX_C_SOURCE 200809L
#endif