-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This merge fixes the json config test for MSCV. To avoid setting the lib path in msvc, gko makes all test works in the library path (dll location). I changed the working directory to access testing file in #1607. However, it can not find the dll path now. follow the `matrices/config.hpp.in` to pass the file path Related PR: #1610
- Loading branch information
Showing
4 changed files
with
33 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
ginkgo_create_test(json_config ADDITIONAL_LIBRARIES nlohmann_json::nlohmann_json) | ||
# set the working directory to the current binary folder for file test | ||
file(RELATIVE_PATH REL_BINARY_DIR ${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | ||
set_tests_properties("${REL_BINARY_DIR}/json_config" PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") | ||
configure_file(test.json test.json COPYONLY) | ||
|
||
# prepare the testing file and generate location | ||
configure_file("${Ginkgo_SOURCE_DIR}/extensions/test/config/file_location.hpp.in" | ||
"${Ginkgo_BINARY_DIR}/extensions/test/config/file_location.hpp" @ONLY) | ||
configure_file(test.json "${Ginkgo_BINARY_DIR}/extensions/test/config/test.json") |
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,23 @@ | ||
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#ifndef GKO_EXTENSIONS_TEST_CONFIG_FILE_LOCATION_HPP_ | ||
#define GKO_EXTENSIONS_TEST_CONFIG_FILE_LOCATION_HPP_ | ||
|
||
|
||
namespace gko { | ||
namespace ext { | ||
namespace config { | ||
|
||
|
||
const char* location_test_json = | ||
"@Ginkgo_BINARY_DIR@/extensions/test/config/test.json"; | ||
|
||
|
||
} // namespace config | ||
} // namespace ext | ||
} // namespace gko | ||
|
||
|
||
#endif // GKO_EXTENSIONS_TEST_CONFIG_FILE_LOCATION_HPP_ |
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