Skip to content

Commit 72083a1

Browse files
committed
Build: rename cmake options with cae prefix
1 parent a28e027 commit 72083a1

8 files changed

Lines changed: 26 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
cmake --build cmake-build-release --config Release
4949
binary: cmake-build-release\bin\cae.exe
5050
build_test: |
51-
cmake -S . -G "Ninja" -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -DBUILD_CAE_TESTS=ON
51+
cmake -S . -G "Ninja" -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -DCAE_BUILD_TESTS=ON
5252
cmake --build cmake-build-release --config Release
5353
binary_test: cmake-build-release\bin\cae-tests.exe
5454
deps: choco install cmake -y

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
99
set(CMAKE_CXX_STANDARD 23)
1010
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111
set(CMAKE_CXX_EXTENSIONS OFF)
12+
set(CMAKE_C_STANDARD 23)
13+
set(CMAKE_C_STANDARD_REQUIRED ON)
14+
set(CMAKE_C_EXTENSIONS OFF)
1215
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
1316
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib")
1417
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib")
@@ -76,7 +79,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
7679
)
7780

7881
copy_directory_to_target(
79-
cae
82+
${PROJECT_NAME}
8083
"${CMAKE_SOURCE_DIR}/assets"
8184
"assets"
8285
)

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,26 @@ This section targets engine developers and contributors.
7777
- `CAE_STRICT_WARNINGS` (default: `OFF`): Enable strict warning level.
7878
- `CAE_ENABLE_SANITIZERS` (default: `OFF`): Enable address and undefined sanitizers.
7979
- `CAE_ENABLE_LTO` (default: `OFF`): Enable LTO on final targets.
80-
- `BUILD_CAE_TESTS` (default: `OFF`): Enable building unit tests.
81-
- `USE_CLANG_TIDY` (default: `OFF`): Enable clang tidy usage.
82-
- `USE_CLANG_FORMAT` (default: `OFF`): Enable clang format usage.
83-
- `BUILD_DOC` (default: `OFF`): Enable building doxygen documentation.
80+
- `CAE_BUILD_TESTS` (default: `OFF`): Enable building unit tests.
81+
- `CAE_CLANG_TIDY` (default: `OFF`): Enable clang tidy usage.
82+
- `CAE_CLANG_FORMAT` (default: `OFF`): Enable clang format usage.
83+
- `CAE_BUILD_DOC` (default: `OFF`): Enable building doxygen documentation.
8484

8585
### Testing
8686

8787
Unit tests are based on [Google Test](https://github.com/google/googletest).
8888

89-
```
89+
Use the `CAE_BUILD_TESTS` option.
90+
91+
```bash
92+
./cmake-build-release/bin/cae-tests
9093
```
9194

9295
### Build Doxygen documentation
9396

9497
documentation is generated using [Doxygen](https://www.doxygen.nl/).
9598

96-
```
97-
```
99+
Use the `CAE_BUILD_DOC` option.
98100

99101
## Third-party libraries
100102

cmake/modules/ClangFormat.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
option(USE_CLANG_FORMAT "Enable clang-format" OFF)
1+
option(CAE_CLANG_FORMAT "Enable clang-format" OFF)
22

3-
if (NOT USE_CLANG_FORMAT)
3+
if (NOT CAE_CLANG_FORMAT)
44
return()
55
endif()
66

cmake/modules/ClangTidy.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
option(USE_CLANG_TIDY "Enable clang-tidy static analysis" OFF)
1+
option(CAE_CLANG_TIDY "Enable clang-tidy static analysis" OFF)
22

3-
if (NOT USE_CLANG_TIDY)
3+
if (NOT CAE_CLANG_TIDY)
44
return()
55
endif()
66

cmake/modules/MakeDoc.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
option(BUILD_DOC "Build documentation" OFF)
1+
option(CAE_BUILD_DOC "Build documentation" OFF)
22

3-
if (NOT BUILD_DOC)
3+
if (NOT CAE_BUILD_DOC)
44
return()
55
endif()
66

scripts/unix/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ while [[ $# -gt 0 ]]; do
6060
case "$1" in
6161
--tidy)
6262
RUN_TIDY=ON
63-
CMAKE_CMD+=(-DUSE_CLANG_TIDY=ON)
63+
CMAKE_CMD+=(-DCAE_CLANG_TIDY=ON)
6464
;;
6565
--tests)
6666
RUN_TESTS=ON
67-
CMAKE_CMD+=(-DBUILD_CAE_TESTS=ON)
67+
CMAKE_CMD+=(-DCAE_BUILD_TESTS=ON)
6868
;;
6969
--format)
7070
RUN_FORMAT=ON
71-
CMAKE_CMD+=(-DUSE_CLANG_FORMAT=ON)
71+
CMAKE_CMD+=(-DCAE_CLANG_FORMAT=ON)
7272
;;
7373
--doc)
7474
RUN_DOC=ON
75-
CMAKE_CMD+=(-DBUILD_DOC=ON)
75+
CMAKE_CMD+=(-DCAE_BUILD_DOC=ON)
7676
;;
7777
*)
7878
echo "[WARNING] Unknown option: $1"

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
option(BUILD_CAE_TESTS "Build tests" OFF)
2-
if (BUILD_CAE_TESTS)
1+
option(CAE_BUILD_TESTS "Build tests" OFF)
2+
if (CAE_BUILD_TESTS)
33

44
project(cae-tests
55
DESCRIPTION "CAE unit tests"

0 commit comments

Comments
 (0)