Skip to content

Commit

Permalink
cmake: fix "make check"
Browse files Browse the repository at this point in the history
CMake 3.30 was giving error:

 CMake Error: Unknown argument: -C

probably because CMAKE_BUILD_TYPE was not set, which made
$<CONFIGURATION> an empty string. Try adding quotes.
Do we need -C at all?

Since $<CONFIGURATION> is deprecated, use $<CONFIG>.
  • Loading branch information
wojdyr committed Sep 5, 2024
1 parent 7b6738d commit c810526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ add_custom_target(print-version
COMMENT "gemmi --version"
)

add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C \"$<CONFIG>\")
add_test(NAME cpptest COMMAND cpptest)

add_dependencies(check
Expand Down

0 comments on commit c810526

Please sign in to comment.