diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a82eb1..caa6495 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ab4a8b..2850054 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c565756..ce97675 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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()