Skip to content

Commit 8fcca3e

Browse files
author
Rutherford, Cameron
committed
Fix exported CMake bug in CXX_STANDARD
1 parent 508bd81 commit 8fcca3e

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"installDir": "${sourceDir}/install",
2626
"generator": "Unix Makefiles"
2727
},
28-
{
28+
{
2929
"name": "ascent",
3030
"inherits": "cuda",
3131
"displayName": "Ascent Build",

cmake/ReSolveConfig.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
include("${CMAKE_CURRENT_LIST_DIR}/ReSolveTargets.cmake")
66

7+
if(NOT CMAKE_CXX_STANDARD)
8+
set(CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@)
9+
endif()
10+
711
include(CheckLanguage)
812
# This must come before enable_language(CUDA)
913
if(@RESOLVE_USE_CUDA@)

examples/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ set(CONSUMER_PATH ${CMAKE_INSTALL_PREFIX}/share/examples)
7171
install(PROGRAMS test.sh DESTINATION ${CONSUMER_PATH})
7272

7373
# Select consumer app
74+
# TODO - have an outer loop that adds a unique consumer test for each backend supproted
7475
if(RESOLVE_USE_CUDA)
7576
set(RESOLVE_CONSUMER_APP "testKLU_Rf_FGMRES.cpp")
77+
elseif(RESOLVE_USE_HIP)
78+
set(RESOLVE_CONSUMER_APP "testKLU_RocSolver.cpp")
7679
else()
7780
set(RESOLVE_CONSUMER_APP "testKLU.cpp")
7881
endif()

examples/resolve_consumer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ find_package(ReSolve REQUIRED)
1111

1212
# Build example with KLU factorization and KLU refactorization
1313
add_executable(consume.exe consumer.cpp)
14-
target_link_libraries(consume.exe PRIVATE ReSolve::ReSolve)
14+
target_link_libraries(consume.exe PUBLIC ReSolve::ReSolve)
1515

1616
#------------------------------------------------------------------------------------
1717
# Testing of exported Resolve Configurations

0 commit comments

Comments
 (0)