WSL/SLF GitLab Repository

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

some unecessary lines have been removed and a new target has been added:...

some unecessary lines have been removed and a new target has been added: cxxflags. This only takes compiling options from the cxxflags env variable and is therefore suitable for packagers who need to force their own compiling flags.
parent 71245f15
......@@ -95,7 +95,7 @@ ELSE(UNIX)
ENDIF(UNIX)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "release" CACHE STRING "Choose the type of build, options are: debug release coverage " FORCE)
SET(CMAKE_BUILD_TYPE "release" CACHE STRING "Choose the type of build, options are: debug release coverage cxxflags" FORCE)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
ENDIF(NOT CMAKE_BUILD_TYPE)
......@@ -130,12 +130,11 @@ IF(POPC)
SET(POPC_FLAGS "-cxxmain")
ENDIF(POPC)
SET(CMAKE_CXX_FLAGS "${POPC_FLAGS} ${_VERSION} ${ARCH} ${CFLAGS} ${PLATFORM}" CACHE STRING "" FORCE)
SET(CMAKE_CXX_FLAGS "${POPC_FLAGS} ${_VERSION} ${ARCH} ${PLATFORM}" CACHE STRING "" FORCE)
SET(CMAKE_CXX_FLAGS_RELEASE "${OPTIM}" CACHE STRING "" FORCE)
SET(CMAKE_CXX_FLAGS_DEBUG "${DEBUG} ${WARNINGS} ${EXTRA_WARNINGS}" CACHE STRING "" FORCE)
MESSAGE(STATUS "DEBUG CXXFLAGS : ${CMAKE_CXX_FLAGS_DEBUG}")
MESSAGE(STATUS "RELEASE CXXFLAGS: ${CMAKE_CXX_FLAGS_RELEASE}")
SET(CMAKE_CXX_FLAGS_CXXFLAGS "$ENV{CXXFLAGS}" CACHE STRING "" FORCE)
MARK_AS_ADVANCED(FORCE CMAKE_CXX_FLAGS_CXXFLAGS)
#Add subdirectory, so they can inherit all variables defined above
ADD_SUBDIRECTORY(meteoio/plugins)
......@@ -394,8 +393,7 @@ IF(BUILD_TESTING)
# force the correct flags to make coverage trought a build type
SET(CMAKE_BUILD_TYPE coverage)
SET(CMAKE_CXX_FLAGS_COVERAGE "-Wall -O0 -ftest-coverage -fprofile-arcs" CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS_COVERAGE "-Wall -O0 -ftest-coverage -fprofile-arcs" CACHE STRING "" FORCE)
MARK_AS_ADVANCED(FORCE CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE)
MARK_AS_ADVANCED(FORCE CMAKE_CXX_FLAGS_COVERAGE)
# Force debug mode, so that no optimisation is made to get "Correct" results of coverage testing
SET(CMAKE_BUILD_TYPE "coverage" CACHE STRING "Choose the type of build, options are: debug release coverage " FORCE)
......
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