Skip to content

Commit

Permalink
build: Use 'option' instead of 'set' for build variables
Browse files Browse the repository at this point in the history
  • Loading branch information
petermost committed Jun 25, 2024
1 parent 60d8c28 commit 7b44fa4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ endif()
include(CMakePrintHelpers)


# Configure which language(s) should be supported:
set(BUILD_CXX_LANGUAGE_PACKAGE OFF CACHE BOOL "Add C/C++ support to the Sourcetrail indexer.")
set(BUILD_JAVA_LANGUAGE_PACKAGE OFF CACHE BOOL "Add Java support to the Sourcetrail indexer.")
set(BUILD_PYTHON_LANGUAGE_PACKAGE OFF CACHE BOOL "Add Python support to the Sourcetrail indexer.")
# Configure which language(s)/package(s) should be supported:
option(BUILD_CXX_LANGUAGE_PACKAGE "Add C/C++ support to the Sourcetrail indexer." OFF)
option(BUILD_JAVA_LANGUAGE_PACKAGE "Add Java support to the Sourcetrail indexer." OFF)
option(BUILD_PYTHON_LANGUAGE_PACKAGE "Add Python support to the Sourcetrail indexer." OFF)
option(BUILD_UNIT_TESTS_PACKAGE "Build the corresponding language unit tests." OFF)

configure_file(cmake/language_packages.h.in src/lib/language_packages.h)

# Configure whether unit tests should be supported:
set(BUILD_UNIT_TESTS_PACKAGE OFF CACHE BOOL "Build the corresponding language unit tests.")

# prohibit in-source-builds
if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
message(FATAL_ERROR "In-source-builds are strongly discouraged and not supported!")
Expand Down

0 comments on commit 7b44fa4

Please sign in to comment.