summaryrefslogtreecommitdiffstats
path: root/Tests/GhsMulti/GhsMultiExclude
diff options
context:
space:
mode:
authorFred Baksik <fdk17@ftml.net>2022-03-16 20:25:25 (GMT)
committerFred Baksik <fdk17@ftml.net>2022-03-17 23:11:48 (GMT)
commit829e946c69aacecb9b56b9522bd357db316fea4a (patch)
treed6cf5e1421bde0f570a22a35dbae1a4780267f35 /Tests/GhsMulti/GhsMultiExclude
parent93c1acd8ffdd59e127b11a47e13bf058d9cfe43c (diff)
downloadCMake-829e946c69aacecb9b56b9522bd357db316fea4a.zip
CMake-829e946c69aacecb9b56b9522bd357db316fea4a.tar.gz
CMake-829e946c69aacecb9b56b9522bd357db316fea4a.tar.bz2
GHS: Update tests for updated binary layout
The tests need to look for the items in the correct locations.
Diffstat (limited to 'Tests/GhsMulti/GhsMultiExclude')
-rw-r--r--Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt2
-rw-r--r--Tests/GhsMulti/GhsMultiExclude/verify.cmake104
2 files changed, 55 insertions, 51 deletions
diff --git a/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt b/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt
index 0448cf2..575bf50 100644
--- a/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt
+++ b/Tests/GhsMulti/GhsMultiExclude/CMakeLists.txt
@@ -14,4 +14,6 @@ set_target_properties( lib1 PROPERTIES EXCLUDE_FROM_ALL yes )
add_library(lib2 EXCLUDE_FROM_ALL lib1.c)
+add_library(lib3 lib1.c)
+
add_executable(exe1 exe1.c)
diff --git a/Tests/GhsMulti/GhsMultiExclude/verify.cmake b/Tests/GhsMulti/GhsMultiExclude/verify.cmake
index 0467b5a..99cef63 100644
--- a/Tests/GhsMulti/GhsMultiExclude/verify.cmake
+++ b/Tests/GhsMulti/GhsMultiExclude/verify.cmake
@@ -1,54 +1,56 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-#test project was generated
-unset(fileName CACHE)
-find_file (fileName lib1.gpj
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/lib1
- )
-
-if (fileName)
- message("Found target lib1: ${fileName}")
-else()
- message(SEND_ERROR "Could not find target lib1: ${fileName}")
-endif()
-
-#test project was built
-unset(fileName CACHE)
-find_file (fileName lib1.a
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/lib1
- )
-
-if (fileName)
- message(SEND_ERROR "Found target lib1: ${fileName}")
-else()
- message("Could not find target lib1: ${fileName}")
-endif()
-
-#test project was generated
-unset(fileName CACHE)
-find_file (fileName lib2.gpj
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/lib2
- )
-
-if (fileName)
- message("Found target lib2 ${fileName}")
-else()
- message(SEND_ERROR "Could not find target lib2: ${fileName}")
-endif()
-
-#test project was built
-unset(fileName CACHE)
-find_file (fileName lib2.a
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/lib2
- )
-
-if (fileName)
- message(SEND_ERROR "Found target lib2: ${fileName}")
-else()
- message("Could not find target lib2: ${fileName}")
-endif()
+function(verify_skipped_tgt name)
+ unset(fileName CACHE)
+ find_file (fileName ${name}.tgt.gpj
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ if (fileName)
+ message("Found target ${name}: ${fileName}")
+ else()
+ message(SEND_ERROR "Could not find target ${name}: ${fileName}")
+ endif()
+
+ #test project was built
+ unset(fileName CACHE)
+ find_file (fileName lib${name}.a
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ if (fileName)
+ message(SEND_ERROR "Found target ${name}: ${fileName}")
+ else()
+ message("Could not find target ${name}: ${fileName}")
+ endif()
+endfunction()
+
+function(locate_tgt name)
+ unset(fileName CACHE)
+ find_file (fileName ${name}.tgt.gpj
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ if (fileName)
+ message("Found target ${name}: ${fileName}")
+ else()
+ message(SEND_ERROR "Could not find target ${name}: ${fileName}")
+ endif()
+
+ #test project was built
+ unset(fileName CACHE)
+ find_file (fileName lib${name}.a
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ if (fileName)
+ message( "Found target ${name}: ${fileName}")
+ else()
+ message(SEND_ERROR "Could not find target ${name}: ${fileName}")
+ endif()
+endfunction()
+
+verify_skipped_tgt(lib1)
+verify_skipped_tgt(lib2)
+locate_tgt(lib3)