mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
Tests: Fix ExternalLibraryWithSubstitution test
The ExternalLibraryWithSubstitution test should test whether
BUILD_BYPRODUCTS supports <BUILD_DIR> and other ExternalProject
placeholder tokens.
However, it's not hooked up correctly, and therefore isn't properly
tested. This commit links it to an executable, to confirm whether
it's possible to use the BUILD_BYPRODUCT in the Ninja generator.
Fixes: commit 86032ae0eb (ExternalProject: Replace placeholder tokens in BYPRODUCTS, 2015-03-06)
This commit is contained in:
@@ -169,6 +169,12 @@ add_dependencies(CustomCommandByproducts Producer2)
|
||||
|
||||
target_link_libraries(CustomCommandByproducts ExternalLibrary)
|
||||
|
||||
add_executable(ExternalLibraryByproducts ExternalLibraryByproducts.c)
|
||||
target_link_libraries(ExternalLibraryByproducts ExternalLibrary)
|
||||
|
||||
add_executable(ExternalLibraryByproducts_WithSubstitution ExternalLibraryByproducts.c)
|
||||
target_link_libraries(ExternalLibraryByproducts_WithSubstitution ExternalLibraryWithSubstitution)
|
||||
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
add_custom_target(CheckNinja ALL
|
||||
COMMENT "Checking build.ninja"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
extern int ExternalLibrary(void);
|
||||
int main(void)
|
||||
{
|
||||
return (ExternalLibrary() + 1);
|
||||
}
|
||||
Reference in New Issue
Block a user