ENH: fix tests to work with in source builds
This commit is contained in:
parent
ee897e6a3c
commit
22de04fab9
|
@ -263,7 +263,7 @@ IF(BUILD_TESTING)
|
||||||
--test-command ${SimpleInstallInstallDir}/bin/SimpleInstall)
|
--test-command ${SimpleInstallInstallDir}/bin/SimpleInstall)
|
||||||
ADD_TEST(SimpleInstall-Stage2 ${CMAKE_CTEST_COMMAND}
|
ADD_TEST(SimpleInstall-Stage2 ${CMAKE_CTEST_COMMAND}
|
||||||
--build-and-test
|
--build-and-test
|
||||||
"${CMake_SOURCE_DIR}/Tests/SimpleInstall"
|
"${CMake_SOURCE_DIR}/Tests/SimpleInstallS2"
|
||||||
"${CMake_BINARY_DIR}/Tests/SimpleInstallS2"
|
"${CMake_BINARY_DIR}/Tests/SimpleInstallS2"
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-project TestSimpleInstall
|
--build-project TestSimpleInstall
|
||||||
|
@ -296,7 +296,7 @@ IF(BUILD_TESTING)
|
||||||
|
|
||||||
ADD_TEST(LoadedCommandOneConfig ${CMAKE_CTEST_COMMAND}
|
ADD_TEST(LoadedCommandOneConfig ${CMAKE_CTEST_COMMAND}
|
||||||
--build-and-test
|
--build-and-test
|
||||||
"${CMake_SOURCE_DIR}/Tests/LoadCommand"
|
"${CMake_SOURCE_DIR}/Tests/LoadCommandOneConfig"
|
||||||
"${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig"
|
"${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig"
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-project LoadedCommand
|
--build-project LoadedCommand
|
||||||
|
@ -324,7 +324,7 @@ IF(BUILD_TESTING)
|
||||||
|
|
||||||
ADD_TEST(complexOneConfig ${CMAKE_CTEST_COMMAND}
|
ADD_TEST(complexOneConfig ${CMAKE_CTEST_COMMAND}
|
||||||
--build-and-test
|
--build-and-test
|
||||||
"${CMake_SOURCE_DIR}/Tests/Complex"
|
"${CMake_SOURCE_DIR}/Tests/ComplexOneConfig"
|
||||||
"${CMake_BINARY_DIR}/Tests/ComplexOneConfig"
|
"${CMake_BINARY_DIR}/Tests/ComplexOneConfig"
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-project complex
|
--build-project complex
|
||||||
|
@ -334,7 +334,7 @@ IF(BUILD_TESTING)
|
||||||
|
|
||||||
ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND}
|
ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND}
|
||||||
--build-and-test
|
--build-and-test
|
||||||
"${CMake_SOURCE_DIR}/Tests/Complex"
|
"${CMake_SOURCE_DIR}/Tests/ComplexRelativePaths"
|
||||||
"${CMake_BINARY_DIR}/Tests/ComplexRelativePaths"
|
"${CMake_BINARY_DIR}/Tests/ComplexRelativePaths"
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-project complex
|
--build-project complex
|
||||||
|
|
|
@ -558,14 +558,16 @@ int main()
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
"FILENAME_VAR_PATH_NAME is not defined.");
|
"FILENAME_VAR_PATH_NAME is not defined.");
|
||||||
#else
|
#else
|
||||||
if(strcmp(FILENAME_VAR_PATH_NAME, "Complex") != 0)
|
if((strcmp(FILENAME_VAR_PATH_NAME, "Complex") == 0) ||
|
||||||
|
(strcmp(FILENAME_VAR_PATH_NAME, "ComplexOneConfig") == 0) ||
|
||||||
|
(strcmp(FILENAME_VAR_PATH_NAME, "ComplexRelativePaths") == 0))
|
||||||
{
|
{
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmPassed("FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
||||||
"FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmPassed("FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
|
"FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -618,14 +620,16 @@ int main()
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
"PATH_VAR_NAME is not defined.");
|
"PATH_VAR_NAME is not defined.");
|
||||||
#else
|
#else
|
||||||
if(strcmp(PATH_VAR_NAME, "Complex") != 0)
|
if((strcmp(PATH_VAR_NAME, "Complex") == 0) ||
|
||||||
|
(strcmp(PATH_VAR_NAME, "ComplexOneConfig") == 0) ||
|
||||||
|
(strcmp(PATH_VAR_NAME, "ComplexRelativePaths") == 0))
|
||||||
{
|
{
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmPassed("PATH_VAR_NAME == ", PATH_VAR_NAME);
|
||||||
"PATH_VAR_NAME == ", PATH_VAR_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmPassed("PATH_VAR_NAME == ", PATH_VAR_NAME);
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
|
"PATH_VAR_NAME == ", PATH_VAR_NAME);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -558,14 +558,16 @@ int main()
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
"FILENAME_VAR_PATH_NAME is not defined.");
|
"FILENAME_VAR_PATH_NAME is not defined.");
|
||||||
#else
|
#else
|
||||||
if(strcmp(FILENAME_VAR_PATH_NAME, "Complex") != 0)
|
if((strcmp(FILENAME_VAR_PATH_NAME, "Complex") == 0) ||
|
||||||
|
(strcmp(FILENAME_VAR_PATH_NAME, "ComplexOneConfig") == 0) ||
|
||||||
|
(strcmp(FILENAME_VAR_PATH_NAME, "ComplexRelativePaths") == 0))
|
||||||
{
|
{
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmPassed("FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
||||||
"FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmPassed("FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
|
"FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -618,14 +620,16 @@ int main()
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
"PATH_VAR_NAME is not defined.");
|
"PATH_VAR_NAME is not defined.");
|
||||||
#else
|
#else
|
||||||
if(strcmp(PATH_VAR_NAME, "Complex") != 0)
|
if((strcmp(PATH_VAR_NAME, "Complex") == 0) ||
|
||||||
|
(strcmp(PATH_VAR_NAME, "ComplexOneConfig") == 0) ||
|
||||||
|
(strcmp(PATH_VAR_NAME, "ComplexRelativePaths") == 0))
|
||||||
{
|
{
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmPassed("PATH_VAR_NAME == ", PATH_VAR_NAME);
|
||||||
"PATH_VAR_NAME == ", PATH_VAR_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmPassed("PATH_VAR_NAME == ", PATH_VAR_NAME);
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
|
"PATH_VAR_NAME == ", PATH_VAR_NAME);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -558,14 +558,16 @@ int main()
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
"FILENAME_VAR_PATH_NAME is not defined.");
|
"FILENAME_VAR_PATH_NAME is not defined.");
|
||||||
#else
|
#else
|
||||||
if(strcmp(FILENAME_VAR_PATH_NAME, "Complex") != 0)
|
if((strcmp(FILENAME_VAR_PATH_NAME, "Complex") == 0) ||
|
||||||
|
(strcmp(FILENAME_VAR_PATH_NAME, "ComplexOneConfig") == 0) ||
|
||||||
|
(strcmp(FILENAME_VAR_PATH_NAME, "ComplexRelativePaths") == 0))
|
||||||
{
|
{
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmPassed("FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
||||||
"FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmPassed("FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
|
"FILENAME_VAR_PATH_NAME == ", FILENAME_VAR_PATH_NAME);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -618,14 +620,16 @@ int main()
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
"PATH_VAR_NAME is not defined.");
|
"PATH_VAR_NAME is not defined.");
|
||||||
#else
|
#else
|
||||||
if(strcmp(PATH_VAR_NAME, "Complex") != 0)
|
if((strcmp(PATH_VAR_NAME, "Complex") == 0) ||
|
||||||
|
(strcmp(PATH_VAR_NAME, "ComplexOneConfig") == 0) ||
|
||||||
|
(strcmp(PATH_VAR_NAME, "ComplexRelativePaths") == 0))
|
||||||
{
|
{
|
||||||
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
cmPassed("PATH_VAR_NAME == ", PATH_VAR_NAME);
|
||||||
"PATH_VAR_NAME == ", PATH_VAR_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmPassed("PATH_VAR_NAME == ", PATH_VAR_NAME);
|
cmFailed("the FIND_FILE or GET_FILENAME_COMPONENT command is broken, "
|
||||||
|
"PATH_VAR_NAME == ", PATH_VAR_NAME);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue