1
0

Skip unknown cflag for Apple clang & remove cSemaphore

This commit is contained in:
Cengiz Can
2015-06-02 01:26:57 +03:00
parent d871c47505
commit c967698b2d
8 changed files with 12 additions and 135 deletions

View File

@@ -63,7 +63,7 @@ macro(set_flags)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
elseif(APPLE)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
@@ -262,8 +262,11 @@ macro(set_exe_flags)
add_flags_cxx("-Wno-documentation")
endif()
if ("${CLANG_VERSION}" VERSION_GREATER 3.5)
# Use this flag to ignore error for a reserved macro problem in sqlite 3
add_flags_cxx("-Wno-reserved-id-macro")
check_cxx_compiler_flag(-Wno-reserved-id-macro HAS_NO_RESERVED_ID_MACRO)
if (HAS_NO_RESERVED_ID_MACRO)
# Use this flag to ignore error for a reserved macro problem in sqlite 3
add_flags_cxx("-Wno-reserved-id-macro")
endif()
endif()
endif()
endif()
@@ -277,7 +280,7 @@ endmacro()
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=missing-prototypes -Wno-error=deprecated")
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=shadow -Wno-error=old-style-cast -Wno-error=switch-enum -Wno-error=switch")
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=float-equal -Wno-error=global-constructors")
# if ("${CLANG_VERSION}" VERSION_GREATER 3.0)
# # flags that are not present in 3.0
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=covered-switch-default ")
@@ -286,4 +289,3 @@ endmacro()
# endif()
# endforeach()
# endif()