Skip to content

Commit

Permalink
tests: resolve path to corrosion source dir
Browse files Browse the repository at this point in the history
This is a minor readability improvement to the generated file.
  • Loading branch information
jschwe committed Aug 10, 2024
1 parent 0941698 commit 43a386e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ option(CORROSION_TESTS_KEEP_BUILDDIRS
mark_as_advanced(CORROSION_TESTS_NO_CLEANUP)

set(test_install_path "${CMAKE_CURRENT_BINARY_DIR}/test-install-corrosion")

file(REAL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/.." corrosion_source_dir)
set(test_header_contents
"option(CORROSION_TESTS_FIND_CORROSION \"Use Corrosion as a subdirectory\" OFF)"
"if (CORROSION_TESTS_FIND_CORROSION)"
" set(CMAKE_PREFIX_PATH \"${test_install_path}\" CACHE INTERNAL \"\" FORCE)"
" find_package(Corrosion REQUIRED PATHS \"${test_install_path}\" NO_CMAKE_SYSTEM_PATH)"
"else()"
" add_subdirectory(\"${CMAKE_CURRENT_SOURCE_DIR}/..\" corrosion)"
" add_subdirectory(\"${corrosion_source_dir}\" corrosion)"
"endif()"
)

Expand Down

0 comments on commit 43a386e

Please sign in to comment.