diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 5c085d3d..a411c00d 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -53,7 +53,7 @@ jobs: REPORT_PR_CHANGES_ONLY: false run: | analysis_file="analysis.txt" - cppcheck_params="--enable=warning --check-level=exhaustive --inline-suppr --suppress=internalError --suppress=internalAstError --suppress=*:*third-party/eigen3/*" + cppcheck_params="--enable=warning --check-level=exhaustive --inline-suppr --suppress=internalError --suppress=internalAstError --suppress=*:*third-party/eigen/*" cppcheck -j4 $cppcheck_params --project=$(pwd)/build/compile_commands.json --output-file=$analysis_file # Since cppcheck does not support OpenCL and CUDA, we need to check these files separately find $(pwd)/reg-lib/cl/. -name "*.cl" -print0 | while IFS= read -r -d '' file; do cppcheck "$file" $cppcheck_params --language=c++ 2>> $analysis_file; done diff --git a/CMakeLists.txt b/CMakeLists.txt index f1cfa291..57d91902 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,7 @@ include_directories(${CMAKE_SOURCE_DIR}/reg-lib/cpu) include_directories(${CMAKE_SOURCE_DIR}/reg-io) include_directories(${CMAKE_SOURCE_DIR}/third-party) include_directories(${CMAKE_BINARY_DIR}) -include_directories(${CMAKE_BINARY_DIR}/third-party/eigen3) +include_directories(${CMAKE_BINARY_DIR}/third-party/eigen) #----------------------------------------------------------------------------- if(USE_OPENCL) # Find the OpenCL package diff --git a/niftyreg_build_version.txt b/niftyreg_build_version.txt index 21c8d99f..1c105f1a 100644 --- a/niftyreg_build_version.txt +++ b/niftyreg_build_version.txt @@ -1 +1 @@ -415 +416 diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 54a1ba3b..1357e060 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -1,24 +1,17 @@ #----------------------------------------------------------------------------- -# Eigen version 3.3.3 - 67e894c6cd8f -if(NOT EXISTS ${CMAKE_BINARY_DIR}/third-party/eigen3) +# Eigen version 3.3.* +if(NOT EXISTS ${CMAKE_BINARY_DIR}/third-party/eigen) + message(STATUS "Cloning Eigen...") execute_process( - COMMAND ${CMAKE_COMMAND} -E tar x ${CMAKE_SOURCE_DIR}/third-party/eigen_3.3.3.tar.gz + COMMAND git clone -q -b 3.3 https://gitlab.com/libeigen/eigen.git WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/third-party + RESULT_VARIABLE result ) - execute_process( - COMMAND ${CMAKE_COMMAND} -E rename - ${CMAKE_BINARY_DIR}/third-party/eigen-eigen-67e894c6cd8f - ${CMAKE_BINARY_DIR}/third-party/eigen3 - ) - message(STATUS "Eigen3 files are copied in ${CMAKE_BINARY_DIR}/third-party/eigen3") -endif(NOT EXISTS ${CMAKE_BINARY_DIR}/third-party/eigen3) -#----------------------------------------------------------------------------- -if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" ) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /wd4127 /wd4505 /wd4714") - string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -endif() + if(result) + message(FATAL_ERROR "Failed to clone Eigen!") + endif(result) + message(STATUS "Eigen is cloned into ${CMAKE_BINARY_DIR}/third-party/eigen") +endif(NOT EXISTS ${CMAKE_BINARY_DIR}/third-party/eigen) #----------------------------------------------------------------------------- if(OPENMP_FOUND) if(USE_OPENMP) diff --git a/third-party/eigen_3.3.3.tar.gz b/third-party/eigen_3.3.3.tar.gz deleted file mode 100644 index e2328b4c..00000000 Binary files a/third-party/eigen_3.3.3.tar.gz and /dev/null differ