Skip to content

Commit 71d0811

Browse files
Rewriting main htool objects and use C++14
1 parent 658d8f0 commit 71d0811

File tree

378 files changed

+17420
-13971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+17420
-13971
lines changed

CMakeLists.txt

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ else()
1616
LANGUAGES CXX)
1717
endif()
1818

19-
# To force c++11
19+
# To force c++14
2020
if(${CMAKE_VERSION} VERSION_LESS 3.1)
21-
add_compile_options(-std=c++11)
21+
add_compile_options(-std=c++14)
2222
elseif(${CMAKE_VERSION} VERSION_LESS 3.6.3 AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
23-
add_compile_options(-std=c++11)
23+
add_compile_options(-std=c++14)
2424
else()
25-
set(CMAKE_CXX_STANDARD 11)
25+
set(CMAKE_CXX_STANDARD 14)
2626
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2727
endif()
2828

@@ -93,9 +93,8 @@ option(HTOOL_WITH_DOC "Build documentation" ON)
9393
#=============================================================================#
9494
# MPI
9595
find_package(MPI REQUIRED)
96-
message("-- MPI libraries found in " "${MPI_LIBRARIES}")
97-
message("-- MPI include files found in " "${MPI_INCLUDE_PATH}")
9896
separate_arguments(MPIEXEC_PREFLAGS) # to support multi flags
97+
message(STATUS "Run: ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS")
9998

10099
# OPENMP
101100
find_package(OpenMP)
@@ -121,8 +120,10 @@ find_package(HPDDM)
121120
#=== HTOOL as header only library
122121
add_library(htool INTERFACE)
123122
target_include_directories(htool INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include> ${MPI_INCLUDE_PATH} ${HPDDM_INCLUDE_DIRS} ${MKL_INC_DIR})
124-
target_link_libraries(htool INTERFACE ${MPI_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${ARPACK_LIBRARIES} OpenMP::OpenMP_CXX)
125-
123+
target_link_libraries(htool INTERFACE MPI::MPI_CXX ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${ARPACK_LIBRARIES})
124+
if(OpenMP_CXX_FOUND)
125+
target_link_libraries(htool INTERFACE OpenMP::OpenMP_CXX)
126+
endif()
126127
target_compile_features(htool INTERFACE cxx_std_11)
127128

128129
if("${BLA_VENDOR}" STREQUAL "Intel10_64lp_seq" OR "${BLA_VENDOR}" STREQUAL "Intel10_64lp")
@@ -181,21 +182,33 @@ if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) AND BUILD_TESTING)
181182
target_compile_options(htool INTERFACE -fprofile-arcs -ftest-coverage)
182183
target_link_libraries(htool INTERFACE gcov)
183184
endif()
185+
target_compile_options(
186+
htool
187+
INTERFACE -Wall
188+
-Wextra
189+
-Werror
190+
-Wshadow
191+
-Wnon-virtual-dtor
192+
-pedantic
193+
# -Wold-style-cast
194+
-Wcast-align
195+
-Wunused
196+
-Woverloaded-virtual
197+
# -Wconversion
198+
# -Wsign-conversion
199+
-Wdouble-promotion
200+
-Wno-sign-compare
201+
-Wextra-semi
202+
# -Wzero-as-null-pointer-constant
203+
-Wundef)
184204
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
185-
message("test")
205+
target_compile_options(htool INTERFACE -Wimplicit-fallthrough -Wextra-semi-stmt -ferror-limit=200)
206+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
186207
target_compile_options(
187208
htool
188-
INTERFACE -Wall
189-
-Wextra
190-
-Wpedantic
191-
-Wno-sign-compare
192-
-Wextra-semi
193-
-Wextra-semi-stmt
194-
-Wnon-virtual-dtor
195-
-Wzero-as-null-pointer-constant
196-
-Wundef)
197-
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
198-
target_compile_options(htool INTERFACE -Wall -Wextra -Wpedantic -Wno-sign-compare -Wundef)
209+
INTERFACE -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op
210+
# -Wnull-dereference
211+
-Wuseless-cast -fmax-errors=200)
199212
endif()
200213
add_custom_target(build-tests)
201214
add_subdirectory(tests EXCLUDE_FROM_ALL)

data/data_example/disk.geo

Lines changed: 0 additions & 9 deletions
This file was deleted.

data/data_test/non_symmetric/cluster_1_permutation.csv

Lines changed: 0 additions & 1 deletion
This file was deleted.

data/data_test/non_symmetric/cluster_1_tree.csv

Lines changed: 0 additions & 6 deletions
This file was deleted.

data/data_test/non_symmetric/cluster_2_permutation.csv

Lines changed: 0 additions & 1 deletion
This file was deleted.

data/data_test/non_symmetric/cluster_2_tree.csv

Lines changed: 0 additions & 6 deletions
This file was deleted.

data/data_test/non_symmetric/cluster_3_permutation.csv

Lines changed: 0 additions & 1 deletion
This file was deleted.

data/data_test/non_symmetric/cluster_3_tree.csv

Lines changed: 0 additions & 4 deletions
This file was deleted.

data/data_test/non_symmetric/cluster_4_permutation.csv

Lines changed: 0 additions & 1 deletion
This file was deleted.

data/data_test/non_symmetric/cluster_4_tree.csv

Lines changed: 0 additions & 4 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3.59 MB
Binary file not shown.

0 commit comments

Comments
 (0)