From ca7f887d5e0a85a1da3c976d0f5c71649901b973 Mon Sep 17 00:00:00 2001 From: navarrop Date: Tue, 13 Apr 2010 07:59:32 +0000 Subject: [PATCH] Delete double negation for option. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7545 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- buildtools/Cmake/src/CMakeCompleteInFiles.txt | 21 +++++++-------- buildtools/Cmake/src/CMakeOption.txt | 10 +++---- buildtools/Cmake/src/CTestConfig.cmake | 4 +-- doc/FAQ.doc | 26 +++++++++---------- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/buildtools/Cmake/src/CMakeCompleteInFiles.txt b/buildtools/Cmake/src/CMakeCompleteInFiles.txt index 0ed3dd2744..a64286ba67 100644 --- a/buildtools/Cmake/src/CMakeCompleteInFiles.txt +++ b/buildtools/Cmake/src/CMakeCompleteInFiles.txt @@ -55,7 +55,7 @@ set(CONTEXT_UCONTEXT 0) 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}) @@ -81,7 +81,7 @@ if(NOT disable_ruby) 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) @@ -89,9 +89,9 @@ endif(enable_tracing) #-------------------------------------------------------------------------------------------------- ### 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) @@ -106,25 +106,24 @@ else(disable_java) 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 @@ -253,7 +252,7 @@ endif(NOT with_context_ok) 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/" @@ -305,7 +304,7 @@ if(NOT disable_lua) 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 diff --git a/buildtools/Cmake/src/CMakeOption.txt b/buildtools/Cmake/src/CMakeOption.txt index 9361f2b286..2629a51285 100644 --- a/buildtools/Cmake/src/CMakeOption.txt +++ b/buildtools/Cmake/src/CMakeOption.txt @@ -1,5 +1,5 @@ ### 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") @@ -10,10 +10,10 @@ if(NOT with_context) 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) diff --git a/buildtools/Cmake/src/CTestConfig.cmake b/buildtools/Cmake/src/CTestConfig.cmake index d191889f2b..675b702986 100644 --- a/buildtools/Cmake/src/CTestConfig.cmake +++ b/buildtools/Cmake/src/CTestConfig.cmake @@ -48,9 +48,9 @@ if(supernovae) 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) diff --git a/doc/FAQ.doc b/doc/FAQ.doc index bc1d58d419..6e5182f062 100644 --- a/doc/FAQ.doc +++ b/doc/FAQ.doc @@ -397,11 +397,10 @@ TODO \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 @@ -419,13 +418,13 @@ TODO \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" @@ -489,11 +488,10 @@ src/gras/DataDesc/ddt_parse.yy.c 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 -- 2.20.1