Add custom targets for running cmkr/tests

main
Duncan Ogilvie 6 months ago
parent 559f750c89
commit 7c828d8740

2
CMakeLists.txt generated

@ -102,7 +102,7 @@ if(NOT CMKR_VS_STARTUP_PROJECT)
endif()
set(CMKR_TARGET cmkr)
generate_resources(${CMKR_TARGET})
include("cmake/custom_targets.cmake")
install(
TARGETS

@ -37,9 +37,7 @@ link-libraries = [
"mpark_variant",
"ordered_map",
]
cmake-after = """
generate_resources(${CMKR_TARGET})
"""
include-after = ["cmake/custom_targets.cmake"]
[[install]]
targets = ["cmkr"]

@ -0,0 +1,18 @@
generate_resources(cmkr)
add_custom_target(regenerate-cmake
COMMAND "$<TARGET_FILE:cmkr>" gen
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
)
if(CMAKE_CONFIGURATION_TYPES)
add_custom_target(run-tests
COMMAND "${CMAKE_CTEST_COMMAND}" -C $<CONFIG>
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/tests"
)
else()
add_custom_target(run-tests
COMMAND "${CMAKE_CTEST_COMMAND}"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/tests"
)
endif()
Loading…
Cancel
Save