mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Require CMake >= 2.8.9 and update Travis' CMake
The POSITION_INDEPENDENT_CODE target property seems to be supported since CMake 2.8.9, and Ubuntu 12.04 uses 2.8.7.
This commit is contained in:
parent
99acea70a0
commit
647e3b6fb2
4 changed files with 12 additions and 11 deletions
|
@ -39,6 +39,7 @@ addons:
|
|||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- george-edison55-precise-backports # more recent CMake
|
||||
packages:
|
||||
- libconfig++8-dev
|
||||
- gdb
|
||||
|
@ -51,6 +52,8 @@ addons:
|
|||
- libedit2
|
||||
- libedit-dev
|
||||
- libcurl3:i386
|
||||
- cmake
|
||||
- cmake-data
|
||||
before_install:
|
||||
-
|
||||
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
|
|
|
@ -325,7 +325,7 @@ cl::opt<std::string>
|
|||
#endif
|
||||
|
||||
cl::opt<llvm::Reloc::Model> mRelocModel(
|
||||
"relocation-model", cl::desc("Relocation model"),
|
||||
"relocation-model", cl::desc("Relocation model"), cl::ZeroOrMore,
|
||||
#if LDC_LLVM_VER < 309
|
||||
cl::init(llvm::Reloc::Default),
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
project(runtime)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.5)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
#
|
||||
# Main configuration.
|
||||
|
@ -480,7 +480,12 @@ macro(build_runtime_variants d_flags c_flags ld_flags path_suffix outlist_target
|
|||
"${path_suffix}"
|
||||
${outlist_targets}
|
||||
)
|
||||
build_profile_runtime ("${d_flags}" "${c_flags}" "${ld_flags}" "${path_suffix}" ${outlist_targets})
|
||||
|
||||
if(LDC_WITH_PGO)
|
||||
build_profile_runtime("${d_flags};${D_FLAGS};${D_FLAGS_RELEASE}" "${c_flags}" "${ld_flags}" "${path_suffix}" ${outlist_targets})
|
||||
get_target_suffix("" "${path_suffix}" target_suffix)
|
||||
set_common_library_properties(ldc-profile-rt${target_suffix})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Setup the build of profile-rt
|
||||
|
|
|
@ -16,8 +16,6 @@ if (LDC_WITH_PGO)
|
|||
if (NOT (LDC_LLVM_VER GREATER 309))
|
||||
set(PROFRT_EXTRA_LDFLAGS "Ws2_32.lib")
|
||||
endif()
|
||||
else()
|
||||
set(PROFRT_EXTRA_FLAGS "-fPIC -O3")
|
||||
endif()
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
|
@ -115,9 +113,4 @@ if (LDC_WITH_PGO)
|
|||
|
||||
# Install D interface files to profile-rt.
|
||||
install(DIRECTORY ${PROFILERT_DIR}/d/ldc DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.d")
|
||||
|
||||
else()
|
||||
# No profiling supported, define NOP macro
|
||||
macro(build_profile_runtime c_flags ld_flags path_suffix outlist_targets)
|
||||
endmacro()
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue