mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-21 22:56:13 +00:00
Changed: Other changes in CMake files
--HG-- branch : develop
This commit is contained in:
parent
92bc8661df
commit
90359122d7
3 changed files with 22 additions and 10 deletions
|
@ -114,12 +114,16 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
|
||||
GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
|
||||
IF(oldProps)
|
||||
LIST(APPEND _FLAGS ${oldProps})
|
||||
SET(_FLAG ${oldProps})
|
||||
SEPARATE_ARGUMENTS(_FLAG)
|
||||
LIST(APPEND _FLAGS ${_FLAG})
|
||||
ENDIF()
|
||||
|
||||
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
|
||||
IF(oldPropsBuild)
|
||||
LIST(APPEND _FLAGS ${oldPropsBuild})
|
||||
SET(_FLAG ${oldPropsBuild})
|
||||
SEPARATE_ARGUMENTS(_FLAG)
|
||||
LIST(APPEND _FLAGS ${_FLAG})
|
||||
ENDIF()
|
||||
|
||||
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
|
||||
|
@ -205,6 +209,10 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(USE_CPP0X AND gcc_compiler_version GREATER "6.2.0")
|
||||
LIST(APPEND _FLAGS "-std=gnu++11")
|
||||
ENDIF()
|
||||
|
||||
# Format definitions
|
||||
IF(MSVC)
|
||||
# Fix path with space
|
||||
|
@ -316,7 +324,7 @@ MACRO(PCH_SET_COMPILE_COMMAND _inputcpp _compile_FLAGS)
|
|||
SET(_FLAGS "")
|
||||
IF(APPLE)
|
||||
SET(HEADER_FORMAT "objective-${HEADER_FORMAT}")
|
||||
SET(_FLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch)
|
||||
SET(_FLAGS ${OBJC_FLAGS})
|
||||
ENDIF()
|
||||
SET(PCH_COMMAND ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} ${_FLAGS} -x ${HEADER_FORMAT} -o ${PCH_OUTPUT} -c ${PCH_INPUT})
|
||||
ENDIF()
|
||||
|
@ -402,7 +410,8 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName)
|
|||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
SET(PCH_ADDITIONAL_COMPILER_FLAGS "-fobjc-abi-version=2 -fobjc-legacy-dispatch -x objective-c++ ${PCH_ADDITIONAL_COMPILER_FLAGS}")
|
||||
STRING(REPLACE ";" " " OBJC_FLAGS_STR "${OBJC_FLAGS}")
|
||||
SET(PCH_ADDITIONAL_COMPILER_FLAGS "${OBJC_FLAGS_STR} -x objective-c++ ${PCH_ADDITIONAL_COMPILER_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_PCH_DEBUG)
|
||||
|
|
|
@ -565,8 +565,8 @@ MACRO(NL_SETUP_BUILD)
|
|||
ADD_PLATFORM_FLAGS("/X")
|
||||
|
||||
IF(MSVC14)
|
||||
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
||||
# /Ox is working with VC++ 2015, but custom optimizations don't exist
|
||||
ADD_PLATFORM_FLAGS("/Gy-")
|
||||
# /Ox is working with VC++ 2015 and 2017, but custom optimizations don't exist
|
||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||
# without inlining it's unusable, use custom optimizations again
|
||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||
|
@ -664,6 +664,8 @@ MACRO(NL_SETUP_BUILD)
|
|||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
SET(OBJC_FLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch -fobjc-weak)
|
||||
|
||||
IF(NOT XCODE)
|
||||
IF(CMAKE_OSX_ARCHITECTURES)
|
||||
SET(TARGETS_COUNT 0)
|
||||
|
@ -1167,6 +1169,7 @@ MACRO(SETUP_EXTERNAL)
|
|||
|
||||
IF(APPLE)
|
||||
IF(WITH_STATIC_EXTERNAL)
|
||||
# Look only for static libraries because systems libraries are using Frameworks
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
ELSE()
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
||||
|
@ -1180,12 +1183,13 @@ MACRO(SETUP_EXTERNAL)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Android and iOS have pthread
|
||||
IF(ANDROID OR IOS)
|
||||
# Android, iOS and Mac OS X have pthread, but no need to link to libpthread
|
||||
IF(ANDROID OR APPLE)
|
||||
SET(CMAKE_USE_PTHREADS_INIT 1)
|
||||
SET(Threads_FOUND TRUE)
|
||||
ELSE()
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
SET(THREADS_HAVE_PTHREAD_ARG ON)
|
||||
FIND_PACKAGE(Threads)
|
||||
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
||||
ENDIF()
|
||||
|
||||
|
|
|
@ -177,7 +177,6 @@ IF(WITH_RYZOM_CLIENT)
|
|||
${LUA_LIBRARIES}
|
||||
${LUABIND_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
)
|
||||
|
||||
IF(NOT APPLE AND NOT WIN32)
|
||||
|
|
Loading…
Reference in a new issue