diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b60fb15..e6c96f64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,6 @@ if (LIBCXX_BUILT_STANDALONE AND NOT LLVM_FOUND) "or -DLLVM_PATH=path/to/llvm-source-root.") endif() - #=============================================================================== # Setup CMake Options #=============================================================================== @@ -150,6 +149,13 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT LIBCXX_OVERRIDE_DARWIN_INSTALL endif() endif() +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}) + #=============================================================================== # Check option configurations #=============================================================================== diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1c8af3e6..d6a35f8e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -11,7 +11,7 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") endif() # Add all the headers to the project for IDEs. -if (MSVC_IDE OR XCODE) +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)