Commit ac1a23a7 authored by Patricia Mendez Lorenzo's avatar Patricia Mendez Lorenzo
Browse files

Misc. tweaks

parent ec0abdf1
......@@ -1575,8 +1575,8 @@ function(_ep_add_configure_command name)
get_property(cmake_args TARGET ${name} PROPERTY _EP_CMAKE_ARGS)
list(APPEND cmd ${cmake_args})
list(APPEND cmd "-DCMAKE_CXX_FLAGS=${CXX_FLAGS}")
list(APPEND cmd "-DCMAKE_C_FLAGS=${C_FLAGS}")
list(APPEND cmd "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} ${CXX_FLAGS}")
list(APPEND cmd "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} ${C_FLAGS}")
# list(APPEND cmd "-DCMAKE_Fortran_FLAGS=${Fortran_FLAGS}")
# If there are any CMAKE_CACHE_ARGS, write an initial cache and use it
......
......@@ -259,10 +259,24 @@ function(lcg_get_target_platform)
#handling of C++11
# enable it only for gcc 4.6 and greater
# -rl means print the most "recent" standard
if (NOT DEFINED CXX_STANDARD)
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/scripts/getcompilerstandards.sh -r OUTPUT_VARIABLE CXX_STANDARD OUTPUT_STRIP_TRAILING_WHITESPACE)
set (CXX_STANDARD "${CXX_STANDARD}" PARENT_SCOPE)
# if (NOT DEFINED CXX_STANDARD)
# execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/scripts/getcompilerstandards.sh -r OUTPUT_VARIABLE CXX_STANDARD OUTPUT_STRIP_TRAILING_WHITESPACE)
# set (CXX_STANDARD "${CXX_STANDARD}" PARENT_SCOPE)
# endif()
set(CXX_STANDARD FALSE PARENT_SCOPE)
if (LCG_COMP STREQUAL "gcc")
if(LCG_COMPVERS STRGREATER "50")
set(CXX_STANDARD "c++14" PARENT_SCOPE)
elseif(LCG_COMPVERS STRGREATER "48")
set(CXX_STANDARD "c++1y" PARENT_SCOPE)
elseif(LCG_COMPVERS STRGREATER "46")
set(CXX_STANDARD "c++11" PARENT_SCOPE)
endif()
elseif(LCG_COMP STREQUAL "clang")
set(CXX_STANDARD "c++11" PARENT_SCOPE)
endif()
if (CXX_STANDARD)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=${CXX_STANDARD}" PARENT_SCOPE)
endif()
......
......@@ -1468,8 +1468,9 @@ LCGPackage_Add(
UPDATE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/hepmcanalysis/files <SOURCE_DIR>
CONFIGURE_COMMAND <VOID>
BUILD_COMMAND ${MAKE} HepMCdir=${HepMC_home} FastJetdir=${fastjet_home} ROOTSYS=${ROOT_home} CLHEPdir=${CLHEP_v_home}
IF CXX_STANDARD THEN "CXXFLAGS=-std=${CXX_STANDARD} -fPIC" ENDIF
${library_path}=${CLHEP_v_home}/lib:$ENV{${library_path}}
LIBRARY_PATH=${fastjet_home}/lib:$ENV{LIBRARY_PATH}
LIBRARY_PATH=${fastjet_home}/lib:$ENV{LIBRARY_PATH}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/lib <INSTALL_DIR>/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include <INSTALL_DIR>/include
BUILD_IN_SOURCE 1
......
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