Skip to content

Commit 2d09366

Browse files
drop toolchain, use target specific flags
1 parent 21395c5 commit 2d09366

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

cmake/linux-clang-toolchain.cmake

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/CMakePresets.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,13 @@
3434
"lhs": "${hostSystemName}",
3535
"rhs": "Linux"
3636
},
37-
"toolchainFile": "${sourceDir}/cmake/linux-clang-toolchain.cmake",
3837
"environment": {
3938
"FUZZING_FLAGS": "-fsanitize=fuzzer,address,signed-integer-overflow,undefined -fno-omit-frame-pointer"
4039
},
4140
"cacheVariables": {
4241
"JWT_ENABLE_FUZZING": "ON",
43-
"CMAKE_C_COMPILER_WORKS": "ON",
44-
"CMAKE_CXX_COMPILER_WORKS": "ON",
45-
"CMAKE_C_FLAGS": "$env{FUZZING_FLAGS} -g -O1",
46-
"CMAKE_CXX_FLAGS": "$env{FUZZING_FLAGS} -g -O1",
47-
"CMAKE_EXE_LINKER_FLAGS": "$env{FUZZING_FLAGS}",
48-
"CMAKE_MODULE_LINKER_FLAGS": "$env{FUZZING_FLAGS}"
42+
"CMAKE_C_COMPILER": "clang",
43+
"CMAKE_CXX_COMPILER": "clang++"
4944
}
5045
},
5146
{

tests/fuzz/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ endif()
44

55
function(ADD_FUZZING_EXECUTABLE TARGET)
66
add_executable(jwt-cpp-fuzz-${TARGET} "${TARGET}.cpp")
7+
target_compile_options(jwt-cpp-fuzz-${TARGET} PRIVATE -g -O1 $ENV{FUZZING_FLAGS})
8+
target_link_options(jwt-cpp-fuzz-${TARGET} PRIVATE $ENV{FUZZING_FLAGS})
79
target_link_libraries(jwt-cpp-fuzz-${TARGET} PRIVATE jwt-cpp::jwt-cpp)
810
endfunction()
911

0 commit comments

Comments
 (0)