-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sleef prefix to cmake options. #509
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
|
||
# Options | ||
|
||
option(BUILD_SHARED_LIBS "Build shared libs" ON) | ||
option(BUILD_STATIC_TEST_BINS "Build statically linked test executables" OFF) | ||
option(ENABLE_LTO "Enable LTO on GCC or ThinLTO on clang" OFF) | ||
option(BUILD_LIBM "libsleef will be built." ON) | ||
option(BUILD_DFT "libsleefdft will be built." OFF) | ||
option(BUILD_QUAD "libsleefquad will be built." OFF) | ||
option(BUILD_GNUABI_LIBS "libsleefgnuabi will be built." ON) | ||
option(BUILD_SCALAR_LIB "libsleefscalar will be built." OFF) | ||
option(BUILD_TESTS "Tests will be built." ON) | ||
option(BUILD_INLINE_HEADERS "Build header for inlining whole SLEEF functions" OFF) | ||
option(SLEEF_BUILD_SHARED_LIBS "Build shared libs" ON) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We think this option should be removed altogether and we should keep using the standard cmake variable BUILD_SHARED_LIBS in the rest of the build system. This way we ensure consistency with projects using SLEEF. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if not set SLEEF_BUILD_SHARED_LIBS , and then use BUILD_SHARED_LIBS ? let SLEEF_BUILD_SHARED_LIBS overwrite BUILD_SHARED_LIBS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please rename all
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done.
|
||
option(SLEEF_BUILD_STATIC_TEST_BINS "Build statically linked test executables" OFF) | ||
option(SLEEF_ENABLE_LTO "Enable LTO on GCC or ThinLTO on clang" OFF) | ||
option(SLEEF_BUILD_LIBM "libsleef will be built." ON) | ||
option(SLEEF_BUILD_DFT "libsleefdft will be built." OFF) | ||
option(SLEEF_BUILD_QUAD "libsleefquad will be built." OFF) | ||
option(SLEEF_BUILD_GNUABI_LIBS "libsleefgnuabi will be built." ON) | ||
option(SLEEF_BUILD_SCALAR_LIB "libsleefscalar will be built." OFF) | ||
option(SLEEF_BUILD_TESTS "Tests will be built." ON) | ||
option(SLEEF_BUILD_INLINE_HEADERS "Build header for inlining whole SLEEF functions" OFF) | ||
|
||
option(SLEEF_TEST_ALL_IUT "Perform tests on implementations with all vector extensions" OFF) | ||
option(SLEEF_SHOW_CONFIG "Show SLEEF configuration status messages." ON) | ||
option(SLEEF_SHOW_ERROR_LOG "Show cmake error log." OFF) | ||
option(SLEEF_ASAN "Enable address sanitizing on all targets." OFF) | ||
|
||
option(ENFORCE_TESTER "Build fails if tester is not available" OFF) | ||
option(ENFORCE_TESTER3 "Build fails if tester3 is not built" OFF) | ||
option(SLEEF_ENFORCE_TESTER "Build fails if tester is not available" OFF) | ||
option(SLEEF_ENFORCE_TESTER3 "Build fails if tester3 is not built" OFF) | ||
|
||
option(ENABLE_ALTDIV "Enable alternative division method (aarch64 only)" OFF) | ||
option(ENABLE_ALTSQRT "Enable alternative sqrt method (aarch64 only)" OFF) | ||
option(SLEEF_ENABLE_ALTDIV "Enable alternative division method (aarch64 only)" OFF) | ||
option(SLEEF_ENABLE_ALTSQRT "Enable alternative sqrt method (aarch64 only)" OFF) | ||
|
||
option(DISABLE_FFTW "Disable testing the DFT library with FFTW" OFF) | ||
option(DISABLE_MPFR "Disable testing with the MPFR library" OFF) | ||
option(DISABLE_SSL "Disable testing with the SSL library" OFF) | ||
option(SLEEF_DISABLE_FFTW "Disable testing the DFT library with FFTW" OFF) | ||
option(SLEEF_DISABLE_MPFR "Disable testing with the MPFR library" OFF) | ||
option(SLEEF_DISABLE_SSL "Disable testing with the SSL library" OFF) | ||
|
||
option(ENABLE_CUDA "Enable CUDA" OFF) | ||
option(ENABLE_CXX "Enable C++" OFF) | ||
option(SLEEF_ENABLE_CUDA "Enable CUDA" OFF) | ||
option(SLEEF_ENABLE_CXX "Enable C++" OFF) | ||
|
||
# Function used to generate safe command arguments for add_custom_command | ||
function(command_arguments PROPNAME) | ||
|
@@ -129,11 +129,11 @@ set(SLEEF_SOVERSION ${SLEEF_VERSION_MAJOR}) | |
|
||
set(LANGLIST C) | ||
|
||
if (ENABLE_CUDA) | ||
if (SLEEF_ENABLE_CUDA) | ||
set(LANGLIST ${LANGLIST} CUDA) | ||
endif() | ||
|
||
if (ENABLE_CXX) | ||
if (SLEEF_ENABLE_CXX) | ||
set(LANGLIST ${LANGLIST} CXX) | ||
endif() | ||
|
||
|
@@ -158,11 +158,11 @@ separate build directory. Note: Please remove autogenerated file \ | |
`CMakeCache.txt` and directory `CMakeFiles` in the current directory.") | ||
endif() | ||
|
||
if(ENABLE_LTO AND BUILD_SHARED_LIBS) | ||
message(FATAL_ERROR "ENABLE_LTO and BUILD_SHARED_LIBS cannot be specified at the same time") | ||
endif(ENABLE_LTO AND BUILD_SHARED_LIBS) | ||
if(SLEEF_ENABLE_LTO AND SLEEF_BUILD_SHARED_LIBS) | ||
message(FATAL_ERROR "SLEEF_ENABLE_LTO and SLEEF_BUILD_SHARED_LIBS cannot be specified at the same time") | ||
endif(SLEEF_ENABLE_LTO AND SLEEF_BUILD_SHARED_LIBS) | ||
|
||
if(ENABLE_LTO) | ||
if(SLEEF_ENABLE_LTO) | ||
cmake_policy(SET CMP0069 NEW) | ||
include(CheckIPOSupported) | ||
check_ipo_supported(RESULT supported OUTPUT error) | ||
|
@@ -306,8 +306,8 @@ if(SLEEF_SHOW_CONFIG) | |
message(" Native build dir: ${NATIVE_BUILD_DIR}") | ||
endif(CMAKE_CROSSCOMPILING) | ||
message(STATUS "Using option `${SLEEF_C_FLAGS}` to compile libsleef") | ||
message(STATUS "Building shared libs : " ${BUILD_SHARED_LIBS}) | ||
message(STATUS "Building static test bins: " ${BUILD_STATIC_TEST_BINS}) | ||
message(STATUS "Building shared libs : " ${SLEEF_BUILD_SHARED_LIBS}) | ||
message(STATUS "Building static test bins: " ${SLEEF_BUILD_STATIC_TEST_BINS}) | ||
message(STATUS "MPFR : " ${LIB_MPFR}) | ||
if (MPFR_INCLUDE_DIR) | ||
message(STATUS "MPFR header file in " ${MPFR_INCLUDE_DIR}) | ||
|
@@ -317,7 +317,7 @@ if(SLEEF_SHOW_CONFIG) | |
message(STATUS "FFTW3 : " ${LIBFFTW3}) | ||
message(STATUS "OPENSSL : " ${OPENSSL_VERSION}) | ||
message(STATUS "SDE : " ${SDE_COMMAND}) | ||
if (BUILD_INLINE_HEADERS) | ||
if (SLEEF_BUILD_INLINE_HEADERS) | ||
message(STATUS "SED : " ${SED_COMMAND}) | ||
endif() | ||
message(STATUS "COMPILER_SUPPORTS_OPENMP : " ${COMPILER_SUPPORTS_OPENMP}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These also would need prefixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.