IAP GITLAB

Skip to content
Snippets Groups Projects
Commit f6321179 authored by ralfulrich's avatar ralfulrich
Browse files

check if APPLE

parent 6294978f
No related branches found
No related tags found
No related merge requests found
...@@ -34,17 +34,21 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) ...@@ -34,17 +34,21 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
# Set the possible values of build type for cmake-gui # Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo") "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif() endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
# enable warnings and disallow non-standard language # enable warnings and disallow non-standard language
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers") set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_RELEASE "-O3") # -O2 would not trade speed for size, neither O2/3 use fast-math
# clang produces a lot of unecessary warnings without this: # clang produces a lot of unecessary warnings without this:
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>") add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>")
# check if we are on OSX:
if (APPLE)
add_compile_definitions (CORSIKA_OSX)
endif (APPLE)
# unit testing coverage, does not work yet # unit testing coverage, does not work yet
#include (CodeCoverage) #include (CodeCoverage)
##set(COVERAGE_LCOV_EXCLUDES 'Documentation/*') ##set(COVERAGE_LCOV_EXCLUDES 'Documentation/*')
......
...@@ -169,7 +169,10 @@ namespace corsika::process { ...@@ -169,7 +169,10 @@ namespace corsika::process {
using corsika::geometry::Point; using corsika::geometry::Point;
using namespace corsika::units::si; using namespace corsika::units::si;
// TODO: this should be done in a central, common place. Not here..
#ifndef CORSIKA_OSX
feenableexcept(FE_INVALID); feenableexcept(FE_INVALID);
#endif
fCount++; fCount++;
SibStack ss; SibStack ss;
...@@ -216,7 +219,10 @@ namespace corsika::process { ...@@ -216,7 +219,10 @@ namespace corsika::process {
// empty sibyll stack // empty sibyll stack
ss.Clear(); ss.Clear();
// TODO: this should be done in a central, common place. Not here..
#ifndef CORSIKA_OSX
fedisableexcept(FE_INVALID); fedisableexcept(FE_INVALID);
#endif
} }
}; };
} // namespace sibyll } // namespace sibyll
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment