Commit 0f14b7ab by Antonio Maiorano

CMake: normalize FOLDER property for third_party targets

Rather than set the FOLDER property from within certain third-party CMakeLists.txt, do so from the root, and make them all go to a "third_party" folder. Bug: b/145758253 Change-Id: I7b9f69a8f16be8ef6e0d153fc28ac4f6c3d64e5e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48368 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 8d086fc3
......@@ -577,12 +577,15 @@ endif()
# LLVM
###########################################################
add_subdirectory(${THIRD_PARTY_DIR}/llvm-${SWIFTSHADER_LLVM_VERSION} EXCLUDE_FROM_ALL)
set_target_properties(llvm PROPERTIES FOLDER "third_party")
###########################################################
# Subzero
###########################################################
add_subdirectory(${THIRD_PARTY_DIR}/llvm-subzero EXCLUDE_FROM_ALL)
add_subdirectory(${THIRD_PARTY_DIR}/subzero EXCLUDE_FROM_ALL)
set_target_properties(llvm-subzero PROPERTIES FOLDER "third_party")
set_target_properties(subzero PROPERTIES FOLDER "third_party")
###########################################################
# marl
......@@ -590,6 +593,7 @@ add_subdirectory(${THIRD_PARTY_DIR}/subzero EXCLUDE_FROM_ALL)
if(BUILD_MARL)
set(MARL_THIRD_PARTY_DIR ${THIRD_PARTY_DIR})
add_subdirectory(${THIRD_PARTY_DIR}/marl)
set_target_properties(marl PROPERTIES FOLDER "third_party")
endif()
if(MARL_THREAD_SAFETY_ANALYSIS_SUPPORTED)
......@@ -609,6 +613,7 @@ endif()
###########################################################
if(SWIFTSHADER_ENABLE_ASTC)
add_subdirectory(${THIRD_PARTY_DIR}/astc-encoder)
set_target_properties(astc-encoder PROPERTIES FOLDER "third_party")
endif()
###########################################################
......@@ -621,6 +626,10 @@ if(SWIFTSHADER_BUILD_TESTS)
# gtest finds python, which picks python 2 first, if present.
# We need to undo this so that SPIR-V can later find python3.
unset(PYTHON_EXECUTABLE CACHE)
set_target_properties(gmock PROPERTIES FOLDER "third_party")
set_target_properties(gmock_main PROPERTIES FOLDER "third_party")
set_target_properties(gtest PROPERTIES FOLDER "third_party")
set_target_properties(gtest_main PROPERTIES FOLDER "third_party")
endif()
###########################################################
......@@ -901,6 +910,8 @@ if(SWIFTSHADER_BUILD_BENCHMARKS)
if (NOT TARGET benchmark::benchmark)
set(BENCHMARK_ENABLE_TESTING FALSE CACHE BOOL FALSE FORCE)
add_subdirectory(${THIRD_PARTY_DIR}/benchmark)
set_target_properties(benchmark PROPERTIES FOLDER "third_party")
set_target_properties(benchmark_main PROPERTIES FOLDER "third_party")
endif()
if (NOT TARGET glslang)
......
......@@ -39,7 +39,6 @@ add_library(astc-encoder STATIC EXCLUDE_FROM_ALL
set_target_properties(astc-encoder PROPERTIES
POSITION_INDEPENDENT_CODE 1
FOLDER "Core"
)
target_include_directories(astc-encoder
......
......@@ -1199,7 +1199,6 @@ add_library(llvm STATIC EXCLUDE_FROM_ALL ${LLVM_LIST})
set_target_properties(llvm PROPERTIES
POSITION_INDEPENDENT_CODE 1
FOLDER "LLVM"
)
target_include_directories(llvm
......
......@@ -229,7 +229,6 @@ add_library(llvm-subzero STATIC EXCLUDE_FROM_ALL
set_target_properties(llvm-subzero PROPERTIES
POSITION_INDEPENDENT_CODE 1
FOLDER "Subzero"
)
target_include_directories(llvm-subzero
......
......@@ -93,7 +93,6 @@ add_library(subzero STATIC EXCLUDE_FROM_ALL
set_target_properties(subzero PROPERTIES
POSITION_INDEPENDENT_CODE 1
FOLDER "Subzero"
)
target_include_directories(subzero
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment