X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b1fc0f924fa51df7858aef51a9776452a1b26dd..4a4af34fa10d3d571f864d01298cb496b989f501:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c7571e1687..6e628d32af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 2.6) +# Java requires 2.8.6 -project(SimGrid C) +project(SimGrid C CXX) #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Check for the compiler # @@ -10,12 +11,10 @@ project(SimGrid C) if(WIN32) SET(CMAKE_RC_COMPILER "windres") endif() + ## ## Check the C/C++ standard that we need ## See also tools/cmake/Flags.cmake that sets our paranoid warning flags - -enable_language(CXX) - INCLUDE(CheckCCompilerFlag) CHECK_C_COMPILER_FLAG(-fstack-cleaner HAVE_C_STACK_CLEANER) @@ -30,11 +29,6 @@ if (CMAKE_COMPILER_IS_GNUCC) "SimGrid needs at least g++ version 4.7 to compile " "(c++11 support of previous versions is too limited).") endif() - - if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8") - set (CMAKE_AR gcc-ar) - set (CMAKE_RANLIB gcc-ranlib) - endif() endif() ## We need a decent support of the c++11 standard @@ -214,12 +208,6 @@ if(WIN32) message("You REALLY should use MinGW to compile SimGrid on Windows!") endif() - if(ARCH_32_BITS) ### Arch 32bits - set(_WIN32 1) - else() ### Arch 64bits - set(_WIN64 1) - endif() - set(NSIS_WIN_VERSION $ENV{PROCESSOR_ARCHITEW6432}) if(NSIS_WIN_VERSION MATCHES "") set(NSIS_WIN_VERSION $ENV{PROCESSOR_ARCHITECTURE}) @@ -268,6 +256,10 @@ else() include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLibWin.cmake) endif() +if(enable_java) + include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeJava.cmake) +endif() + ### Make Exes include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeExe.cmake)