Skip to content

Commit 52b6b1e

Browse files
authored
[libc++] Remove unmaintained LIBCXX_CONFIGURE_IDE (#100574)
The premise of LIBCXX_CONFIGURE_IDE is nice, however in practice this setting has not been maintained and as a result it basically doesn't work properly. For example, it doesn't take into account the headers we generate, and its handling of the tests is too naive for it to be really helpful. This patch removes the setting in order to simplify the CMake setup a bit, but most importantly to remove unnecessary interactions between our main CMake build of the library and the test suite.
1 parent 0307dd0 commit 52b6b1e

File tree

3 files changed

+0
-44
lines changed

3 files changed

+0
-44
lines changed

libcxx/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,6 @@ option(LIBCXX_GENERATE_COVERAGE "Enable generating code coverage." OFF)
314314
set(LIBCXX_COVERAGE_LIBRARY "" CACHE STRING
315315
"The Profile-rt library used to build with code coverage")
316316

317-
set(LIBCXX_CONFIGURE_IDE_DEFAULT OFF)
318-
if (XCODE OR MSVC_IDE)
319-
set(LIBCXX_CONFIGURE_IDE_DEFAULT ON)
320-
endif()
321-
option(LIBCXX_CONFIGURE_IDE "Configure libcxx for use within an IDE"
322-
${LIBCXX_CONFIGURE_IDE_DEFAULT})
323-
324317
set(LIBCXX_HERMETIC_STATIC_LIBRARY_DEFAULT OFF)
325318
if (WIN32)
326319
set(LIBCXX_HERMETIC_STATIC_LIBRARY_DEFAULT ON)

libcxx/src/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,6 @@ if (LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
143143
)
144144
endif()
145145

146-
# Add all the headers to the project for IDEs.
147-
if (LIBCXX_CONFIGURE_IDE)
148-
file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
149-
if(WIN32)
150-
file( GLOB LIBCXX_WIN32_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/__support/win32/*.h)
151-
list(APPEND LIBCXX_HEADERS ${LIBCXX_WIN32_HEADERS})
152-
endif()
153-
# Force them all into the headers dir on MSVC, otherwise they end up at
154-
# project scope because they don't have extensions.
155-
if (MSVC_IDE)
156-
source_group("Header Files" FILES ${LIBCXX_HEADERS})
157-
endif()
158-
endif()
159-
160146
if(NOT LIBCXX_INSTALL_LIBRARY)
161147
set(exclude_from_all EXCLUDE_FROM_ALL)
162148
endif()

libcxx/test/CMakeLists.txt

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,3 @@ if (LIBCXX_GENERATE_COVERAGE)
6161
set(extract_dirs "${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")
6262
setup_lcov_test_target_coverage("cxx" "${output_dir}" "${capture_dirs}" "${extract_dirs}")
6363
endif()
64-
65-
if (LIBCXX_CONFIGURE_IDE)
66-
# Create dummy targets for each of the tests in the test suite, this allows
67-
# IDE's such as CLion to correctly highlight the tests because it knows
68-
# roughly what include paths/compile flags/macro definitions are needed.
69-
include_directories(support)
70-
file(GLOB_RECURSE LIBCXX_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/*.pass.cpp)
71-
file(GLOB LIBCXX_TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/support/*)
72-
file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
73-
add_executable(libcxx_test_objects EXCLUDE_FROM_ALL
74-
${LIBCXX_TESTS} ${LIBCXX_TEST_HEADERS} ${LIBCXX_HEADERS})
75-
add_dependencies(libcxx_test_objects cxx)
76-
77-
split_list(LIBCXX_COMPILE_FLAGS)
78-
split_list(LIBCXX_LINK_FLAGS)
79-
80-
set_target_properties(libcxx_test_objects
81-
PROPERTIES
82-
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
83-
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
84-
EXCLUDE_FROM_ALL ON
85-
)
86-
endif()

0 commit comments

Comments
 (0)