SET(CONTEXT_THREADS 0)
SET(HAVE_RUBY 0)
set(libruby "ruby1.8")
-if(NOT disable_ruby)
+if(enable_ruby)
include(FindRuby)
set(OKITOKI no)
foreach(path ${RUBY_INCLUDE_PATH})
ADD_DEFINITIONS("-I${PROJECT_DIRECTORY}/src/bindings/ruby -I${PROJECT_DIRECTORY}/src/simix")
SET(HAVE_RUBY 1)
endif(RUBY_INCLUDE_PATH)
-endif(NOT disable_ruby)
+endif(enable_ruby)
if(enable_tracing)
SET(HAVE_TRACING 1)
#--------------------------------------------------------------------------------------------------
### Initialize of CONTEXT JAVA
-if(disable_java)
+if(NOT enable_java)
SET(HAVE_JAVA 0)
-else(disable_java)
+else(NOT enable_java)
include(FindJava)
include(FindJNI)
if(JAVA_INCLUDE_PATH)
else(JAVA_COMPILE AND JAVA_INCLUDE_PATH AND JAVA_INCLUDE_PATH2)
SET(HAVE_JAVA 0)
endif(JAVA_COMPILE AND JAVA_INCLUDE_PATH AND JAVA_INCLUDE_PATH2)
-endif(disable_java)
+endif(NOT enable_java)
#--------------------------------------------------------------------------------------------------
### Initialize of CONTEXT GTNETS
-if(disable_gtnets)
+if(NOT enable_gtnets)
SET(HAVE_GTNETS 0)
-else(disable_gtnets)
+else(NOT enable_gtnets)
set(GTNETS_LDFLAGS "-L${gtnets_path}/lib")
set(GTNETS_CPPFLAGS "-I${gtnets_path}/include/gtnets")
exec_program("${CMAKE_CXX_COMPILER} ${GTNETS_CPPFLAGS} -lgtnets ${GTNETS_LDFLAGS} ${PROJECT_DIRECTORY}/buildtools/Cmake/prog_test/prog_gtnets.cpp " OUTPUT_VARIABLE COMPILE_GTNETS_VAR)
if(COMPILE_GTNETS_VAR)
SET(HAVE_GTNETS 0)
- message("GTnetS doesn't works : set -Ddisable_gtnets=on")
else(COMPILE_GTNETS_VAR)
SET(HAVE_GTNETS 1)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GTNETS_LDFLAGS} ${GTNETS_CPPFLAGS} ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GTNETS_LDFLAGS} ${GTNETS_CPPFLAGS} ")
endif(COMPILE_GTNETS_VAR)
-endif(disable_gtnets)
+endif(NOT enable_gtnets)
#--------------------------------------------------------------------------------------------------
### Initialize of CONTEXT THREADS
set(HAVE_LUA 0)
-if(NOT disable_lua)
+if(enable_lua)
find_path(HAVE_LUA5_1_LUALIB_H
NAMES lualib.h
PATHS "/sw/include/" "/usr/include/lua5.1/"
set(HAVE_LUA 0)
endif(NOT LUA_LIB_PATH_1 AND NOT LUA_LIB_PATH_2 AND NOT LUA_LIB_PATH_3)
-endif(NOT disable_lua)
+endif(enable_lua)
###############
## SVN version check
### ARGs use -D[var]=[ON/OFF] or [1/0] or [true/false](see after)
-### ex: cmake -Ddisable_java=ON -Ddisable_gtnets=ON ./
+### ex: cmake -Denable_java=ON -Denable_gtnets=ON ./
set(BIBTEX2HTML ${BIBTEX2HTML} CACHE PATH "Path to bibtex2html")
set(gtnets_path ${gtnets_path} CACHE PATH "Path to gtnets lib")
set(with_context "auto" CACHE TYPE INTERNAL FORCE)
endif(NOT with_context)
-option(disable_gtnets "This variable set the gtnets context." off)
-option(disable_java "This variable set the java context." off)
-option(disable_lua "This variable set lua use." off)
-option(disable_ruby "This variable set ruby use." off)
+option(enable_gtnets "This variable set the gtnets context." on)
+option(enable_java "This variable set the java context." off)
+option(enable_lua "This variable set lua use." on)
+option(enable_ruby "This variable set ruby use." on)
option(enable_compile_optimizations "" off)
option(enable_compile_warnings "" off)
SET(BUILDNAME "SUPERNOVAE" CACHE TYPE INTERNAL FORCE)
endif(supernovae)
-if(NOT disable_gtnets AND HAVE_GTNETS)
+if(HAVE_GTNETS)
SET(BUILDNAME "GTNETS" CACHE TYPE INTERNAL FORCE)
-endif(NOT disable_gtnets AND HAVE_GTNETS)
+endif(HAVE_GTNETS)
if(HAVE_TRACING)
SET(BUILDNAME "TRACING" CACHE TYPE INTERNAL FORCE)
\verbatim
"cmake -D[name]=[value] ... ./"
-[name] disable_gtnets [value] ON/OFF or TRUE/FALSE or 1/0
- disable_java ON/OFF or TRUE/FALSE or 1/0
- disable_lua ON/OFF or TRUE/FALSE or 1/0
- disable_ruby ON/OFF or TRUE/FALSE or 1/0
-
+[name] enable_gtnets [value] ON/OFF or TRUE/FALSE or 1/0
+ enable_java ON/OFF or TRUE/FALSE or 1/0
+ enable_lua ON/OFF or TRUE/FALSE or 1/0
+ enable_ruby ON/OFF or TRUE/FALSE or 1/0
enable_compile_optimizations ON/OFF or TRUE/FALSE or 1/0
enable_compile_warnings ON/OFF or TRUE/FALSE or 1/0
enable_maintainer_mode ON/OFF or TRUE/FALSE or 1/0
\subsubsection faq_cmakeoption2 Options explaination
- \li disable_gtnets : set to true implie that user doesn't want to use gtnets.
+ \li enable_gtnets : set to true implie that user wants to use gtnets.
- \li disable_java : set to true implie that user doesn't want to add java langage into simgrid compilation.
+ \li enable_java : set to true implie that user wants to add java langage into simgrid compilation.
- \li disable_lua : set to true implie that user doesn't want to add lua langage into simgrid compilation.
+ \li enable_lua : set to true implie that user wants to add lua langage into simgrid compilation.
- \li disable_ruby : set to true implie that user doesn't want to add ruby langage into simgrid compilation.
+ \li enable_ruby : set to true implie that user wants to add ruby langage into simgrid compilation.
\li enable_compile_optimizations : add flags "-O3 -finline-functions -funroll-loops -fno-strict-aliasing"
Those options are initialized the first time you launch \"cmake ./\" whithout specified option.
\verbatim
-disable_gtnets off
-disable_java off
-disable_lua off
-disable_ruby off
-
+enable_gtnets on
+enable_lua on
+enable_ruby on
+enable_java off
enable_compile_optimizations off
enable_compile_warnings off
enable_maintainer_mode off