mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[FAQ] mention USE_CXX=off
This commit is contained in:
parent
80c3463dbb
commit
7e3df51031
@ -14,10 +14,10 @@ include(FeatureSummary)
|
||||
option(DFSG_BUILD "DFSG build (no non-free media/code)" OFF)
|
||||
option(USE_ASAN "Build with AddressSanitizer" OFF)
|
||||
option(USE_COVERAGE "Assess code coverage with llvm-cov/lcov" OFF)
|
||||
option(USE_CPP "Build C++ code" ON)
|
||||
option(USE_CXX "Build C++ code" ON)
|
||||
cmake_dependent_option(
|
||||
USE_DOCTEST "Build notcurses-tester with doctest" ON
|
||||
"BUILD_TESTING;USE_CPP" OFF
|
||||
"BUILD_TESTING;USE_CXX" OFF
|
||||
)
|
||||
option(USE_DEFLATE "Use libdeflate instead of libz" ON)
|
||||
option(USE_DOXYGEN "Build HTML cross reference with doxygen" OFF)
|
||||
@ -39,18 +39,18 @@ set(USE_OIIO OFF)
|
||||
if(${USE_MULTIMEDIA} STREQUAL "ffmpeg")
|
||||
set(USE_FFMPEG ON)
|
||||
elseif(${USE_MULTIMEDIA} STREQUAL "oiio")
|
||||
if(NOT ${USE_CPP})
|
||||
message(FATAL_ERROR "USE_CPP must be on to use OpenImageIO.")
|
||||
if(NOT ${USE_CXX})
|
||||
message(FATAL_ERROR "USE_CXX must be on to use OpenImageIO.")
|
||||
endif()
|
||||
set(USE_OIIO ON)
|
||||
elseif(NOT ${USE_MULTIMEDIA} STREQUAL "none")
|
||||
message(FATAL_ERROR "USE_MULTIMEDIA must be one of 'oiio', 'ffmpeg', 'none' (was '${USE_MULTIMEDIA}').")
|
||||
endif()
|
||||
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
@ -69,7 +69,7 @@ if(${USE_COVERAGE})
|
||||
endif()
|
||||
# FIXME requires clang11+
|
||||
string(APPEND CMAKE_C_FLAGS_DEBUG " --coverage -fprofile-instr-generate -fcoverage-mapping")
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
if(NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
|
||||
message(FATAL_ERROR "USE_COVERAGE was on but CXX isn't clang++")
|
||||
endif()
|
||||
@ -405,7 +405,7 @@ target_link_directories(notcurses-static PRIVATE ${OIIO_STATIC_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
############################################################################
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
# libnotcurses++ (C++ wrappers)
|
||||
set(NCPP_SOURCES
|
||||
src/libcpp/FDPlane.cc
|
||||
@ -535,7 +535,7 @@ foreach(f ${POCSRCS})
|
||||
PRIVATE "${TERMINFO_LIBRARY_DIRS}"
|
||||
)
|
||||
endforeach()
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
file(GLOB POCPPSRCS CONFIGURE_DEPENDS src/pocpp/*.cpp)
|
||||
foreach(f ${POCPPSRCS})
|
||||
get_filename_component(fe "${f}" NAME_WE)
|
||||
@ -603,7 +603,7 @@ target_link_libraries(notcurses-info
|
||||
|
||||
############################################################################
|
||||
# notcurses-input
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
file(GLOB INPUTSRCS CONFIGURE_DEPENDS src/input/input.cpp)
|
||||
add_executable(notcurses-input ${INPUTSRCS})
|
||||
target_include_directories(notcurses-input
|
||||
@ -687,7 +687,7 @@ file(GLOB MANSOURCE1 CONFIGURE_DEPENDS doc/man/man1/*.md)
|
||||
file(GLOB MANSOURCE3 CONFIGURE_DEPENDS doc/man/man3/*.md)
|
||||
|
||||
# all further binaries require multimedia and C++ support
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
if(${USE_MULTIMEDIA} STREQUAL "none")
|
||||
list(FILTER MANSOURCE1 EXCLUDE REGEX "ncls.1.md")
|
||||
list(FILTER MANSOURCE1 EXCLUDE REGEX "ncplayer.1.md")
|
||||
@ -731,7 +731,7 @@ endif()
|
||||
############################################################################
|
||||
# testing
|
||||
if(${BUILD_TESTING})
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
#set(CMAKE_CTEST_ARGUMENTS "-V")
|
||||
if(${USE_DOCTEST})
|
||||
file(GLOB TESTSRCS CONFIGURE_DEPENDS src/tests/*.cpp src/compat/*.c)
|
||||
@ -772,7 +772,7 @@ add_test(
|
||||
NAME notcurses-info
|
||||
COMMAND notcurses-info
|
||||
)
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
add_test(
|
||||
NAME ncpp_build
|
||||
COMMAND ncpp_build
|
||||
@ -990,7 +990,7 @@ install(TARGETS ncneofetch DESTINATION bin)
|
||||
if(NOT WIN32)
|
||||
install(TARGETS ncman DESTINATION bin)
|
||||
endif()
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
install(TARGETS notcurses-input DESTINATION bin)
|
||||
install(TARGETS nctetris DESTINATION bin)
|
||||
if(NOT ${USE_MULTIMEDIA} STREQUAL "none")
|
||||
@ -1003,7 +1003,7 @@ LIST(APPEND INSTLIBS notcurses-core notcurses)
|
||||
if(${USE_STATIC})
|
||||
LIST(APPEND INSTLIBS notcurses-core-static notcurses-static)
|
||||
endif()
|
||||
if(${USE_CPP})
|
||||
if(${USE_CXX})
|
||||
LIST(APPEND INSTLIBS notcurses++)
|
||||
if(${USE_STATIC})
|
||||
LIST(APPEND INSTLIBS notcurses++-static)
|
||||
|
30
INSTALL.md
30
INSTALL.md
@ -120,19 +120,19 @@ To set the C compiler, export `CC`. To set the C++ compiler, export `CXX`. The
|
||||
`CMAKE_BUILD_TYPE` CMake variable can be defined to any of its standard values,
|
||||
but must be `Debug` for use of `USE_COVERAGE`.
|
||||
|
||||
* `DFSG_BUILD`: leave out all content considered non-free under the Debian Free
|
||||
* `DFSG_BUILD=off`: leave out all content considered non-free under the Debian Free
|
||||
Software Guidelines
|
||||
* `BUILD_TESTING`: build test targets
|
||||
* `USE_ASAN`: build with AddressSanitizer
|
||||
* `USE_CPP`: build C++ code (requires a C++ compiler)
|
||||
* `USE_COVERAGE`: build coverage support (for developers, requires use of Clang)
|
||||
* `USE_DOCTEST`: build `notcurses-tester` with Doctest, requires `BUILD_TESTING`
|
||||
* `USE_DOCTEST=on` requires `USE_CPP=off`
|
||||
* `USE_DOXYGEN`: build interlinked HTML documentation with Doxygen
|
||||
* `USE_GPM`: build GPM console mouse support via libgpm
|
||||
* `USE_MULTIMEDIA`: `ffmpeg` for FFmpeg, `oiio` for OpenImageIO, `none` for none
|
||||
* `oiio` cannot be used with `USE_CPP=off`
|
||||
* `USE_PANDOC`: build man pages with pandoc
|
||||
* `USE_POC`: build small, uninstalled proof-of-concept binaries
|
||||
* `USE_QRCODEGEN`: build qrcode support via libqrcodegen
|
||||
* `USE_STATIC`: build static libraries (in addition to shared ones)
|
||||
* `BUILD_TESTING=on`: build test targets
|
||||
* `USE_ASAN=off`: build with AddressSanitizer
|
||||
* `USE_CXX=on`: build C++ code (requires a C++ compiler)
|
||||
* `USE_COVERAGE=off`: build coverage support (for developers, requires use of Clang)
|
||||
* `USE_DOCTEST=on`: build `notcurses-tester` with Doctest, requires `BUILD_TESTING`
|
||||
* `USE_DOCTEST=on` requires `USE_CXX=on`
|
||||
* `USE_DOXYGEN=off`: build interlinked HTML documentation with Doxygen
|
||||
* `USE_GPM=off`: build GPM console mouse support via libgpm
|
||||
* `USE_MULTIMEDIA=ffmpeg`: `ffmpeg` for FFmpeg, `oiio` for OpenImageIO, `none` for none
|
||||
* `oiio` cannot be used with `USE_CXX=off`
|
||||
* `USE_PANDOC=on`: build man pages with pandoc
|
||||
* `USE_POC=on`: build small, uninstalled proof-of-concept binaries
|
||||
* `USE_QRCODEGEN=off`: build qrcode support via libqrcodegen
|
||||
* `USE_STATIC=on`: build static libraries (in addition to shared ones)
|
||||
|
@ -281,6 +281,7 @@ If things break or seem otherwise lackluster, **please** consult the
|
||||
wrappers, nor can you build with the OpenImageIO multimedia backend (OIIO
|
||||
ships C++ headers). You'll be able to build the main library, though, as
|
||||
well as <code>notcurses-demo</code> (and maybe a few other binaries).
|
||||
Use <code>-DUSE_CXX=off</code>.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user