Skip to content

Commit

Permalink
Add prefixes to CMake option names
Browse files Browse the repository at this point in the history
  • Loading branch information
qak authored and ridiculousfish committed Dec 2, 2023
1 parent 5d083f9 commit 561fb2c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ add_compile_options(

# Build options ################################################

option(BUILD_TESTS "Build the test programs" ON)
option(BUILD_FUZZERS "Build the fuzzers (requires clang)" OFF)
option(LIBDIVIDE_BUILD_TESTS "Build the test programs" ON)
option(LIBDIVIDE_BUILD_FUZZERS "Build the fuzzers (requires clang)" OFF)

# By default we automatically enable vectors supported by
# the host CPU. You may also set these explicitly to OFF or ON.
Expand Down Expand Up @@ -68,7 +68,7 @@ endif()
# cross-compiling otherwise the following error will occur:
# CMake Error: TRY_RUN() invoked in cross-compiling mode, ...

if (BUILD_TESTS AND NOT CMAKE_CROSSCOMPILING)
if (LIBDIVIDE_BUILD_TESTS AND NOT CMAKE_CROSSCOMPILING)
check_cxx_source_compiles("
int main()
{
Expand Down Expand Up @@ -262,7 +262,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libdivideConfigVersion.cmake"

# Build test programs ##########################################

if (BUILD_TESTS)
if (LIBDIVIDE_BUILD_TESTS)
find_package(Threads REQUIRED QUIET)

add_executable(tester test/tester.cpp)
Expand Down Expand Up @@ -294,7 +294,7 @@ endif()

# Enable testing ###############################################

if (BUILD_TESTS)
if (LIBDIVIDE_BUILD_TESTS)
enable_testing()
add_test(tester tester)
add_test(benchmark_branchfree benchmark_branchfree)
Expand All @@ -307,7 +307,7 @@ endif()

# Build the fuzzers (requires clang) ###########################

if (BUILD_FUZZERS)
if (LIBDIVIDE_BUILD_FUZZERS)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(fuzzflags "-fsanitize=fuzzer,address")

Expand Down

0 comments on commit 561fb2c

Please sign in to comment.