diff options
Diffstat (limited to 'Tests/RunCMake/LinkLibrariesProcessing')
22 files changed, 123 insertions, 0 deletions
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/CMakeLists.txt b/Tests/RunCMake/LinkLibrariesProcessing/CMakeLists.txt new file mode 100644 index 0000000..5773ae3 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.28...3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1-stderr.txt new file mode 100644 index 0000000..2566d8f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at InvalidConfiguration1.cmake:[0-9]+ \(add_executable\): + Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': + + ORDER= + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake new file mode 100644 index 0000000..e79eb45 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER= UNICITY=ALL) + +add_library(lib STATIC lib.c) + +add_executable(main main.c) +target_link_libraries(main PRIVATE lib) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2-stderr.txt new file mode 100644 index 0000000..933031d --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at InvalidConfiguration2.cmake:[0-9]+ \(add_executable\): + Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': + + ORDER + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake new file mode 100644 index 0000000..c9da734 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +set(CMAKE_C_LINK_LIBRARIES_PROCESSING UNICITY=ALL ORDER) + +add_library(lib STATIC lib.c) + +add_executable(main main.c) +target_link_libraries(main PRIVATE lib) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3-stderr.txt new file mode 100644 index 0000000..eba1eb2 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at InvalidConfiguration3.cmake:[0-9]+ \(add_executable\): + Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': + + WRONG=REVERSE + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake new file mode 100644 index 0000000..a1311fe --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=ALL) + +add_library(lib STATIC lib.c) + +add_executable(main main.c) +target_link_libraries(main PRIVATE lib) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt new file mode 100644 index 0000000..46d5513 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at InvalidConfiguration4.cmake:[0-9]+ \(add_executable\): + Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': + + WRONG=REVERSE + UNICITY=WRONG + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake new file mode 100644 index 0000000..9d48f4f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=WRONG) + +add_library(lib STATIC lib.c) + +add_executable(main main.c) +target_link_libraries(main PRIVATE lib) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER-stderr.txt new file mode 100644 index 0000000..33a7552 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at Invalid_ORDER.cmake:[0-9]+ \(add_executable\): + Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': + + ORDER=WRONG + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake new file mode 100644 index 0000000..72a7e02 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=WRONG UNICITY=ALL) + +add_library(lib STATIC lib.c) + +add_executable(main main.c) +target_link_libraries(main PRIVATE lib) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt new file mode 100644 index 0000000..4d759b7 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at Invalid_UNICITY.cmake:[0-9]+ \(add_executable\): + Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': + + UNICITY=WRONG + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake new file mode 100644 index 0000000..f423eef --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=WRONG) + +add_library(lib STATIC lib.c) + +add_executable(main main.c) +target_link_libraries(main PRIVATE lib) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake b/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake new file mode 100644 index 0000000..763f48b --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +include(RunCMake) + +run_cmake(Invalid_ORDER) +run_cmake(Invalid_UNICITY) +run_cmake(InvalidConfiguration1) +run_cmake(InvalidConfiguration2) +run_cmake(InvalidConfiguration3) +run_cmake(InvalidConfiguration4) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/lib.c b/Tests/RunCMake/LinkLibrariesProcessing/lib.c new file mode 100644 index 0000000..17a4148 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/lib.c @@ -0,0 +1,4 @@ + +void lib(void) +{ +} diff --git a/Tests/RunCMake/LinkLibrariesProcessing/main.c b/Tests/RunCMake/LinkLibrariesProcessing/main.c new file mode 100644 index 0000000..402eac3 --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/main.c @@ -0,0 +1,5 @@ + +int main(void) +{ + return 0; +} |