[libcxx-commits] [libcxx] [libc++] Remove unmaintained LIBCXX_CONFIGURE_IDE (PR #100574)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 25 07:02:00 PDT 2024
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/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.
>From dcd1ba3c3056a730bfd65cd3ec84939f62086fa6 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 15 Jul 2024 15:16:41 -0400
Subject: [PATCH] [libc++] Remove unmaintained LIBCXX_CONFIGURE_IDE
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.
---
libcxx/CMakeLists.txt | 7 -------
libcxx/src/CMakeLists.txt | 14 --------------
libcxx/test/CMakeLists.txt | 23 -----------------------
3 files changed, 44 deletions(-)
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 674082c7d1787..917c6becb7835 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -314,13 +314,6 @@ option(LIBCXX_GENERATE_COVERAGE "Enable generating code coverage." OFF)
set(LIBCXX_COVERAGE_LIBRARY "" CACHE STRING
"The Profile-rt library used to build with code coverage")
-set(LIBCXX_CONFIGURE_IDE_DEFAULT OFF)
-if (XCODE OR MSVC_IDE)
- set(LIBCXX_CONFIGURE_IDE_DEFAULT ON)
-endif()
-option(LIBCXX_CONFIGURE_IDE "Configure libcxx for use within an IDE"
- ${LIBCXX_CONFIGURE_IDE_DEFAULT})
-
set(LIBCXX_HERMETIC_STATIC_LIBRARY_DEFAULT OFF)
if (WIN32)
set(LIBCXX_HERMETIC_STATIC_LIBRARY_DEFAULT ON)
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 0dfc9647558d4..bfc88c4c58812 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -143,20 +143,6 @@ if (LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
)
endif()
-# Add all the headers to the project for IDEs.
-if (LIBCXX_CONFIGURE_IDE)
- file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
- if(WIN32)
- file( GLOB LIBCXX_WIN32_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/__support/win32/*.h)
- list(APPEND LIBCXX_HEADERS ${LIBCXX_WIN32_HEADERS})
- endif()
- # Force them all into the headers dir on MSVC, otherwise they end up at
- # project scope because they don't have extensions.
- if (MSVC_IDE)
- source_group("Header Files" FILES ${LIBCXX_HEADERS})
- endif()
-endif()
-
if(NOT LIBCXX_INSTALL_LIBRARY)
set(exclude_from_all EXCLUDE_FROM_ALL)
endif()
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index cdd1c2d90fbcf..b4e59b89c0be3 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -64,26 +64,3 @@ if (LIBCXX_GENERATE_COVERAGE)
set(extract_dirs "${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")
setup_lcov_test_target_coverage("cxx" "${output_dir}" "${capture_dirs}" "${extract_dirs}")
endif()
-
-if (LIBCXX_CONFIGURE_IDE)
- # Create dummy targets for each of the tests in the test suite, this allows
- # IDE's such as CLion to correctly highlight the tests because it knows
- # roughly what include paths/compile flags/macro definitions are needed.
- include_directories(support)
- file(GLOB_RECURSE LIBCXX_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/*.pass.cpp)
- file(GLOB LIBCXX_TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/support/*)
- file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
- add_executable(libcxx_test_objects EXCLUDE_FROM_ALL
- ${LIBCXX_TESTS} ${LIBCXX_TEST_HEADERS} ${LIBCXX_HEADERS})
- add_dependencies(libcxx_test_objects cxx)
-
- split_list(LIBCXX_COMPILE_FLAGS)
- split_list(LIBCXX_LINK_FLAGS)
-
- set_target_properties(libcxx_test_objects
- PROPERTIES
- COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
- LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
- EXCLUDE_FROM_ALL ON
- )
-endif()
More information about the libcxx-commits
mailing list