diff options
Diffstat (limited to 'Tests/CMakeCommands')
4 files changed, 2 insertions, 24 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt index a37c597..3eca7fc 100644 --- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt +++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt @@ -12,11 +12,6 @@ target_compile_definitions(target_compile_definitions INTERFACE MY_INTERFACE_DEFINE ) -add_library(importedlib UNKNOWN IMPORTED) -target_compile_definitions(importedlib - INTERFACE MY_IMPORTEDINTERFACE_DEFINE -) - add_executable(consumer "${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp" ) @@ -24,5 +19,5 @@ add_executable(consumer target_compile_definitions(consumer PRIVATE target_compile_definitions importedlib $<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED> - $<$<TARGET_DEFINED:importedlib>:SHOULD_BE_DEFINED> + $<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED> ) diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp index 1ef657d..f835b6c 100644 --- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp +++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp @@ -11,10 +11,6 @@ #error Expected MY_INTERFACE_DEFINE #endif -#ifndef MY_IMPORTEDINTERFACE_DEFINE -#error Expected MY_IMPORTEDINTERFACE_DEFINE -#endif - #ifdef SHOULD_NOT_BE_DEFINED #error Unexpected SHOULD_NOT_BE_DEFINED #endif diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt index a0f2ee0..486bca0 100644 --- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt +++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt @@ -11,9 +11,6 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/publicinclude/publicinclude.h" "#define file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/interfaceinclude") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/interfaceinclude/interfaceinclude.h" "#define INTERFACEINCLUDE_DEFINE\n") -file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/importedinterfaceinclude") -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/importedinterfaceinclude/importedinterfaceinclude.h" "#define IMPORTEDINTERFACEINCLUDE_DEFINE\n") - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/poison") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/poison/common.h" "#error Should not be included\n") @@ -36,15 +33,10 @@ target_include_directories(target_include_directories BEFORE PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/cure" ) -add_library(importedlib UNKNOWN IMPORTED) -target_include_directories(importedlib - INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/importedinterfaceinclude" -) - add_executable(consumer "${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp" ) target_include_directories(consumer - PRIVATE target_include_directories importedlib + PRIVATE target_include_directories ) diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp index 6fd61d5..5d88488 100644 --- a/Tests/CMakeCommands/target_include_directories/consumer.cpp +++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp @@ -2,7 +2,6 @@ #include "common.h" #include "publicinclude.h" #include "interfaceinclude.h" -#include "importedinterfaceinclude.h" #ifdef PRIVATEINCLUDE_DEFINE #error Unexpected PRIVATEINCLUDE_DEFINE @@ -16,10 +15,6 @@ #error Expected INTERFACEINCLUDE_DEFINE #endif -#ifndef IMPORTEDINTERFACEINCLUDE_DEFINE -#error Expected IMPORTEDINTERFACEINCLUDE_DEFINE -#endif - #ifndef CURE_DEFINE #error Expected CURE_DEFINE #endif |