diff options
author | Devashish <devashishjaiswal86@gmail.com> | 2020-05-03 22:51:13 +0530 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-04 09:50:45 +0200 |
commit | f22c973ba38c1a0850050679203d0fbe1a3d15f9 (patch) | |
tree | 2fd6b4291c65d6bfe0da0c158296fb54e2a37428 /Meta/CLion | |
parent | f09a8f8a6e8d5c10b4001caeaa9c77732aedc900 (diff) | |
download | serenity-f22c973ba38c1a0850050679203d0fbe1a3d15f9.zip |
Meta: Add configuration for setting up project in CLion
This commit adds a CMakeLists.txt file that will be used by CLion to
configure the project and documentation explaining the steps to follow.
Configuring CLion this way enables important features like code
completion and file search. The configuration isn't perfect. There are
source files for which CLion cannot pick up the headers and asks to
manually include them from certain directories. But for the most part,
it works all right.
Diffstat (limited to 'Meta/CLion')
-rw-r--r-- | Meta/CLion/CMakeLists.txt | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Meta/CLion/CMakeLists.txt b/Meta/CLion/CMakeLists.txt new file mode 100644 index 0000000000..4e060c8b4a --- /dev/null +++ b/Meta/CLion/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.0) +project(serenity) +set(CMAKE_CXX_STANDARD 17) + +file(GLOB_RECURSE AK_SOURCES "serenity/AK/*.cpp") +file(GLOB_RECURSE APPLICATIONS_SOURCES "serenity/Applications/*.cpp") +file(GLOB_RECURSE BASE_SOURCES "serenity/Base/*.cpp") +file(GLOB_RECURSE DEMOS_SOURCES "serenity/Demos/*.cpp") +file(GLOB_RECURSE DEVTOOLS_SOURCES "serenity/DevTools/*.cpp") +file(GLOB_RECURSE GAMES_SOURCES "serenity/Games/*.cpp") +file(GLOB_RECURSE KERNEL_SOURCES "serenity/Kernel/*.cpp") +file(GLOB_RECURSE LIBRARIES_SOURCES "serenity/Libraries/*.cpp") +file(GLOB_RECURSE MENU_APPLETS_SOURCES "serenity/MenuApplets/*.cpp") +file(GLOB_RECURSE PORTS_SOURCES "serenity/Ports/*.cpp") +file(GLOB_RECURSE SERVERS_SOURCES "serenity/Servers/*.cpp") +file(GLOB_RECURSE SHELL_SOURCES "serenity/Shell/*.cpp") +file(GLOB_RECURSE TESTS_SOURCES "serenity/Tests/*.cpp") +file(GLOB_RECURSE TOOLCHAIN_SOURCES "serenity/Toolchain/*.cpp") +file(GLOB_RECURSE USERLAND_SOURCES "serenity/Userland/*.cpp") + +set(INCLUDE_DIRS + "serenity" + "serenity/Kernel" + "serenity/Libraries" + "serenity/Libraries/LibC" + "serenity/Libraries/LibPthread" + "serenity/Servers" + "serenity/Toolchain/Local/i686-pc-serenity/include/c++/9.3.0") + +add_library(serenity + ${AK_SOURCES} + ${APPLICATIONS_SOURCES} + ${BASE_SOURCES} + ${DEMOS_SOURCES} + ${DEVTOOLS_SOURCES} + ${GAMES_SOURCES} + ${KERNEL_SOURCES} + ${LIBRARIES_SOURCES} + ${MENU_APPLETS_SOURCES} + ${PORTS_SOURCES} + ${SERVERS_SOURCES} + ${SHELL_SOURCES} + ${TESTS_SOURCES} + ${TOOLCHAIN_SOURCES} + ${USERLAND_SOURCES}) + +target_compile_definitions(serenity PRIVATE __serenity__ USERLAND SANITIZE_PTRS DEBUG) +target_include_directories(serenity PRIVATE ${INCLUDE_DIRS}) |