Add "BTCS" as suffix to CMake options

This commit is contained in:
Max Lübke 2022-08-01 15:54:15 +02:00
parent 5d986c5685
commit 45c5e7bdfe
3 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@ build_release:
expire_in: 100s
script:
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=ON ..
- cmake -DCMAKE_BUILD_TYPE=Release -DBTCS_ENABLE_TESTING=ON ..
- make -j$(nproc)
test:

View File

@ -9,7 +9,7 @@ find_package(Eigen3 REQUIRED NO_MODULE)
find_package(OpenMP)
## SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -mfma")
option(USE_OPENMP "Compile with OpenMP support" ON)
option(BTCS_USE_OPENMP "Compile with OpenMP support" ON)
set(CMAKE_CXX_FLAGS_GENERICOPT "-O3 -march=native" CACHE STRING
"Flags used by the C++ compiler during opt builds."
@ -19,23 +19,23 @@ set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel GenericOpt."
FORCE)
option(USE_UNSAFE_MATH_OPT
option(BTCS_USE_UNSAFE_MATH_OPT
"Use compiler options to break IEEE compliances by
oenabling reordering of instructions when adding/multiplying of floating
points."
OFF)
if(USE_UNSAFE_MATH_OPT)
if(BTCS_USE_UNSAFE_MATH_OPT)
add_compile_options(-ffast-math)
endif()
option(ENABLE_TESTING
option(BTCS_ENABLE_TESTING
"Run tests after succesfull compilation"
OFF)
add_subdirectory(app)
add_subdirectory(src)
if(ENABLE_TESTING)
if(BTCS_ENABLE_TESTING)
add_subdirectory(test)
endif()

View File

@ -2,7 +2,7 @@ add_library(BTCSDiffusion STATIC BTCSDiffusion.cpp BTCSBoundaryCondition.cpp)
target_link_libraries(BTCSDiffusion Eigen3::Eigen)
if(USE_OPENMP AND OpenMP_CXX_FOUND)
if(BTCS_USE_OPENMP AND OpenMP_CXX_FOUND)
target_link_libraries(BTCSDiffusion OpenMP::OpenMP_CXX)
endif()