Skip to content

Commit

Permalink
Merge pull request #605 from dash-project/dash-release0.3.0-prep
Browse files Browse the repository at this point in the history
Last preparations for 0.3.0
  • Loading branch information
devreal authored Nov 9, 2018
2 parents aba546d + 1b7be01 commit 768a304
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CMakeExt/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ if (ENABLE_DEV_COMPILER_WARNINGS
endif()
endif()

if (NOT (ENABLE_DEV_COMPILER_WARNINGS
OR ENABLE_EXT_COMPILER_WARNINGS)
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Wno-format")
endif()

set (CXX_GDB_FLAG "-g"
CACHE STRING "C++ compiler (clang++) debug symbols flag")
if(OPENMP_FOUND)
Expand Down
18 changes: 11 additions & 7 deletions CMakeExt/GoogleTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ if (BUILD_TESTS)

else()
# Download gtest from official github repository:
message(STATUS "GoogleTest: using GTest from official repository")
set(GTEST_SUBMOD "${CMAKE_SOURCE_DIR}/vendor/googletest")
set(GTEST_PREFIX "${CMAKE_BINARY_DIR}/gtest")
set(GTEST_LOCATION "${GTEST_PREFIX}/src/GTestExternal-build/googlemock/gtest")
Expand All @@ -57,21 +56,24 @@ if (BUILD_TESTS)
set(GTEST_MAINLIB "${GTEST_LOCATION}/${LIBPREFIX}gtest_main${LIBSUFFIX}")

# check whether the submodule has been initialized
file(GLOB gtest_files "${GTEST_SUBMOD}/*")
list(LENGTH gtest_files gtest_file_cnt)
file(GLOB gtest_files "${GTEST_SUBMOD}/*")
list(LENGTH gtest_files gtest_file_cnt)
set (git_res 0)
if (gtest_file_cnt EQUAL 0)
# we first need to initialize the submodule
message(STATUS "GoogleTest: Fetching submodule into vendor/googletest")
execute_process(COMMAND git submodule update --init vendor/googletest
message(STATUS "GoogleTest: using GTest from official repository")
message(STATUS "GoogleTest: Fetching submodule into ${GTEST_SUBMOD}")
execute_process(COMMAND git submodule update --init ${GTEST_SUBMOD}
TIMEOUT 10
RESULT_VARIABLE git_res
OUTPUT_VARIABLE git_out
ERROR_VARIABLE git_err
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()

if (git_res EQUAL 0)
file(GLOB gtest_git_files "${GTEST_SUBMOD}/.git*")
list(LENGTH gtest_git_files gtest_git_file_cnt)
if (NOT gtest_git_file_cnt EQUAL 0 AND git_res EQUAL 0)
# checkout desired version
message(STATUS "GoogleTest: Checking out commit ${GTEST_GIT_TAG}")
execute_process(COMMAND git checkout -q ${GTEST_GIT_TAG}
Expand All @@ -82,7 +84,7 @@ if (BUILD_TESTS)
if (NOT git_res EQUAL 0)
# try to fetch latest commit from origin
message(STATUS "GoogleTest: Checkout failed, trying to fetch latest commit")
execute_process(COMMAND git submodule update --remote vendor/googletest
execute_process(COMMAND git submodule update --remote ${GTEST_SUBMOD}
TIMEOUT 10
RESULT_VARIABLE git_res
OUTPUT_VARIABLE git_out
Expand All @@ -100,6 +102,8 @@ if (BUILD_TESTS)
message(WARNING "GoogleTest: Failed to checkout commit ${GTEST_GIT_TAG}: ${git_err}")
endif()
endif()
elseif (NOT gtest_file_cnt EQUAL 0)
message(STATUS "GoogleTest: using GTest available in ${GTEST_SUBMOD}")
endif()


Expand Down
12 changes: 8 additions & 4 deletions release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,16 @@
# DASH scripts
#
"dash/scripts/*.sh",
"dash/scripts/dashcc/*.in",
#
"dash/scripts/dashcc/*.in",
#
# Documentation
#
"doc/config/*.dox",
"doc/config/*.in"
"doc/config/*.in",
#
# GoogleTest
#
"vendor/googletest/*"
);


Expand All @@ -149,7 +153,7 @@
if( $file =~ /\.(c|h|cc|cpp)$/ && -e "LICENSE" ) {
system("cat ./LICENSE $file > $base/$file");
} else {
system("cp $file $dirname");
system("cp -r $file $dirname");
}
}
}
Expand Down

0 comments on commit 768a304

Please sign in to comment.