Browse Source

Fixed CMakeLists.txt for Google Test to work with VS2012

Fixed STLSoft to compile under VS2012
Fixed Pantheios to work with VS2012
Fixed CMakeLists.txt for MRMC, removed duplicate code (Thomas?), converted keywords to lowercase
tempestpy_adaptions
PBerger 12 years ago
parent
commit
decb6b8006
  1. 107
      CMakeLists.txt
  2. 5
      FindPantheios.cmake
  3. 5
      resources/3rdparty/gtest-1.6.0/CMakeLists.txt
  4. 8369
      resources/3rdparty/pantheios-1.0.1-beta214/build/vc11.unixem/makefile
  5. 33583
      resources/3rdparty/pantheios-1.0.1-beta214/build/vc11.x64/makefile
  6. 33583
      resources/3rdparty/pantheios-1.0.1-beta214/build/vc11/makefile
  7. 2
      resources/3rdparty/pantheios-1.0.1-beta214/include/pantheios/implicit_link/implicit_link_base_.h
  8. 4
      resources/3rdparty/stlsoft-1.9.116/include/stlsoft/stlsoft.h
  9. 4
      resources/3rdparty/stlsoft-1.9.116/include/stlsoft/util/std/library_discriminator.hpp

107
CMakeLists.txt

@ -24,40 +24,53 @@ configure_file (
include_directories("${PROJECT_BINARY_DIR}")
# Main Sources
FILE(GLOB_RECURSE MRMCHeaders ${PROJECT_SOURCE_DIR}/src/*.h)
FILE(GLOB_RECURSE MRMCSources ${PROJECT_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE MRMCHeaders ${PROJECT_SOURCE_DIR}/src/*.h)
file(GLOB_RECURSE MRMCSources ${PROJECT_SOURCE_DIR}/src/*.cpp)
# Test Sources
# Note that the tests also need the source files, except the main file!
FILE(GLOB_RECURSE MRMCTestHeaders ${PROJECT_SOURCE_DIR}/test/*.h)
FILE(GLOB_RECURSE MRMCTestSources ${PROJECT_SOURCE_DIR}/test/*.cpp ${PROJECT_SOURCE_DIR}/src/*/*.cpp)
file(GLOB_RECURSE MRMCTestHeaders ${PROJECT_SOURCE_DIR}/test/*.h)
file(GLOB_RECURSE MRMCTestSources ${PROJECT_SOURCE_DIR}/test/*.cpp ${PROJECT_SOURCE_DIR}/src/*/*.cpp)
# Main Grouping
SOURCE_GROUP(Headers FILES ${MRMCHeaders})
SOURCE_GROUP(Sources FILES ${MRMCSources})
source_group(Headers FILES ${MRMCHeaders})
source_group(Sources FILES ${MRMCSources})
# Test Grouping
SOURCE_GROUP(Headers FILES ${MRMCTestHeaders})
SOURCE_GROUP(Sources FILES ${MRMCTestSources})
source_group(Headers FILES ${MRMCTestHeaders})
source_group(Sources FILES ${MRMCTestSources})
# Add base folder for better inclusion pathes
include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/src")
# temp search path for Pantheios/STLSoft
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
if (NOT GTEST_INCLUDE_DIR)
set(GTEST_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.6.0/include)
endif()
if (NOT STLSOFT_INCLUDE_DIR)
set(STLSOFT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty/stlsoft-1.9.116/include)
endif()
if (NOT PANTHEIOS_INCLUDE_DIR)
set(PANTHEIOS_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty/pantheios-1.0.1-beta214/include)
endif()
message(STATUS "GTEST Include Dir is: ${GTEST_INCLUDE_DIR}")
#message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
#list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.6.0)
#list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/resources/3rdparty/pantheios-1.0.1-beta214)
#list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/resources/3rdparty/gteststlsoft-1.9.116)
#message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
# external packages
FIND_PACKAGE(GTest REQUIRED)
FIND_PACKAGE(Threads REQUIRED)
SET(Boost_USE_STATIC_LIBS ON)
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_STATIC_RUNTIME OFF)
FIND_PACKAGE(Boost REQUIRED)
FIND_PACKAGE(Doxygen REQUIRED)
FIND_PACKAGE(STLSoft REQUIRED)
#set(PANTHEIOS_USE_DYNAMIC_RUNTIME ON)
FIND_PACKAGE(Pantheios REQUIRED COMPONENTS SimpleFrontEnd File)
find_package(GTest REQUIRED)
find_package(Threads REQUIRED)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost REQUIRED)
find_package(Doxygen REQUIRED)
find_package(STLSoft REQUIRED)
# STLsoft headers
# include_directories("${PROJECT_SRC_DIR}/resources/3rdParty/stlsoft-1.9.114")
@ -65,10 +78,9 @@ FIND_PACKAGE(Pantheios REQUIRED COMPONENTS SimpleFrontEnd File)
# include_directories("${PROJECT_SRC_DIR}/resources/3rdParty/pantheios-1.0.1-beta213")
if (STLSOFT_FOUND)
message(STATUS "STLSoft found")
INCLUDE_DIRECTORIES(${STLSOFT_INCLUDE_DIR})
include_directories(${STLSOFT_INCLUDE_DIR})
endif()
FIND_PACKAGE(STLSoft REQUIRED)
find_package(STLSoft REQUIRED)
#Dynamic runtime for Pantheios is configured for dll-files, hence only usable under Windows...
if (WIN32)
@ -76,49 +88,28 @@ if (WIN32)
else()
set(PANTHEIOS_USE_DYNAMIC_RUNTIME OFF)
endif()
FIND_PACKAGE(Pantheios REQUIRED COMPONENTS SimpleFrontEnd File)
# STLsoft headers
# include_directories("${PROJECT_SRC_DIR}/resources/3rdParty/stlsoft-1.9.114")
# Pantheios Logging library
# include_directories("${PROJECT_SRC_DIR}/resources/3rdParty/pantheios-1.0.1-beta213")
if (STLSOFT_FOUND)
message(STATUS "STLSoft found")
INCLUDE_DIRECTORIES(${STLSOFT_INCLUDE_DIR})
endif()
find_package(Pantheios REQUIRED COMPONENTS SimpleFrontEnd File)
IF (PANTHEIOS_FOUND)
message(STATUS "Pantheios found")
INCLUDE_DIRECTORIES(${PANTHEIOS_INCLUDE_DIR})
LINK_DIRECTORIES(${PANTHEIOS_LIBRARY_DIRS})
else()
message(STATUS "NO PANTHEIOS!")
ENDIF()
IF (PANTHEIOS_FOUND)
message(STATUS "Pantheios found")
INCLUDE_DIRECTORIES(${PANTHEIOS_INCLUDE_DIR})
LINK_DIRECTORIES(${PANTHEIOS_LIBRARY_DIRS})
include_directories(${PANTHEIOS_INCLUDE_DIR})
link_directories(${PANTHEIOS_LIBRARY_DIRS})
else()
message(STATUS "NO PANTHEIOS!")
ENDIF()
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
if ((NOT Boost_LIBRARY_DIRS) OR ("${Boost_LIBRARY_DIRS}" STREQUAL ""))
set(Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib")
message(STATUS "Boost_LIBRARY_DIRS was empty, setting to ${Boost_LIBRARY_DIRS}")
endif ()
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
if ((NOT Boost_LIBRARY_DIRS) OR ("${Boost_LIBRARY_DIRS}" STREQUAL ""))
set(Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib")
endif ()
link_directories(${Boost_LIBRARY_DIRS})
endif(Boost_FOUND)
# must be created AFTER Boost was added because of LINK_DIRECTORIES
ADD_EXECUTABLE(MRMC-cpp ${MRMCSources} ${MRMCHeaders})
ADD_EXECUTABLE(MRMC-tests ${MRMCTestSources} ${MRMCTestHeaders})
add_executable(MRMC-cpp ${MRMCSources} ${MRMCHeaders})
add_executable(MRMC-tests ${MRMCTestSources} ${MRMCTestHeaders})
# Add target link deps for Pantheios
target_link_libraries(MRMC-cpp ${PANTHEIOS_LIBRARIES})
@ -127,8 +118,8 @@ target_link_libraries(MRMC-tests ${PANTHEIOS_LIBRARIES})
# add a target to generate API documentation with Doxygen
if(DOXYGEN_FOUND)
SET(CMAKE_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
STRING(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${PROJECT_SOURCE_DIR}/src")
set(CMAKE_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
string(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${PROJECT_SOURCE_DIR}/src")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

5
FindPantheios.cmake

@ -212,6 +212,11 @@ if(MSVC)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_P_ARCH_TAG .x64)
endif()
elseif(MSVC11)
set(_P_COMP_TAG vc11)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_P_ARCH_TAG .x64)
endif()
endif()
elseif(CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)

5
resources/3rdparty/gtest-1.6.0/CMakeLists.txt

@ -238,3 +238,8 @@ if (gtest_build_tests)
cxx_executable(gtest_xml_output_unittest_ test gtest)
py_test(gtest_xml_output_unittest)
endif()
if( MSVC ) # VS2012 doesn't support correctly the tuples yet
add_definitions( /D _VARIADIC_MAX=10 )
endif()

8369
resources/3rdparty/pantheios-1.0.1-beta214/build/vc11.unixem/makefile
File diff suppressed because it is too large
View File

33583
resources/3rdparty/pantheios-1.0.1-beta214/build/vc11.x64/makefile
File diff suppressed because it is too large
View File

33583
resources/3rdparty/pantheios-1.0.1-beta214/build/vc11/makefile
File diff suppressed because it is too large
View File

2
resources/3rdparty/pantheios-1.0.1-beta214/include/pantheios/implicit_link/implicit_link_base_.h

@ -205,6 +205,8 @@
# define PANTHEIOS_IMPL_LINK_COMPILER_NAME "vc9"
# elif _MSC_VER == 1600
# define PANTHEIOS_IMPL_LINK_COMPILER_NAME "vc10"
# elif _MSC_VER == 1700
# define PANTHEIOS_IMPL_LINK_COMPILER_NAME "vc11"
# else /* ? _MSC_VER */
# error Visual C++ version not supported
# endif /* _MSC_VER */

4
resources/3rdparty/stlsoft-1.9.116/include/stlsoft/stlsoft.h

@ -664,8 +664,10 @@
# define STLSOFT_COMPILER_VERSION_STRING "Visual C++ 9.0"
# elif (_MSC_VER == 1600)
# define STLSOFT_COMPILER_VERSION_STRING "Visual C++ 10.0"
# elif (_MSC_VER == 1700)
# define STLSOFT_COMPILER_VERSION_STRING "Visual C++ 11.0"
# else /* ? _MSC_VER */
# error Currently only versions 5.0, 6.0, 7.0, 7.1, 8.0, 9.0 and 10.0 of the Visual C++ compiler are supported by the STLSoft libraries
# error Currently only versions 5.0, 6.0, 7.0, 7.1, 8.0, 9.0, 10.0 and 11.0 of the Visual C++ compiler are supported by the STLSoft libraries
# endif /* _MSC_VER */
#else /* ? compiler */

4
resources/3rdparty/stlsoft-1.9.116/include/stlsoft/util/std/library_discriminator.hpp

@ -339,6 +339,10 @@ namespace stlsoft
# endif /* STLSOFT_COMPILE_VERBOSE */
# define STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION STLSOFT_CF_DINKUMWARE_VC_VERSION_10_0
# elif _MSC_VER == 1700
/* Version 11.0 of MSVC comes without _CPPLIB_VER macro */
# define STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION STLSOFT_CF_DINKUMWARE_VC_VERSION_10_0
# else
# error Dinkumware C++ Library version unrecognised: are you using a version of VC++ later than 10.0?

Loading…
Cancel
Save