Commit 1405f6f3 authored by Igor S. Gerasimov's avatar Igor S. Gerasimov Committed by Susi Lehtola
Browse files

Use C++98 everywhere

parent fba05d1c
......@@ -14,12 +14,12 @@ gcc:
- mkdir build/
- cd build/
- export CC=gcc
- export CFLAGS="-O3 -pipe -Wall"
- export CFLAGS="-O3 -pipe -Wall"
- ../configure --prefix=$HOME
- make
- make check
- make install
g++:
stage: build
script:
......@@ -64,7 +64,7 @@ nvcc_nocuda:
- mkdir build/
- cd build/
- export CC="nvcc -x cu"
- export CFLAGS="-g -O3 --std=c++14 --compiler-options -g,-Wall"
- export CFLAGS="-g -O3 --std=c++03 --compiler-options -g,-Wall"
- export CCLD="nvcc"
- ../configure --prefix=$HOME
- make
......@@ -81,7 +81,7 @@ cuda_norun:
- mkdir build/
- cd build/
- export CC="nvcc -x cu"
- export CFLAGS="-g -O3 --std=c++14 --compiler-options -g,-Wall"
- export CFLAGS="-g -O3 --std=c++03 --compiler-options -g,-Wall"
- export CCLD="nvcc"
- ../configure --enable-cuda --prefix=$HOME
- make
......@@ -94,7 +94,6 @@ cuda_cmake_norun:
script:
- apt update -qq
- DEBIAN_FRONTEND="noninteractive" apt install --no-install-recommends -y -qq autoconf automake make gcc gfortran libtool bzip2 cmake
- export CUDAFLAGS="-g -O3 --std=c++14 --compiler-options -g,-Wall"
- mkdir build
- cd build
- cmake -DENABLE_CUDA=ON ../
......
......@@ -12,8 +12,10 @@ set(CMAKE_C_STANDARD 99)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
if(ENABLE_CUDA)
cmake_minimum_required(VERSION 3.8)
set(CMAKE_VERBOSE_MAKEFILE ON)
enable_language(CUDA)
set(CMAKE_CUDA_STANDARD 98)
if(POLICY CMP0104)
cmake_policy(SET CMP0104 OLD)
endif()
......
......@@ -104,7 +104,7 @@ This is an example of configuring libxc with cuda support (note that you have to
```bash
export CC="/usr/local/cuda/bin/nvcc -x cu"
export CFLAGS="-arch=sm_70 -g -O3 --std=c++14 --compiler-options -g,-Wall,-Wfatal-errors,-Wno-unused-variable,-Wno-unused-but-set-variable"
export CFLAGS="-arch=sm_70 -g -O3 --std=c++03 --compiler-options -g,-Wall,-Wfatal-errors,-Wno-unused-variable,-Wno-unused-but-set-variable"
export CCLD="/usr/local/cuda/bin/nvcc"
./configure --enable-cuda
```
......
......@@ -330,14 +330,14 @@ void libxc_free(void *ptr);
#else
template <class int_type>
auto libxc_malloc(const int_type size){
void * libxc_malloc(const int_type size){
void * mem;
cudaMallocManaged(&mem, size);
return mem;
}
template <class int_type1, class int_type2>
auto libxc_calloc(const int_type1 size1, const int_type2 size2){
void * libxc_calloc(const int_type1 size1, const int_type2 size2){
void * mem;
cudaMallocManaged(&mem, size1*size2);
cudaMemset(mem, 0, size1*size2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment