Commit 2310aeab authored by Max Lyon's avatar Max Lyon

dont be pedantic on mac because the output is too large

parent f6aad0f5
Pipeline #11537 passed with stage
in 6 minutes and 44 seconds
......@@ -73,13 +73,10 @@ target_link_libraries (HexExStatic ${LIBRARIES})
# exact predicates produce correct results.
#
set (HEXEX_COMPILE_FLAGS "-Wall")
set (HEXEX_CXX_COMPILE_FLAGS "")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set (HEXEX_COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS} -msse -mfpmath=sse -pedantic -Weverything" )
set (HEXEX_CXX_COMPILE_FLAGS "-std=c++11")
set (HEXEX_COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS} -msse -mfpmath=sse -Weverything" )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set (HEXEX_COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS} -msse -mfpmath=sse -pedantic -Wextra")
set (HEXEX_CXX_COMPILE_FLAGS "-std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
message (WARNING
"You are using an Intel compiler which might generate x87 FPU code "
......@@ -108,15 +105,17 @@ set_target_properties (HexEx
PROPERTIES
COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS}"
DEFINE_SYMBOLS "-DHEXEX_EXPORT_SYMBOLS"
CXX_STANDARD 11
)
set_target_properties (HexExStatic
PROPERTIES
COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS}"
DEFINE_SYMBOLS "-DHEXEX_EXPORT_SYMBOLS"
CXX_STANDARD 11
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HEXEX_CXX_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
#
# Fake successful finder run if compiling as a dependent project.
......
......@@ -49,14 +49,16 @@ add_executable (cmdline_tool ${CMDLINE_TOOL_SOURCES})
LINK_DIRECTORIES(cmdline_tool ${CMDLINE_TOOL_LIBRARY_DIRS} )
target_link_libraries(cmdline_tool ${CMDLINE_TOOL_LIBRARIES})
if (NOT WIN32 )
set(HEXEX_COMPILE_FLAGS "-Wall -Wextra -pedantic -std=c++11 -Wno-long-long")
else()
set(HEXEX_COMPILE_FLAGS "")
if ( NOT WIN32 )
# Set compiler flags
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_target_properties(cmdline_tool PROPERTIES COMPILE_FLAGS "-Wall -Wno-long-long")
else()
set_target_properties(cmdline_tool PROPERTIES COMPILE_FLAGS "-pedantic -Wno-long-long")
endif()
endif()
set_target_properties(cmdline_tool
PROPERTIES
INCLUDE_DIRECTORIES "${CMDLINE_TOOL_INCLUDE_DIRS}"
COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS}"
)
......@@ -49,15 +49,17 @@ add_executable (minimum_example ${MINIMUM_EXAMPLE_SOURCES})
LINK_DIRECTORIES(minimum_example ${MINIMUM_EXAMPLE_LIBRARY_DIRS} )
target_link_libraries(minimum_example ${MINIMUM_EXAMPLE_LIBRARIES})
if (NOT WIN32 )
set(HEXEX_COMPILE_FLAGS "-Wall -Wextra -pedantic -std=c++11 -Wno-long-long")
else()
set(HEXEX_COMPILE_FLAGS "")
if ( NOT WIN32 )
# Set compiler flags
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_target_properties(minimum_example PROPERTIES COMPILE_FLAGS "-Wall -Wno-long-long")
else()
set_target_properties(minimum_example PROPERTIES COMPILE_FLAGS "-pedantic -Wno-long-long")
endif()
endif()
set_target_properties(minimum_example
PROPERTIES
INCLUDE_DIRECTORIES "${MINIMUM_EXAMPLE_INCLUDE_DIRS}"
COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS}"
)
......@@ -57,11 +57,14 @@ if ( HEXEX_BUILD_UNIT_TESTS )
if ( NOT WIN32 )
# Set compiler flags
set_target_properties(unittests PROPERTIES COMPILE_FLAGS "-g -pedantic -Wno-long-long")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_target_properties(unittests PROPERTIES COMPILE_FLAGS "-g -Wall -Wno-long-long")
else()
set_target_properties(unittests PROPERTIES COMPILE_FLAGS "-g -pedantic -Wno-long-long")
endif()
else()
# Set compiler flags
set_target_properties(unittests PROPERTIES COMPILE_FLAGS "" )
endif()
if ( NOT WIN32 )
......
Markdown is supported
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