-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #987 from LLNL/feature/kweiss/improve-vcpkg
Adds support for RAJA and Umpire to Windows build
- Loading branch information
Showing
11 changed files
with
424 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO llnl/camp | ||
REF v2022.03.2 | ||
SHA512 d124c0e933f042525e9b48c21b93e7f4f634dfc0f87742e018a1c7de43ed6e30670d8f8e4ce369018a8e1c884b2b27f4755ee9f07a077820b2a3133546f6d622 | ||
HEAD_REF develop | ||
) | ||
|
||
set(_is_shared TRUE) | ||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
set(_is_shared FALSE) | ||
endif() | ||
|
||
if("openmp" IN_LIST FEATURES) | ||
set(_use_) | ||
endif() | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
openmp ENABLE_OPENMP | ||
) | ||
|
||
|
||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DBLT_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/share/blt | ||
-DENABLE_COVERAGE=OFF | ||
-DENABLE_ALL_WARNINGS=OFF | ||
-DENABLE_DOCS=OFF | ||
-DENABLE_EXAMPLES=OFF | ||
-DENABLE_TESTS=OFF | ||
-DBUILD_SHARED_LIBS=${_is_shared} | ||
${FEATURE_OPTIONS} | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/camp | ||
TARGET_PATH share/camp) | ||
vcpkg_copy_pdbs() | ||
|
||
|
||
## shuffle the output directories to make vcpkg happy | ||
# Remove extraneous debug header files | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
|
||
# Remove exe files -- vcpkg doesn't like them | ||
# (Future): It might be possible to move them to the vcpkg 'tools' directory | ||
foreach(_dir "bin" "debug/bin") | ||
file(GLOB _exe ${CURRENT_PACKAGES_DIR}/${_dir}/*.exe) | ||
if(_exe) | ||
file(REMOVE ${_exe}) | ||
endif() | ||
endforeach() | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
# Note: Not tested | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
else() | ||
set(_config_dir "${CURRENT_PACKAGES_DIR}/share/camp") | ||
|
||
# Move dll files from lib to bin directory | ||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ) | ||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin ) | ||
|
||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/camp.dll | ||
${CURRENT_PACKAGES_DIR}/bin/camp.dll) | ||
|
||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/camp.dll | ||
${CURRENT_PACKAGES_DIR}/debug/bin/camp.dll) | ||
|
||
# Update paths to dlls in CMake config files | ||
foreach(_c debug release) | ||
set(_f ${_config_dir}/campTargets-${_c}.cmake) | ||
file(READ ${_f} _fdata) | ||
string(REPLACE "lib/camp.dll" "bin/camp.dll" _fdata "${_fdata}") | ||
file(WRITE ${_f} "${_fdata}") | ||
endforeach() | ||
endif() | ||
|
||
# Put the license file where vcpkg expects it | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/camp RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "camp", | ||
"version-string": "2022.03.2", | ||
"homepage": "https://github.com/llnl/camp", | ||
"description": "Compiler agnostic metaprogramming library", | ||
"dependencies": [ | ||
"blt" | ||
], | ||
"features": { | ||
"openmp": { | ||
"description": "openmp functionality for camp" | ||
} | ||
}, | ||
"supports": "!uwp" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO llnl/raja | ||
REF v2022.03.1 | ||
SHA512 36e2f59e0f4c3e8fcc07a21fc1eeec701c2be147db9395efedad9aa87bcc078e84a5334698c0fb3e2fbd3670c2eaacdebcd63c4caaa3721a3900ff02dfb44ad7 | ||
HEAD_REF develop | ||
) | ||
|
||
set(_is_shared TRUE) | ||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
set(_is_shared FALSE) | ||
else() | ||
set(_extra_cxx_flags "/DRAJASHAREDDLL_EXPORTS") | ||
endif() | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
openmp ENABLE_OPENMP | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DBLT_SOURCE_DIR:PATH=${CURRENT_INSTALLED_DIR}/share/blt | ||
-Dcamp_DIR:PATH=${CURRENT_INSTALLED_DIR} | ||
-DENABLE_ALL_WARNINGS:BOOL=OFF | ||
-DENABLE_COVERAGE:BOOL=OFF | ||
-DENABLE_EXAMPLES:BOOL=OFF | ||
-DENABLE_TESTS:BOOL=OFF | ||
-DRAJA_ENABLE_RUNTIME_PLUGINS:BOOL=OFF | ||
-DRAJA_ENABLE_TESTS:BOOL=OFF | ||
-DRAJA_ENABLE_EXAMPLES:BOOL=OFF | ||
-DRAJA_ENABLE_EXERCISES:BOOL=OFF | ||
-DRAJA_ENABLE_REPRODUCERS:BOOL=OFF | ||
-DRAJA_ENABLE_DOCUMENTATION:BOOL=OFF | ||
-DRAJA_ENABLE_BENCHMARKS:BOOL=OFF | ||
-DBUILD_SHARED_LIBS:BOOL=${_is_shared} | ||
-DBLT_CXX_FLAGS:STRING=${_extra_cxx_flags} | ||
${FEATURE_OPTIONS} | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/raja | ||
TARGET_PATH share/raja) | ||
vcpkg_copy_pdbs() | ||
|
||
|
||
## shuffle the output directories to make vcpkg happy | ||
# Remove extraneous debug header files | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
|
||
message(STATUS "CURRENT_PACKAGES_DIR -- ${CURRENT_PACKAGES_DIR}") | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
# Note: Not tested | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
else() | ||
set(_config_dir "${CURRENT_PACKAGES_DIR}/share/raja") | ||
|
||
# Move dll files from lib to bin directory | ||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ) | ||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin ) | ||
|
||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/RAJA.dll | ||
${CURRENT_PACKAGES_DIR}/bin/RAJA.dll) | ||
|
||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/RAJA.dll | ||
${CURRENT_PACKAGES_DIR}/debug/bin/RAJA.dll) | ||
|
||
# Update paths to dlls in CMake config files | ||
foreach(_c debug release) | ||
set(_f ${_config_dir}/RAJA-${_c}.cmake) | ||
file(READ ${_f} _fdata) | ||
string(REPLACE "lib/RAJA.dll" "bin/RAJA.dll" _fdata "${_fdata}") | ||
file(WRITE ${_f} "${_fdata}") | ||
endforeach() | ||
endif() | ||
|
||
# Put the license file where vcpkg expects it | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/raja RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "raja", | ||
"version-string": "2022.03.1", | ||
"homepage": "https://github.com/llnl/raja", | ||
"description": "RAJA Performance Portability Layer (C++)", | ||
"dependencies": [ | ||
"blt", | ||
"camp" | ||
], | ||
"features": { | ||
"openmp": { | ||
"description": "openmp functionality for raja", | ||
"dependencies": [ | ||
{ | ||
"name": "camp", | ||
"features": [ | ||
"openmp" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"supports": "!uwp" | ||
} |
Oops, something went wrong.