Skip to content

Commit a5aad90

Browse files
authored
Merge pull request #310 from scivision/master
Correct/clarify CI config, document CMake build, update obsolete CMake syntax
2 parents 694190c + 8b147e8 commit a5aad90

File tree

6 files changed

+48
-38
lines changed

6 files changed

+48
-38
lines changed

appveyor.yml renamed to .appveyor.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
os: Visual Studio 2017
1+
image:
2+
- Visual Studio 2017
3+
24
configuration: Release
3-
clone_depth: 50
5+
clone_depth: 3
46

57
matrix:
68
fast_finish: false
@@ -19,7 +21,7 @@ environment:
1921
install:
2022
- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
2123
- conda config --add channels conda-forge --force
22-
- conda install --yes --quiet cmake flang jom
24+
- conda install --yes --quiet flang jom
2325
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
2426
- set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%"
2527
- set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%"

.travis.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
language: cpp
1+
language: c
2+
dist: xenial
3+
group: travis_latest
4+
5+
git:
6+
depth: 3
7+
quiet: true
28

39
addons:
410
apt:
5-
sources:
6-
- george-edison55-precise-backports # cmake
711
packages:
8-
- cmake
9-
- cmake-data
10-
- gfortran
11-
12-
os:
13-
- linux
14-
- osx
15-
16-
env:
17-
- CMAKE_BUILD_TYPE=Release
18-
- CMAKE_BUILD_TYPE=Coverage
12+
- gfortran
1913

20-
install:
21-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
22-
then
23-
brew cask uninstall oclint;
24-
for pkg in gcc cmake; do
25-
if brew list -1 | grep -q "^${pkg}\$"; then
26-
brew outdated $pkg || brew upgrade $pkg;
27-
else
28-
brew install $pkg;
29-
fi
30-
done
31-
fi
14+
matrix:
15+
include:
16+
- os: linux
17+
env: CMAKE_BUILD_TYPE=Release
18+
- os: linux
19+
env: CMAKE_BUILD_TYPE=Coverage
20+
- os: osx
21+
env: CMAKE_BUILD_TYPE=Release
22+
before_install:
23+
- brew update > /dev/null
24+
- brew install gcc > /dev/null
25+
- os: osx
26+
env: CMAKE_BUILD_TYPE=Coverage
27+
before_install:
28+
- brew update > /dev/null
29+
- brew install gcc > /dev/null
3230

3331
script:
3432
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ include(PreventInSourceBuilds)
7272
include(PreventInBuildInstalls)
7373

7474
if(UNIX)
75-
if("${CMAKE_Fortran_COMPILER}" MATCHES "ifort")
76-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fp-model strict")
75+
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
76+
list(APPEND CMAKE_Fortran_FLAGS -fp-model strict)
7777
endif()
78-
if("${CMAKE_Fortran_COMPILER}" MATCHES "xlf")
79-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict=none")
78+
if(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
79+
list(APPEND CMAKE_Fortran_FLAGS -qnosave -qstrict=none)
8080
endif()
8181
# Delete libmtsk in linking sequence for Sun/Oracle Fortran Compiler.
8282
# This library is not present in the Sun package SolarisStudio12.3-linux-x86-bin
8383
string(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}")
8484
endif()
8585

86-
if(CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq")
86+
if(CMAKE_Fortran_COMPILER_ID STREQUAL Compaq)
8787
if(WIN32)
8888
if(CMAKE_GENERATOR STREQUAL "NMake Makefiles")
8989
get_filename_component(CMAKE_Fortran_COMPILER_CMDNAM ${CMAKE_Fortran_COMPILER} NAME_WE)

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ CBLAS, a C interface to the BLAS, and (5) LAPACKE, a C interface to LAPACK.
6969
the `INSTALL` directory.
7070
- LAPACK includes also the CMake build. You will need to have CMake installed
7171
on your machine (CMake is available at http://www.cmake.org/). CMake will
72-
allow an easy installation on a Windows Machine.
72+
allow an easy installation on a Windows Machine.
73+
An example CMake build is:
74+
```sh
75+
mkdir build
76+
cd build
77+
cmake -DCMAKE_INSTALL_LIBDIR=$HOME/.local/lapack ..
78+
cmake --build -j . --target install
79+
```
80+
That installs the LAPACK library under $HOME/.local/lapack/
7381
- Specific information to run LAPACK under Windows is available at
7482
http://icl.cs.utk.edu/lapack-for-windows/lapack/.
7583

TESTING/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ endif()
161161
# Only run this test if python 2.7 or greater is found
162162
if(PYTHONINTERP_FOUND)
163163
message(STATUS "Running Summary")
164-
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR}/lapack_testing.py ${LAPACK_BINARY_DIR})
164+
file(COPY ${LAPACK_SOURCE_DIR}/lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR})
165165
add_test(
166166
NAME LAPACK_Test_Summary
167167
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}

lapack_build.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ find_program(HOSTNAME NAMES hostname)
6969
find_program(UNAME NAMES uname)
7070

7171
# Get the build name and hostname
72-
exec_program(${HOSTNAME} ARGS OUTPUT_VARIABLE hostname)
72+
execute_process(${HOSTNAME}
73+
OUTPUT_VARIABLE hostname)
7374
string(REGEX REPLACE "[/\\\\+<> #]" "-" hostname "${hostname}")
7475

7576
message("HOSTNAME: ${hostname}")
@@ -83,7 +84,8 @@ find_package(Git REQUIRED)
8384
set(CTEST_GIT_COMMAND ${GIT_EXECUTABLE})
8485
set(CTEST_UPDATE_COMMAND ${GIT_EXECUTABLE})
8586
macro(getuname name flag)
86-
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
87+
execute_process(COMMAND "${UNAME}" "${flag}"
88+
OUTPUT_VARIABLE "${name}")
8789
string(REGEX REPLACE "[/\\\\+<> #]" "-" "${name}" "${${name}}")
8890
string(REGEX REPLACE "^(......|.....|....|...|..|.).*" "\\1" "${name}" "${${name}}")
8991
endmacro()

0 commit comments

Comments
 (0)