Skip to content

Commit

Permalink
Force build libcupla as archive
Browse files Browse the repository at this point in the history
- downgrade required cmake version to 3.18
  • Loading branch information
SimeonEhrig committed Jul 13, 2021
1 parent d5f5ec5 commit cf3d5e3
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Required cmake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Setup project information
Expand Down
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Requirements


- **cmake** 3.19.0 or higher
- **cmake** 3.18.0 or higher
- *Debian/Ubuntu:* `sudo apt-get install cmake file cmake-curses-gui`
- *Arch Linux:* `sudo pacman --sync cmake`

Expand Down Expand Up @@ -75,7 +75,7 @@ cmake .. -Dcupla_BUILD_EXAMPLES=ON -Dcupla_ALPAKA_PROVIDER="external"
If cupla is installed, you can use it via `find_package()` in your project:

```cmake
cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)
project(exampleProject)
find_package(cupla)
Expand All @@ -88,7 +88,7 @@ cupla_add_executable(${PROJECT_NAME} main.cpp)
For the method `add_subdirectory()` you have to copy the `cupla` project folder into your project. After that you can add `cupla` to your project and use it.

```cmake
cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)
project(exampleProject)
# requires, that cupla is located in the root directory of your project
Expand Down
1 change: 1 addition & 0 deletions cmake/cuplaTargetHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ macro(createCuplaTarget
)
alpaka_add_library(
${TARGET_NAME}
STATIC
${_CUPLA_SRC_DIR}/manager/Driver.cpp
${_CUPLA_SRC_DIR}/common.cpp
${_CUPLA_SRC_DIR}/device.cpp
Expand Down
2 changes: 1 addition & 1 deletion example/CUDASamples/asyncAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Required CMake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Project.
Expand Down
2 changes: 1 addition & 1 deletion example/CUDASamples/asyncAPI_tuned/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Required CMake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Project.
Expand Down
2 changes: 1 addition & 1 deletion example/CUDASamples/blackScholes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Required CMake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Project.
Expand Down
2 changes: 1 addition & 1 deletion example/CUDASamples/cuplaVectorAdd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Required CMake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Project.
Expand Down
2 changes: 1 addition & 1 deletion example/CUDASamples/matrixMul/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Required CMake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Project.
Expand Down
2 changes: 1 addition & 1 deletion example/CUDASamples/vectorAdd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Required CMake version.
################################################################################

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)

################################################################################
# Project.
Expand Down
2 changes: 0 additions & 2 deletions script/integration/build_add_subdirectory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ cmake --install .
##########################
cd ../install
ls
# verify, that cupla lib is correct installed
ls lib
bin/cuplaVectorAdd
2 changes: 0 additions & 2 deletions script/integration/build_find_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ cmake --install .
##########################
cd ../install
ls
# verify, that cupla lib is correct installed
ls lib
bin/cuplaVectorAdd
7 changes: 1 addition & 6 deletions test/integration/cupla_add_subdirectory.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@
# If not, see <http://www.gnu.org/licenses/>.
#

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)
project(cuplaVectorAdd)

add_subdirectory(cupla)

cupla_add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/vectorAdd.cpp)

install(TARGETS ${PROJECT_NAME})

# install cupla library only, if it a shared library
if(BUILD_SHARED_LIBS)
install(TARGETS cupla)
endif()
7 changes: 1 addition & 6 deletions test/integration/cupla_find_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@
# If not, see <http://www.gnu.org/licenses/>.
#

cmake_minimum_required(VERSION 3.19.0)
cmake_minimum_required(VERSION 3.18.0)
project(cuplaVectorAdd)

find_package(cupla)

cupla_add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/vectorAdd.cpp)

install(TARGETS ${PROJECT_NAME})

# install cupla library only, if it a shared library
if(BUILD_SHARED_LIBS)
install(TARGETS cupla)
endif()

0 comments on commit cf3d5e3

Please sign in to comment.