Tests: Speed up RunCMake.include_directories test
Remove unnecessary language initializations. Change the main CMakeLists.txt project() call to specify NONE. Use enable_language(CXX) instead of project() in cases that need it to avoid enabling C too.
This commit is contained in:
parent
6eee5d7449
commit
9998d78d63
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(BinaryDirectoryInInterface)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
|
||||
target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/foo")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
if(NOT TEST_FILE)
|
||||
set(TEST_FILE ${RunCMake_TEST}.cmake)
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(DebugIncludes)
|
||||
enable_language(CXX)
|
||||
|
||||
set(CMAKE_DEBUG_TARGET_PROPERTIES INCLUDE_DIRECTORIES)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
enable_language(CXX)
|
||||
add_library(testTarget empty.cpp)
|
||||
target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/dir")
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(ImportedTarget)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(InstallPrefixInInterface)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
|
||||
target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/foo")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(RelativePathInInterface)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
|
||||
set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<1:foo>")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(RelativePathInInterface)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
|
||||
set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "foo")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
project(SourceDirectoryInInterface)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
|
||||
target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/foo")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
enable_language(CXX)
|
||||
add_library(foo empty.cpp)
|
||||
set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<0:>/include/subdir)
|
||||
set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_PREFIX>/include/subdir)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
project(incomplete-genex)
|
||||
enable_language(CXX)
|
||||
|
||||
cmake_policy(SET CMP0022 NEW)
|
||||
cmake_policy(SET CMP0023 NEW)
|
||||
|
|
Loading…
Reference in New Issue