Add "BTCS" as suffix to CMake options
This commit is contained in:
parent
5d986c5685
commit
45c5e7bdfe
@ -15,7 +15,7 @@ build_release:
|
|||||||
expire_in: 100s
|
expire_in: 100s
|
||||||
script:
|
script:
|
||||||
- mkdir build && cd build
|
- mkdir build && cd build
|
||||||
- cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=ON ..
|
- cmake -DCMAKE_BUILD_TYPE=Release -DBTCS_ENABLE_TESTING=ON ..
|
||||||
- make -j$(nproc)
|
- make -j$(nproc)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|||||||
@ -9,7 +9,7 @@ find_package(Eigen3 REQUIRED NO_MODULE)
|
|||||||
find_package(OpenMP)
|
find_package(OpenMP)
|
||||||
|
|
||||||
## SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -mfma")
|
## 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
|
set(CMAKE_CXX_FLAGS_GENERICOPT "-O3 -march=native" CACHE STRING
|
||||||
"Flags used by the C++ compiler during opt builds."
|
"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."
|
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel GenericOpt."
|
||||||
FORCE)
|
FORCE)
|
||||||
|
|
||||||
option(USE_UNSAFE_MATH_OPT
|
option(BTCS_USE_UNSAFE_MATH_OPT
|
||||||
"Use compiler options to break IEEE compliances by
|
"Use compiler options to break IEEE compliances by
|
||||||
oenabling reordering of instructions when adding/multiplying of floating
|
oenabling reordering of instructions when adding/multiplying of floating
|
||||||
points."
|
points."
|
||||||
OFF)
|
OFF)
|
||||||
|
|
||||||
if(USE_UNSAFE_MATH_OPT)
|
if(BTCS_USE_UNSAFE_MATH_OPT)
|
||||||
add_compile_options(-ffast-math)
|
add_compile_options(-ffast-math)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_TESTING
|
option(BTCS_ENABLE_TESTING
|
||||||
"Run tests after succesfull compilation"
|
"Run tests after succesfull compilation"
|
||||||
OFF)
|
OFF)
|
||||||
|
|
||||||
add_subdirectory(app)
|
add_subdirectory(app)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
if(ENABLE_TESTING)
|
if(BTCS_ENABLE_TESTING)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -2,7 +2,7 @@ add_library(BTCSDiffusion STATIC BTCSDiffusion.cpp BTCSBoundaryCondition.cpp)
|
|||||||
|
|
||||||
target_link_libraries(BTCSDiffusion Eigen3::Eigen)
|
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)
|
target_link_libraries(BTCSDiffusion OpenMP::OpenMP_CXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user