WSL/SLF GitLab Repository

Commit c8083e61 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Adding some potentially missing includes (<algorithm>) and addressing Cmake's...

Adding some potentially missing includes (<algorithm>) and addressing Cmake's policy CMP0054 (changes in the strings comparisons)
parent 17672545
......@@ -18,6 +18,7 @@
#include <meteoio/dataGenerators/AllSkySWGenerator.h>
#include <meteoio/meteoLaws/Atmosphere.h>
#include <algorithm>
namespace mio {
......
......@@ -18,6 +18,7 @@
#include <meteoio/dataGenerators/ClearSkySWGenerator.h>
#include <meteoio/meteoLaws/Atmosphere.h>
#include <algorithm>
namespace mio {
......
......@@ -18,6 +18,7 @@
#include <meteoio/dataGenerators/ESOLIPGenerator.h>
#include <meteoio/meteoFilters/ProcPSUMDistribute.h> //for the precipitation distribution
#include <algorithm>
namespace mio {
......
......@@ -17,6 +17,7 @@
*/
#include <meteoio/meteoFilters/FilterRate.h>
#include <cmath>
#include <algorithm>
using namespace std;
......
......@@ -19,6 +19,7 @@
#include <assert.h>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <meteoio/meteoLaws/Atmosphere.h>
#include <meteoio/meteoLaws/Meteoconst.h>
#include <meteoio/meteoLaws/Sun.h>
......
......@@ -19,6 +19,7 @@
#include <string>
#include <iostream> //for "fixed"
#include <iomanip> //for "setprecision"
#include <algorithm>
#include <meteoio/meteoLaws/Sun.h>
#include <meteoio/meteoLaws/Atmosphere.h>
......
......@@ -28,6 +28,7 @@
#include <cmath>
#include <iostream>
#include <errno.h>
#include <algorithm>
#include <grib_api.h>
using namespace std;
......
......@@ -23,6 +23,8 @@
#include <meteoio/IOUtils.h>
#include <meteoio/IOExceptions.h>
#include <algorithm>
using namespace std;
using namespace mio; // for the IOExceptions and IOUtils
......
......@@ -44,6 +44,7 @@
#include <sstream>
#include <vector>
#include <algorithm>
namespace mio {
......
......@@ -19,6 +19,7 @@
#include <meteoio/spatialInterpolations/WinstralAlgorithm.h>
#include <meteoio/meteoStats/libinterpol2D.h>
#include <meteoio/MathOptim.h>
#include <algorithm>
namespace mio {
......
......@@ -8,7 +8,7 @@ BuildVersion()
MACRO (SET_COMPILER_OPTIONS)
###########################################################
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
IF(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
IF(DEBUG_ARITHM)
SET(EXTRA "${EXTRA} /EHa")
ENDIF(DEBUG_ARITHM)
......@@ -17,8 +17,11 @@ MACRO (SET_COMPILER_OPTIONS)
SET(WARNINGS "/W4 /D_CRT_SECURE_NO_WARNINGS /EHsc") #Za: strict ansi EHsc: handle c++ exceptions
#SET(EXTRA_WARNINGS "/Wp64") #/Wall
SET(OPTIM "/O2 /DNDEBUG /MD /DNOSAFECHECKS")
SET(ARCH_OPTIM "/arch:SSE2")
SET(ARCH_OPTIM "/arch:AVX2")
SET(ARCH_SAFE "")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
SET(ARCH_SAFE "/arch:SSE2")
ENDIF()
SET(DEBUG "/Z7 /Od /D__DEBUG /MDd")
SET(_VERSION "/D_VERSION=${_versionString}")
IF(BUILD_SHARED_LIBS)
......@@ -26,7 +29,7 @@ MACRO (SET_COMPILER_OPTIONS)
ENDIF(BUILD_SHARED_LIBS)
###########################################################
ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL Intel)
IF(ENABLE_LAPACK)
SET(EXTRA "${EXTRA} -DCLAPACK")
ENDIF(ENABLE_LAPACK)
......@@ -38,14 +41,14 @@ MACRO (SET_COMPILER_OPTIONS)
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")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
SET(ARCH_SAFE "-march=nocona -mtune=nocona")
ENDIF()
SET(DEBUG "-g3 -O0 -D__DEBUG")
SET(_VERSION "-D_VERSION=${_versionString}")
###########################################################
ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Cray")
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL Cray)
IF(ENABLE_LAPACK)
SET(EXTRA "${EXTRA} -DCLAPACK")
ENDIF(ENABLE_LAPACK)
......@@ -56,8 +59,8 @@ MACRO (SET_COMPILER_OPTIONS)
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")
IF($ENV{CRAY_CPU_TARGET} MATCHES "^$")
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()
......@@ -68,7 +71,7 @@ MACRO (SET_COMPILER_OPTIONS)
SET(_VERSION "-D_VERSION=${_versionString}")
###########################################################
ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "^GNU$")
#we consider that all other compilers support "-" options and silently ignore what they don't know
IF(ENABLE_LAPACK)
SET(EXTRA "${EXTRA} -DCLAPACK")
......@@ -84,7 +87,7 @@ MACRO (SET_COMPILER_OPTIONS)
SET(DEEP_WARNINGS "-Wunused-value -Wshadow -Wpointer-arith -Wconversion -Winline -Wdisabled-optimization -Wctor-dtor-privacy") #-Wfloat-equal -Wpadded
SET(EXTRA_WARNINGS "-Wextra -pedantic -Weffc++ ${DEEP_WARNINGS}")
SET(OPTIM "-g -O3 -DNDEBUG -DNOSAFECHECKS")
IF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
SET(ARCH_SAFE "-march=nocona -mtune=nocona")
ENDIF()
SET(DEBUG "-g3 -O0 -D__DEBUG")
......@@ -125,7 +128,7 @@ MACRO (SET_COMPILER_OPTIONS)
ENDIF()
###########################################################
ELSEIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
IF(ENABLE_LAPACK)
SET(EXTRA "${EXTRA} -DCLAPACK")
ENDIF(ENABLE_LAPACK)
......@@ -141,7 +144,7 @@ MACRO (SET_COMPILER_OPTIONS)
SET(DEEP_WARNINGS "-Wunused-value -Wshadow -Wpointer-arith -Wconversion -Winline -Wdisabled-optimization -Wctor-dtor-privacy") #-Rpass=.* for static analysis
SET(EXTRA_WARNINGS "-Wextra -pedantic -Weffc++ ${DEEP_WARNINGS}")
SET(OPTIM "-g -O3 -DNDEBUG -DNOSAFECHECKS -flto")
IF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
SET(ARCH_SAFE "-march=nocona -mtune=nocona")
ENDIF()
SET(DEBUG "-g3 -O0 -D__DEBUG")
......
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