Skip to content

Commit

Permalink
Iron out some differences between configure and CMake build (fixes RO…
Browse files Browse the repository at this point in the history
…OT-6353)
  • Loading branch information
peremato committed Jun 2, 2014
1 parent 1eac9dc commit e4f4d6d
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
3 changes: 1 addition & 2 deletions cmake/modules/RootBuildOptions.cmake
Expand Up @@ -147,7 +147,6 @@ ROOT_BUILD_OPTION(pythia8 ON "Pythia8 EG support, requires libPythia8")
ROOT_BUILD_OPTION(python ON "Python ROOT bindings, requires python >= 2.2")
ROOT_BUILD_OPTION(qt OFF "Qt graphics backend, requires libqt >= 4.8")
ROOT_BUILD_OPTION(qtgsi OFF "GSI's Qt integration, requires libqt >= 4.8")
ROOT_BUILD_OPTION(reflex ON "Build the libReflex dictionary library")
ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
Expand All @@ -166,7 +165,7 @@ ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random
if (canBuildVC)
ROOT_BUILD_OPTION(vc OFF "Vc adds a few new types for portable and intuitive SIMD programming")
endif()
ROOT_BUILD_OPTION(vdt OFF "VDT adds a set of fast and vectorisable mathematical functions")
ROOT_BUILD_OPTION(vdt ON "VDT adds a set of fast and vectorisable mathematical functions")
ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
ROOT_BUILD_OPTION(xml ON "XML parser interface")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/RootConfiguration.cmake
Expand Up @@ -479,7 +479,7 @@ else()
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build/unix/compiledata.sh include/compiledata.h "${CXX}" ""
"${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}"
"${CMAKE_CXX_FLAGS}" "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_FLAGS}" "${LibSuffix}" "${SYSLIBS}"
"${libdir}" "-lCore" "-Rint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "" "${explicitlink}" )
"${libdir}" "-lCore" "-lRint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "" "${explicitlink}" )
endif()

configure_file(${CMAKE_SOURCE_DIR}/config/root-config.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root-config @ONLY)
Expand Down
10 changes: 6 additions & 4 deletions cmake/modules/RootNewMacros.cmake
Expand Up @@ -551,19 +551,21 @@ function(ROOT_GENERATE_ROOTMAP library)
endfunction()

#---------------------------------------------------------------------------------------------------
#---ROOT_INSTALL_HEADERS([dir1 dir2 ...])
#---ROOT_INSTALL_HEADERS([dir1 dir2 ...] OPTIONS [options])
#---------------------------------------------------------------------------------------------------
function(ROOT_INSTALL_HEADERS)
if( ARGN )
set(dirs ${ARGN})
CMAKE_PARSE_ARGUMENTS(ARG "" "" "OPTIONS" ${ARGN})
if( ARG_UNPARSED_ARGUMENTS )
set(dirs ${ARG_UNPARSED_ARGUMENTS})
else()
set(dirs inc/)
endif()
foreach(d ${dirs})
install(DIRECTORY ${d} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT headers
PATTERN ".svn" EXCLUDE
REGEX "LinkDef" EXCLUDE )
REGEX "LinkDef" EXCLUDE
${ARG_OPTIONS})
set_property(GLOBAL APPEND PROPERTY ROOT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${d})
endforeach()
endfunction()
Expand Down
4 changes: 3 additions & 1 deletion core/thread/CMakeLists.txt
Expand Up @@ -9,9 +9,11 @@ set(headers TCondition.h TConditionImp.h TMutex.h TMutexImp.h
if(NOT WIN32)
set(headers ${headers} TPosixCondition.h TPosixMutex.h
TPosixThread.h TPosixThreadFactory.h PosixThreadInc.h)
set(installoptions OPTIONS REGEX "Win32" EXCLUDE)
else()
set(headers ${headers} TWin32Condition.h TWin32Mutex.h
TWin32Thread.h TWin32ThreadFactory.h)
set(installoptions OPTIONS REGEX "Posix" EXCLUDE)
endif()

set(sources TCondition.cxx TConditionImp.cxx TMutex.cxx TMutexImp.cxx
Expand All @@ -29,4 +31,4 @@ ROOT_GENERATE_DICTIONARY(G__Thread ${headers} STAGE1 MODULE Thread LINKDEF LinkD

ROOT_OBJECT_LIBRARY(ThreadObjs ${sources} G__Thread.cxx)
ROOT_LINKER_LIBRARY(Thread $<TARGET_OBJECTS:ThreadObjs> LIBRARIES ${CMAKE_THREAD_LIBS_INIT} DEPENDENCIES Core)
ROOT_INSTALL_HEADERS()
ROOT_INSTALL_HEADERS(${installoptions})
1 change: 0 additions & 1 deletion graf2d/mathtext/CMakeLists.txt
@@ -1,3 +1,2 @@
ROOT_LINKER_LIBRARY(mathtext *.cxx TYPE STATIC)
ROOT_INSTALL_HEADERS()

3 changes: 2 additions & 1 deletion graf3d/gl/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@ ROOT_GLOB_SOURCES(sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRE
if(WIN32 OR cocoa)
list(REMOVE_ITEM headers TX11GL.h)
list(REMOVE_ITEM sources TX11GL.cxx)
set(installoptions OPTIONS REGEX "TX11GL" EXCLUDE)
endif()

if(WIN32)
Expand All @@ -37,4 +38,4 @@ ROOT_GENERATE_DICTIONARY(G__GL ${headers} MODULE RGL LINKDEF LinkDef.h)

ROOT_LINKER_LIBRARY(RGL ${sources} G__GL.cxx LIBRARIES ${gllibs} GLEW ${FTGL_LIBRARIES} DEPENDENCIES Hist Gui Ged)

ROOT_INSTALL_HEADERS()
ROOT_INSTALL_HEADERS(${installoptions})
7 changes: 4 additions & 3 deletions net/CMakeLists.txt
Expand Up @@ -10,11 +10,12 @@ if(krb5)
add_subdirectory(krb5auth)
endif()

if(NOT WIN32 AND ssl)
add_subdirectory(rpdutils)
endif()

if(xrootd)
add_subdirectory(netx)
if(NOT WIN32 AND ssl)
add_subdirectory(rpdutils)
endif()
if(alien)
add_subdirectory(alien)
endif()
Expand Down
4 changes: 3 additions & 1 deletion net/auth/CMakeLists.txt
Expand Up @@ -34,8 +34,10 @@ ROOT_LINKER_LIBRARY(RootAuth ${sources} G__RootAuth.cxx LIBRARIES ${CRYPTLIBS} D
if(afs)
ROOT_GENERATE_DICTIONARY(G__AFSAuth AFSAuth.h AFSAuthTypes.h TAFS.h MODULE AFSAuth LINKDEF LinkDefAFS.h)
ROOT_LINKER_LIBRARY(AFSAuth AFSAuth.cxx TAFS.cxx G__AFSAuth.cxx LIBRARIES ${CRYPTLIBS} DEPENDENCIES Net RIO )
else()
set(installoptions OPTIONS REGEX "AFS" EXCLUDE)
endif()

ROOT_INSTALL_HEADERS()
ROOT_INSTALL_HEADERS(${installoptions})


3 changes: 2 additions & 1 deletion proof/proofbench/CMakeLists.txt
Expand Up @@ -8,7 +8,8 @@ ROOT_USE_PACKAGE(proof/proofplayer)
ROOT_GLOB_HEADERS(headers inc/TProof*.h)
ROOT_GLOB_SOURCES(sources src/TProof*.cxx)


ROOT_GENERATE_DICTIONARY(G__ProofBench ${headers} MODULE ProofBench LINKDEF LinkDef.h)

ROOT_LINKER_LIBRARY(ProofBench ${sources} G__ProofBench.cxx LIBRARIES Core DEPENDENCIES Hist Gpad ProofPlayer)
ROOT_INSTALL_HEADERS()
ROOT_INSTALL_HEADERS(OPTIONS REGEX "TSel" EXCLUDE)
8 changes: 1 addition & 7 deletions rootx/CMakeLists.txt
Expand Up @@ -9,12 +9,6 @@ if(x11)
ROOT_EXECUTABLE(root *.cxx ${CMAKE_SOURCE_DIR}/core/clib/src/strlcpy.c
LIBRARIES ${X11_LIBRARIES} ${X11_Xpm_LIB} ${X11_Xft_LIB} ${X11_Xext_LIB})
elseif(cocoa)
add_custom_target(root ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root)
add_dependencies(root root.exe)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root)
install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root
DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications)

ROOT_EXECUTABLE(root rootx.cxx rootxx-cocoa.mm LIBRARIES "-framework Cocoa")
endif()

0 comments on commit e4f4d6d

Please sign in to comment.