You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
704 B

include(RunCMake)
# Link should succeed
block()
set(libdir ${RunCMake_BINARY_DIR}/TestLib-build/TestLib/lib)
run_cmake(TestLib)
run_cmake_with_options(TestApp "-DCMAKE_C_STANDARD_LINK_DIRECTORIES=${libdir}")
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command(TestLib ${CMAKE_COMMAND} --build .)
run_cmake_command(TestAppGood ${CMAKE_COMMAND} --build ../TestApp-build)
endblock()
# Link should fail
block()
run_cmake(TestLib)
run_cmake(TestApp)
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command(TestLib ${CMAKE_COMMAND} --build .)
run_cmake_command(TestAppBad ${CMAKE_COMMAND} --build ../TestApp-build)
endblock()