Skip to content

Commit

Permalink
Purge CMake's clang-format, clang-tidy, CPM
Browse files Browse the repository at this point in the history
  • Loading branch information
ibis-hdl committed Dec 17, 2024
1 parent ac35898 commit 93faf7d
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 1,606 deletions.
1 change: 1 addition & 0 deletions .vscode/dictionaries/cpp_terms.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
libcxx
PTHREAD
1 change: 1 addition & 0 deletions .vscode/dictionaries/project_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ devcontainers
doxyfile
gitmodules
gnuc
iwyu
libc
libcpp
MAXSIZE
Expand Down
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,6 @@ list(APPEND
)

include(prevent_in_source_builds)


## [Conan C/C++ Open Source Package Manager](https://github.com/conan-io/cmake-conan)
## ... "cmake-conan is not compatible with Conan 2.0"
#find_package(Python3 COMPONENTS Interpreter REQUIRED)

# [cpm-cmake/CPM.cmake](https://github.com/cpm-cmake/CPM.cmake)
# download if required, but it's on git
#file(DOWNLOAD
# https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.2/CPM.cmake
# ${PROJECT_SOURCE_DIR}/cmake/module/CPM.cmake
# EXPECTED_HASH SHA256=c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d
# STATUS result
#)
include(cmake/module/CPM.cmake) # FixMe full path

include(options_build)
include(options_developer)
include(external_deps)
Expand Down
52 changes: 33 additions & 19 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,38 @@ This project aims to become a VHDL compiler.

## Build the `update-2024` branch

### on Windows

Ensure you have VS 2022 (Community).

```powershell
> virtualenv .win64-venv
...
> .\.win64-venv\Scripts\activate
> pip install -r requirements.txt
...
> py .\conan_install.py --profile msvc
...
> cmake --preset msvc
...
> cmake --build --preset msvc-release
...
> ctest.exe --preset msvc-release-test
...
```

## Customize CMake build

CMake supports two files, `CMakePresets.json` and `CMakeUserPresets.json`, that allow users to
specify common configure, build, and test options and share them with others. For more
information see [cmake-presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).

### CCache on Linux using GnuC gcc

To use, e.g. [Ccache (a fast C/C++ compiler cache)](https://ccache.dev/) for CMake's configure phase, write your own `CMakeUserPresets.json` with

```json
{
{
"version": 8,
"include": [
Expand Down Expand Up @@ -54,7 +77,7 @@ To use, e.g. [Ccache (a fast C/C++ compiler cache)](https://ccache.dev/) for CMa
"workflowPresets": [
{
"name": "GnuC Release (CCache)",
"displayName": "CI GnuC Debug",
"displayName": "CI GnuC Release (CCache)",
"description": "Continuous Integration/Continuous Delivery using GnUC (Release)",
"steps": [
{
Expand All @@ -75,7 +98,7 @@ To use, e.g. [Ccache (a fast C/C++ compiler cache)](https://ccache.dev/) for CMa
}
```

The build and test presets remain. The JSON `common.json` already contains a predefined "ccache" section:
The JSON `common.json` already contains a predefined "ccache" section:

```
{
Expand All @@ -91,26 +114,17 @@ The build and test presets remain. The JSON `common.json` already contains a pre
},
```

### on Windows

Ensure you have VS 2022 (Community).
### Todo

```powershell
> virtualenv .win64-venv
...
> .\.win64-venv\Scripts\activate
> pip install -r requirements.txt
...
> py .\conan_install.py --profile msvc
...
> cmake --preset msvc
...
> cmake --build --preset msvc-release
...
> ctest.exe --preset msvc-release-test
...
```
# hide time intensive compiling from Clang-Tidy
set_source_files_properties(
src/parser/grammar.cpp
PROPERTIES
SKIP_LINTING ON
```

------------------------------------------------------------------

## Project structure

Expand Down
64 changes: 0 additions & 64 deletions cmake/clang-format.cmake

This file was deleted.

Loading

0 comments on commit 93faf7d

Please sign in to comment.