Skip to content

Commit 97053f5

Browse files
committed
Renaming of some macros
1 parent 1c32ea6 commit 97053f5

File tree

8 files changed

+18
-22
lines changed

8 files changed

+18
-22
lines changed

.github/workflows/ci_modular.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ jobs:
5858
-DCMAKE_MAXIMUM_RANK:String=4
5959
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
6060
-DFIND_BLAS:STRING=FALSE
61-
-DSTDLIB_NO_ANSI:STRING=${{ matrix.with_ansi }}
61+
-DSTDLIB_ANSI:STRING=${{ matrix.with_ansi }}
6262
-DSTDLIB_BITSET:STRING=${{ matrix.with_bitset }}
63-
-DSTDLIB_NO_HASHMAPS:STRING=${{ matrix.with_hashmaps }}
63+
-DSTDLIB_HASHMAPS:STRING=${{ matrix.with_hashmaps }}
6464
-DSTDLIB_STATS:STRING=${{ matrix.with_stats }}
6565
-S . -B ${{ env.BUILD_DIR }}
6666

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ else()
6666
add_compile_definitions(STDLIB_BITSET=0)
6767
endif()
6868

69-
option(STDLIB_NO_HASHMAPS "Does not compile STDLIB HASHMAPS" OFF)
69+
option(STDLIB_HASHMAPS "Compile STDLIB HASHMAPS" ON)
7070

71-
if(STDLIB_NO_HASHMAPS)
71+
if(STDLIB_HASHMAPS)
72+
message(STATUS "Enable stdlib hashmaps module")
73+
add_compile_definitions(STDLIB_HASHMAPS=1)
74+
else()
7275
message(STATUS "Disable stdlib hashmaps module")
73-
add_compile_definitions(STDLIB_NO_HASHMAPS)
76+
add_compile_definitions(STDLIB_HASHMAPS=0)
7477
endif()
7578

7679
option(STDLIB_STATS "Compile STDLIB STATS" ON)

example/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ endmacro(ADD_EXAMPLEPP)
1616

1717

1818

19-
if (NOT STDLIB_NO_ANSI)
19+
if (STDLIB_ANSI)
2020
add_subdirectory(ansi)
2121
endif()
2222
add_subdirectory(array)
@@ -26,7 +26,7 @@ if (STDLIB_BITSET)
2626
endif()
2727
add_subdirectory(constants)
2828
add_subdirectory(error)
29-
if (NOT STDLIB_NO_HASHMAPS)
29+
if (STDLIB_HASHMAPS)
3030
add_subdirectory(hashmaps)
3131
endif()
3232
add_subdirectory(hash_procedures)

include/macros.inc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
#define STDLIB_BITSET 1
55
#endif
66

7-
!Default: compile the hashmaps module
8-
#ifdef STDLIB_NO_HASHMAPS
9-
#define STDLIB_HASHMAPS 0
10-
#else
11-
#define STDLIB_HASHMAPS 1
12-
#endif
13-
147
!Default: compile the stats module
158
#if !defined STDLIB_STATS
169
#define STDLIB_STATS 1

src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (NOT STDLIB_NO_ANSI)
1+
if (STDLIB_ANSI)
22
add_subdirectory(ansi)
33
endif()
44

@@ -14,7 +14,7 @@ add_subdirectory(core)
1414

1515
add_subdirectory(hash)
1616

17-
if (NOT STDLIB_NO_HASHMAPS)
17+
if (STDLIB_HASHMAPS)
1818
add_subdirectory(hashmaps)
1919
endif()
2020

@@ -56,10 +56,10 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
5656
array
5757
constants
5858
core
59-
$<$<NOT:$<BOOL:${STDLIB_NO_ANSI}>>:ansi>
59+
$<$<BOOL:${STDLIB_ANSI}>:ansi>
6060
$<$<BOOL:${STDLIB_BITSET}>:bitsets>
6161
hash
62-
$<$<NOT:$<BOOL:${STDLIB_NO_HASHMAPS}>>:hashmaps>
62+
$<$<BOOL:${STDLIB_HASHMAPS}>:hashmaps>
6363
intrinsics
6464
io
6565
linalg_core

src/math/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ set(math_cppFiles
1414

1515
configure_stdlib_target(math "" math_fppFiles math_cppFiles)
1616

17-
target_link_libraries(math PUBLIC core strings $<$<NOT:$<BOOL:${STDLIB_NO_BITSET}>>:bitsets>)
17+
target_link_libraries(math PUBLIC core strings $<$<BOOL:${STDLIB_BITSET}>:bitsets>)

src/sorting/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ set(sorting_f90Files
1414

1515
configure_stdlib_target(sorting sorting_f90Files sorting_fppFiles sorting_cppFiles)
1616

17-
target_link_libraries(sorting PUBLIC core strings $<$<NOT:$<BOOL:${STDLIB_NO_BITSET}>>:bitsets>)
17+
target_link_libraries(sorting PUBLIC core strings $<$<BOOL:${STDLIB_BITSET}>:bitsets>)

test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ endif()
3535
add_subdirectory(constants)
3636
add_subdirectory(hash_functions)
3737
add_subdirectory(hash_functions_perf)
38-
if (NOT STDLIB_NO_HASHMAPS)
38+
if (STDLIB_HASHMAPS)
3939
add_subdirectory(hashmaps)
4040
endif()
4141
add_subdirectory(intrinsics)
@@ -54,6 +54,6 @@ add_subdirectory(system)
5454
add_subdirectory(quadrature)
5555
add_subdirectory(math)
5656
add_subdirectory(stringlist)
57-
if (NOT STDLIB_NO_ANSI)
57+
if (STDLIB_ANSI)
5858
add_subdirectory(terminal)
5959
endif()

0 commit comments

Comments
 (0)