- Notifications
You must be signed in to change notification settings - Fork1
Move to cmake build system#2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Overview of the build system | ||
| `datalog-cpp` uses the [CMake](www.cmake.org) build tool to generate build files for other build systems. Currently, building using clang and gcc with Makefiles are supported. | ||
| # Building with Makefiles | ||
| From the command line inside a git clone, run the following: | ||
| ``` | ||
| mkdir build | ||
| cd build | ||
| cmake ../src | ||
| make | ||
| ``` | ||
| # Building directly with CMake in Visual Studio 2019 | ||
| Visual Studio 2019 supports using CMake to manage the build directly by selecting File -> Open -> Cmake... and opening `src/CMakeLists.txt`. Then Visual Studio's normal build shortcuts will update the CMake configuration as well as building the project. | ||
| CMake options are configured using the `CMakeSettings.json` file, which Visual Studio will generate when `CMakeLists.txt` is opened. | ||
| # Build options | ||
| Additional configuration variables can be provided in the `cmake` invocation. | ||
| For Makefile builds, a build type can be specified by passing `-DCMAKE_BUILD_TYPE=Debug`, `-DCMAKE_BUILD_TYPE=MinSizeRel`, `-DCMAKE_BUILD_TYPE=Release`, or `-DCMAKE_BUILD_TYPE=RelWithDebInfo`. By default, Makefile builds will use `RelWithDebInfo`. |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # CMakeLists.txt | ||
| # CMake setup | ||
| cmake_minimum_required (VERSION 3.8) | ||
| # Set a default build type if none was specified | ||
| set(default_build_type "RelWithDebInfo") | ||
| if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
| message(STATUS "Setting build type to '${default_build_type}' as none was specified.") | ||
| set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE | ||
| STRING "Choose the type of build." FORCE) | ||
| # Set the possible values of build type for cmake-gui | ||
| set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS | ||
| "Debug" "Release" "MinSizeRel" "RelWithDebInfo") | ||
| endif() | ||
| # Project initialisation | ||
| project("datalog-cpp") | ||
| # specify the C++ standard | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| # types_test target | ||
| add_executable(types_test ../tests/types_test.cpp) | ||
| target_include_directories(types_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
| target_compile_definitions(types_test PUBLIC UNIX) |
Uh oh!
There was an error while loading.Please reload this page.