WSL/SLF GitLab Repository

Commit 30910f87 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Last changes to support the Cray compiler. Please note that for Cray, you most...

Last changes to support the Cray compiler. Please note that for Cray, you most probably have to compile with static linking!
parent 18ca4e04
......@@ -1059,11 +1059,9 @@ void SMETReader::read(std::vector<std::string>& vec_timestamp, std::vector<doubl
if (!timestamp_present)
throw SMETException("Requesting to read timestamp when there is none present in \""+filename+"\"", SMET_AT);
ifstream fin;
fin.clear();
if (!SMETCommon::fileExists(filename)) throw SMETException("File '"+filename+"' does not exists", AT); //prevent invalid filenames
errno = 0;
fin.open (filename.c_str(), ios::in|ios::binary); //ascii mode messes up pointer code on windows (automatic eol translation)
ifstream fin(filename.c_str(), ios::in|ios::binary); //ascii mode messes up pointer code on windows (automatic eol translation)
if (fin.fail()) {
ostringstream ss;
ss << "Error opening file \"" << filename << "\" for reading, possible reason: " << strerror(errno);
......
......@@ -38,16 +38,20 @@ MACRO (SET_COMPILER_OPTIONS)
###########################################################
ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Cray")
SET(WARNINGS "-Wall -Wno-long-long -Wswitch")
SET(DEEP_WARNINGS "-Wshadow -Wpointer-arith -Wconversion -Winline -Wdisabled-optimization") #-Wfloat-equal -Wpadded
SET(EXTRA_WARNINGS "-Wextra -pedantic ${DEEP_WARNINGS}")
SET(OPTIM "-g -O3 -DNDEBUG -DNOSAFECHECKS")
IF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64")
SET(ARCH_SAFE "-march=nocona -mtune=nocona")
SET(WARNINGS "-hlist=m -h negmsgs -h msglevel_3 -h nomessage=870") #870: accept multibyte chars
#SET(EXTRA_WARNINGS "-h msglevel_2")
SET(OPTIM "-O3 -hfp3 -h msglevel_4 -DNDEBUG -DNOSAFECHECKS")
IF("$ENV{CRAY_CPU_TARGET}" STREQUAL "")
IF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64")
SET(ARCH_SAFE "-h cpu=x86-64")
MESSAGE("No CRAY_CPU_TARGET set, setting it to x86-64; please consider loading the proper target module.")
ELSE()
MESSAGE("No CRAY_CPU_TARGET set; please consider loading the proper target module.")
ENDIF()
ENDIF()
SET(DEBUG "-g3 -O0 -D__DEBUG")
SET(DEBUG "-g -D__DEBUG")
SET(_VERSION "-D_VERSION=${_versionString}")
###########################################################
ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#we consider that all other compilers support "-" options and silently ignore what they don't know
......
Supports Markdown
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