Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 0 additions & 96 deletions Installation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,102 +387,6 @@ message(
)
message(STATUS "System: ${CMAKE_SYSTEM_NAME}")

#--------------------------------------------------------------------------------------------------
#
# -= FLAGS =-
#
#--------------------------------------------------------------------------------------------------

if(MSVC)

uniquely_add_flags(CGAL_CXX_FLAGS
"-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS")
uniquely_add_flags(CGAL_CXX_FLAGS "/fp:strict")
uniquely_add_flags(CGAL_CXX_FLAGS "/fp:except-")
uniquely_add_flags(CGAL_CXX_FLAGS "/bigobj") # Use /bigobj by default

if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
set(CMAKE_CXX_WARNING_LEVEL
2
CACHE STRING "MSVC C++ compiler warning level" FORCE)
mark_as_advanced(CMAKE_CXX_WARNING_LEVEL)
endif()

endif()

if("\"${CMAKE_CXX_COMPILER_ID}\"" MATCHES "SunPro")
message(STATUS "Using SunPro compiler, using STLPort 4.")

uniquely_add_flags(CGAL_CXX_FLAGS
"-features=extensions;-library=stlport4;-D_GNU_SOURCE")
uniquely_add_flags(CGAL_SHARED_LINKER_FLAGS "-library=stlport4")
uniquely_add_flags(CGAL_EXE_LINKER_FLAGS "-library=stlport4")
endif()

if("${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES
"icpc")
message(STATUS "Intel compiler is detected.")
set(IntelCompiler_FOUND TRUE)

get_dependency_version(IntelCompiler)

if("${IntelCompiler_VERSION}" LESS "1100")
message(
"Intel Compiler version ${IntelCompiler_VERSION} is not supported by CGAL-${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}! (too old, must be 11.0 or after)"
)
else()
message(
STATUS "Using Intel Compiler version 11 (or greater). Adding -fp-model=strict"
)
if(WIN32)
uniquely_add_flags(CGAL_CXX_FLAGS "/fp:strict")
else()
uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model=strict")
endif()
endif()
endif()

if(CMAKE_COMPILER_IS_GNUCXX)

set(GCC_FOUND TRUE)

get_dependency_version(GCC)

if("${GCC_VERSION}" MATCHES "Not" OR "${GCC_VERSION}" MATCHES "Unknown")
set(GCC_FOUND FALSE)
endif()

if(GCC_FOUND)

if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
uniquely_add_flags(CGAL_CXX_FLAGS "-Wall")
# Remove -g from the relevant CMAKE_CXX_FLAGS. This will also
# propagate to the rest of the tests, since we overwrite those
# flags with the ones used to build CGAL.
string(REGEX REPLACE "-g( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# We only allow the release types DEBUG and RELEASE, but handle
# all possible values just to be sure.
foreach(release_type DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
string(REGEX REPLACE "-g( |$)" "" CMAKE_CXX_FLAGS_${release_type}
"${CMAKE_CXX_FLAGS_${release_type}}")
endforeach()

endif()

if("${GCC_VERSION}" MATCHES "^[4-9].")
message(STATUS "Using gcc version 4 (or greater). Adding -frounding-math")
uniquely_add_flags(CGAL_CXX_FLAGS "-frounding-math")
endif()

if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha")
message(STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d")
uniquely_add_flags(CGAL_CXX_FLAGS "-mieee -mfp-rounding-mode=d")
endif()

endif()

endif()

if(CGAL_TEST_SUITE)
include(display-third-party-libs-versions)
endif()
Expand Down