Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jayesh Badwaik
VTK-m
Commits
7184648c
Commit
7184648c
authored
May 14, 2019
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for clang-cl compilation on windows
parent
b8f5d582
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
37 deletions
+21
-37
CMake/FindTBB.cmake
CMake/FindTBB.cmake
+4
-10
CMake/VTKmCPUVectorization.cmake
CMake/VTKmCPUVectorization.cmake
+2
-1
CMake/VTKmCompilerFlags.cmake
CMake/VTKmCompilerFlags.cmake
+15
-26
No files found.
CMake/FindTBB.cmake
View file @
7184648c
...
...
@@ -203,12 +203,8 @@ if (WIN32 AND MSVC)
list
(
APPEND TBB_LIB_SEARCH_PATH
${
dir
}
/lib/ia32/
${
COMPILER_PREFIX
}
)
endif
()
endforeach
()
endif
()
# For OS X binary distribution, choose libc++ based libraries for Mavericks (10.9)
# and above and AppleClang
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
AND
NOT CMAKE_SYSTEM_VERSION VERSION_LESS 13.0
)
elseif
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
AND
NOT CMAKE_SYSTEM_VERSION VERSION_LESS 13.0
)
set
(
USE_LIBCXX OFF
)
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
...
...
@@ -220,10 +216,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND
list
(
APPEND TBB_LIB_SEARCH_PATH
${
dir
}
/lib/libc++
${
dir
}
/libc++/lib
)
endforeach
()
endif
()
endif
()
# check compiler ABI
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
# check compiler ABI
set
(
COMPILER_PREFIX
)
if
(
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7
)
list
(
APPEND COMPILER_PREFIX
"gcc4.7"
)
...
...
CMake/VTKmCPUVectorization.cmake
View file @
7184648c
...
...
@@ -69,7 +69,8 @@ endif()
# We currently don't know the vectorization flags for MSVC. But we want
# the vtkm_vectorization_flags target to exist so we have a consistent
# interface.
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
OR
CMAKE_CXX_SIMULATE_ID STREQUAL
"MSVC"
)
return
()
endif
()
...
...
CMake/VTKmCompilerFlags.cmake
View file @
7184648c
...
...
@@ -8,31 +8,22 @@
## PURPOSE. See the above copyright notice for more information.
##============================================================================
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
set
(
VTKM_COMPILER_IS_GNU 1
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
set
(
VTKM_COMPILER_IS_CLANG 1
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
set
(
VTKM_COMPILER_IS_CLANG 1
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"PGI"
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
OR
CMAKE_CXX_SIMULATE_ID STREQUAL
"MSVC"
)
set
(
VTKM_COMPILER_IS_MSVC 1
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"PGI"
)
set
(
VTKM_COMPILER_IS_PGI 1
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Intel"
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Intel"
)
set
(
VTKM_COMPILER_IS_ICC 1
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
set
(
VTKM_COMPILER_IS_CLANG 1
)
set
(
VTKM_COMPILER_IS_APPLECLANG 1
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
set
(
VTKM_COMPILER_IS_CLANG 1
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
set
(
VTKM_COMPILER_IS_GNU 1
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
)
set
(
VTKM_COMPILER_IS_MSVC 1
)
endif
()
#-----------------------------------------------------------------------------
# vtkm_compiler_flags is used by all the vtkm targets and consumers of VTK-m
# The flags on vtkm_compiler_flags are needed when using/building vtk-m
...
...
@@ -51,7 +42,7 @@ target_link_libraries(vtkm_compiler_flags
target_compile_features
(
vtkm_compiler_flags INTERFACE cxx_std_11
)
# Enable large object support so we can have 2^32 addressable sections
if
(
CMAKE_CXX
_COMPILER_I
D STREQUAL
"
MSVC
"
)
if
(
VTKM
_COMPILER_I
S_
MSVC
)
target_compile_options
(
vtkm_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/bigobj>
)
if
(
TARGET vtkm::cuda
)
target_compile_options
(
vtkm_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=
"/bigobj"
>
)
...
...
@@ -72,11 +63,9 @@ add_library(vtkm_developer_flags INTERFACE)
# Additional warnings just for Clang 3.5+, and AppleClang 7+
# about failures to vectorize.
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.4
)
if
(
VTKM_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.4
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.99
)
elseif
(
VTKM_COMPILER_IS_APPLECLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.99
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>
)
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment