mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Tests: Prepare RunCMake.GenEx-TARGET_PROPERTY for more independent cases
The existing cases all need to enable a language. Move this out of the `CMakeLists.txt` file and into the individual cases to make room for other cases that may not need this.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
enable_language(CXX)
|
||||
add_subdirectory(BadInvalidName1)
|
||||
add_subdirectory(BadInvalidName2)
|
||||
add_subdirectory(BadInvalidName3)
|
||||
@@ -6,3 +7,6 @@ add_subdirectory(BadInvalidName5)
|
||||
add_subdirectory(BadInvalidName6)
|
||||
add_subdirectory(BadInvalidName7)
|
||||
add_subdirectory(BadInvalidName8)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
enable_language(CXX)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
|
||||
"int main(int, char **) { return 0; }\n")
|
||||
|
||||
add_executable(main "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
|
||||
include_directories("$<TARGET_PROPERTY:NonExistent,INCLUDE_DIRECTORIES>")
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
enable_language(CXX)
|
||||
add_subdirectory(BadSelfReference1)
|
||||
add_subdirectory(BadSelfReference2)
|
||||
add_subdirectory(BadSelfReference3)
|
||||
add_subdirectory(BadSelfReference4)
|
||||
add_subdirectory(BadSelfReference5)
|
||||
add_subdirectory(BadSelfReference6)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
|
||||
# MSVC creates extra targets which pollute the stderr unless we set this.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
enable_language(CXX)
|
||||
add_library(empty1 empty.cpp)
|
||||
add_library(empty2 empty.cpp)
|
||||
|
||||
@@ -6,3 +6,6 @@ target_link_libraries(empty1
|
||||
LINK_PUBLIC
|
||||
$<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
|
||||
)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
enable_language(CXX)
|
||||
add_library(empty1 empty.cpp)
|
||||
add_library(empty2 empty.cpp)
|
||||
|
||||
@@ -6,3 +6,6 @@ target_link_libraries(empty1
|
||||
LINK_PUBLIC
|
||||
$<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
|
||||
)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
enable_language(CXX)
|
||||
add_library(empty1 empty.cpp)
|
||||
add_library(empty2 empty.cpp)
|
||||
|
||||
@@ -8,3 +8,6 @@ target_link_libraries(empty1
|
||||
INTERFACE
|
||||
$<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
|
||||
)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
enable_language(CXX)
|
||||
add_library(empty1 empty.cpp)
|
||||
add_library(empty2 empty.cpp)
|
||||
|
||||
@@ -12,3 +12,6 @@ target_link_libraries(empty1
|
||||
|
||||
add_library(empty3 empty.cpp)
|
||||
target_link_libraries(empty3 empty1)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
enable_language(CXX)
|
||||
add_library(empty1 INTERFACE IMPORTED)
|
||||
add_library(empty2 INTERFACE IMPORTED)
|
||||
|
||||
@@ -8,3 +8,6 @@ set_property(TARGET empty1 PROPERTY INTERFACE_LINK_LIBRARIES
|
||||
|
||||
add_library(empty3 empty.cpp)
|
||||
target_link_libraries(empty3 empty1)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
enable_language(CXX)
|
||||
add_library(empty1 SHARED empty.cpp)
|
||||
add_library(empty2 SHARED empty.cpp)
|
||||
|
||||
@@ -12,3 +12,6 @@ target_link_libraries(empty1
|
||||
|
||||
add_library(empty3 SHARED empty.cpp)
|
||||
target_link_libraries(empty3 empty1)
|
||||
|
||||
# Suppress generator-specific targets that might pollute the stderr.
|
||||
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
Reference in New Issue
Block a user